Program: 44302
Project: 44302
Buggy source:
private void processJelly(File file) throws MojoExecutionException {
  Set<String> props=findAllProperties(file);
  if (props.isEmpty())   return;
  String fileName=file.getName();
  fileName=fileName.substring(0,fileName.length() - "String_Node_Str".length());
  fileName+='_' + locale + "String_Node_Str";
  File resourceFile=new File(file.getParentFile(),fileName);
  if (resourceFile.exists()) {
    Properties resource;
    try {
      resource=new Properties(resourceFile);
    }
 catch (    IOException e) {
      throw new MojoExecutionException("String_Node_Str" + resourceFile,e);
    }
    HashSet<String> unnecessaries=new HashSet<String>((Set)resource.keySet());
    unnecessaries.removeAll(props);
    for (    String s : unnecessaries)     getLog().warn("String_Node_Str" + s + "String_Node_Str"+ resourceFile);
    props.removeAll(resource.keySet());
    try {
      RandomAccessFile f=new RandomAccessFile(resourceFile,"String_Node_Str");
      if (f.length() > 0) {
        f.seek(f.length() - 1);
        int ch=f.read();
        if (!(ch == '\r' || ch == '\n'))         f.write(System.getProperty("String_Node_Str").getBytes());
      }
      f.close();
    }
 catch (    IOException e) {
      throw new MojoExecutionException("String_Node_Str" + resourceFile,e);
    }
  }
  try {
    RandomAccessFile f=new RandomAccessFile(resourceFile,"String_Node_Str");
    if (f.length() > 0) {
      f.seek(f.length() - 1);
      int ch=f.read();
      if (!(ch == '\r' || ch == '\n'))       f.write(System.getProperty("String_Node_Str").getBytes());
    }
    f.close();
    PrintWriter w=new PrintWriter(new FileWriter(resourceFile,true));
    for (    String p : props) {
      w.println(escape(p) + "String_Node_Str");
    }
    w.close();
  }
 catch (  IOException e) {
    throw new MojoExecutionException("String_Node_Str" + resourceFile,e);
  }
}

Fixed version (ground truth):
private void processJelly(File file) throws MojoExecutionException {
  Set<String> props=findAllProperties(file);
  if (props.isEmpty())   return;
  String fileName=file.getName();
  fileName=fileName.substring(0,fileName.length() - "String_Node_Str".length());
  fileName+='_' + locale + "String_Node_Str";
  File resourceFile=new File(file.getParentFile(),fileName);
  if (resourceFile.exists()) {
    Properties resource;
    try {
      resource=new Properties(resourceFile);
    }
 catch (    IOException e) {
      throw new MojoExecutionException("String_Node_Str" + resourceFile,e);
    }
    HashSet<String> unnecessaries=new HashSet<String>((Set)resource.keySet());
    unnecessaries.removeAll(props);
    for (    String s : unnecessaries)     getLog().warn("String_Node_Str" + s + "String_Node_Str"+ resourceFile);
    props.removeAll(resource.keySet());
    try {
      RandomAccessFile f=new RandomAccessFile(resourceFile,"String_Node_Str");
      if (f.length() > 0) {
        f.seek(f.length() - 1);
        int ch=f.read();
        if (!(ch == '\r' || ch == '\n'))         f.write(System.getProperty("String_Node_Str").getBytes());
      }
      f.close();
    }
 catch (    IOException e) {
      throw new MojoExecutionException("String_Node_Str" + resourceFile,e);
    }
  }
  if (props.isEmpty())   return;
  getLog().info("String_Node_Str" + resourceFile);
  try {
    RandomAccessFile f=new RandomAccessFile(resourceFile,"String_Node_Str");
    if (f.length() > 0) {
      f.seek(f.length() - 1);
      int ch=f.read();
      if (!(ch == '\r' || ch == '\n'))       f.write(System.getProperty("String_Node_Str").getBytes());
    }
    f.close();
    PrintWriter w=new PrintWriter(new FileWriter(resourceFile,true));
    for (    String p : props) {
      w.println(escape(p) + "String_Node_Str");
    }
    w.close();
  }
 catch (  IOException e) {
    throw new MojoExecutionException("String_Node_Str" + resourceFile,e);
  }
}