Masterarbeit MSTR-2022-17

Bibliograph.
Daten
Ragavendran, Koushik: NullnessGraphSeq: Learning-based Java nullness inference.
Universität Stuttgart, Fakultät Informatik, Elektrotechnik und Informationstechnik, Masterarbeit Nr. 17 (2022).
51 Seiten, englisch.
Kurzfassung

Most web-based projects' server-side and android application development use Java programming language. Like most programming languages, Java has a unique \null" value representing a missing value. But, dereferencing of program element pointing \null" value may result in NullPointerException in the run-time. To prevent NullPointerException in run-time null-type annotations were introduced by Java-8. The null-type annotations specify the nullness of a program element as either \can be null" or \never null". Static analyses using these null-type annotations warn developers if the \null" or program element pointing \null" value is sometimes assigned to the \never null" program element. Also, it warns developers if the \can be null" program element is not checked for null before dereferencing. Due to lack of null-type annotations, this thesis presents a learning-based approach for inferring null-type annotation of program elements. We formulate the problem as a Binary Classi cation problem because classifying the program element as \can be null" or \never null" helps IDE suggest null checks only when required. The model predicts nullness for methods, parameters, elds and variables from respective local contexts of identi er, node type, usage, assignment and comment in combination with the global context of data dependency information. The model we train combine Long Short Term Memory, Feed-Forward Network for summarising the local context and Graph Neural Network for passing local context information as messages. We trained our model with 20000 Java les and achieved an accuracy of 0.8174 and F1-scores of 0.8879 and 0.4971 for \can be null" and \never null", respectively. We evaluate our approach by comparing it with the existing tool InferNullity as the baseline by comparing the inference from InferNullity and the approach used in this thesis with the ground truth.

Volltext und
andere Links
Volltext
Abteilung(en)Universität Stuttgart, Institut für Softwaretechnologie, Software Lab - Programmanalysen
BetreuerPradel, Prof. Michael; Bezzubov, Alexander
Eingabedatum16. September 2022
   Publ. Informatik