Skip to main content

Lund University Publications

LUND UNIVERSITY LIBRARIES

JavaDL: Automatically Incrementalizing Java Bug Pattern Detection

Dura, Alexandru LU orcid ; Reichenbach, Christoph LU orcid and Söderberg, Emma LU orcid (2021) ACM SIGPLAN conference on Systems, Programming, Languages, and Applications: Software for Humanity In Proceedings of the ACM on Programming Languages 5(OOPSLA).
Abstract
Static checker frameworks support software developers by automatically discovering bugs that fit general-purpose bug patterns. These frameworks ship with hundreds of detectors for such patterns and allow developers to add custom detectors for their own projects. However, existing frameworks generally encode detectors in imperative specifications, with extensive details of not only what to detect but also how. These details complicate detector maintenance and evolution, and also interfere with the framework’s ability to change how detection is done, for instance, to make the detectors incremental. In this paper, we present JavaDL, a Datalog-based declarative specification language for bug pattern detection in Java code. JavaDL seamlessly... (More)
Static checker frameworks support software developers by automatically discovering bugs that fit general-purpose bug patterns. These frameworks ship with hundreds of detectors for such patterns and allow developers to add custom detectors for their own projects. However, existing frameworks generally encode detectors in imperative specifications, with extensive details of not only what to detect but also how. These details complicate detector maintenance and evolution, and also interfere with the framework’s ability to change how detection is done, for instance, to make the detectors incremental. In this paper, we present JavaDL, a Datalog-based declarative specification language for bug pattern detection in Java code. JavaDL seamlessly supports both exhaustive and incremental evaluation from the same detector specification. This specification allows developers to describe local detector components via syntactic pattern matching, and nonlocal (e.g., interprocedural) reasoning via Datalog-style logical rules. We compare our approach against the well-established SpotBugs and Error Prone tools by re-implementing several of their detectors in JavaDL. We find that our implementations are substantially smaller and similarly effective at detecting bugs on the Defects4J benchmark suite, and run with competitive runtime performance. In our experiments, neither incremental nor exhaustive analysis can consistently outperform the other, which highlights the value of our ability to transparently switch execution modes. We argue that our approach showcases the potential of clear-box static checker frameworks that constrain the bug detector specification language to enable the framework to adapt and enhance the detectors. (Less)
Please use this url to cite or link to this publication:
author
; and
organization
publishing date
type
Contribution to journal
publication status
published
subject
keywords
Syntactic Patterns, Software Bugs, Datalog, Static Analysis Frameworks
in
Proceedings of the ACM on Programming Languages
volume
5
issue
OOPSLA
article number
165
publisher
Association for Computing Machinery (ACM)
conference name
ACM SIGPLAN conference on Systems, Programming, Languages, and Applications: Software for Humanity
conference location
Chicago, United States
conference dates
2021-10-17 - 2021-10-22
external identifiers
  • scopus:85117594578
ISSN
2475-1421
DOI
10.1145/3485542
project
Performance bug detection through combined static and dynamic program analysis
language
English
LU publication?
yes
id
c4a4f962-16d5-4494-8d4f-19f87402c13f
date added to LUP
2021-10-18 11:39:47
date last changed
2022-05-05 05:00:17
@article{c4a4f962-16d5-4494-8d4f-19f87402c13f,
  abstract     = {{Static checker frameworks support software developers by automatically discovering bugs that fit general-purpose bug patterns. These frameworks ship with hundreds of detectors for such patterns and allow developers to add custom detectors for their own projects. However, existing frameworks generally encode detectors in imperative specifications, with extensive details of not only what to detect but also how. These details complicate detector maintenance and evolution, and also interfere with the framework’s ability to change how detection is done, for instance, to make the detectors incremental. In this paper, we present JavaDL, a Datalog-based declarative specification language for bug pattern detection in Java code. JavaDL seamlessly supports both exhaustive and incremental evaluation from the same detector specification. This specification allows developers to describe local detector components via syntactic pattern matching, and nonlocal (e.g., interprocedural) reasoning via Datalog-style logical rules. We compare our approach against the well-established SpotBugs and Error Prone tools by re-implementing several of their detectors in JavaDL. We find that our implementations are substantially smaller and similarly effective at detecting bugs on the Defects4J benchmark suite, and run with competitive runtime performance. In our experiments, neither incremental nor exhaustive analysis can consistently outperform the other, which highlights the value of our ability to transparently switch execution modes. We argue that our approach showcases the potential of clear-box static checker frameworks that constrain the bug detector specification language to enable the framework to adapt and enhance the detectors.}},
  author       = {{Dura, Alexandru and Reichenbach, Christoph and Söderberg, Emma}},
  issn         = {{2475-1421}},
  keywords     = {{Syntactic Patterns; Software Bugs; Datalog; Static Analysis Frameworks}},
  language     = {{eng}},
  month        = {{10}},
  number       = {{OOPSLA}},
  publisher    = {{Association for Computing Machinery (ACM)}},
  series       = {{Proceedings of the ACM on Programming Languages}},
  title        = {{JavaDL: Automatically Incrementalizing Java Bug Pattern Detection}},
  url          = {{http://dx.doi.org/10.1145/3485542}},
  doi          = {{10.1145/3485542}},
  volume       = {{5}},
  year         = {{2021}},
}