Identificando causas de Null Pointer Exceptions em Java: uma avaliação de ferramentas de análise estática

Mainstream object-oriented programming languages admit null values for references for the sake of flexibility. In Java, the attempt to use an object reference with a null value throws a Null Pointer Exception (NPE), one of the most frequent causes of crashes in Java applications. To ease the develop...

ver descrição completa

Na minha lista:
Detalhes bibliográficos
Autor principal: Silva, Rodrigo Lafayette da
Outros Autores: Cavalcante, Everton Ranielly de Sousa
Formato: bachelorThesis
Idioma:pt_BR
Publicado em: Universidade Federal do Rio Grande do Norte
Assuntos:
Endereço do item:https://repositorio.ufrn.br/handle/123456789/34247
Tags: Adicionar Tag
Sem tags, seja o primeiro a adicionar uma tag!
Descrição
Resumo:Mainstream object-oriented programming languages admit null values for references for the sake of flexibility. In Java, the attempt to use an object reference with a null value throws a Null Pointer Exception (NPE), one of the most frequent causes of crashes in Java applications. To ease the developers’ task on inspecting the source code to locate the origin of the exception, static analysis tools have been developed in recent years. These tools have shown to be effective in locating faults by analyzing the source or binary code of the application without the need of executing it. Despite the remarkable occurrence of NPEs in Java applications, there has been little research on studying Java runtime exceptions and how they can be detected as early as possible. The literature also lacks empirical studies that specifically analyze open-source alternatives able to detect faults that lead to NPEs in Java applications, a relevant issue when considering user requirements and capabilities of the tools. This work addressed this gap by conducting an empirical study aimed to evaluate four popular open-source static analysis tools regarding the detection of faults related to NPEs, namely PMD, SpotBugs, SonarLint, and Infer. These tools were evaluated in terms of both effectiveness and efficiency when applied to a set of 35 Java projects collected from well-known benchmarks. Obtained results pointed out SonarLint and SpotBugs as the most effective and efficient tools for the analyzed projects.