RECOMMENDING CLONES FOR REFACTORING USING COMMIT MESSAGES

Authors

  • Manpreet Kaur
  • Dhavleesh Rattan
  • Madan Lal

Keywords:

software clones, clone recommendation, clone refactoring, commit messages, clone management

Abstract

Software can have many clones which are required to be managed. One possible method of clone management is refactoring. But all clones do not require the attention of developers for their management through refactoring. There is a need to develop tools that understand the developers' real intent behind clone management and recommend suitable clones for refactoring. In this paper, we proposed an approach that uses commit message analysis for recommending suitable clones for refactoring.

References

AlOmar, Eman Abdullah, Jiaqian Liu, Kenneth Addo, Mohamed Wiem Mkaouer, Christian Newman, Ali Ouni, and Zhe Yu. 2022. “On the Documentation of Refactoring Types.” Automated Software Engineering 29: 1–40.

AlOmar, Eman Abdullah, Mohamed Wiem Mkaouer, and Ali Ouni. 2021. “Toward the Automatic Classification of Self-Affirmed Refactoring.” Journal of Systems and Software 171: 110821.

Basit, Hamid Abdul, Usman Ali, Sidra Haque, and Stan Jarzabek. 2012. “Things Structural Clones Tell That Simple Clones Don’t.” In IEEE International Conference on Software Maintenance, ICSM, 275–84. https://doi.org/10.1109/ICSM.2012.6405283.

Choi, Eunjong, Norihiro Yoshida, Takashi Ishio, Katsuro Inoue, and Tateki Sano. 2011. “Extracting Code Clones for Refactoring Using Combinations of Clone Metrics.” In IWCS, 7–13. https://doi.org/10.1145/1985404.1985407.

Duala-ekoko, Ekwa, and Martin P Robillard. 2007. “Tracking Code Clones in Evolving Software.” In 29th International Conference on Software Engineering (ICSE’07), 158–67. https://doi.org/10.1109/ICSE.2007.90.

Duala-Ekoko, Ekwa, and Martin P Robillard. 2008. “Clone Tracker: Tool Support for Code Clone Management.” In Proceedings - International Conference on Software Engineering, 843–46. https://doi.org/10.1145/1368088.1368218.

Fanqi, Meng. 2014. “Using Self Organized Mapping to Seek Refactorable Code Clone.” In Proceedings - 2014 4th International Conference on Communication Systems and Network Technologies, CSNT 2014, 851–55. https://doi.org/10.1109/CSNT.2014.177.

Fontana, Francesca Arcelli, Marco Zanoni, and Francesco Zanoni. 2015. “A Duplicated Code Refactoring Advisor.” In International Conference on Agile Software Development, 3–14. https://doi.org/10.1007/978-3-319-18612-2_1.

Garg, Ridhi, and Rajkumar Tekchandani. 2015. “An Approach to Rank Code Clones for Efficient Clone Management.” In 2014 International Conference on Advances in Electronics, Computers and Communications, ICAECC 2014, 1–5. https://doi.org/10.1109/ICAECC.2014.7002385.

Higo, Yoshiki, Toshihiro Kamiya, Shinji Kusumoto, and Katsuro Inoue. 2005. “ARIES: Refactoring Support Tool for Code Clone.” In Proceedings - International Conference on Software Engineering, 53–56. https://doi.org/10.1145/1083292.1083306.

Higo, Yoshiki, and Shinji Kusumoto. 2013. “Identifying Clone Removal Opportunities Based on Co-Evolution Analysis.” In Proceedings of the 2013 International Workshop on Principles of Software Evolution, 63–67. https://doi.org/10.1145/2501543.2501552.

Higo, Yoshiki, Shinji Kusumoto, and Katsuro Inoue. 2008. “A Metric‐based Approach to Identifying Refactoring Opportunities for Merging Code Clones in a Java Software System.” JOURNAL OF SOFTWARE MAINTENANCE AND EVOLUTION: RESEARCH AND PRACTICE 20: 435–61. https://doi.org/10.1002/smr.394.

Id, Jaweria Kanwal, Onaiza Maqbool, Hamid Abdul, Basit Id, Azam Sindhu Id, and Katsuro Inoue. 2022. “Historical Perspective of Code Clone Refactorings in Evolving Software.” Plos One 17: 1–26. https://doi.org/10.1371/journal.pone.0277216.

Kaur, M, and D Rattan. 2020. “Towards an Approach to Recommend and Rank Clones for Refactoring.” Advances in Mathematics: Scientific Journal Vol. 9 (6): 3783–3788. https://doi.org/https://doi.org/10.37418/amsj.9.6.56.

Kaur, Manpreet, and Dhavleesh Rattan. 2023. “A Systematic Literature Review on the Use of Machine Learning in Code Clone Research.” Computer Science Review 47. https://doi.org/https://doi.org/10.1016/j.cosrev.2022.100528.

Koschke, Rainer. 2008. “Frontiers of Software Clone Management.” In 2008 Frontiers of Software Maintenance, 119–28. Beijing, China: IEEE. https://doi.org/10.1109/FOSM.2008.4659255.

Krishnan, Giri Panamoottil, and Nikolaos Tsantalis. 2014. “Unification and Refactoring of Clones.” In 2014 Software Evolution Week - IEEE Conference on Software Maintenance, Reengineering, and Reverse Engineering, CSMR-WCRE 2014 - Proceedings, 104–13. https://doi.org/10.1109/CSMR-WCRE.2014.6747160.

Marmolejos, Licelot, Eman Abdullah, Alomar Mohamed, Wiem Mkaouer, Christian Newman, and Ali Ouni. 2021. “On the Use of Textual Feature Extraction Techniques to Support the Automated Detection of Refactoring Documentation.” Innovations in Systems and Software Engineering. https://doi.org/10.1007/s11334-021-00388-5.

Mazinanian, Davood, Nikolaos Tsantalis, Raphael Stein, and Zackary Valenta. 2016. “JDeodorant: Clone Refactoring.” In 38th International Conference on Software Engineering Companion, 613–16. https://doi.org/10.1145/2889160.2889168.

Mondal, Manishankar, Chanchal K. Roy, and Kevin A. Schneider. 2014a. “Automatic Identification of Important Clones for Refactoring and Tracking.” In Proceedings - 2014 14th IEEE International Working Conference on Source Code Analysis and Manipulation, SCAM 2014, 11–20. https://doi.org/10.1109/SCAM.2014.11.

———. 2014b. “Automatic Ranking of Clones for Refactoring through Mining Association Rules.” In 2014 Software Evolution Week - IEEE Conference on Software Maintenance, Reengineering, and Reverse Engineering, CSMR-WCRE 2014 - Proceedings, 114–23. https://doi.org/10.1109/CSMR-WCRE.2014.6747161.

———. 2015. “SPCP-Miner: A Tool for Mining Code Clones That Are Important for Refactoring or Tracking.” In 2015 IEEE 22nd International Conference on Software Analysis, Evolution, and Reengineering, SANER 2015, 484–88. https://doi.org/10.1109/SANER.2015.7081861.

———. 2020. “A Survey on Clone Refactoring and Tracking.” Journal of Systems and Software 159: 110429. https://doi.org/10.1016/j.jss.2019.110429.

Rattan, Dhavleesh, Rajesh Bhatia, and Maninder Singh. 2012. “Model Clone Detection Based on Tree Comparison.” In 2012 Annual IEEE India Conference, INDICON 2012, 1041–46. https://doi.org/10.1109/INDCON.2012.6420770.

———. 2013. “Software Clone Detection: A Systematic Review.” Information and Software Technology 55 (7): 1165–99.

Rongrong, She, Zhang Liping, and Zhao Fengrong. 2019. “A Method for Identifying and Recommending Reconstructed Clones.” In Proceedings of the 2019 3rd International Conference on Management Engineering, Software Engineering and Service Sciences, 39–44.

Roy, Chanchal Kumar, and James R Cordy. 2007. “A Survey on Software Clone Detection Research.” Queen’s School of Computing TR 541 (115): 64–68.

Sheneamer, A. M. 2020. “An Automatic Advisor for Refactoring Software Clones Based on Machine Learning.” IEEE Access 8: 124978–88. https://doi.org/10.1109/ACCESS.2020.3006178.

Sheneamer, Abdullah, and Jugal Kalita. 2016. “A Survey of Software Clone Detection Techniques.” International Journal of Computer Applications 137 (10): 1–21. https://doi.org/10.5120/ijca2016908896.

Tairas, Robert, and Jeff Gray. 2012. “Increasing Clone Maintenance Support by Unifying Clone Detection and Refactoring Activities.” Information and Software Technology 54 (12): 1297–1307. https://doi.org/10.1016/j.infsof.2012.06.011.

Tsantalis, Nikolaos, Davood Mazinanian, and Giri Panamoottil Krishnan. 2015. “Assessing the Refactorability of Software Clones.” IEEE Transactions on Software Engineering 41 (11): 1055–90. https://doi.org/10.1109/TSE.2015.2448531.

Wang, Wei, and Michael W. Godfrey. 2014. “Recommending Clones for Refactoring Using Design, Context, and History.” In 4th IEEE International Conference on Software Maintenance and Evolution, ICSME 2014, 331–40. https://doi.org/10.1109/ICSME.2014.55.

Yue, Ruru, Zhe Gao, Na Meng, Yingfei Xiong, Xiaoyin Wang, and J. David Morgenthaler. 2018. “Automatic Clone Recommendation for Refactoring Based on the Present and the Past.” In Proceedings - 2018 IEEE International Conference on Software Maintenance and Evolution, ICSME 2018, 115–26. https://doi.org/10.1109/ICSME.2018.00021.

Downloads

Published

2023-12-30

How to Cite

Manpreet Kaur, Dhavleesh Rattan, & Madan Lal. (2023). RECOMMENDING CLONES FOR REFACTORING USING COMMIT MESSAGES. Journal Punjab Academy of Sciences, 23, 361–367. Retrieved from http://jpas.in/index.php/home/article/view/90