EE 382V Spring 2009 Software Evolution - Instructor Miryung Kim
Lecture 26
Empirical Studies of Clone Evolution Clone Genealogies
Lecture 26 Empirical Studies of Clone Evolution Clone Genealogies - - PowerPoint PPT Presentation
Lecture 26 Empirical Studies of Clone Evolution Clone Genealogies EE 382V Spring 2009 Software Evolution - Instructor Miryung Kim Todays Agenda (1) Class Presentation Meiru Che Amal Banerjee Course Evaluation I
EE 382V Spring 2009 Software Evolution - Instructor Miryung Kim
Empirical Studies of Clone Evolution Clone Genealogies
EE 382V Spring 2009 Software Evolution - Instructor Miryung Kim
evaluation forms.
EE 382V Spring 2009 Software Evolution - Instructor Miryung Kim
EE 382V Spring 2009 Software Evolution - Instructor Miryung Kim
sequence using language dependent transformation rules.
contiguous subsequences.
industrial size programs.
EE 382V Spring 2009 Software Evolution - Instructor Miryung Kim
EE 382V Spring 2009 Software Evolution - Instructor Miryung Kim
Evolution
EE 382V Spring 2009 Software Evolution - Instructor Miryung Kim
EE 382V Spring 2009 Software Evolution - Instructor Miryung Kim
restructuring a program?
EE 382V Spring 2009 Software Evolution - Instructor Miryung Kim
a program?
EE 382V Spring 2009 Software Evolution - Instructor Miryung Kim
EE 382V Spring 2009 Software Evolution - Instructor Miryung Kim
your software design process?
EE 382V Spring 2009 Software Evolution - Instructor Miryung Kim
versions?
evolution research?
EE 382V Spring 2009 Software Evolution - Instructor Miryung Kim
program differencing tools, such as diff, AST
Jdiff, UMLDiff, and LogicalStructuralDiff.
ideas and benefits of using it.
EE 382V Spring 2009 Software Evolution - Instructor Miryung Kim
program differencing tools, such as diff, AST
Jdiff, UMLDiff, and LogicalStructuralDiff.
codebase?
EE 382V Spring 2009 Software Evolution - Instructor Miryung Kim
held conventional wisdom about clones.
public void updateFrom (Class c ) { String cType = Util.makeType(c.Name()); if (seenClasses.contains(cType)) { return; } seenClasses.add(cType); if (hierarchy != null) { …. } … public void updateFrom (ClassReader cr ) { String cType =CTD.convertType (c.Name()); if (seenClasses.contains(cType)) { return; } seenClasses.add(cType); if (hierarchy != null) { …. } …
Code clones indicate bad smells
aggressively refactor clones.
manage code clones with clear intent.
– Programmers cannot refactor clones because of programming language limitations. – Programmers keep and maintain clones until they realize how to abstract the common part of clones. – Programmers often apply similar changes to clones.
[Kim et al. ISESE2004]
How do clones evolve over time?
– lexical, syntactic (AST or PDG), metric, etc.
– gcc (8.7%), JDK (29%), Linux (22.7%), etc.
– changes of clone coverage in Linux [Antoniol+02], [Li+04]
These studies do not answer how individual clones changed with respect to other clones.
Version i Version i+1 Version i+2 Version i+3 Clone group Code snippet Location overlapping relationship Cloning relationship Consistent Change Add Inconsistent Change Evolution Patterns A B A B C D A B C D D A B
A B C D B A C D B A B D A F G E F E F E
Clone genealogy is a set of clone groups connected by cloning relationships over time.
copied, pasted, and modified consistently changed lineage lineage
Given multiple versions of a program, Vk for 1≤k≤n.
Vi+1 using CCFinder.
relationships (a clone genealogy).
Program
carol dnsjava
LOC
7878 ~ 23731 5756 ~ 21188
Duration
2 years 2 months 5 years 8 months
versions
37 224
versions: a set of check-in snapshots that increased or decreased the total lines