The Community for Technology Leaders
RSS Icon
Subscribe
Issue No.05 - Sept.-Oct. (2012 vol.38)
pp: 1008-1026
Hoan Anh Nguyen , Iowa State University, Ames
Tung Thanh Nguyen , Iowa State University, Ames
Nam H. Pham , Iowa State University, Ames
Jafar Al-Kofahi , Iowa State University, Ames
Tien N. Nguyen , Iowa State University, Ames
ABSTRACT
Recent research results suggest a need for code clone management. In this paper, we introduce JSync, a novel clone management tool. JSync provides two main functions to support developers in being aware of the clone relation among code fragments as software systems evolve and in making consistent changes as they create or modify cloned code. JSync represents source code and clones as (sub)trees in Abstract Syntax Trees, measures code similarity based on structural characteristic vectors, and describes code changes as tree editing scripts. The key techniques of JSync include the algorithms to compute tree editing scripts, to detect and update code clones and their groups, to analyze the changes of cloned code to validate their consistency, and to recommend relevant clone synchronization and merging. Our empirical study on several real-world systems shows that JSync is efficient and accurate in clone detection and updating, and provides the correct detection of the defects resulting from inconsistent changes to clones and the correct recommendations for change propagation across cloned code.
INDEX TERMS
Cloning, Feature extraction, Software systems, Synchronization, Vegetation, Merging, Databases, clone merging, Clone management, clone consistency analysis, clone synchronization
CITATION
Hoan Anh Nguyen, Tung Thanh Nguyen, Nam H. Pham, Jafar Al-Kofahi, Tien N. Nguyen, "Clone Management for Evolving Software", IEEE Transactions on Software Engineering, vol.38, no. 5, pp. 1008-1026, Sept.-Oct. 2012, doi:10.1109/TSE.2011.90
REFERENCES
[1] A. Andoni and P. Indyk, "E2LSH 0.1 User Manual," http://web.mit.edu/andoni/www/LSHmanual.pdf , 2012.
[2] U. Asklund, "Identifying Conflicts during Structural Merge," Proc. Nordic Workshop Programming Environment, pp. 231-242, 1994.
[3] L. Aversano, L. Cerulo, and M. Di Penta, "How Clones Are Maintained: An Empirical Study," Proc. 11th European Conf. Software Maintenance and Reeng., 2007.
[4] B.S. Baker, "Parameterized Duplication in Strings: Algorithms and an Application to Software Maintenance," SIAM J. Computing, vol. 26, no. 5, pp. 1343-1362, Oct., 1997.
[5] T. Bakota, R. Ferenc, and T. Gyimóthy, "Clone Smells in Software Evolution," Proc. IEEE Int'l Conf. Software Maintenance, pp. 24-33, 2007.
[6] B. Dagenais and L. Hendren, "Enabling Static Analysis for Partial Java Programs," Proc. 23rd ACM SIGPLAN Conf. Object-Oriented Programming Systems Languages and Applications, 2008.
[7] I.D. Baxter, A. Yahin, L. Moura, M. Sant 'Anna, and L. Bier, "Clone Detection Using Abstract Syntax Trees," Proc. Int'l Conf. Software Maintenance, 1998.
[8] S. Bellon, R. Koschke, G. Antoniol, J. Krinke, and E. Merlo, "Comparison and Evaluation of Clone Detection Tools," IEEE Trans. Software Eng., vol. 33, no. 9, pp. 577-591, Sept. 2007.
[9] CCFinderX. http:/www.ccfinder.net, 2012.
[10] M. Chilowicz, E. Duris, and G. Roussel, "Syntax Tree Fingerprinting for Source Code Similarity Detection," Proc. 17th IEEE Int'l Conf. Program Comprehension, 2009.
[11] R. Conradi and B. Westfechtel, "Version Models for Software Configuration Management," ACM Computing Surveys, vol. 30, no. 2, pp. 232-282, 1998.
[12] S. Ducasse, M. Rieger, and S. Demeyer, "A Language Independent Approach for Detecting Duplicated Code," Proc. IEEE Int'l Conf. Software Maintenance, 1999.
[13] E. Duala-Ekoko and M.P. Robillard, "Tracking Code Clones in Evolving Software," Proc. IEEE 29th Int'l Conf. Software Eng., pp. 158-167, 2007.
[14] E. Duala-Ekoko and M.P. Robillard, "CloneTracker: Tool Support for Code Clone Management," Proc. 30th IEEE Int'l Conf. Software Eng., 2008.
[15] J. Estublier, D. Leblang, A. van der Hoek, R. Conradi, G. Clemm, W. Tichy, and D. Weber, "Impact of SE Research on the Practice of SCM," ACM Trans. Software Eng. and Methodology, vol. 14, no. 4, pp. 383-430, 2005.
[16] B. Fluri, M. Wuersch, M. Pinzger, and H. Gall, "Change Distilling: Tree Differencing for Fine-Grained Source Code Change Extraction," IEEE Trans. Software Eng., vol. 33, no. 11, pp. 725-743, Nov. 2007.
[17] M. Gabel, L. Jiang, and Z. Su, "Scalable Detection of Semantic Clones," Proc. 30th IEEE Int'l Conf. Software Eng., pp. 321-330, 2008.
[18] M. Gabel, J. Yang, Y. Yu, M. Goldszmidt, and Z. Su, "Scalable and Systematic Detection of Buggy Inconsistencies in Source Code," Proc. ACM Int'l Conf. Object Oriented Programming Systems Languages and Applications, pp. 175-190, 2010.
[19] N. Göde and R. Koschke, "Incremental Clone Detection," Proc. 13th European Conf. Software Maintenance and Reeng., pp. 219-228, 2009.
[20] P. Jablonski and D. Hou, "CReN: A Tool for Tracking Copy-and-Paste Code Clones and Renaming Identifiers Consistently in the IDE," Proc. Eclipse Technology Exchange Workshop at OOPSLA '07, pp. 16-20, 2007.
[21] L. Jiang, G. Misherghi, Z. Su, and S. Glondu, "Deckard: Scalable and Accurate Tree-Based Detection of Code Clones," Proc. IEEE 29th Int'l Conf. Software Eng., 2007.
[22] L. Jiang, Z. Su, and E. Chiu, "Context-Based Detection of Clone-Related Bugs," Proc. Sixth Joint Meeting of the European Software Eng. Conf. and the ACM SIGSOFT Symp. the Foundations of Software Eng., pp. 55-64, 2007.
[23] E. Juergens, F. Deissenboeck, B. Hummel, and S. Wagner, "Do Code Clones Matter?" Proc. 31st IEEE Int'l Conf. Software Eng., 2009.
[24] T. Kamiya, S. Kusumoto, and K. Inoue, "CCFinder: A Multilinguistic Token-Based Code Clone Detection System for Large Scale Source Code," IEEE Trans. Software Eng., vol. 28, no. 7, pp. 654-670, July 2002.
[25] C. Kapser and M. Godfrey, "'Cloning Considered Harmful' Considered Harmful: Patterns of Cloning in Software," Emperical Software Eng., vol. 13, no. 6, pp. 645-692, 2008.
[26] M. Kim, V. Sazawal, D. Notkin, and G. Murphy, "An Empirical Study of Code Clone Genealogies," Proc. 10th European Software Eng. Conf. Held Jointly with 13th ACM SIGSOFT Int'l Symp. Foundations of Software Eng., 2005.
[27] R. Komondoor and S. Horwitz, "Using Slicing to Identify Duplication in Source Code," Proc. Eighth Int'l Symp. Static Analysis, pp. 40-56, 2001.
[28] J. Krinke, "A Study of Consistent and Inconsistent Changes to Code Clones," Proc. 14th Working Conf. Reverse Eng., pp. 170-178. 2007.
[29] J. Krinke, "Identifying Similar Code with Program Dependence Graphs," Proc. Eighth Working Conf. Reverse Eng., 2001.
[30] Z. Li, S. Lu, and S. Myagmar, "CP-Miner: Finding Copy-Paste and Related Bugs in Large-Scale Software," IEEE Trans. Software Eng., vol. 32, no. 3, pp. 176-192, Mar. 2006.
[31] E. Lippe and N. van Oosterom, "Operation-Based Merging," ACM SIGSOFT Software Eng. Notes, vol. 17, no. 5 pp. 78-87, 1992.
[32] Y. Higo, Y. Ueda, S. Kusumoto, and K. Inoue, "Simultaneous Modification Support Based on Code Clone Analysis," Proc. 14th Asia-Pacific Software Eng. Conf., 2007.
[33] T. Mens, "A State-of-the-Art Survey on Software Merging," IEEE Trans. Software Eng., vol. 28, no. 5, pp. 449-462, May 2002.
[34] A. Marcus and J. Maletic, "Identification of High-Level Concept Clones in Source Code," Proc. 16th Ann. Int'l Conf. Automated Software Eng., pp. 107-114, 2001.
[35] T. Mende, R. Koschke, and F. Beckwermert, "An Evaluation of Code Similarity Identification for the Grow-and-Prune Model," J. Software Maintenance and Evolution Research and Practice, vol. 21, no. 2, pp. 143-169, 2009.
[36] F. Mitter, "Tracking Source Code Propagation in Software Systems via Release History Data and Code Clone Detection," diploma thesis, Univ. of Zurich, 2006.
[37] H.A. Nguyen, T.T. Nguyen, N.H. Pham, J.M. Al-Kofahi, and T.N. Nguyen, "Accurate and Efficient Structural Characteristic Feature Extraction for Clone Detection," Proc. 12th Int'l Conf. Fundamental Approaches to Software Eng., pp. 440-455, 2009.
[38] T.T. Nguyen, H.A. Nguyen, N.H. Pham, and T.N. Nguyen, "Operation-Based, Fine-Grained Version Control Model for Tree-Based Representation," Proc. 13th Int'l Conf. Fundamental Approaches to Software Eng., pp. 74-90, 2010.
[39] T.T. Nguyen, H.A. Nguyen, N.H. Pham, J.M. Al-Kofahi, and T.N. Nguyen, "Clone-Aware Configuration Management," Proc. IEEE/ACM 24th Int'l Conf. Automated Software Eng., 2009.
[40] T.T. Nguyen, H.A. Nguyen, N.H. Pham, J.M. Al-Kofahi, and T.N. Nguyen, "Scalable and Incremental Clone Detection for Evolving Software," Proc. IEEE Int'l Conf. Software Maintenance, 2009.
[41] D.C. Rajapakse and S. Jarzabek, "Using Server Pages to Unify Clones in Web Applications: A Trade-Off Analysis," Proc. 29th IEEE Int'l Conf. Software Eng., 2007.
[42] Subclipse.tigris.org, Subclipse, 2012.
[43] Subversion.tigris.org, http:/subversion.tigris.org/, 2012.
[44] C.K. Roy, J.R. Cordy, and R. Koschke, "Comparison and Evaluation of Code Clone Detection Techniques and Tools: A Qualitative Approach," Science of Computer Programming, vol. 74, no. 7, pp. 470-495, 2009.
[45] R. Tairas, "Bibliography of Code Detection Literature," http://students.cis.uab.edu/tairasr/clones literature/, 2012.
[46] M. Toomim, A. Begel, and S.L. Graham, "Managing Duplicated Code with Linked Editing," Proc. IEEE Symp. Visual Languages and Human Centric Computing, 2004.
[47] M. de Wit, A. Zaidman, and A. van Deursen, "Managing Code Clones Using Dynamic Change Tracking and Resolution," Proc. IEEE Int'l Conf. Software Maintenance, 2009.
[48] A. Walenstein, N. Jyoti, J. Li, Y. Yang, and A. Lakhotia, "Problems Creating Task-Relevant Clone Detection Reference Data," Proc. 10th Working Conf. Reverse Eng., 2003.
[49] W. Yang, S. Horwitz, and T. Reps, "A Program Integration Algorithm that Accommodates Semantics-Preserving Transformations," ACM Trans. Software Eng. Methodology, vol. 1, no. 3, pp. 310-354, 1992.
[50] K. Zhang, "Algorithms for the Constrained Editing Distance Between Ordered Labeled Trees and Related Problems," Pattern Recognition, vol. 28, pp. 463-474, 1995.
36 ms
(Ver 2.0)

Marketing Automation Platform Marketing Automation Tool