Program: 25263
Project: 25263
Buggy source:
public void testScannedPathsJarGlobOrder() throws Exception {
  File fileA=null, fileB=null, fileC=null;
  File jarFile=null, globFile=null;
  String filenameA, filenameB, filenameC, fileRegex;
  String tempPath="String_Node_Str";
  ScannedPaths sc;
  Iterator<String> iter=null;
  PrintWriter writer;
  try {
    filenameA="String_Node_Str";
    filenameB="String_Node_Str";
    filenameC="String_Node_Str";
    fileRegex=tempPath;
    fileA=createNewPath(tempPath + filenameA);
    fileB=createNewPath(tempPath + filenameB);
    fileC=createNewPath(tempPath + filenameC);
    jarFile=createNewPath(tempPath + "String_Node_Str");
    writer=new PrintWriter(jarFile,"String_Node_Str");
    writer.println(filenameB);
    writer.println(filenameA);
    writer.close();
    sc=new ScannedPaths(fileRegex,"String_Node_Str");
    Assert.assertEquals(Iterators.size(sc.iterator()),2,"String_Node_Str");
    iter=sc.iterator();
    Assert.assertTrue(iter.next().contains(filenameB));
    Assert.assertTrue(iter.next().contains(filenameA));
    if (jarFile != null) {
      jarFile.delete();
    }
    globFile=createNewPath(tempPath + "String_Node_Str");
    writer=new PrintWriter(globFile,"String_Node_Str");
    writer.println(filenameB);
    writer.println(filenameA);
    writer.println(filenameC);
    writer.close();
    sc=new ScannedPaths(fileRegex,"String_Node_Str");
    Assert.assertEquals(Iterators.size(sc.iterator()),3,"String_Node_Str");
    iter=sc.iterator();
    Assert.assertTrue(iter.next().contains(filenameB));
    Assert.assertTrue(iter.next().contains(filenameA));
    Assert.assertTrue(iter.next().contains(filenameC));
  }
 catch (  Exception e) {
    Assert.fail("String_Node_Str" + e.getMessage());
  }
 finally {
    FileUtils.deleteQuietly(new File(tempPath));
  }
}

Fixed version (ground truth):
public void testScannedPathsJarGlobOrder() throws Exception {
  File jarFile, globFile;
  String filenameA, filenameB, filenameC, fileRegex;
  String tempPath="String_Node_Str";
  ScannedPaths sc;
  Iterator<String> iter=null;
  PrintWriter writer;
  try {
    filenameA="String_Node_Str";
    filenameB="String_Node_Str";
    filenameC="String_Node_Str";
    fileRegex=tempPath;
    createNewPath(tempPath + filenameA);
    createNewPath(tempPath + filenameB);
    createNewPath(tempPath + filenameC);
    jarFile=createNewPath(tempPath + "String_Node_Str");
    writer=new PrintWriter(jarFile,"String_Node_Str");
    writer.println(filenameB);
    writer.println(filenameA);
    writer.close();
    sc=new ScannedPaths(fileRegex,"String_Node_Str");
    assertOrdered(sc,filenameB,filenameA);
    if (jarFile != null) {
      jarFile.delete();
    }
    globFile=createNewPath(tempPath + "String_Node_Str");
    writer=new PrintWriter(globFile,"String_Node_Str");
    writer.println(filenameB);
    writer.println(filenameA);
    writer.println(filenameC);
    writer.close();
    sc=new ScannedPaths(fileRegex,"String_Node_Str");
    assertOrdered(sc,filenameB,filenameA,filenameC);
  }
 catch (  Exception e) {
    Assert.fail("String_Node_Str" + e.getMessage());
  }
 finally {
    FileUtils.deleteQuietly(new File(tempPath));
  }
}