OffSide: Learning to Identify Mistakes in Boundary Conditions

Jón Arnar Briem, Jordi Smit, Hendrig Sellik, Pavel Rapoport, Georgios Gousios, Maurício Aniche

Research output: Chapter in Book/Conference proceedings/Edited volumeConference contributionScientificpeer-review

85 Downloads (Pure)

Abstract

Mistakes in boundary conditions are the cause of many bugs in software. These mistakes happen when, e.g., developers make use of '<' or '>' in cases where they should have used '<=' or '>='. Mistakes in boundary conditions are often hard to find and manually detecting them might be very time-consuming for developers. While researchers have been proposing techniques to cope with mistakes in the boundaries for a long time, the automated detection of such bugs still remains a challenge. We conjecture that, for a tool to be able to precisely identify mistakes in boundary conditions, it should be able to capture the overall context of the source code under analysis. In this work, we propose a deep learning model that learn mistakes in boundary conditions and, later, is able to identify them in unseen code snippets. We train and test a model on over 1.5 million code snippets, with and without mistakes in different boundary conditions. Our model shows an accuracy from 55% up to 87%. The model is also able to detect 24 out of 41 real-world bugs; however, with a high false positive rate. The existing state-of-the-practice linter tools are not able to detect any of the bugs. We hope this paper can pave the road towards deep learning models that will be able to support developers in detecting mistakes in boundary conditions.
Original languageEnglish
Title of host publicationIEEE/ACM 42nd International Conference on Software Engineering Workshops (ICSEW'20), May 23--29, 2020, Seoul, Republic of Korea
Subtitle of host publication2nd Workshop on Testing for Deep Learning and Deep Learning for Testing
ISBN (Electronic)978-1-4503-7963-2/20/05
DOIs
Publication statusAccepted/In press - 2020
Event42nd International Conference on Software Engineering: ICSE 2020 - Seoul, Korea, Republic of
Duration: 27 Jun 202019 Jul 2020

Conference

Conference42nd International Conference on Software Engineering
CountryKorea, Republic of
CitySeoul
Period27/06/2019/07/20
OtherVirtual/online event due to COVID-19 online presentations

Fingerprint Dive into the research topics of 'OffSide: Learning to Identify Mistakes in Boundary Conditions'. Together they form a unique fingerprint.

  • Cite this

    Arnar Briem, J., Smit, J., Sellik, H., Rapoport, P., Gousios, G., & Aniche, M. (Accepted/In press). OffSide: Learning to Identify Mistakes in Boundary Conditions. In IEEE/ACM 42nd International Conference on Software Engineering Workshops (ICSEW'20), May 23--29, 2020, Seoul, Republic of Korea: 2nd Workshop on Testing for Deep Learning and Deep Learning for Testing https://doi.org/10.1145/3387940.3391464