Papers › Retrieval Augmented Code Generation and Summarization

Retrieval Augmented Code Generation and Summarization

26 Aug 2021Findings (EMNLP) 2021 11arXiv:2108.11601archive 2025-07-28

Md Rizwan Parvez, Wasi Uddin Ahmad, Saikat Chakraborty, Baishakhi Ray, Kai-Wei Chang

Software developers write a lot of source code and documentation during software development. Intrinsically, developers often recall parts of source code or code summaries that they had written in the past while implementing software or documenting them. To mimic developers' code or summary generation behavior, we propose a retrieval augmented framework, REDCODER, that retrieves relevant code or summaries from a retrieval database and provides them as a supplement to code generation or summarization models. REDCODER has a couple of uniqueness. First, it extends the state-of-the-art dense retrieval technique to search for relevant code or summaries. Second, it can work with retrieval databases that include unimodal (only code or natural language description) or bimodal instances (code-description pairs). We conduct experiments and extensive analysis on two benchmark datasets of code generation and summarization in Java and Python, and the promising results endorse the effectiveness of our proposed retrieval augmented framework.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2108.11601")

Code

Syntology Ran 2 of 3 code samples harvested from 1 repository linked to this paper; 1 has no recorded run. Of those that ran: 1 ran · honoured contract; 1 ran · our draft was wrong.

By repository: official repository: 3 samples from 1 repository, 2 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

rizwan09/redcoder officialmentioned in papermentioned on GitHubpytorchNOASSERTION report
kagnlp/CodeGenerator mentioned on GitHubMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

3 samples harvested; 2 ran; 1 honoured the contract we drafted; 1 has no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
1ran · our draft was wrong
1unverified

Licence: 3 of the 3 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from rizwan09/redcoder. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: 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. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

count_file_lines rizwan09/redcoder/SCODE-G/code_to_text/dpr_process.py official repository ran · honoured contract licence not identified · pointer only · 37b63f7e859b05e6 · report
get_masked_sent rizwan09/redcoder/SCODE-G/code_to_text/dpr_process.py official repository ran · our draft was wrong fingerprinted licence not identified · pointer only · a78bc2e70d6d5dd9 · report
load_passages rizwan09/redcoder/SCODE-R/dense_retriever.py official repository unverified licence not identified · pointer only · 29110d0c54b68187 · report

Tasks

Code GenerationCode SummarizationRetrieval

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Code Generation CONCODE Redcoder-ext BLEU 42.5 #1 of 2 Archive leaderboard report
Code Generation CONCODE Redcoder-ext CodeBLEU 43.4 #1 of 2 Archive leaderboard report
Code Generation CONCODE Redcoder-ext Exact Match 23.4 #1 of 2 Archive leaderboard report
Code Generation CodeXGLUE - CodeSearchNet Redcoder-ext Java/BLEU 28.98 #1 of 2 Archive leaderboard report
Code Generation CodeXGLUE - CodeSearchNet Redcoder-ext Java/CodeBLEU 33.18 #1 of 2 Archive leaderboard report
Code Generation CodeXGLUE - CodeSearchNet Redcoder-ext Java/EM 10.21 #1 of 2 Archive leaderboard report
Code Generation CodeXGLUE - CodeSearchNet Redcoder-ext Python/BLEU 24.43 #1 of 2 Archive leaderboard report
Code Generation CodeXGLUE - CodeSearchNet Redcoder-ext Python/CodeBLEU 30.21 #1 of 2 Archive leaderboard report
Code Generation CodeXGLUE - CodeSearchNet Redcoder-ext Python/EM 9.61 #1 of 2 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections