Program: 101302
Project: 101302
Buggy source:
@Override public String preProcess(final HtmlPage htmlPage,final String sourceCode,final String sourceName,final int lineNumber,final HtmlElement htmlElement){
  if (cacheInstrumentedCode && instrumentedScriptCache.containsKey(sourceName)) {
    final ScriptData data=instrumentedScriptCache.get(sourceName);
    scriptDataList.add(data);
    return data.getInstrumentedSourceCode();
  }
  if (shouldIgnore(sourceName)) {
    return sourceCode;
  }
  final ScriptData data=new ScriptData(sourceName,sourceCode);
  scriptDataList.add(data);
  final CompilerEnvirons environs=new CompilerEnvirons();
  environs.initFromContext(contextFactory.enterContext());
  final AstRoot root=new Parser(environs).parse(sourceCode,sourceName,lineNumber);
  root.visit(new InstrumentingVisitor(data));
  final String treeSource=root.toSource();
  final StringBuilder buf=new StringBuilder(initializingCode.length() + data.getNumberOfStatements() * arrayInitializer.length() + treeSource.length());
  buf.append(initializingCode);
  buf.append(String.format("String_Node_Str",coverageVariableName,sourceName));
  for (  final Integer i : data.getLineNumbersOfAllStatements()) {
    buf.append(String.format(arrayInitializer,data.getSourceName(),i));
  }
  buf.append(treeSource);
  final String instrumentedCode=buf.toString();
  data.setInstrumentedSourceCode(instrumentedCode);
  if (cacheInstrumentedCode) {
    instrumentedScriptCache.put(sourceName,data);
  }
  if (outputInstrumentedFiles) {
    try {
      final File outputFile=new File(outputDir,new File(sourceName).getName() + "String_Node_Str");
      logger.info("String_Node_Str",outputFile.getAbsolutePath());
      IOUtils.write(instrumentedCode,new FileOutputStream(outputFile));
    }
 catch (    final IOException e) {
      throw new RuntimeException(e);
    }
  }
  return instrumentedCode;
}

Fixed version (ground truth):
@Override public String preProcess(final HtmlPage htmlPage,final String sourceCode,final String sourceName,final int lineNumber,final HtmlElement htmlElement){
  if (cacheInstrumentedCode && instrumentedScriptCache.containsKey(sourceName)) {
    final ScriptData data=instrumentedScriptCache.get(sourceName);
    scriptDataList.add(data);
    return data.getInstrumentedSourceCode();
  }
  if (shouldIgnore(sourceName)) {
    return sourceCode;
  }
  final ScriptData data=new ScriptData(sourceName,sourceCode);
  scriptDataList.add(data);
  final CompilerEnvirons environs=new CompilerEnvirons();
  environs.initFromContext(contextFactory.enterContext());
  final AstRoot root=new Parser(environs).parse(sourceCode,sourceName,lineNumber);
  root.visit(new InstrumentingVisitor(data));
  final String treeSource=root.toSource();
  final StringBuilder buf=new StringBuilder(initializingCode.length() + data.getNumberOfStatements() * arrayInitializer.length() + treeSource.length());
  buf.append(initializingCode);
  buf.append(String.format("String_Node_Str",coverageVariableName,sourceName));
  for (  final Integer i : data.getLineNumbersOfAllStatements()) {
    buf.append(String.format(arrayInitializer,data.getSourceName(),i));
  }
  buf.append(treeSource);
  final String instrumentedCode=buf.toString();
  data.setInstrumentedSourceCode(instrumentedCode);
  if (cacheInstrumentedCode) {
    instrumentedScriptCache.putIfAbsent(sourceName,data);
  }
  if (outputInstrumentedFiles) {
    try {
      if (!writtenToDisk.contains(sourceName)) {
        final File outputFile=new File(outputDir,new File(sourceName).getName() + "String_Node_Str");
        logger.info("String_Node_Str",outputFile.getAbsolutePath());
        IOUtils.write(instrumentedCode,new FileOutputStream(outputFile));
        writtenToDisk.add(sourceName);
      }
    }
 catch (    final IOException e) {
      throw new RuntimeException(e);
    }
  }
  return instrumentedCode;
}