{"id":886404,"date":"2022-10-13T18:25:40","date_gmt":"2022-10-14T01:25:40","guid":{"rendered":"https:\/\/www.microsoft.com\/en-us\/research\/"},"modified":"2022-10-13T18:25:40","modified_gmt":"2022-10-14T01:25:40","slug":"race-retrieval-augmented-commit-message-generation","status":"publish","type":"msr-research-item","link":"https:\/\/www.microsoft.com\/en-us\/research\/publication\/race-retrieval-augmented-commit-message-generation\/","title":{"rendered":"RACE: Retrieval-augmented Commit Message Generation"},"content":{"rendered":"<p><span dir=\"ltr\" role=\"presentation\">Commit messages are important for software <\/span><span dir=\"ltr\" role=\"presentation\">development and maintenance.<\/span> <span dir=\"ltr\" role=\"presentation\">Many neural <\/span><span dir=\"ltr\" role=\"presentation\">network-based approaches have been proposed <\/span><span dir=\"ltr\" role=\"presentation\">and shown promising results on automatic com<\/span><span dir=\"ltr\" role=\"presentation\">mit message generation.<\/span> <span dir=\"ltr\" role=\"presentation\">However, the gener<\/span><span dir=\"ltr\" role=\"presentation\">ated commit messages could be repetitive or <\/span><span dir=\"ltr\" role=\"presentation\">redundant. In this paper, we propose RACE, a <\/span><span dir=\"ltr\" role=\"presentation\">new retrieval-augmented neural commit mes<\/span><span dir=\"ltr\" role=\"presentation\">sage<\/span> <span dir=\"ltr\" role=\"presentation\">generation<\/span> <span dir=\"ltr\" role=\"presentation\">method,<\/span> <span dir=\"ltr\" role=\"presentation\">which<\/span> <span dir=\"ltr\" role=\"presentation\">treats<\/span> <span dir=\"ltr\" role=\"presentation\">the<\/span> <span dir=\"ltr\" role=\"presentation\">re<\/span><span dir=\"ltr\" role=\"presentation\">trieved<\/span> <span dir=\"ltr\" role=\"presentation\">similar<\/span> <span dir=\"ltr\" role=\"presentation\">commit<\/span> <span dir=\"ltr\" role=\"presentation\">as<\/span> <span dir=\"ltr\" role=\"presentation\">an<\/span> <span dir=\"ltr\" role=\"presentation\">exemplar<\/span> <span dir=\"ltr\" role=\"presentation\">and <\/span><span dir=\"ltr\" role=\"presentation\">leverages<\/span> <span dir=\"ltr\" role=\"presentation\">it<\/span> <span dir=\"ltr\" role=\"presentation\">to<\/span> <span dir=\"ltr\" role=\"presentation\">generate<\/span> <span dir=\"ltr\" role=\"presentation\">an<\/span> <span dir=\"ltr\" role=\"presentation\">accurate<\/span> <span dir=\"ltr\" role=\"presentation\">commit <\/span><span dir=\"ltr\" role=\"presentation\">message.<\/span> <span dir=\"ltr\" role=\"presentation\">As<\/span> <span dir=\"ltr\" role=\"presentation\">the<\/span> <span dir=\"ltr\" role=\"presentation\">retrieved<\/span> <span dir=\"ltr\" role=\"presentation\">commit<\/span> <span dir=\"ltr\" role=\"presentation\">message <\/span><span dir=\"ltr\" role=\"presentation\">may<\/span> <span dir=\"ltr\" role=\"presentation\">not<\/span> <span dir=\"ltr\" role=\"presentation\">always<\/span> <span dir=\"ltr\" role=\"presentation\">accurately<\/span> <span dir=\"ltr\" role=\"presentation\">describe<\/span> <span dir=\"ltr\" role=\"presentation\">the<\/span> <span dir=\"ltr\" role=\"presentation\">con<\/span><span dir=\"ltr\" role=\"presentation\">tent\/intent<\/span> <span dir=\"ltr\" role=\"presentation\">of<\/span> <span dir=\"ltr\" role=\"presentation\">the<\/span> <span dir=\"ltr\" role=\"presentation\">current<\/span> <span dir=\"ltr\" role=\"presentation\">code<\/span> <span dir=\"ltr\" role=\"presentation\">diff,<\/span> <span dir=\"ltr\" role=\"presentation\">we<\/span> <span dir=\"ltr\" role=\"presentation\">also <\/span><span dir=\"ltr\" role=\"presentation\">propose an<\/span> <span dir=\"ltr\" role=\"presentation\">exemplar guider<\/span><span dir=\"ltr\" role=\"presentation\">, which learns the <\/span><span dir=\"ltr\" role=\"presentation\">semantic similarity between the retrieved and <\/span><span dir=\"ltr\" role=\"presentation\">current code diff and then guides the generation <\/span><span dir=\"ltr\" role=\"presentation\">of commit message based on the similarity. We <\/span><span dir=\"ltr\" role=\"presentation\">conduct extensive experiments on a large pub<\/span><span dir=\"ltr\" role=\"presentation\">lic dataset with five programming languages. <\/span><span dir=\"ltr\" role=\"presentation\">Experimental results show that RACE can out<\/span><span dir=\"ltr\" role=\"presentation\">perform<\/span> <span dir=\"ltr\" role=\"presentation\">all<\/span> <span dir=\"ltr\" role=\"presentation\">baselines.<\/span> <span dir=\"ltr\" role=\"presentation\">Furthermore,<\/span> <span dir=\"ltr\" role=\"presentation\">RACE <\/span><span dir=\"ltr\" role=\"presentation\">can boost the performance of existing Seq2Seq <\/span><span dir=\"ltr\" role=\"presentation\">models in commit message generation.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Commit messages are important for software development and maintenance. Many neural network-based approaches have been proposed and shown promising results on automatic commit message generation. However, the generated commit messages could be repetitive or redundant. In this paper, we propose RACE, a new retrieval-augmented neural commit message generation method, which treats the retrieved similar commit [&hellip;]<\/p>\n","protected":false},"featured_media":0,"template":"","meta":{"msr-url-field":"","msr-podcast-episode":"","msrModifiedDate":"","msrModifiedDateEnabled":false,"ep_exclude_from_search":false,"_classifai_error":"","msr-author-ordering":null,"msr_publishername":"","msr_publisher_other":"","msr_booktitle":"","msr_chapter":"","msr_edition":"","msr_editors":"","msr_how_published":"","msr_isbn":"","msr_issue":"","msr_journal":"","msr_number":"","msr_organization":"","msr_pages_string":"","msr_page_range_start":"","msr_page_range_end":"","msr_series":"","msr_volume":"","msr_copyright":"","msr_conference_name":"The 2022 Conference on Empirical Methods in Natural Language Processing (EMNLP'22)","msr_doi":"","msr_arxiv_id":"","msr_s2_paper_id":"","msr_mag_id":"","msr_pubmed_id":"","msr_other_authors":"","msr_other_contributors":"","msr_speaker":"","msr_award":"","msr_affiliation":"","msr_institution":"","msr_host":"","msr_version":"","msr_duration":"","msr_original_fields_of_study":"","msr_release_tracker_id":"","msr_s2_match_type":"","msr_citation_count_updated":"","msr_published_date":"2022-12","msr_highlight_text":"","msr_notes":"","msr_longbiography":"","msr_publicationurl":"","msr_external_url":"","msr_secondary_video_url":"","msr_conference_url":"","msr_journal_url":"","msr_s2_pdf_url":"","msr_year":0,"msr_citation_count":0,"msr_influential_citations":0,"msr_reference_count":0,"msr_s2_match_confidence":0,"msr_microsoftintellectualproperty":true,"msr_s2_open_access":false,"msr_s2_author_ids":[],"msr_pub_ids":[],"msr_hide_image_in_river":0,"footnotes":""},"msr-research-highlight":[],"research-area":[13556,13560],"msr-publication-type":[193716],"msr-publisher":[],"msr-focus-area":[],"msr-locale":[268875],"msr-post-option":[],"msr-field-of-study":[],"msr-conference":[260143],"msr-journal":[],"msr-impact-theme":[],"msr-pillar":[],"class_list":["post-886404","msr-research-item","type-msr-research-item","status-publish","hentry","msr-research-area-artificial-intelligence","msr-research-area-programming-languages-software-engineering","msr-locale-en_us"],"msr_publishername":"","msr_edition":"","msr_affiliation":"","msr_published_date":"2022-12","msr_host":"","msr_duration":"","msr_version":"","msr_speaker":"","msr_other_contributors":"","msr_booktitle":"","msr_pages_string":"","msr_chapter":"","msr_isbn":"","msr_journal":"","msr_volume":"","msr_number":"","msr_editors":"","msr_series":"","msr_issue":"","msr_organization":"","msr_how_published":"","msr_notes":"","msr_highlight_text":"","msr_release_tracker_id":"","msr_original_fields_of_study":"","msr_download_urls":"","msr_external_url":"","msr_secondary_video_url":"","msr_longbiography":"","msr_microsoftintellectualproperty":1,"msr_main_download":"","msr_publicationurl":"","msr_doi":"","msr_publication_uploader":[{"type":"url","viewUrl":"false","id":"false","title":"https:\/\/arxiv.org\/abs\/2203.02700","label_id":"252679","label":0}],"msr_related_uploader":"","msr_citation_count":0,"msr_citation_count_updated":"","msr_s2_paper_id":"","msr_influential_citations":0,"msr_reference_count":0,"msr_arxiv_id":"","msr_s2_author_ids":[],"msr_s2_open_access":false,"msr_s2_pdf_url":null,"msr_attachments":[],"msr-author-ordering":[{"type":"text","value":"Ensheng Shi","user_id":0,"rest_url":false},{"type":"text","value":"Yanlin Wang","user_id":0,"rest_url":false},{"type":"user_nicename","value":"Lun Du","user_id":39144,"rest_url":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/microsoft-research\/v1\/researchers?person=Lun Du"},{"type":"text","value":"Hongyu Zhang","user_id":0,"rest_url":false},{"type":"user_nicename","value":"Shi Han","user_id":33618,"rest_url":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/microsoft-research\/v1\/researchers?person=Shi Han"},{"type":"user_nicename","value":"Dongmei Zhang","user_id":31665,"rest_url":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/microsoft-research\/v1\/researchers?person=Dongmei Zhang"},{"type":"text","value":"Hongbin Sun","user_id":0,"rest_url":false}],"msr_impact_theme":[],"msr_research_lab":[199560],"msr_event":[886398],"msr_group":[714577],"msr_project":[],"publication":[],"video":[],"msr-tool":[],"msr_publication_type":"inproceedings","related_content":[],"_links":{"self":[{"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-research-item\/886404","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-research-item"}],"about":[{"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/types\/msr-research-item"}],"version-history":[{"count":1,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-research-item\/886404\/revisions"}],"predecessor-version":[{"id":886407,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-research-item\/886404\/revisions\/886407"}],"wp:attachment":[{"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/media?parent=886404"}],"wp:term":[{"taxonomy":"msr-research-highlight","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-research-highlight?post=886404"},{"taxonomy":"msr-research-area","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/research-area?post=886404"},{"taxonomy":"msr-publication-type","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-publication-type?post=886404"},{"taxonomy":"msr-publisher","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-publisher?post=886404"},{"taxonomy":"msr-focus-area","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-focus-area?post=886404"},{"taxonomy":"msr-locale","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-locale?post=886404"},{"taxonomy":"msr-post-option","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-post-option?post=886404"},{"taxonomy":"msr-field-of-study","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-field-of-study?post=886404"},{"taxonomy":"msr-conference","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-conference?post=886404"},{"taxonomy":"msr-journal","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-journal?post=886404"},{"taxonomy":"msr-impact-theme","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-impact-theme?post=886404"},{"taxonomy":"msr-pillar","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-pillar?post=886404"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}