Integer (@NotNull PsiExpression expression, PsiVariable targetBuilder) { PsiBinaryExpression condition = tryCast(expression, PsiBinaryExpression.class); if (condition == null) return null; PsiExpression rOperand = condition.getROperand(); if (rOperand == null) return null; PsiExpression lOperand = condition.getLOperand(); RelationType relation = DfaPsiUtil.getRelationByToken(condition.getOperationTokenType()); if (relation == null) return null; int lSize = computeConstantIntExpression(lOperand); if (lSize >= 0) { return extractLength(rOperand, relation.getFlipped(), lSize, targetBuilder); } else { int rSize = computeConstantIntExpression(condition.getROperand()); return rSize >= 0 ? extractLength(lOperand, relation, rSize, targetBuilder) : null; } }