Show simple item record

dc.contributor.authorRobati Shirzad, Mohammad
dc.contributor.authorLam, Patrick
dc.date.accessioned2024-02-22 21:01:10 (GMT)
dc.date.available2024-02-22 21:01:10 (GMT)
dc.date.issued2024-02-12
dc.identifier.urihttps://doi.org/10.1007/s10664-023-10437-1
dc.identifier.urihttp://hdl.handle.net/10012/20360
dc.descriptionThis version of the article has been accepted for publication, after peer review (when applicable) and is subject to Springer Nature’s AM terms of use, but is not the Version of Record and does not reflect post-acceptance improvements, or any corrections. The Version of Record is available online at: http://dx.doi.org/10.1007/s10664-023-10437-1en
dc.description.abstractRust is a relatively new programming language which allows programmers to write programs that have low-level control over resources while still ensuring high-level safety guarantees (for programs written in safe Rust). Rust’s ownership framework enables programs to meet these two seemingly-contradictory goals. The Rust compiler’s Borrow-Checker component enforces the ownership framework requirements that ensure Rust’s safety guarantees. Rust is popular: as of 2022, it has ranked first, for the seventh consecutive year, in Stack Overflow’s annual Developer Survey as the most-loved programming language. The number of Rust developers is growing as the need for faster and safer software increases. Yet, to our knowledge, no research has sought to identify the most pervasive bug fix patterns within Rust programs. In this project, we introduce Ruxanne, a tool for analyzing and extracting fix patterns in Rust. Ruxanne implements a novel embedding of Rust code into fixed-sized vectors. Using Ruxanne, we mined the top 18 most-starred Rust projects in GitHub to discover the most common bug fix patterns committed to their repositories. We analyzed 87,726 code changes drawn from 57,214 commits across these 18 projects. After clustering the code changes, and conducting a manual analysis, we identified 20 groups of cross-project bug fix patterns, which we categorize as (1) general patterns and (2) borrow-checker-related patterns. Among the general patterns, the most frequently observed pattern is when the user either adds or removes struct fields. In the case of borrow-checker-related patterns, the most common pattern we encountered is when the user removes a clone() call. We describe all detected patterns and their implications to automated program repair.en
dc.description.sponsorshipWe have no competing interests and are funded by a Discovery Grant from Canada’s Natural Science and Engineering Research Council.en
dc.language.isoenen
dc.publisherSpringeren
dc.relation.ispartofseriesEmpirical Software Engineering;29:44
dc.relation.urihttps://zenodo.org/record/8052979en
dc.subjectbug patternsen
dc.subjectpattern miningen
dc.subjectbug fix changesen
dc.subjectRusten
dc.titleA study of common bug fix patterns in Rusten
dc.typeArticleen
dcterms.bibliographicCitationRobati Shirzad, M., & Lam, P. (2024). A study of common bug fix patterns in rust. Empirical Software Engineering, 29(2). https://doi.org/10.1007/s10664-023-10437-1en
uws.contributor.affiliation1Faculty of Engineeringen
uws.contributor.affiliation2Electrical and Computer Engineeringen
uws.typeOfResourceTexten
uws.peerReviewStatusRevieweden
uws.scholarLevelFacultyen
uws.scholarLevelGraduateen


Files in this item

Thumbnail

This item appears in the following Collection(s)

Show simple item record


UWSpace

University of Waterloo Library
200 University Avenue West
Waterloo, Ontario, Canada N2L 3G1
519 888 4883

All items in UWSpace are protected by copyright, with all rights reserved.

DSpace software

Service outages