1 / 8
← Swipe to navigate →
×
CERN CERN
Case Study · Customer Story

A bug here doesn't crash an app.
It stops a particle accelerator.

CERN's accelerator-control software is ~15 million lines of Java, built over 18 years by nearly 300 developers. This is how CERN uses Sourcegraph universal code search to keep technical debt in check where every change is mission-critical.

→ Use arrows or swipe
The Globe of Science and Innovation at CERN
The Globe of Science and Innovation · CERN
By the Numbers

The codebase at a glance

0M
Lines of Java code in the accelerator-control system
0+
Developers maintaining one self-contained codebase
0y
Of code growth, APIs, and accumulated technical debt
0%
Of the codebase indexed and searchable in Sourcegraph
The Problem

15M lines. Nearly 300 authors.
One wrong change stops the LHC.

Before Sourcegraph, CERN's tooling couldn't do precise, semantic searches for how and where a specific method was used. The result? Teams weren't making necessary changes because they couldn't measure the blast radius of a planned API change across the huge codebase.

Meanwhile, valuable code was being reinvented: utility methods, deprecated API usage, and general-purpose logic hidden inside specific projects duplicated over and over.

sourcegraph · code search — cern-accelerator/controls
// semantic search across 15M lines
pattern:
✓ 214 matches in 1,842 files
✓ reuse found: next/requestUtils.go#L24
✓ deprecated API usage flagged: 3 call sites
18 Years of Growth

A codebase that never stopped evolving

~2008
Java controls
codebase begins
2010–2015
Growth &
duplication build up
LHC runs
5-year operational
stability periods
Today
~15M lines,
all searchable
Two Speeds of Change

One codebase, two very different mission clocks

run-mode.md

Run Mode

5-year operational periods

The LHC runs for five years straight. Software must stay stable, so CERN makes small, backward-compatible changes — and Sourcegraph ensures one team's change never breaks dependent code written by someone else.

Priority: absolute stability · backward compatibility
upgrade-window.md

Upgrade Mode

1–2 year shutdown windows

During upgrades, developers make more radical changes. Sourcegraph reveals redundant code (like duplicate utility methods) and lets teams assess the cost/benefit of breaking API changes before committing to them.

Priority: refactor the debt · measure the blast radius first
What Code Search Unlocks

Four ways CERN shrinks its technical debt

Reuse instead of reinvent

Developers find code that already exists and repurpose it, avoiding duplication and saving countless hours of redoing finished work.

Semantic, not just textual

Search "understands" code structure instead of seeing raw text, so results are accurate even in a 15M-line codebase.

Spot deprecated & internal APIs

Teams find usages of deprecated APIs and non-API library code so they can be consolidated and cleaned up.

Evolve APIs with data

Library owners see exactly how other developers use their API, so decisions about its future are educated, not guesswork.

“Sourcegraph helps us with technical debt reduction by letting us avoid duplication, spot the usage of deprecated APIs, and identify general-purpose code that can be factored out and shared in a core library.”

Chris Roderick · Applications and Services Section Leader, CERN

Debt you can't see is debt you can't pay

When ~300 people share 15M lines of mission-critical code, the difference between "I think it's safe to change" and "I know exactly what it touches" is the difference between physics research and downtime.

Read the full case study on sourcegraph.com →