Program: 81727
Project: 81727
Buggy source:
/** 
 * Builds a CSV file mapping obfuscated CSS class names to their qualified source name and outputs it as a private build artifact.
 */
protected void outputCssMapArtifact(TreeLogger logger,ResourceContext context,Map<JMethod,String> actualReplacements,String outputFileName){
  String mappingFileName="String_Node_Str" + outputFileName + "String_Node_Str";
  OutputStream os=null;
  try {
    os=context.getGeneratorContext().tryCreateResource(logger,mappingFileName);
  }
 catch (  UnableToCompleteException e) {
    logger.log(TreeLogger.ERROR,"String_Node_Str" + mappingFileName);
    return;
  }
  if (os == null) {
    logger.log(TreeLogger.ERROR,"String_Node_Str" + mappingFileName);
    return;
  }
  BufferedWriter writer=new BufferedWriter(new OutputStreamWriter(os));
  try {
    for (    Map.Entry<JMethod,String> replacement : actualReplacements.entrySet()) {
      String qualifiedName=replacement.getKey().getEnclosingType().getQualifiedSourceName();
      String baseName=replacement.getKey().getName();
      writer.write(qualifiedName.replaceAll("String_Node_Str","String_Node_Str") + "String_Node_Str" + baseName);
      writer.write("String_Node_Str");
      writer.write(replacement.getValue());
      writer.newLine();
    }
    writer.flush();
    writer.close();
  }
 catch (  IOException e) {
    logger.log(TreeLogger.ERROR,"String_Node_Str" + mappingFileName);
  }
  try {
    context.getGeneratorContext().commitResource(logger,os).setVisibility(Visibility.Private);
  }
 catch (  UnableToCompleteException e) {
    logger.log(TreeLogger.ERROR,"String_Node_Str" + mappingFileName);
  }
}

Fixed version (ground truth):
/** 
 * Builds a CSV file mapping obfuscated CSS class names to their qualified source name and outputs it as a private build artifact.
 */
protected void outputCssMapArtifact(TreeLogger logger,ResourceContext context,JMethod method,Map<JMethod,String> actualReplacements){
  JClassType bundleType=method.getEnclosingType();
  String qualifiedMethodName=bundleType.getQualifiedSourceName() + "String_Node_Str" + method.getName();
  String mappingFileName="String_Node_Str" + qualifiedMethodName + "String_Node_Str";
  OutputStream os=null;
  try {
    os=context.getGeneratorContext().tryCreateResource(logger,mappingFileName);
  }
 catch (  UnableToCompleteException e) {
    logger.log(TreeLogger.WARN,"String_Node_Str" + mappingFileName);
    return;
  }
  if (os == null) {
    logger.log(TreeLogger.WARN,"String_Node_Str" + mappingFileName);
    return;
  }
  BufferedWriter writer=new BufferedWriter(new OutputStreamWriter(os));
  try {
    for (    Map.Entry<JMethod,String> replacement : actualReplacements.entrySet()) {
      String qualifiedName=replacement.getKey().getEnclosingType().getQualifiedSourceName();
      String baseName=replacement.getKey().getName();
      writer.write(qualifiedName.replaceAll("String_Node_Str","String_Node_Str") + "String_Node_Str" + baseName);
      writer.write("String_Node_Str");
      writer.write(replacement.getValue());
      writer.newLine();
    }
    writer.flush();
    writer.close();
  }
 catch (  IOException e) {
    logger.log(TreeLogger.WARN,"String_Node_Str" + mappingFileName);
  }
  try {
    context.getGeneratorContext().commitResource(logger,os).setVisibility(Visibility.Private);
  }
 catch (  UnableToCompleteException e) {
    logger.log(TreeLogger.WARN,"String_Node_Str" + mappingFileName);
  }
}