Understanding Refactoring Tasks over Time: A Study Using Refactoring Graphs
Refactoring is a fundamental practice in modern software development. Therefore, it is essential that practitioners have a solid understanding of refactoring, both in theory and in practice. In this paper, we rely on a graph-based abstraction — called refactoring graphs — to visualize and analyze refactorings performed by students in a canonical refactoring application: the Video Store System, proposed by Fowler. We asked 46 students to perform the refactorings included in this example under two scenarios: according to a list of explicit guidelines, where most students performed the tasks successfully; and by using flexible ones, in which a part of the students faced problems identifying the appropriate operations. We conclude by presenting discussions and implications.
Abid, S., Abdul Basit, H., and Arshad, N. (2015). Reflections on teaching refactoring: A tale of two projects. In 20th ACM Conference on Innovation and Technology in Computer Science Education (ITiCSE), page 225-230.
Agrahari, V. and Chimalakonda, S. (2020). Refactor4green: A game for novice programmers to learn code smells. In 42nd International Conference on Software Engineering: Companion Proceedings (ICSE-Companion), pages 324-325.
AlOmar, E., Mkaouer, M., and Ouni, A. (2021a). Knowledge Management in the Development of Data-Intensive Systems, chapter Mining and Managing Big Data Refactoring for Design Improvement: Are We There Yet? Auerbach Publications.
AlOmar, E. A., Mkaouer, M. W., and Ouni, A. (2021b). Toward the automatic classification of self-affirmed refactoring. Journal of Systems and Software (JSS), 171:110821.
Bibiano, A. C., Fernandes, E., Oliveira, D., Garcia, A., Kalinowski, M., Fonseca, B., Oliveira, R., Oliveira, A., and Cedrim, D. (2019). A quantitative study on characteristics and effect of batch refactoring on code smells. In 13th International Symposium on Empirical Software Engineering and Measurement (ESEM), pages 1-11.
Bogart, A., AlOmar, E. A., Mkaouer, M. W., and Ouni, A. (2020). Increasing the trust in refactoring through visualization. In 42nd International Conference on Software Engineering Workshops (ICSEW), pages 334-341.
Brito, A., Hora, A., and Valente, M. T. (2020). Refactoring graphs: Assessing refactoring over time. In 27th International Conference on Software Analysis, Evolution and Reengineering (SANER), pages 367-377.
Brito, A., Xavier, L., Hora, A., and Valente, M. T. (2018). APIDiff: Detecting API breaking changes. In 25th International Conference on Software Analysis, Evolution and Reengineering (SANER), Tool Track, pages 507-511.
Brito, R. and Valente, M. T. (2020). RefDiff4Go: Detecting refactorings in Go. In 14th Brazilian Symposium on Software Components, Architectures, and Reuse (SBCARS), pages 101-110.
Brito, R. and Valente, M. T. (2021). RAID - Refactoring aware and intelligent diffs. In 29th International Conference on Program Comprehension (ICPC), pages 1-11.
Demeyer, S., Van Rysselberghe, F., Girba, T., Ratzinger, J., Marinescu, R., Mens, T., Du Bois, B., Janssens, D., Ducasse, S., Lanza, M., Rieger, M., Gall, H., and El-Ramly, M. (2005). The LAN-simulation: a refactoring teaching example. In 8th International Workshop on Principles of Software Evolution (IWPSE), pages 123-131.
Fowler, M. (1999). Refactoring: Improving the Design of Existing Code. AddisonWesley.
Fowler, M. (2018). Refactoring: improving the design of existing code. Addison-Wesley.
Gamma, E., Helm, R., Johnson, R., and Vlissides, J. (1995). Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley Longman Publishing Co., Inc., USA.
Grund, F., Chowdhury, S., Bradley, N., Hall, B., and Holmes, R. (2021). CodeShovel: Constructing method-level source code histories. In 43rd International Conference on Software Engineering: Companion Proceedings (ICSE), pages 1-13.
Hebig, R., Ho-Quang, T., Jolak, R., Schroder, J., Linero, H., Agren, M., and Maro, S. H.(2020). How do students experience and judge software comprehension techniques? In 28th International Conference on Program Comprehension (ICPC), page 425-435.
Hora, A., Silva, D., Robbes, R., and Valente, M. T. (2018). Assessing the threat of untracked changes in software evolution. In 40th International Conference on Software Engineering (ICSE), pages 1102-1113.
Karac, E. I., Turhan, B., and Juristo, N. (2019). A controlled experiment with novice developers on the impact of task description granularity on software quality in testdriven development. IEEE Transactions on Software Engineering (TSE), pages 1-16.
Keuning, H., Heeren, B., and Jeuring, J. (2020). Student refactoring behaviour in a programming tutor. In 20th Koli Calling International Conference on Computing Education Research (Koli Calling), pages 1-10.
Kim, M., Zimmermann, T., and Nagappan, N. (2012). A field study of refactoring challenges and benefits. In 20th International Symposium on the Foundations of Software Engineering (FSE), pages 50:1-50:11.
Kim, M., Zimmermann, T., and Nagappan, N. (2014). An empirical study of refactoring challenge and benefits at Microsoft. IEEE Transactions on Software Engineering (TSE), 40(7):633-649.
Leung, C. (2010). Technical notes on extending gSpan to directed graphs. Technical report, Singapore Management University.
López, C., Alonso, J. M., Marticorena, R., and Maudes, J. M. (2014). Design of e-activities for the learning of code refactoring tasks. In 2014 16th International Symposium on Computers in Education (SIIE), pages 35-40.
Mahmoudi, M., Nadi, S., and Tsantalis, N. (2019). Are refactorings to blame? an empirical study of refactorings in merge conflicts. In 26th International Conference on Software Analysis, Evolution and Reengineering (SANER), pages 151-162.
Murphy-Hill, E., Parnin, C., and Black, A. P. (2009). How we refactor, and how we know it. In 31st International Conference on Software Engineering (ICSE), pages 287-297.
Paixao, M., Uchoa, A., Bibiano, A. C., Oliveira, D., Garcia, A., Krinke, J., and Arvonio, E. (2020). Behind the intents: An in-depth empirical study on software refactoring in modern code review. In 17th International Conference on Mining Software Repositories (MSR), pages 1-12.
Pantiuchina, J., Zampetti, F., Scalabrino, S., Piantadosi, V., Oliveto, R., Bavota, G., and Penta, M. D. (2020). Why developers refactor source code: A mining-based study. ACM Transactions on Software Engineering and Methodology (TOSEM), 37(4):1-32.
Sanfeliu, A. and Fu, K.-S. (1983). A distance measure between attributed relational graphs for pattern recognition. IEEE Transactions on Systems, Man, and Cybernetics (SMC), SMC-13(3):353-362.
Sellitto, G., Iannone, E., Codabux, Z., Lenarduzzi, V., Lucia, A. D., Palomba, F., and Ferrucci1, F. (2022). Toward understanding the impact of refactoring on program comprehension. In 29th International Conference on Software Analysis, Evolution, and Reengineering (SANER), pages 1-12.
Silva, D., da Silva, J. P., Santos, G., Terra, R., and Valente, M. T. (2020). RefDiff 2.0: A multi-language refactoring detection tool. IEEE Transactions on Software Engineering (TSE), 1(1):1-17.
Silva, D., Tsantalis, N., and Valente, M. T. (2016). Why we refactor? Confessions of GitHub contributors. In 24th International Symposium on the Foundations of Software Engineering (FSE), pages 858-870.
Silva, D. and Valente, M. T. (2017). RefDiff: Detecting refactorings in version histories. In 14th International Conference on Mining Software Repositories (MSR), pages 1-11.
Sousa, L., Cedrim, D., Garcia, A., Oizumi, W., Bibiano, A. C., Oliveira, D., Kim, M., and Oliveira, A. (2020). Characterizing and identifying composite refactorings: Concepts, heuristics and patterns. In 17th International Conference on Mining Software Repositories (MSR), pages 186-197.
Stoecklin, S., Smith, S., and Serino, C. (2007). Teaching students to build well formed object-oriented methods through refactoring. In 38th Technical Symposium on Computer Science Education (SIGCSE), pages 145-149.
Tsantalis, N., Ketkar, A., and Dig, D. (2020). RefactoringMiner 2.0. IEEE Transactions on Software Engineering (TSE).
Tsantalis, N., Mansouri, M., Eshkevari, L. M., Mazinanian, D., and Dig, D. (2018). Accurate and efficient refactoring detection in commit history. In 40th International Conference on Software Engineering (ICSE), pages 483-494.
Xifeng Yan and Jiawei Han (2002). gSpan: graph-based substructure pattern mining. In 2nd International Conference on Data Mining (ICDM), pages 721-724.