if (!this.branch.equals(other.branch)) return false; else {
/** * <p> * getControlDependency * </p> * * @param branch * a {@link org.evosuite.coverage.branch.Branch} object. * @return a {@link org.evosuite.graphs.cfg.ControlDependency} object. */ public ControlDependency getControlDependency(Branch branch) { if (!isDirectlyControlDependentOn(branch)) throw new IllegalArgumentException( "instruction not directly control dependent on given branch"); for (ControlDependency cd : getControlDependencies()) if (cd.getBranch().equals(branch)) return cd; throw new IllegalStateException( "expect getControlDependencies() to contain a CD for each branch that isDirectlyControlDependentOn() returns true on"); }
/** * Determines whether this BytecodeInstruction is directly control dependent * on the given Branch. Meaning within this instruction CDG there is an * incoming ControlFlowEdge to this instructions BasicBlock holding the * given Branch as it's branchInstruction. * * If the given Branch is null, this method checks whether the this * instruction is control dependent on the root branch of it's method. * * @param branch * a {@link org.evosuite.coverage.branch.Branch} object. * @return a boolean. */ public boolean isDirectlyControlDependentOn(Branch branch) { if (branch == null) return getControlDependentBranchIds().contains(-1); for (ControlDependency cd : getControlDependencies()) if (cd.getBranch().equals(branch)) return true; return false; }
|| !current.getBranchInstruction().equals(origEdge.getBranchInstruction())) throw new IllegalStateException( "if this rawEdge was handled before i expect the old edge to have same branchInstruction set");
if (current.equals(b)) return true;
boolean handled = false; for (ControlFlowEdge old : soFar) if (switchCaseBranch.equals(old.getBranchInstruction())) handled = true;