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#

Engine alone 66%127 1 of 133
+ Jev 87%168 5 of 181
+ Jev, Clef as tie-breaker 89%171 5 of 186
View as table
FoundWrong claims
Engine alone127 (66%)1 of 133
+ Jev168 (87%)5 of 181
+ Jev, Clef as tie-breaker171 (89%)5 of 186

Held-out sets

454 more real cases, found and wrong claims

Engine alone 263 8 wrong
+ Jev 371 12 wrong
+ Jev, Clef as tie-breaker 388 13 wrong
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

RefactoringMiner 73 14 wrong
sem-jiff 105 1 wrong
sem-jiff + Jev 148 1 wrong

Java 91 real cases

RefactoringMiner 70 16 wrong
sem-jiff 52 1 wrong
sem-jiff + Jev 62 1 wrong
View as table
FoundWrong claims
TypeScript (187), RefactoringMiner7314
TypeScript (187), sem-jiff1051
TypeScript (187), sem-jiff + Jev1481
Java (91), RefactoringMiner7016
Java (91), sem-jiff521
Java (91), sem-jiff + Jev621

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

sem-jiff 0 wrong of 46 claims
difftastic 51 wrong of 70 claims
sem 0.8.0 40 wrong of 164 audited

Swift swift-nio, TCA

sem-jiff 0 wrong of 158 claims
difftastic 13 wrong of 88 audited
sem 0.8.0 4 wrong of 95 audited

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

Built by

With contributions from