Program: 27571
Project: 27571
Buggy source:
@Override protected List<PassFactory> getChecks(){
  List<PassFactory> checks=Lists.newArrayList();
  checks.add(createEmptyPass("String_Node_Str"));
  if (options.closurePass) {
    checks.add(closureRewriteModule);
  }
  if (options.lowerFromEs6() || options.aggressiveVarCheck.isOn()) {
    checks.add(checkVariableReferences);
  }
  if (options.getLanguageIn() == LanguageMode.ECMASCRIPT6_TYPED && options.getLanguageOut() != LanguageMode.ECMASCRIPT6_TYPED) {
    checks.add(convertDeclaredTypesToJSDoc);
  }
  if (options.lowerFromEs6()) {
    checks.add(es6RenameVariablesInParamLists);
    checks.add(es6SplitVariableDeclarations);
    checks.add(es6ConvertSuper);
  }
  if (options.getLanguageIn() == LanguageMode.ECMASCRIPT6_TYPED && options.getLanguageOut() != LanguageMode.ECMASCRIPT6_TYPED) {
    checks.add(convertEs6TypedToEs6);
  }
  if (options.lowerFromEs6()) {
    checks.add(convertEs6ToEs3);
    checks.add(rewriteLetConst);
    checks.add(rewriteGenerators);
    checks.add(markTranspilationDone);
  }
  if (options.raiseToEs6Typed()) {
    checks.add(convertToTypedES6);
  }
  if (options.transpileOnly) {
    return checks;
  }
  if (options.lowerFromEs6()) {
    checks.add(es6RuntimeLibrary);
  }
  checks.add(convertStaticInheritance);
  if (options.declaredGlobalExternsOnWindow) {
    checks.add(declaredGlobalExternsOnWindow);
  }
  if (options.closurePass) {
    checks.add(closureGoogScopeAliases);
    checks.add(closureRewriteClass);
  }
  if (options.jqueryPass) {
    checks.add(jqueryAliases);
  }
  if (options.angularPass) {
    checks.add(angularPass);
  }
  if (options.polymerPass) {
    checks.add(polymerPass);
  }
  checks.add(checkSideEffects);
  if (options.checkSuspiciousCode || options.enables(DiagnosticGroups.GLOBAL_THIS) || options.enables(DiagnosticGroups.DEBUGGER_STATEMENT_PRESENT)) {
    checks.add(suspiciousCode);
  }
  if (options.enables(DiagnosticGroups.MISSING_REQUIRE)) {
    checks.add(checkRequires);
  }
  if (options.checkProvides.isOn()) {
    checks.add(checkProvides);
  }
  if (options.generateExports) {
    checks.add(generateExports);
  }
  if (options.exportTestFunctions) {
    checks.add(exportTestFunctions);
  }
  if (options.closurePass) {
    checks.add(closurePrimitives);
  }
  if (options.closurePass && options.checkMissingGetCssNameLevel.isOn()) {
    checks.add(closureCheckGetCssName);
  }
  if (options.syntheticBlockStartMarker != null) {
    checks.add(createSyntheticBlocks);
  }
  checks.add(checkVars);
  if (options.inferConsts) {
    checks.add(inferConsts);
  }
  if (options.computeFunctionSideEffects) {
    checks.add(checkRegExp);
  }
  if (options.processObjectPropertyString) {
    checks.add(objectPropertyStringPreprocess);
  }
  checks.add(createEmptyPass("String_Node_Str"));
  if (options.useNewTypeInference) {
    checks.add(symbolTableForNewTypeInference);
    checks.add(newTypeInference);
  }
  if (options.checkTypes || options.inferTypes) {
    checks.add(resolveTypes);
    checks.add(inferTypes);
    if (options.checkTypes) {
      checks.add(checkTypes);
    }
 else {
      checks.add(inferJsDocInfo);
    }
    if (!options.ideMode) {
      checks.add(clearTypedScopePass);
    }
  }
  if (!options.disables(DiagnosticGroups.CHECK_USELESS_CODE) || options.checkMissingReturn.isOn()) {
    checks.add(checkControlFlow);
  }
  if (options.checkTypes && (!options.disables(DiagnosticGroups.ACCESS_CONTROLS) || options.enables(DiagnosticGroups.CONSTANT_PROPERTY))) {
    checks.add(checkAccessControls);
  }
  if (options.enables(DiagnosticGroups.LINT_CHECKS)) {
    checks.add(lintChecks);
  }
  if (options.checkEventfulObjectDisposalPolicy != CheckEventfulObjectDisposal.DisposalCheckingPolicy.OFF) {
    checks.add(checkEventfulObjectDisposal);
  }
  if (options.checkGlobalNamesLevel.isOn()) {
    checks.add(checkGlobalNames);
  }
  if (options.enables(DiagnosticGroups.ES5_STRICT)) {
    checks.add(checkStrictMode);
  }
  if (!options.getConformanceConfigs().isEmpty()) {
    checks.add(checkConformance);
  }
  if (options.closurePass) {
    checks.add(closureReplaceGetCssName);
  }
  if (options.replaceMessagesWithChromeI18n) {
    checks.add(replaceMessagesForChrome);
  }
 else   if (options.messageBundle != null) {
    checks.add(replaceMessages);
  }
  if (options.getTweakProcessing().isOn()) {
    checks.add(processTweaks);
  }
  checks.add(processDefines);
  if (options.instrumentationTemplate != null || options.recordFunctionInformation) {
    checks.add(computeFunctionNames);
  }
  if (options.nameReferenceGraphPath != null && !options.nameReferenceGraphPath.isEmpty()) {
    checks.add(printNameReferenceGraph);
  }
  if (options.nameReferenceReportPath != null && !options.nameReferenceReportPath.isEmpty()) {
    checks.add(printNameReferenceReport);
  }
  checks.add(createEmptyPass("String_Node_Str"));
  assertAllOneTimePasses(checks);
  return checks;
}

Fixed version (ground truth):
@Override protected List<PassFactory> getChecks(){
  List<PassFactory> checks=Lists.newArrayList();
  checks.add(createEmptyPass("String_Node_Str"));
  if (options.closurePass) {
    checks.add(closureRewriteModule);
  }
  if (options.lowerFromEs6() || options.aggressiveVarCheck.isOn()) {
    checks.add(checkVariableReferences);
  }
  if (options.getLanguageIn() == LanguageMode.ECMASCRIPT6_TYPED && options.getLanguageOut() != LanguageMode.ECMASCRIPT6_TYPED) {
    checks.add(convertDeclaredTypesToJSDoc);
  }
  if (options.lowerFromEs6()) {
    checks.add(es6RenameVariablesInParamLists);
    checks.add(es6SplitVariableDeclarations);
    checks.add(es6ConvertSuper);
  }
  if (options.getLanguageIn() == LanguageMode.ECMASCRIPT6_TYPED && options.getLanguageOut() != LanguageMode.ECMASCRIPT6_TYPED) {
    checks.add(convertEs6TypedToEs6);
  }
  if (options.lowerFromEs6()) {
    checks.add(convertEs6ToEs3);
    checks.add(rewriteLetConst);
    checks.add(rewriteGenerators);
    checks.add(markTranspilationDone);
  }
  if (options.raiseToEs6Typed()) {
    checks.add(convertToTypedES6);
  }
  if (options.transpileOnly) {
    return checks;
  }
  if (options.lowerFromEs6()) {
    checks.add(es6RuntimeLibrary);
  }
  checks.add(convertStaticInheritance);
  if (options.declaredGlobalExternsOnWindow) {
    checks.add(declaredGlobalExternsOnWindow);
  }
  if (options.closurePass) {
    checks.add(closureGoogScopeAliases);
    checks.add(closureRewriteClass);
  }
  if (options.jqueryPass) {
    checks.add(jqueryAliases);
  }
  if (options.angularPass) {
    checks.add(angularPass);
  }
  if (options.polymerPass) {
    checks.add(polymerPass);
  }
  checks.add(checkSideEffects);
  if (options.checkSuspiciousCode || options.enables(DiagnosticGroups.GLOBAL_THIS) || options.enables(DiagnosticGroups.DEBUGGER_STATEMENT_PRESENT)) {
    checks.add(suspiciousCode);
  }
  if (options.enables(DiagnosticGroups.MISSING_REQUIRE) || options.enables(DiagnosticGroups.EXTRA_REQUIRE)) {
    checks.add(checkRequires);
  }
  if (options.checkProvides.isOn()) {
    checks.add(checkProvides);
  }
  if (options.generateExports) {
    checks.add(generateExports);
  }
  if (options.exportTestFunctions) {
    checks.add(exportTestFunctions);
  }
  if (options.closurePass) {
    checks.add(closurePrimitives);
  }
  if (options.closurePass && options.checkMissingGetCssNameLevel.isOn()) {
    checks.add(closureCheckGetCssName);
  }
  if (options.syntheticBlockStartMarker != null) {
    checks.add(createSyntheticBlocks);
  }
  checks.add(checkVars);
  if (options.inferConsts) {
    checks.add(inferConsts);
  }
  if (options.computeFunctionSideEffects) {
    checks.add(checkRegExp);
  }
  if (options.processObjectPropertyString) {
    checks.add(objectPropertyStringPreprocess);
  }
  checks.add(createEmptyPass("String_Node_Str"));
  if (options.useNewTypeInference) {
    checks.add(symbolTableForNewTypeInference);
    checks.add(newTypeInference);
  }
  if (options.checkTypes || options.inferTypes) {
    checks.add(resolveTypes);
    checks.add(inferTypes);
    if (options.checkTypes) {
      checks.add(checkTypes);
    }
 else {
      checks.add(inferJsDocInfo);
    }
    if (!options.ideMode) {
      checks.add(clearTypedScopePass);
    }
  }
  if (!options.disables(DiagnosticGroups.CHECK_USELESS_CODE) || options.checkMissingReturn.isOn()) {
    checks.add(checkControlFlow);
  }
  if (options.checkTypes && (!options.disables(DiagnosticGroups.ACCESS_CONTROLS) || options.enables(DiagnosticGroups.CONSTANT_PROPERTY))) {
    checks.add(checkAccessControls);
  }
  if (options.enables(DiagnosticGroups.LINT_CHECKS)) {
    checks.add(lintChecks);
  }
  if (options.checkEventfulObjectDisposalPolicy != CheckEventfulObjectDisposal.DisposalCheckingPolicy.OFF) {
    checks.add(checkEventfulObjectDisposal);
  }
  if (options.checkGlobalNamesLevel.isOn()) {
    checks.add(checkGlobalNames);
  }
  if (options.enables(DiagnosticGroups.ES5_STRICT)) {
    checks.add(checkStrictMode);
  }
  if (!options.getConformanceConfigs().isEmpty()) {
    checks.add(checkConformance);
  }
  if (options.closurePass) {
    checks.add(closureReplaceGetCssName);
  }
  if (options.replaceMessagesWithChromeI18n) {
    checks.add(replaceMessagesForChrome);
  }
 else   if (options.messageBundle != null) {
    checks.add(replaceMessages);
  }
  if (options.getTweakProcessing().isOn()) {
    checks.add(processTweaks);
  }
  checks.add(processDefines);
  if (options.instrumentationTemplate != null || options.recordFunctionInformation) {
    checks.add(computeFunctionNames);
  }
  if (options.nameReferenceGraphPath != null && !options.nameReferenceGraphPath.isEmpty()) {
    checks.add(printNameReferenceGraph);
  }
  if (options.nameReferenceReportPath != null && !options.nameReferenceReportPath.isEmpty()) {
    checks.add(printNameReferenceReport);
  }
  checks.add(createEmptyPass("String_Node_Str"));
  assertAllOneTimePasses(checks);
  return checks;
}