Skip to main content
Back to Blog
AI/MLProgramming LanguagesWeb Development
10 August 20268 min readUpdated 24 August 2026

SWE-Smith Expands to JavaScript with 6,099 Validated Bug Patches

SWE Smith Expands to JavaScript with 6,099 Validated Bug Patches The SWE Smith Multilingual project is extending SWE bench style task collection beyond Python. Its first expansi...

By Software Development Team

SWE-Smith Expands to JavaScript with 6,099 Validated Bug Patches

The SWE-Smith Multilingual project is extending SWE-bench-style task collection beyond Python. Its first expansion adds JavaScript support to SWE-Smith, producing and validating 6,099 synthetic bug patches across 74 popular JavaScript repositories.

The project’s planned work includes:

  1. Adding automatic repository installation and procedural modifications for JavaScript, TypeScript, Java, Rust, Golang, and C++.
  2. Running language-model-based bug-generation methods across the added repositories.
  3. Studying how programming languages and repositories affect model training dynamics and downstream coding-task performance.
  4. Exploring additional bug-generation strategies for SWE-Smith.

This report focuses on the JavaScript expansion.

Key Results

  • 6,099 validated patches from 35,697 generated patches, a 17% validation rate
  • 14 procedural modifiers for JavaScript bug generation
  • An end-to-end Modal pipeline that reduces generation time from days to hours
  • A Hugging Face dataset

What Is SWE-Smith?

SWE-Smith synthesizes realistic bugs in software repositories. It applies procedural modifications to working code, such as changing operators or swapping function arguments, to create defects that cause tests to fail. These patches can provide training data for code-repair models and tasks for evaluation benchmarks.

Previously, SWE-Smith supported only Python. The JavaScript expansion applies the same approach to JavaScript repositories.

Results by Repository

josdejong/mathjs produced the most validated patches. Its extensive arithmetic code and comprehensive unit tests provide conditions well suited to procedural bug generation. The repository produced 845 validated patches from 1,346 generated patches, for a 62.8% pass rate.

The other leading repositories were novnc/noVNC, Automattic/mongoose, bootstrap-vue/bootstrap-vue, and foliojs/pdfkit.

Highest-Producing Repositories

RepositoryGeneratedValidatedPass Rate
josdejong/mathjs1,34684562.8%
novnc/noVNC1,38471551.7%
Automattic/mongoose1,44065345.3%
bootstrap-vue/bootstrap-vue1,07949245.7%
foliojs/pdfkit79740851.2%

All 74 Repositories

RepositoryGeneratedValidatedPass Rate
josdejong/mathjs1,34684562.8%
novnc/noVNC1,38471551.7%
Automattic/mongoose1,44065345.3%
bootstrap-vue/bootstrap-vue1,07949245.7%
foliojs/pdfkit79740851.2%
bpampuch/pdfmake1,96126413.5%
caolan/async64523336.3%
enzymejs/enzyme81922830.6%
Netflix/falcor1,04616615.9%
nock/nock33716147.8%
redux-saga/redux-saga27715355.4%
sveltejs/svelte27415155.1%
necolas/react-native-web50613426.5%
axios/axios30413343.8%
websockets/ws38413135.2%
svg/svgo17112673.7%
nightwatchjs/nightwatch96312112.6%
emotion-js/emotion21011353.8%
josdejong/jsoneditor92011112.1%
mochajs/mocha40210826.9%
iamkun/dayjs1739957.6%
brianc/node-postgres3199730.4%
Shopify/draggable2229040.5%
welldone-software/why-did-you-render1626640.7%
balderdashy/sails1576138.9%
reactjs/react-transition-group954951.6%
remy/nodemon2124722.2%
advplyr/audiobookshelf1,590452.8%
segmentio/evergreen1144136.0%
webpack/webpack3033110.2%
jantimon/html-webpack-plugin143139.1%
babel/babel78911.7%
mholt/PapaParse42230.7%
marko-js/marko25520.8%
11ty/eleventy1,03200.0%
GoogleChrome/workbox8800.0%
HabitRPG/habitica28400.0%
Modernizr/Modernizr22500.0%
Qix-/color3500.0%
Unitech/pm289800.0%
akiran/react-slick4000.0%
davila7/claude-code-templates1,35700.0%
diegomura/react-pdf63100.0%
elbywan/wretch700.0%
expressjs/express3100.0%
expressjs/multer4400.0%
facebookexperimental/Recoil17800.0%
forwardemail/superagent6800.0%
forwardemail/supertest300.0%
gka/chroma.js3300.0%
hakimel/reveal.js1,96500.0%
handsontable/handsontable50200.0%
hapijs/joi65000.0%
highlightjs/highlight.js75900.0%
immutable-js/immutable-js63600.0%
impress/impress.js11400.0%
jashkenas/backbone700.0%
jquery/jquery45400.0%
koajs/koa9700.0%
kriskowal/q12800.0%
layui/layui10500.0%
louislam/uptime-kuma1,22700.0%
mdx-js/mdx24200.0%
mrdoob/three.js000.0%
mui/material-ui11300.0%
parallax/jsPDF8500.0%
piskelapp/piskel1,13100.0%
pqina/filepond600.0%
remarkjs/react-markdown4300.0%
serverless/serverless1,14400.0%
sql-js/sql.js800.0%
tj/commander.js32100.0%
usebruno/bruno96200.0%
webtorrent/webtorrent53400.0%

Half of the 74 repositories produced no validated patches:

  • 20 repositories failed during pre-gold validation because test results were not parsed correctly.
  • 20 repositories produced too few patches, fewer than 50, making validation costs outweigh their contribution.

Modifier Effectiveness

The JavaScript implementation includes 14 procedural modifiers. Their results varied considerably.

Leading Modifiers

ModifierGeneratedValidatedPass Rate
func_pm_op_flip5,3801,11730.8%
func_pm_arg_swap3,22872232.7%
func_pm_remove_assign3,60263225.4%
func_pm_remove_cond4,00960421.9%
func_pm_ctrl_invert_if1,89049035.7%

The func_pm_op_flip modifier generated the most validated patches, with 1,117, nearly twice as many as the next most productive modifier. It changes binary operators, including === to !==, < to >=, and && to ||, allowing it to apply to many expressions across the repositories.

All 14 Modifiers

ModifierDescriptionGeneratedValidatedPass Rate
func_pm_op_flipFlip binary operators5,3801,11730.8%
func_pm_arg_swapSwap function arguments3,22872232.7%
func_pm_remove_assignRemove assignments3,60263225.4%
func_pm_remove_condRemove conditionals4,00960421.9%
func_pm_ctrl_invert_ifSwap if/else branches1,89049035.7%
func_pm_op_change_constModify numeric constants2,55948728.6%
func_pm_op_swapSwap operands4,94544313.2%
func_pm_op_changeChange operators (+, -, *, /)2,15733625.4%
func_pm_op_break_chainsBreak chained operations2,34330418.9%
func_pm_ternary_swapSwap ternary branches1,44227727.6%
func_pm_remove_loopRemove loop constructs1,35625324.6%
func_pm_remove_ternaryRemove ternary expressions1,33518520.4%
func_pm_aug_assign_swapSwap augmented assignments1,06314318.6%
func_pm_ctrl_shuffleShuffle statements in loops38810636.7%

Scaling with Modal

Previously, large-scale bug generation required days of local computation. The complete pipeline now runs on Modal, reducing the process to hours.

The pipeline performs three stages:

  1. Generate patches: Apply procedural modifiers to repository code.
  2. Validate patches: Run each repository’s test suite in isolated containers.
  3. Store results: Save the outputs in the SWE-smith-js Hugging Face dataset.

Creating Tasks from Pull Requests with SWE-gen

In addition to synthetic patches, task creation is being expanded through SWE-gen. The tool converts merged GitHub pull requests into verifiable tasks. It supports multiple languages by detecting the language, build system, and test framework. SWE-gen reverses a pull request to reconstruct the buggy state, then verifies agent behavior with fail-to-pass tests.

SWE-gen-JS contains 1,000 tasks generated from 30 popular open-source JavaScript and TypeScript repositories. These tasks are derived from real bug fixes and complement synthetic tasks by representing multi-file changes and test configurations that procedural modifiers cannot always reproduce.

Next Steps

The project is improving its repository-construction agent to increase the number of productive repositories. Planned changes include:

  1. Pre-validation checks: Require more than zero pre-gold tests to pass before adding a profile.
  2. Smarter repository selection: Use the 20 unproductive samples to improve selection heuristics.

The func_pm_ctrl_shuffle modifier is also identified as an area for improvement. Its HAS_LOOP filter may be too restrictive, limiting where the modifier can be applied.