Please use this identifier to cite or link to this item: http://bura.brunel.ac.uk/handle/2438/30909
Full metadata record
DC FieldValueLanguage
dc.contributor.authorLi, J-
dc.contributor.authorLi, Y-
dc.contributor.authorLi, G-
dc.contributor.authorJin, Z-
dc.contributor.authorHao, Y-
dc.contributor.authorHu, X-
dc.coverage.spatialMelbourne, Australia-
dc.date.accessioned2025-03-14T19:41:06Z-
dc.date.available2025-03-14T19:41:06Z-
dc.date.issued2023-05-14-
dc.identifierORCiD: Yongmin Li https://orcid.org/0000-0003-1668-2440-
dc.identifierarXiv:2302.06144v4 [cs.SE]-
dc.identifier.citationLi, J. et al. (2023) 'SkCoder: A Sketch-based Approach for Automatic Code Generation', 2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE), Melbourne, Australia, 14-20 May, pp. 2124 - 2135. doi: 10.1109/icse48619.2023.00179.en_US
dc.identifier.isbn978-1-6654-5701-9 (ebk)-
dc.identifier.isbn978-1-6654-5702-6 (PoD)-
dc.identifier.issn0270-5257-
dc.identifier.urihttps://bura.brunel.ac.uk/handle/2438/30909-
dc.descriptionThe accepted manuscript is available at arXiv, arXiv:2302.06144v4 [cs.SE] for this version (https://doi.org/10.48550/arXiv.2302.06144). Comments: Accepted by the 45th IEEE/ACM International Conference on Software Engineering (ICSE 2023)-
dc.description.abstractRecently, deep learning techniques have shown great success in automatic code generation. Inspired by the code reuse, some researchers propose copy-based approaches that can copy the content from similar code snippets to obtain better performance. Practically, human developers recognize the content in the similar code that is relevant to their needs, which can be viewed as a code sketch. The sketch is further edited to the desired code. However, existing copy-based approaches ignore the code sketches and tend to repeat the similar code without necessary modifications, which leads to generating wrong results. In this paper, we propose a sketch-based code generation approach named Skcoderto mimic developers' code reuse behavior. Given a natural language requirement, Skcoderretrieves a similar code snippet, extracts relevant parts as a code sketch, and edits the sketch into the desired code. Our motivations are that the extracted sketch provides a well-formed pattern for telling models “how to write”. The post-editing further adds requirement-specific details into the sketch and outputs the complete code. We conduct experiments on two public datasets and a new dataset collected by this work. We compare our approach to 20 baselines using 5 widely used metrics. Experimental results show that (1) Skcodercan generate more correct programs, and outperforms the state-of-the-art -CodeT5-base by 30.30%, 35.39%, and 29.62% on three datasets. (2) Our approach is effective to multiple code generation models and improves them by up to 120.1% in Pass@l. (3) We investigate three plausible code sketches and discuss the importance of sketches. (4) We manually evaluate the generated code and prove the superiority of our Skcoderin three aspects.en_US
dc.description.sponsorshipThis research is supported by the National Key R&D Program under Grant No. 2021ZD0110303, the National Natural Science Foundation of China under Grant Nos. 62192731, 61751210, 62072007, 62192733, 61832009, and 62192730.en_US
dc.format.extent2124 - 2135-
dc.format.mediumPrint-Electronic-
dc.languageEnglish-
dc.language.isoen_USen_US
dc.publisherInstitute of Electrical and Electronics Engineers (IEEE)en_US
dc.rightsCopyright © 2023 The Author(s). arXiv.org - Non-exclusive license to distribute: The URI http://arxiv.org/licenses/nonexclusive-distrib/1.0/ is used to record the fact that the submitter granted the following license to arXiv.org on submission of an article: I grant arXiv.org a perpetual, non-exclusive license to distribute this article. I certify that I have the right to grant this license. I understand that submissions cannot be completely removed once accepted. I understand that arXiv.org reserves the right to reclassify or reject any submission.-
dc.rights.urihttps://arxiv.org/licenses/nonexclusive-distrib/1.0/license.html-
dc.source2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE)-
dc.source2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE)-
dc.subjectcode generationen_US
dc.subjectdeep learningen_US
dc.titleSkCoder: A Sketch-based Approach for Automatic Code Generationen_US
dc.typeConference Paperen_US
dc.identifier.doihttps://doi.org/10.1109/icse48619.2023.00179-
dc.relation.isPartOf2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE)-
pubs.finish-date2023-05-20-
pubs.finish-date2023-05-20-
pubs.publication-statusPublished-
pubs.start-date2023-05-14-
pubs.start-date2023-05-14-
dc.identifier.eissn1558-1225-
dcterms.dateAccepted2022-12-09-
dc.rights.holderThe Author(s)-
Appears in Collections:Dept of Computer Science Research Papers

Files in This Item:
File Description SizeFormat 
FullText.pdfCopyright © 2023 The Author(s). arXiv.org - Non-exclusive license to distribute: The URI http://arxiv.org/licenses/nonexclusive-distrib/1.0/ is used to record the fact that the submitter granted the following license to arXiv.org on submission of an article: I grant arXiv.org a perpetual, non-exclusive license to distribute this article. I certify that I have the right to grant this license. I understand that submissions cannot be completely removed once accepted. I understand that arXiv.org reserves the right to reclassify or reject any submission.665.45 kBAdobe PDFView/Open


Items in BURA are protected by copyright, with all rights reserved, unless otherwise indicated.