Program: 50010
Project: 50010
Buggy source:
/** 
 * "set" means "store this data". <p/> "add" means "store this data, but only if the server *doesn't* already hold data for this key". <p/> "replace" means "store this data, but only if the server *does already hold data for this key". <p/> <p/> After sending the command line and the data block the client awaits the reply, which may be: <p/> - "STORED\r\n", to indicate success. <p/> - "NOT_STORED\r\n" to indicate the data was not stored, but not because of an error. This normally means that either that the condition for an "add" or a "replace" command wasn't met, or that the item is in a delete queue (see the "delete" command below).
 */
public void handle(SetCommand request){
  String key=request.getKey();
  String mapName="String_Node_Str";
  int index=key.indexOf(':');
  if (index != -1) {
    mapName=key.substring(0,index);
    key=key.substring(index + 1);
  }
  byte[] value=request.getValue();
  int ttl=textCommandService.getAdjustedTTLSeconds(request.getExpiration());
  textCommandService.incrementSetCount();
  if (SET == request.getType()) {
    request.setResponse(STORED);
    if (request.shouldReply()) {
      textCommandService.sendResponse(request);
    }
    textCommandService.put(mapName,key,value,ttl);
  }
 else   if (ADD == request.getType()) {
    boolean added=(textCommandService.putIfAbsent(mapName,key,value,ttl) == null);
    if (added) {
      request.setResponse(STORED);
    }
 else {
      request.setResponse(NOT_STORED);
    }
    if (request.shouldReply()) {
      textCommandService.sendResponse(request);
    }
  }
 else   if (REPLACE == request.getType()) {
    boolean replaced=(textCommandService.replace(mapName,key,value) != null);
    if (replaced) {
      request.setResponse(STORED);
    }
 else {
      request.setResponse(NOT_STORED);
    }
    if (request.shouldReply()) {
      textCommandService.sendResponse(request);
    }
  }
}

Fixed version (ground truth):
/** 
 * "set" means "store this data". <p/> "add" means "store this data, but only if the server *doesn't* already hold data for this key". <p/> "replace" means "store this data, but only if the server *does already hold data for this key". <p/> <p/> After sending the command line and the data block the client awaits the reply, which may be: <p/> - "STORED\r\n", to indicate success. <p/> - "NOT_STORED\r\n" to indicate the data was not stored, but not because of an error. This normally means that either that the condition for an "add" or a "replace" command wasn't met, or that the item is in a delete queue (see the "delete" command below).
 */
public void handle(SetCommand request){
  String key=request.getKey();
  String mapName="String_Node_Str";
  int index=key.indexOf(':');
  if (index != -1) {
    mapName=key.substring(0,index);
    key=key.substring(index + 1);
  }
  Object value=new MemcacheEntry(key,request.getValue(),request.getFlag());
  int ttl=textCommandService.getAdjustedTTLSeconds(request.getExpiration());
  textCommandService.incrementSetCount();
  if (SET == request.getType()) {
    request.setResponse(STORED);
    if (request.shouldReply()) {
      textCommandService.sendResponse(request);
    }
    textCommandService.put(mapName,key,value,ttl);
  }
 else   if (ADD == request.getType()) {
    boolean added=(textCommandService.putIfAbsent(mapName,key,value,ttl) == null);
    if (added) {
      request.setResponse(STORED);
    }
 else {
      request.setResponse(NOT_STORED);
    }
    if (request.shouldReply()) {
      textCommandService.sendResponse(request);
    }
  }
 else   if (REPLACE == request.getType()) {
    boolean replaced=(textCommandService.replace(mapName,key,value) != null);
    if (replaced) {
      request.setResponse(STORED);
    }
 else {
      request.setResponse(NOT_STORED);
    }
    if (request.shouldReply()) {
      textCommandService.sendResponse(request);
    }
  }
}