vix.ing · top · new · best · stats · spec

Parameterized Duplication in Strings: Algorithms and an Application to Software Maintenance

1997/10/01 by Brenda S. Baker · 6 citations
Computer Science · #Algorithms and Data Compression #Network Packet Processing and Optimization #Web Data Mining and Analysis

paper · doi:10.1137/s0097539793246707

Abstract

As an aid in software maintenance, it would be useful to be able to track down duplication in large software systems efficiently. Duplication in code is often in the form of sections of code that are the same except for a systematic change of parameters such as identifiers and constants. To model such parameterized duplication in code, this paper introduces the notions of parameterized strings and parameterized matches of parameterized strings. A data structure called a parameterized suffix tree is defined to aid in searching for parameterized matches. For fixed alphabets, algorithms are given to construct a parameterized suffix tree in linear time and to find all maximal parameterized matches over a threshold length in a parameterized p-string in time linear in the size of the input plus the number of matches reported. The algorithms have been implemented, and experimental results show that they perform well on C code.

Cited by

Related