Source code enhancement using reduction of duplicated code

  • Authors:
  • Seyyed Mehdi Nasehi;Gholam Reza Sotudeh;Maziar Gomrokchi

  • Affiliations:
  • Department of IT, Shiraz University of Technology, Shiraz, Iran;Engineering Department, Shiraz Azad University, Shiraz, Iran;Engineering Department, Shiraz Azad University, Shiraz, Iran

  • Venue:
  • SE'07 Proceedings of the 25th conference on IASTED International Multi-Conference: Software Engineering
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

In this paper a novel method is proposed which is capable of detecting code smell incidents of duplicated code in a source code. The proposed method is superior to other methods since it is capable of detecting subtle duplicates of code (or code clones) which is hard to detect using those methods. The proposed method first transforms source code into a middle language format. Being in this middle format each instruction represents an atomic simple operation. Then these instructions are compared and perceived matches are aggregated to form the largest possible code clone. Finally we have compared the results of our proposed method with some other methods and have shown that the results of those methods are subsets of the result set which is developed by our new method.