PatternVariableCandidate (@NotNull Statement statement, @NotNull VarTracker tracker, @NotNull List<TempVarAssignmentItem> tempVarAssignmentItems) { if (!(statement instanceof IfStatement ifStatement)) { return null; } if (ifStatement.isNegated() || ifStatement.getHeadexprent().getAllExprents().size() != 1) { return null; } FunctionExprent instanceOfExprent = findInstanceofExprent(ifStatement); if (instanceOfExprent == null) { return null; } List<Exprent> operands = instanceOfExprent.getLstOperands(); if (operands.size() != 2 || operands.get(0).type != Exprent.EXPRENT_VAR || operands.get(1).type != Exprent.EXPRENT_CONST) { return null; } VarExprent operand = (VarExprent)operands.get(0); ConstExprent checkType = (ConstExprent)operands.get(1); RecordVarExprent recordVarExprent = tracker.getRecord(operand); if (recordVarExprent == null) { return null; } PatternVariableCandidate candidate = findNextPatternVarCandidate(ifStatement.getIfstat(), operand, checkType, tracker, ifStatement.getIfstat()); if (candidate == null) { return null; } if (!recordVarExprent.copyFrom(candidate.getVarExprent())) { return null; } tempVarAssignmentItems.addAll(candidate.getTempVarAssignments()); tracker.put(candidate.getVarExprent(), recordVarExprent, null); return candidate; }