arrow
返回

Demystifying regular expression bugs A comprehensive study on regular expression bug causes, fixes, and testing

delete2021-11-05
delete5
PRE
AI
P
Peipei Wang *
C
Chris Brown
J
Jamie A. Jennings
K
Kathryn T. Stolee
DOI:10.1007/s10664-021-10033-1delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
Regular expressions cause string-related bugs and open security vulnerabilities for DOS attacks. However, beyond ReDoS (Regular expression Denial of Service), little is known about the extent to which regular expression issues affect software development and how these issues are addressed in practice. We conduct an empirical study of 356 regex-related bugs from merged pull requests in Apache, Mozilla, Facebook, and Google GitHub repositories. We identify and classify the nature of the regular expression problems, the fixes, and the related changes in the test code. The most important findings in this paper are as follows: 1) incorrect regular expression semantics is the dominant root cause of regular expression bugs (165/356, 46.3%). The remaining root causes are incorrect API usage (9.3%) and other code issues that require regular expression changes in the fix (29.5%), 2) fixing regular expression bugs is nontrivial as it takes more time and more lines of code to fix them compared to the general pull requests, 3) most (51%) of the regex-related pull requests do not contain test code changes. Certain regex bug types (e.g., compile error, performance issues, regex representation) are less likely to include test code changes than others, and 4) the dominant type of test code changes in regex-related pull requests is test case addition (75%). The results of this study contribute to a broader understanding of the practical problems faced by developers when using, fixing, and testing regular expressions.
Keyword:
Regular expression bug characteristics
Pull requests
Bug fixes
Test code

期刊

Empirical Software Engineering 封面图
Empirical Software Engineering
IF:
3.6
论文数:
2.0K
被引数:
5.3K

机构

N
North Carolina State University
学者数:
2.6W
论文数: 2.3W
被引数: 3.7W
引用论文

引用论文

err分享
err收藏
Programmed sample delivery on a pressurized paper
err2014-10-24
err0
errOAAI
errJoong Ho Shin; Juhwan Park; Seung Hoon Kim; Je-Kyun Park
err分享
err收藏
Descriptive epidemiology and risk factors for head and neck cancer
err2004-12-01
err0
PREAI
errErich M. Sturgis; Qingyi Wei; Margaret R. Spitz
err分享
err收藏
err
IF0
err
err0
PREAI
err
err分享
err收藏
Chronic myeloid leukemia in a patient with acquired immune deficiency syndrome: complete cytogenetic response with imatinib mesylate: report of a case and review of the literature
err2004-06-01
err0
PREAI
errApostolia-Maria Tsimberidou; Jorge Medina; Jorge Cortes; Adan Rios; Glisson Bonnie; Stefan Faderl; Hagop Kantarjian; Guillermo Garcia-Manero
err分享
err收藏
学者 查看更多内容