首页 | 官方网站   微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 200 毫秒
1.
一种利用模块内聚性的对象抽取方法   总被引:14,自引:0,他引:14  
周毓明  徐宝文 《软件学报》2000,11(4):557-562
引入子程序-类型关系图来表示程序中类型和子程序之间的关系,讨论了模块内聚性的几个度量准则,并分析了增删子程序对模块内聚度的影响.在此基础上,给出了基于模块内聚性的对象抽取算法.  相似文献   

2.
状态依赖的类内聚度量   总被引:1,自引:0,他引:1  
类是面向对象软件中的模块,包含属性和方法。类内聚度量是对类属性和方法相关程度的度量。通过对类方法和属性的分类及其与类状态之间的关系分析,提出了类核的概念和状态依赖的类内聚度量方法。该方法有利于克服类内聚度量复杂性和判断模糊性问题,并可以在设计阶段对类的内聚进行度量。  相似文献   

3.
基于数据切片度量JAVA内聚性   总被引:1,自引:0,他引:1  
李必信  朱平  谭毅  李宣东  郑国梁 《软件学报》2001,12(12):1851-1858
面向对象的程序切片在程序分析、程序理解、软件测试和调试以及软件维护方面有着广泛的用途.首先建立了抽象数据切片和类内切片的概念,然后基于这两种切片讨论了JAVA语言中存在的内聚问题,通过分析这些切片与数据、方法、类之间的关系来度量数据、方法以及类的内聚性问题.  相似文献   

4.
一种类的权威性度量方法   总被引:1,自引:0,他引:1  
软件度量是软件工程的一个重要研究领域,关系到一个软件开发和维护的开销.至今人们已经对内聚性和耦合性度量开展了较为丰富的工作.然而对类权威性度量的研究工作却较少.本文基于类间关系提出一种类权威性度量方法,该方法从类图本身出发通过迭代计算类的权威值,并依据线性代数的理论证明了类的权威值具有最小值和最大值,最后用实例做验证.  相似文献   

5.
在机器学习和数据挖掘实际应用中,针对分类训练集的选取,通常要求训练集中每一类所包含的数据在数量上要尽可能的"均衡".本文以非均衡训练集与分类学习效率关系研究为依据,给出了"均匀度"和"内聚度"两种类型的训练集非均衡程度因素的概念;"均匀度"是用来描述训练集类之间(between-class)的非均衡程度,其含义是指训练集不同类之间数据数量的非均衡程度;"内聚度"是用来描述训练集类内部(within-class)的非均衡程度,指训练集中不同类在空间分布上的线性相关程度,通过训练集数据之间的相关程度,构建出训练集的网络结构,运用一种能体现训练集内聚性的网络拓扑结构的指标-网络社区结构作为度量,提出了基于网络社区模块结构的非均衡训练集度量方法,并指出了高均匀度和高内聚度是选取"优良"分类训练集的关键因素.通过对UCI标准训练集的实验,结果验证本方法作为选取训练集标准的有效性.  相似文献   

6.
一种基于依赖性分析的类内聚度度量方法   总被引:8,自引:2,他引:8  
陈振强  徐宝文 《软件学报》2003,14(11):1849-1856
内聚度是指模块内各成分之间的联结强度.在面向对象程序中,内聚度主要是指类内部各成分之间的联结强度.在深入剖析了类的属性与属性、方法与属性以及方法与方法之间的关系及其性质的基础上,提出了一种基于依赖性分析的内聚度度量方法,并证明了它满足优良的内聚度度量方法应该具有的性质,从而克服了已有方法只是分析了某个方面的不足,为综合评价类内聚度提供了指南。  相似文献   

7.
目前,随着本体的广泛使用和快速发展,本体在结构与语义上变得越来越复杂。如何对本体的质量进行评估成为本体构建和重用的主要问题。在本体构建过程中,对本体进行评估有利于对本体进行重构和优化,以构建高质量的本体。在本体重用过程中,可以帮助用户在候选本体集中选择最优结构的本体。提出一种基于有向无环图(DAG)的本体内聚度度量方法,首先依据有向无环图的结构提出一组本体内聚度度量指标;然后根据已有的度量验证框架对其进行验证,说明度量指标在理论上有效;最后使用经典本体数据集进行实验,说明所提出的本体内聚度度量方法的合理性和有效性,有利于本体的构建和重用。  相似文献   

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

9.
周晓聪  赖蔚  温剑丰 《软件学报》2018,29(10):3051-3067
度量数据的分布信息对于理解和使用面向对象软件度量有重要意义.人们对面向对象软件规模度量、耦合度度量乃至继承维度的度量数据的分布都有研究,但对除内聚度缺乏度LCOM之外的内聚度度量数据的分布却缺乏研究.已有的实证研究表明,LCOM并不是好的内聚度度量,因此探讨其他内聚度度量数据分布很有必要.对包括内聚度缺乏度、基于连通性的内聚度度量和基于相似性的内聚度度量总共17个度量指标在112个Java开源软件项目的分布情况进行实证研究,对每个度量指标的每个项目数据使用幂律分布和对数正态分布进行拟合,并使用荟萃分析方法对拟合结果进行了分析.实证研究结果表明,非规范化的内聚度量可使用对数正态分布和幂律分布拟合,但规范化的基于相似性的内聚度量(包括CC、LSCC、SCOM和SCC)需要排除方法数小于等于1或字段数为0的特殊类才能使用对数正态分布拟合,而基于连通性的内聚度度量(包括TCC、LCC、DCD和DCI)则只有对应的非规范化版本的数据才符合对数正态分布或幂律分布.实证研究可帮助人们更好地理解和使用内聚度度量,特别是可以帮助人们如何利用已有的方法确定内聚度度量的阈值.  相似文献   

10.
为了改善Java源程序的质量,使之尽可能地符合“高内聚、低耦合”的设计要求,提出了扩展的Jaccard系数,并将其作为实体间相似性的度量公式,采用层次聚类算法将Java类图划分为若干个候选包。在基于交互及度量重构策略的引导下,对Java程序结构进行调整。通过实验表明,经过调整以后的Java源程序,在结构上更符合“高内聚、低耦合”的特征。  相似文献   

11.
Large object-oriented applications are structured over many packages. Packages are important but complex structural entities that are difficult to understand since they act as containers of classes, which can have many dependencies with other classes spread over multiple packages. However to be able to take decisions (e.g. refactoring and/or assessment decisions), maintainers face the challenges of managing (sorting, grouping) the massive amount of dependencies between classes spread over multiple packages. To help maintainers, there is a need for at the same time understanding, and quantifying, dependencies between classes as well as understanding how packages as containers of such classes depend on each other.In this paper, we present a visualization, named Package Blueprint, that reveals in detail package internal structure, as well as the dependencies between an observed package and its neighbors, at both package and class levels. Package blueprint aims at assisting maintainers in understanding package structure and dependencies, in particular when they focus on few packages and want to take refactoring decisions and/or to assess the structure of those packages. A package blueprint is a space filling matrix-based visualization, using two placement strategies that are enclosure and adjacency. Package blueprint is structured around the notion of surfaces that group classes and their dependencies by their packages (i.e., enclosure placement); whilst surfaces are placed next to their parent node which is the package under-analysis (i.e., adjacency placement). We present two views: one stressing how an observed package depends upon the rest of the system and another stressing how the system depends upon that package.To evaluate the contribution of package blueprint for understanding packages we performed an exploratory user study comparing package blueprint with an advanced IDE. The results show that users of package blueprint are faster in analyzing and assessing package structure. The results are proved statically significant and they show that package blueprint considerably improves the experience of standard browser users.  相似文献   

12.
The grouping of correlated classes into a package helps in better organization of modern object-oriented software. The quality of such packages needs to be measured so as to estimate their utilization. In this paper, new package coupling metrics are proposed, which also take into consideration the hierarchical structure of packages and direction of connections among package elements. The proposed measures have been validated theoretically as well as empirically using 18 packages taken from two open source software systems. The results obtained from this study show strong correlation between package coupling and understandability of the package which suggests that proposed metrics could be further used to represent other external software quality factors.  相似文献   

13.
ContextObject-oriented languages such as Java, Smalltalk, and C++ structure their programs using packages. Maintainers of large systems need to understand how packages relate to each other, but this task is complex because packages often have multiple clients and play different roles (class container, code ownership, etc.). Several approaches have been proposed, among which the use of cohesion and coupling metrics. Such metrics help identify candidate packages for restructuring; however, they do not help maintainers actually understand the structure and interrelationships between packages.ObjectivesIn this paper, we use pre-attentive processing as the basis for package visualization and see to what extent it could be used in package understanding.MethodWe present the Package Fingerprint, a 2D visualization of the references made to and from a package. The proposed visualization offers a semantically rich, but compact and zoomable views centered on packages. We focus on two views (incoming and outgoing references) that help users understand how the package under analysis is used by the system and how it uses the system.ResultsWe applied these views on four large systems: Squeak, JBoss, Azureus, and ArgoUML. We obtained several interesting results, among which, the identification of a set of recurring visual patterns that help maintainers: (a) more easily identify the role of and the way a package is used within the system (e.g., the package under analysis provides a set of layered services), and (b) detect either problematic situations (e.g., a single package that groups together a large number of basic services) or opportunities for better package restructuring (e.g., removing cyclic dependencies among packages). The visualization generally scaled well and the detection of different patterns was always possible.ConclusionThe proposed visualizations and patterns proved to be useful in understanding and maintaining the different systems we addressed. To generalize to other contexts and systems, a real user study is required.  相似文献   

14.
Changes during software evolution and poor design decisions often lead to packages that are hard to understand and maintain, because they usually group together classes with unrelated responsibilities. One way to improve such packages is to decompose them into smaller, more cohesive packages. The difficulty lies in the fact that most definitions and interpretations of cohesion are rather vague and the multitude of measures proposed by researchers usually capture only one aspect of cohesion. We propose a new technique for automatic re-modularization of packages, which uses structural and semantic measures to decompose a package into smaller, more cohesive ones. The paper presents the new approach as well as an empirical study, which evaluates the decompositions proposed by the new technique. The results of the evaluation indicate that the decomposed packages have better cohesion without a deterioration of coupling and the re-modularizations proposed by the tool are also meaningful from a functional point of view.  相似文献   

15.

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.  相似文献   

16.
Improving the applicability of object-oriented class cohesion metrics   总被引:1,自引:0,他引:1  

Context

Class cohesion is an important object-oriented quality attribute. It refers to the degree of relatedness between the methods and attributes of a class. Several metrics have been proposed to measure the extent to which the class members are related. Most of these metrics have undefined values for a relatively high percentage of classes, which limits their applicability. The classes that have undefined values lack methods, attributes, or parameter types, or they include only a single method.

Objective

We improve the applicability of the class cohesion metrics by defining their values for such special classes. In addition, we theoretically and empirically validate the improved metrics.

Method

We theoretically examine whether the defined values satisfy the key cohesion properties. In addition, we empirically validate the metrics before and after the improvements to test whether the defined values improve the ability of the metrics to evaluate class cohesion. We also explore the correlation between the metrics and the presence of faulty classes to indirectly determine the strength or weakness of the metrics in indicating class quality.

Results

The results show that our assigned values for the undefined cases do not violate the key cohesion properties and considerably improve the ability of the metrics to explain the presence of faulty classes and may therefore improve their ability to indicate the quality of the class design.

Conclusions

Having the class cohesion metrics defined for all possible cases improves the applicability of the metrics and potentially increases their precision in indicating class quality.  相似文献   

17.
Class cohesion is a key attribute that is used to assess the design quality of a class, and it refers to the extent to which the attributes and methods of the class are related. Typically, classes contain special types of methods, such as constructors, destructors, and access methods. Each of these special methods has its own characteristics, which can artificially affect the class cohesion measurement. Several metrics have been proposed in the literature to indicate class cohesion during high- or low-level design phases. The impact of accounting for special methods in cohesion measurement has not been addressed for most of these metrics. This paper empirically explores the impact of including or excluding special methods on cohesion measurements that were performed using 20 existing class cohesion metrics. The empirical study applies the metrics that were considered to five open-source systems under four different scenarios, including (1) considering all special methods, (2) ignoring only constructors, (3) ignoring only access methods, and (4) ignoring all special methods. This study empirically explores the impact of including special methods in cohesion measurement for two applications of interest to software practitioners, including refactoring and predicting faulty classes. The results of the empirical studies show that the cohesion values for most of the metrics considered differ significantly across the four scenarios and that this difference significantly affects the refactoring decisions, but does not significantly affect the abilities of the metrics to predict faulty classes.  相似文献   

18.
Many studies have investigated the relationships between object-oriented (OO) metrics and change-proneness and conclude that OO metrics are able to predict the extent of change of a class across the versions of a system. However, there is a need to re-examine this subject for two reasons. First, most studies only analyze a small number of OO metrics and, therefore, it is not clear whether this conclusion is applicable to most, if not all, OO metrics. Second, most studies only uses relatively few systems to investigate the relationships between OO metrics and change-proneness and, therefore, it is not clear whether this conclusion can be generalized to other systems. In this paper, based on 102 Java systems, we employ statistical meta-analysis techniques to investigate the ability of 62 OO metrics to predict change-proneness. In our context, a class which is changed in the next version of a system is called change-prone and not change-prone otherwise. The investigated OO metrics cover four metric dimensions, including 7 size metrics, 18 cohesion metrics, 20 coupling metrics, and 17 inheritance metrics. We use AUC (the area under a relative operating characteristic, ROC) to evaluate the predictive effectiveness of OO metrics. For each OO metric, we first compute AUCs and the corresponding variances for individual systems. Then, we employ a random-effect model to compute the average AUC over all systems. Finally, we perform a sensitivity analysis to investigate whether the AUC result from the random-effect model is robust to the data selection bias in this study. Our results from random-effect models reveal that: (1) size metrics exhibit moderate or almost moderate ability in discriminating between change-prone and not change-prone classes; (2) coupling and cohesion metrics generally have a lower predictive ability compared to size metrics; and (3) inheritance metrics have a poor ability to discriminate between change-prone and not change-prone classes. Our results from sensitivity analyses show that these conclusions reached are not substantially influenced by the data selection bias.  相似文献   

19.
Conclusions The expanding operational potential of application packages (interactive and multiprocessing disciplines, application in systems with complex environment, processing of large volumes of data) necessitated a transition from the one-level to a hierarchical package model, in line with the increasing complexity of the package structure.Not all the levels are necessarily present in the design of specific packages. For example, packages executing in the batch mode without multiprocessing and user-initiated dialog do not need the process synchronization level, whereas the top level-the process level-is realized by a single process (in the operating system sense) with the structure described in [1–3]. Packages whose programs always fit into the main memory do not need the data management level, i.e., the cluster is realized by an abstract application module. The application program level is missing in those packages where the application programs are prepared in advance, rather than being generated in run time.The proposed structure is not restricted to optimization packages: it may be used to typify other classes of method-oriented packages. Structure-driven package design ensures that the package has the required properties, makes it possible to implement the software-engineering approach to the design process, avoids gross design errors, and simplifies package adaptation to different environments. Moreover, the hierarchical package structure allows a more technological approach to the development process, as it leads to more effective application of the methods of hierarchical, modular, and structured programming.Translated from Kibernetika, No. 2, pp. 35–39, March–April, 1982.  相似文献   

20.
Software engineering efforts can potentially benefit much from a good understanding of the structures of existing software systems and the processes governing their development. Towards that end, we study software systems by means of the complex network analysis framework. We model a software package as a network, with nodes representing the functions in the package and edges representing the dependencies among the functions. Our empirical analysis of five widely-adopted open-source software packages reveals a set of interesting features of such networks, which cannot be adequately reproduced by existing complex network models. We then set out to develop a new network growth model, explicitly imitating generally-advocated software development principals, such as divide-and-conquer, modularization, high intra-module cohesion, and low inter-module coupling. Results of our analytical derivations and numeric studies show that our model can more closely reproduce the particular features exhibited by real-world software packages, thus hopefully better explaining the phenomena of concern.  相似文献   

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

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

京公网安备 11010802026262号