Defining and Assessing Software Quality by Quality Models
Total Page:16
File Type:pdf, Size:1020Kb
Defining and Assessing Software Quality by Quality Models Klaus Lochmann Institut für Informatik der Technischen Universität München Defining and Assessing Software Quality by Quality Models Klaus Lochmann Vollständiger Abdruck der von der Fakultät für Informatik der Technischen Universität München zur Erlangung des akademischen Grades eines Doktors der Naturwissenschaften (Dr. rer. nat.) genehmigten Dissertation. Vorsitzender: Univ.-Prof. Bernd Brügge, Ph. D. Prüfer der Dissertation: 1. Univ.-Prof. Dr. Dr. h.c. Manfred Broy 2. o. Univ.-Prof. Dr. Gustav Pomberger Johannes Kepler Universität Linz / Österreich Die Dissertation wurde am 31.07.2013 bei der Technischen Universität München eingereicht und durch die Fakultät für Informatik am 11.12.2013 angenommen. Abstract Software quality plays an important role for companies today, as it is in a direct relation to the costs arising in the lifecycle of software. However, the notion of quality is diverse. A software mainte- nance organization, for instance, defines high quality of software as enabling effective maintenance of it. For operators of computing centers, high quality means that the available computing and memory resources are efficiently used. An end user experiences software as high quality when it supports his tasks in an effective and efficient manner and thus reduces effort for him. In software engineering research, a lot of work has already been dedicated to the topic of software quality and quality assurance. However, we claim that there is no generally accepted definition of quality. The quality models providing taxonomical definitions face several problems, such as being ambiguous, overlapping, and incomplete. This prevents the quality models from supporting the definition of useful quality requirements. Moreover, these quality models remain on a high level of abstraction and hence are not suitable for conducting quality assessments. As a consequence of these shortcomings, today, quality assessment techniques are applied independently from the definition of quality by quality models. This results in barely comprehensible assessment results, because overall quality statements are either not provided, are missing explanation and rationale, and are not grounded in previously defined quality requirements. This thesis presents a quality modeling approach for defining quality in a precise and assessable way. We propose an explicit quality meta-model describing the structure of quality models. It de- fines a product model of software systems, which provides a well-structured backbone for defining a clear and unambiguous hierarchy of quality-influencing properties. The impact of these properties on general quality attributes is explicitly captured and justified. For establishing general quality at- tributes of software, we rely on the activity-based paradigm, which describes quality as the capabil- ity of software to support activities conducted with it. The usage of activities has the advantage that there are clear decomposition criteria for them, resulting in a clear structure of quality attributes. We further provide an approach for quality assessments based on the quality meta-model. It uses existing measures and analysis tools for quantifying the satisfaction of properties defined in a given quality model. For this purpose, the approach defines utility functions for evaluating the measure- ment values regarding the satisfaction of a property and aggregation specifications for getting an overall quality statement. The aggregation is carried out alongside the hierarchical structure of the properties and quality attributes. This way, the aggregation follows the well-defined and justified hierarchies of the quality model. Furthermore, the quality assessment approach accounts for several challenges experienced in practice, such as incomplete measurement data. We build tool support for creating and editing quality models as well as for conducting automated quality assessments. Using this tool support we evaluate our approach: We build a quality model for Java source code and apply it to a large number of open source software systems. Acknowledgements First of all, I would like to express my gratitude to Prof. Dr. Dr. h.c. Manfred Broy for giving me the opportunity to work at his chair for the past five-and- a-half-years. I enjoyed the great atmosphere at this chair, the freedom he granted us, and the opportunity to work together with industry. Moreover, I would like to thank him for his supervision of my thesis and for his critical comments that made this work much better. I would also like to thank Prof. Dr. Pomberger, who agreed to act as second supervisor, for his efforts in reviewing my thesis. In addition, my thanks go to all the colleagues with whom I had the pleasure of working. Special thanks go to Sebastian Winter, who, having already supervised my diploma thesis, introduced me to the chair and gave me valuable ideas for my thesis in countless discussions in the Quamoco project. My thanks go also to the other team-members working on Quamoco at our chair: Stefan Wagner, Florian Deißenböck, Markus Herrmannsdörfer, Elmar Jürgens, and Lars Heinemann; and to all participants of Quamoco from other organizations, especially to Andreas Göb, Alois Mayr, Christian Körner, and Michael Kläs, with whom I worked most closely. Without all the discussions and all the joint work in that research project, my dissertation would not have been possible. At the chair of Prof. Broy, I have worked together with many people on several research and publi- cation projects. I would like to thank them all for the good working atmosphere and the stimulating environment they provided. My special thanks go to Stefan Wagner and Daniel Méndez Fernández, who introduced me to scientific working and publishing. Moreover, I would like to thank all the other co-authors with whom I wrote and published papers. Furthermore, I would like to thank all colleagues I was working with in the last stages of my thesis, especially those who supported me morally during lunchtime and by reviewing and giving feedback to my thesis: Alarico Campetelli, Mario Gleirscher, Maximilian Irlbeck, and Fiona Zhu. Last but not least, I am grateful to my family – my parents and my sister – who always support me. Without them neither my study of computer science, nor the dissertation, would have been possible. Contents 1 Introduction 11 1.1 Problem Statement..................................... 12 1.2 Contribution......................................... 13 1.3 Outline............................................ 14 2 Preliminaries 17 2.1 Terminology......................................... 17 2.2 Software Quality Assurance................................ 22 3 State-of-the-Art 29 3.1 Quality Models....................................... 29 3.2 Software Measurement................................... 35 3.3 Definition of Quality Requirements............................ 38 3.4 Quality Models in Practice................................. 39 3.5 The Quamoco Project ................................... 52 3.6 Summary .......................................... 53 4 Quality Meta-Model 55 4.1 Motivation & Objectives.................................. 55 4.2 Overview .......................................... 56 4.3 Objects and Classes..................................... 63 4.4 Quality-Properties ..................................... 68 4.5 Summary .......................................... 75 5 Quality Assessments based on a Quality Model 77 5.1 Basic Concept........................................ 79 5.2 Top-Down Specification.................................. 81 5.3 Bottom-Up Assessment .................................. 92 5.4 Addressing Challenges in Practice ............................ 96 6 Quality Model for Software Products 103 6.1 General Classes and Quality Attributes.......................... 103 6.2 A Quality Model for Java Source Code.......................... 116 7 Tool Support 121 7.1 Quality Model Editor.................................... 121 7.2 Quality Assessment Tool.................................. 124 9 Contents 8 Case Study: Java Source Code Quality 127 8.1 Study Objects........................................ 127 8.2 RQ 1: Suitability for Creating Realistic Quality Models . 128 8.3 RQ 2: Differentiation of Software Products....................... 133 8.4 RQ 3: Meaningfulness of Quality Assessment Results . 140 8.5 RQ 4: Sensing of Quality Improvements......................... 142 8.6 RQ 5: Traceability of Results............................... 146 8.7 RQ 6: Impact of Different Benchmarking Bases .................... 148 9 Conclusion 153 10 Future Work 155 10.1 Further Evaluation ..................................... 155 10.2 In-Depth Analysis of the Existing Quality Model.................... 155 10.3 Broader Scope of the Quality Model........................... 156 10.4 Application in Practice................................... 156 Bibliography 159 A Appendix 171 A.1 Fuzzy Propositional Logic................................. 171 A.2 Fuzzy Operators and Modifiers.............................. 172 10 1 Introduction The quality of software plays an important economic role today [19]. It is critical for the com- petitiveness and survival of companies [46, p. 4]. This is because quality is strongly connected to the costs arising during development, maintenance, and use of software. Research in software engineering has shown that preventing defects early in the development is less expensive than cor- recting them later [46, p. 5]. Maintenance