Program: 4614
Project: 4614
Buggy source:
@Test public void testPFSReconfigure(){
  DatasetDefinition pfsDef=registry.get(PartitionedFileSet.class.getName());
  Assert.assertTrue(pfsDef instanceof Reconfigurable);
  DatasetProperties props=PartitionedFileSetProperties.builder().setPartitioning(Partitioning.builder().addIntField("String_Node_Str").addStringField("String_Node_Str").build()).build();
  DatasetSpecification spec=pfsDef.configure("String_Node_Str",props);
  DatasetProperties noIprops=PartitionedFileSetProperties.builder().setPartitioning(Partitioning.builder().addStringField("String_Node_Str").build()).build();
  try {
    ((Reconfigurable)pfsDef).reconfigure("String_Node_Str",noIprops,spec);
    Assert.fail("String_Node_Str");
  }
 catch (  IncompatibleUpdateException e) {
  }
  DatasetProperties longIprops=PartitionedFileSetProperties.builder().setPartitioning(Partitioning.builder().addLongField("String_Node_Str").addStringField("String_Node_Str").build()).build();
  try {
    ((Reconfigurable)pfsDef).reconfigure("String_Node_Str",longIprops,spec);
    Assert.fail("String_Node_Str");
  }
 catch (  IncompatibleUpdateException e) {
  }
  DatasetProperties revProps=PartitionedFileSetProperties.builder().setPartitioning(Partitioning.builder().addStringField("String_Node_Str").addIntField("String_Node_Str").build()).build();
  try {
    ((Reconfigurable)pfsDef).reconfigure("String_Node_Str",revProps,spec);
    Assert.fail("String_Node_Str");
  }
 catch (  IncompatibleUpdateException e) {
  }
}

Fixed version (ground truth):
@Test public void testPFSReconfigure() throws IncompatibleUpdateException {
  DatasetDefinition pfsDef=registry.get(PartitionedFileSet.class.getName());
  Assert.assertTrue(pfsDef instanceof Reconfigurable);
  DatasetProperties props=PartitionedFileSetProperties.builder().setPartitioning(Partitioning.builder().addIntField("String_Node_Str").addStringField("String_Node_Str").build()).build();
  DatasetSpecification spec=pfsDef.configure("String_Node_Str",props);
  DatasetProperties noIprops=PartitionedFileSetProperties.builder().setPartitioning(Partitioning.builder().addStringField("String_Node_Str").build()).build();
  try {
    ((Reconfigurable)pfsDef).reconfigure("String_Node_Str",noIprops,spec);
    Assert.fail("String_Node_Str");
  }
 catch (  IncompatibleUpdateException e) {
  }
  DatasetProperties longIprops=PartitionedFileSetProperties.builder().setPartitioning(Partitioning.builder().addLongField("String_Node_Str").addStringField("String_Node_Str").build()).build();
  try {
    ((Reconfigurable)pfsDef).reconfigure("String_Node_Str",longIprops,spec);
    Assert.fail("String_Node_Str");
  }
 catch (  IncompatibleUpdateException e) {
  }
  DatasetProperties revProps=PartitionedFileSetProperties.builder().setPartitioning(Partitioning.builder().addStringField("String_Node_Str").addIntField("String_Node_Str").build()).build();
  try {
    ((Reconfigurable)pfsDef).reconfigure("String_Node_Str",revProps,spec);
    Assert.fail("String_Node_Str");
  }
 catch (  IncompatibleUpdateException e) {
  }
  DatasetProperties oldProps=PartitionedFileSetProperties.builder().setPartitioning(Partitioning.builder().addStringField("String_Node_Str").build()).add(PartitionedFileSetDefinition.NAME_AS_BASE_PATH_DEFAULT,"String_Node_Str").build();
  DatasetSpecification oldSpec=pfsDef.configure("String_Node_Str",oldProps);
  DatasetSpecification newSpec=((Reconfigurable)pfsDef).reconfigure("String_Node_Str",oldProps,oldSpec);
  Assert.assertNull(newSpec.getSpecification("String_Node_Str").getProperty(FileSetProperties.BASE_PATH));
  props=PartitionedFileSetProperties.builder().setPartitioning(Partitioning.builder().addStringField("String_Node_Str").build()).build();
  oldSpec=pfsDef.configure("String_Node_Str",props);
  newSpec=((Reconfigurable)pfsDef).reconfigure("String_Node_Str",props,oldSpec);
  Assert.assertEquals("String_Node_Str",newSpec.getSpecification("String_Node_Str").getProperty(FileSetProperties.BASE_PATH));
  newSpec=((Reconfigurable)pfsDef).reconfigure("String_Node_Str",props,oldSpec);
  Assert.assertEquals("String_Node_Str",newSpec.getSpecification("String_Node_Str").getProperty(FileSetProperties.BASE_PATH));
}