Show simple item record

dc.contributor.authorRice, Andrewen
dc.contributor.authorAftandilian, Edwarden
dc.contributor.authorJaspan, Cieraen
dc.contributor.authorJohnston, Emilyen
dc.contributor.authorPradel, Michaelen
dc.contributor.authorArroyo-Paredes, Yulissaen
dc.date.accessioned2018-02-22T11:21:41Z
dc.date.available2018-02-22T11:21:41Z
dc.date.issued2017-10-12en
dc.identifier.issn2475-1421
dc.identifier.urihttps://www.repository.cam.ac.uk/handle/1810/273377
dc.description.abstractIdentifier 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 our company 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 analysing 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.
dc.languageenen
dc.publisherAssociation for Computing Machinery (ACM)
dc.rightsAttribution 4.0 International*
dc.rights.urihttp://creativecommons.org/licenses/by/4.0/*
dc.titleDetecting argument selection defectsen
dc.typeArticle
prism.endingPage22
prism.issueIdentifierOOPSLAen
prism.publicationDate2017en
prism.publicationNameProceedings of the ACM on Programming Languagesen
prism.startingPage1
prism.volume1en
dc.identifier.doi10.17863/CAM.20406
dcterms.dateAccepted2017-08-11en
rioxxterms.versionofrecord10.1145/3133928en
rioxxterms.versionVoR*
rioxxterms.licenseref.urihttp://creativecommons.org/licenses/by/4.0/en
rioxxterms.licenseref.startdate2017-10-12en
dc.contributor.orcidRice, Andrew [0000-0002-4677-8032]
dc.identifier.eissn2475-1421
rioxxterms.typeJournal Article/Reviewen


Files in this item

Thumbnail
Thumbnail

This item appears in the following Collection(s)

Show simple item record

Attribution 4.0 International
Except where otherwise noted, this item's licence is described as Attribution 4.0 International