npm install @plannotator/sem-jiff semantic and
structural diffs
label structural noise. understand real changes.
sem-jiff reads both sides of a code diff with tree-sitter and labels what actually happened, so reviewers skip the noise and read the real edits. It powers the Sem tab in Plannotator's code review. Powered up by decision models, like Jev by Typesafe, for deeper structural diff understanding.
- TypeScript
- TSX
- JavaScript
- Python
- Go
- Rust
- Java
- C#
- PHP
- Ruby
- Kotlin
- Swift
power up with Jev and Clef
Add your own Jev key and the engine asks a model about the candidates its strict rules aren't sure of. Add Clef and it breaks the ties.
Extracted and inlined functions found
193 real cases across TypeScript, Go, Rust, Python, Java and C#
View as table
| Found | Wrong claims | |
|---|---|---|
| Engine alone | 127 (66%) | 1 of 133 |
| + Jev | 168 (87%) | 5 of 181 |
| + Jev, Clef as tie-breaker | 171 (89%) | 5 of 186 |
Held-out sets
454 more real cases, found and wrong claims
- per 500-line change with Jev
- $0.0004
- to reopen a diff
- $0
- Answers are remembered.
more found, far fewer wrong
Extracted and inlined functions on the same commits, next to RefactoringMiner.
TypeScript 187 real cases
Java 91 real cases
View as table
| Found | Wrong claims | |
|---|---|---|
| TypeScript (187), RefactoringMiner | 73 | 14 |
| TypeScript (187), sem-jiff | 105 | 1 |
| TypeScript (187), sem-jiff + Jev | 148 | 1 |
| Java (91), RefactoringMiner | 70 | 16 |
| Java (91), sem-jiff | 52 | 1 |
| Java (91), sem-jiff + Jev | 62 | 1 |
fewer wrong claims
Next to difftastic and sem, on projects it was never tuned on.
Wrong claims on real commits
Held-out projects, blind audit: ktor and Exposed (Kotlin), swift-nio and TCA (Swift)
Kotlin ktor, Exposed
Swift swift-nio, TCA
try it in your next review
It's already in Plannotator code review. Or use the engine on its own:
npm install @plannotator/sem-jiff