A Framework for Studying Clones In
Large Software Systems
Jack ZhenMing Jiang Ahmed E. Hassan
Oct. 1st, 2007
What is a clone?
• Identical or similar segments of code
05/03/23 2SCAM 2007
Clone Representations
Clone Pairs Clone Classes
05/03/23 3SCAM 2007
Not So Useful Clones
05/03/23 4SCAM 2007
Evolution of Code Clones
05/03/23 5SCAM 2007
Problems With Clone Detection Output
• Too many clone candidates– Many not useful clones
• Hard to get a high level view of code cloning– Cloning at the architecture level
05/03/23 6SCAM 2007
Visualization
05/03/23 7SCAM 2007
Interesting Results
• Pattern
• Anti-pattern
05/03/23 8SCAM 2007
Conclusion
05/03/23 9SCAM 2007
Questions
05/03/23 10SCAM 2007
Thought Provoking Statements• One Question– What are clones? Is its definition task dependent (tasks
also restrains the clone detection mechanisms)?• Bug Fixes (similar semantics)• Knowledge Transfer (developers’ copy-and-paste)• Program Comprehension or Architecture Recovery (similar code
structure)• One Analogy:– Design level similarities are called design patterns. A good
design involves with metrics like “High Cohesion and Low Coupling”
– Code level similarities are called clones. How do we measure whether it is a good clone or a “harmful” clones?
05/03/23 11SCAM 2007
Top Related