List<StandardMethodContract> (List<ValueConstraint[]> states, LighterASTNode op1, LighterASTNode op2, boolean equality) { int parameter = resolveParameter(op1); ValueConstraint constraint = getLiteralConstraint(op2); if (parameter < 0 || constraint == null) { parameter = resolveParameter(op2); constraint = getLiteralConstraint(op1); } if (parameter >= 0 && constraint != null) { List<StandardMethodContract> result = new ArrayList<>(); for (ValueConstraint[] state : states) { if (constraint == NOT_NULL_VALUE) { if (getPrimitiveParameterType(parameter) == null) { ContainerUtil.addIfNotNull(result, contractWithConstraint(state, parameter, NULL_VALUE, returnBoolean(!equality))); } } else { ContainerUtil.addIfNotNull(result, contractWithConstraint(state, parameter, constraint, returnBoolean(equality))); ContainerUtil.addIfNotNull(result, contractWithConstraint(state, parameter, constraint.negate(), returnBoolean(!equality))); } } return result; } return emptyList(); }