Program: 29389
Project: 29389
Buggy source:
/** 
 * Generates Incremental DOM JS source code given a Soy parse tree, an options object, and an optional bundle of translated messages.
 * @param soyTree The Soy parse tree to generate JS source code for.
 * @param registry The template registry that contains all the template information.
 * @param options The compilation options relevant to this backend.
 * @param errorReporter The Soy error reporter that collects errors during code generation.
 * @return A list of strings where each string represents the JS source code that belongs in oneJS file. The generated JS files correspond one-to-one to the original Soy source files.
 */
public List<String> genJsSrc(SoyFileSetNode soyTree,TemplateRegistry registry,SoyIncrementalDomSrcOptions options,ErrorReporter errorReporter){
  SoyJsSrcOptions incrementalJSSrcOptions=options.toJsSrcOptions();
  try (GuiceSimpleScope.InScope inScope=apiCallScope.enter()){
    inScope.seed(SoyJsSrcOptions.class,incrementalJSSrcOptions);
    BidiGlobalDir bidiGlobalDir=SoyBidiUtils.decodeBidiGlobalDirFromJsOptions(incrementalJSSrcOptions.getBidiGlobalDir(),incrementalJSSrcOptions.getUseGoogIsRtlForBidiGlobalDir());
    ApiCallScopeUtils.seedSharedParams(inScope,null,bidiGlobalDir);
    optimizeBidiCodeGenVisitorProvider.get().exec(soyTree);
    new HtmlContextVisitor(errorReporter).exec(soyTree);
    if (errorReporter.hasErrors()) {
      return Collections.emptyList();
    }
    new UnescapingVisitor().exec(soyTree);
    new IncrementalDomExtractMsgVariablesVisitor().exec(soyTree);
    new CombineConsecutiveRawTextNodesVisitor().exec(soyTree);
    return genIncrementalDomCodeVisitorProvider.get().gen(soyTree,registry,errorReporter);
  }
 }

Fixed version (ground truth):
/** 
 * Generates Incremental DOM JS source code given a Soy parse tree, an options object, and an optional bundle of translated messages.
 * @param soyTree The Soy parse tree to generate JS source code for.
 * @param registry The template registry that contains all the template information.
 * @param options The compilation options relevant to this backend.
 * @param errorReporter The Soy error reporter that collects errors during code generation.
 * @return A list of strings where each string represents the JS source code that belongs in oneJS file. The generated JS files correspond one-to-one to the original Soy source files.
 */
public List<String> genJsSrc(SoyFileSetNode soyTree,TemplateRegistry registry,SoyIncrementalDomSrcOptions options,ErrorReporter errorReporter){
  SoyJsSrcOptions incrementalJSSrcOptions=options.toJsSrcOptions();
  try (GuiceSimpleScope.InScope inScope=apiCallScope.enter()){
    inScope.seed(SoyJsSrcOptions.class,incrementalJSSrcOptions);
    BidiGlobalDir bidiGlobalDir=SoyBidiUtils.decodeBidiGlobalDirFromJsOptions(incrementalJSSrcOptions.getBidiGlobalDir(),incrementalJSSrcOptions.getUseGoogIsRtlForBidiGlobalDir());
    ApiCallScopeUtils.seedSharedParams(inScope,null,bidiGlobalDir);
    optimizeBidiCodeGenVisitorProvider.get().exec(soyTree);
    new HtmlContextVisitor(errorReporter).exec(soyTree);
    if (errorReporter.hasErrors()) {
      return Collections.emptyList();
    }
    new UnescapingVisitor().exec(soyTree);
    new IncrementalDomExtractMsgVariablesVisitor().exec(soyTree);
    new CombineConsecutiveRawTextNodesPass().run(soyTree);
    return genIncrementalDomCodeVisitorProvider.get().gen(soyTree,registry,errorReporter);
  }
 }