A Systematic Literature Review on Software- refactoring Techniques, Challenges, and Practices
DOI:
https://doi.org/10.21015/vtse.v10i4.1275Abstract
Software-refactoring improves the quality and reduces the complexity during the whole life cycle of the software system. The objective of this work is to elicit the existing challenges and refactoring techniques and practices to counter those challenges. This study presents a systematic literature review based upon the scientific literature published since January 2000. After rigorously applying the SLR protocol defined by Barbara Kitchenham, we identify 36 articles discussing software- refactoring challenges, techniques, and practices. We point out complexity, understandability, and maintainability as three challenges of traditional software engineering that are resolved by software-refactoring. This SLR identifies assertions, program slicing, graph transformation, software metrics, and metamodeling, as five commonly used refactoring techniques. Moreover, eight main challenges of software-refactoring, namely determining refactoring and code location, selecting refactoring type and technique, managing refactoring dependency, consistency maintenance, refactoring ordering and increase in testing cost, are also highlighted. The findings of this work suggest that software-refactoring techniques can resolve challenges of traditional software engineering.
References
A. Alkhalid, M. Alshayeb, and S. A. Mahmoud, “Software refactoring at the class level using clustering techniques,” J. Res. Pract. Inf. Technol., vol. 43, no. 4, pp. 285–306, 2011.
E. L. G. Alves, M. Song, T. Massoni, P. D. L. MacHado, and M. Kim, “Refactoring Inspection Support for Manual Refactoring Edits,” IEEE Trans. Softw. Eng., vol. 44, no. 4, pp. 365–383, 2018, doi: 10.1109/TSE.2017.2679742. DOI: https://doi.org/10.1109/TSE.2017.2679742
P. Techapalokul and E. Tilevich, “Position: Manual Refactoring (by Novice Programmers) Considered Harmful,” Proc. - 2019 IEEE Blocks Beyond Work. B B 2019, pp. 79–80, 2019, doi: 10.1109/BB48857.2019.8941201.
R. R. Singh and D. Tiwari, “an Ai Approach for Software Defect Prediction – a Review of Literature,” Int. J. Tech. Res. Appl., vol. 3, no. 6, pp. 45–48, 2015.
G. Kaur and B. Singh, “Improving the quality of software by refactoring,” Proc. 2017 Int. Conf. Intell. Comput. Control Syst. ICICCS 2017, vol. 2018-Janua, pp. 185–191, 2017, doi: 10.1109/ICCONS.2017.8250707. DOI: https://doi.org/10.1109/ICCONS.2017.8250707
M. Alotaibi, “Advances and Challenges in Software Refactoring : A Tertiary Systematic Literature Review Advances and Challenges in Software Refactoring : A Tertiary Systematic Literature Review,” Rochester Inst. Technol. RIT Sch. Work., 2018.
S. Singh and S. Kaur, “A systematic literature review : Refactoring for disclosing code smells in object oriented software,” Ain Shams Eng. J., vol. 9, no. 4, pp. 2129–2151, 2018, doi: 10.1016/j.asej.2017.03.002. DOI: https://doi.org/10.1016/j.asej.2017.03.002
S. R. Foster, W. G. Griswold, and S. Lerner, “WitchDoctor: IDE support for real-time auto-completion of refactorings,” Proc. - Int. Conf. Softw. Eng., pp. 222–232, 2012, doi: 10.1109/ICSE.2012.6227191. DOI: https://doi.org/10.1109/ICSE.2012.6227191
R. Mancuso, R. Dudko, and M. Caccamo, “Light-PREM: Automated software refactoring for predictable execution on COTS embedded systems,” RTCSA 2014 - 20th IEEE Int. Conf. Embed. Real-Time Comput. Syst. Appl., 2014, doi: 10.1109/RTCSA.2014.6910515. DOI: https://doi.org/10.1109/RTCSA.2014.6910515
N. Li, M. Shepperd, and Y. Guo, “A Systematic Review of Unsupervised Learning Techniques for Software Defect Prediction,” Inf. Softw. Technol., vol. 122, 2020, [Online]. Available: http://arxiv.org/abs/1907.12027.
P. Jurnečka;, P. Hanáček;, M. Barabas, M. Henzl, and M. Kačic, “A method for parallel software refactoring for safety standards compliance,” 8th IET Int. Syst. Saf. Conf. Inc. Cyber Secur. Conf. 2013, vol. 7, no. 2, 2013. DOI: https://doi.org/10.1049/cp.2013.1724
M. Marin, A. Van Deursen, L. Moonen, and R. Van Der Rijst, “An integrated crosscutting concern migration strategy and its semi-automated application to JHotDraw,” Autom. Softw. Eng., vol. 16, no. 2, pp. 323–356, 2009, doi: 10.1007/s10515-009-0051-2. DOI: https://doi.org/10.1007/s10515-009-0051-2
J. V. V. Krishna, “Refactoring for High Cohesiveness in designing Robust Python Modules,” Int. Res. J. Eng. Technol., vol. 4, no. 6, pp. 3009–3012, 2017, [Online]. Available: https://irjet.net/archives/V4/i6/IRJET-V4I6735.pdf.
K. O. Elish and M. Alshayeb, “Using software quality attributes to classify refactoring to patterns,” J. Softw., vol. 7, no. 2, pp. 408–419, 2012, doi: 10.4304/jsw.7.2.408-419. DOI: https://doi.org/10.4304/jsw.7.2.408-419
J. Bansiya, C. G. Davis, and Y. J. Lim, “A Hierarchical Model for Object- Oriented Design Quality Assessment,” no. 2002, 2013. DOI: https://doi.org/10.1109/32.979986
K. O. Elish and M. Alshayeb, “Investigating the effect of refactoring on software testing effort,” Proc. - Asia-Pacific Softw. Eng. Conf. APSEC, pp. 29–34, 2009, doi: 10.1109/APSEC.2009.14. DOI: https://doi.org/10.1109/APSEC.2009.14
R. Shatnawi and W. Li, “An Empirical Assessment of Refactoring Impact on Software Quality Using a Hierarchical Quality Model,” Int. J. Softw. Eng. Its Appl., vol. 5, no. 4, pp. 127–150, 2011.
A. Ouni, M. Kessentini, H. Sahraoui, and M. S. Hamdi, “The use of development history in software refactoring using a multi-objective evolutionary algorithm,” GECCO 2013 - Proc. 2013 Genet. Evol. Comput. Conf., pp. 1461–1468, 2013, doi: 10.1145/2463372.2463554. DOI: https://doi.org/10.1145/2463372.2463554
J. Ratzinger, T. Sigmund, P. Vorburger, and H. Gall, “Mining software evolution to predict refactoring,” Proc. - 1st Int. Symp. Empir. Softw. Eng. Meas. ESEM 2007, pp. 354–363, 2007, doi: 10.1109/ESEM.2007.63. DOI: https://doi.org/10.1109/ESEM.2007.9
W. Mkaouer, M. Kessentini, S. Bechikh, K. Deb, and M. Cinnéide, “Recommendation system for software refactoring using innovization and interactive dynamic optimization,” ASE 2014 - Proc. 29th ACM/IEEE Int. Conf. Autom. Softw. Eng., no. May 2017, pp. 331–336, 2014, doi: 10.1145/2642937.2642965. DOI: https://doi.org/10.1145/2642937.2642965
B. Du Bois, S. Demeyer, and J. Verelst, “Refactoring - Improving coupling and cohesion of existing code,” Proc. - Work. Conf. Reverse Eng. WCRE, pp. 144–151, 2004, doi: 10.1109/WCRE.2004.33. DOI: https://doi.org/10.1109/WCRE.2004.33
T. Mens and T. Tourw, “A Survey of Software Refactoring,” IEEE Trans. Softw. Eng., vol. XX, pp. 1–14, 2004.
S. Hassan, S. Salem, M. A. Ismail, and M. I. Eladawy, “Identification of Nominated Classes for Software Refactoring Using Object- Identification of Nominated Classes for Software Refactoring Using Object-Oriented Cohesion Metrics,” IJCSI Int. J. Comput. Sci. Issues, no. May 2015, 2012.
H. Liu, L. Yang, Z. Niu, Z. Ma, and W. Shao, “Facilitating Software Refactoring with Appropriate Resolution Order of Bad Smells,” Proc. 7th Jt. Meet. Eur. Softw. Eng. Conf. ACM SIGSOFT Symp. Found. Softw. Eng. Eur. Softw. Eng. Conf. Found. Softw. Eng. Symp. - E, pp. 265–268, 2009. DOI: https://doi.org/10.1145/1595696.1595738
B. Montazeri, “Refactoring Software Packages via Community Detection from Stability Point of View,” Int. J. Autom. Comput., vol. 10, no. 2, 2014. DOI: https://doi.org/10.1007/s11633-013-0708-y
K. Cassell, “Using Clustering Techniques to Guide Refactoring of Object-Oriented Classes by,” Ph.D. thesis, Victoria Univ. Wellingt., 2012.
E. Murphy-Hill and A. P. Black, “Refactoring tools: Fitness for purpose,” IEEE Softw., vol. 25, no. 5, pp. 38–44, 2008, doi: 10.1109/MS.2008.123. DOI: https://doi.org/10.1109/MS.2008.123
J. Thomas, “What is Python ? Why Python ? Why Python ? Why Python ? Example : Bayesian Spam Filtering Example : Bayesian Spam Filtering Python Code Example : Bayesian Spam Filtering — Java versus Python,” 2012.
M. Vimaladevi and G. Zayaraz, “Stability Aware Software Refactoring Using Hybrid Search-Based Techniques,” in International Conference on Technical Advancements in Computers and Communications (ICTACC), 2017, pp. 32–35. DOI: https://doi.org/10.1109/ICTACC.2017.18
Y. Khrishe and M. Alshayeb, “An empirical study on the effect of the order of applying software refactoring,” in 7th International Conference on Computer Science and Information Technology (CSIT), 2016, pp. 1–4. DOI: https://doi.org/10.1109/CSIT.2016.7549471
P. Meananeatra, S. Rongviriyapanish, and T. Apiwattanapong, “Using software metrics to select refactoring for long method bad smell,” ECTI-CON 2011 - 8th Electr. Eng. Electron. Comput. Telecommun. Inf. Technol. Assoc. Thail. - Conf. 2011, no. April, pp. 492–495, 2011, doi: 10.1109/ECTICON.2011.5947882. DOI: https://doi.org/10.1109/ECTICON.2011.5947882
W. F. Opdyke, “Refactoring: A program restructuring aid in designing object-oriented application frameworks,” Univ. Illinois Urbana-Champaign, p. 206, 1992.
M. Abebe and C. J. Yoo, “Trends, opportunities and challenges of software refactoring: A systematic literature review,” Int. J. Softw. Eng. its Appl., vol. 8, no. 6, pp. 299–318, 2014, doi: 10.14257/ijseia.2014.8.6.24.
J. Al Dallal, “Identifying refactoring opportunities in object-oriented code: A systematic literature review,” Inf. Softw. Technol., vol. 58, pp. 231–249, 2015, doi: 10.1016/j.infsof.2014.08.002. DOI: https://doi.org/10.1016/j.infsof.2014.08.002
K. Ljung and J. Gonzalez-Huerta, “‘To Clean-Code or Not To Clean-Code’ A Survey among Practitioners,” arXiv:2208.07056v1, pp. 1–16, 2022, [Online]. Available: http://arxiv.org/abs/2208.07056.
E. A. AlOmar, M. W. Mkaouer, C. Newman, and A. Ouni, “On preserving the behavior in software refactoring: A systematic mapping study,” Inf. Softw. Technol., vol. 140, 2021, doi: 10.1016/j.infsof.2021.106675.
S. Engineering, A. Rifat, J. Porras, S. Oyedeji, and S. Oyedeji, “Green Code - Towards Measuring the Efficiency of Software System Execution,” Lappeenranta-Lahti Univ. Technol. LUT, 2022.
I. Inayat, S. S. Salim, S. Marczak, M. Daneva, and S. Shamshirband, “A systematic literature review on agile requirements engineering practices and challenges,” Comput. Human Behav., vol. 51, pp. 915–929, 2015, doi: 10.1016/j.chb.2014.10.046. DOI: https://doi.org/10.1016/j.chb.2014.10.046
B. Kitchenham, O. Pearl Brereton, D. Budgen, M. Turner, J. Bailey, and S. Linkman, “Systematic literature reviews in software engineering - A systematic literature review,” Inf. Softw. Technol., vol. 51, no. 1, pp. 7–15, 2009, doi: 10.1016/j.infsof.2008.09.009. DOI: https://doi.org/10.1016/j.infsof.2008.09.009
S. Bryton and F. B. Abreu, “Strengthening refactoring: Towards software evolution with quantitative and experimental grounds,” 4th Int. Conf. Softw. Eng. Adv. ICSEA 2009, Incl. SEDES 2009 Simp. para Estud. Doutor. em Eng. Softw., no. September 2009, pp. 570–575, 2009, doi: 10.1109/ICSEA.2009.90. DOI: https://doi.org/10.1109/ICSEA.2009.90
B. Du Bois et al., “A Discussion of Refactoring in Research and Practice A Discussion of Refactoring in Research and Practice,” Univ. Antwerp, no. August 2015, 2015.
B. Du Bois, S. Demeyer, and J. Verelst, “Does the ‘Refactor to Understand’ reverse engineering pattern improve program comprehension?,” Ninth Eur. Conf. Softw. Maint. Reengineering, pp. 334–343, 2005.
R. Khatchadourian and H. Masuhara, “Automated Refactoring of Legacy Java Software to Default Methods,” Proc. - 2017 IEEE/ACM 39th Int. Conf. Softw. Eng. ICSE 2017, pp. 82–93, 2017, doi: 10.1109/ICSE.2017.16. DOI: https://doi.org/10.1109/ICSE.2017.16
M. Mohamed, L. I. Ecole, and S. De, “Classification of model refactoring approaches,” J. Object Technol., vol. 8, no. 6, pp. 143–158, 2010. DOI: https://doi.org/10.5381/jot.2009.8.6.a3
E. Glynn and P. Strooper, “Evaluating Software Refactoring Tool Support,” Aust. Softw. Eng. Conf. (ASWEC’06, pp. 5–5, 2006.
S. Kaur and P. Singh, “How does Object-Oriented Code Refactoring Influence Software Quality? Research Landscape and Challenges,” arXiv, 2019.
A. A. H. Mohamad, N. K. Jumaa, and S. H. Majeed, “ThingSpeak cloud computing platform based ECG diagnose system,” Int. J. Comput. Digit. Syst., vol. 8, no. 1, pp. 11–18, 2019, doi: 10.12785/ijcds/080102.
M. Fowler, “Refactoring: Improving the Design of Existing Code,” pp. 1–82, 1997, [Online]. Available: http://http//ourworldourworld..compuservecompuserve.com/homepages/Martin_Fowler.com/homepages/Martin_Fowler.
S. Thangthumachit, S. Hayashi, and M. Saeki, “Understanding Source Code Differences by Separating Refactoring Effects,” 18th Asia-Pacific Softw. Eng. Conf., pp. 339–347, 2011. DOI: https://doi.org/10.1109/APSEC.2011.47
P. Naur and B. Randell, “Report on a conference sponsored by the NATO SCIENCE COMMITTEE Garmisch, Germany, 7th to 11th October 1968,” Eur. J. Biochem., vol. 205, no. 2, pp. 443–449, 1992, doi: 10.1111/j.1432-1033.1992.tb16798.x. DOI: https://doi.org/10.1111/j.1432-1033.1992.tb16798.x
M. Katić and K. Fertalj, “Towards an Appropriate Software Refactoring Tool Support 2 Automating Refactoring Process,” Proc. 9th WSEAS Int. Conf. Appl. Comput. Sci., no. January 2009, 2014.
C. Brown, V. Janjic, A. D. Barwell, J. D. Garcia, and K. MacKenzie, “Refactoring GrPPI: Generic Refactoring for Generic Parallelism in C++,” Int. J. Parallel Program., vol. 48, no. 4, pp. 603–625, 2020, doi: 10.1007/s10766-020-00667-x.
Downloads
Published
How to Cite
Issue
Section
License
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License (CC-By) that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).
This work is licensed under a Creative Commons Attribution License CC BY