Program: 29392
Project: 29392
Buggy source:
private PassManager(Builder builder){
  this.registry=checkNotNull(builder.registry);
  this.soyFunctionMap=checkNotNull(builder.soyFunctionMap);
  this.errorReporter=checkNotNull(builder.errorReporter);
  this.declaredSyntaxVersion=checkNotNull(builder.declaredSyntaxVersion);
  this.options=checkNotNull(builder.opts);
  boolean allowUnknownGlobals=builder.allowUnknownGlobals;
  boolean disableAllTypeChecking=builder.disableAllTypeChecking;
  this.desugarHtmlNodes=builder.desugarHtmlNodes;
  this.autoescaper=builder.autoescaperEnabled ? new ContextualAutoescaper(builder.soyPrintDirectives) : null;
  this.simplifyVisitor=options.isOptimizerEnabled() ? SimplifyVisitor.create(builder.soyPrintDirectives) : null;
  ImmutableList.Builder<CompilerFilePass> singleFilePassesBuilder=ImmutableList.<CompilerFilePass>builder().add(new HtmlRewritePass(errorReporter)).add(new ContentSecurityPolicyNonceInjectionPass(errorReporter)).add(new InsertMsgPlaceholderNodesPass(errorReporter)).add(new RewriteGendersPass()).add(new RewriteRemaindersPass()).add(new StrictHtmlValidationPass(options.getExperimentalFeatures(),errorReporter)).add(new RewriteGlobalsPass(registry,options.getCompileTimeGlobals(),errorReporter)).add(new ResolveNamesPass());
  singleFilePassesBuilder.add(new ResolveFunctionsPass());
  if (!disableAllTypeChecking) {
    singleFilePassesBuilder.add(new ResolveExpressionTypesPass());
  }
  singleFilePassesBuilder.add(new ResolvePackageRelativeCssNamesPass());
  if (!allowUnknownGlobals) {
    singleFilePassesBuilder.add(new CheckGlobalsPass(errorReporter));
  }
  singleFilePassesBuilder.add(new ValidateAliasesPass()).add(new CheckNonEmptyMsgNodesPass(errorReporter)).add(new CheckSyntaxVersionPass());
  if (!disableAllTypeChecking) {
    singleFilePassesBuilder.add(new CheckProtoInitCallsPass(errorReporter)).add(new CheckFunctionCallsPass(builder.allowUnknownFunctions,declaredSyntaxVersion,errorReporter));
  }
  if (options.isStrictAutoescapingRequired() == TriState.ENABLED) {
    singleFilePassesBuilder.add(new EnforceStrictAutoescapingPass());
  }
  if (builder.addHtmlCommentsForDebug) {
    singleFilePassesBuilder.add(new AddHtmlCommentsForDebugPass());
  }
  this.singleFilePasses=singleFilePassesBuilder.build();
  ImmutableList.Builder<CompilerFileSetPass> beforeAutoescaperFileSetPassBuilder=ImmutableList.<CompilerFileSetPass>builder().add(new CheckTemplateParamsPass());
  if (!disableAllTypeChecking) {
    beforeAutoescaperFileSetPassBuilder.add(new CheckTemplateCallsPass(errorReporter));
  }
  beforeAutoescaperFileSetPassBuilder.add(new CheckVisibilityPass()).add(new CheckDelegatesPass()).add(new CheckEscapingSanityFileSetPass(errorReporter));
  if (options.allowExternalCalls() == TriState.DISABLED) {
    beforeAutoescaperFileSetPassBuilder.add(new StrictDepsPass());
  }
  beforeAutoescaperFileSetPassBuilder.add(new CombinedRawTextNodesPass());
  this.crossTemplateCheckingPasses=beforeAutoescaperFileSetPassBuilder.build();
  ImmutableList.Builder<CompilerFileSetPass> simplificationPassesBuilder=ImmutableList.builder();
  if (desugarHtmlNodes) {
    simplificationPassesBuilder.add(new DesugarHtmlNodesPass());
  }
  if (builder.optimize) {
    simplificationPassesBuilder.add(new OptimizationPass());
  }
  simplificationPassesBuilder.add(new CombinedRawTextNodesPass());
  this.simplificationPasses=simplificationPassesBuilder.build();
}

Fixed version (ground truth):
private PassManager(Builder builder){
  this.registry=checkNotNull(builder.registry);
  this.soyFunctionMap=checkNotNull(builder.soyFunctionMap);
  this.errorReporter=checkNotNull(builder.errorReporter);
  this.declaredSyntaxVersion=checkNotNull(builder.declaredSyntaxVersion);
  this.options=checkNotNull(builder.opts);
  boolean allowUnknownGlobals=builder.allowUnknownGlobals;
  boolean disableAllTypeChecking=builder.disableAllTypeChecking;
  this.desugarHtmlNodes=builder.desugarHtmlNodes;
  this.autoescaper=builder.autoescaperEnabled ? new ContextualAutoescaper(builder.soyPrintDirectives) : null;
  this.simplifyVisitor=options.isOptimizerEnabled() ? SimplifyVisitor.create(builder.soyPrintDirectives) : null;
  ImmutableList.Builder<CompilerFilePass> singleFilePassesBuilder=ImmutableList.<CompilerFilePass>builder().add(new HtmlRewritePass(errorReporter)).add(new ContentSecurityPolicyNonceInjectionPass(errorReporter)).add(new InsertMsgPlaceholderNodesPass(errorReporter)).add(new RewriteGendersPass()).add(new RewriteRemaindersPass()).add(new StrictHtmlValidationPass(options.getExperimentalFeatures(),errorReporter)).add(new RewriteGlobalsPass(registry,options.getCompileTimeGlobals(),errorReporter)).add(new ResolveNamesPass());
  singleFilePassesBuilder.add(new ResolveFunctionsPass());
  if (!disableAllTypeChecking) {
    singleFilePassesBuilder.add(new ResolveExpressionTypesPass());
  }
  singleFilePassesBuilder.add(new ResolvePackageRelativeCssNamesPass());
  if (!allowUnknownGlobals) {
    singleFilePassesBuilder.add(new CheckGlobalsPass(errorReporter));
  }
  singleFilePassesBuilder.add(new ValidateAliasesPass()).add(new CheckNonEmptyMsgNodesPass(errorReporter)).add(new CheckSyntaxVersionPass());
  if (!disableAllTypeChecking) {
    singleFilePassesBuilder.add(new CheckProtoInitCallsPass(errorReporter)).add(new CheckFunctionCallsPass(builder.allowUnknownFunctions,declaredSyntaxVersion,errorReporter));
  }
  if (options.isStrictAutoescapingRequired() == TriState.ENABLED) {
    singleFilePassesBuilder.add(new EnforceStrictAutoescapingPass());
  }
  if (builder.addHtmlCommentsForDebug) {
    singleFilePassesBuilder.add(new AddHtmlCommentsForDebugPass());
  }
  this.singleFilePasses=singleFilePassesBuilder.build();
  ImmutableList.Builder<CompilerFileSetPass> beforeAutoescaperFileSetPassBuilder=ImmutableList.<CompilerFileSetPass>builder().add(new CheckTemplateParamsPass());
  if (!disableAllTypeChecking) {
    beforeAutoescaperFileSetPassBuilder.add(new CheckTemplateCallsPass(errorReporter));
  }
  beforeAutoescaperFileSetPassBuilder.add(new CheckVisibilityPass()).add(new CheckDelegatesPass()).add(new CheckEscapingSanityFileSetPass(errorReporter));
  if (options.allowExternalCalls() == TriState.DISABLED) {
    beforeAutoescaperFileSetPassBuilder.add(new StrictDepsPass());
  }
  beforeAutoescaperFileSetPassBuilder.add(new CombineConsecutiveRawTextNodesPass());
  this.crossTemplateCheckingPasses=beforeAutoescaperFileSetPassBuilder.build();
  ImmutableList.Builder<CompilerFileSetPass> simplificationPassesBuilder=ImmutableList.builder();
  if (desugarHtmlNodes) {
    simplificationPassesBuilder.add(new DesugarHtmlNodesPass());
  }
  if (builder.optimize) {
    simplificationPassesBuilder.add(new OptimizationPass());
  }
  simplificationPassesBuilder.add(new CombineConsecutiveRawTextNodesPass());
  this.simplificationPasses=simplificationPassesBuilder.build();
}