A Proposal of Refactoring Method for Existing Program Using Code Clone Detection and Impact Analysis Method  
  Authors : Masakazu Takahashi; Yunarso Anang; Reiji Nanba; Naoya Uchiyama; Yoshimichi Watanabe

 

This paper proposes a method that redesigns a program with an inappropriate structure into a program with appropriate structure. When a program has been using for a long period, many functional additions and modifications to the program have occurred. Those are realized by copying & pasting a part of the program and modifying it. As a result, the program becomes to have inappropriate structure and to contain many similar portions. Those similar parts make future maintenances of the program difficult. So, this paper proposes a method that clarifies similar portions in the program and integrates all similar parts into a common portion by using Code Clone detecting method. Furthermore, this paper proposes a method that the current program structure translates into the appropriate program structure by using a refactoring method when integrating code clones. Consequently, the program becomes to be able to adjust functional additions and modifications in the future. Additionally, the program can maintain for a long period.

 

Published In : IJCAT Journal Volume 3, Issue 7

Date of Publication : July 2016

Pages : 357-366

Figures :10

Tables : 03

Publication Link :A Proposal of Refactoring Method for Existing Program Using Code Clone Detection and Impact Analysis Method

 

 

 

Masakazu Takahashi : received B.S. degree in 1988 from Rikkyo University, Japan, and M.S. degree in 1998, Ph.D. degree in 2001, both in Systems Management from University of Tsukuba, Japan. He was with Ishikawajima-Harima Heavy Industries Co., Ltd. from 1988 to 2004. He was with Shimane University from 2005 to 2008. He is a professor in University of Yamanashi, Japan since 2014. His research interests include software engineering and safety.

Yunarso Anang : received B.E. degree in 1995 and M.E. degree in 1997 both in software engineering from University of Yamanashi, Japan. He was with SYNC Information System, Inc., Japan from 2000 to 2007, as a senior system engineer. From 2008, he is with Institute of Statistics (Sekolah Tinggi Ilmu Statistik), Jakarta, Indonesia, as a lecturer in computer science. From 2014, he is a Ph.D. student at University of Yamanashi, Japan. His research interests include software engineering.

Reiji Nanba : received B.E. degree in 1999 from Daiichi Institute of Technology, Japan. ME degree in 2003 and Ph.D. degree in 2008, Shimane University, Japan. He was an Assistant Professor in Daiichi Institute of Technology in 2008. He is an associate professor till now in Daiichi Institute of Technology in 2011. His research field is mainly in Civil and Environmental Engineering and Engineering Education.

Naoya Uchiyama : received B.E. degree in 2012 and M.E. degree in 2014 both in University of Yamanashi, Japan. He is with TOKAI group. His research field is network security.

Yoshimichi Watanabe : received the B.S. and M.S. degrees in computer science from University of Yamanashi, Japan in 1986 and 1988 respectively and received D.S. degree in computer science from Tokyo Institute of Technology, Japan in 1995. He is presently an associate professor of the Department of Computer Science and Engineering at University of Yamanashi. His research interests include software development environment and software quality.

 

 

 

 

 

 

 

Refactoring, Code Clone, Impact Analysis, Legacy System, Maintenance

This paper proposed a method that summarizes CCs in the existing program written in Java and redesigns the existing program into the program with appropriate program structure using CC detection and impact analysis method. Additionally, our prototype that supports conducting the proposed method was developed. As a result of applying the proposed method and the tool, we found that CCs in the existing programs were summarized and redesigned to appropriate program structure. If the proposed refactoring method is applied to the existing program, they will be able to be achieved to increase adequacy and efficiency of modifying the existing program.

 

 

 

 

 

 

 

 

 

[1] Baker, B.S, A Program for Identifying Duplicated Code, Proc. of Computing Science and Statistics: 24th Symposium on the Interface, No. 25, 1992, pp.49-57. [2] Baker, B.S, On Finding Duplication and Near-Duplication in Large Software System, Proc. of the Second IEEE Working Conf. on Reverse Engineering, 1995, pp.86-95. [3] Toshihiro Kamiya, Shinji Kusumoto, and Katsuro Inoue, CCFinder: A Multilinguistic Token-Based Code Clone Detection System for Large Scale Source Code, IEEE Transactions on Software Engineering, Vol. 28, No. 7, 2002, pp. 654- 670. [4] Yoshiki Higo, Toshihiro Kamiya, Shinji Kusumoto, and Katsuro Inoue, Aries: Refactoring Support Tool for Code Clone, Proceedings of 3rd Workshop of Software Quality, 2005, pp.53-56. [5] Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides, Elements of Reusable Object-Oriented Software. Addison-Wesley Publishing Company, 1995. [6] Martin Fowler, Kent Beck, John Brant, William Opdyke, don Roberts, Refactoring: Improving the Design of Existing Code, Addison Wesley Longman Inc1999. [7] Yoshiki Higo, Yasushi Ueda, Toshihiro Kamiya, Shinji Kusumoto, and Katsuro Inoue, On Software Maintenance Process Improvement Based on Code Clone Analysis, Journal of Information Processing Society of Japan, vol. 45, No.5, 2004, pp. 1357-1366. [8] Yoshiki Higo, Toshihiro Kamiya, Shinji Kusumoto, Katsuhiro Inoue, Refactoring Support Environment Based on Code Clone Analysis, IEIC Transaction, vol.J88-D-I, No.2, 2005, pp.186-195. [9] Norihito Yoshida, Yoshiki Higo, Toshihiro Kamiya, Shinji Kusumoti and Katsuro Inoue, On Refactoring Support Based on Code Clone Dependency Relation, Journal of Information Processing Society of Japan, vol.3, no.48, 2007, pp.1431-1442. [10] D. Kung et al., "Class Firewall, Test Order, and Regression Testing of Object-Oriented Programs" Journal of Object-Oriented Programming, 1995, pp.51-65. [11] Yoon K. Jang, Heung S. Chae, Yong R. Kwon, and Doo H. Bae, Change Impact Analysis for a Class Hierarchy, Proc. of Software Eng. Conf., 1998, pp.304-311. [12] Monden A., Saito S. and Matsumoto K., capturing industrial experiences of software maintenance using product metrics, Proc.of 5th World Multi-Conf. on Systems, Cybernetics and Informatics, Vol.2, 2001, pp.394-399.