摘要
代码克隆,即计算机程序源代码中的冗余,可以导致软件系统中的各种问题,其中包括代码量与维护成本的增加。文中通过研究程序设计语言Java、Python、JavaScript、Erlang与Haskell,寻找程序语言特性与代码克隆间的关系。文中辨识出一组这些语言的特性,基于选定的一组开放源代码项目构建了一个用于实验的代码库。文中采用Clone Digger做为代码克隆检测工具并对其进行扩展,使其支持JavaScript,Erlang与Haskell。文章最后在构建的代码库上运行CloneDigger,得到了一组结果并对其进行了分析。
Code clone, that is the duplication in program source code, may lead to several problems in software system, including increasing of code size and maintenance costs. The paper studies some languages such as Java, Python, JavaScript, Erlang and HaskeU, and tries to find out the relation between language features and code clones. Firstly, several features of them are recognized. Secondly, a source code library is built from a selected set of open source projects. Thirdly, Clone Digger is used as clone detection tool and it is extended to support JavaScript, Erlang and Haskell. Finally, Clone Digger is run on our library. The result is analyzed for comparison between languages.
出处
《计算机与网络》
2013年第6期65-67,共3页
Computer & Network