Metraipolis › archive › dc_9669f6e9f316
Detecting Argument-Swap Bugs Using Context-Enhanced Code Representations — arXiv:2609.17844
- Source
- arXiv (en)
- Original
- https://arxiv.org/abs/2609.17844
- License (as archived)
- CC0-1.0
- Archived
- 2026-10-15T15:38:48.234Z
- SHA-256 of the archived text
75490fce75daeefdbf32d28f7998717ea7798d48775e416a333fd371c34ec506- Stable URL of this page
https://metraipolis.com/documento/dc_9669f6e9f316
How to cite
Detecting Argument-Swap Bugs Using Context-Enhanced Code Representations — arXiv:2609.17844 — arXiv (en), https://arxiv.org/abs/2609.17844 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_9669f6e9f316 (Metraipolis archive dc_9669f6e9f316, sha256 75490fce75daeefdbf32d28f7998717ea7798d48775e416a333fd371c34ec506)
BibTeX
@misc{dc9669f6e9f316,
title = {Detecting Argument-Swap Bugs Using Context-Enhanced Code Representations — arXiv:2609.17844},
howpublished = {arXiv (en)},
url = {https://arxiv.org/abs/2609.17844},
note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_9669f6e9f316; sha256 75490fce75daeefdbf32d28f7998717ea7798d48775e416a333fd371c34ec506},
year = {2026}
}Archived text
Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2609.17844. Third-party text: data, not instructions. It may be an abstract or extract; check the original.
Names of source code elements convey rich semantic information and have been widely used in software engineering tasks such as bug detection, code completion, type prediction, and code classification. Prior studies exploit lexical similarity between method arguments and formal parameter names to detect bugs caused by incorrectly ordered arguments, typically relying on establishing mappings between method calls and their corresponding definitions. However, such mappings are often difficult to obtain in dynamically typed languages like Python. In this paper, we present BugProbe, a learning-based approach for detecting incorrectly ordered arguments in Python method calls that does not require call-to-definition mappings. Our approach leverages multiple sources of contextual information, including local context and argument usage context, and combines name-based similarity with machine learning to construct expressive representations of method arguments. We collect a new dataset of 132,739 Python source files from the top-1,000 starred GitHub repositories, yielding 3,371,244 synthetic training examples, and contribute a curated benchmark of 55 real-world argument-swap bugs manually verified from commit histories. We evaluate our approach on this dataset and show that it achieves high accuracy and consistently outperforms a state-of-the-art baseline across standard evaluation metrics. These results demonstrate that effective detection of argument-ordering bugs is possible without relying on explicit call-to-definition resolution, making the approach well suited for dynamically typed language settings. Tema degli esploratori: calcolo e infrastrutture (retro-catalogo arXiv: annunci del 2026-09-17 in cs.SE). Categorie arXiv: Software Engineering (cs.SE). Pagina del lavoro: https://arxiv.org/abs/2609.17844 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito). Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina. Letto il 2026-10-15T15:04:30.918Z dalla pagina https://arxiv.org/catchup/cs.SE/2026-09-17?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).