Skip to main content

RefacTutor: An Interactive Tutoring System for Software Refactoring

  • Conference paper
  • First Online:

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 1220))

Abstract

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.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   84.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Notes

  1. 1.

    See Sect. 3. The software prototype is available for download from http://refactoringgames.com/refactutor.

  2. 2.

    This workflow is supported by refacTutor; see Sect. 3 and Fig. 4 in particular.

  3. 3.

    The software prototype is available for download from http://refactoringgames.com/refactutor.

  4. 4.

    http://refactoringgames.com/refactutor.

  5. 5.

    Besides the two described types of exercises, multiple other scenarios can be designed by varying the values of the exercise aspects and views (see Table 1).

References

  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. Ajax.org: AceEditor (2019). https://ace.c9.io/. Accessed 7 Aug 2019

  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). https://doi.org/10.1016/j.infsof.2015.10.008

    Article  Google Scholar 

  4. Argyris, C.: Double loop learning in organizations. Harvard Bus. Rev. 55(5), 115–125 (1977)

    Google Scholar 

  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). https://doi.org/10.1109/TSE.2006.59

    Article  Google Scholar 

  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. Beck, K.: Test-Driven Development: By Example. Addison-Wesley Professional (2003)

    Google Scholar 

  8. Bloom, B.S., et al.: Taxonomy of Educational Objectives, vol. 1: Cognitive Domain, pp. 20–24. McKay, New York (1956)

    Google Scholar 

  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. Campbell, G., Papapetrou, P.P.: SonarQube in Action. Manning Publications Co. (2013). https://www.sonarqube.org/. Accessed 7 Aug 2019

  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). https://doi.org/10.1006/ijhc.1994.1038

    Article  Google Scholar 

  12. Clements, P., et al.: Documenting Software Architectures: Views and Beyond. Pearson Education (2002)

    Google Scholar 

  13. CoderGears: JArchitect (2018). http://www.jarchitect.com/. Accessed 7 Aug 2019

  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). https://doi.org/10.1007/978-3-642-34614-9_4

    Chapter  Google Scholar 

  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). https://doi.org/10.1145/2962695.2962718

  16. Erlikh, L.: Leveraging legacy system dollars for e-business. IT Prof. 2, 17–23 (2000)

    Article  Google Scholar 

  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). https://doi.org/10.1145/2915970.2915984

  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). https://doi.org/10.5381/jot.2012.11.2.a5

  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). https://doi.org/10.1109/SANER.2016.84

  20. Forman, I.R., Forman, N.: Java Reflection in Action (In Action Series). Manning Publications Co. (2004). https://www.oracle.com/technetwork/articles/java/javareflection-1536171.html. Accessed 7 Aug 2019

  21. Fowler, M., Beck, K., Brant, J., Opdyke, W., Roberts, D.: Refactoring: Improving the Design of Existing Code. Addison-Wesley Professional (1999). http://martinfowler.com/books/refactoring.html. Accessed 7 Aug 2019

  22. Freeman, S., et al.: Active learning increases student performance in science, engineering, and mathematics. Proc. Nat. Acad. Sci. 111(23), 8410–8415 (2014)

    Article  Google Scholar 

  23. Gamma, E., Beck, K., et al.: JUnit: a cook’s tour. Java Rep. 4(5), 27–38 (1999). http://junit.sourceforge.net/doc/cookstour/cookstour.htm. Accessed 7 Aug 2019

  24. George, C.E.: Experiences with novices: the importance of graphical representations in supporting mental mode. In: PPIG, p. 3 (2000)

    Google Scholar 

  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). https://doi.org/10.5220/0006938504470455

  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. 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). https://doi.org/10.5220/0006915903970406

  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. Haendler, T., Neumann, G.: Serious refactoring games. In: Proceedings of the 52nd Hawaii International Conference on System Sciences (HICSS), pp. 7691–7700 (2019). https://doi.org/10.24251/HICSS.2019.927

  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). https://doi.org/10.5220/0007801101770188

  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). https://doi.org/10.1007/978-3-319-30142-6_18

    Chapter  Google Scholar 

  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). https://doi.org/10.1145/3120459.3120468

  33. Kölling, M., Quig, B., Patterson, A., Rosenberg, J.: The BlueJ system and its pedagogy. Comput. Sci. Educ. 13(4), 249–268 (2003). https://doi.org/10.1076/csed.13.4.249.17496

    Article  Google Scholar 

  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). https://doi.org/10.1109/WCRE.2002.1173061

  35. Krathwohl, D.R.: A revision of Bloom’s taxonomy: an overview. Theory Pract. 41(4), 212–218 (2002). https://doi.org/10.1207/s15430421tip4104_2

  36. Kruchten, P., Nord, R.L., Ozkaya, I.: Technical debt: from metaphor to theory and practice. IEEE Softw. 29(6), 18–21 (2012). https://doi.org/10.1109/MS.2012.167

    Article  Google Scholar 

  37. Kruchten, P.B.: The 4+1 view model of architecture. IEEE Softw. 12(6), 42–50 (1995). https://doi.org/10.1109/52.469759

    Article  Google Scholar 

  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. 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). https://doi.org/10.1109/SIIE.2014.7017701

  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). https://doi.org/10.1109/SEAA.2014.65

  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. Michael, J.: Where’s the evidence that active learning works? Adv. Physiol. Educ. 30(4), 159–167 (2006)

    Article  Google Scholar 

  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). https://doi.org/10.1109/TSE.2009.50

    Article  MATH  Google Scholar 

  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). https://doi.org/10.1007/3-540-44870-5_63

    Chapter  Google Scholar 

  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). https://doi.org/10.1109/TSE.2011.41

    Article  Google Scholar 

  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). https://doi.org/10.1109/WICSA-ECSA.212.17

  47. Object Management Group: Unified Modeling Language (UML), Superstructure, Version 2.5.1, June 2017. https://www.omg.org/spec/UML/2.5.1. Accessed 7 Aug 2019

  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). https://doi.org/10.1007/3-540-45875-1_14

    Chapter  MATH  Google Scholar 

  49. Opdyke, W.F.: Refactoring object-oriented frameworks. University of Illinois at Urbana-Champaign Champaign, IL, USA (1992). https://dl.acm.org/citation.cfm?id=169783

  50. Paquette, G.: An ontology and a software framework for competency modeling and management. Educ. Technol. Soc. 10(3), 1–21 (2007). https://www.jstor.org/stable/jeductechsoci.10.3.1?seq=1

  51. Parnas, D.L.: Software aging. In: Proceedings of 16th International Conference on Software Engineering, pp. 279–287. IEEE (1994). http://portal.acm.org/citation.cfm?id=257734.257788

  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. 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). https://doi.org/10.1109/ICSM.1999.792487

  54. Roques, A.: PlantUml: UML diagram editor (2017). https://plantuml.com/. Accessed 7 Aug 2019

  55. Sandalski, M., Stoyanova-Doycheva, A., Popchev, I., Stoyanov, S.: Development of a refactoring learning environment. Cybern. Inf. Technol. (CIT) 11(2) (2011). http://www.cit.iit.bas.bg/CIT_2011/v11-2/46-64.pdf. Accessed 7 Aug 2019

  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). https://doi.org/10.1007/s10664-017-9591-4

    Article  Google Scholar 

  57. Schach, S.R.: Object-Oriented and Classical Software Engineering, vol. 6. McGraw-Hill, New York (2007)

    Google Scholar 

  58. Sims, Z., Bubinski, C.: Codecademy (2018). http://www.codecademy.com. Accessed 7 Aug 2019

  59. Sleeman, D., Brown, J.S.: Intelligent tutoring systems (1982)

    Google Scholar 

  60. Smith, S., Stoecklin, S., Serino, C.: An innovative approach to teaching refactoring. In: ACM SIGCSE Bulletin, vol. 38, pp. 349–353. ACM (2006). https://doi.org/10.1145/1121341.1121451

  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 2000

    Google Scholar 

  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). https://doi.org/10.1007/3-540-59205-9_35

    Chapter  Google Scholar 

  63. Sommerville, I., Sawyer, P.: Viewpoints: principles, problems and a practical approach to requirements engineering. Ann. Softw. Eng. 3(1), 101–130 (1997)

    Article  Google Scholar 

  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). https://doi.org/10.1145/2490822

    Article  Google Scholar 

  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). https://doi.org/10.1145/1227310.1227364

    Article  Google Scholar 

  66. Suryanarayana, G., Samarthyam, G., Sharma, T.: Refactoring for Software Design Smells: Managing Technical Debt. Morgan Kaufmann (2014). https://dl.acm.org/citation.cfm?id=2755629

  67. Tempero, E., Gorschek, T., Angelis, L.: Barriers to refactoring. Commun. ACM 60(10), 54–61 (2017). https://doi.org/10.1145/3131873

    Article  Google Scholar 

  68. Trung, N.K.: InMemoryJavaCompiler (2017). https://github.com/trung/InMemoryJavaCompiler. Accessed 7 Aug 2019

  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). https://doi.org/10.1109/CSMR.2008.4493342

  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)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Thorsten Haendler .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Haendler, T., Neumann, G., Smirnov, F. (2020). RefacTutor: An Interactive Tutoring System for Software Refactoring. In: Lane, H.C., Zvacek, S., Uhomoibhi, J. (eds) Computer Supported Education. CSEDU 2019. Communications in Computer and Information Science, vol 1220. Springer, Cham. https://doi.org/10.1007/978-3-030-58459-7_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-58459-7_12

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-58458-0

  • Online ISBN: 978-3-030-58459-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics