Patent ID: 7451439

Claim:
A system for automatically identifying compound refactorings of program code through quantitative metric analysis, comprising: a memory to store original program code comprising program statements written in a structured programming language; a repository to maintain one or more compound refactorings, which each comprise one or more individual refactorings operable on program statements written in the structured programming language; a refactoring engine to automatically refactor the original program code, comprising: a refactoring applier to generate refactored program code by applying combinations of one or more of the compound refactorings to the program statements in the original program code; a code validator to validate the refactored code; an evaluator to determine differences, upon successful validation, between the program statements in both the original program code and the refactored program code and to assign weights to the compound refactorings in each combination of the compound refactorings applied that quantify the differences; and a quantitative measurer to determine a quantitative metric cumulatively over the weights of the compound refactorings in each combination of the compound refactorings applied, and to compare the quantitative metric for each of the combinations of the compound refactorings applied against a threshold as an indication of a relative difference between the program statements prior to and after the refactoring due to that combination; and a display to periodically present the combinations of the compound refactorings applied.