Model-Driven Java Code Refactoring

Sohaib Hamioud1 and Fadila Atil2

  1. Complex System Engineering Laboratory (LISCO), Department of Computer Science
    Badji Mokhtar University, POB 12, 23000 Annaba, Algeria
    hamioud_sohaib@yahoo.com
  2. Complex System Engineering Laboratory (LISCO), Department of Computer Science
    Badji Mokhtar University, POB 12, 23000 Annaba, Algeria
    atil_fadila@yahoo.fr

Abstract

Refactoring is an important technique for restructuring code to improve its design and increase programmer productivity and code reuse. Performing refactorings manually, however, is tedious, time consuming and error-prone. Thus, providing an automated support for them is necessary. Unfortunately even in our days, such automation is still not easily achieved and requires formal specifications of the refactoring process. Moreover, extensibility and tool develo-pment automation are factors that should be taken into consideration when design-ing and implementing automated refactorings. In this paper, we introduce a model-driven approach where refactoring features, such as code representation, analysis and transformation adopt models as first-class artifacts. We aim at exploring the value of model transformation and code generation when formaliz-ing refactorings and developing tool support. The presented approach is applied to the refactoring of Java code using a prototypical implementation based on the Eclipse Modeling Framework, a language workbench, a Java metamodel and a set of OMG standards.

Key words

code refactoring, metamodeling, model-driven engineering

Digital Object Identifier (DOI)

https://doi.org/10.2298/CSIS141025015H

Publication information

Volume 12, Issue 2 (June 2015)
Year of Publication: 2015
ISSN: 2406-1018 (Online)
Publisher: ComSIS Consortium

Full text

DownloadAvailable in PDF
Portable Document Format

How to cite

Hamioud, S., Atil, F.: Model-Driven Java Code Refactoring. Computer Science and Information Systems, Vol. 12, No. 2, 375-403. (2015), https://doi.org/10.2298/CSIS141025015H