{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/can-we-learn-from-developer-mistakes-learning","title":"Can we learn from developer mistakes? Learning to localize and repair real bugs from real bug fixes","arxiv_id":"2207.00301","date":"2022-07-01","proceeding":null,"authors":["Cedric Richter","Heike Wehrheim"],"abstract":"Real bug fixes found in open source repositories seem to be the perfect source for learning to localize and repair real bugs. However, the absence of large scale bug fix collections has made it difficult to effectively exploit real bug fixes in the training of larger neural models in the past. In contrast, artificial bugs -- produced by mutating existing source code -- can be easily obtained at a sufficient scale and are therefore often preferred in the training of existing approaches. Still, localization and repair models that are trained on artificial bugs usually underperform when faced with real bugs. This raises the question whether bug localization and repair models trained on real bug fixes are more effective in localizing and repairing real bugs. We address this question by introducing RealiT, a pre-train-and-fine-tune approach for effectively learning to localize and repair real bugs from real bug fixes. RealiT is first pre-trained on a large number of artificial bugs produced by traditional mutation operators and then fine-tuned on a smaller set of real bug fixes. Fine-tuning does not require any modifications of the learning algorithm and hence can be easily adopted in various training scenarios for bug localization or repair (even when real training data is scarce). In addition, we found that training on real bug fixes with RealiT is empirically powerful by nearly doubling the localization performance of an existing model on real bugs while maintaining or even improving the repair performance.","url_abs":"https://arxiv.org/abs/2207.00301v1","url_pdf":"https://arxiv.org/pdf/2207.00301v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"can-we-learn-from-developer-mistakes-learning","repo_url":"https://github.com/cedricrupb/nbfbaselines","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[{"method_slug":"repair","method_name":"Repair"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2207.00301","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2207.00301"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/cedricrupb/nbfbaselines","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":13},"by_repo_kind":{"official":{"samples":13,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"3de1111ec7a95d67","entry":"beam_search","repo":"cedricrupb/nbfbaselines","repo_kind":"official","path":"nbfbaselines/nbfbase.py","file_url":"https://github.com/cedricrupb/nbfbaselines/blob/HEAD/nbfbaselines/nbfbase.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3de1111ec7a95d67"}},{"code_sha256_prefix":"99f7631d379a21ec","entry":"cluster_beam_search","repo":"cedricrupb/nbfbaselines","repo_kind":"official","path":"nbfbaselines/nbfbase.py","file_url":"https://github.com/cedricrupb/nbfbaselines/blob/HEAD/nbfbaselines/nbfbase.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"99f7631d379a21ec"}},{"code_sha256_prefix":"ca8e831b75f8c49b","entry":"compute_repair_cluster","repo":"cedricrupb/nbfbaselines","repo_kind":"official","path":"nbfbaselines/nbfbase.py","file_url":"https://github.com/cedricrupb/nbfbaselines/blob/HEAD/nbfbaselines/nbfbase.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ca8e831b75f8c49b"}},{"code_sha256_prefix":"8bec0b9f4c427128","entry":"config_from_model_size","repo":"cedricrupb/nbfbaselines","repo_kind":"official","path":"nbfbaselines/models/encoder/transformer.py","file_url":"https://github.com/cedricrupb/nbfbaselines/blob/HEAD/nbfbaselines/models/encoder/transformer.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8bec0b9f4c427128"}},{"code_sha256_prefix":"dbd8052b8ff6d85b","entry":"convert_target_to_mask","repo":"cedricrupb/nbfbaselines","repo_kind":"official","path":"nbfbaselines/models/heads.py","file_url":"https://github.com/cedricrupb/nbfbaselines/blob/HEAD/nbfbaselines/models/heads.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"dbd8052b8ff6d85b"}},{"code_sha256_prefix":"499aab65a443dd65","entry":"detect_to_hf_config","repo":"cedricrupb/nbfbaselines","repo_kind":"official","path":"nbfbaselines/models/encoder/transformer.py","file_url":"https://github.com/cedricrupb/nbfbaselines/blob/HEAD/nbfbaselines/models/encoder/transformer.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"499aab65a443dd65"}},{"code_sha256_prefix":"01d60c8ad17b5931","entry":"download_model","repo":"cedricrupb/nbfbaselines","repo_kind":"official","path":"nbfbaselines/utils.py","file_url":"https://github.com/cedricrupb/nbfbaselines/blob/HEAD/nbfbaselines/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"01d60c8ad17b5931"}},{"code_sha256_prefix":"438f85d475301aa5","entry":"embedding_from_config","repo":"cedricrupb/nbfbaselines","repo_kind":"official","path":"nbfbaselines/models/embeddings.py","file_url":"https://github.com/cedricrupb/nbfbaselines/blob/HEAD/nbfbaselines/models/embeddings.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"438f85d475301aa5"}},{"code_sha256_prefix":"89d1192e626d5f31","entry":"load_model_directory","repo":"cedricrupb/nbfbaselines","repo_kind":"official","path":"nbfbaselines/utils.py","file_url":"https://github.com/cedricrupb/nbfbaselines/blob/HEAD/nbfbaselines/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"89d1192e626d5f31"}},{"code_sha256_prefix":"fdde973d0528d05f","entry":"nbf_head_from_config","repo":"cedricrupb/nbfbaselines","repo_kind":"official","path":"nbfbaselines/models/heads.py","file_url":"https://github.com/cedricrupb/nbfbaselines/blob/HEAD/nbfbaselines/models/heads.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fdde973d0528d05f"}},{"code_sha256_prefix":"9a084ad2923860d1","entry":"pprint_simple","repo":"cedricrupb/nbfbaselines","repo_kind":"official","path":"nbfbaselines/tokenizer/code_tokenizer.py","file_url":"https://github.com/cedricrupb/nbfbaselines/blob/HEAD/nbfbaselines/tokenizer/code_tokenizer.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9a084ad2923860d1"}},{"code_sha256_prefix":"67a0d12451d90eb7","entry":"preprocessor_from_config","repo":"cedricrupb/nbfbaselines","repo_kind":"official","path":"nbfbaselines/tokenizer/preprocessors.py","file_url":"https://github.com/cedricrupb/nbfbaselines/blob/HEAD/nbfbaselines/tokenizer/preprocessors.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"67a0d12451d90eb7"}},{"code_sha256_prefix":"0cab7c1484be7abc","entry":"pretty_print","repo":"cedricrupb/nbfbaselines","repo_kind":"official","path":"nbfbaselines/tokenizer/code_tokenizer.py","file_url":"https://github.com/cedricrupb/nbfbaselines/blob/HEAD/nbfbaselines/tokenizer/code_tokenizer.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0cab7c1484be7abc"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}