Program: 39462
Project: 39462
Buggy source:
public String executeRequest(Channel responseChannel,String clientId,ConcurrentHashMap<String,String> clientState,String request) throws Exception {
  StringBuffer rsb=new StringBuffer();
  String cmd;
  String[] args;
  if (request.indexOf(GraphServerProtocol.SPACE) != -1) {
    cmd=request.substring(0,request.indexOf(GraphServerProtocol.SPACE)).trim().toLowerCase();
    args=request.substring(request.indexOf(GraphServerProtocol.SPACE)).trim().split(GraphServerProtocol.SPACE);
  }
 else {
    cmd=request.trim().toLowerCase();
    args=new String[0];
  }
  if (cmd.equals(GraphServerProtocol.CMD_USE)) {
    if (null == nameGraphMap.get(args[0])) {
      rsb.append(GraphServerProtocol.R_ERR);
      rsb.append("String_Node_Str");
    }
 else {
      if (null != clientState.get(ST_DB))       clientState.remove(ST_DB);
      clientState.put(ST_DB,args[0]);
      rsb.append(GraphServerProtocol.R_OK);
    }
  }
 else   if (cmd.equals(GraphServerProtocol.CMD_CREATE)) {
    if (null != nameGraphMap.get(args[0])) {
      rsb.append(GraphServerProtocol.R_ERR);
      rsb.append("String_Node_Str");
    }
 else {
      Graph newGraph=new Graph(args[0]);
      nameGraphMap.put(args[0],newGraph);
      WeakReference<Graph> graphRef=new WeakReference<Graph>(newGraph);
      GraphCommandExecutor graphCommandExecutor=new GraphCommandExecutor(args[0],graphRef,inboundChannelMap);
      graphCommandExecutorService.execute(graphCommandExecutor);
      graphCommandExecutorMap.put(args[0],graphCommandExecutor);
      rsb.append(GraphServerProtocol.R_OK);
    }
  }
 else   if (cmd.equals(GraphServerProtocol.CMD_DROP)) {
    if (null == nameGraphMap.get(args[0])) {
      rsb.append(GraphServerProtocol.R_ERR);
      rsb.append("String_Node_Str");
    }
 else {
      nameGraphMap.remove(args[0]);
      graphCommandExecutorMap.remove(args[0]);
      rsb.append(GraphServerProtocol.R_OK);
    }
  }
 else   if (cmd.equals(GraphServerProtocol.CMD_NAMECON)) {
    clientState.put(ST_NAMECON,args[0] + "String_Node_Str" + clientId);
    rsb.append(clientState.get(ST_NAMECON));
    rsb.append(GraphServerProtocol.NL);
    rsb.append(GraphServerProtocol.R_OK);
  }
 else   if (cmd.equals(GraphServerProtocol.CMD_CLSTATE)) {
    JSONObject result=new JSONObject(clientState);
    rsb.append(result.toString(4));
    rsb.append(GraphServerProtocol.NL);
    rsb.append(GraphServerProtocol.R_OK);
  }
 else   if (cmd.equals(GraphServerProtocol.CMD_SSTAT)) {
    JSONObject result=new JSONObject();
    JSONObject names=new JSONObject();
    names.put("String_Node_Str",Graph.TYPE_FIELD);
    names.put("String_Node_Str",Graph.KEY_FIELD);
    names.put("String_Node_Str",Graph.WEIGHT_FIELD);
    names.put("String_Node_Str",Graph.EDGE_SOURCE_FIELD);
    names.put("String_Node_Str",Graph.EDGE_TARGET_FIELD);
    names.put("String_Node_Str",Graph.RELATION_FIELD);
    names.put("String_Node_Str",Graph.VERTEX_TYPE);
    names.put("String_Node_Str",Graph.EDGE_TYPE);
    result.put("String_Node_Str",names);
    rsb.append(result.toString(4));
    rsb.append(GraphServerProtocol.NL);
    rsb.append(GraphServerProtocol.R_OK);
  }
 else   if (cmd.equals(GraphServerProtocol.CMD_LISTG)) {
    for (    String name : nameGraphMap.keySet()) {
      rsb.append(name);
      rsb.append(GraphServerProtocol.NL);
    }
    rsb.append(GraphServerProtocol.R_OK);
  }
 else   if (cmd.equals(GraphServerProtocol.CMD_GSTAT)) {
    Graph gr0=nameGraphMap.get(args[0]);
    if (null == gr0) {
      rsb.append(GraphServerProtocol.R_NOT_EXIST);
    }
 else {
      JSONObject result=new JSONObject();
      result.put("String_Node_Str",gr0.numVertices());
      result.put("String_Node_Str",gr0.numEdges());
      rsb.append(result.toString(4));
      rsb.append(GraphServerProtocol.NL);
      rsb.append(GraphServerProtocol.R_OK);
    }
  }
 else {
    GraphCommand graphCommand=new GraphCommand();
    graphCommand.responseChannel=responseChannel;
    graphCommand.clientId=clientId;
    graphCommand.clientState=clientState;
    graphCommand.request=request;
    graphCommand.cmd=cmd;
    graphCommand.args=args;
    graphCommand.poisonPill=false;
    graphCommandExecutorMap.get(clientState.get(GraphServerHandler.ST_DB)).queue(graphCommand);
    return null;
  }
  if (rsb.toString().equals("String_Node_Str")) {
    log.info("String_Node_Str" + cmd);
    rsb.append(GraphServerProtocol.R_UNK);
    rsb.append(GraphServerProtocol.SPACE);
    rsb.append(cmd);
  }
  rsb.append(GraphServerProtocol.NL);
  return rsb.toString();
}

Fixed version (ground truth):
public String executeRequest(Channel responseChannel,String clientId,ConcurrentHashMap<String,String> clientState,String request) throws Exception {
  StringBuffer rsb=new StringBuffer();
  String cmd;
  String[] args;
  if (request.indexOf(GraphServerProtocol.SPACE) != -1) {
    cmd=request.substring(0,request.indexOf(GraphServerProtocol.SPACE)).trim().toLowerCase();
    args=request.substring(request.indexOf(GraphServerProtocol.SPACE)).trim().split(GraphServerProtocol.SPACE);
  }
 else {
    cmd=request.trim().toLowerCase();
    args=new String[0];
  }
  if (cmd.equals(GraphServerProtocol.CMD_USE)) {
    if (null == nameGraphMap.get(args[0])) {
      rsb.append(GraphServerProtocol.R_ERR);
      rsb.append("String_Node_Str");
    }
 else {
      if (null != clientState.get(ST_DB))       clientState.remove(ST_DB);
      clientState.put(ST_DB,args[0]);
      rsb.append(GraphServerProtocol.R_OK);
    }
  }
 else   if (cmd.equals(GraphServerProtocol.CMD_CREATE)) {
    if (null != nameGraphMap.get(args[0])) {
      rsb.append(GraphServerProtocol.R_ERR);
      rsb.append("String_Node_Str");
    }
 else {
      Graph newGraph=new Graph(args[0]);
      nameGraphMap.put(args[0],newGraph);
      WeakReference<Graph> graphRef=new WeakReference<Graph>(newGraph);
      GraphCommandExecutor graphCommandExecutor=new GraphCommandExecutor(args[0],graphRef,inboundChannelMap);
      graphCommandExecutorService.execute(graphCommandExecutor);
      graphCommandExecutorMap.put(args[0],graphCommandExecutor);
      rsb.append(GraphServerProtocol.R_OK);
    }
  }
 else   if (cmd.equals(GraphServerProtocol.CMD_DROP)) {
    if (null == nameGraphMap.get(args[0])) {
      rsb.append(GraphServerProtocol.R_ERR);
      rsb.append("String_Node_Str");
    }
 else {
      nameGraphMap.remove(args[0]);
      graphCommandExecutorMap.remove(args[0]);
      rsb.append(GraphServerProtocol.R_OK);
    }
  }
 else   if (cmd.equals(GraphServerProtocol.CMD_NAMECON)) {
    clientState.put(ST_NAMECON,args[0] + "String_Node_Str" + clientId);
    rsb.append(clientState.get(ST_NAMECON));
    rsb.append(GraphServerProtocol.NL);
    rsb.append(GraphServerProtocol.R_OK);
  }
 else   if (cmd.equals(GraphServerProtocol.CMD_CLSTATE)) {
    JSONObject result=new JSONObject(clientState);
    rsb.append(result.toString());
    rsb.append(GraphServerProtocol.NL);
    rsb.append(GraphServerProtocol.R_OK);
  }
 else   if (cmd.equals(GraphServerProtocol.CMD_SSTAT)) {
    JSONObject result=new JSONObject();
    JSONObject names=new JSONObject();
    names.put("String_Node_Str",Graph.TYPE_FIELD);
    names.put("String_Node_Str",Graph.KEY_FIELD);
    names.put("String_Node_Str",Graph.WEIGHT_FIELD);
    names.put("String_Node_Str",Graph.EDGE_SOURCE_FIELD);
    names.put("String_Node_Str",Graph.EDGE_TARGET_FIELD);
    names.put("String_Node_Str",Graph.RELATION_FIELD);
    names.put("String_Node_Str",Graph.VERTEX_TYPE);
    names.put("String_Node_Str",Graph.EDGE_TYPE);
    result.put("String_Node_Str",names);
    rsb.append(result.toString());
    rsb.append(GraphServerProtocol.NL);
    rsb.append(GraphServerProtocol.R_OK);
  }
 else   if (cmd.equals(GraphServerProtocol.CMD_LISTG)) {
    for (    String name : nameGraphMap.keySet()) {
      rsb.append(name);
      rsb.append(GraphServerProtocol.NL);
    }
    rsb.append(GraphServerProtocol.R_OK);
  }
 else   if (cmd.equals(GraphServerProtocol.CMD_GSTAT)) {
    Graph gr0=nameGraphMap.get(args[0]);
    if (null == gr0) {
      rsb.append(GraphServerProtocol.R_NOT_EXIST);
    }
 else {
      JSONObject result=new JSONObject();
      result.put("String_Node_Str",gr0.numVertices());
      result.put("String_Node_Str",gr0.numEdges());
      rsb.append(result.toString());
      rsb.append(GraphServerProtocol.NL);
      rsb.append(GraphServerProtocol.R_OK);
    }
  }
 else {
    GraphCommand graphCommand=new GraphCommand();
    graphCommand.responseChannel=responseChannel;
    graphCommand.clientId=clientId;
    graphCommand.clientState=clientState;
    graphCommand.request=request;
    graphCommand.cmd=cmd;
    graphCommand.args=args;
    graphCommand.poisonPill=false;
    graphCommandExecutorMap.get(clientState.get(GraphServerHandler.ST_DB)).queue(graphCommand);
    return null;
  }
  if (rsb.toString().equals("String_Node_Str")) {
    log.info("String_Node_Str" + cmd);
    rsb.append(GraphServerProtocol.R_UNK);
    rsb.append(GraphServerProtocol.SPACE);
    rsb.append(cmd);
  }
  rsb.append(GraphServerProtocol.NL);
  return rsb.toString();
}