Skip to content

Dataset

Code migration and framework upgrade datasets for AI training

A code migration dataset is the full record of a large upgrade carried out in a private codebase: the migration plan, the ordered commits and pull requests, the codemod scripts, the compatibility shims, the test and CI results at each step and the incidents the rollout caused. Typical cases are Python 2 to 3, AngularJS to Angular, Java 8 to 17, a Rails major version or a monolith split. SourceX sources these to a buyer's spec from the established businesses that ran them. Each dataset is de-identified and licensed for an agreed permitted use.

Dataset manifest

Sourced to your spec
What it is
The plan, ordered pull requests, codemods, shims, CI results and incidents of one large upgrade in a private codebase
Typical systems
Git hosting with pull requests, Jira epics, CI such as Jenkins or GitHub Actions, codemod tools, incident trackers
Typical history
Set by the buyer; one migration can span months or years, so state the minimum duration and codebase size
Modality
Source diffs and scripts, plan and review text, structured CI and rollout records
Delivery formats
Git bundle or repository slice, JSONL per step with labels, CI reports as JUnit XML or logs, documents as Markdown
Preparation
Secrets purged across history; author names replaced with role IDs; customer details removed from incidents; third-party code flagged
Licensing
Scoped per migration and repository; permitted use agreed per license
Availability
Sourced to your spec; supply is not guaranteed, and CI retention limits what survives for older steps
CodeIllustrative

What a delivery contains

Fields vary by source system and are fixed per order. A typical delivery includes:

FieldTypeWhat it holds
migration_idstringPseudonymous ID of one upgrade effort, shared by its steps, scripts, shims and incidents.
migration_kindenumLanguage version, framework version or replacement, library swap, build tool change or service extraction.
from_toobjectSource and target versions, with the manifest, lockfile or image where each was read.
plan_refsarrayThe design document, tracking epic, module inventory and status updates that steered the migration.
stepobjectOne pull request in the sequence, with its order, base and merge commits, description and diff.
change_originobjectFiles changed by codemod alone, by codemod then hand edit and by hand, with the method used to tell them apart.
codemodobjectThe transformation tool, the script revision and the command that produced this step.
exceptionsarrayFiles the codemod skipped, missed or got wrong, each with the problem, the hand-written fix and the review comment.
shim_stateobjectCompatibility modules and dual-version imports in use at this step, and the step that later removed them.
ci_matrixarrayBuild and test results per version at this step, with any change to the known-failures list.
debt_countersobjectProgress figures the team tracked, such as modules converted and deprecation warnings left.
rolloutobjectThe flag or deploy gate, the stage reached, dates and whether the stage was rolled back.
incidentsarrayIncidents attributed to this step, with summary, the fixing step and the postmortem document.
Sample recordIllustrative

Field names from the table above; values are masked placeholders.

Example record

{
  "migration_id": "mig_py3_billing",
  "migration_kind": "language_version",
  "from_to": {
    "from": "python 2.7",
    "to": "python 3.6",
    "evidence": [
      "tox.ini",
      "Dockerfile base image"
    ]
  },
  "plan_refs": [
    {
      "id": "doc_4f1a",
      "type": "migration_rfc"
    }
  ],
  "step": {
    "id": "pr_0217",
    "order": 217,
    "title": "Port ledger/export to py3",
    "base": "9c2e17a",
    "merge": "41ab0d3"
  },
  "change_origin": {
    "codemod_only": 38,
    "codemod_then_hand_edited": 5,
    "hand_written": 2,
    "method": "bot author on the codemod commit, checked by rerunning script_rev 4"
  },
  "codemod": {
    "tool": "futurize",
    "command": "futurize --stage2 -w ledger/export",
    "script_rev": 4
  },
  "exceptions": [
    {
      "file": "ledger/export/csv_writer.py",
      "codemod_result": "not_handled",
      "problem": "File opened with 'wb' and written with text rows. Passes on 2.7, TypeError on 3.",
      "fix": "compat.open_csv() opens text mode with newline='' on 3 and keeps 'wb' on 2"
    },
    {
      "file": "ledger/export/batch_sort.py",
      "codemod_result": "not_detected",
      "problem": "Rows sorted on account_code, which is None for suspense entries. None sorts first on 2.7 and raises on 3.",
      "fix": "Explicit sort key plus a regression test",
      "review_note": "Keep suspense rows first. Reconciliation expects the old order."
    }
  ],
  "shim_state": {
    "compat_module": "ledger/compat.py",
    "six_imports_remaining": 312,
    "removed_in": "pr_0479"
  },
  "ci_matrix": [
    {
      "env": "py27",
      "result": "pass"
    },
    {
      "env": "py36",
      "result": "pass",
      "known_failures_file": "ci/py3_xfail.txt",
      "lines_removed": 14
    }
  ],
  "debt_counters": {
    "modules_passing_py3": 211,
    "modules_total": 486
  },
  "rollout": {
    "gate": "flag export_worker_py3",
    "stage": "canary",
    "rolled_back": true
  },
  "incidents": [
    {
      "id": "inc_0093",
      "summary": "Bank gateway rejected export files from the py3 canary. Header column order came from dict iteration, which differs between interpreters.",
      "fixed_in": "pr_0224"
    }
  ]
}

Synthetic record for illustration. Field names, structure and format are agreed per order.

What AI teams use it for

Train agents to run large upgrades

The ordered sequence shows how a team split the work and which modules went first.

Learn the cases codemods get wrong

Each exception pairs tool output with the hand-written correction and the reviewer's reason.

Write and repair transformation scripts

Successive revisions of a codemod, beside the failures that prompted each one, teach how to generalize a rewrite rule.

Keep a system shipping mid-migration

Shims, dual-version CI and flag-gated rollouts are worked examples that finished repositories no longer contain.

Build upgrade evaluations with real pass criteria

An intermediate commit, the next step's goal and the recorded CI result make a test item graded by the project's own suite.

Use-case guides: Coding agents, Private evaluation sets, Enterprise and computer-use agents

What makes this data valuable

Change origin labeled

Tool-generated and hand-written changes are separated at file or hunk level, with the method stated.

Scripts kept with their revisions

The codemods and their configuration are in the delivery, not only the diffs they produced.

CI on both versions per step

Results for the old and new target at each step show what a change fixed and what it broke.

Complete shim lifecycle

Each compatibility layer has the step that introduced it and the step that removed it.

Incidents tied to steps

Rollbacks and postmortems name the pull request at fault and the one that fixed it.

Plan and actual both present

The original plan sits beside what happened, including approaches that were dropped.

System export

Code migration dataset

This page covers dependency upgrade and framework migration histories.Illustrative

The exceptions carry the training value

A large migration is mostly mechanical. A codemod turns print statements into calls, rewrites imports, renames a package or swaps a deprecated API for its replacement across thousands of files, and reviewers approve the result in bulk. Those rewrites are regular enough that the script already states them in full. The value is in the remainder: the files the tool skipped, the output a person had to correct, and the changes no tool attempted.

Those exceptions cluster where the answer depends on something syntax does not show. In a Python 2 to 3 port a tool cannot tell whether a variable holds bytes or text, so every file, socket and database boundary is traced by hand, and sorting a list that mixes None with numbers raises on one side only. In an AngularJS to Angular move, scope watchers and directives whose link functions touch the DOM have no one-to-one component equivalent. In a Java 8 to 17 upgrade, code that reflects into JDK internals meets module encapsulation, which newer JDKs enforce by default, and the team chooses between an --add-opens flag that defers the problem and upgrading or replacing the library. In a Rails major version, changed framework defaults are switched on one at a time over several deployments, because a default that passes the test suite can still misbehave on cookies, cache entries or jobs written under the old one.

A useful dataset marks which is which. Tool output often arrives from a bot account or with the command in the commit message, and the hand fixes follow on the same files with a review thread explaining what the script got wrong. With change origin labeled, a buyer can weight the hand-written fixes above the bulk of mechanical lines instead of letting volume drown them.

What the intermediate states show

A migration of this size runs for months while feature work continues, so for most of that time the codebase has to work on both sides at once. Python code imports six or __future__ and CI runs the suite under both interpreters. An AngularJS application is bootstrapped as a hybrid through ngUpgrade, with new components downgraded into old templates. A Rails application boots against two lockfiles. A compatibility module wraps each difference, and a feature gate decides which workers run the new path.

Keeping that state stable takes machinery a snapshot never shows. A known-failures file lists tests that do not yet pass on the new version, and CI lets the list shrink but not grow. Teams that began on a long-lived branch often abandon it once merge conflicts with feature work pile up, and restart in trunk with one small pull request per directory, ordered from leaf libraries upward. A third-party dependency with no compatible release stops everything above it until it is forked or replaced.

The end is rarely clean. The rollout goes service by service behind flags, some stages are rolled back after an incident, and the shims come out in a final pass that is a migration of its own. Some migrations stop with a tail of modules left on the old version. A before-and-after pair of snapshots hides all of that. The ordered history with CI results at each step shows how a system keeps shipping while half converted, which is the skill an agent needs for this work.

What to check before licensing

  • Ask how codemod-generated changes were told apart from hand-written ones, whether by bot author, commit trailer or rerunning the script, and check the labels on the sample.
  • Confirm the codemod scripts and their configuration are in the delivery at each revision, not only their output.
  • Check that CI results exist for intermediate steps on both the old and new version, and ask what the CI system's retention left for the oldest steps.
  • Ask whether the migration finished, and request the list of modules, services or tenants that stayed on the old version.
  • Verify that pull request descriptions and review comments are joined to commits, and ask whether squash merges collapsed the intermediate commits.
  • Ask how vendored dependencies and lockfile changes in the diffs were flagged, and who owns work done by contractors or a modernization vendor.
  • Review incident and postmortem text in the sample for customer names, hostnames and credentials, and confirm secrets were purged from every commit.

Delivery No files move before a signed license. A listing or a request grants no files by itself.

How licensing works through SourceX

  1. 1

    Define

    Send the domain, modality, volume, format, timeline and permitted use you need.

  2. 2

    Source

    SourceX identifies businesses that hold matching data and are open to licensing it.

  3. 3

    Qualify

    Fit, rights and quality are checked, and you review samples before committing.

  4. 4

    License

    Scope, permitted use, exclusivity, price and obligations are agreed in writing.

  5. 5

    Deliver

    Approved data is prepared, de-identified where required and transferred securely.

Questions Acquisition Partners ask

What kinds of migration can a dataset cover?

Any upgrade large enough to need a plan and many pull requests. Typical cases are a language version change such as Python 2 to 3 or Java 8 to 17, a framework replacement such as AngularJS to Angular, a major version of Rails or Django, and a service extracted from a monolith. Name the source and target in your spec. Supply is not guaranteed.

How is this different from licensing a whole repository with history?

The scope is one upgrade and everything attached to it, not every commit in the repository. The migration's pull requests are picked out of the history and joined to the plan, the codemod scripts, CI results on both versions, the shims and the incidents, with each change labeled as tool-generated or hand-written. A full repository leaves you to find those commits among unrelated feature work.

How are codemod changes told apart from manual fixes?

By evidence in the history, and the method should be stated for each dataset. Mechanical changes are often committed by a bot account, carry the codemod command in the commit message, or arrive as one pull request per directory with a uniform diff. Hand fixes follow as separate commits on the same files, or show up when the script is rerun and its output differs from what was merged.

Are CI results available for every step?

Not always. Version control keeps every commit, but CI systems expire logs and artifacts under retention settings, so older steps may have only a pass or fail status on the pull request. Ask what survives for the period you need: status checks, test reports per version, full logs or the known-failures list.

Is a migration that stalled or was abandoned still useful?

Yes, and it should be labeled. Many migrations end with modules left on the old version behind a flag, and some are stopped and restarted with a different approach. The record of why the first approach failed, such as a long-lived branch that could not be merged or a dependency with no compatible release, is useful for planning models. Ask that the manifest state how the migration ended.

Can the intermediate commits still be built and tested?

Sometimes, with effort. An intermediate commit needs the old interpreter or JDK, the lockfile of that date and every pinned dependency, some of which may since have been removed from public registries or lived only in a private one. Ask for lockfiles, build images and any internal packages the build needs, and have a sample of intermediate commits built before you commit to the full scope.

Evaluating this data for procurement?

Diligence packets are prepared per dataset. Rights, privacy processing and quality differ between datasets.

Request dataset diligence

Tell us what your models need

Send your spec — domain, volume, format, timeline and permitted use — and SourceX will match it against partner data and come back with what can be licensed.

Updated 25 November 2026.

See if your company qualifies