Program: 32527
Project: 32527
Buggy source:
/** 
 * This test ensures that the SortedList sorts by its own order, then by the order in the source list.
 */
public void testChainedComparator(){
  sortedList.setComparator(null);
  Song nookie=new Song("String_Node_Str","String_Node_Str");
  Song eatYouAlive=new Song("String_Node_Str","String_Node_Str");
  Song rearranged=new Song("String_Node_Str","String_Node_Str");
  Song theUnquestionableTruth=new Song("String_Node_Str","String_Node_Str");
  Song welcomeToTheFold=new Song("String_Node_Str","String_Node_Str");
  Song takeAPicture=new Song("String_Node_Str","String_Node_Str");
  Song missBlue=new Song("String_Node_Str","String_Node_Str");
  unsortedList.add(nookie);
  unsortedList.add(eatYouAlive);
  unsortedList.add(takeAPicture);
  unsortedList.add(rearranged);
  unsortedList.add(missBlue);
  unsortedList.add(theUnquestionableTruth);
  unsortedList.add(welcomeToTheFold);
  assertSame(nookie,sortedList.get(0));
  assertSame(eatYouAlive,sortedList.get(1));
  assertSame(takeAPicture,sortedList.get(2));
  assertSame(rearranged,sortedList.get(3));
  assertSame(missBlue,sortedList.get(4));
  assertSame(theUnquestionableTruth,sortedList.get(5));
  assertSame(welcomeToTheFold,sortedList.get(6));
  Comparator songComparator=GlazedLists.beanPropertyComparator(Song.class,"String_Node_Str","String_Node_Str");
  sortedList.setComparator(songComparator);
  assertSame(missBlue,sortedList.get(0));
  assertSame(takeAPicture,sortedList.get(1));
  assertSame(welcomeToTheFold,sortedList.get(2));
  assertSame(eatYouAlive,sortedList.get(3));
  assertSame(nookie,sortedList.get(4));
  assertSame(rearranged,sortedList.get(5));
  assertSame(theUnquestionableTruth,sortedList.get(6));
}

Fixed version (ground truth):
/** 
 * This test ensures that the SortedList sorts by its own order, then by the order in the source list.
 */
public void testChainedComparator(){
  sortedList.setComparator(null);
  Song nookie=new Song("String_Node_Str","String_Node_Str");
  Song eatYouAlive=new Song("String_Node_Str","String_Node_Str");
  Song rearranged=new Song("String_Node_Str","String_Node_Str");
  Song theUnquestionableTruth=new Song("String_Node_Str","String_Node_Str");
  Song welcomeToTheFold=new Song("String_Node_Str","String_Node_Str");
  Song takeAPicture=new Song("String_Node_Str","String_Node_Str");
  Song missBlue=new Song("String_Node_Str","String_Node_Str");
  unsortedList.add(nookie);
  unsortedList.add(eatYouAlive);
  unsortedList.add(takeAPicture);
  unsortedList.add(rearranged);
  unsortedList.add(missBlue);
  unsortedList.add(theUnquestionableTruth);
  unsortedList.add(welcomeToTheFold);
  assertSame(nookie,sortedList.get(0));
  assertSame(eatYouAlive,sortedList.get(1));
  assertSame(takeAPicture,sortedList.get(2));
  assertSame(rearranged,sortedList.get(3));
  assertSame(missBlue,sortedList.get(4));
  assertSame(theUnquestionableTruth,sortedList.get(5));
  assertSame(welcomeToTheFold,sortedList.get(6));
  Comparator songComparator=GlazedLists.beanPropertyComparator(Song.class,"String_Node_Str",new String[]{"String_Node_Str"});
  sortedList.setComparator(songComparator);
  assertSame(missBlue,sortedList.get(0));
  assertSame(takeAPicture,sortedList.get(1));
  assertSame(welcomeToTheFold,sortedList.get(2));
  assertSame(eatYouAlive,sortedList.get(3));
  assertSame(nookie,sortedList.get(4));
  assertSame(rearranged,sortedList.get(5));
  assertSame(theUnquestionableTruth,sortedList.get(6));
}