private void processBranchingMethod(final Member method,
                                        final MethodNode methodNode,
                                        final RichControlFlow richControlFlow,
                                        Type[] argumentTypes,
                                        Type resultType,
                                        final boolean stable,
                                        boolean jsr,
                                        List<? super Equation> result,
                                        NegationAnalysis negatedAnalysis) throws AnalyzerException {
      final boolean isReferenceResult = ASMUtils.isReferenceType(resultType);
      final boolean isBooleanResult = ASMUtils.isBooleanType(resultType);
      boolean isInterestingResult = isBooleanResult || isReferenceResult;

      final LeakingParameters leakingParametersAndFrames = leakingParametersAndFrames(method, methodNode, argumentTypes, jsr);

      boolean[] leakingParameters = leakingParametersAndFrames.parameters;
      boolean[] leakingNullableParameters = leakingParametersAndFrames.nullableParameters;

      final boolean[] origins =
        OriginsAnalysis.resultOrigins(leakingParametersAndFrames.frames, methodNode.instructions, richControlFlow.controlFlow);

      Equation outEquation =
        isInterestingResult ?
        new InOutAnalysis(richControlFlow, Out, origins, stable, mySharedPendingStates).analyze() :
        null;

      if (isReferenceResult) {
        result.add(outEquation);
        result.add(new Equation(new EKey(method, NullableOut, stable), NullableMethodAnalysis.analyze(methodNode, origins, jsr)));
      }
      final boolean shouldInferNonTrivialFailingContracts;
      final Equation throwEquation;
      if (methodNode.name.equals("<init>") || methodNode.instructions.size() > 64) {
        // Do not infer failing contracts for constructors or long methods
        shouldInferNonTrivialFailingContracts = false;
        throwEquation = new Equation(new EKey(method, Throw, stable), Value.Top);
      }
      else {
        final InThrowAnalysis inThrowAnalysis = new InThrowAnalysis(richControlFlow, Throw, origins, stable, mySharedPendingStates);
        throwEquation = inThrowAnalysis.analyze();
        if (!throwEquation.result.equals(Value.Top)) {
          result.add(throwEquation);
        }
        shouldInferNonTrivialFailingContracts = !inThrowAnalysis.myHasNonTrivialReturn && 
                                                richControlFlow.controlFlow.errorTransitions.isEmpty();
      }

      boolean withCycle = !richControlFlow.dfsTree.isBackEmpty();
      if (argumentTypes.length > 50 && withCycle) {
        // IDEA-137443 - do not analyze very complex methods
        return;
      }

      // arguments and contract clauses
      for (int i = 0; i < argumentTypes.length; i++) {
        boolean notNullParam = false;

        if (ASMUtils.isReferenceType(argumentTypes[i])) {
          boolean possibleNPE = false;
          if (leakingParameters[i]) {
            NonNullInAnalysis notNullInAnalysis =
              new NonNullInAnalysis(richControlFlow, new In(i, false), stable, mySharedPendingActions, mySharedResults);
            Equation notNullParamEquation = notNullInAnalysis.analyze();
            possibleNPE = notNullInAnalysis.possibleNPE;
            notNullParam = notNullParamEquation.result.equals(Value.NotNull);
            result.add(notNullParamEquation);
          }
          else {
            // parameter is not leaking, so it is definitely NOT @NotNull
            result.add(new Equation(new EKey(method, new In(i, false), stable), Value.Top));
          }

          if (leakingNullableParameters[i]) {
            if (notNullParam || possibleNPE) {
              result.add(new Equation(new EKey(method, new In(i, true), stable), Value.Top));
            }
            else {
              result.add(new NullableInAnalysis(richControlFlow, new In(i, true), stable, mySharedPendingStates).analyze());
            }
          }
          else {
            result.add(new Equation(new EKey(method, new In(i, true), stable), Value.Null));
          }

          if (isInterestingResult) {
            if (!leakingParameters[i]) {
              // parameter is not leaking, so a contract is the same as for the whole method
              result.add(new Equation(new EKey(method, new InOut(i, Value.Null), stable), outEquation.result));
              result.add(new Equation(new EKey(method, new InOut(i, Value.NotNull), stable), outEquation.result));
              continue;
            }
            if (notNullParam) {
              // @NotNull, like "null->fail"
              result.add(new Equation(new EKey(method, new InOut(i, Value.Null), stable), Value.Bot));
              result.add(new Equation(new EKey(method, new InOut(i, Value.NotNull), stable), outEquation.result));
              continue;
            }
          }
        }
        for (Value val : Value.typeValues(argumentTypes[i])) {
          if (isBooleanResult && negatedAnalysis != null) {
            result.add(negatedAnalysis.contractEquation(i, val, stable));
            continue;
          }
          try {
            if (isInterestingResult) {
              result.add(new InOutAnalysis(richControlFlow, new InOut(i, val), origins, stable, mySharedPendingStates).analyze());
            }
            if (shouldInferNonTrivialFailingContracts) {
              InThrow direction = new InThrow(i, val);
              Equation failEquation = throwEquation.result.equals(Value.Fail)
                                      ? new Equation(new EKey(method, direction, stable), Value.Fail)
                                      : new InThrowAnalysis(richControlFlow, direction, origins, stable, mySharedPendingStates).analyze();
              result.add(failEquation);
            }
          }
          catch (AnalyzerException e) {
            throw new RuntimeException("Analyzer error", e);
          }
        }
      }
    }
private void processBranchingMethod(final Member method,
                                        final MethodNode methodNode,
                                        final RichControlFlow richControlFlow,
                                        Type[] argumentTypes,
                                        Type resultType,
                                        final boolean stable,
                                        boolean jsr,
                                        List<? super Equation> result,
                                        NegationAnalysis negatedAnalysis)