计算机工程与应用 ›› 2011, Vol. 47 ›› Issue (23): 61-63.

• 研发、设计、测试 • 上一篇    下一篇

代码质量静态度量的研究与应用

黄沛杰,杨铭铨   

  1. 华南农业大学 信息学院,广州 510642
  • 收稿日期:1900-01-01 修回日期:1900-01-01 出版日期:2011-08-11 发布日期:2011-08-11

Research and application of static metrics for code quality

HUANG Peijie,YANG Mingquan   

  1. College of Informatics,South China Agricultural University,Guangzhou 510642,China
  • Received:1900-01-01 Revised:1900-01-01 Online:2011-08-11 Published:2011-08-11

摘要: 代码质量度量是软件质量分析的一个重要研究方向。静态分析方法因其具有成本低、容易实现而且不依赖于程序特定的运行环境的优点,在当前软件网络化、服务化的趋势下倍受关注。针对Java代码质量度量进行研究,使用Ant工具整合各种开源的静态测试工具,并制定基于静态分析的Java代码质量综合评价方案,可支持包括代码规模、规范性、可维护性、可扩展性和潜在危险等方面的综合检测,为项目的开发者、管理者和使用者提供了实用的代码质量评价方法。

关键词: 代码质量, 静态度量, 软件分析, 综合评价

Abstract: Code quality metrics is an important branch of software analysis.Under the trend of networkization and servicization of software,static analysis method grasps more attention due to its advantage of low-cost,easy-to-implement,and independence from specific program running environment.This paper deals with the quality metrics of Java code.Based on the integration of the open source static analysis tools by Apache Ant,a comprehensive evaluation method of Java code quality is proposed.The approach,supporting comprehensive testing of size,regularity,maintainability,expandability,and potentially dangerous of code,provides an applicable evaluation method for project developers,managers and users.

Key words: code quality, static metrics, software analysis, comprehensive evaluation