List<Equation> (final MethodNode methodNode, boolean jsr, Member method, boolean stable) { ProgressManager.checkCanceled(); final Type[] argumentTypes = Type.getArgumentTypes(methodNode.desc); final Type resultType = Type.getReturnType(methodNode.desc); final boolean isReferenceResult = ASMUtils.isReferenceType(resultType); final boolean isBooleanResult = ASMUtils.isBooleanType(resultType); final boolean isInterestingResult = isReferenceResult || isBooleanResult; List<Equation> equations = new ArrayList<>(); ContainerUtil.addIfNotNull(equations, PurityAnalysis.analyze(method, methodNode, stable, jsr)); try { final ControlFlowGraph graph = ControlFlowGraph.build(className, methodNode, jsr); if (graph.transitions.length > 0) { final DFSTree dfs = DFSTree.build(graph.transitions, graph.edgeCount); boolean branching = !dfs.isBackEmpty(); if (!branching) { for (int[] transition : graph.transitions) { if (transition != null && transition.length > 1) { branching = true; break; } } } if (branching) { RichControlFlow richControlFlow = new RichControlFlow(graph, dfs); if (richControlFlow.reducible()) { NegationAnalysis negated = tryNegation(method, argumentTypes, graph, isBooleanResult, dfs, jsr); processBranchingMethod(method, methodNode, richControlFlow, argumentTypes, resultType, stable, jsr, equations, negated); return equations; } LOG.debug(method + ": CFG is not reducible"); } // simple else { processNonBranchingMethod(method, argumentTypes, graph, resultType, stable, equations); return equations; } } // We can visit here if method body is absent (e.g. native method) // Make sure to preserve hardcoded purity, if any. equations.addAll(topEquations(method, argumentTypes, isReferenceResult, isInterestingResult, stable)); return equations; } catch (ProcessCanceledException e) { throw e; } catch (TooComplexException e) { LOG.debug(method + " in " + myPresentableUrl + " is too complex for bytecode analysis"); return topEquations(method, argumentTypes, isReferenceResult, isInterestingResult, stable); } catch (Throwable e) { // incorrect bytecode may result in Runtime exceptions during analysis // so here we suppose that exception is due to incorrect bytecode LOG.debug("Unexpected Error during processing of " + method + " in " + myPresentableUrl, e); return topEquations(method, argumentTypes, isReferenceResult, isInterestingResult, stable); } }