arXiv.itsnick.co

an independent field guide to 23 million papers from arXiv & OpenAlex — not affiliated with arXiv.org

Computer Science · Information Systems

Code Context Based Generation of Refactoring Guidance

Beer, Patrick De

· Figshare

See on the map

Abstract

Code quality is important when developing software. Therefore, we recommend to teach students practices that improve code quality. An example of such a practice is code refactoring. Mastering this practice is not easy. In practice, the specific knowledge is often acquired from peer experts. The availability of automatic tutoring systems that could help acquiring knowledge in the domain of code refactoring is limited. This study aims at finding an answer how we can automatically generate refactoring guidance based on code context, where the provided code is arbitrary. This study presents a theoretical answer to this question by presenting a model and algorithm. The presented theory is evaluated by a software prototype that takes two concrete models. These models hold knowledge on two refactorings: <i>rename method </i>and <i>extract method</i> as originally described by Fowler. The prototype is used to generate refactoring guidance out of predefined java code in different code contexts. These generated results have been evaluated small-scale with third years undergraduate software engineering students. The models that hold the selected refactorings are limited, but students rate the presented concept and generated results positively. <br>

More like this