Buggy code:
public class CFG { public enum CFG_Edge_Type { REGULAR , DUMMY_EDGE , JUMP_EDGE , FALLTHRU_EDGE , FORWARD_EDGE , BACK_EDGE , EXIT_EDGE , EXCEPTION_EDGE ; } public static class CFG_Edge { public final BasicBlock _src ; public final BasicBlock _dst ; public CFG . CFG_Edge_Type _type ; public CFG_Edge ( BasicBlock s , BasicBlock d ) { } @ Override public String toString ( ) { } } IRExecutionScope _scope ; BasicBlock _entryBB ; BasicBlock _exitBB ; int _nextBBId ; DirectedGraph < BasicBlock , CFG . CFG_Edge > _cfg ; LinkedList < BasicBlock > _postOrderList ; Map < String , DataFlowProblem > _dfProbs ; Map < Label , BasicBlock > _bbMap ; BasicBlock [ ] _fallThruMap ; List < BasicBlock > _linearizedBBList ; Map < BasicBlock , BasicBlock > _bbRescuerMap ; Map < BasicBlock , BasicBlock > _bbEnsurerMap ; List < ExceptionRegion > _outermostERs ; private Instr [ ] _instrs ; private Set < Variable > _definedLocalVars ; private Set < Variable > _usedLocalVars ; public CFG ( IRExecutionScope s ) { } public DirectedGraph getGraph ( ) { } public IRExecutionScope getScope ( ) { } public BasicBlock getEntryBB ( ) { } public BasicBlock getExitBB ( ) { } public int getNextBBID ( ) { } public int getMaxNodeID ( ) { } public int numNodes ( ) { } public Set < CFG . CFG_Edge > incomingEdgesOf ( BasicBlock bb ) { } public Set < CFG . CFG_Edge > outgoingEdgesOf ( BasicBlock bb ) { } public Set < BasicBlock > getNodes ( ) { } public BasicBlock getTargetBB ( Label l ) { } public BasicBlock getRescuerBB ( BasicBlock b ) { } public boolean bbIsProtected ( BasicBlock b ) { } public int getRescuerPC ( Instr excInstr ) { } public int getEnsurerPC ( Instr excInstr ) { } public void addGlobalEnsureBlock ( BasicBlock geb ) { _cfg . addVertex ( geb ) ; _cfg . addEdge ( geb , _exitBB ) . _type = CFG . CFG_Edge_Type . DUMMY_EDGE ; for ( BasicBlock b : getNodes ( ) ) { <START_BUG> if ( ! ( bbIsProtected ( b ) ) ) { <END_BUG> _cfg . addEdge ( b , geb ) . _type = CFG . CFG_Edge_Type . EXCEPTION_EDGE ; _bbRescuerMap . put ( b , geb ) ; _bbEnsurerMap . put ( b , geb ) ; } } } private Label getNewLabel ( ) { } private BasicBlock createNewBB ( Label l , DirectedGraph < BasicBlock , CFG . CFG_Edge > g , Map < Label , BasicBlock > bbMap , Stack < ExceptionRegion > nestedExceptionRegions ) { } private BasicBlock createNewBB ( DirectedGraph < BasicBlock , CFG . CFG_Edge > g , Map < Label , BasicBlock > bbMap , Stack < ExceptionRegion > nestedExceptionRegions ) { } private void removeBB ( BasicBlock b ) { } private void addEdge ( DirectedGraph < BasicBlock , CFG . CFG_Edge > g , BasicBlock src , Label tgt , Map < Label , BasicBlock > bbMap , Map < Label , List < BasicBlock > > forwardRefs ) { } private DefaultDirectedGraph < BasicBlock , CFG . CFG_Edge > getNewCFG ( ) { } public Instr [ ] prepareForInterpretation ( ) { } public Instr [ ] getInstrArray ( ) { } public void build ( List < Instr > instrs ) { } private void setupFallThruMap ( ) { } private void mergeBBs ( BasicBlock a , BasicBlock b ) { } private void mergeStraightlineBBs ( BasicBlock callBB , BasicBlock splitBB ) { } private void inlineClosureAtYieldSite ( InlinerInfo ii , IRClosure cl , BasicBlock yieldBB , YieldInstr yield ) { } public void inlineMethod ( IRMethod m , BasicBlock callBB , CallInstr call ) { } private void buildPostOrderTraversal ( ) { } public ListIterator < BasicBlock > getPostOrderTraverser ( ) { } public ListIterator < BasicBlock > getReversePostOrderTraverser ( ) { } private Integer intersectDomSets ( Integer [ ] idomMap , Integer nb1 , Integer nb2 ) { } public void buildDominatorTree ( ) { } public String toStringInstrs ( ) { } public void setDataFlowSolution ( String name , DataFlowProblem p ) { } public DataFlowProblem getDataFlowSolution ( String name ) { } private void pushBBOnStack ( Stack < BasicBlock > stack , BitSet bbSet , BasicBlock bb ) { } public void deleteOrphanedBlocks ( ) { } public void splitCalls ( ) { } public void optimizeCFG ( ) { } public List < BasicBlock > linearize ( ) { } public String toString ( ) { } public void setUpUseDefLocalVarMaps ( ) { } public boolean usesLocalVariable ( Variable v ) { } public boolean definesLocalVariable ( Variable v ) { } }

Fix:
if ( ( b != geb ) && ( ! ( bbIsProtected ( b ) ) ) ) {