Integer (PsiExpression rOperand, RelationType relation, int size, PsiVariable targetBuilder) { if (!isStringBuilderLengthCall(rOperand, targetBuilder)) return null; LongRangeSet rangeSet = LongRangeSet.point(size).fromRelation(relation); if (rangeSet == null || rangeSet.max() != Long.MAX_VALUE) return null; long min = rangeSet.min(); return min > 0 ? (int)(min - 1) : null; }