1HOW WE KNOW
THE PRACTICAL IMPACT OF
CLONE ANALYSIS 	
Norihiro Yoshida (Nara Institute of Science and Technology)
Eunjong Choi (Osaka University)
Yuki Yamanaka (Osaka University)
Katsuro Inoue (Osaka University)

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

2

Simultaneous editing of clones
in the Python project	
Function-level clones for fork model variations in UNIX systems.
Revision 16150	

Check of process ID
was missing	Conditional Statements wereadded to check process ID	

Revision16151	

3Same bug was introduced again	• At a later date, a function-level clone was added for theanother variation of fork model.

Check ofprocess ID wasmissing again!	
This bug was also fixed ina later revision.	

4This is a good motivated example
for clone analysis but … 	
We do not know the practical impact of clone analysis.
Q1: Did the developers use clone analysis tools to performthe simultaneous editing and the bug fix?
Q2: Can clone analysis tools successfully support thedevelopers once they use?
For the advancement of clone analysis tools,
we should observe how those techniques affect development.	
How should we observe the impact of applying clone
analysis techniques during actual development process?

5Our experience of observing
the practical impact of clone analysis	
• Applied Clone Notifier to development process in NEC• 6 programmers, 120 KLOC written in Java
• Clone Notifier: Clone change notification system for notifying

change of code clones.

• Got regular feedbacks from a project manager
Questionnaire	

Daily Report	

Clone Notifier

Projectmanager

Feedback	
Our group6Clone Notifier :A Clone Change Notification System [1]	Version ControlSystemCommit
source code	Developer	Checkout
source code	
Identification ofClone Evolution	
Clone Notifier

Report clone evolution information• E-mail notification• Web-based UI	

[1] Yamanaka, et al.: "Applying Clone Change Notification System into an Industrial
Development Process", ICPC 2013.	

7In order to get feedbacks 	
• We asked the project manager whether he foundunintentionally-developed clones using Clone Notifier.
• If he said yes, we asked him how the development teamshould maintain them.
• Perform refactoring• Write a source code comment to denote the existence of the clone• leave the clone as it isDaily Report	Clone NotifierProjectmanagerFeedback	
Our group8Feedbacks from the project manager	He recognized• 10 clone sets should be refactored• Two of the 10 clone sets was merged into a single

function during the 40 days, respectively.
• The other 8 clone sets were designated as refactoring
candidates for next maintenance project.
• 1 clone set should be noted in a source code

comment

9Findings from Manual Observation	
• All refactoring opportunities were newly-appearedby adding new code.
àIf code clones are newly-appeared by only code

replacement and deletion, they should not be notified.
• All refactoring opportunities were syntactically-complete.
• E.g., whole parts of loop or branch statements areinvolved.
à Syntactically-incomplete clones should not be notified.	

10Summary & Challenge	
We introduce our experience in observing thepractical impact of clone analysis in industry.
We hope that our work provides a good starting point todiscuss approaches for observation.

Challenge:• More disciplined approaches for observation• Larger-scale observation• Approaches to sharing observation results among theclone research community