Program: 56454
Project: 56454
Buggy source:
@Test public void testZSS694CopyValidation(){
  Object[] books=_loadBooks(null,"String_Node_Str");
  Book book=(Book)books[0];
  Sheet sheet=book.getSheet("String_Node_Str");
  SSheet ssheet=sheet.getInternalSheet();
  SDataValidation a1dv=ssheet.getDataValidation(0,0);
  Set<CellRegion> a1regions=a1dv.getRegions();
  Assert.assertEquals("String_Node_Str",2,a1regions.size());
  Assert.assertTrue("String_Node_Str",a1regions.contains(new CellRegion("String_Node_Str")));
  Assert.assertTrue("String_Node_Str",a1regions.contains(new CellRegion("String_Node_Str")));
  SDataValidation d1dv=ssheet.getDataValidation(0,3);
  Set<CellRegion> d1regions=d1dv.getRegions();
  Assert.assertEquals("String_Node_Str",1,d1regions.size());
  Assert.assertTrue("String_Node_Str",d1regions.contains(new CellRegion("String_Node_Str")));
  Range a1=Ranges.range(sheet,"String_Node_Str");
  a1.paste(Ranges.range(sheet,"String_Node_Str"),true);
  a1regions=a1dv.getRegions();
  Assert.assertEquals("String_Node_Str",2,a1regions.size());
  Assert.assertFalse("String_Node_Str",a1regions.contains(new CellRegion("String_Node_Str")));
  Assert.assertTrue("String_Node_Str",a1regions.contains(new CellRegion("String_Node_Str")));
  Assert.assertTrue("String_Node_Str",a1regions.contains(new CellRegion("String_Node_Str")));
  d1regions=d1dv.getRegions();
  Assert.assertEquals("String_Node_Str",2,d1regions.size());
  Assert.assertFalse("String_Node_Str",d1regions.contains(new CellRegion("String_Node_Str")));
  Assert.assertTrue("String_Node_Str",d1regions.contains(new CellRegion("String_Node_Str")));
  Assert.assertTrue("String_Node_Str",d1regions.contains(new CellRegion("String_Node_Str")));
  Range b4=Ranges.range(sheet,"String_Node_Str");
  b4.paste(Ranges.range(sheet,"String_Node_Str"),true);
  a1regions=a1dv.getRegions();
  Assert.assertEquals("String_Node_Str",4,a1regions.size());
  Assert.assertFalse("String_Node_Str",a1regions.contains(new CellRegion("String_Node_Str")));
  Assert.assertTrue("String_Node_Str",a1regions.contains(new CellRegion("String_Node_Str")));
  Assert.assertTrue("String_Node_Str",a1regions.contains(new CellRegion("String_Node_Str")));
  Assert.assertTrue("String_Node_Str",a1regions.contains(new CellRegion("String_Node_Str")));
  Assert.assertTrue("String_Node_Str",a1regions.contains(new CellRegion("String_Node_Str")));
  d1regions=d1dv.getRegions();
  Assert.assertEquals("String_Node_Str",2,d1regions.size());
  Assert.assertFalse("String_Node_Str",d1regions.contains(new CellRegion("String_Node_Str")));
  Assert.assertTrue("String_Node_Str",d1regions.contains(new CellRegion("String_Node_Str")));
  Assert.assertTrue("String_Node_Str",d1regions.contains(new CellRegion("String_Node_Str")));
  Range e1=Ranges.range(sheet,"String_Node_Str");
  e1.paste(Ranges.range(sheet,"String_Node_Str"));
  d1regions=d1dv.getRegions();
  Assert.assertEquals("String_Node_Str",2,d1regions.size());
  Assert.assertTrue("String_Node_Str",d1regions.contains(new CellRegion("String_Node_Str")));
  Assert.assertTrue("String_Node_Str",d1regions.contains(new CellRegion("String_Node_Str")));
  Assert.assertFalse("String_Node_Str",d1regions.contains(new CellRegion("String_Node_Str")));
  e1.paste(Ranges.range(sheet,"String_Node_Str"),true);
  d1regions=d1dv.getRegions();
  Assert.assertEquals("String_Node_Str",2,d1regions.size());
  Assert.assertTrue("String_Node_Str",d1regions.contains(new CellRegion("String_Node_Str")));
  Assert.assertFalse("String_Node_Str",d1regions.contains(new CellRegion("String_Node_Str")));
  Assert.assertTrue("String_Node_Str",d1regions.contains(new CellRegion("String_Node_Str")));
}

Fixed version (ground truth):
@Test public void testZSS694CopyValidation(){
  Object[] books=_loadBooks(this,"String_Node_Str");
  Book book=(Book)books[0];
  Sheet sheet=book.getSheet("String_Node_Str");
  SSheet ssheet=sheet.getInternalSheet();
  SDataValidation a1dv=ssheet.getDataValidation(0,0);
  Set<CellRegion> a1regions=a1dv.getRegions();
  Assert.assertEquals("String_Node_Str",2,a1regions.size());
  Assert.assertTrue("String_Node_Str",a1regions.contains(new CellRegion("String_Node_Str")));
  Assert.assertTrue("String_Node_Str",a1regions.contains(new CellRegion("String_Node_Str")));
  SDataValidation d1dv=ssheet.getDataValidation(0,3);
  Set<CellRegion> d1regions=d1dv.getRegions();
  Assert.assertEquals("String_Node_Str",1,d1regions.size());
  Assert.assertTrue("String_Node_Str",d1regions.contains(new CellRegion("String_Node_Str")));
  Range a1=Ranges.range(sheet,"String_Node_Str");
  a1.paste(Ranges.range(sheet,"String_Node_Str"),true);
  a1regions=a1dv.getRegions();
  Assert.assertEquals("String_Node_Str",2,a1regions.size());
  Assert.assertFalse("String_Node_Str",a1regions.contains(new CellRegion("String_Node_Str")));
  Assert.assertTrue("String_Node_Str",a1regions.contains(new CellRegion("String_Node_Str")));
  Assert.assertTrue("String_Node_Str",a1regions.contains(new CellRegion("String_Node_Str")));
  d1regions=d1dv.getRegions();
  Assert.assertEquals("String_Node_Str",2,d1regions.size());
  Assert.assertFalse("String_Node_Str",d1regions.contains(new CellRegion("String_Node_Str")));
  Assert.assertTrue("String_Node_Str",d1regions.contains(new CellRegion("String_Node_Str")));
  Assert.assertTrue("String_Node_Str",d1regions.contains(new CellRegion("String_Node_Str")));
  Range b4=Ranges.range(sheet,"String_Node_Str");
  b4.paste(Ranges.range(sheet,"String_Node_Str"),true);
  a1regions=a1dv.getRegions();
  Assert.assertEquals("String_Node_Str",4,a1regions.size());
  Assert.assertFalse("String_Node_Str",a1regions.contains(new CellRegion("String_Node_Str")));
  Assert.assertTrue("String_Node_Str",a1regions.contains(new CellRegion("String_Node_Str")));
  Assert.assertTrue("String_Node_Str",a1regions.contains(new CellRegion("String_Node_Str")));
  Assert.assertTrue("String_Node_Str",a1regions.contains(new CellRegion("String_Node_Str")));
  Assert.assertTrue("String_Node_Str",a1regions.contains(new CellRegion("String_Node_Str")));
  d1regions=d1dv.getRegions();
  Assert.assertEquals("String_Node_Str",2,d1regions.size());
  Assert.assertFalse("String_Node_Str",d1regions.contains(new CellRegion("String_Node_Str")));
  Assert.assertTrue("String_Node_Str",d1regions.contains(new CellRegion("String_Node_Str")));
  Assert.assertTrue("String_Node_Str",d1regions.contains(new CellRegion("String_Node_Str")));
  Range e1=Ranges.range(sheet,"String_Node_Str");
  e1.paste(Ranges.range(sheet,"String_Node_Str"));
  d1regions=d1dv.getRegions();
  Assert.assertEquals("String_Node_Str",2,d1regions.size());
  Assert.assertTrue("String_Node_Str",d1regions.contains(new CellRegion("String_Node_Str")));
  Assert.assertTrue("String_Node_Str",d1regions.contains(new CellRegion("String_Node_Str")));
  Assert.assertFalse("String_Node_Str",d1regions.contains(new CellRegion("String_Node_Str")));
  e1.paste(Ranges.range(sheet,"String_Node_Str"),true);
  d1regions=d1dv.getRegions();
  Assert.assertEquals("String_Node_Str",2,d1regions.size());
  Assert.assertTrue("String_Node_Str",d1regions.contains(new CellRegion("String_Node_Str")));
  Assert.assertFalse("String_Node_Str",d1regions.contains(new CellRegion("String_Node_Str")));
  Assert.assertTrue("String_Node_Str",d1regions.contains(new CellRegion("String_Node_Str")));
}