Cavalcante, Everton Ranielly de SousaSilva, Rodrigo Lafayette da2025-09-022025-09-022023-01-30SILVA, Rodrigo Lafayette da. On the use of machine learning to identify null pointer exceptions in static java code analysis. Orientador: Dr. Everton Ranielly de Sousa Cavalcante. 2023. 88f. Dissertação (Mestrado em Sistemas e Computação) - Centro de Ciências Exatas e da Terra, Universidade Federal do Rio Grande do Norte, Natal, 2023.https://repositorio.ufrn.br/handle/123456789/65394Mainstream object-oriented programming languages admit null values for references for the sake of flexibility. In Java, attempting 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. Static analysis has been used to inspect the source or binary code to locate the origin of the exception by analyzing these artifacts without debugging-oriented program executions. Despite its effectiveness, static analysis relies on a fixed, static set of rules describing violation patterns, and it is known for a significant number of false positives. This study investigates how the use of Machine Learning (ML) techniques can improve the precision of detecting NPE-related faults through static analysis, a branch still unexplored in the literature and the software industry. The main goal is to propose, implement, and evaluate a classification-based approach to address the detection of NPErelated faults in Java code. The expected contributions from this work are: (i) understanding how ML techniques can be used to detect those faults via static analysis; (ii) providing a ML model to detect NPE-related faults; and (iii) an assessment of the performance of ML techniques in comparison to traditional static analysis tools. The results of the experiments showed that the new approach using Machine Learning (k-Nearest Neighbors) is more effective than traditional SATs, namely PMD, SpotBugs, SonarLint, and Infer, regarding NPE detection, presenting an average accuracy of 97.5% in its best configuration, albeit being up to 15 times less efficient in terms of relative performance.enAcesso AbertoJavaNull pointer exceptionAnálise estáticaAprendizado de máquinaUtilizando aprendizado de máquina na identificação de Null pointer exceptions em análise estática de código em JavaOn the use of machine learning to identify null pointer exceptions in static java code analysismasterThesisCIENCIAS EXATAS E DA TERRA::CIENCIA DA COMPUTACAO::SISTEMAS DE COMPUTACAO