VTracker: Differencing Object-Oriented Models
The comparison of source code versions can be useful for recovering the development process of the system,
recognizing applied refactorings, and inferring high-level patterns in the history of the system.
In the past, several domain-specific approaches have been applied to the problem of recovering the design evolution of object-oriented systems.
In this work, we applied VTracker, a generic domain-independent tree differencing algorithm, to the problem of extracting the changes between two versions of
an object-oriented software system. We evaluated VTracker by executing it over successive versions of JFreeChart,
and also compared its accuracy in terms of precision and recall against a state-of-the-art domain-specific differencing algorithm, namely
UMLDiff.
Getting Started
- Download the source code used in the experiment along with ASTReader, XML Generator and diff parsers.
- Import in Eclipse the downloaded source code as an existing project.
- Set up the minimum and maximum heap size as VM arguments in the VTrackerStandalone project run configuration: -Xms512m -Xmx2048m
- To run the experiment, use the Main class in model.diff package (Main class contains an example of how to use API to run an experiment).
- You can set the settings to perform full comparison for all three studied design aspects: containment,
inheritance (includes realization and generalization), and usage by calling setFullDiff() method of SourceDiff class.
- You can also perform a separate diff for any of the studied design aspects, by using
setDiffConfiguration (boolean enableContainment, boolean enableGeneralization,
boolean enableRealization, boolean enableUsage) of SourceDiff class and setting the corresponding boolean variable to true.
- To perform differencing, use diff (String className, String srcDirectory1, String srcDirectory2) method of SourceDiff class,
and specify the class name you want to diff (if you want to do a full differencing, provide an empty string as a className),
a path to the first version of a source code to be compared, and a path to the second version of a source code to be compared.
Experiment Data
The JDEvAn and VTracker experiment results are available for download:
Related Papers
-
Rimon Mikhaiel, Nikolaos Tsantalis, Natalia Negara, Eleni Stroulia, and Zhenchang Xing, "Differencing UML Models: A Domain-Specific vs. a Domain-Agnostic Method,"
in Generative and Transformational Techniques in Software Engineering IV, Ralf Lämmel, João Saraiva, Joost Visser, Eds. Springer Berlin Heidelberg, 2013, pp. 159-196.
(Lecture Notes in Computer Science, vol. 7680, International Summer School, GTTSE 2011, Braga, Portugal, July 3-9, 2011, Revised and Extended Papers)