8 research outputs found

    Viewpoint Co-evolution through Coarse-Grained Changes and Coupled Transformations

    No full text
    Abstract. Multi-viewpoint modeling is an effective technique to deal with the ever-growing complexity of large-scale systems. The evolution of multi-viewpoint system specifications is currently accomplished in terms of fine-grained atomic changes. Apart from being a very low-level and cumbersome strategy, it is also quite unnatural to system modelers, who think of model evolution in terms of coarse-grained high-level changes. In order to bridge this gap, we propose an approach to formally express and manipulate viewpoint changes in a high-level fashion, by structuring atomic changes into coarse-grained composite ones. These can also be used to formally define reconciling operations to adapt dependent views, using coupled transformations. We introduce a modeling language based on graph transformations and Maude for expressing both, the coarse-grained changes and the coupled transformations that propagate them to reestablish global consistency. We demonstrate the applicability of the approach by its application in the context of RM-ODP.

    Handling High-Level Model Changes Using Search Based Software Engineering

    Full text link
    Model-Driven Engineering (MDE) considers models as first-class artifacts during the software lifecycle. The number of available tools, techniques, and approaches for MDE is increasing as its use gains traction in driving quality, and controlling cost in evolution of large software systems. Software models, defined as code abstractions, are iteratively refined, restructured, and evolved. This is due to many reasons such as fixing defects in design, reflecting changes in requirements, and modifying a design to enhance existing features. In this work, we focus on four main problems related to the evolution of software models: 1) the detection of applied model changes, 2) merging parallel evolved models, 3) detection of design defects in merged model, and 4) the recommendation of new changes to fix defects in software models. Regarding the first contribution, a-posteriori multi-objective change detection approach has been proposed for evolved models. The changes are expressed in terms of atomic and composite refactoring operations. The majority of existing approaches detects atomic changes but do not adequately address composite changes which mask atomic operations in intermediate models. For the second contribution, several approaches exist to construct a merged model by incorporating all non-conflicting operations of evolved models. Conflicts arise when the application of one operation disables the applicability of another one. The essence of the problem is to identify and prioritize conflicting operations based on importance and context – a gap in existing approaches. This work proposes a multi-objective formulation of model merging that aims to maximize the number of successfully applied merged operations. For the third and fourth contributions, the majority of existing works focuses on refactoring at source code level, and does not exploit the benefits of software design optimization at model level. However, refactoring at model level is inherently more challenging due to difficulty in assessing the potential impact on structural and behavioral features of the software system. This requires analysis of class and activity diagrams to appraise the overall system quality, feasibility, and inter-diagram consistency. This work focuses on designing, implementing, and evaluating a multi-objective refactoring framework for detection and fixing of design defects in software models.Ph.D.Information Systems Engineering, College of Engineering and Computer ScienceUniversity of Michigan-Dearbornhttp://deepblue.lib.umich.edu/bitstream/2027.42/136077/1/Usman Mansoor Final.pdfDescription of Usman Mansoor Final.pdf : Dissertatio

    Specification Languages for Preserving Consistency between Models of Different Languages

    Get PDF
    In dieser Dissertation stellen wir drei Sprachen für die Entwicklung von Werkzeugen vor, welche Systemrepräsentationen während der Softwareentwicklung konsistent halten. Bei der Entwicklung komplexer informationstechnischer Systeme ist es üblich, mehrere Programmiersprachen und Modellierungssprachen zu nutzen. Dabei werden Teile des Systems mit unterschiedlichen Sprachen konstruiert und dargestellt, um verschiedene Entwurfs- und Entwicklungstätigkeiten zu unterstützen. Die übergreifende Struktur eines Systems wird beispielsweise oft mit Hilfe einer Architekturbeschreibungssprache dargestellt. Für die Spezifikation des detaillierten Verhaltens einzelner Systemteile ist hingegen eine zustandsbasierte Modellierungssprache oder eine Allzweckprogrammiersprache geeigneter. Da die Systemteile und Entwicklungstätigkeiten in Beziehung zueinander stehen, enthalten diese Repräsentationen oftmals auch redundante Informationen. Solche partiell redundanten Repräsentationen werden meist nicht statisch genutzt, sondern evolvieren während der Systementwicklung, was zu Inkonsistenzen und damit zu fehlerhaften Entwürfen und Implementierungen führen kann. Daher sind konsistente Systemrepräsentationen entscheidend für die Entwicklung solcher Systeme. Es gibt verschiedene Ansätze, die konsistente Systemrepräsentationen dadurch erreichen, dass Inkonsistenzen vermieden werden. So ist es beispielsweise möglich, eine zentrale, redundanzfreie Repräsentation zu erstellen, welche alle Informationen enthält, um alle anderen Repräsentationen daraus projizieren zu können. Es ist jedoch nicht immer praktikabel solch eine redundanzfreie Repräsentation und editierbare Projektionen zu erstellen, insbesondere wenn existierende Sprachen und Editoren unterstützt werden müssen. Eine weitere Möglichkeit zur Umgehung von Inkonsistenzen besteht darin Änderungen einzelner Informationen nur an einer eindeutigen Quellrepräsentation zuzulassen, sodass alle anderen Repräsentationen diese Information nur lesen können. Dadurch können solche Informationen in allen lesend zugreifenden Repräsentationen immer überschrieben werden, jedoch müssen dazu alle editierbaren Repräsentationsbereiche komplett voneinander getrennt werden. Falls inkonsistente Repräsentationen während der Systementwicklung nicht völlig vermieden werden können, müssen Entwickler oder Werkzeuge aktiv die Konsistenz erhalten, wenn Repräsentationen modifiziert werden. Die manuelle Konsistenthaltung ist jedoch eine zeitaufwändige und fehleranfällige Tätigkeit. Daher werden in Forschungseinrichtungen und in der Industrie Konsistenthaltungswerkzeuge entwickelt, die teilautomatisiert Modelle während der Systementwicklung aktualisieren. Solche speziellen Software-Entwicklungswerkzeuge können mit Allzweckprogrammiersprachen und mit dedizierten Konsistenthaltungssprachen entwickelt werden. In dieser Dissertation haben wir vier bedeutende Herausforderungen identifiziert, die momentan nur unzureichend von Sprachen zur Entwicklung von Konsistenthaltungswerkzeugen adressiert werden. Erstens kombinieren diese Sprachen spezifische Unterstützung zur Konsistenthaltung nicht mit der Ausdrucksmächtigkeit und Flexibilität etablierter Allzweckprogrammiersprachen. Daher sind Entwickler entweder auf ausgewiesene Anwendungsfälle beschränkt, oder sie müssen wiederholt Lösungen für generische Konsistenthaltungsprobleme entwickeln. Zweitens unterstützen diese Sprachen entweder lösungs- oder problemorientierte Programmierparadigmen, sodass Entwickler gezwungen sind, Erhaltungsinstruktionen auch in Fällen anzugeben, in denen Konsistenzdeklarationen ausreichend wären. Drittens abstrahieren diese Sprachen nicht von genügend Konsistenthaltungsdetails, wodurch Entwickler explizit beispielsweise Erhaltungsrichtungen, Änderungstypen oder Übereinstimmungsprobleme berücksichtigen müssen. Viertens führen diese Sprachen zu Erhaltungsverhalten, das oft vom konkreten Anwendungsfall losgelöst zu sein scheint, wenn Interpreter und Übersetzer Code ausführen oder erzeugen, der zur Realisierung einer spezifischen Konsistenzspezifikation nicht benötigt wird. Um diese Probleme aktueller Ansätze zu adressieren, leistet diese Dissertation die folgenden Beiträge: Erstens stellen wir eine Sammlung und Klassifizierung von Herausforderungen der Konsistenthaltung vor. Dabei diskutieren wir beispielsweise, welche Herausforderungen nicht bereits adressiert werden sollten, wenn Konsistenz spezifiziert wird, sondern erst wenn sie durchgesetzt wird. Zweitens führen wir einen Ansatz zur Erhaltung von Konsistenz gemäß abstrakter Spezifikationen ein und formalisieren ihn mengentheoretisch. Diese Formalisierung ist unabhängig davon wie Konsistenzdurchsetzungen letztendlich realisiert werden. Mit dem vorgestellten Ansatz wird Konsistenz immer anhand von beobachteten Editieroperationen bewahrt, um bekannte Probleme zur Berechnung von Übereinstimmungen und Differenzen zu vermeiden. Schließlich stellen wir drei neue Sprachen zur Entwicklung von Werkzeugen vor, die den vorgestellten, spezifikationsgeleiteten Ansatz verfolgen und welche wir im Folgenden kurz erläutern. Wir präsentieren eine imperative Sprache, die verwendet werden kann, um präzise zu spezifizieren, wie Modelle in Reaktion auf spezifische Änderungen aktualisiert werden müssen, um Konsistenz in eine Richtung zu erhalten. Diese Reaktionssprache stellt Lösungen für häufige Probleme bereit, wie beispielsweise die Identifizierung und das Abrufen geänderter oder korrespondierender Modellelemente. Außerdem erreicht sie eine uneingeschränkte Ausdrucksmächtigkeit, indem sie Entwicklern ermöglicht, auf eine Allzweckprogrammiersprache zurückzugreifen. Eine zweite, bidirektionale Sprache für abstrakte Abbildungen kann für Fälle verwendet werden, in denen verschiedene Änderungsoperationen nicht unterschieden werden müssen und außerdem die Erhaltungsrichtung nicht immer eine Rolle spielt. Mit dieser Abbildungssprache können Entwickler Bedingungen deklarieren, die ausdrücken, wann Modellelemente als konsistent zueinander angesehen werden sollen, ohne sich um Details der Überprüfung oder Durchsetzung von Konsistenz bemühen zu müssen. Dazu leitet der Übersetzer automatisch Durchsetzungscode aus Überprüfungen ab und bidirektionalisiert Bedingungen, die für eine Richtung der Konsistenthaltung spezifiziert wurden. Diese Bidirektionalisierung basiert auf einer erweiterbaren Menge von komponierbaren, operatorspezifischen Invertierern, die verbreitete Round-trip-Anforderungen erfüllen. Infolgedessen können Entwickler häufig vorkommende Konsistenzanforderungen konzise ausdrücken und müssen keinen Quelltext für verschiedene Konsistenthaltungsrichtungen, Änderungstypen oder Eigenschaften von Modellelementen wiederholen. Eine dritte, normative Sprache kann verwendet werden, um die vorherigen Sprachen mit parametrisierbaren Konsistenzinvarianten zu ergänzen. Diese Invariantensprache übernimmt Operatoren und Iteratoren für Elementsammlungen von der Object Constraint Language (OCL). Außerdem nimmt sie Entwicklern das Schreiben von Quelltext zur Suche nach invariantenverletzenden Elementen ab, da Abfragen, welche diese Aufgaben übernehmen, automatisch anhand von Invariantenparametern abgeleitet werden. Die drei Sprachen können in Kombination und einzeln verwendet werden. Sie ermöglichen es Entwicklern, Konsistenz unter Verwendung verschiedener Programmierparadigmen und Sprachabstraktionen zu spezifizieren. Wir stellen auch prototypische Übersetzer und Editoren für die drei Konsistenzspezifikationssprachen vor, welche auf dem Vitruvius-Rahmenwerk für Multi-Sichten-Modellierung basieren. Mit diesem Rahmenwerk werden Änderungen in textuellen und graphischen Editoren automatisch beobachtet, um Reaktionen auszulösen, Abbildungen durchzusetzen und Invarianten zu überprüfen. Dies geschieht indem der von unseren Übersetzern erzeugte Java-Code ausgeführt wird. Außerdem haben wir für alle Sprachen, die in dieser Dissertation vorgestellt werden, folgende theoretischen und praktischen Eigenschaften evaluiert: Vollständigkeit, Korrektheit, Anwendbarkeit, und Nutzen. So zeigen wir, dass die Sprachen ihre vorgesehenen Einsatzbereiche vollständig abdecken und analysieren ihre Berechnungsvollständigkeit. Außerdem diskutieren wir die Korrektheit jeder einzelnen Sprache sowie die Korrektheit einzelner Sprachmerkmale. Die operatorspezifischen Invertierer, die wir zur Bidirektionalisierung von Abbildungsbedingungen entwickelt haben, erfüllen beispielsweise immer das neu eingeführte Konzept bestmöglich erzogener Round-trips. Dieses basiert auf dem bewährten Konzept wohlerzogener Transformationen und garantiert, dass übliche Round-trip-Gesetze erfüllt werden, wann immer dies möglich ist. Wir veranschaulichen die praktische Anwendbarkeit mit Fallstudien, in denen Konsistenz erfolgreich mit Hilfe von Werkzeugen erhalten wurde, die in den von uns vorgestellten Sprachen geschrieben wurden. Zum Schluss diskutieren wir den potenziellen Nutzen unserer Sprachen und vergleichen beispielsweise Konsistenthaltungswerkzeuge die in zwei Fallstudien realisiert wurden. Die Werkzeuge, die mit der Reaktionssprache entwickelt wurden, benötigen zwischen 33% und 71% weniger Zeilen Quelltext als funktional gleichwertige Werkzeuge, die mit in Java oder dem Java-Dialekt Xtend entwickelt wurden

    Software Design Change Artifacts Generation through Software Architectural Change Detection and Categorisation

    Get PDF
    Software is solely designed, implemented, tested, and inspected by expert people, unlike other engineering projects where they are mostly implemented by workers (non-experts) after designing by engineers. Researchers and practitioners have linked software bugs, security holes, problematic integration of changes, complex-to-understand codebase, unwarranted mental pressure, and so on in software development and maintenance to inconsistent and complex design and a lack of ways to easily understand what is going on and what to plan in a software system. The unavailability of proper information and insights needed by the development teams to make good decisions makes these challenges worse. Therefore, software design documents and other insightful information extraction are essential to reduce the above mentioned anomalies. Moreover, architectural design artifacts extraction is required to create the developer’s profile to be available to the market for many crucial scenarios. To that end, architectural change detection, categorization, and change description generation are crucial because they are the primary artifacts to trace other software artifacts. However, it is not feasible for humans to analyze all the changes for a single release for detecting change and impact because it is time-consuming, laborious, costly, and inconsistent. In this thesis, we conduct six studies considering the mentioned challenges to automate the architectural change information extraction and document generation that could potentially assist the development and maintenance teams. In particular, (1) we detect architectural changes using lightweight techniques leveraging textual and codebase properties, (2) categorize them considering intelligent perspectives, and (3) generate design change documents by exploiting precise contexts of components’ relations and change purposes which were previously unexplored. Our experiment using 4000+ architectural change samples and 200+ design change documents suggests that our proposed approaches are promising in accuracy and scalability to deploy frequently. Our proposed change detection approach can detect up to 100% of the architectural change instances (and is very scalable). On the other hand, our proposed change classifier’s F1 score is 70%, which is promising given the challenges. Finally, our proposed system can produce descriptive design change artifacts with 75% significance. Since most of our studies are foundational, our approaches and prepared datasets can be used as baselines for advancing research in design change information extraction and documentation

    Designing a Change-Driven Language for Model Consistency Repair Routines

    Get PDF
    Ein Software-System kann während der Entwicklung durch verschiedene Modelle beschrieben werden, um unterschiedliche Teile oder Abstraktionen des Systems darzustellen. Diese Modelle können voneinander abhängige oder sogar redundante Informationen enthalten. Wenn ein Softwareentwickler an solchen Modellen Änderungen vornimmt ohne diese Abhängigkeiten zu beachten, können die Modelle inkonsistent werden. Ein Entwickler ist kaum in der Lage einen Überblick über alle Modelle eines Entwicklungsprozesses und deren Abhängigkeiten zu behalten. Daher sind automatisierte Verfahren zur Wiederherstellung von Konsistenz nach Modelländerungen notwendig. Existierende Methoden erlauben die deklarative Spezifikation von Abhängigkeiten zwischen Modellen, aus denen automatisiert Mechanismen zur Konsistenzerhaltung abgeleitet werden. Diese Ansätze sind in ihrer Ausdrucksmächtigkeit beschränkt und bieten nur eingeschränkten Einfluss auf die Art und Weise in der Konsistenz wiederhergestellt wird. Sie legen automatisiert eine Art der Wiederherstellung der Konsistenz fest, obwohl es verschiedene Möglichkeiten dafür gäbe. In dieser Arbeit stellen wir die änderungsgetriebene Response-Sprache für die Konsistenzerhaltung von Modellen vor. Sie erlaubt es, die Art und Weise der Wiederherstellung von Konsistenz explizit in imperativen Programmen festzulegen, welche als Reaktion auf festgelegte Änderungen ausgeführt werden. Zusätzlich bietet sie Sprachkonstrukte an, die wiederkehrende Reaktionen kapseln und wiederverwendbar machen. Wir führen einen Konsistenzbegriff mit dem Fokus auf Verständlichkeit ein und stellen eine Kategorisierung von möglichen Modelländerungen vor. Die Sprache ist entsprechend einer allgemeingültigen Struktur für die änderungsgetriebene Wiederherstellung von Konsistenz aufgebaut, welche wir aus unserem Konsistenzbegriff herleiten. Wir stellen eine Evaluation unseres Ansatzes anhand einer Fallstudie zur Konsistenzerhaltung von Architekturbeschreibungen und deren Implementierung in objektorientiertem Code vor. Die Evaluation zeigt die Anwendbarkeit der vorgestellten Sprache für die Sicherstellung von Modellkonsistenz in diesem konkreten Fall und verdeutlicht einige Vorteile gegenüber einer manuellen Implementierung der Mechanismen zur Konsistenzerhaltung

    Generic Quality-Aware Refactoring and Co-Refactoring in Heterogeneous Model Environments

    Get PDF
    Software has been subject to change, at all times, in order to make parts of it, for instance, more reusable, better to understand by humans, or to increase efficiency under a certain point of view. Restructurings of existing software can be complex. To prevent developers from doing this manually, they got tools at hand being able to apply such restructurings automatically. These automatic changes of existing software to improve quality while preserving its behaviour is called refactoring. Refactoring is well investigated for programming languages and mature tools exist for executing refactorings in integrated development environments (IDEs). In recent years, the development paradigm of Model-Driven Software Development (MDSD) became more and more popular and we experience a shift in the sense that development artefacts are considered as models which conform metamodels. This can be understood as abstraction, which resulted in the trend that a plethora of new so-called model-based Domain-Specific Languages (DSLs) arose. DSLs have become an integral part in the MDSD and it is obvious that models are subject to change, as well. Thus, refactoring support is required for DSLs in order to prevent users from doing it manually. The problem is that the amount of DSLs is huge and refactorings should not be implemented for new for each of them, since they are quite similar from an abstract viewing. Existing approaches abstract from the target language, which is not flexible enough because some assumptions about the languages have to be made and arbitrary DSLs are not supported. Furthermore, the relation between a strategy which finds model deficiencies that should be improved, a resolving refactoring, and the improved quality is only implicit. Focussing on a particular quality and only detecting those deficiencies deteriorating this quality is difficult, and elements of detected deficient structures cannot be referred to in the resolving refactoring. In addition, heterogeneous models in an IDE might be connected physically or logically, thus, they are dependent. Finding such connections is difficult and can hardly be achieved manually. Applying a restructuring in a model implied by a refactoring in a dependent model must also be a refactoring, in order to preserve the meaning. Thus, this kind of dependent refactorings require an appropriate abstraction mechanism, since they must be specified for dependent models of different DSLs. The first contribution, Role-Based Generic Model Refactoring, uses role models to abstract from refactorings instead of the target languages. Thus, participating structures in a refactoring can be specified generically by means of role models. As a consequence, arbitrary model-based DSLs are supported, since this approach does not make any assumptions regarding the target languages. Our second contribution, Role-Based Quality Smells, is a conceptual framework and correlates deficiencies, their deteriorated qualities, and resolving refactorings. Roles are used to abstract from the causing structures of a deficiency, which then are subject to resolving refactorings. The third contribution, Role-Based Co-Refactoring, employs the graph-logic isomorphism to detect dependencies between models. Dependent refactorings, which we call co-refactorings, are specified on the basis of roles for being independent from particular target DSLs. All introduced concepts are implemented in our tool Refactory. An evaluation in different scenarios complements the thesis. It shows that role models emerged as very powerful regarding the reuse of generic refactorings in arbitrary languages. Role models are suited as an interface for certain structures which are to be refactored, scanned for deficiencies, or co-refactored. All of the presented approaches benefit from it.:List of Figures xv List of Tables xvii List of Listings xix 1. Introduction 1 1.1. Language-Tool Generation Without Consideration Of Time And Space . . . . . 4 1.2. Challenges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.3. Generic Quality-Aware Refactoring and Co-Refactoring in Heterogeneous Model Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2. Foundations 15 2.1. Refactoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.2. Model-Driven Software Development . . . . . . . . . . . . . . . . . . . . . . . . 16 2.2.1. Levels of Abstraction and Metamodelling . . . . . . . . . . . . . . . . . 17 2.2.2. Model Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.3. Role-Based Modelling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 3. Related Work 23 3.1. Model Refactoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.1.1. Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.1.2. Literature Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.1.3. Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.2. Determination of Quality-Related De ciencies . . . . . . . . . . . . . . . . . . . 32 3.2.1. Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 3.2.2. Literature Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 3.2.3. Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 3.3. Co-Refactoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 3.3.1. Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 3.3.2. Literature Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 3.3.3. Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 3.4. Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 4. Role-Based Generic Model Refactoring 51 4.1. Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 4.2. Specifying Generic Refactorings with Role Models . . . . . . . . . . . . . . . . . 53 4.2.1. Specifying Structural Constraints using Role Models . . . . . . . . . . . 55 4.2.2. Mapping Roles to Language Concepts Using Role Mappings . . . . . . . 57 4.2.3. Specifying Language-Independent Transformations using Refactoring Speci cations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 4.2.4. Composition of Refactorings . . . . . . . . . . . . . . . . . . . . . . . . . 67 4.3. Preserving Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 4.4. Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 5. Suggesting Role Mappings as Concrete Refactorings 73 5.1. Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 5.2. Automatic Derivation of Suggestions for Role Mappings with Graph Querying . 74 5.3. Reduction of the Number of Valid Matches . . . . . . . . . . . . . . . . . . . . . 76 5.4. Comparison to Model Matching . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 5.5. Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 6. Role-Based Quality Smells as Refactoring Indicator 79 6.1. Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 6.2. Correlating Model De ciencies, Qualities and Refactorings . . . . . . . . . . . . 80 6.2.1. Quality Smell Repository . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 6.2.2. Quality Smell Calculation Repository . . . . . . . . . . . . . . . . . . . . 85 6.3. Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 6.4. Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 7. A Quality Smell Catalogue for Android Applications 89 7.1. Quality Smell Catalogue Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 7.2. Acquiring Quality Smells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 7.3. Structure-Based Quality Smells—A Detailed Example . . . . . . . . . . . . . . . 92 7.3.1. The Pattern Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 7.3.2. Quality Smell: Interruption from Background . . . . . . . . . . . . . . . 93 7.4. Quality Smells for Android Applications . . . . . . . . . . . . . . . . . . . . . . 96 7.4.1. Quality Smell: Data Transmission Without Compression . . . . . . . . . 96 7.4.2. Quality Smell: Dropped Data . . . . . . . . . . . . . . . . . . . . . . . . 98 7.4.3. Quality Smell: Durable WakeLock . . . . . . . . . . . . . . . . . . . . . 98 7.4.4. Quality Smell: Internal Use of Getters/Setters . . . . . . . . . . . . . . . 99 7.4.5. Quality Smell: No Low Memory Resolver . . . . . . . . . . . . . . . . . 101 7.4.6. Quality Smell: Rigid AlarmManager . . . . . . . . . . . . . . . . . . . . 101 7.4.7. Quality Smell: Unclosed Closeable . . . . . . . . . . . . . . . . . . . . . 102 7.4.8. Quality Smell: Untouchable . . . . . . . . . . . . . . . . . . . . . . . . . 103 7.5. Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 8. Role-Based Co-Refactoring in Multi-Language Development Environments 105 8.1. Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 8.2. Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 8.3. Dependency Knowledge Base . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 8.3.1. Categories of Model Dependencies . . . . . . . . . . . . . . . . . . . . . 108 8.3.2. When to Determine Model Dependencies . . . . . . . . . . . . . . . . . 110 8.3.3. How to Determine Model Dependencies . . . . . . . . . . . . . . . . . . 111 8.4. Co-Refactoring Knowledge Base . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 8.4.1. Specifying Coupled Refactorings with Co-Refactoring Speci cations . . 114 8.4.2. Specifying Bindings for Co-Refactorings . . . . . . . . . . . . . . . . . . 116 8.4.3. Determination of Co-Refactoring Speci cations . . . . . . . . . . . . . . 118 8.5. Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 8.6. Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 9. Refactory: An Eclipse Tool For Quality-Aware Refactoring and Co-Refactoring 121 9.1. Refactoring Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 9.1.1. Role Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 9.1.2. Refactoring Speci cation . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 9.1.3. Role Model Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 9.1.4. Refactoring Composition . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 9.1.5. Custom Refactoring Extensions . . . . . . . . . . . . . . . . . . . . . . . 129 9.1.6. Pre- and Post-conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 9.1.7. Integration Into the Eclipse Refactoring Framework . . . . . . . . . . . . 130 9.2. Quality Smell Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 9.3. Co-Refactoring Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 9.3.1. Concrete Syntax of a CoRefSpec . . . . . . . . . . . . . . . . . . . . . . . 138 9.3.2. Expression Evaluation by Using an Expression Language . . . . . . . . . 138 9.3.3. UI and Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 9.4. Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 10. Evaluation 143 10.1. Case Study: Reuse of Generic Refactorings in many DSLs . . . . . . . . . . . . . 143 10.1.1. Threats to validity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 10.1.2. Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 10.1.3. Experience Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 10.2. Case Study: Suggestion of Valid Role Mappings . . . . . . . . . . . . . . . . . . 147 10.2.1. Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 10.2.2. Evaluation and Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . 151 10.3. Proof of Concept: Co-Refactoring OWL and Ecore Models . . . . . . . . . . . . 155 10.3.1. Coupled OWL-Ecore Refactorings . . . . . . . . . . . . . . . . . . . . . 156 10.3.2. Realisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 10.3.3. Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 11. Summary, Conclusion and Outlook 161 11.1. Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 11.2. Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 11.3. Outlook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 Appendix 169 A. List of Role Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 B. Comparison to Role Feature Model . . . . . . . . . . . . . . . . . . . . . . . . . 171 C. Complete List of Role Mappings . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 D. List of all IncPL Patterns for Detecting Quality Smells . . . . . . . . . . . . . . . 176 E. Post-Processor of the Extract CompositeState refactoring for UML State Machines 183 F. Speci cation of the Conference Language . . . . . . . . . . . . . . . . . . . . . . 185 List of Abbreviations 187 Bibliography 19
    corecore