Buggy code:
protected int temporaryVariableIndex ; private Map < String , Integer > nextVarIndex ; private int nextClosureIndex ; protected static class LocalVariableAllocator { public int nextSlot ; public Map < String , LocalVariable > varMap ; public LocalVariableAllocator ( ) { } public final LocalVariable getVariable ( String name ) { } public final void putVariable ( String name , LocalVariable var ) { } } IRScope . LocalVariableAllocator localVars ; IRScope . LocalVariableAllocator evalScopeVars ; private boolean canCaptureCallersBinding ; private boolean canModifyCode ; private boolean bindingHasEscaped ; private boolean usesEval ; private boolean usesZSuper ; private boolean hasLoops ; private int threadPollInstrsCount ; private boolean relinearizeCFG ; private IRManager manager ; protected IRScope ( IRScope s , IRScope lexicalParent ) { } public IRScope ( IRManager manager , IRScope lexicalParent , String name , String fileName , int lineNumber , StaticScope staticScope ) { } @ Override public int hashCode ( ) { } public void addClosure ( IRClosure c ) { } public Instr getLastInstr ( ) { } public void addInstr ( Instr i ) { } public LocalVariable getNewFlipStateVariable ( ) { } public void initFlipStateVariable ( Variable v , Operand initState ) { } public boolean isForLoopBody ( ) { } public Label getNewLabel ( String prefix ) { } public Label getNewLabel ( ) { } public List < IRClosure > getClosures ( ) { } public IRManager getManager ( ) { } public IRScope getLexicalParent ( ) { } public StaticScope getStaticScope ( ) { } public IRMethod getNearestMethod ( ) { } public IRScope getNearestFlipVariableScope ( ) { } public IRScope getNearestTopLocalVariableScope ( ) { } public IRScope getNearestModuleReferencingScope ( ) { } public String getName ( ) { } public void setName ( String name ) { } public String getFileName ( ) { } public int getLineNumber ( ) { } public IRScope getTopLevelScope ( ) { } public boolean isNestedInClosure ( IRClosure closure ) { } public void setHasLoopsFlag ( boolean f ) { } public boolean hasLoops ( ) { } public void setCodeModificationFlag ( boolean f ) { } public boolean modifiesCode ( ) { } public boolean bindingHasEscaped ( ) { } public boolean usesEval ( ) { } public boolean usesZSuper ( ) { } public boolean canCaptureCallersBinding ( ) { } public CFG buildCFG ( ) { } protected void setCFG ( CFG cfg ) { } public CFG getCFG ( ) { } public void runCompilerPassOnNestedScopes ( CompilerPass p ) { } public void runCompilerPass ( CompilerPass p ) { } private Instr [ ] prepareInstructionsForInterpretation ( ) { } private void printPass ( String message ) { } private void runCompilerPasses ( ) { } public synchronized Instr [ ] prepareForInterpretation ( ) { } public Tuple < Instr [ ] , Map < Integer , Label [ ] > > prepareForCompilation ( ) { } private static Label [ ] catLabels ( Label [ ] labels , Label cat ) { } private boolean computeScopeFlags ( boolean receivesClosureArg , List < Instr > instrs ) { } public void computeScopeFlags ( ) { } public abstract String getScopeName ( ) { } @ Override public String toString ( ) { } public String toStringInstrs ( ) { } public String toStringVariables ( ) { } public LocalVariable getSelf ( ) { } public Variable getCurrentModuleVariable ( ) { } public Variable getCurrentScopeVariable ( ) { } public abstract LocalVariable getImplicitBlockArg ( ) { } public void markUnusedImplicitBlockArg ( ) { } public LocalVariable findExistingLocalVariable ( String name , int depth ) { } public LocalVariable getLocalVariable ( String name , int scopeDepth ) { } public LocalVariable getNewLocalVariable ( String name , int depth ) { } protected void initEvalScopeVariableAllocator ( boolean reset ) { } public Variable getNewTemporaryVariable ( ) { } public Variable getNewTemporaryVariable ( String name ) { } public void resetTemporaryVariables ( ) { } public int getTemporaryVariableSize ( ) { } public Variable getNewInlineVariable ( String inlinePrefix , Variable v ) { } public int getThreadPollInstrsCount ( ) { } public int getLocalVariablesCount ( ) { } public int getUsedVariablesCount ( ) { } public void setUpUseDefLocalVarMaps ( ) { } public boolean usesLocalVariable ( Variable v ) { } public boolean definesLocalVariable ( Variable v ) { } public void setDataFlowSolution ( String name , DataFlowProblem p ) { } public DataFlowProblem getDataFlowSolution ( String name ) { } public List < Instr > getInstrs ( ) { } public Instr [ ] getInstrsForInterpretation ( ) { } public List < BasicBlock > buildLinearization ( ) { if ( relinearizeCFG ) { linearizedBBList = null ; relinearizeCFG = false ; } if ( ( linearizedBBList ) != null ) return linearizedBBList ; <START_BUG> linearizedBBList = CFGLinearizer . linearize ( cfg ( ) ) ; <END_BUG> return linearizedBBList ; } public int getRescuerPC ( Instr excInstr ) { } public int getEnsurerPC ( Instr excInstr ) { } public List < BasicBlock > linearization ( ) { } protected void depends ( Object obj ) { } public CFG cfg ( ) { } public void splitCalls ( ) { } public void resetDFProblemsState ( ) { } public void resetState ( ) { } public void inlineMethod ( IRScope method , RubyModule implClass , int classToken , BasicBlock basicBlock , CallBase call ) { } public void buildCFG ( List < Instr > instrList ) { } public void recordBeginBlock ( IRClosure beginBlockClosure ) { } public void recordEndBlock ( IRClosure endBlockClosure ) { } protected int allocateNextPrefixedName ( String prefix ) { } protected void resetVariableCounter ( String prefix ) { } protected int getPrefixCountSize ( String prefix ) { } public RubyModule getContainerModule ( ) { } public int getNextClosureId ( ) { } public boolean isModuleBody ( ) { } public boolean isFlipScope ( ) { } public boolean isTopLocalVariableScope ( ) { } public boolean isScriptScope ( ) { } }

Fix:
linearizedBBList = CFGLinearizer . linearize ( cfg ) ;