Welcome!
To use the personalized features of this site, please log in or register.
If you have forgotten your username or password, we can help.
|
 |
Using Slicing to Identify Duplication in Source Code
| Book Series | Lecture Notes in Computer Science |
| Publisher | Springer Berlin / Heidelberg |
| ISSN | 0302-9743 (Print) 1611-3349 (Online) |
| Volume | Volume 2126/2001 |
| Book | Static Analysis |
| DOI | 10.1007/3-540-47764-0 |
| Copyright | 2001 |
| ISBN | 978-3-540-42314-0 |
| DOI | 10.1007/3-540-47764-0_3 |
| Pages | 40-56 |
| Subject Collection | Computer Science |
| SpringerLink Date | Monday, January 01, 2001 |
| |
|
Using Slicing to Identify Duplication in Source Code
Raghavan Komondoor5 and Susan Horwitz5, 6 
| (5) |
Computer Sciences Department, University of Wisconsin-Madison, Madison, WI 53706, USA |
| (6) |
IEI del CNR, Pisa, Italy |
Abstract
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 our approach is the use of program dependence
graphs (PDGs) and program slicing to find isomorphic PDG subgraphs that represent clones. The key benefits of this approach
are that our tool can find non-contiguous clones (clones whose components do not occur as contiguous text in the program),
clones in which matching statements have been reordered, and clones that are intertwined with each other. Furthermore, the
clones that are found are likely to be meaningful computations, and thus good candidates for extraction.
Fulltext Preview (Small, Large)
 References secured to subscribers.
|
|
|
|
|
|