1,032 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

    An Approach to Invariant-based Program Refactoring

    Get PDF
    Refactoring tools include checking of an object-oriented program for the fulfillment of preconditions, for ensuring correctness. However, program invariants â semantic information about classes and fields assumed valid during program execution â are not considered by this precondition checking. As a result, applicability of automated refactorings is constrained in these cases, as refactorings that would be applicable considering the invariants get rejected, usually requiring manual changes. In this paper, we describe initial work on the use of program invariants (declared as code annotations) to increase applicability of automated refactoring. We propose an approach that uses primitive program transformations that employ the invariant to make the program syntactically amenable to the desired refactoring, before applying the refactoring itself

    17th Edition of ECOOP Doctoral Symposium and PhD Workshop : Proceedings

    Get PDF

    Realizing Change-Driven Consistency for Component Code, Architectural Models, and Contracts in Vitruvius

    Get PDF
    During the development of component-based software systems, it is often impractical or even impossible to include all development information into the source code. Instead, specialized languages are used to describe components and systems on different levels of abstraction or from different viewpoints: Component-based architecture models and contracts, for example, can be used to describe the system on a high level of abstraction, and to formally specify component constraints. Since models, contracts, and code contain redundant information, inconsistencies can occur if they are modified independently. Keeping this information consistent manually can require considerable effort, and can lead to costly errors, for example, when security-relevant components are verified against inconsistent contracts. In this technical report, we present details on realizing an approach for keeping component-based architecture models and contracts specified in the Java Modeling Language (JML) consistent with Java source code. We use change-driven incremental transformations and the Vitruvius framework to automate the consistency preservation where this is possible. Using two case studies, we demonstrate how to detect and propagate changes and refactoring operations to keep models and contracts consistent with the source code

    Applying MDE tools to defining domain specific languages for model management

    Get PDF
    In the model driven engineering (MDE), modeling languages play a central role. They range from the most generic languages such as UML, to more individual ones, called domain-specific modeling languages (DSML). These languages are used to create and manage models and must accompany them throughout their life cycle and evolution. In this paper we propose a domain-specific language for model management, to facilitate the user's task, developed with techniques and tools used in the MDE paradigm.Fil: Pérez, Gabriela. Universidad Nacional de la Plata. Facultad de Informática. Laboratorio de Investigación y Formación en Informática Avanzada; ArgentinaFil: Irazábal, Jerónimo. Universidad Nacional de la Plata. Facultad de Informática. Laboratorio de Investigación y Formación en Informática Avanzada; Argentina. Consejo Nacional de Investigaciones Científicas y Técnicas; ArgentinaFil: Pons, Claudia Fabiana. Universidad Nacional de la Plata. Facultad de Informática. Laboratorio de Investigación y Formación en Informática Avanzada; Argentina. Provincia de Buenos Aires. Gobernación. Comisión de Investigaciones Científicas; ArgentinaFil: Giandini, Roxana Silvia. Universidad Nacional de la Plata. Facultad de Informática. Laboratorio de Investigación y Formación en Informática Avanzada; Argentin
    • …
    corecore