Program: 73571
Project: 73571
Buggy source:
@Test public void testExecuteUpdateParentsToNewVersion() throws Exception {
  OracleXMLDBConnection conn=(OracleXMLDBConnection)DBConnectorFactory.getSyncConnection(true);
  UpdateParentsToNewVersionTask task=new UpdateParentsToNewVersionTask();
  try {
    conn.executeUpdateParentsToNewVersion(task);
    fail("String_Node_Str");
  }
 catch (  Exception e) {
  }
  XMLDBModel oldModel=new XMLDBModel("String_Node_Str");
  XMLDBModel newModel=new XMLDBModel("String_Node_Str");
  task.setNewModel(newModel);
  try {
    conn.executeUpdateParentsToNewVersion(task);
    fail("String_Node_Str");
  }
 catch (  Exception e) {
  }
  task.setOldModel(oldModel);
  try {
    conn.executeUpdateParentsToNewVersion(task);
    fail("String_Node_Str");
  }
 catch (  Exception e) {
  }
  ArrayList<String> parentsList=new ArrayList<String>();
  parentsList.add("String_Node_Str");
  task.setParentsList(parentsList);
  try {
    conn.executeUpdateParentsToNewVersion(task);
    GetReferenceStringTask task1=new GetReferenceStringTask("String_Node_Str");
    String referenceString=conn.executeGetReferenceStringTask(task1);
    assertTrue("String_Node_Str",referenceString.indexOf("String_Node_Str") != -1);
    assertTrue("String_Node_Str",referenceString.indexOf("String_Node_Str") == -1);
    oldModel=new XMLDBModel("String_Node_Str","String_Node_Str");
    newModel=new XMLDBModel("String_Node_Str","String_Node_Str");
    task=new UpdateParentsToNewVersionTask();
    task.setNewModel(newModel);
    task.setOldModel(oldModel);
    parentsList=new ArrayList<String>();
    parentsList.add("String_Node_Str");
    task.setParentsList(parentsList);
    conn.executeUpdateParentsToNewVersion(task);
    task1=new GetReferenceStringTask("String_Node_Str");
    referenceString=conn.executeGetReferenceStringTask(task1);
    assertTrue("String_Node_Str",referenceString.indexOf("String_Node_Str") != -1);
    assertTrue("String_Node_Str",referenceString.indexOf("String_Node_Str") == -1);
    newModel=new XMLDBModel("String_Node_Str","String_Node_Str");
    task.setNewModel(newModel);
    try {
      conn.executeUpdateParentsToNewVersion(task);
      fail("String_Node_Str");
    }
 catch (    Exception e) {
    }
  }
 catch (  DBExecutionException e) {
    fail("String_Node_Str" + e.getMessage());
  }
 finally {
    if (conn != null) {
      conn.abortConnection();
      conn.closeConnection();
    }
  }
}

Fixed version (ground truth):
@Test public void testExecuteUpdateParentsToNewVersion() throws Exception {
  OracleXMLDBConnection conn=(OracleXMLDBConnection)DBConnectorFactory.getSyncConnection(true);
  UpdateParentsToNewVersionTask task=new UpdateParentsToNewVersionTask();
  try {
    conn.executeUpdateParentsToNewVersion(task);
    fail("String_Node_Str");
  }
 catch (  Exception e) {
  }
  XMLDBModel oldModel=new XMLDBModel("String_Node_Str");
  XMLDBModel newModel=new XMLDBModel("String_Node_Str");
  task.setNewModel(newModel);
  try {
    conn.executeUpdateParentsToNewVersion(task);
    fail("String_Node_Str");
  }
 catch (  Exception e) {
  }
  task.setOldModel(oldModel);
  try {
    conn.executeUpdateParentsToNewVersion(task);
    fail("String_Node_Str");
  }
 catch (  Exception e) {
  }
  ArrayList<String> parentsList=new ArrayList<String>();
  parentsList.add("String_Node_Str");
  task.setParentsList(parentsList);
  try {
    conn.executeUpdateParentsToNewVersion(task);
    GetReferenceStringTask task1=new GetReferenceStringTask("String_Node_Str");
    String referenceString=conn.executeGetReferenceStringTask(task1);
    assertTrue("String_Node_Str",referenceString.indexOf("String_Node_Str") != -1);
    assertTrue("String_Node_Str",referenceString.indexOf("String_Node_Str") == -1);
    oldModel=new XMLDBModel("String_Node_Str");
    newModel=new XMLDBModel("String_Node_Str");
    task=new UpdateParentsToNewVersionTask();
    task.setNewModel(newModel);
    task.setOldModel(oldModel);
    parentsList=new ArrayList<String>();
    parentsList.add("String_Node_Str");
    task.setParentsList(parentsList);
    conn.executeUpdateParentsToNewVersion(task);
    task1=new GetReferenceStringTask("String_Node_Str");
    referenceString=conn.executeGetReferenceStringTask(task1);
    assertTrue("String_Node_Str",referenceString.indexOf("String_Node_Str") != -1);
    assertTrue("String_Node_Str",referenceString.indexOf("String_Node_Str") == -1);
    newModel=new XMLDBModel("String_Node_Str","String_Node_Str");
    task.setNewModel(newModel);
    try {
      conn.executeUpdateParentsToNewVersion(task);
      fail("String_Node_Str");
    }
 catch (    Exception e) {
    }
  }
 catch (  DBExecutionException e) {
    fail("String_Node_Str" + e.getMessage());
  }
 finally {
    if (conn != null) {
      conn.abortConnection();
      conn.closeConnection();
    }
  }
}