Buggy code:
static final DiagnosticType REPORT_PATH_IO_ERROR = DiagnosticType . error ( "JSC_REPORT_PATH_IO_ERROR" , "Error<seq2seq4repair_space>writing<seq2seq4repair_space>compiler<seq2seq4repair_space>report<seq2seq4repair_space>to<seq2seq4repair_space>{0}" ) ; private static final DiagnosticType INPUT_MAP_PROP_PARSE = DiagnosticType . error ( "JSC_INPUT_MAP_PROP_PARSE" , "Input<seq2seq4repair_space>property<seq2seq4repair_space>map<seq2seq4repair_space>parse<seq2seq4repair_space>error:<seq2seq4repair_space>{0}" ) ; private static final DiagnosticType INPUT_MAP_VAR_PARSE = DiagnosticType . error ( "JSC_INPUT_MAP_VAR_PARSE" , "Input<seq2seq4repair_space>variable<seq2seq4repair_space>map<seq2seq4repair_space>parse<seq2seq4repair_space>error:<seq2seq4repair_space>{0}" ) ; private static final DiagnosticType NAME_REF_GRAPH_FILE_ERROR = DiagnosticType . error ( "JSC_NAME_REF_GRAPH_FILE_ERROR" , "Error<seq2seq4repair_space>\"{1}\"<seq2seq4repair_space>writing<seq2seq4repair_space>name<seq2seq4repair_space>reference<seq2seq4repair_space>graph<seq2seq4repair_space>to<seq2seq4repair_space>\"{0}\"." ) ; private static final DiagnosticType NAME_REF_REPORT_FILE_ERROR = DiagnosticType . error ( "JSC_NAME_REF_REPORT_FILE_ERROR" , "Error<seq2seq4repair_space>\"{1}\"<seq2seq4repair_space>writing<seq2seq4repair_space>name<seq2seq4repair_space>reference<seq2seq4repair_space>report<seq2seq4repair_space>to<seq2seq4repair_space>\"{0}\"." ) ; private static final Pattern GLOBAL_SYMBOL_NAMESPACE_PATTERN = Pattern . compile ( "^[a-zA-Z0-9$_]+$" ) ; private GlobalNamespace namespaceForChecks = null ; private PreprocessorSymbolTable preprocessorSymbolTable = null ; private TightenTypes tightenTypes = null ; private Set < String > exportedNames = null ; private IdGenerator crossModuleIdGenerator = new CrossModuleMethodMotion . IdGenerator ( ) ; private Map < String , Integer > cssNames = null ; private VariableMap variableMap = null ; private VariableMap propertyMap = null ; private VariableMap anonymousFunctionNameMap = null ; private FunctionNames functionNames = null ; private VariableMap stringMap = null ; private String idGeneratorMap = null ; public DefaultPassConfig ( CompilerOptions options ) { } @ Override State getIntermediateState ( ) { } @ Override void setIntermediateState ( State state ) { } GlobalNamespace getGlobalNamespace ( ) { } PreprocessorSymbolTable getPreprocessorSymbolTable ( ) { } void maybeInitializePreprocessorSymbolTable ( AbstractCompiler compiler ) { } @ Override protected List < PassFactory > getChecks ( ) { } @ Override protected List < PassFactory > getOptimizations ( ) { List < PassFactory > passes = Lists . newArrayList ( ) ; passes . add ( garbageCollectChecks ) ; if ( options . runtimeTypeCheck ) { passes . add ( runtimeTypeCheck ) ; } passes . add ( DefaultPassConfig . createEmptyPass ( "beforeStandardOptimizations" ) ) ; if ( options . replaceIdGenerators ) { passes . add ( replaceIdGenerators ) ; } if ( options . optimizeArgumentsArray ) { passes . add ( optimizeArgumentsArray ) ; } if ( ( options . closurePass ) && ( ( options . removeAbstractMethods ) || ( options . removeClosureAsserts ) ) ) { passes . add ( closureCodeRemoval ) ; } if ( options . collapseProperties ) { passes . add ( collapseProperties ) ; } if ( ! ( replaceStringsFunctionDescriptions . isEmpty ( ) ) ) { passes . add ( replaceStrings ) ; } if ( options . tightenTypes ) { passes . add ( tightenTypesBuilder ) ; } if ( options . disambiguateProperties ) { passes . add ( disambiguateProperties ) ; } if ( options . computeFunctionSideEffects ) { passes . add ( markPureFunctions ) ; } else if ( options . markNoSideEffectCalls ) { passes . add ( markNoSideEffectCalls ) ; } if ( options . chainCalls ) { passes . add ( chainCalls ) ; } if ( options . inlineConstantVars ) { passes . add ( checkConsts ) ; } if ( options . ignoreCajaProperties ) { passes . add ( ignoreCajaProperties ) ; } assertAllOneTimePasses ( passes ) ; if ( ( options . smartNameRemoval ) || ( ( options . reportPath ) != null ) ) { passes . addAll ( getCodeRemovingPasses ( ) ) ; passes . add ( smartNamePass ) ; } if ( options . closurePass ) { passes . add ( closureOptimizePrimitives ) ; } if ( options . crossModuleCodeMotion ) { passes . add ( crossModuleCodeMotion ) ; } if ( options . devirtualizePrototypeMethods ) { passes . add ( devirtualizePrototypeMethods ) ; } if ( ( options . customPasses ) != null ) { passes . add ( getCustomPasses ( BEFORE_OPTIMIZATION_LOOP ) ) ; } passes . add ( DefaultPassConfig . createEmptyPass ( "beforeMainOptimizations" ) ) ; if ( options . specializeInitialModule ) { passes . addAll ( getMainOptimizationLoop ( ) ) ; if ( options . crossModuleCodeMotion ) { passes . add ( crossModuleCodeMotion ) ; } if ( options . crossModuleMethodMotion ) { passes . add ( crossModuleMethodMotion ) ; } passes . add ( specializeInitialModule . makeOneTimePass ( ) ) ; } passes . addAll ( getMainOptimizationLoop ( ) ) ; passes . add ( DefaultPassConfig . createEmptyPass ( "beforeModuleMotion" ) ) ; if ( options . crossModuleCodeMotion ) { passes . add ( crossModuleCodeMotion ) ; } if ( options . crossModuleMethodMotion ) { passes . add ( crossModuleMethodMotion ) ; } passes . add ( DefaultPassConfig . createEmptyPass ( "afterModuleMotion" ) ) ; if ( ( options . customPasses ) != null ) { passes . add ( getCustomPasses ( AFTER_OPTIMIZATION_LOOP ) ) ; } if ( options . flowSensitiveInlineVariables ) { passes . add ( flowSensitiveInlineVariables ) ; <START_BUG> if ( options . removeUnusedVars ) { <END_BUG> passes . add ( removeUnusedVars ) ; } } if ( options . smartNameRemoval ) { passes . add ( smartNamePass2 ) ; } if ( options . collapseAnonymousFunctions ) { passes . add ( collapseAnonymousFunctions ) ; } if ( ( options . moveFunctionDeclarations ) || ( ( options . renamePrefixNamespace ) != null ) ) { passes . add ( moveFunctionDeclarations ) ; } if ( ( options . anonymousFunctionNaming ) == ( AnonymousFunctionNamingPolicy . MAPPED ) ) { passes . add ( nameMappedAnonymousFunctions ) ; } if ( ( options . extractPrototypeMemberDeclarations ) && ( ( ( options . propertyRenaming ) != ( PropertyRenamingPolicy . HEURISTIC ) ) && ( ( options . propertyRenaming ) != ( PropertyRenamingPolicy . AGGRESSIVE_HEURISTIC ) ) ) ) { passes . add ( extractPrototypeMemberDeclarations ) ; } if ( ( options . ambiguateProperties ) && ( ( options . propertyRenaming ) == ( PropertyRenamingPolicy . ALL_UNQUOTED ) ) ) { passes . add ( ambiguateProperties ) ; } if ( ( options . propertyRenaming ) != ( PropertyRenamingPolicy . OFF ) ) { passes . add ( renameProperties ) ; } if ( options . reserveRawExports ) { passes . add ( gatherRawExports ) ; } if ( options . convertToDottedProperties ) { passes . add ( convertToDottedProperties ) ; } if ( options . rewriteFunctionExpressions ) { passes . add ( rewriteFunctionExpressions ) ; } if ( ( ! ( aliasableStrings . isEmpty ( ) ) ) || ( options . aliasAllStrings ) ) { passes . add ( aliasStrings ) ;

Fix:
if ( ( options . removeUnusedVars ) || ( options . removeUnusedLocalVars ) ) {