Out of Sight, Out of Place: Detecting and Assessing Swapped Arguments

被引:5
|
作者
Scott, Roger [1 ]
Ranieri, Joseph [1 ]
Kot, Lucja [1 ]
Kashyap, Vineeth [1 ]
机构
[1] GrammaTech Inc, Ithaca, NY USA
关键词
static analysis; natural language; swapped arguments; big code;
D O I
10.1109/SCAM51674.2020.00031
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Programmers often add meaningful information about program semantics when naming program entities such as variables, functions, and macros. However, static analysis tools typically discount this information when they look for bugs in a program. In this work, we describe the design and implementation of a static analysis checker called SWAPD, which uses the natural language information in programs to warn about mistakenly-swapped arguments at call sites. SWAPD combines two independent detection strategies to improve the effectiveness of the overall checker. We present the results of a comprehensive evaluation of SWAPD over a large corpus of C and C++ programs totaling 417 million lines of code. In this evaluation, SWAPD found 154 manually-vetted real-world cases of mistakenly-swapped arguments, suggesting that such errors-while not pervasive in released code-are a real problem and a worthwhile target for static analysis.
引用
收藏
页码:227 / 237
页数:11
相关论文
共 50 条
  • [41] Out of sight, out of mind?
    de Langley, T
    LAB ANIMAL, 2004, 33 (04) : 16 - 16
  • [42] OUT OF SIGHT, OUT OF MIND
    NEUSTATTER, A
    NEW STATESMAN & SOCIETY, 1990, 3 (88): : 23 - 25
  • [43] OUT OF SIGHT BUT NOT OUT OF HOPE
    CLEVER, LH
    WESTERN JOURNAL OF MEDICINE, 1991, 154 (05): : 513 - 513
  • [44] Out of Sight, Out of Mind: Detecting Orphaned Web Pages at Internet-Scale
    Pletinckx, Stijn
    Borgolte, Kevin
    Fiebig, Tobias
    CCS '21: PROCEEDINGS OF THE 2021 ACM SIGSAC CONFERENCE ON COMPUTER AND COMMUNICATIONS SECURITY, 2021, : 21 - 35
  • [45] Out of sight, out of mind
    Hansen, T
    POWER ENGINEERING, 2005, 109 (04) : 28 - +
  • [46] Out of sight, out of mind?
    Dixon, Bernard
    LANCET INFECTIOUS DISEASES, 2010, 10 (08): : 513 - 513
  • [47] Out of sight, out of mind
    Woolley, Mary
    Leshner, Alan I.
    SCIENCE, 2014, 346 (6211) : 791 - 791
  • [48] OUT OF SIGHT, OUT OF MIND
    McNamee, Joe
    INDEX ON CENSORSHIP, 2010, 39 (01) : 108 - 117
  • [49] Out of mind, out of sight
    Finke, Laurie A.
    Shichtman, Martin B.
    ARTHURIANA, 2007, 17 (04) : 101 - 108
  • [50] OUT OF SIGHT, OUT OF MIND
    HARTMAN, NG
    JOURNAL OF NUCLEAR MEDICINE, 1994, 35 (09) : 1569 - 1570