Scam2007 jiang

11
A Framework for Studying Clones In Large Software Systems Jack ZhenMing Jiang Ahmed E. Hassan Oct. 1 st , 2007

Transcript of Scam2007 jiang

Page 1: Scam2007 jiang

A Framework for Studying Clones In

Large Software Systems

Jack ZhenMing Jiang Ahmed E. Hassan

Oct. 1st, 2007

Page 2: Scam2007 jiang

What is a clone?

• Identical or similar segments of code

05/03/23 2SCAM 2007

Page 3: Scam2007 jiang

Clone Representations

Clone Pairs Clone Classes

05/03/23 3SCAM 2007

Page 4: Scam2007 jiang

Not So Useful Clones

05/03/23 4SCAM 2007

Page 5: Scam2007 jiang

Evolution of Code Clones

05/03/23 5SCAM 2007

Page 6: Scam2007 jiang

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

Page 7: Scam2007 jiang

Visualization

05/03/23 7SCAM 2007

Page 8: Scam2007 jiang

Interesting Results

• Pattern

• Anti-pattern

05/03/23 8SCAM 2007

Page 9: Scam2007 jiang

Conclusion

05/03/23 9SCAM 2007

Site Licence
That screen capture has the date on it so may be redo it. Just the first slide.Also do not have a seperate Question slide for Questions you want to keep your conclusion slide upNeed to make sure you can fit it in allocated time....
Page 10: Scam2007 jiang

Questions

05/03/23 10SCAM 2007

Page 11: Scam2007 jiang

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