FAILURE MAP
← Case archive

FA-75649 / Text diff and three-way merge / Member archive

Line mapping through hunks: hunks after a line are still examined · case 04

Lines before a later hunk are reported as removed.

Member previewVariant 4 · 3 implementations · 8 checks per implementation

Case contract

Hunks [old_start, old_len, new_start, new_len] use unified conventions (start is the line before when the length is 0) and are sorted. An old line maps to None if it lies in a hunk's old range; otherwise it moves by the sum of new_len - old_len over hunks entirely before it. A zero-length hunk after line s affects lines from s+1 on. Return the mapped line numbers.

Why this case matters

Review tools re-anchor comments on changed files by mapping old line numbers through the diff.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
lines before and after a replacement[null, null, null, 8, 9][4, null, null, 8, 9]Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗