Range (@Nullable TextRange patternRange, @NotNull Document patternDocument, @Nullable TextRange refactoredRange, @NotNull Document refactoredDocument) { if (patternRange == null || refactoredRange == null) { return null; } return new Range(getStartLineNumber(patternDocument, patternRange), getLineNumberAfter(patternDocument, patternRange), getStartLineNumber(refactoredDocument, refactoredRange), getLineNumberAfter(refactoredDocument, refactoredRange)); }