private static @NotNull StandardMethodContract fromText(@NotNull String text, int clauseIndex, @NotNull String clause)
    throws ParseException {
    String arrow = "->";
    int arrowIndex = clause.indexOf(arrow);
    if (arrowIndex < 0) {
      throw ParseException.forClause(JavaAnalysisBundle.message("inspection.contract.checker.clause.syntax"), text, clauseIndex);
    }

    String beforeArrow = clause.substring(0, arrowIndex);
    ValueConstraint[] args;
    if (StringUtil.isNotEmpty(beforeArrow)) {
      String[] argStrings = beforeArrow.split(",");
      args = new ValueConstraint[argStrings.length];
      for (int i = 0; i < args.length; i++) {
        args[i] = parseConstraint(argStrings[i], text, clauseIndex, i);
      }
    }
    else {
      args = new ValueConstraint[0];
    }
    String returnValueString = clause.substring(arrowIndex + arrow.length());
    ContractReturnValue returnValue = ContractReturnValue.valueOf(returnValueString);
    if (returnValue == null) {
      String possibleValues = "null, !null, true, false, this, new, paramN, fail, _";
      String message = JavaAnalysisBundle.message("inspection.contract.checker.unknown.return.value", possibleValues, returnValueString);
      throw ParseException.forReturnValue(message, text, clauseIndex);
    }
    return new StandardMethodContract(args, returnValue);
  }
private static @NotNull StandardMethodContract fromText(@NotNull String text, int clauseIndex, @NotNull String clause)