首页 | 本学科首页   官方微博 | 高级检索  
     检索      

Java程序度量工具的实现及案例分析
引用本文:李诺,金茂忠,刘超.Java程序度量工具的实现及案例分析[J].北京航空航天大学学报,2005,31(2):128-133.
作者姓名:李诺  金茂忠  刘超
作者单位:北京航空航天大学 计算机学院, 北京 100083
基金项目:国家高技术研究发展计划(863计划)
摘    要:介绍了面向对象度量技术,给出针对Java语言的McCabe,Halstead和WMC复杂度的定义,提出了一种新的面向Java语言的度量工具的实现方法,并且通过实例分析说明利用该工具度量Java程序,某些度量值高的模块逻辑复杂、工作量大、易错且难维护,从而引导测试人员重点测试这些模块,同时也使开发人员关注它们,仔细检查程序逻辑,进行合理优化,使整个程序的复杂度降低.确凿实验数据表明,软件度量对改进软件质量具有很大实用价值.本工具采用以下度量标准度量Java程序:针对继承复杂性的DIT(Depth of Inheritance Tree)和NOC(Number Of Children)复杂度;针对模块复杂性的McCabe度量法、Halstead软件科学度量和WMC(Weighted Methods per Class)复杂度;针对类间耦合性、聚集性的RFC(Response for a Class)度量法.每种复杂度从不同方面、不同层次度量Java程序,从而有效全面的评价软件质量,揭示可能隐藏的错误.

关 键 词:软件度量  度量工具  Java语言
文章编号:1001-5965(2005)02-0128-06
收稿时间:2004-06-20
修稿时间:2004年6月20日

Implementation and evaluation of measurement tool for Java
Li Nuo,Jin Maozhong,Liu Chao.Implementation and evaluation of measurement tool for Java[J].Journal of Beijing University of Aeronautics and Astronautics,2005,31(2):128-133.
Authors:Li Nuo  Jin Maozhong  Liu Chao
Institution:School of Computer Science and Technology, Beijing University of Aeronautics and Astronautics, Beijing 100083, China
Abstract:Introduce object-oriented metrics; define the detailed definitions of McCabe, Halstead and weighted methods per class(WMC) for Java; a new method for implementation of measurement tool for Java was offered; demonstration for using this tool to optimize program and enhance software quality was also given. Experiments show that this tool helps programmers to improve program effectively. They also show that the module with high measurement value are inclined to be complex, fallible, hard to maintain and need consume amount of labor, so testers have to pay more attention to test those modules. Developers must re-exam those modules, check their logic, and try to optimize them to depress their measurement value. By providing adequate experiment data, The results show that software measurement plays an essential roll for improving software quality. The metrics used are depth of inheritance tree(DIT), number of children(NOC), McCabe, Halstead, weighted methods per class(WMC) and response for a class(RFC). They help programmers analyze Java program at three aspects--the inheritance metrics, the module complexity metrics, and the communication metrics. So each kind of the metrics measures Java program from different aspects, evaluates the software quality effectively, and reveals the probable bugs.
Keywords:softwares metric  metric tools  Java
本文献已被 CNKI 维普 万方数据 等数据库收录!
点击此处可从《北京航空航天大学学报》浏览原始摘要信息
点击此处可从《北京航空航天大学学报》下载免费的PDF全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

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