This is the first step of the SWE-smith Multilingual effort - expanding SWE-Smith to support non-Python programming languages, starting with JavaScript.
SWE-Smith is a tool for synthesizing realistic bugs in software repositories. By applying procedural modifications to working code (like flipping operators or swapping function arguments), it creates bugs that break tests - providing training data for code repair models and evaluation benchmarks.
Until now, SWE-Smith only supported Python. This expansion brings the same capabilities to JavaScript.
The most productive repository was josdejong/mathjs, which features lots of arithmetic operations and comprehensive unit tests - an ideal combination for procedural bug generation. It produced 845 validated patches with a 62.8% pass rate.
We implemented 14 procedural modifiers for JavaScript. The func_pm_op_flip modifier emerged as the
most productive, generating 1,117 validated patches - nearly double the next best modifier. This makes sense:
flipping binary operators (e.g., === to !==, < to >=,
&& to ||) applies to a wide range of expressions found across all repositories.
Previously, running bug generation at scale meant days of local compute. We now run the entire pipeline on Modal, reducing this to hours.
The pipeline:
Here's what to expect in the coming months:
Brought to you by: Priyank Shethia, Arpandeep Khatua, Rishi Desai, Zhehao Li, Andrew Crump, John Yang