Visible to the public NonDex: A Tool for Detecting and Debugging Wrong Assumptions on Java API Specifications

TitleNonDex: A Tool for Detecting and Debugging Wrong Assumptions on Java API Specifications
Publication TypeConference Paper
Year of Publication2016
AuthorsGyori, Alex, Lambeth, Ben, Shi, August, Legunsen, Owolabi, Marinov, Darko
Conference NameProceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering
Date PublishedNovember 2016
PublisherACM
Conference LocationNew York, NY, USA
ISBN Number978-1-4503-4218-6
KeywordsAPI, APIs, applications programming interfaces, compositionality, flaky tests, NonDex, pubcrawl, Resiliency, underdetermined API
Abstract

We present NonDex, a tool for detecting and debugging wrong assumptions on Java APIs. Some APIs have underdetermined specifications to allow implementations to achieve different goals, e.g., to optimize performance. When clients of such APIs assume stronger-than-specified guarantees, the resulting client code can fail. For example, HashSet's iteration order is underdetermined, and code assuming some implementation-specific iteration order can fail. NonDex helps to proactively detect and debug such wrong assumptions. NonDex performs detection by randomly exploring different behaviors of underdetermined APIs during test execution. When a test fails during exploration, NonDex searches for the invocation instance of the API that caused the failure. NonDex is open source, well-integrated with Maven, and also runs from the command line. During our experiments with the NonDex Maven plugin, we detected 21 new bugs in eight Java projects from GitHub, and, using the debugging feature of NonDex, we identified the underlying wrong assumptions for these 21 new bugs and 54 previously detected bugs. We opened 13 pull requests; developers already accepted 12, and one project changed the continuous-integration configuration to run NonDex on every push. The demo video is at: https://youtu.be/h3a9ONkC59c

URLhttp://doi.acm.org/10.1145/2950290.2983932
DOI10.1145/2950290.2983932
Citation Keygyori_nondex:_2016