Affiliation:
1. University of Cambridge, UK / Google, USA
2. Google, USA
3. TU Darmstadt, Germany
4. Columbia University, USA
Abstract
Identifier names are often used by developers to convey additional information about the meaning of a program over and above the semantics of the programming language itself. We present an algorithm that uses this information to detect argument selection defects, in which the programmer has chosen the wrong argument to a method call in Java programs. We evaluate our algorithm at Google on 200 million lines of internal code and 10 million lines of predominantly open-source external code and find defects even in large, mature projects such as OpenJDK, ASM, and the MySQL JDBC. The precision and recall of the algorithm vary depending on a sensitivity threshold. Higher thresholds increase precision, giving a true positive rate of 85%, reporting 459 true positives and 78 false positives. Lower thresholds increase recall but lower the true positive rate, reporting 2,060 true positives and 1,207 false positives. We show that this is an order of magnitude improvement on previous approaches. By analyzing the defects found, we are able to quantify best practice advice for API design and show that the probability of an argument selection defect increases markedly when methods have more than five arguments.
Publisher
Association for Computing Machinery (ACM)
Subject
Safety, Risk, Reliability and Quality,Software
Cited by
29 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. WMWatcher: Preventing Workload-Related Misconfigurations in Production Environment;2023 30th Asia-Pacific Software Engineering Conference (APSEC);2023-12-04
2. Abstract Syntax Tree for Method Name Prediction: How Far Are We?;2023 IEEE 23rd International Conference on Software Quality, Reliability, and Security (QRS);2023-10-22
3. ARist: An effective API argument recommendation approach;Journal of Systems and Software;2023-10
4. Learning the Relation Between Code Features and Code Transforms With Structured Prediction;IEEE Transactions on Software Engineering;2023-07
5. Towards strengthening software library interfaces with granular and interactive type migrations;2023 IEEE/ACM 45th International Conference on Software Engineering: Companion Proceedings (ICSE-Companion);2023-05