article

Predicting Integer Overflow Errors via Supervised Learning

  • International Journal of Artificial Intelligence Tools
  • World Scientific
Research footprint

At a glance

Citations
3
References
0
Comments
0
Paper overview

Abstract

An integer overflow error occurs when an integer operation in computer software evaluates a value out of the integer range. It can lead to a fatal system failure. The existing approaches to detecting integer overflow errors rely on data/control-flow analysis of the code or execution of the code with test cases. This paper presents a supervised learning approach to predicting whether each method in a given Java program has an integer overflow error by treating the source code as text. Built upon real-world programs, our Java dataset covers all integer data types and operations in Java, the methods for preventing integer overflow errors, and adversarial samples. We have evaluated six classification models, BERT, DistilBERT, codeBERT, Code2Vec, fastText, and NBSVM. They represent different text embedding techniques for dealing with source code. The experiment results show that BERT and its variants have outperformed other models. We have applied the resultant BERT model to eleven real-world projects, including JDK13.0 and ten top-ranked GitHub projects, and revealed 181 integer overflow errors. In addition, we have evaluated the classification models with a C/C++ dataset. The result is similar to that of the Java dataset.

Record transparency

Publication details

DOI
10.1142/s0218213022500476
OpenAlex
W4297145383
Document type
article
Language
EN
Source
International Journal of Artificial Intelligence Tools
Last metadata update
Community

Comments

Log in to join the discussion.

  1. No comments yet. Start the discussion.