boolean (PyBinaryExpression leftExpression, PyBinaryExpression rightExpression) { final PyExpression leftLeft = leftExpression.getLeftExpression(); if (leftLeft instanceof PyBinaryExpression && PyTokenTypes.RELATIONAL_OPERATIONS.contains(((PyBinaryExpression)leftLeft).getOperator())) { if (isLeftSimplified((PyBinaryExpression)leftLeft, rightExpression)) { return true; } } myOperator = leftExpression.getOperator(); if (PyTokenTypes.RELATIONAL_OPERATIONS.contains(myOperator)) { if (leftLeft != null) { if (leftLeft.getText().equals(getLeftExpression(rightExpression, false).getText())) { myIsLeft = true; myIsRight = true; isConstantInTheMiddle = leftLeft instanceof PyLiteralExpression; return true; } final PyExpression right = getSmallestRight(rightExpression, false); if (right != null && leftLeft.getText().equals(right.getText())) { myIsLeft = true; myIsRight = false; isConstantInTheMiddle = leftLeft instanceof PyLiteralExpression; return true; } } } return false; }