RefacTutor: An Interactive Tutoring System for Software Refactoring

  • Thorsten HaendlerEmail author
  • Gustaf Neumann
  • Fiodor Smirnov
Conference paper
Part of the Communications in Computer and Information Science book series (CCIS, volume 1220)


While software refactoring is considered important to manage software complexity, it is often perceived as difficult and risky by software developers and thus neglected in practice. In this article, we present refacTutor, an interactive tutoring system for promoting software developers’ practical competences in software refactoring. The tutoring system provides immediate feedback to the users regarding the quality of the software design and the functional correctness of the (modified) source code. In particular, after each code modification (refactoring step), the user can review the results of run-time regression tests and compare the actual software design (as-is) with the targeted design (to-be) in order to check quality improvement. For this purpose, structural and behavioral diagrams of the Unified Modeling Language (UML2) representing the as-is software design are automatically reverse-engineered from source code. The to-be UML design diagrams can be pre-specified by the instructor. To demonstrate the technical feasibility of the approach, we provide a browser-based software prototype in Java accompanied by a collection of exercise examples. Moreover, we specify a viewpoint model for software refactoring, allocate exercises to competence levels and describe an exemplary path for teaching and training.


Intelligent tutoring system Software refactoring Software design Code visualization Unified Modeling Language (UML2) Software-engineering education and training Interactive training environment 


  1. 1.
    Abid, S., Abdul Basit, H., Arshad, N.: Reflections on teaching refactoring: a tale of two projects. In: Proceedings of the 2015 ACM Conference on Innovation and Technology in Computer Science Education, pp. 225–230. ACM (2015)Google Scholar
  2. 2. AceEditor (2019). Accessed 7 Aug 2019
  3. 3.
    Alves, N.S., Mendes, T.S., de Mendonça, M.G., Spínola, R.O., Shull, F., Seaman, C.: Identification and management of technical debt: a systematic mapping study. Inf. Softw. Technol. 70, 100–121 (2016). Scholar
  4. 4.
    Argyris, C.: Double loop learning in organizations. Harvard Bus. Rev. 55(5), 115–125 (1977)Google Scholar
  5. 5.
    Arisholm, E., Briand, L.C., Hove, S.E., Labiche, Y.: The impact of UML documentation on software maintenance: an experimental evaluation. IEEE Trans. Softw. Eng. 32(6), 365–381 (2006). Scholar
  6. 6.
    Bastarrica, M.C., Perovich, D., Samary, M.M.: What can students get from a software engineering capstone course? In: 2017 IEEE/ACM 39th International Conference on Software Engineering: Software Engineering Education and Training Track (ICSE-SEET), pp. 137–145. IEEE (2017)Google Scholar
  7. 7.
    Beck, K.: Test-Driven Development: By Example. Addison-Wesley Professional (2003)Google Scholar
  8. 8.
    Bloom, B.S., et al.: Taxonomy of Educational Objectives, vol. 1: Cognitive Domain, pp. 20–24. McKay, New York (1956)Google Scholar
  9. 9.
    Bonwell, C.C., Eison, J.A.: Active Learning: Creating Excitement in the Classroom. 1991 ASHE-ERIC Higher Education Reports. ERIC (1991)Google Scholar
  10. 10.
    Campbell, G., Papapetrou, P.P.: SonarQube in Action. Manning Publications Co. (2013). Accessed 7 Aug 2019
  11. 11.
    Cañas, J.J., Bajo, M.T., Gonzalvo, P.: Mental models and computer programming. Int. J. Hum.-Comput. Stud. 40(5), 795–811 (1994). Scholar
  12. 12.
    Clements, P., et al.: Documenting Software Architectures: Views and Beyond. Pearson Education (2002)Google Scholar
  13. 13.
    CoderGears: JArchitect (2018). Accessed 7 Aug 2019
  14. 14.
    Daun, M., Tenbergen, B., Weyer, T.: Requirements viewpoint. In: Pohl, K., Hönninger, H., Achatz, R., Broy, M. (eds.) Model-Based Engineering of Embedded Systems, pp. 51–68. Springer, Heidelberg (2012). Scholar
  15. 15.
    Elezi, L., Sali, S., Demeyer, S., Murgia, A., Pérez, J.: A game of refactoring: studying the impact of gamification in software refactoring. In: Proceedings of the Scientific Workshops of XP2016, pp. 23:1–23:6. ACM (2016).
  16. 16.
    Erlikh, L.: Leveraging legacy system dollars for e-business. IT Prof. 2, 17–23 (2000)CrossRefGoogle Scholar
  17. 17.
    Fernandes, E., Oliveira, J., Vale, G., Paiva, T., Figueiredo, E.: A review-based comparative study of bad smell detection tools. In: Proceedings of the 20th International Conference on Evaluation and Assessment in Software Engineering, pp. 18:1–18:12. ACM (2016).
  18. 18.
    Fontana, F.A., Braione, P., Zanoni, M.: Automatic detection of bad smells in code: an experimental assessment. J. Object Technol. 11(2), 5-1 (2012).
  19. 19.
    Fontana, F.A., Dietrich, J., Walter, B., Yamashita, A., Zanoni, M.: Antipattern and code smell false positives: preliminary conceptualization and classification. In: 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER), vol. 1, pp. 609–613. IEEE (2016).
  20. 20.
    Forman, I.R., Forman, N.: Java Reflection in Action (In Action Series). Manning Publications Co. (2004). Accessed 7 Aug 2019
  21. 21.
    Fowler, M., Beck, K., Brant, J., Opdyke, W., Roberts, D.: Refactoring: Improving the Design of Existing Code. Addison-Wesley Professional (1999). Accessed 7 Aug 2019
  22. 22.
    Freeman, S., et al.: Active learning increases student performance in science, engineering, and mathematics. Proc. Nat. Acad. Sci. 111(23), 8410–8415 (2014)CrossRefGoogle Scholar
  23. 23.
    Gamma, E., Beck, K., et al.: JUnit: a cook’s tour. Java Rep. 4(5), 27–38 (1999). Accessed 7 Aug 2019
  24. 24.
    George, C.E.: Experiences with novices: the importance of graphical representations in supporting mental mode. In: PPIG, p. 3 (2000)Google Scholar
  25. 25.
    Haendler, T.: On using UML diagrams to identify and assess software design smells. In: Proceedings of the 13th International Conference on Software Technologies, pp. 413–421. SciTePress (2018).
  26. 26.
    Haendler, T.: A card game for learning software-refactoring principles. In: Proceedings of the 3rd International Symposium on Gamification and Games for Learning (GamiLearn@CHIPLAY) (2019)Google Scholar
  27. 27.
    Haendler, T., Frysak, J.: Deconstructing the refactoring process from a problem-solving and decision-making perspective. In: Proceedings of the 13th International Conference on Software Technologies (ICSOFT), pp. 363–372. SciTePress (2018).
  28. 28.
    Haendler, T., Neumann, G.: A framework for the assessment and training of software refactoring competences. In: Proceedings of 11th International Conference on Knowledge Management and Information Systems (KMIS). SciTePress (2019)Google Scholar
  29. 29.
    Haendler, T., Neumann, G.: Serious refactoring games. In: Proceedings of the 52nd Hawaii International Conference on System Sciences (HICSS), pp. 7691–7700 (2019).
  30. 30.
    Haendler, T., Neumann, G., Smirnov, F.: An interactive tutoring system for training software refactoring. In: Proceedings of the 11th International Conference on Computer Supported Education (CSEDU), vol. 2, pp. 177–188. SciTePress (2019).
  31. 31.
    Haendler, T., Sobernig, S., Strembeck, M.: Deriving tailored UML interaction models from scenario-based runtime tests. In: Lorenz, P., Cardoso, J., Maciaszek, L.A., van Sinderen, M. (eds.) ICSOFT 2015. CCIS, vol. 586, pp. 326–348. Springer, Cham (2016). Scholar
  32. 32.
    Haendler, T., Sobernig, S., Strembeck, M.: Towards triaging code-smell candidates via runtime scenarios and method-call dependencies. In: Proceedings of the XP2017 Scientific Workshops, pp. 8:1–8:9. ACM (2017).
  33. 33.
    Kölling, M., Quig, B., Patterson, A., Rosenberg, J.: The BlueJ system and its pedagogy. Comput. Sci. Educ. 13(4), 249–268 (2003). Scholar
  34. 34.
    Kollmann, R., Selonen, P., Stroulia, E., Systa, T., Zundorf, A.: A study on the current state of the art in tool-supported UML-based static reverse engineering. In: Proceedings of the Ninth Working Conference on Reverse Engineering, pp. 22–32. IEEE (2002).
  35. 35.
    Krathwohl, D.R.: A revision of Bloom’s taxonomy: an overview. Theory Pract. 41(4), 212–218 (2002).
  36. 36.
    Kruchten, P., Nord, R.L., Ozkaya, I.: Technical debt: from metaphor to theory and practice. IEEE Softw. 29(6), 18–21 (2012). Scholar
  37. 37.
    Kruchten, P.B.: The 4+1 view model of architecture. IEEE Softw. 12(6), 42–50 (1995). Scholar
  38. 38.
    Krusche, S., Seitz, A.: Increasing the interactivity in software engineering MOOCs - a case study. In: 52nd Hawaii International Conference on System Sciences, HICSS 2019, pp. 1–10 (2019)Google Scholar
  39. 39.
    López, C., Alonso, J.M., Marticorena, R., Maudes, J.M.: Design of e-activities for the learning of code refactoring tasks. In: 2014 International Symposium on Computers in Education (SIIE), pp. 35–40. IEEE (2014).
  40. 40.
    Martini, A., Bosch, J., Chaudron, M.: Architecture technical debt: understanding causes and a qualitative model. In: 2014 40th EUROMICRO Conference on Software Engineering and Advanced Applications, pp. 85–92. IEEE (2014).
  41. 41.
    May, N.: A survey of software architecture viewpoint models. In: Proceedings of the Sixth Australasian Workshop on Software and System Architectures, pp. 13–24 (2005)Google Scholar
  42. 42.
    Michael, J.: Where’s the evidence that active learning works? Adv. Physiol. Educ. 30(4), 159–167 (2006)CrossRefGoogle Scholar
  43. 43.
    Moha, N., Gueheneuc, Y.G., Duchien, L., Le Meur, A.F.: DECOR: a method for the specification and detection of code and design smells. IEEE Trans. Softw. Eng. 36(1), 20–36 (2010). Scholar
  44. 44.
    Mugridge, R.: Challenges in teaching test driven development. In: Marchesi, M., Succi, G. (eds.) XP 2003. LNCS, vol. 2675, pp. 410–413. Springer, Heidelberg (2003). Scholar
  45. 45.
    Murphy-Hill, E., Parnin, C., Black, A.P.: How we refactor, and how we know it. IEEE Trans. Softw. Eng. 38(1), 5–18 (2012). Scholar
  46. 46.
    Nord, R.L., Ozkaya, I., Kruchten, P., Gonzalez-Rojas, M.: In search of a metric for managing architectural technical debt. In: 2012 Joint Working IEEE/IFIP Conference on Software Architecture and European Conference on Software Architecture, pp. 91–100. IEEE (2012).
  47. 47.
    Object Management Group: Unified Modeling Language (UML), Superstructure, Version 2.5.1, June 2017. Accessed 7 Aug 2019
  48. 48.
    Oechsle, R., Schmitt, T.: JAVAVIS: automatic program visualization with object and sequence diagrams using the Java Debug Interface (JDI). In: Diehl, S. (ed.) Software Visualization. LNCS, vol. 2269, pp. 176–190. Springer, Heidelberg (2002). Scholar
  49. 49.
    Opdyke, W.F.: Refactoring object-oriented frameworks. University of Illinois at Urbana-Champaign Champaign, IL, USA (1992).
  50. 50.
    Paquette, G.: An ontology and a software framework for competency modeling and management. Educ. Technol. Soc. 10(3), 1–21 (2007).
  51. 51.
    Parnas, D.L.: Software aging. In: Proceedings of 16th International Conference on Software Engineering, pp. 279–287. IEEE (1994).
  52. 52.
    Ribeiro, L.F., de Freitas Farias, M.A., Mendonça, M.G., Spínola, R.O.: Decision criteria for the payment of technical debt in software projects: a systematic mapping study. In: ICEIS (1), pp. 572–579 (2016)Google Scholar
  53. 53.
    Richner, T., Ducasse, S.: Recovering high-level views of object-oriented applications from static and dynamic information. In: Proceedings of the IEEE International Conference on Software Maintenance, pp. 13–22. IEEE Computer Society (1999).
  54. 54.
    Roques, A.: PlantUml: UML diagram editor (2017). Accessed 7 Aug 2019
  55. 55.
    Sandalski, M., Stoyanova-Doycheva, A., Popchev, I., Stoyanov, S.: Development of a refactoring learning environment. Cybern. Inf. Technol. (CIT) 11(2) (2011). Accessed 7 Aug 2019
  56. 56.
    Scanniello, G., et al.: Do software models based on the UML aid in source-code comprehensibility? Aggregating evidence from 12 controlled experiments. Empirical Softw. Eng. 23(5), 2695–2733 (2018). Scholar
  57. 57.
    Schach, S.R.: Object-Oriented and Classical Software Engineering, vol. 6. McGraw-Hill, New York (2007)Google Scholar
  58. 58.
    Sims, Z., Bubinski, C.: Codecademy (2018). Accessed 7 Aug 2019
  59. 59.
    Sleeman, D., Brown, J.S.: Intelligent tutoring systems (1982)Google Scholar
  60. 60.
    Smith, S., Stoecklin, S., Serino, C.: An innovative approach to teaching refactoring. In: ACM SIGCSE Bulletin, vol. 38, pp. 349–353. ACM (2006).
  61. 61.
    Software Engineering Standards Committee of the IEEE Computer Society: IEEE recommended practice for architectural description of software-intensive systems. IEEE Std 1471–2000, pp. 1–29, September 2000Google Scholar
  62. 62.
    Sommerville, I., Kotonya, G., Viller, S., Sawyer, P.: Process viewpoints. In: Schäfer, W. (ed.) EWSPT 1995. LNCS, vol. 913, pp. 2–8. Springer, Heidelberg (1995). Scholar
  63. 63.
    Sommerville, I., Sawyer, P.: Viewpoints: principles, problems and a practical approach to requirements engineering. Ann. Softw. Eng. 3(1), 101–130 (1997)CrossRefGoogle Scholar
  64. 64.
    Sorva, J., Karavirta, V., Malmi, L.: A review of generic program visualization systems for introductory programming education. ACM Trans. Comput. Educ. (TOCE) 13(4), 15 (2013). Scholar
  65. 65.
    Stoecklin, S., Smith, S., Serino, C.: Teaching students to build well formed object-oriented methods through refactoring. ACM SIGCSE Bull. 39(1), 145–149 (2007). Scholar
  66. 66.
    Suryanarayana, G., Samarthyam, G., Sharma, T.: Refactoring for Software Design Smells: Managing Technical Debt. Morgan Kaufmann (2014).
  67. 67.
    Tempero, E., Gorschek, T., Angelis, L.: Barriers to refactoring. Commun. ACM 60(10), 54–61 (2017). Scholar
  68. 68.
    Trung, N.K.: InMemoryJavaCompiler (2017). Accessed 7 Aug 2019
  69. 69.
    Tsantalis, N., Chaikalis, T., Chatzigeorgiou, A.: JDeodorant: identification and removal of type-checking bad smells. In: Proceedings of 12th European Conference on Software Maintenance and Reengineering (CSMR 2008), pp. 329–331. IEEE (2008).
  70. 70.
    Wichmann, B., Canning, A., Clutterbuck, D., Winsborrow, L., Ward, N., Marsh, D.: Industrial perspective on static analysis. Softw. Eng. J. 10(2), 69–75 (1995)CrossRefGoogle Scholar

Copyright information

© Springer Nature Switzerland AG 2020

Authors and Affiliations

  • Thorsten Haendler
    • 1
    Email author
  • Gustaf Neumann
    • 1
  • Fiodor Smirnov
    • 1
  1. 1.Institute for Information Systems and New MediaVienna University of Economics and Business (WU Vienna)ViennaAustria

Personalised recommendations