8 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

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

    Get PDF

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

    Get PDF

    Refactoring-based support for binary compatibility in evolving frameworks

    No full text

    Migration of Applications across Object-Oriented APIs

    Get PDF
    Software developers often encapsulate reusable code as Application Programming Interfaces (APIs). The co-evolution of applications and APIs may motivate an API migration: the replacement of application dependencies to an original API by dependencies to an alternative API that provides similar functionality and abstractions. In this dissertation, we investigate issues associated with API migration in object-oriented systems, with special focus on wrapping approaches. We present two studies and a set of developer interviews that elicit issues in the process and techniques used in API migration in practice. The results suggest that the most pressing issues relate to discovery and specification of differences between APIs, and to assessment of migration correctness. This dissertation introduces techniques and a method to address these issues. We propose the use of design patterns to support the specification of API wrappers. API wrapping design patterns encode solutions to common wrapping design problems. We present an initial catalog of such patterns that were abstracted from programming idioms found in existing API wrappers. We introduce the concept of compliance testing for API migration, a form of automated testing. Compliance testing supports the discovery of behavioral differences between a wrapper and its corresponding original API, as well as assessment of wrapper correctness. Compliance testing uses API contracts and assertion tunings to explicitly capture and enforce the notion of a “good enough” wrapper that is informal in practice. We present the Koloo method for wrapper-based API migration. The method prescribes practical steps to use compliance testing as a means to elicit the requirements for the API migration, and to assess its correctness. Koloo fits within the iterative, sample-driven general API migration process usually followed by developers in practice. We evaluate the Koloo method in an empirical study. The subjects cover the domains of XML processing, GUI programming and bytecode engineering. The results provide evidence that Koloo is superior to alternative methods in driving the development of a wrapper that is tailored for the application under migration. The results also show that API contracts help driving the evolution of the wrapper, and assertion tuning is necessary to relax the semantics of strict equality contracts, and useful to compromise on features that are difficult to emulate perfectly. Finally, we validate that the proposed design patterns are used in practical wrappers

    Declaration patterns in dependency management : a thesis presented in partial fulfilment of the requirements for the degree of Master of Science in Computer Science at Massey University, Manawatū, New Zealand

    Get PDF
    Dependency management has become an important topic within the field of software engineering, where large-scale projects use an increasing number of dependencies to quickly integrate advanced functionality into projects. To take advantage of agile principles - with their fast release cycles - it has become common to delegate the task of dependency management to package managers, whose responsibilities it is to find and download a specified version of the dependency at build time. The principles of Semantic Versioning allow developers to specify version declarations that allow package managers to choose from not just one, but a range of versions, giving rise to the automatic updating of dependencies - a convenient but potentially risky option due to backwards incompatibility issues in some updates. In this thesis, we examine the types of declarations used and their effects on software quality. We find a large variation in practices between software ecosystems, with some opting for conservative, fixed declaration styles, others that prefer Semantic Versioning style ranges, and a few that use higher risk open range styles. We then delve into the consequences of these declaration choices by considering how they affect technical lag, a software quality indicator, finding that declaration styles can have a significant effect on lag. In order to avoid technical lag, in all but the most extreme cases (using open ranges), it is necessary to update declarations periodically. In the case of fixed declarations, updates must be made with every change to the dependency - an ongoing challenge and time outlay for developers. We considered this case to find how regularly developers that use fixed declarations update lagging declarations, finding that developers rarely keep up with changes. The datasets used for these works consisted of large-scale, open-source projects. A developer survey has also been included to contextualise the quantitative results, allowing insight into the intentions of developers who make these declaration choices, and to gain insight on how applicable these findings might be to closed-source projects

    Automatische Kompatibilitätsprüfung Framework-basierter Anwendungen

    Get PDF
    Software-Frameworks als erweiterbare Software-Architekturbausteine bieten besondere Vorteile. Sie erlauben sowohl die Wiederverwendung der Funktionalität als auch der durch das Framework vorgegebenen Software-Architektur. Beispiele sind Frameworks für Benutzungsoberflächen oder für die Anbindung von Datenbanken. Durch Implementierung anwendungsspezifischer Erweiterungen wird ein Framework für den konkreten Anwendungsfall angepasst. Eine Anwendung, deren Software-Architektur ein Framework einsetzt, benutzt das Framework über dessen Erweiterungspunkte.Im Laufe der Evolution einer solchen Anwendung entsteht häufig die Situation, dass das Framework durch eine neuere Version aktualisiert werden soll. Die Aktualisierung enthält das Risiko, dass Inkompatibilitäten zwischen bestehender Anwendung und neuer Framework-Version auftreten, die wiederum zu aufwendigen Anpassungen führen. Daher müssen mögliche Inkompatibilitäten vor der Aktualisierung erkannt und bewertet werden. Nach aktuellem Stand der Technik ist dies nicht möglich, so dass es in der industriellen Praxis zu unvorhergesehenen Problemen verbunden mit hohen Kosten kommt.Wir stellen ein Verfahren zur automatischen Kompatibilitätsanalyse Framework-basierter Anwendungen vor, mit dem das beschriebene Problem gelöst wird. Durch eine Kombination aus Codeanalyse und neuartiger Framework-Beschreibung lassen sich mögliche Inkompatibilitäten vor Durchführung der Aktualisierung automatisch berechnen. Eine prototypische Implementierung des Verfahrens im Werkzeug »Companian« demonstriert die praktische Einsetzbarkeit unseres Verfahrens.Software frameworks as extensible building blocks have several advantages. They admit to reuse the framework's functionality and its software architecture. Examples are user interface or database connectivity frameworks. A framework is customized by implementing application specific extensions. An application uses a framework through its extension points.During the evolution of such an application the situation arises where the framework has to be updated to a newer version. An update contains the risk of incompatibilities between the existing application and the new framework version. This may result in high efforts for required adjustments. Thus, possible incompatibilities have to be recognized and evaluated before an update is performed. This is not possible in accordance with the current state-of-the-art and results in unforeseen problems accompanied by high consequential costs.We propose a process for an automatic compatibility analysis of framework-based applications that solves the problem. Combining code analysis and a novel framework description our process detects possible incompatibilities before an update is performed. A prototypical implementation in the »Companian« tool demonstrates the practical feasibility of our process.Tag der Verteidigung: 20.12.2012Paderborn, Univ., Diss., 201

    A Refactoring-Based Approach to Support Binary Backward-Compatible Framework Upgrades

    Get PDF
    Evolutionary changes applied to a framework API may invalidate existing framework-based applications. While manually adapting applications is expensive and error-prone, automatic adaptation demands cumbersome specifications, which the developers are reluctant to write and maintain. Considering structural changes (so-called refactorings) of framework APIs, our adaptation technology supports backward-compatible framework upgrade. The technology is rigorous defining precisely the structure and automatic derivation of compensating adapters. It is also practical compensating for most application-breaking API changes automatically, while requiring neither manual adaptation nor recompilation of existing application code
    corecore