{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,7,8]],"date-time":"2026-07-08T16:05:34Z","timestamp":1783526734190,"version":"3.55.0"},"reference-count":30,"publisher":"Association for Computing Machinery (ACM)","issue":"OOPSLA","license":[{"start":{"date-parts":[[2019,10,10]],"date-time":"2019-10-10T00:00:00Z","timestamp":1570665600000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2019,10,10]]},"abstract":"<jats:p>Static analyzers help find bugs early by warning about recurring bug categories. While fixing these bugs still remains a mostly manual task in practice, we observe that fixes for a specific bug category often are repetitive. This paper addresses the problem of automatically fixing instances of common bugs by learning from past fixes. We present Getafix, an approach that produces human-like fixes while being fast enough to suggest fixes in time proportional to the amount of time needed to obtain static analysis results in the first place.<\/jats:p>\n          <jats:p>Getafix is based on a novel hierarchical clustering algorithm that summarizes fix patterns into a hierarchy ranging from general to specific patterns. Instead of an expensive exploration of a potentially large space of candidate fixes, Getafix uses a simple yet effective ranking technique that uses the context of a code change to select the most appropriate fix for a given bug.<\/jats:p>\n          <jats:p>Our evaluation applies Getafix to 1,268 bug fixes for six bug categories reported by popular static analyzers for Java, including null dereferences, incorrect API calls, and misuses of particular language constructs. The approach predicts exactly the human-written fix as the top-most suggestion between 12% and 91% of the time, depending on the bug category. The top-5 suggestions contain fixes for 526 of the 1,268 bugs. Moreover, we report on deploying the approach within Facebook, where it contributes to the reliability of software used by billions of people. To the best of our knowledge, Getafix is the first industrially-deployed automated bug-fixing tool that learns fix patterns from past, human-written fixes to produce human-like fixes.<\/jats:p>","DOI":"10.1145\/3360585","type":"journal-article","created":{"date-parts":[[2019,10,11]],"date-time":"2019-10-11T14:53:33Z","timestamp":1570805613000},"page":"1-27","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":183,"title":["Getafix: learning to fix bugs automatically"],"prefix":"10.1145","volume":"3","author":[{"given":"Johannes","family":"Bader","sequence":"first","affiliation":[{"name":"Facebook, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Andrew","family":"Scott","sequence":"additional","affiliation":[{"name":"Facebook, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Michael","family":"Pradel","sequence":"additional","affiliation":[{"name":"Facebook, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Satish","family":"Chandra","sequence":"additional","affiliation":[{"name":"Facebook, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2019,10,10]]},"reference":[{"key":"e_1_2_1_1_1","doi-asserted-by":"publisher","DOI":"10.1109\/SCAM.2012.28"},{"key":"e_1_2_1_2_1","doi-asserted-by":"publisher","DOI":"10.1145\/3212695"},{"key":"e_1_2_1_3_1","volume-title":"Construction d\u2019une classification ascendante hi\u00e9rarchique par la recherche en cha\u00eene des voisins r\u00e9ciproques. Cahiers de l\u2019analyse des donn\u00e9es 7, 2","author":"Benz\u00e9cri Jean-Paul","year":"1982"},{"key":"e_1_2_1_4_1","doi-asserted-by":"publisher","DOI":"10.1145\/3106237.3106280"},{"key":"e_1_2_1_5_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-17524-9_1"},{"key":"e_1_2_1_6_1","doi-asserted-by":"publisher","DOI":"10.1145\/2970276.2970347"},{"key":"e_1_2_1_7_1","volume-title":"Npefix: Automatic runtime repair of null pointer exceptions in java. arXiv preprint arXiv:1512.07423","author":"Cornu Benoit","year":"2015"},{"key":"e_1_2_1_8_1","volume-title":"Semantic Code Repair using Neuro-Symbolic Transformation Networks. CoRR abs\/1710.11054","author":"Devlin Jacob","year":"2017"},{"key":"e_1_2_1_9_1","doi-asserted-by":"publisher","DOI":"10.1145\/2642937.2642982"},{"key":"e_1_2_1_10_1","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2011.104"},{"key":"e_1_2_1_11_1","volume-title":"Automated Program Repair. Commun. ACM","author":"Goues Claire Le","year":"2019"},{"key":"e_1_2_1_12_1","doi-asserted-by":"crossref","unstructured":"Rahul Gupta Soham Pal Aditya Kanade and Shirish Shevade. 2017. DeepFix: Fixing Common C Language Errors by Deep Learning. In AAAI.  Rahul Gupta Soham Pal Aditya Kanade and Shirish Shevade. 2017. DeepFix: Fixing Common C Language Errors by Deep Learning. In AAAI.","DOI":"10.1609\/aaai.v31i1.10742"},{"key":"e_1_2_1_13_1","volume-title":"Towards Practical Program Repair with On-demand Candidate Generation. 2018 IEEE\/ACM 40th International Conference on Software Engineering (ICSE)","author":"Hua Jinru","year":"2018"},{"key":"e_1_2_1_14_1","doi-asserted-by":"publisher","DOI":"10.5555\/2486788.2486893"},{"key":"e_1_2_1_15_1","doi-asserted-by":"publisher","DOI":"10.1007\/s10817-013-9285-6"},{"key":"e_1_2_1_16_1","volume-title":"History Driven Program Repair. 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER) 1","author":"Le Xuan-Bach D.","year":"2016"},{"key":"e_1_2_1_17_1","doi-asserted-by":"publisher","DOI":"10.1145\/3106237.3106253"},{"key":"e_1_2_1_18_1","doi-asserted-by":"publisher","DOI":"10.1145\/2837614.2837617"},{"key":"e_1_2_1_19_1","doi-asserted-by":"crossref","unstructured":"Alexandru Marginean Johannes Bader Satish Chandra Mark Harman Yue Jia Ke Mao Alexander Mols and Andrew Scott. 2019. SapFix: Automated End-to-End Repair at Scale (ICSE-SEIP \u201919).  Alexandru Marginean Johannes Bader Satish Chandra Mark Harman Yue Jia Ke Mao Alexander Mols and Andrew Scott. 2019. SapFix: Automated End-to-End Repair at Scale (ICSE-SEIP \u201919).","DOI":"10.1109\/ICSE-SEIP.2019.00039"},{"key":"e_1_2_1_21_1","doi-asserted-by":"publisher","DOI":"10.1007\/s10664-013-9282-8"},{"key":"e_1_2_1_22_1","doi-asserted-by":"crossref","unstructured":"Matias Martinez and Martin Monperrus. 2018. Coming: a Tool for Mining Change Pattern Instances from Git Commits. arXiv: arXiv:1810.08532  Matias Martinez and Martin Monperrus. 2018. Coming: a Tool for Mining Change Pattern Instances from Git Commits. arXiv: arXiv:1810.08532","DOI":"10.1109\/ICSE-Companion.2019.00043"},{"key":"e_1_2_1_23_1","doi-asserted-by":"publisher","DOI":"10.1145\/2814270.2814310"},{"key":"e_1_2_1_24_1","volume-title":"DeepBugs: A Learning Approach to Name-based Bug Detection. CoRR abs\/1805.11683","author":"Pradel Michael","year":"2018"},{"key":"e_1_2_1_25_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2017.44"},{"key":"e_1_2_1_26_1","volume-title":"Learning Quick Fixes from Code Repositories. CoRR abs\/1803.03806","author":"Rolim Reudismam","year":"2018"},{"key":"e_1_2_1_27_1","doi-asserted-by":"publisher","DOI":"10.1109\/SANER.2018.8330211"},{"key":"e_1_2_1_28_1","doi-asserted-by":"publisher","DOI":"10.1145\/2901739.2903495"},{"key":"e_1_2_1_29_1","doi-asserted-by":"publisher","DOI":"10.1145\/3192366.3192384"},{"key":"e_1_2_1_30_1","volume-title":"Context-Aware Patch Generation for Better Automated Program Repair. 2018 IEEE\/ACM 40th International Conference on Software Engineering (ICSE)","author":"Wen Ming","year":"2018"},{"key":"e_1_2_1_31_1","volume-title":"Marc Brockschmidt Miltiadis Allamanis and, and Alexander L. Gaunt","author":"Yin Pengcheng","year":"2018"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3360585","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3360585","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,17]],"date-time":"2025-06-17T23:22:59Z","timestamp":1750202579000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3360585"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2019,10,10]]},"references-count":30,"journal-issue":{"issue":"OOPSLA","published-print":{"date-parts":[[2019,10,10]]}},"alternative-id":["10.1145\/3360585"],"URL":"https:\/\/doi.org\/10.1145\/3360585","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2019,10,10]]},"assertion":[{"value":"2019-10-10","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}