Program: 48568
Project: 48568
Buggy source:
public void handle(HttpDeleteCommand command){
  String uri=command.getURI();
  if (uri.startsWith(URI_MAPS)) {
    int indexEnd=uri.indexOf('/',URI_MAPS.length());
    if (indexEnd == -1) {
      String mapName=uri.substring(URI_MAPS.length(),uri.length());
      textCommandService.deleteAll(mapName);
      command.send204();
    }
 else {
      String mapName=uri.substring(URI_MAPS.length(),indexEnd);
      String key=uri.substring(indexEnd + 1);
      Object value=textCommandService.delete(mapName,key);
      command.send204();
    }
  }
 else   if (uri.startsWith(URI_QUEUES)) {
    int indexEnd=uri.indexOf('/',URI_QUEUES.length());
    String queueName=uri.substring(URI_QUEUES.length(),indexEnd);
    String secondStr=(uri.length() > (indexEnd + 1)) ? uri.substring(indexEnd + 1) : null;
    int seconds=(secondStr == null) ? 0 : Integer.parseInt(secondStr);
    Object value=textCommandService.poll(queueName,seconds);
    if (value == null) {
      command.send204();
    }
 else {
      if (value instanceof byte[]) {
        command.setResponse(null,(byte[])value);
      }
 else       if (value instanceof RestValue) {
        RestValue restValue=(RestValue)value;
        command.setResponse(restValue.getContentType(),restValue.getValue());
      }
 else       if (value instanceof String) {
        command.setResponse(HttpCommand.CONTENT_TYPE_PLAIN_TEXT,((String)value).getBytes());
      }
 else {
        command.setResponse(null,textCommandService.toByteArray(value));
      }
    }
  }
 else {
    command.send400();
  }
  textCommandService.sendResponse(command);
}

Fixed version (ground truth):
public void handle(HttpDeleteCommand command){
  String uri=command.getURI();
  if (uri.startsWith(URI_MAPS)) {
    int indexEnd=uri.indexOf('/',URI_MAPS.length());
    if (indexEnd == -1) {
      String mapName=uri.substring(URI_MAPS.length(),uri.length());
      textCommandService.deleteAll(mapName);
      command.send204();
    }
 else {
      String mapName=uri.substring(URI_MAPS.length(),indexEnd);
      String key=uri.substring(indexEnd + 1);
      Object value=textCommandService.delete(mapName,key);
      command.send204();
    }
  }
 else   if (uri.startsWith(URI_QUEUES)) {
    int indexEnd=uri.indexOf('/',URI_QUEUES.length());
    String queueName=uri.substring(URI_QUEUES.length(),indexEnd);
    String secondStr=(uri.length() > (indexEnd + 1)) ? uri.substring(indexEnd + 1) : null;
    int seconds=(secondStr == null) ? 0 : Integer.parseInt(secondStr);
    Object value=textCommandService.poll(queueName,seconds);
    if (value == null) {
      command.send204();
    }
 else {
      if (value instanceof byte[]) {
        command.setResponse(null,(byte[])value);
      }
 else       if (value instanceof RestValue) {
        RestValue restValue=(RestValue)value;
        command.setResponse(restValue.getContentType(),restValue.getValue());
      }
 else       if (value instanceof String) {
        command.setResponse(HttpCommand.CONTENT_TYPE_PLAIN_TEXT,stringToBytes((String)value));
      }
 else {
        command.setResponse(null,textCommandService.toByteArray(value));
      }
    }
  }
 else {
    command.send400();
  }
  textCommandService.sendResponse(command);
}