Program: 187980
Project: 187980
Buggy source:
/** 
 * Stage 6:  Remove all unmatchable files from SRC, SRCHASH, RES and RESHASH
 */
@SuppressWarnings("String_Node_Str") public static void stage6(final String src,final String srchash,final String res,final String reshash) throws IOException {
  final File dirsrc=new File(src);
  final File dirres=new File(res);
  final File fsrchash=new File(srchash);
  final File freshash=new File(reshash);
  String abssrc=dirsrc.getAbsolutePath();
  if (abssrc.endsWith("String_Node_Str") == false)   abssrc+='/';
  String absres=dirres.getAbsolutePath();
  if (absres.endsWith("String_Node_Str") == false)   absres+='/';
  if (dirsrc.exists() == false) {
    System.err.println("String_Node_Str");
    System.exit(-601);
  }
  if (dirsrc.isDirectory() == false) {
    System.err.println("String_Node_Str");
    System.exit(-602);
  }
  if (dirres.exists() == false) {
    System.err.println("String_Node_Str");
    System.exit(-603);
  }
  if (dirres.isDirectory() == false) {
    System.err.println("String_Node_Str");
    System.exit(-604);
  }
  if (fsrchash.exists()) {
    System.err.println("String_Node_Str");
    System.exit(-605);
  }
  if (freshash.exists()) {
    System.err.println("String_Node_Str");
    System.exit(-606);
  }
  final ArrayDeque<long[]> srchashes=new ArrayDeque<long[]>();
  final ArrayDeque<long[]> reshashes=new ArrayDeque<long[]>();
  final ArrayDeque<String> srcfiles=new ArrayDeque<String>();
  final ArrayDeque<String> resfiles=new ArrayDeque<String>();
  for (  final Object[] objs : new Object[][]{{fsrchash,srchashes,srcfiles},{freshash,reshashes,resfiles}}) {
    final File hash=(File)(objs[0]);
    final ArrayDeque<long[]> hashes=(ArrayDeque<long[]>)(objs[1]);
    final ArrayDeque<String> files=(ArrayDeque<String>)(objs[2]);
    final Scanner sc=new Scanner(new BufferedInputStream(new FileInputStream(hash)));
    while (sc.hasNext()) {
      final String line=sc.nextLine();
      if (line.isEmpty())       break;
      final int space=line.indexOf(' ');
      hashes.offerLast(new long[]{Long.parseLong(line.substring(0,space))});
      files.offerLast(line.substring(space + 1).replace("String_Node_Str","String_Node_Str"));
    }
  }
  final ArrayDeque<String> srcok=new ArrayDeque<String>();
  final ArrayDeque<String> resok=new ArrayDeque<String>();
  while ((srcfiles.isEmpty() || resfiles.isEmpty()) == false) {
    final long srch=srchashes.peekLast()[0];
    final long resh=reshashes.peekLast()[0];
    if (srch > resh) {
      srchashes.pollLast();
      (new File(abssrc + srcfiles.pollLast())).delete();
    }
 else     if (resh > resh) {
      reshashes.pollLast();
      (new File(absres + resfiles.pollLast())).delete();
    }
 else {
      do {
        srchashes.pollLast();
        srcok.offerLast(Long.toString(srch) + "String_Node_Str" + srcfiles.pollLast().replace("String_Node_Str","String_Node_Str"));
      }
 while (srchashes.peekLast()[0] == srch);
      do {
        reshashes.pollLast();
        resok.offerLast(Long.toString(resh) + "String_Node_Str" + resfiles.pollLast().replace("String_Node_Str","String_Node_Str"));
      }
 while (reshashes.peekLast()[0] == resh);
    }
  }
  while (srcfiles.isEmpty() == false) {
    srchashes.pollLast();
    (new File(abssrc + srcfiles.pollLast())).delete();
  }
  while (resfiles.isEmpty() == false) {
    reshashes.pollLast();
    (new File(absres + resfiles.pollLast())).delete();
  }
{
    final PrintStream fout=new PrintStream(new BufferedOutputStream(new FileOutputStream(fsrchash)));
    while (srcok.isEmpty() == false)     fout.println(srcok.pollLast());
    fout.flush();
    fout.close();
  }
{
    final PrintStream fout=new PrintStream(new BufferedOutputStream(new FileOutputStream(freshash)));
    while (resok.isEmpty() == false)     fout.println(resok.pollLast());
    fout.flush();
    fout.close();
  }
}

Fixed version (ground truth):
/** 
 * Stage 6:  Remove all unmatchable files from SRC, SRCHASH, RES and RESHASH
 */
@SuppressWarnings("String_Node_Str") public static void stage6(final String src,final String srchash,final String res,final String reshash) throws IOException {
  final File dirsrc=new File(src);
  final File dirres=new File(res);
  final File fsrchash=new File(srchash);
  final File freshash=new File(reshash);
  String abssrc=dirsrc.getAbsolutePath();
  if (abssrc.endsWith("String_Node_Str") == false)   abssrc+='/';
  String absres=dirres.getAbsolutePath();
  if (absres.endsWith("String_Node_Str") == false)   absres+='/';
  if (dirsrc.exists() == false) {
    System.err.println("String_Node_Str");
    System.exit(-601);
  }
  if (dirsrc.isDirectory() == false) {
    System.err.println("String_Node_Str");
    System.exit(-602);
  }
  if (dirres.exists() == false) {
    System.err.println("String_Node_Str");
    System.exit(-603);
  }
  if (dirres.isDirectory() == false) {
    System.err.println("String_Node_Str");
    System.exit(-604);
  }
  if (fsrchash.exists() == false) {
    System.err.println("String_Node_Str");
    System.exit(-605);
  }
  if (freshash.exists() == false) {
    System.err.println("String_Node_Str");
    System.exit(-606);
  }
  final ArrayDeque<long[]> srchashes=new ArrayDeque<long[]>();
  final ArrayDeque<long[]> reshashes=new ArrayDeque<long[]>();
  final ArrayDeque<String> srcfiles=new ArrayDeque<String>();
  final ArrayDeque<String> resfiles=new ArrayDeque<String>();
  for (  final Object[] objs : new Object[][]{{fsrchash,srchashes,srcfiles},{freshash,reshashes,resfiles}}) {
    final File hash=(File)(objs[0]);
    final ArrayDeque<long[]> hashes=(ArrayDeque<long[]>)(objs[1]);
    final ArrayDeque<String> files=(ArrayDeque<String>)(objs[2]);
    final Scanner sc=new Scanner(new BufferedInputStream(new FileInputStream(hash)));
    while (sc.hasNext()) {
      final String line=sc.nextLine();
      if (line.isEmpty())       break;
      final int space=line.indexOf(' ');
      hashes.offerLast(new long[]{Long.parseLong(line.substring(0,space))});
      files.offerLast(line.substring(space + 1).replace("String_Node_Str","String_Node_Str"));
    }
  }
  final ArrayDeque<String> srcok=new ArrayDeque<String>();
  final ArrayDeque<String> resok=new ArrayDeque<String>();
  while ((srcfiles.isEmpty() || resfiles.isEmpty()) == false) {
    final long srch=srchashes.peekLast()[0];
    final long resh=reshashes.peekLast()[0];
    if (srch > resh) {
      srchashes.pollLast();
      (new File(abssrc + srcfiles.pollLast())).delete();
    }
 else     if (resh > resh) {
      reshashes.pollLast();
      (new File(absres + resfiles.pollLast())).delete();
    }
 else {
      do {
        srchashes.pollLast();
        srcok.offerLast(Long.toString(srch) + "String_Node_Str" + srcfiles.pollLast().replace("String_Node_Str","String_Node_Str"));
      }
 while (srchashes.peekLast()[0] == srch);
      do {
        reshashes.pollLast();
        resok.offerLast(Long.toString(resh) + "String_Node_Str" + resfiles.pollLast().replace("String_Node_Str","String_Node_Str"));
      }
 while (reshashes.peekLast()[0] == resh);
    }
  }
  while (srcfiles.isEmpty() == false) {
    srchashes.pollLast();
    (new File(abssrc + srcfiles.pollLast())).delete();
  }
  while (resfiles.isEmpty() == false) {
    reshashes.pollLast();
    (new File(absres + resfiles.pollLast())).delete();
  }
{
    final PrintStream fout=new PrintStream(new BufferedOutputStream(new FileOutputStream(fsrchash)));
    while (srcok.isEmpty() == false)     fout.println(srcok.pollLast());
    fout.flush();
    fout.close();
  }
{
    final PrintStream fout=new PrintStream(new BufferedOutputStream(new FileOutputStream(freshash)));
    while (resok.isEmpty() == false)     fout.println(resok.pollLast());
    fout.flush();
    fout.close();
  }
}