Program: 87312
Project: 87312
Buggy source:
@Test public void testPieceTypes(){
  ItemSquarePattern ios1=new ItemSquarePattern("String_Node_Str",1,1);
  ItemSquarePattern ios2=new ItemSquarePattern("String_Node_Str",2,2);
  ItemSquarePattern ios3=new ItemSquarePattern("String_Node_Str",2,2);
  ItemSquarePattern ios4=new ItemSquarePattern("String_Node_Str",2,7);
  ItemSquarePattern ios5=new ItemSquarePattern("String_Node_Str",2,7);
  assertFalse(ChessDomain.isBigPiece(ios1));
  assertTrue(ChessDomain.isBigPiece(ios2));
  assertFalse(ChessDomain.isOffensivePiece(ios1));
  assertFalse(ChessDomain.isOffensivePiece(ios2));
  assertTrue(ChessDomain.isOffensivePiece(ios3));
  assertTrue(ChessDomain.isOffensivePiece(ios4));
  assertFalse(ChessDomain.isOffensivePiece(ios5));
  ListPattern lp=new ListPattern();
  for (  ItemSquarePattern pat : (new ItemSquarePattern[]{ios1,ios2,ios3,ios4,ios5})) {
    lp.add(pat);
  }
  assertEquals(2,ChessDomain.getSalientPieces(lp,true).size());
  assertEquals(4,ChessDomain.getSalientPieces(lp,false).size());
  ListPattern lp2=new ListPattern();
  for (  ItemSquarePattern pat : (new ItemSquarePattern[]{new ItemSquarePattern("String_Node_Str",2,3),new ItemSquarePattern("String_Node_Str",4,2),new ItemSquarePattern("String_Node_Str",2,3)})) {
    lp2.add(pat);
  }
  ListPattern sorted=(new ChessDomain()).normalise(lp2);
  assertEquals(3,sorted.size());
}

Fixed version (ground truth):
@Test public void testPieceTypes(){
  ItemSquarePattern ios1=new ItemSquarePattern("String_Node_Str",1,1);
  ItemSquarePattern ios2=new ItemSquarePattern("String_Node_Str",2,2);
  ItemSquarePattern ios3=new ItemSquarePattern("String_Node_Str",2,2);
  ItemSquarePattern ios4=new ItemSquarePattern("String_Node_Str",2,7);
  ItemSquarePattern ios5=new ItemSquarePattern("String_Node_Str",2,7);
  assertFalse(ChessDomain.isBigPiece(ios1));
  assertTrue(ChessDomain.isBigPiece(ios2));
  assertFalse(ChessDomain.isOffensivePiece(ios1));
  assertFalse(ChessDomain.isOffensivePiece(ios2));
  assertTrue(ChessDomain.isOffensivePiece(ios3));
  assertTrue(ChessDomain.isOffensivePiece(ios4));
  assertFalse(ChessDomain.isOffensivePiece(ios5));
  ListPattern lp=new ListPattern();
  for (  ItemSquarePattern pat : (new ItemSquarePattern[]{ios1,ios2,ios3,ios4,ios5})) {
    lp.add(pat);
  }
  assertEquals(2,ChessDomain.getSalientPieces(lp,true).size());
  assertEquals(4,ChessDomain.getSalientPieces(lp,false).size());
  ListPattern lp2=new ListPattern();
  for (  ItemSquarePattern pat : (new ItemSquarePattern[]{new ItemSquarePattern("String_Node_Str",2,3),new ItemSquarePattern("String_Node_Str",4,2),new ItemSquarePattern("String_Node_Str",2,3)})) {
    lp2.add(pat);
  }
  assertEquals(3,lp2.size());
  assertEquals("String_Node_Str",((ItemSquarePattern)lp2.getItem(0)).getItem());
  assertEquals("String_Node_Str",((ItemSquarePattern)lp2.getItem(1)).getItem());
  assertEquals("String_Node_Str",((ItemSquarePattern)lp2.getItem(2)).getItem());
  ListPattern sorted=(new ChessDomain()).normalise(lp2);
  assertEquals(3,sorted.size());
  assertEquals("String_Node_Str",((ItemSquarePattern)sorted.getItem(0)).getItem());
  assertEquals("String_Node_Str",((ItemSquarePattern)sorted.getItem(1)).getItem());
  assertEquals("String_Node_Str",((ItemSquarePattern)sorted.getItem(2)).getItem());
}