Program: 101288
Project: 101288
Buggy source:
@Override public String preProcess(final HtmlPage htmlPage,final String sourceCode,final String sourceName,final int lineNumber,final HtmlElement htmlElement){
  String resolvedSourceName;
  if (sourceName.startsWith("String_Node_Str")) {
    resolvedSourceName=sourceName;
  }
 else {
    try {
      resolvedSourceName=ResourceUtils.getRelativePath(sourceName,htmlPage.getWebResponse().getWebRequest().getUrl().toString(),File.separator);
    }
 catch (    final Exception e) {
      logger.error(e.getMessage(),e);
      resolvedSourceName=sourceName;
    }
  }
  if (cacheInstrumentedCode && instrumentedScriptCache.containsKey(resolvedSourceName)) {
    final ScriptData data=instrumentedScriptCache.get(resolvedSourceName);
    scriptDataList.add(data);
    return data.getInstrumentedSourceCode();
  }
  if (shouldIgnore(resolvedSourceName)) {
    return sourceCode;
  }
  final ScriptData data;
  data=new ScriptData(resolvedSourceName,sourceCode);
  scriptDataList.add(data);
  final CompilerEnvirons environs=new CompilerEnvirons();
  environs.initFromContext(contextFactory.enterContext());
  final AstRoot root=new Parser(environs).parse(sourceCode,resolvedSourceName,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,resolvedSourceName));
  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(resolvedSourceName,data);
  }
  if (outputInstrumentedFiles) {
synchronized (writtenToDisk) {
      try {
        if (!writtenToDisk.contains(resolvedSourceName)) {
          final File file=new File(resolvedSourceName);
          final File fileOutputDir=new File(outputDir,DigestUtils.md5Hex(file.getParent()));
          FileUtils.mkdir(fileOutputDir.getAbsolutePath());
          final File outputFile=new File(fileOutputDir,file.getName());
          logger.info("String_Node_Str",outputFile.getAbsolutePath());
          IOUtils.write(instrumentedCode,new FileOutputStream(outputFile));
          writtenToDisk.add(resolvedSourceName);
        }
      }
 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){
  final String normalizedSourceName=INLINE_SCRIPT_RE.matcher(sourceName).replaceAll("String_Node_Str");
  if (cacheInstrumentedCode && instrumentedScriptCache.containsKey(normalizedSourceName)) {
    final ScriptData data=instrumentedScriptCache.get(normalizedSourceName);
    scriptDataList.add(data);
    return data.getInstrumentedSourceCode();
  }
  if (shouldIgnore(normalizedSourceName)) {
    return sourceCode;
  }
  final ScriptData data;
  data=new ScriptData(normalizedSourceName,sourceCode);
  scriptDataList.add(data);
  final CompilerEnvirons environs=new CompilerEnvirons();
  environs.initFromContext(contextFactory.enterContext());
  final AstRoot root=new Parser(environs).parse(sourceCode,normalizedSourceName,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,normalizedSourceName));
  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(normalizedSourceName,data);
  }
  if (outputInstrumentedFiles) {
synchronized (writtenToDisk) {
      try {
        if (!writtenToDisk.contains(normalizedSourceName)) {
          final File file=new File(normalizedSourceName);
          final File fileOutputDir=new File(outputDir,DigestUtils.md5Hex(file.getParent()));
          FileUtils.mkdir(fileOutputDir.getAbsolutePath());
          final File outputFile=new File(fileOutputDir,file.getName());
          logger.info("String_Node_Str",outputFile.getAbsolutePath());
          IOUtils.write(instrumentedCode,new FileOutputStream(outputFile));
          writtenToDisk.add(normalizedSourceName);
        }
      }
 catch (      final IOException e) {
        throw new RuntimeException(e);
      }
    }
  }
  return instrumentedCode;
}