e Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka Un Applying Clone Change Notification System into an Industrial Development Process Yuki Yamanaka 1 , Eunjong Choi 1 , Norihiro Yoshida 2 , Katsuro Inoue 1 , Tateki Sano 3 1 Osaka University, Japan 2 Nara Institute of Science and Technology, Japan 3 NEC Corporation, Japan 1
44
Embed
Applying Clone Change Notification System into an Industrial Development Process
Applying Clone Change Notification System into an Industrial Development Process. Yuki Yamanaka 1 , Eunjong Choi 1 , Norihiro Yoshida 2 , Katsuro Inoue 1 , Tateki Sano 3. 1 Osaka University, Japan 2 Nara Institute of Science and Technology, Japan 3 NEC Corporation, Japan. - PowerPoint PPT Presentation
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
1
Applying Clone Change Notification System into an Industrial Development Process
1 Osaka University, Japan 2 Nara Institute of Science and Technology, Japan
3 NEC Corporation, Japan
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
2
Contents
1. Background2. Clone Notifier3. Industrial Application4. Summary and Future Work
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
3
What is Code Clone ?
A code fragment that has similar or identical part in source code
Code CloneClone Set †
† Clone Set: a set of code clones identical or similar to each other
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Maintaining Code Clones (1/2)
• Consistent modification– Modifying code clones in a single clone set
consistently
4
Include Bugs
RemoveBugs
Consistent Modification
Old Version New Version
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Maintaining Code Clones (2/2)
• Refactoring– Merging clone set into a single program unit
5
Remove Code Clones
call
Merging
Old Version New Version
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
6
Clone Detection Tool : CCFinder[1]
• A token-based clone detection tool– Transform source code into sequence of tokens – Detect identical parts of the sequence as code clones
• High speed and accuracy
Input Output
Source Files Location Information of Code CloneCCFinder
[1] T. Kamiya, S. Kusumoto, and K. Inoue, “CCFinder: A multilinguistic token-based code clone detection system for large scale source code”, IEEE Transactions on Software Engineering, 28(7):654-670, 2002.
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
7
Clone Change Management• Besides CCFinder, various clone detection tools
have been proposed.• Developers have to find targets of refactoring or
consistent modification manually.
It is necessary to performclone change management.
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
8
Newly-appeared code clones are candidates for refactoring.
New VersionOld Version
copy
Examples of Clone Change Management (1/2)
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
9
Examples of Clone Change Management (2/2)
Inconsistent modified clone sets may introduce bugs into source code.
modify
New VersionOld Version
Includebugs
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
10
Industrial Motivation
• Touching source code after large-scale test may increase risk of defect.
• Automatic clone change management is highly motivated for reducing cost of maintaining code clones.
We need the daily clone change notification
system.
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
11
Overview of Our Study
• Develop clone change notification system Clone Notifier.
• Investigate the usefulness of Clone Notifier for industrial development process in NEC.
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
12
Contents
1. Background2. Clone Notifier3. Industrial Application4. Summary and Future Work
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University