Learning Off-By-One Mistakes: An Empirical Study
Mistakes in binary conditions are a source of error in many software systems. They happen when developers use, e.g., <' or
>’ instead of <=' or
>=’. These boundary mistakes are hard to find and impose manual, labor-intensive work for software developers.
While previous research has been proposing solutions to identify errors in boundary conditions, the problem remains open. In this paper, we explore the effectiveness of deep learning models in learning and predicting mistakes in boundary conditions. We train different models on approximately 1.6M examples with faults in different boundary conditions. We achieve a precision of 85.2% and a recall of 84.8% on a balanced dataset, but lower numbers in an imbalanced dataset. We also perform tests on 41 real-world boundary condition bugs found from GitHub, where the model shows only a modest performance. Finally, we test the model on a large-scale Java code base from BLINDED COMPANY, our industrial partner. The model did not identify any bugs, but pointed to methods that largely deviated from best practices.
Wed 19 MayDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
17:00 - 17:50 | Change Management and AnalysisTechnical Papers / Registered Reports at MSR Room 2 Chair(s): Sarah Nadi University of Alberta | ||
17:01 4mTalk | Studying the Change Histories of Stack Overflow and GitHub Snippets Technical Papers Pre-print Media Attached | ||
17:05 4mTalk | Learning Off-By-One Mistakes: An Empirical Study Technical Papers Hendrig Sellik Delft University of Technology, Onno van Paridon Adyen N.V., Georgios Gousios Facebook & Delft University of Technology, Maurício Aniche Delft University of Technology Pre-print | ||
17:09 4mTalk | Predicting Design Impactful Changes in Modern Code Review: A Large-Scale Empirical Study Technical Papers Anderson Uchôa Pontifical Catholic University of Rio de Janeiro (PUC-Rio), Caio Barbosa Pontifical Catholic University of Rio de Janeiro (PUC-Rio), Daniel Coutinho Pontifical Catholic University of Rio de Janeiro (PUC-Rio), Willian Oizumi Pontifical Catholic University of Rio de Janeiro (PUC-Rio), Wesley Assunção Pontifical Catholic University of Rio de Janeiro (PUC-Rio), Silvia Regina Vergilio Federal University of Paraná, Juliana Alves Pereira PUC-Rio, Anderson Oliveira PUC-Rio, Alessandro Garcia PUC-Rio Pre-print | ||
17:13 4mTalk | Rollback Edit Inconsistencies in Developer Forum Technical Papers Saikat Mondal University of Saskatchewan, Gias Uddin University of Calgary, Canada, Chanchal K. Roy University of Saskatchewan Pre-print | ||
17:17 3mTalk | Assessing the Exposure of Software Changes: The DiPiDi Approach Registered Reports Pre-print | ||
17:20 4mTalk | On the Use of Dependabot Security Pull Requests Technical Papers Mahmoud Alfadel Concordia Univerisity, Diego Costa Concordia University, Canada, Emad Shihab Concordia University, Mouafak Mkhallalati Concordia University Pre-print | ||
17:24 26mLive Q&A | Discussions and Q&A Technical Papers |
Go directly to this room on Clowdr