引用本文: | 王伟,苏小红,马培军,王甜甜.标识符重命名不一致性缺陷的检测[J].哈尔滨工业大学学报,2011,43(1):89.DOI:10.11918/j.issn.0367-6234.2011.01.018 |
| WANG Wei,SU Xiao-hong,MA Pei-jun,WANG Tian-tian.Detection of identifier renaming inconsistency[J].Journal of Harbin Institute of Technology,2011,43(1):89.DOI:10.11918/j.issn.0367-6234.2011.01.018 |
|
摘要: |
为解决已有的克隆代码及相关缺陷检测工具无法分析大型程序代码,又不能识别经过修改了的克隆代码的问题,在改进基于频繁子序列挖掘的克隆代码检测模型基础上,提出了基于序列挖掘的C克隆代码及标识符重命名不一致性缺陷检测模型.该模型改进了已有的忘记修改某标识符缺陷检测子模型,并增加了错误修改某标识符缺陷检测子模型,通过计算标识符未改变率来检测标识符重命名不一致性缺陷.实验表明,该模型能在克隆代码检测的基础上检测克隆代码引起的相关缺陷,降低了漏检率和误检率,适用于2种标识符重命名不一致性缺陷的检测. |
关键词: 序列挖掘 克隆代码 标识符重命名不一致性 软件缺陷检测 |
DOI:10.11918/j.issn.0367-6234.2011.01.018 |
分类号:TP311.52 |
基金项目:国家自然科学基金资助项目(61073052);高等学校博士学科点专项科研基金资助项目(20092302110040) |
|
Detection of identifier renaming inconsistency |
WANG Wei, SU Xiao-hong, MA Pei-jun, WANG Tian-tian
|
School of Computer Science and Technology,Harbin Institute of Technology,150001 Harbin,China
|
Abstract: |
For solving the problem that the current clone and related bug detection tools can not analyze largescale code and detect modified code clones,a model of clone and identifier inconsistency bugs detection based on the improved model of clone detection via sequential pattern mining is proposed. This model improves the existing submodel of identifier forgotten renaming bug detection,and introduces a new submodel of identifier mistaken renaming bug detection. Identifier renaming inconsistency bugs are detected by computing identifier unchanged ratio ( UnchangedRatio) . Experiment results indicate that this model can detect clone related bugs on the basis of code clone detection,reduce false-negative rate and false-positive rate,and is effective in detecting two kinds of identifier inconsistency bugs. |
Key words: sequential pattern mining code clone identifier inconsistency bug software bug detectiion |