Automatic Analysis and Repair of Exception Bugs for Java Programs - TEL - Thèses en ligne Accéder directement au contenu
Thèse Année : 2015

Automatic Analysis and Repair of Exception Bugs for Java Programs

Analyse et réparation automatique des bugs liés aux exceptions dans les programmes Java

Résumé

The world is day by day more computerized. There is more and more software running everywhere, from personal computers to data servers, and inside most of the new popularized inventions such as connected watches or intelligent washing machines. All of those technologies use software applications to perform the services they are designed for. Unfortunately, the number of software errors grows with the number of software applications. In isolation, software errors are often annoyances, perhaps costing one person a few hours of work when their accounting application crashes. Multiply this loss across millions of people and consider that even scientific progress is delayed or derailed by software error: in aggregate, these errors are now costly to society as a whole. There exists two techniques to deal with those errors. Bug fixing consists in repairing errors. Resilience consists in giving an application the capability to remain functional despite the errors. This thesis focuses on bug fixing and resilience in the context of exceptions. Exceptions are programming language constructs for handling errors. They are implemented in most mainstream programming languages and widely used in practice. We specifically target two problems: Problem #1: There is a lack of debug information for the bugs related to exceptions. This hinders the bug fixing process. To make bug fixing of exceptions easier, we will propose techniques to enrich the debug information. Those techniques are fully automated and provide information about the cause and the handling possibilities of exceptions. Problem #2: There are unexpected exceptions at runtime for which there is no error-handling code. In other words, the resilience mechanisms against exceptions in the currently existing (and running) applications is insufficient. We propose resilience capabilities which correctly handle exceptions that were never foreseen at specification time neither encountered during development or testing. In this thesis, we aim at finding solutions to those problems. We present four contributions to address the two presented problems. In Contribution #1, we lies the foundation to address both problems. To improve the available information about exceptions, we present a characterization of the exceptions (expected or not, anticipated or not), and of their corresponding resilience mechanisms. We provide definitions about what is a bug when facing exceptions and what are the already-in-place corresponding resilience mechanisms. We formalize two formal resilience properties: source-independence and pure-resilience as well as an algorithm to verify them. We also present a code transformation that uses this knowledge to enhance the resilience of the application. Contribution #2 aims at addressing the limitations of Contribution #1. The limitations is that there are undecidable cases, for which we lack information to characterize them in the conceptual framework of Contribution #1. We focus on the approaches that use the test suite as their main source of information as in the case of Contribution #1. In this contribution, we propose a technique to split test cases into small fragments in order to increase the efficiency of dynamic program analysis. Applied to Contribution #1, this solution improves the knowledge acquired by providing more information on more cases. Applied to other dynamic analysis techniques which also use test suites, we show that it improve the quality of the results. For example, one case study presented is the use of this technique on Nopol, an automatic repair tool. Contribution #1 and #2 are generic, they target any kind of exceptions. In order to further contribute to bug fixing and resilience, we need to focus on specific types of exceptions. This focus enables us to exploit the knowledge we have about them and further improve bug fixing and resilience. Hence, in the rest of this thesis, we focus on a more specific kind of exception: the null pointer dereference exceptions (NullPointerException in Java). Contribution #3 focuses on Problem #1, it presents an approach to make bug fixing easier by providing information about the origin of null pointer dereferences. We present an approach to automatically provide information about the origin of the null pointer dereferences which happen in production mode (i.e. those for which no efficient resilience mechanisms already exists). The information provided by our approach is evaluated w.r.t. its ability to help the bug fixing process. This contribution is evaluated other 14 real-world null dereference bugs from large-scale open-source projects. Contribution #4 addresses Problem #2, we present a way to tolerate the same kind of errors as Contribution #3: null pointer dereference. We first use dynamic analysis to detect harmful null dereferences, skipping the non-problematic ones. Then we propose a set of strategies able to tolerate this error. We define code transformations to 1) detect harmful null dereferences at runtime; 2) allow a runtime ehavior modification to execute strategies; 3) assess the correspondance between the modified behavior and the specifications. This contribution is evaluated other 11 real-world null dereference bugs from large-scale open-source projects. To sum up, this thesis studies the exceptions, their behaviors, the information one can gathered from them, the problems they may cause and the applicable solutions to those problems.
Le monde est de plus en plus informatisé. Il y a de plus en plus de logiciels en cours d'exécution partout, depuis les ordinateurs personnels aux serveurs de données, et à l'intérieur de la plupart des nouvelles inventions connectées telles que les montres ou les machines à laver intelligentes. Toutes ces technologies utilisent des applications logicielles pour effectuer les taches pour lesquelles elles sont conçus. Malheureusement, le nombre d'erreurs de logiciels croît avec le nombre d'applications logicielles. Localement, une erreur logicielle est embêtante, elle peut coûter quelques heures de travail à une personne lorsque l'application crashe. Multipliez cette perte sur des millions de personnes et considérez que même les avancées scientifiques sont retardées ou empêchées par des erreurs de ce type: dans l'ensemble, ces erreurs sont coûteuses pour la société dans son ensemble. Il existe deux techniques pour faire face à ces erreurs. La réparation logicielle consiste à réparer ces erreurs manuellement. La résilience consiste à donner à une application la capacité de rester fonctionnelle malgré les erreurs. Cette thèse porte sur la correction des bugs et la résilience dans le contexte des exceptions. L'Exception est un mécanisme de gestion d'erreurs. Il est intégré dans la plupart des langages de programmation et largement utilisé dans la pratique. Dans cette thèse, nous ciblons spécifiquement deux problèmes: Problème n°1: Il ya un manque d'informations de débogage pour les bugs liés à des exceptions. Cela entrave le processus de correction de bogues. Pour rendre la correction des bugs liées aux exceptions plus facile, nous allons proposer des techniques pour enrichir les informations de débogage. Ces techniques sont entièrement automatisées et fournissent des informations sur la cause et les possibilités de gestion des exceptions. Problème n ° 2: Il ya des exceptions inattendues lors de l'exécution pour lesquelles il n'y a pas de code pour gérer l'erreur. En d'autres termes, les mécanismes de résilience actuels contre les exceptions ne sont pas suffisamment efficaces. Nous proposons de nouvelles capacités de résilience qui gérent correctement les exceptions qui n'ont jamais été rencontrées avant. Dans cette thèse, nous nous efforçons de trouver des solutions à ces problèmes. Nous présentons quatre contributions pour résoudre les deux problèmes présentés. En résumé, cette thèse étudie les exceptions, leurs comportements, l'information qu'on peut recueillir auprès d'elles, les problèmes qu'elles peuvent causer et les solutions applicables à ces problèmes.
Fichier principal
Vignette du fichier
main.pdf (1.7 Mo) Télécharger le fichier
Loading...

Dates et versions

tel-01250092 , version 1 (04-01-2016)

Identifiants

  • HAL Id : tel-01250092 , version 1

Citer

Benoit Cornu. Automatic Analysis and Repair of Exception Bugs for Java Programs. Software Engineering [cs.SE]. Université de Lille, 2015. English. ⟨NNT : ⟩. ⟨tel-01250092⟩
569 Consultations
1810 Téléchargements

Partager

Gmail Facebook X LinkedIn More