首页 | 官方网站   微博 | 高级检索  
相似文献
 共查询到18条相似文献,搜索用时 140 毫秒
1.
结合幂律分布的研究方法对面向对象软件度量的结果进行研究,探讨不同结构层次软件度量中出现的长尾分布现象。基于4个大型Java开源项目,分别对类代码长度、类属性个数和类方法数这3个影响软件质量的主要度量因子进行度量。度量结果拟合幂律分布,采用极大似然估计法对拟合的幂律分布形状参数进行估计,并使用基于拔靴法的假设检验方法评估拟合效果。通过对3个度量因子统计结果研究发现,幂律分布存在于大部分统计结果的尾部。利用度量因子拟合的幂律分布函数,在互补累积分布图中找到偏离拟合幂律分布函数较远的类,可以在这些类中发现代码质量问题。  相似文献   

2.
根据新浪微博的实际用户数据,发现粉丝数、关注数和微博数3个特征量的分布,都存在双段幂律分布现象,不同类型用户特征量的分布具有差异性.使用双帕累托对数正态(DPLN)分布对数据进行拟合,相比对数正态分布和幂律分布,可以得到更优的效果.用户活跃时间服从指数分布,不同活跃时间的3个用户特征量都近似服从对数正态分布;用户特征量的增长率服从对数正态分布,且与特征量自身的规模无关,这些特征与双帕累托对数正态分布模型一致,从而使用这一模型可以很好地解释粉丝数、关注数和微博数分布特性的形成机制.  相似文献   

3.
本文首先介绍了面向对象软件的特征,然后具体分析了C&K度量法,着重分析了其中与类继承相关的继承树深度(DIT)和孩子数目(NOC)度量准则。在此基础上,通过分析超类与其子类中元素(方法和属性)的继承关系,提出了基于继承的内聚度度量方法,从而克服了C&K度量法中对类继承性、多态性方面度量的不足,为综合评价类的内聚度度提供了指南。  相似文献   

4.
面向对象软件度量中的内聚缺乏度分析   总被引:9,自引:0,他引:9  
从理论和实验两方面对面向对象软件度量中内聚缺乏度本质与表现进行了较深入的分析 ,给出了内聚缺乏度的 3种定义 :α,β和γ,比较了它们的优点和缺点 .理论与实验均表明 ,α内聚缺乏度 (也就是 C& K内聚缺乏度 )和β内聚缺乏度均没有“度”的含义 .而γ内聚缺乏度有较好的特性 ,但对于方法数特别少的类 ,稳定性差 .还简要分析了基于α内聚缺乏度 (C& K内聚缺乏度 )派生出的两种内聚缺乏度定义 ,即β′和γ′内聚缺乏度 ,它们与β和γ内聚缺乏度有相同的性质 .并指出 ,内聚缺乏度研究应当与程序员心理学研究相结合 .  相似文献   

5.
软件度量是保证软件质量的重要方法,该文主要针对面向对象软件经过分析度量后得出结果进行分析与评价,分析与评价主要基于面向对象程序中类的耦合度、内聚度、继承性、复杂度等进行展开,从数学的角度来分析度量指标的可信度,以保证从整体上把握面向对象软件产品的质量。  相似文献   

6.
深度神经网络训练的实质是初始化权重不断调整的过程,整个训练过程存在耗费时间长、需要数据量大等问题。大量预训练网络由经过训练的权重数据组成,若能发现预训练网络权重分布规律,利用这些规律来初始化未训练网络,势必会减少网络训练时间。通过对AlexNet、ResNet18网络在ImageNet数据集上的预训练模型权重进行概率分布分析,发现该权重分布具备单侧幂律分布的特征,进而使用双对数拟合的方式进一步验证权重的单侧分布服从截断幂律分布的性质。基于该分布规律,结合防止过拟合的正则化思想提出一种标准化对称幂律分布(NSPL)的初始化方法,并基于AlexNet和ResNet32网络,与He初始化的正态分布、均匀分布两种方法在CIFAR10数据集上进行实验对比,结果表明,NSPL方法收敛速度优于正态分布、均匀分布两种初始化方法,且在ResNet32上取得了更高的精确度。  相似文献   

7.
利用从实际网络获得的数据,提出基于流的P2P网络特性模型。采用图形方法和概述统计识别样本所服从的分布族,使用可视化图形方法和假设检验方法对统计分布模型进行拟合优度检验。分析结果表明,流持续时间的分布模型可以用对数正态分布精确表示,混合对数正态分布可以有效拟合流长和流传输速率分布的分布模型,且P2P应用的流长和流持续时间没有高度相关的关系。  相似文献   

8.
一个面向对象软件度量工具的实现和度量实验研究   总被引:26,自引:0,他引:26  
李心科  刘宗田  潘飚  邢大红 《计算机学报》2000,23(11):1220-1225
介绍了面向对象软件C&K度量学理论与方法,结合C++语言的特征,分析了C&K度量指标存在的缺点,提出了改进方法.然后描述了作者开发的基于改进C&K度量学理论与方法的针对C++的软件度量工具SMTCPP,该工具使用LL(1)分析法对源程序进行语法分析,从而提取程序中有关类、类成员、成员函数、对象等信息,计算出类的方法数、方法最大复杂度、继承树深度、子类数目、耦合度、响应集、相对内聚缺乏度等指标,以指导软件开发过程.这些度量结果还可以存放在数据库中,以便为建立软件质量评价模型收集充足的数据.论文最后对采用SMTCPP所做的3个实用软件度量实验结果进行了分析,表明了SMTCPP的实用性.  相似文献   

9.
自动车牌识别数据中含有不能反映通常交通状况的异常数据,会对行程时间可变性的度量产生干扰。代表通常交通状况的有效数据由多种群组成,在概率分布上具有多峰、偏斜等特点,使用固定数量分布很难准确拟合有效数据的分布。这也导致具有右向长尾分布特点的异常数据识别困难。基于对数正态分布的K分支混合模型,通过动态确定分支数K实现两类数据的区分并对有效数据分布进行最佳拟合。算法对出租车和私家车样本数据取得了良好的异常数据识别效果,并对两种出行方式的行程时间可变性进行准确度量。实验结果表明,异常数据的存在对行程时间可变性度量的统计结果有明显的干扰,若不滤除会在出行决策上产生误判。  相似文献   

10.
王勇  云晓春  李奕飞 《软件学报》2008,19(4):981-992
测量分析对等网络(peer-to-peer networks)拓扑特征是解决P2P优化、网络监管等问题的基础.对等网络是一类大规模、自组织、并且高度动态的复杂网络系统,准确、完整地测量所有对等网络拓扑面临很大困难.研究对等网络的协议特点,分析特定P2P拓扑实例成为认识P2P拓扑特性的一种可选研究方案.以Gnutella网络为测量对象,定义了对等网络拓扑测量系统准确性、完整性的衡量指标,设计、实现了基于正反馈的分布式Gnutella拓扑爬行器——D-Crawler;分析了Gnutella网络拓扑图的度等级分布特征、度频率分布特征以及小世界特性.实验和分析结果表明,对等网络拓扑图属性特征与其使用的协议和客户端软件行为密切相关;Gnutella网络中不同层次的节点之间的拓扑关系表现出不同的特性:上层节点组成的子图具有度等级幂律特征,但在其度频率分布上却呈现出正态分布的特性;下层节点在度等级分布上的幂律特征表现不强烈,而在其度频率分布特征上具有明显的幂律特性.拟合结果表明:幂律能够较好地拟合度等级分布和下层节点度频率分布,然而对于上层节点度概率密度分布,Gaussian拟合效果最好.Gnutella网络具有小世界特性,即:较大的聚集系数和较小的特征路径长度,但它不是无尺度图,不符合BA(Barabási-Albert)生长模型,其发展遵循一种不同于BA模型的生长过程.  相似文献   

11.
The metrics suite for object-oriented design put forward by Chidamber and Kemerer (1994) is partly evaluated by applying principles of measurement theory. Using the object coupling measure (CBO) as an example, it is shown that failing to establish a sound empirical relation system can lead to deficiencies of software metrics. Similarly, for the object-oriented cohesion measure (LCOM) it is pointed out that the issue of empirically testing the representation condition must not be ignored, even if other validation principles are carefully obeyed. As a by-product, an alternative formulation for LCOM is proposed  相似文献   

12.
ContextClass cohesion is an important object-oriented software quality attribute. Assessing class cohesion during the object-oriented design phase is one important way to obtain more comprehensible and maintainable software. In practice, assessing and controlling cohesion in large systems implies measuring it automatically. One issue with the few existing cohesion metrics targeted at the high-level design phase is that they are not based on realistic assumptions and do not fulfill expected mathematical properties.ObjectiveThis paper proposes a High-Level Design (HLD) class cohesion metric, which is based on realistic assumptions, complies with expected mathematical properties, and can be used to automatically assess design quality at early stages using UML diagrams.MethodThe notion of similarity between pairs of methods and pairs of attribute types in a class is introduced and used as a basis to introduce a novel high-level design class cohesion metric. The metric considers method–method, attribute–attribute, and attribute–method direct and transitive interactions. We validate this Similarity-based Class Cohesion (SCC) metric theoretically and empirically. The former includes a careful study of the mathematical properties of the metric whereas the latter investigates, using four open source software systems and 10 cohesion metrics, whether SCC is based on realistic assumptions and whether it better explains the presence of faults, from a statistical standpoint, than other comparable cohesion metrics, considered individually or in combination.ResultsResults confirm that SCC is based on clearly justified theoretical principles, relies on realistic assumptions, and is an early indicator of quality (fault occurrences).ConclusionIt is concluded that SCC is both theoretically valid and supported by empirical evidence. It is a better alternative to measure class cohesion than existing HLD class cohesion metrics.  相似文献   

13.
There are lots of different software metrics discovered and used for defect prediction in the literature. Instead of dealing with so many metrics, it would be practical and easy if we could determine the set of metrics that are most important and focus on them more to predict defectiveness. We use Bayesian networks to determine the probabilistic influential relationships among software metrics and defect proneness. In addition to the metrics used in Promise data repository, we define two more metrics, i.e. NOD for the number of developers and LOCQ for the source code quality. We extract these metrics by inspecting the source code repositories of the selected Promise data repository data sets. At the end of our modeling, we learn the marginal defect proneness probability of the whole software system, the set of most effective metrics, and the influential relationships among metrics and defectiveness. Our experiments on nine open source Promise data repository data sets show that response for class (RFC), lines of code (LOC), and lack of coding quality (LOCQ) are the most effective metrics whereas coupling between objects (CBO), weighted method per class (WMC), and lack of cohesion of methods (LCOM) are less effective metrics on defect proneness. Furthermore, number of children (NOC) and depth of inheritance tree (DIT) have very limited effect and are untrustworthy. On the other hand, based on the experiments on Poi, Tomcat, and Xalan data sets, we observe that there is a positive correlation between the number of developers (NOD) and the level of defectiveness. However, further investigation involving a greater number of projects is needed to confirm our findings.  相似文献   

14.
Approaches for improving class cohesion identify refactoring opportunities using metrics that capture structural relationships between the methods of a class, e.g., attribute references. Semantic metrics, e.g., C3 metric, have also been proposed to measure class cohesion, as they seem to complement structural metrics. However, until now semantic relationships between methods have not been used to identify refactoring opportunities. In this paper we propose an Extract Class refactoring method based on graph theory that exploits structural and semantic relationships between methods. The empirical evaluation of the proposed approach highlighted the benefits provided by the combination of semantic and structural measures and the potential usefulness of the proposed method as a feature for software development environments.  相似文献   

15.
On way to formalize system requirements is to express them using the object-oriented paradigm. In this case, the class model representing the structure of requirements is called a requirements metamodel, and requirements themselves are object-based models of natural language requirements. In this paper, we show that such object-oriented requirements are well suited to support a large class of requirements metrics. We define a requirements metamodel and use an automated measurement approach proposed in our previous work to specify requirements metrics. We show that it is possible to integrate 78 metrics from 11 different papers in the proposed framework. The software that computes the requirements metric values is fully generated from the specification of metrics.  相似文献   

16.
A practical view of software measurement that formed the basis for a companywide software metrics initiative within Motorola is described. A multidimensional view of measurement is provided by identifying different dimensions (e.g., metric usefulness/utility, metric types or categories, metric audiences, etc.) that were considered in this companywide metrics implementation process. The definitions of the common set of Motorola software metrics, as well as the charts used for presenting these metrics, are included. The metrics were derived using the goal/question metric approach to measurement. A distinction is made between the use of metrics for process improvement over time across projects and the use of metrics for in-process project control. Important experiences in implementing the software metrics initiative within Motorola are also included  相似文献   

17.
面向对象软件度量是理解和保证面向对象软件质量的重要手段之一.通过将面向对象软件的度量值与其阈值比较,可简单直观评价其是否有可能包含缺陷.确定度量阈值方法主要有基于数据分布特征的无监督学习方法和基于缺陷相关性的有监督学习方法.两类方法各有利弊:无监督学习方法无需标签信息而易于实现,但所得阈值的缺陷预测性能通常较差;有监督学习方法通过机器学习算法提升所得阈值的缺陷预测性能,但标签信息在实际过程中不易获得且度量与缺陷链接技术复杂.近年来,两类方法的研究者不断探索并取得较大进展.同时,面向对象软件度量阈值确定方法研究仍存在一些亟待解决的挑战.对近年来国内外学者在该领域的研究成果进行系统性的总结.首先,阐述面向对象软件度量阈值确定方法的研究问题.其次,分别从无监督学习方法和有监督学习方法总结相关研究进展,并梳理具体的理论和实现的技术路径.然后,简要介绍面向对象软件度量阈值的其他相关技术.最后,总结当前该领域研究过程面临的挑战并给出建议的研究方向.  相似文献   

18.

Context

Several metrics have been proposed to measure the extent to which class members are related. Connectivity-based class cohesion metrics measure the degree of connectivity among the class members.

Objective

We propose a new class cohesion metric that has higher discriminative power than any of the existing cohesion metrics. In addition, we empirically compare the connectivity and non-connectivity-based cohesion metrics.

Method

The proposed class cohesion metric is based on counting the number of possible paths in a graph that represents the connectivity pattern of the class members. We theoretically and empirically validate this path connectivity class cohesion (PCCC) metric. The empirical validation compares seven connectivity-based metrics, including PCCC, and 11 non-connectivity-based metrics in terms of discriminative and fault detection powers. The discriminative-power study explores the probability that a cohesion metric will incorrectly determine classes to be cohesively equal when they have different connectivity patterns. The fault detection study investigates whether connectivity-based metrics, including PCCC, better explain the presence of faults from a statistical standpoint in comparison to other non-connectivity-based cohesion metrics, considered individually or in combination.

Results

The theoretical validation demonstrates that PCCC satisfies the key cohesion properties. The results of the empirical studies indicate that, in contrast to other connectivity-based cohesion metrics, PCCC is much better than any comparable cohesion metric in terms of its discriminative power. In addition, the results also indicate that PCCC measures cohesion aspects that are not captured by other metrics, wherein it is considerably better than other connectivity-based metrics but slightly worse than some other non-connectivity-based cohesion metrics in terms of its ability to predict faulty classes.

Conclusion

PCCC is more useful in practice for the applications in which practitioners need to distinguish between the quality of different classes or the quality of different implementations of the same class.  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司    京ICP备09084417号-23

京公网安备 11010802026262号