Detection of code clones in software generators

Max Lillack,Christian Bucholdt, Daniela Schilling

FOSD@GPCE(2014)

引用 2|浏览3
暂无评分
摘要
Macro-based generators are in use for more than 40 years to generate Cobol source code and implement variability. Over the course of time, the systems were extended with many similar functionalities by copying and adapting existing pieces of code. The resulting generators are hard to understand and difficult to maintain. Clone detection can identify similar pieces of code which is a prerequisite to extract common features thus enabling a move to a feature-oriented product line. This paper presents Hanni, a tool that combines clone detection of the input and output of generators to improve detection quality. Hanni uses standard textual clone detection tools on macro-based generators to detect clones in the macros and the generated Cobol. A mapping of the clones from the two sources is used to verify the detected clones and even suggest possible semantic clones. We are using generator examples from different industries based on the ADS generator framework to evaluate our tool. The results show that code clones are very common in these generators and possible problems in the detection can be identified using the generated files.
更多
查看译文
关键词
software generators,design,code clones,feature-oriented refactoring,macros,restructuring, reverse engineering, and reengineering
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要