Program: 61861
Project: 61861
Buggy source:
@Test public void testAdjacentPaths() throws Exception {
  String previousSecond="String_Node_Str";
  String path1="String_Node_Str";
  File path1File=makeFile(path1);
  String path2="String_Node_Str";
  File path2File=makeFile(path2);
  String path3="String_Node_Str";
  File path3File=makeFile(path3);
  String nextSecond="String_Node_Str";
  File nextSecondFile=makeFile(nextSecond);
  spokeStore.write(path1,BYTES);
  spokeStore.write(path2,BYTES);
  spokeStore.write(path3,BYTES);
  spokeStore.write(previousSecond,BYTES);
  spokeStore.write(nextSecond,BYTES);
  assertEquals(path3,spokeStore.nextPath(path2));
  assertEquals(path1,spokeStore.previousPath(path2));
  String previousMillisecond="String_Node_Str";
  spokeStore.write(previousMillisecond,BYTES);
  String nextMillisecond="String_Node_Str";
  spokeStore.write(nextMillisecond,BYTES);
  assertEquals(spokeStore.nextPath(path3),nextMillisecond);
  assertEquals(spokeStore.previousPath(path1),previousMillisecond);
  Collection<File> files=spokeStore.filesInBucket(new File(tempDir + "String_Node_Str"),null);
  assertEquals(7,files.size());
  logger.info("String_Node_Str" + files);
  assertTrue(files.contains(path1File));
  assertTrue(files.contains(path2File));
  assertTrue(files.contains(path3File));
  files=spokeStore.filesInBucket(spokeStore.spokeFilePathPart("String_Node_Str"),"String_Node_Str");
  assertEquals(5,files.size());
  files=spokeStore.nextNKeys(path1File,2);
  assertEquals(2,files.size());
  assertTrue(files.contains(path2File));
  assertTrue(files.contains(path3File));
  String nexthour1="String_Node_Str";
  spokeStore.write(nexthour1,BYTES);
  File nexthour1File=makeFile(nexthour1);
  assertEquals(nexthour1File,spokeStore.nextPath(nextSecondFile));
  files=spokeStore.nextNKeys(path1File,4);
  assertEquals(4,files.size());
  files=spokeStore.previousNKeys(nexthour1File,3);
  assertEquals(3,files.size());
}

Fixed version (ground truth):
@Test public void testAdjacentPaths() throws Exception {
  String previousSecond="String_Node_Str";
  String path1="String_Node_Str";
  File path1File=makeFile(path1);
  String path2="String_Node_Str";
  File path2File=makeFile(path2);
  String path3="String_Node_Str";
  File path3File=makeFile(path3);
  String nextSecond="String_Node_Str";
  File nextSecondFile=makeFile(nextSecond);
  spokeStore.write(path1,BYTES);
  spokeStore.write(path2,BYTES);
  spokeStore.write(path3,BYTES);
  spokeStore.write(previousSecond,BYTES);
  spokeStore.write(nextSecond,BYTES);
  assertEquals(path3,spokeStore.nextPath(path2));
  assertEquals(path1,spokeStore.previousPath(path2));
  String previousMillisecond="String_Node_Str";
  spokeStore.write(previousMillisecond,BYTES);
  String nextMillisecond="String_Node_Str";
  spokeStore.write(nextMillisecond,BYTES);
  assertEquals(spokeStore.nextPath(path3),nextMillisecond);
  assertEquals(spokeStore.previousPath(path1),previousMillisecond);
  Collection<File> files=spokeStore.filesInBucket(new File(tempDir + "String_Node_Str"),null);
  assertEquals(7,files.size());
  logger.info("String_Node_Str" + files);
  assertTrue(files.contains(path1File));
  assertTrue(files.contains(path2File));
  assertTrue(files.contains(path3File));
  files=spokeStore.filesInBucket(spokeStore.spokeFilePathPart("String_Node_Str"),"String_Node_Str");
  assertEquals(5,files.size());
  files=spokeStore.nextNKeys(path1File,2);
  assertEquals(2,files.size());
  assertTrue(files.contains(path2File));
  assertTrue(files.contains(path3File));
  String nexthour1="String_Node_Str";
  spokeStore.write(nexthour1,BYTES);
  File nexthour1File=makeFile(nexthour1);
  assertEquals(nexthour1,spokeStore.nextPath(nextSecond));
}