Cloning in Popular Server Side Technologies using Agile Development: An Empirical Study

Authors

  • Aisha Khan Punjab University College of Information Technology (PUCIT), University of the Punjab, Lahore, Pakistan
  • Hamid Abdul Basit Department of Computer Science, School of Science and Engineering, Lahore University of Management Sciences (LUMS), Lahore, Pakistan
  • Syed Mansoor Sarwar Punjab University College of Information Technology (PUCIT), University of the Punjab, Lahore, Pakistan
  • Muhammad Murtaza Yousaf Punjab University College of Information Technology (PUCIT), University of the Punjab, Lahore, Pakistan

Abstract

Several types of clones exist in software systems due to the copy-paste activity, developer limitations, language restrictions, and software development lifecycle. This work studies the issues of cloning in server side technologies for web applications. We studied 11 different reasonable size (average over 22K LOC) web development projects coded in C#, Java, Ruby-on-Rails (ROR), and PHP based on the same set of requirements. We identified and analyzed simple and structural clones present in these systems in order to compare the different technologies in terms of number of clones, clone size, clone coverage, reasons behind creation of clones, and the ratio of refactorable and non-refactorable clones. Our study focused only on the base languages of these server side technologies. Our analyses show that C# has the highest number of clones and ROR has the lowest. C# also has the highest and ROR has the lowest percentages of refactorable clones. PHP has the highest clone coverage and ROR has the lowest. Average clone size for all projects ranges from 49.8 to 77.2 tokens. In terms of clone size, there are no significant differences across projects in the same technology. The project size, project architecture, and developer approach dictate the percentage of clones present in a software project. The use of frameworks and design patterns helps control generation of clones.

References

[1] Roy, C. K., & Cordy, J. R. (2010). Near-miss Function Clones in Open Source Software: An Empirical Study. Journal of Software Maintenance and EvolutionResearch and Practice - Working Conference on Reverse Engineering, , 22(3), 165-189.

[2] Rajapakse, D. C., & Jarzabek, S. (2005). An Investigation of Cloning in Web Applications. Int. Conf. on Web Engineering, Syndney, 924-925.

[3] Roy, C. K., & Cordy, J. R. (2010). Are Scripting Languages Really Different?. Proc. IWSC 2010, ICSE 4th International Workshop on Software Clones,Cape Town, South Africa, 17-24.

[4] Al-Ekram, R., Kapser, C., & Godfrey, M. (2005). Cloning by Accident: An Empirical Study of Source Code Cloning Across Software Systems. In ISESE, 2005. 376-385.

[5] Kapser, C., & Michael, W. G. (2008). “Cloning Considered Harmful” Considered Harmful. Patterns of Cloning in Software, Empirical Software Engineering. 13(6), 645-692.

[6] Yoshiki, H., Toshihiro, K., Shinji, K., & Katsuro, I. (2004). Refactoring Support Based on Code Clone Analysis. PROFES’04, Kansai Science City, Japan, April 2004.

[7] Basit, H. A., & Jarzabek, S. (2009). A Data Mining Approach for Detecting Higher-level Clones in Software. IEEE Transaction on Software Engineering, 35(4), 497-514.

[8] Martin, F. (1999). Refactoring: Improving the Design of Existing Code. Addison-Wesely, 1999.

[9] Basit, H. A., & Jarzabek, S. (2005). Detecting Higher-level Similarity Patterns in Programs. In proceedingd 10th European Software Engineering Conference and 13th ACM SISOFT International Symposium on the Foundations of Software Engineering, ACM Press, , Lisbon, Portugal, Spetember 2005.

[10] Basit, H. A., Ali U., Haque S., & Jarzabek, S. (2012). Things Structural Clones Tell that Simple Clones Don’t. Int. Conference on Software Maintenance, ICSM’2012, Trento, Italy, September 2012, 275-28.

[11] Monzur, M. M., Arifur, R. M., & Salah, U. A. (2012). A Literature Review of Code Clone Analysis to Improve Software Maintenance Process. CoRR, May, 2012.

[12] Monden, A., Nakae, D., Kamiya, T., & Sato, S. (2002). Software quality analysis by code clones in industrial legacy software. Proceedings of the Eighth IEEE Symposium on Software Metrics (METRICSí02), Ontario, Canada, June 2002.

[13] Juergens, E., Deissenboeck, F., Hummel, B., & Wagner, S. (2009). Do code clones matter?. Proceedings of 31stIEEE International Conference on Software Engineering, Washington, DC, USA, 485–495.

[14] Lozano, A., & Wermelinger, M. (2008). Assessing the effect of clones on changeability. Proceedings of the 24th IEEE International Conference on Software Maintenance, Beijing, China, 2008, 227–236.

[15] Rakibul, I., Rafiqul I., Maidul, I., & Tasneem, H. (2011). A Study of Code Cloning in Server Pages of Web Applications Developed Using Classic ASP.NET and ASP.NET MVC Framework. Proceedings of 14th International Conference on Computer and Infonnation Technology (ICCIT 2011), Dhaka, Bangladesh.

[16] Tariq, M., Minhaz, F. Z., Yosuke Y., & Chanchal K. R. (2013). Near Miss Clone Patterns in web Applications: An Empirical Study with Industrial Systems. 26th Annual IEEE Canadian Conference onElectrical and Computer Engineering (CCECE),Regina, SK, May, 2013, 1-6.

[17] Rhaman F., Christian, B., & Premkumar D. (2010). Clones: What is that Smell. Proc. IEEE Working Conf. on Mining Software Repositories, 2010, 72-81.

[18] Basit, H. A., Puglisi, S., Smyth, W., Turpin, A., & Jarzabek, S. (2007). Efficient token based clone detection with flexible tokenization. In Proceedings of the European Software Engineering Conference and ACM SIGSOFT Symposium on the Foundations of Software Engineering (ESEC-FSE), September 2007, 513-516.

[19] Basit, H. A., & Jarzabek, S. (2009). A data mining approach for detecting higher-level clones in software. IEEE Transactions on Software Engineering, 35(4), 497-514.

[20] Bellon, S., Axivion, G. S., Koschke, R., Antoniol, G., & Krinke, J. (2007). Comparison and evaluation of clone detection techniques. IEEE Transactions on Software Engineering, 33(9), 577 – 591.

[21] Chanchal K. R., James R. C., & Rainer K. (2009). Copmarison and evaluation of clone detection tools and techniques: a qualitative approach. Science of Computer Programming Journal, 74(7), 470-495.

[22] Mondal, M., Roy, C. K., & Schneider, K. A. (2015). A Comparative Study on the Bug-Proneness of Different Types of Code Clones. IEEE International Conference on Software Maintenance and Evolution (ICSME), Bremen, Germany, 91-100.

[23] Koschke, R., & Bazrafshan, S. (2016). Software-Clone Rates in Open-Source Programs Written in C or C++. IEEE International Conference on Software Analysis, Evolution, and Reengineering (SANER), Suita, Japan, 2016.

[24] Manishankar, M., Chanchal, K. R., & Kevin, A. S. (2017). Does cloned code increase maintenance effort?. IEEE 11th International Workshop on Software Clones (IWSC), Klagenfurt, Austria, 21-21 Feb. 2017.

[25] Yusuke, Y., Yoshiki, H., & Shinji, K. (2017). A technique to detect multi-grained code clones. IEEE 11th International Workshop on Software Clones (IWSC), Klagenfurt, Austria, 21-21 Feb. 2017.

[26] Rattan, D., Bhatia, R., & Singh, M. (2013). Software clone detection: A systematic review. Information and Software Technology, 55(7), 1165-1199.

[27] Roy, C., Zibran, M., & Koschke, R. (2014). The vision of software clone management: Past present and future (keynote paper). 2014 Software Evolution Week - IEEE Conference on Software Maintenance, Reengineering, and Reverse Engineering, 18-33.

[28] Svajlenko, J., & Roy, C. K. (2015). Evaluating clone detection tools with bigclonebench. Proceedings of the 2015 IEEE International Conference on Software Maintenance and Evolution ICSME ‘15.

[29] Svajlenko, J., & Roy, C. K. (2014). Evaluating modern clone detection tools. Proceedings of the 2014 IEEE International Conference on Software Maintenance and Evolution ICSME.

[30] Tsantalis, N., Mazinanian, D., & Krishnan, G. P. (2015). Assessing the refactorability of software clones. IEEE Transactions on Software Engineering, 41(11),1055–1090.

Downloads

Published

2018-03-07

Issue

Section

Electrical Engineering and Computer Science