Program: 60979
Project: 60979
Buggy source:
@Test public void create(){
  ConnInstanceTO connectorTO=new ConnInstanceTO();
  connectorTO.setVersion(connidSoapVersion);
  connectorTO.setConnectorName(WebServiceConnector.class.getSimpleName());
  connectorTO.setBundleName("String_Node_Str");
  connectorTO.setDisplayName("String_Node_Str");
  Set<ConnConfProperty> conf=new HashSet<ConnConfProperty>();
  ConnConfPropSchema endpointSchema=new ConnConfPropSchema();
  endpointSchema.setName("String_Node_Str");
  endpointSchema.setType(String.class.getName());
  endpointSchema.setRequired(true);
  ConnConfProperty endpoint=new ConnConfProperty();
  endpoint.setSchema(endpointSchema);
  endpoint.setValue("String_Node_Str");
  ConnConfPropSchema servicenameSchema=new ConnConfPropSchema();
  servicenameSchema.setName("String_Node_Str");
  servicenameSchema.setType(String.class.getName());
  servicenameSchema.setRequired(true);
  ConnConfProperty servicename=new ConnConfProperty();
  servicename.setSchema(servicenameSchema);
  servicename.setValue("String_Node_Str");
  conf.add(endpoint);
  conf.add(servicename);
  connectorTO.setConfiguration(conf);
  connectorTO.addCapability(ConnectorCapability.ASYNC_CREATE);
  connectorTO.addCapability(ConnectorCapability.SYNC_CREATE);
  connectorTO.addCapability(ConnectorCapability.ASYNC_UPDATE);
  ConnInstanceTO actual=(ConnInstanceTO)restTemplate.postForObject(BASE_URL + "String_Node_Str",connectorTO,ConnInstanceTO.class);
  assertNotNull(actual);
  assertEquals(actual.getBundleName(),connectorTO.getBundleName());
  assertEquals(actual.getConnectorName(),connectorTO.getConnectorName());
  assertEquals(actual.getVersion(),connectorTO.getVersion());
  assertEquals("String_Node_Str",actual.getDisplayName());
  assertEquals(connectorTO.getCapabilities(),actual.getCapabilities());
  Throwable t=null;
  connectorTO.setId(actual.getId());
  connectorTO.removeCapability(ConnectorCapability.ASYNC_UPDATE);
  actual=null;
  try {
    actual=restTemplate.postForObject(BASE_URL + "String_Node_Str",connectorTO,ConnInstanceTO.class);
  }
 catch (  HttpStatusCodeException e) {
    LOG.error("String_Node_Str",e);
    t=e;
  }
  assertNull(t);
  assertNotNull(actual);
  assertEquals(connectorTO.getCapabilities(),actual.getCapabilities());
  try {
    restTemplate.delete(BASE_URL + "String_Node_Str",actual.getId().toString());
  }
 catch (  HttpStatusCodeException e) {
    LOG.error("String_Node_Str",e);
    t=e;
  }
  assertNull(t);
  try {
    restTemplate.getForObject(BASE_URL + "String_Node_Str",ConnInstanceTO.class,actual.getId().toString());
  }
 catch (  HttpStatusCodeException e) {
    assertEquals(e.getStatusCode(),HttpStatus.NOT_FOUND);
  }
}

Fixed version (ground truth):
@Test public void create(){
  ConnInstanceTO connectorTO=new ConnInstanceTO();
  connectorTO.setVersion(connidSoapVersion);
  connectorTO.setConnectorName(WebServiceConnector.class.getName());
  connectorTO.setBundleName("String_Node_Str");
  connectorTO.setDisplayName("String_Node_Str");
  Set<ConnConfProperty> conf=new HashSet<ConnConfProperty>();
  ConnConfPropSchema endpointSchema=new ConnConfPropSchema();
  endpointSchema.setName("String_Node_Str");
  endpointSchema.setType(String.class.getName());
  endpointSchema.setRequired(true);
  ConnConfProperty endpoint=new ConnConfProperty();
  endpoint.setSchema(endpointSchema);
  endpoint.setValue("String_Node_Str");
  ConnConfPropSchema servicenameSchema=new ConnConfPropSchema();
  servicenameSchema.setName("String_Node_Str");
  servicenameSchema.setType(String.class.getName());
  servicenameSchema.setRequired(true);
  ConnConfProperty servicename=new ConnConfProperty();
  servicename.setSchema(servicenameSchema);
  servicename.setValue("String_Node_Str");
  conf.add(endpoint);
  conf.add(servicename);
  connectorTO.setConfiguration(conf);
  connectorTO.addCapability(ConnectorCapability.ASYNC_CREATE);
  connectorTO.addCapability(ConnectorCapability.SYNC_CREATE);
  connectorTO.addCapability(ConnectorCapability.ASYNC_UPDATE);
  ConnInstanceTO actual=(ConnInstanceTO)restTemplate.postForObject(BASE_URL + "String_Node_Str",connectorTO,ConnInstanceTO.class);
  assertNotNull(actual);
  assertEquals(actual.getBundleName(),connectorTO.getBundleName());
  assertEquals(actual.getConnectorName(),connectorTO.getConnectorName());
  assertEquals(actual.getVersion(),connectorTO.getVersion());
  assertEquals("String_Node_Str",actual.getDisplayName());
  assertEquals(connectorTO.getCapabilities(),actual.getCapabilities());
  Throwable t=null;
  connectorTO.setId(actual.getId());
  connectorTO.removeCapability(ConnectorCapability.ASYNC_UPDATE);
  actual=null;
  try {
    actual=restTemplate.postForObject(BASE_URL + "String_Node_Str",connectorTO,ConnInstanceTO.class);
  }
 catch (  HttpStatusCodeException e) {
    LOG.error("String_Node_Str",e);
    t=e;
  }
  assertNull(t);
  assertNotNull(actual);
  assertEquals(connectorTO.getCapabilities(),actual.getCapabilities());
  try {
    restTemplate.delete(BASE_URL + "String_Node_Str",actual.getId().toString());
  }
 catch (  HttpStatusCodeException e) {
    LOG.error("String_Node_Str",e);
    t=e;
  }
  assertNull(t);
  try {
    restTemplate.getForObject(BASE_URL + "String_Node_Str",ConnInstanceTO.class,actual.getId().toString());
  }
 catch (  HttpStatusCodeException e) {
    assertEquals(e.getStatusCode(),HttpStatus.NOT_FOUND);
  }
}