p-doom/crowd-code-dataset-0.2 huggingface dataset:
[content] crowd-pilot/crowd-pilot/serialization_utils.py (python)
            (
                start_before,
                end_before,
                start_after,
                end_after,
                repl_lines,
            ) = _compute_changed_block_lines(before_snapshot, after_state)
[content] crowd-pilot/crowd-pilot/serialization_utils.py (python)
    start_before = max(1, first[1] + 1)
    end_before = last[2]  # no increment since we go from 'exclusive' to 'inclusive' indexing
    start_after = max(1, first[3] + 1)
    end_after = last[4]
    replacement_lines = after_lines[first[3] : last[4]]
    return (start_before, end_before, start_after, end_after, replacement_lines)
[content] crowd-pilot/crowd-pilot/serialization_utils.py (python)
    Return 1-based start and end line numbers in 'before' that should be
    replaced, 1-based start and end line numbers in 'after' that contain
    the replacement, and the replacement lines from 'after'.
[content] crowd-pilot/crowd-pilot/serialization_utils.py (python)
                # No visible change; choose a safe single-line replace at end of file
        start_line = max(1, len(before_lines))
        end_line = start_line
        repl = after_lines[start_line - 1:start_line] if after_lines else [""]
        return (start_line, end_line, repl)