计算机应用与软件2017,Vol.34Issue(1):15-20,6.DOI:10.3969/j.issn.1000-386x.2017.01.003
基于抽象语法树的数据泥团自动检测研究
RESEARCH OF AUTOMATIC DETECTION FOR DATA CLUMPS BASED ON ABSTRACT SYNTAX TREE
摘要
Abstract
Data Clumps is a common code smell, it will lead to issues such as duplicated code and increased difficulty in maintenance.As most existing code smell automatic detection tools fail to detect data clumps, and the detection type is not complete, a data clumps automatic detection based on abstract syntax tree is proposed.On the basis of existing detection tools, adding new types of data clumps to the algorithm, with some new steps as redundant data elimination and sub-data clumps extraction.Experiments are executed on 4 open source projects.Results show that the approach has high accuracy, and it is able to detect data clumps which other tools failed to detect, such as Stench Blossom, inFusion, etc.In addition, this approach has good efficiency and the execution time is directly proportionate to the size of system.关键词
代码味道/数据泥团/抽象语法树/源代码解析/重构Key words
Code smell/Data clumps/Abstract syntax tree/Source code parsing/Refactoring分类
信息技术与安全科学引用本文复制引用
刘宏韬,刘伟,胡志刚..基于抽象语法树的数据泥团自动检测研究[J].计算机应用与软件,2017,34(1):15-20,6.基金项目
国家自然科学基金项目(61272148). (61272148)