33 research outputs found

    Detecting modularity "smells" in dependencies injected with Java annotations

    Get PDF
    Dependency injection is a recent programming mechanism reducing dependencies among components by delegating them to an external entity, called a dependency injection framework. An increasingly popular approach to dependency injection implementation relies upon using Java annotations, a special form of syntactic metadata provided by the dependency injection frameworks. However, uncontrolled use of annotations may lead to potential violations of well-known modularity principles. In this paper we catalogue "bad smells", i.e., modularity-violating annotations defined by the developer or originating from the popular dependency injection frameworks. For each violation we discuss potential implications and propose means of resolving it. By detecting modularity bad smells in Java annotations our approach closes the gap between the state-of-the-art programming practice and currently available analysis techniques

    Identification Of JavaScript Function Constructor Using Static Source Code Analysis

    Get PDF
    Software maintenance and comprehension constitute a considerable portion of the required effort for software development, and thus, myriad number of studies have proposed approaches for improving maintainability of software systems. However, the majority of these studies have examined software systems written in traditional programming languages, such as Java and C++. While the ubiquity of web has resulted to JavaScript to be extensively adopted by developers, studies that investigate maintainability issues in JavaScript are scarce. Prior to the recent updates on the JavaScript language specifications, developers had to use custom solutions to emulate classes, modules, and namespaces in JavaScript programs; consequently, detecting classes in JavaScript programs is non-trivial due to the flexibility of JavaScript’s syntax. To improve the maintenance and comprehension of JavaScript programs, we design and implement JSDeodorant, an automatic approach for detecting Function Constructors (i.e., the emulation of Object-Oriented classes) in JavaScript programs. These function constructors can be declared locally, under a namespace, or in other modules. The comparison with the state-of-the-art tool, JSClassFinder, shows that, while the precision of the tools are very similar (97% and 98%, respectively for JSDeodorant and JSClassFinder), the recall of JSDeodorant (98%) is much higher than JSClassFinder (61%). Finally, we conduct an empirical study to compare the extent to which JavaScript programs in different domains (websites, server-side programs written in NodeJS, and libraries) adopt Object-Oriented classes. Our study shows that classes are more frequent in websites than NodeJS programs. Also, NodeJS projects have fewer classes compared to libraries

    Closing the gap between guidance and practice, an investigation of the relevance of design guidance to practitioners using object-oriented technologies

    Get PDF
    This thesis investigates if object oriented guidance is relevant in practice, and how this affects software that is produced. This is achieved by surveying practitioners and studying how constructs such as interfaces and inheritance are used in open-source systems. Surveyed practitioners framed 'good design' in terms of impact on development and maintenance. Recognition of quality requires practitioner judgement (individually and as a group), and principles are valued over rules. Time constraints heighten sensitivity to the rework cost of poor design decisions. Examination of open source systems highlights the use of interface and inheritance. There is some evidence of 'textbook' use of these structures, and much use is simple. Outliers are widespread indicating a pragmatic approach. Design is found to reflect the pressures of practice - high-level decisions justify 'designed' structures and architecture, while uncertainty leads to deferred design decisions - simpler structures, repetition, and unconsolidated design. Sub-populations of structures can be identified which may represent common trade-offs. Useful insights are gained into practitioner attitude to design guidance. Patterns of use and structure are identified which may aid in assessment and comprehension of object oriented systems.This thesis investigates if object oriented guidance is relevant in practice, and how this affects software that is produced. This is achieved by surveying practitioners and studying how constructs such as interfaces and inheritance are used in open-source systems. Surveyed practitioners framed 'good design' in terms of impact on development and maintenance. Recognition of quality requires practitioner judgement (individually and as a group), and principles are valued over rules. Time constraints heighten sensitivity to the rework cost of poor design decisions. Examination of open source systems highlights the use of interface and inheritance. There is some evidence of 'textbook' use of these structures, and much use is simple. Outliers are widespread indicating a pragmatic approach. Design is found to reflect the pressures of practice - high-level decisions justify 'designed' structures and architecture, while uncertainty leads to deferred design decisions - simpler structures, repetition, and unconsolidated design. Sub-populations of structures can be identified which may represent common trade-offs. Useful insights are gained into practitioner attitude to design guidance. Patterns of use and structure are identified which may aid in assessment and comprehension of object oriented systems

    Model Transformation Languages with Modular Information Hiding

    Get PDF
    Model transformations, together with models, form the principal artifacts in model-driven software development. Industrial practitioners report that transformations on larger models quickly get sufficiently large and complex themselves. To alleviate entailed maintenance efforts, this thesis presents a modularity concept with explicit interfaces, complemented by software visualization and clustering techniques. All three approaches are tailored to the specific needs of the transformation domain

    EMPIRICAL ASSESSMENT OF THE IMPACT OF USING AUTOMATIC STATIC ANALYSIS ON CODE QUALITY

    Get PDF
    Automatic static analysis (ASA) tools analyze the source or compiled code looking for violations of recommended programming practices (called issues) that might cause faults or might degrade some dimensions of software quality. Antonio Vetro' has focused his PhD in studying how applying ASA impacts software quality, taking as reference point the different quality dimensions specified by the standard ISO/IEC 25010. The epistemological approach he used is that one of empirical software engineering. During his three years PhD, he's been conducting experiments and case studies on three main areas: Functionality/Reliability, Performance and Maintainability. He empirically proved that specific ASA issues had impact on these quality characteristics in the contexts under study: thus, removing them from the code resulted in a quality improvement. Vetro' has also investigated and proposed new research directions for this field: using ASA to improve software energy efficiency and to detect the problems deriving from the interaction of multiple languages. The contribution is enriched with the final recommendation of a generalized process for researchers and practitioners with a twofold goal: improve software quality through ASA and create a body of knowledge on the impact of using ASA on specific software quality dimensions, based on empirical evidence. This thesis represents a first step towards this goa

    Model Transformation Languages with Modular Information Hiding

    Get PDF
    Model transformations, together with models, form the principal artifacts in model-driven software development. Industrial practitioners report that transformations on larger models quickly get sufficiently large and complex themselves. To alleviate entailed maintenance efforts, this thesis presents a modularity concept with explicit interfaces, complemented by software visualization and clustering techniques. All three approaches are tailored to the specific needs of the transformation domain

    Empirical studies of structural phenomena using a curated corpus of Java code

    Full text link
    Contrary to 50 years\u27 worth of advice in the instructional literature on software design, long cyclic dependencies are found to be widespread in sizeable, curated corpus of real Java software. Among their causes may be overuse of static members, underuse of dependency injection and poor tool support for avoiding them.<br /

    Creating a Metric to Measure Software Flexibility in Object-Oriented Programming

    Get PDF
    Business requirements inevitably change over time due to market shifts, law changes, new product launches or any number of other factors. The software being used by these businesses therefore also has to be adapted to meet the new requirements. How software is built has an impact on how easily and quickly the software can be changed to meet these new requirements. This thesis firstly identifies programming practices which make software difficult to adapt. To establish that these practices are genuinely considered "bad practice" a metric was created for grading the academic rigour of articles discussing a programming practice and this metric was used to perform meta-analyses of each practice identified, this meta-analysis methodology is based loosely on the methodology used for performing meta-analyses of clinical trials. The results of these meta-analyses demonstrated that the identified practices were widely considered bad practice by developers. Another metric was created to grade source code based on the frequency these bad practices appear in the code and give an overview of how flexible the code is. The aim of this metric is to facilitate learning for junior programmers while allowing more experienced programmers to evaluate the flexibility of software. A software tool was launched to enable users to evaluate and test the metric which was created. The metric was evaluated by comparison to alternative metrics and through user feedback
    corecore