5 research outputs found

    A heuristic-based approach to code-smell detection

    Get PDF
    Encapsulation and data hiding are central tenets of the object oriented paradigm. Deciding what data and behaviour to form into a class and where to draw the line between its public and private details can make the difference between a class that is an understandable, flexible and reusable abstraction and one which is not. This decision is a difficult one and may easily result in poor encapsulation which can then have serious implications for a number of system qualities. It is often hard to identify such encapsulation problems within large software systems until they cause a maintenance problem (which is usually too late) and attempting to perform such analysis manually can also be tedious and error prone. Two of the common encapsulation problems that can arise as a consequence of this decomposition process are data classes and god classes. Typically, these two problems occur together – data classes are lacking in functionality that has typically been sucked into an over-complicated and domineering god class. This paper describes the architecture of a tool which automatically detects data and god classes that has been developed as a plug-in for the Eclipse IDE. The technique has been evaluated in a controlled study on two large open source systems which compare the tool results to similar work by Marinescu, who employs a metrics-based approach to detecting such features. The study provides some valuable insights into the strengths and weaknesses of the two approache

    Synchronizing Refactored UML Class Diagrams and OCL Constraints

    No full text
    UML class diagrams are usually annotated with OCL expressions that constrain their possible instantiation. In our work we have investigated how OCL annotations can be automatically updated each time the underlying diagram is refactored. All our refactoring rules are formally specified using a QVT-based graphical formalism and have been implemented in our tool ROCLET

    1st Workshop on Refactoring Tools (WRT'07) : Proceedings

    Get PDF

    Model refactoring using transformations

    Get PDF
    Modern software is reaching levels of complexity encountered in biological systems; sometimes comprising systems of systems each of which may include tens of millions of lines of code. Model Driven Engineering (MDE) advocates raising the level of abstraction as an instrument to deal with software complexity. It promotes usage of software models as primary artifacts in a software development process. Traditionally, these MDE models are specified by Unified Modeling Language (UML) or by a modeling language created for a specific domain. However, in the vast area of software engineering there are other techniques used to improve quality of software under development. One of such techniques is refactoring which represents introducing structured changes in software in order to improve its readability, extensibility, and maintainability, while preserving behavior of the software. The main application area for refactorings is still programming code, despite the fact that modeling languages and techniques has significantly gained in popularity, in recent years. The main topic of this thesis is making an alliance between the two virtually orthogonal techniques: software modeling and refactoring. In this thesis we have investigated how to raise the level of abstraction of programming code refactorings to the modeling level. This resulted in a catalog of model refactorings each specified as a model transformation rule. In addition, we have investigated synchronization problems between different models used to describe one software system, i.e. when one model is refactored what is the impact on all dependent models and how this impact can be formalized. We have concentrated on UML class diagrams as domain of refactorings. As models dependent on class diagrams, we have selected Object Constraint Language (OCL) annotations, and object diagrams. This thesis formalizes the most important refactoring rules for UML class diagrams and classifies them with respect to their impact on object diagrams and annotated OCL constraints. For refactoring rules that have an impact on dependent artifacts we formalize the necessary changes of these artifacts. Moreover, in this thesis, we present a simple criterion and a proof technique for the semantic preservation of refactoring rules that are defined for UML class and object diagrams, and OCL constraints. In order to be able to prove semantic preservation, we propose a model transformation approach to specify the semantics of constraint languages

    Formalización de refactorings en el contexto de MDA

    Get PDF
    El objetivo principal de esta tesis es presentar una técnica de especificación de refactorings alineados con MDA aplicables a sus diferentes tipos de modelos de diseño UML, es decir, a modelos independientes de la computación, modelos dependientes de una plataforma y modelos dependientes de la implementación. En particular, en este trabajo, se muestra la técnica de especificación de refactorings aplicados a modelos de diagramas de clases UML enriquecidos con anotaciones OCL en los distintos niveles de abstracción. Los refactorings se especifican como contratos OCL utilizando la técnica de metamodelado. Los metamodelos son expresados usando Meta Object Facility (MOF). Asimismo, en esta tesis, se analiza la integración de la especificación de los refactorings con técnicas formales. Se detalla la traducción de los contratos OCL de refactorings y los metamodelos MOF al lenguaje de especificación formal NEREUS.Facultad de Informátic
    corecore