A Study of Single Statement Bugs Involving Dynamic Language Features

04/03/2022
by   Li Sui, et al.
0

Dynamic language features are widely available in programming languages to implement functionality that can adapt to multiple usage contexts, enabling reuse. Functionality such as data binding , object-relational mapping and user interface builders can be heavily dependent on these features. However, their use has risks and downsides as they affect the soundness of static analyses and techniques that rely on such analyses (such as bug detection and automated program repair). They can also make software more error-prone due to potential difficulties in understanding reflective code, loss of compile-time safety and incorrect API usage. In this paper, we set out to quantify some of the effects of using dynamic language features in Java programs-that is, the error-proneness of using those features with respect to a particular type of bug known as single statement bugs. By mining 2,024 GitHub projects, we found 139 single statement bug instances (falling under 10 different bug patterns), with the highest number of bugs belonging to three specific patterns: Wrong Function Name, Same Function More Args and Change Identifier Used. These results can help practitioners to quantify the risk of using dynamic techniques over alternatives (such as code generation). We hope this classification raises attention on choosing dynamic APIs that are likely to be error-prone, and provides developers a better understanding when designing bug detection tools for such feature.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
01/28/2022

TSSB-3M: Mining single statement bugs at massive scale

Single statement bugs are one of the most important ingredients in the e...
research
03/24/2021

CrossFix: Collaborative bug fixing by recommending similar bugs

Many automated program repair techniques have been proposed for fixing b...
research
03/21/2022

To Type or Not to Type? A Systematic Comparison of the Software Quality of JavaScript and TypeScript Applications on GitHub

JavaScript (JS) is one of the most popular programming languages, and wi...
research
06/14/2023

A statistical approach for finding property-access errors

We study the problem of finding incorrect property accesses in JavaScrip...
research
06/12/2018

SoK: Sanitizing for Security

The C and C++ programming languages are notoriously insecure yet remain ...
research
07/29/2021

Learning how to listen: Automatically finding bug patterns in event-driven JavaScript APIs

Event-driven programming is widely practiced in the JavaScript community...
research
06/17/2022

On the Bug-proneness of Structures Inspired by Functional Programming in JavaScript Projects

Language constructs inspired by functional programming have made their w...

Please sign up or login with your details

Forgot password? Click here to reset