Skip to content

Dataset

SonarQube code quality issue and measure datasets for AI training

A SonarQube dataset is an export from a company's SonarQube Server or SonarQube Cloud of the issues its analyses raised, each with rule, file, text range, severity, status and changelog, together with security hotspot reviews, measures such as coverage and duplication per analysis, quality gate results and the quality profiles in force. SourceX sources it to a buyer's spec from established businesses that run SonarQube, with the matching source code where the company licenses it. Each dataset is de-identified and licensed for an agreed permitted use.

Dataset manifest

Sourced to your spec
What it is
Static analysis issues by rule, file and line with their changelogs, hotspot reviews, measures per analysis and quality gate results
Typical systems
SonarQube Server in any edition, including Community Build, or SonarQube Cloud (formerly SonarCloud), with branch and pull request analysis where the edition has it
Typical history
Specified by the buyer; bounded by housekeeping, which by default deletes closed issues more than 30 days old and thins older analyses
Modality
Structured issue, changelog and measure records; short analyzer messages; source files at analyzed commits
Delivery formats
Agreed per order; JSONL issues with changelogs, measure history as JSONL or Parquet, quality profiles as XML, source as a Git bundle
Preparation
Commit author emails, assignee logins and commenter names replaced with keys; project keys replaced; secrets scrubbed from code
Licensing
Rights reviewed per company; permitted use set in the license; confirm the source code is in scope with the findings
Availability
Sourced to your spec from companies that agree; supply is not guaranteed
Structured recordsIllustrative

What a delivery contains

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

FieldTypeWhat it holds
issue_keystringThe Issue's key, which stays the same across analyses for as long as SonarQube tracks the Issue.
ruleobjectThe Rule's key, with its type, language and tags; the Rule's description is the analyzer's text, so ask whether it is delivered.
componentobjectThe Project, the Branch or pull request and the file path the Issue is attached to.
locationsobjectThe Issue's text range, start and end line and offsets, plus the secondary locations and data flow steps attached to it.
messagestringThe message the analyzer wrote for this occurrence of the Rule.
severityobjectThe Issue's severity and type, and its impacts by software quality where the server uses that model.
statusobjectStatus and resolution, or the single issue status of newer servers: open, confirmed, false positive, accepted or fixed.
datesobjectThe Issue's creation, update and close dates, with a flag where the creation date was backdated from source control.
changelogarrayEntries from the Issue changelog: time, user or analyzer, each field's old and new value, and comments.
hotspot_reviewobjectFor a Security hotspot, its review status and its resolution as safe, fixed or acknowledged.
analysisobjectThe Analysis that first reported the Issue: its key, date, source control revision and events.
measuresobjectMeasure values at that Analysis by Metric key, such as coverage, duplicated_lines_density and ncloc.
quality_gateobjectThe Quality gate status at that Analysis, with each condition's metric, threshold and actual value.
quality_profileobjectThe Quality profile for the language at that Analysis and the date of its last rule change.
Sample recordIllustrative

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

Example record

{
  "issue_key": "iss_AY3kQ9x2c7Fh1bN4",
  "rule": {
    "key": "java:S2259",
    "type": "BUG",
    "language": "java"
  },
  "component": {
    "project": "prj_billing_core",
    "branch": "main",
    "path": "src/main/java/app/invoice/InvoiceMapper.java"
  },
  "locations": {
    "text_range": {
      "start_line": 118,
      "end_line": 118,
      "start_offset": 23,
      "end_offset": 31
    },
    "flows": [
      {
        "start_line": 109,
        "message": "Implies 'customer' can be null."
      }
    ]
  },
  "message": "A \"NullPointerException\" could be thrown; \"customer\" is nullable here.",
  "severity": {
    "severity": "MAJOR",
    "impacts": [
      {
        "software_quality": "RELIABILITY",
        "severity": "MEDIUM"
      }
    ]
  },
  "status": {
    "status": "RESOLVED",
    "resolution": "FALSE-POSITIVE",
    "issue_status": "FALSE_POSITIVE"
  },
  "dates": {
    "creation_date": "2023-11-02T09:14:00Z",
    "creation_backdated": true,
    "close_date": null
  },
  "changelog": [
    {
      "at": "2024-02-13T10:31:09Z",
      "actor": "user_k_3a7f",
      "diffs": [
        {
          "key": "resolution",
          "old": null,
          "new": "FALSE-POSITIVE"
        },
        {
          "key": "status",
          "old": "OPEN",
          "new": "RESOLVED"
        }
      ],
      "comment": "Caller rejects a null customer before mapping, see validate()."
    }
  ],
  "hotspot_review": null,
  "analysis": {
    "key": "an_AY3kPz81",
    "date": "2024-02-12T03:05:44Z",
    "revision": "9f2c41d7a0b35e6c8d1f4a927b6e03c5d8a1f7e2",
    "events": [
      {
        "category": "QUALITY_PROFILE",
        "name": "Changes in 'Team Java' (Java)"
      }
    ]
  },
  "measures": {
    "ncloc": 48211,
    "coverage": 71.4,
    "duplicated_lines_density": 3.2
  },
  "quality_gate": {
    "status": "ERROR",
    "conditions": [
      {
        "metric": "new_coverage",
        "comparator": "LT",
        "error_threshold": "80",
        "actual": "62.5"
      }
    ]
  },
  "quality_profile": {
    "language": "java",
    "name": "Team Java",
    "last_change": "2024-02-11T16:20:00Z"
  }
}

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

What AI teams use it for

Teach models which findings developers reject

False positive and accepted issues, beside fixed issues of the same rule, label disagreement with the analyzer.

Train fixes for named rule violations

A text range at one revision and the commit that closed the issue form a before and after pair.

Rank warnings by likelihood of a fix

Time from creation to fix by rule, severity and file shows which warnings a team acts on.

Predict quality gate outcomes

Measures and gate conditions per analysis show which changes fail the gate.

Evaluate code review agents

Pull request analyses with their new issues test whether an agent flags what the analyzer flagged.

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

What makes this data valuable

Source at analyzed revisions

Every analysis names a revision that exists in the delivered repository.

Human resolutions with comments

False positive and accepted issues carry a comment saying why.

Long closed-issue window

Housekeeping kept closed issues longer than the 30-day default, or earlier exports were saved.

Stable quality profiles

Profile changes are few and dated, so issue waves can be told from new code.

Pull request analysis

The edition analyzes pull requests, tying issues to the change that introduced them.

Reviewed hotspots

Security hotspots were reviewed as safe, fixed or acknowledged, not left to review.

Checklist

SonarQube dataset

This page covers sonarQube code quality issues and measures.Illustrative

Issue tracking dates each finding and records disagreement

SonarQube does not report a fresh list on every scan. Each Analysis is matched against the last, by Rule and by a hash of the line's content after a check for renamed files, and an Issue found again keeps its key even when the line moved or the file was renamed, so every Issue has a creation date and, when it goes, a close date. The analyzer closes an Issue as fixed when a later Analysis no longer finds it. People make the other moves: a developer can confirm an Issue, mark it false positive or mark it accepted, which older servers call won't fix, and the Issue changelog stores each change with its time, user and old and new values. False positive and accepted are the scarce labels, because a developer read the finding and disagreed with the analyzer or chose to live with it.

Three behaviors blur these dates and labels. Creation dates are backdated: where source control data exists, a new Issue is dated from the last commit on its line, not from the Analysis that found it. After a first Analysis, a newly activated Rule or an analyzer upgrade, Issues therefore appear older than the day anyone could have seen them. Fixed is inferred from absence, so it also covers code that was deleted, a file that fell under a new exclusion and a rewrite that broke tracking. And a Rule taken out of the Quality profile closes its Issues, with a resolution older servers label removed, in a wave that has nothing to do with the code.

Measures follow the same clock. Each Analysis stores project-level values by Metric key, with the Quality gate status and the conditions that failed. Security hotspots are kept apart from Issues and have their own review, ending in safe, fixed or acknowledged. A hotspot marked safe is a reviewer saying a sensitive pattern is fine in this context. Community Build analyzes the main branch only, so its Issues are tied to an Analysis and not to a pull request.

An issue export has coordinates, not code, and closed issues expire

The Web API returns an Issue as a rule key, a component path, a text range, a message and its states. It does not return the code. SonarQube keeps source for display, but only as of the latest Analysis of each branch, so the lines a fixed Issue pointed at are no longer on the server. They exist in the repository, at the commit that was analyzed. An Analysis records the source control revision when the scanner could detect one, and the text range is valid for that revision alone. The code is a separate asset with its own rights, so check that it is licensed and included.

Housekeeping removes the most useful rows first. By default SonarQube deletes closed Issues once they are more than 30 days old, and on SonarQube Server an administrator can change that period in the Housekeeping settings. Issues a person resolved as false positive or accepted stay while the code they point at stays, and open Issues stay too. A server exported once therefore holds the full backlog, the human resolutions and only about the last month of what was fixed. Older analyses are thinned as they age, and inactive branches and pull requests are purged.

The issue search pages only up to a ceiling per query, so a large Project is sliced by date or rule and the totals reconciled against the server's counts. Changelogs are fetched one Issue at a time and hotspots through a separate search. To test a sample, take fixed Issues, check out the revision before the close, confirm the text range holds the construct the Rule names and that the next revision changed it. Check that open vulnerability findings for systems still in production were left out or agreed.

What to check before licensing

  • Have the buyer's counsel and the data owner read Sonar's terms on exported data, Web API use and reuse of rule descriptions.
  • Confirm the repository is licensed and delivered with the findings, and that each analysis names a source control revision present in it.
  • Ask for the housekeeping settings, above all whether closed issues were kept beyond the 30-day default, and whether the export is one snapshot or a series.
  • Ask how open vulnerability issues and unreviewed hotspots on systems still in production are handled: left out, delayed or delivered with projects keyed.
  • Check on the sample that backdated creation dates are flagged and that the first analysis to report each issue is recorded.
  • Ask for the quality profile changelog and analyzer upgrade dates, so issue waves caused by rule changes can be told from new code.
  • Check how commit author emails, assignee logins and comment text were de-identified, and that one key stands for a person across issues and repository.

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 does a SonarQube dataset contain?

It contains the static analysis record of one company's projects: issues by rule, file and text range with severity, status and changelog, security hotspots with their review outcome, measures such as coverage and duplication for each analysis, quality gate results and the quality profiles that decided which rules ran.

Does the export include the code the issues point to?

No, not by itself. An issue holds a file path, a text range and a message, and the server removes the previous analysis's source after each new one. The code a fixed issue referred to has to come from the repository at the analyzed commit, so the source must be licensed and delivered with the findings.

How far back do fixed issues go?

About 30 days on default settings. Housekeeping deletes closed issues once they are more than 30 days old, unless an administrator of SonarQube Server changed the period, while open issues and those a person resolved as false positive or accepted remain. Ask for the housekeeping values and whether earlier exports extend the history.

Which labels show that developers disagreed with the analyzer?

The false positive and accepted resolutions, and the safe review on a security hotspot. Each is set by a person and stored with a time and, often, a comment. Fixed is weaker evidence, because the analyzer sets it whenever a finding disappears, including when code was deleted or excluded.

Is data from SonarQube Server and SonarQube Cloud the same?

Largely, with differences worth specifying. Both hold projects, analyses, issues, hotspots, measures and quality gates, and SonarQube Cloud, formerly SonarCloud, groups projects under an organization. Editions differ in languages covered and in branch and pull request analysis. Ask which product, edition and version the data came from.

Is SourceX affiliated with SonarSource?

SonarQube is named to identify the system the records come from. That does not imply a partnership with or endorsement by SonarSource SA (Sonar). The records belong to the business that runs SonarQube, which licenses them under a signed agreement, and a request does not guarantee a matching dataset. Buyers should still confirm with counsel that the vendor's terms allow the intended use of exported data.

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 26 November 2026.

See if your company qualifies