Software

Using Slicing to Identify Duplication in Source Code

Download Now Free registration required

Executive Summary

Programs often have a lot of duplicated code, which makes both understanding and maintenance more difficult. This problem can be alleviated by detecting duplicated code, extracting it into a separate new procedure, and replacing all the clones (The instances of the duplicated code) by calls to the new procedure. This paper describes the design and initial implementation of a tool that finds clones and displays them to the programmer. The novel aspect of the approach is the use of program dependence graphs (PDGs) and program slicing to find isomorphic PDG subgraphs that represent clones.

  • Format: PDF
  • Size: 156.98 KB