Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion codeflash/languages/java/instrumentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def _collect_calls(
def _byte_to_line_index(byte_offset: int, line_byte_starts: list[int]) -> int:
"""Map a byte offset in body_text to a body_lines index."""
idx = bisect.bisect_right(line_byte_starts, byte_offset) - 1
return max(idx, 0)
return 0 if idx < 0 else idx


def _infer_array_cast_type(line: str) -> str | None:
Expand Down
Loading