int (int startLineOffset, int endLineOffset, int targetRangeEndOffset, int reservedWidthInColumns, int rightMargin) { if (Math.min(endLineOffset, targetRangeEndOffset) - startLineOffset > rightMargin) { return startLineOffset + rightMargin - reservedWidthInColumns; } return -1; }