Program: 5593
Project: 5593
Buggy source:
/** 
 * Create a new file set. The properties for the new dataset can be given as JSON in the body of the request. Alternatively the request can specify the name of an existing dataset as a query parameter; in that case, a copy of the properties of that dataset is used to create the new file set. If neither a body nor a clone parameter is present, the dataset is created with empty (that is, default) properties.
 * @param set the name of the file set
 * @param clone the name of an existing dataset. If present, its properties are used for the new dataset.
 */
@POST @Path("String_Node_Str") public void create(HttpServiceRequest request,HttpServiceResponder responder,@PathParam("String_Node_Str") final String set,@Nullable @QueryParam("String_Node_Str") final String clone) throws DatasetManagementException {
  DatasetProperties properties=DatasetProperties.EMPTY;
  ByteBuffer content=request.getContent();
  if (clone != null) {
    try {
      properties=getContext().getAdmin().getDatasetProperties(clone);
    }
 catch (    InstanceNotFoundException e) {
      responder.sendError(404,"String_Node_Str" + clone + "String_Node_Str");
      return;
    }
  }
 else   if (content != null && content.hasRemaining()) {
    try {
      properties=GSON.fromJson(Bytes.toString(content),DatasetProperties.class);
    }
 catch (    Exception e) {
      responder.sendError(400,"String_Node_Str" + e.getMessage());
      return;
    }
  }
  try {
    getContext().getAdmin().createDataset(set,"String_Node_Str",properties);
  }
 catch (  InstanceConflictException e) {
    responder.sendError(409,"String_Node_Str" + set + "String_Node_Str");
    return;
  }
  responder.sendStatus(200);
}

Fixed version (ground truth):
/** 
 * Create a new file set. The properties for the new dataset can be given as JSON in the body of the request. Alternatively the request can specify the name of an existing dataset as a query parameter; in that case, a copy of the properties of that dataset is used to create the new file set. If neither a body nor a clone parameter is present, the dataset is created with empty (that is, default) properties.
 * @param set the name of the file set
 * @param clone the name of an existing dataset. If present, its properties are used for the new dataset.
 */
@POST @Path("String_Node_Str") @TransactionPolicy(TransactionControl.EXPLICIT) public void create(HttpServiceRequest request,HttpServiceResponder responder,@PathParam("String_Node_Str") final String set,@Nullable @QueryParam("String_Node_Str") final String clone) throws DatasetManagementException {
  DatasetProperties properties=DatasetProperties.EMPTY;
  ByteBuffer content=request.getContent();
  if (clone != null) {
    try {
      properties=getContext().getAdmin().getDatasetProperties(clone);
    }
 catch (    InstanceNotFoundException e) {
      responder.sendError(404,"String_Node_Str" + clone + "String_Node_Str");
      return;
    }
  }
 else   if (content != null && content.hasRemaining()) {
    try {
      properties=GSON.fromJson(Bytes.toString(content),DatasetProperties.class);
    }
 catch (    Exception e) {
      responder.sendError(400,"String_Node_Str" + e.getMessage());
      return;
    }
  }
  try {
    getContext().getAdmin().createDataset(set,"String_Node_Str",properties);
  }
 catch (  InstanceConflictException e) {
    responder.sendError(409,"String_Node_Str" + set + "String_Node_Str");
    return;
  }
  responder.sendStatus(200);
}