Program: 7532
Project: 7532
Buggy source:
/** 
 * Creates a new Dataset or updates existing Dataset specification's properties if an optional update parameter in the body is set to true,   {@link DatasetInstanceConfiguration}is constructed based on request and appropriate action is performed
 */
@PUT @Path("String_Node_Str") public void createOrUpdate(HttpRequest request,final HttpResponder responder,@PathParam("String_Node_Str") String name){
  Reader reader=new InputStreamReader(new ChannelBufferInputStream(request.getContent()));
  DatasetInstanceConfiguration creationProperties=GSON.fromJson(reader,DatasetInstanceConfiguration.class);
  String operation=(creationProperties.isUpdate() == true) ? "String_Node_Str" : "String_Node_Str";
  LOG.info("String_Node_Str",operation,name,creationProperties.getTypeName(),creationProperties.getProperties());
  DatasetSpecification existing=instanceManager.get(name);
  if (existing != null) {
    String message=null;
    if (!creationProperties.isUpdate()) {
      message=String.format("String_Node_Str",name,existing);
    }
 else     if (!existing.getType().equals(creationProperties.getTypeName())) {
      message=String.format("String_Node_Str",name,existing.getType());
    }
    if (message != null) {
      LOG.warn(message);
      responder.sendError(HttpResponseStatus.CONFLICT,message);
      return;
    }
  }
  if (existing == null && creationProperties.isUpdate()) {
    responder.sendError(HttpResponseStatus.NOT_FOUND,"String_Node_Str");
  }
  DatasetTypeMeta typeMeta=implManager.getTypeInfo(creationProperties.getTypeName());
  if (typeMeta == null) {
    String message=String.format("String_Node_Str",operation,name,creationProperties.getTypeName());
    LOG.warn(message);
    responder.sendError(HttpResponseStatus.NOT_FOUND,message);
    return;
  }
  DatasetSpecification spec;
  try {
    spec=opExecutorClient.create(name,typeMeta,DatasetProperties.builder().addAll(creationProperties.getProperties()).build());
  }
 catch (  Exception e) {
    String msg=String.format("String_Node_Str",operation,name,creationProperties.getTypeName(),e.getMessage());
    LOG.error(msg,e);
    throw new RuntimeException(msg,e);
  }
  instanceManager.add(spec);
  try {
    if (creationProperties.isUpdate()) {
      datasetExploreFacade.disableExplore(name);
    }
    datasetExploreFacade.enableExplore(name);
  }
 catch (  Exception e) {
    String msg=String.format("String_Node_Str",name,creationProperties.getProperties(),e.getMessage());
    LOG.error(msg,e);
  }
  if (creationProperties.isUpdate()) {
    executeAdmin(request,responder,name,"String_Node_Str");
    responder.sendString(HttpResponseStatus.OK,String.format("String_Node_Str",name));
  }
  responder.sendString(HttpResponseStatus.OK,String.format("String_Node_Str",name));
}

Fixed version (ground truth):
/** 
 * Creates a new Dataset or updates existing Dataset specification's properties if an optional update parameter in the body is set to true,   {@link DatasetInstanceConfiguration}is constructed based on request and appropriate action is performed
 */
@PUT @Path("String_Node_Str") public void createOrUpdate(HttpRequest request,final HttpResponder responder,@PathParam("String_Node_Str") String name){
  Reader reader=new InputStreamReader(new ChannelBufferInputStream(request.getContent()));
  DatasetInstanceConfiguration creationProperties=GSON.fromJson(reader,DatasetInstanceConfiguration.class);
  String operation=(creationProperties.isUpdate() == true) ? "String_Node_Str" : "String_Node_Str";
  LOG.info("String_Node_Str",operation,name,creationProperties.getTypeName(),creationProperties.getProperties());
  DatasetSpecification existing=instanceManager.get(name);
  if (existing != null) {
    String message=null;
    if (!creationProperties.isUpdate()) {
      message=String.format("String_Node_Str",name,existing);
    }
 else     if (!existing.getType().equals(creationProperties.getTypeName())) {
      message=String.format("String_Node_Str",name,existing.getType());
    }
    if (message != null) {
      LOG.warn(message);
      responder.sendError(HttpResponseStatus.CONFLICT,message);
      return;
    }
  }
  if (existing == null && creationProperties.isUpdate()) {
    responder.sendError(HttpResponseStatus.NOT_FOUND,String.format("String_Node_Str",name));
  }
  DatasetTypeMeta typeMeta=implManager.getTypeInfo(creationProperties.getTypeName());
  if (typeMeta == null) {
    String message=String.format("String_Node_Str",operation,name,creationProperties.getTypeName());
    LOG.warn(message);
    responder.sendError(HttpResponseStatus.NOT_FOUND,message);
    return;
  }
  DatasetSpecification spec;
  try {
    spec=opExecutorClient.create(name,typeMeta,DatasetProperties.builder().addAll(creationProperties.getProperties()).build());
  }
 catch (  Exception e) {
    String msg=String.format("String_Node_Str",operation,name,creationProperties.getTypeName(),e.getMessage());
    LOG.error(msg,e);
    throw new RuntimeException(msg,e);
  }
  instanceManager.add(spec);
  try {
    if (creationProperties.isUpdate()) {
      datasetExploreFacade.disableExplore(name);
    }
    datasetExploreFacade.enableExplore(name);
  }
 catch (  Exception e) {
    String msg=String.format("String_Node_Str",name,creationProperties.getProperties(),e.getMessage());
    LOG.error(msg,e);
  }
  if (creationProperties.isUpdate()) {
    executeAdmin(request,responder,name,"String_Node_Str");
  }
  responder.sendString(HttpResponseStatus.OK,String.format("String_Node_Str",name));
}