thesis

Feature and Bug Localization on Model-based Systems at Design time and Runtime

Abstract

For more than two decades, the modeling community has made great efforts to address key issues such as a Unified Modeling Language (UML), a formal language to describe expressions on UML (OCL), or model transformation languages. In addition, all software systems evolve over time. In fact, some works point that up to 80% of the lifetime of a system is spent on maintenance and evolution activities. However, the maintenance of software systems built by Model Driven Development (MDD) has not received as much attention as we think it should. Recent surveys of feature and bug localization do not identify a single approach that addresses the models of MDD. Both Feature Localization and Bug Localization are essential tasks in maintenance: - Feature localization is important because: before modifying the system, it is necessary to locate what is going to be modified, and - bug localization aims to identify the location in the system that is pertinent to a software fault. Bug localization is one of the most important, expensive, tedious and time-consuming activities in program maintenance.

In this thesis we propose feature localization and bug localization approaches for MDD. In MDD, the main artifact to develop the software is the model and, therefore, it should not be ignored when locating features and bugs. In the case of feature localization, we extend our previous works that had already covered the models at design time, to address the models at runtime. In the case of bug localization, this thesis addresses both design time and runtime.

Our feature localization approach combines architecture models at runtime and Information Retrieval (IR) for feature location. The execution information is collected in the model at runtime. Then, the approach applies an information retrieval technique at model level. The result is a ranked list of model elements that are related to the desired feature based on the similarity to the feature description.

Our bug localization approach covers design time and runtime. Our design time approach is a Multi-Objective Evolutionary Algorithm. This approach searches over model fragments and is guided by the textual similarity to the bug report and by the Defect Localization Principle. Our runtime approach is focused on locat ing bugs that appear as the result of dynamic reconfigurations of the system due to context changes. Our approach for bug localization in reconfigurations applies an evolutionary algorithm guided by a fitness function that considers the similarity to the text description of the bug report. The solutions provided by our approach are sequences of reconfigurations that, when followed, might lead to the model at runtime which contains the located bug.

We evaluated our approaches in two real-world industrial case studies: BSH, the leading manufacturer of home appliances in Europe, and CAF, a worldwide leading company that manufactures rolling stock, and in an artificial case study, the Smart Hotel. We measure the results in terms of recall, precision, F-measure and Matthews Correlation Coefficient (MCC). The results of our approaches outperform the baselines that are the approaches used by our industrial partners for feature and bug localization. We also performed statistical analyses to provide evidence of the significance of the results.

This work suggests that the approaches presented in this thesis outperform the current approaches used by the industry that were studied. Specifically, we realize that the models at runtime traces provides useful information that influences the results. In addition, the combination of information retrieval and the Defect Localization Principle leads to a significant improvement when it is applied for bug localization in models. Hence, the study of the reconfiguration of models at runtime helps to locate bugs. Finally, our results show that our approaches can be applied in real world environments, such as BSH and CAF.

Acknowledgements

  • VARIAMOS: Ministry of Economy and Competitiveness (MINECO) through the Spanish National R+D+i Plan and ERDF (FEDER) funds under the project (Model-Driven Variability Extraction for Software Product Line Adoption) under Grant TIN2015-64397-R
  • European ITEA 3 programme under the REVaMP² project initiative