Program: 935
Project: 935
Buggy source:
/** 
 * Execute a command.
 * @param command The whole string of the command including the command name and the optional parameters.
 * @return Returns true if the command was executed successfully.
 */
@Override public boolean execute(String command,EntityRef callingClient){
  if (command.length() == 0) {
    return false;
  }
  Client owner=networkSystem.getOwner(callingClient);
  if (networkSystem.getMode() == NetworkMode.NONE || (owner != null && owner.isLocal())) {
    localCommandHistory.add(command);
  }
  String cleanedCommand=command.replaceAll("String_Node_Str","String_Node_Str");
  int commandEndIndex=cleanedCommand.indexOf("String_Node_Str");
  String commandName;
  if (commandEndIndex >= 0) {
    commandName=cleanedCommand.substring(0,commandEndIndex);
  }
 else {
    commandName=cleanedCommand;
    commandEndIndex=commandName.length();
  }
  String parameterPart=cleanedCommand.substring(commandEndIndex).trim();
  List<String> params=splitParameters(parameterPart);
  CommandInfo cmd=commandLookup.get(commandName,params.size());
  if (cmd == null) {
    if (commandLookup.containsRow(commandName)) {
      addErrorMessage("String_Node_Str");
      for (      CommandInfo ci : commandLookup.row(commandName).values()) {
        addMessage(ci.getUsageMessage());
      }
    }
 else {
      addErrorMessage("String_Node_Str" + commandName + "String_Node_Str");
    }
    return false;
  }
  if (cmd.isRunOnServer() && !networkSystem.getMode().isAuthority()) {
    String paramsStr=PARAMETER_JOINER.join(params);
    callingClient.send(new CommandEvent(commandName,paramsStr));
    return true;
  }
 else {
    try {
      String result=cmd.execute(params,callingClient);
      if (result != null && !result.isEmpty()) {
        if (callingClient.exists()) {
          callingClient.send(new ConsoleMessageEvent(result));
        }
 else {
          addMessage(result);
        }
      }
      return true;
    }
 catch (    IllegalArgumentException e) {
      addErrorMessage(e.getLocalizedMessage());
      return false;
    }
catch (    Exception e) {
      addErrorMessage("String_Node_Str" + commandName + "String_Node_Str"+ e.getLocalizedMessage());
      logger.error("String_Node_Str",e);
      return false;
    }
  }
}

Fixed version (ground truth):
/** 
 * Execute a command.
 * @param command The whole string of the command including the command name and the optional parameters.
 * @return Returns true if the command was executed successfully.
 */
@Override public boolean execute(String command,EntityRef callingClient){
  if (command.length() == 0) {
    return false;
  }
  Client owner=networkSystem.getOwner(callingClient);
  if (networkSystem.getMode() == NetworkMode.NONE || (owner != null && owner.isLocal())) {
    localCommandHistory.add(command);
  }
  String cleanedCommand=command.replaceAll("String_Node_Str","String_Node_Str");
  int commandEndIndex=cleanedCommand.indexOf("String_Node_Str");
  String commandName;
  if (commandEndIndex >= 0) {
    commandName=cleanedCommand.substring(0,commandEndIndex);
  }
 else {
    commandName=cleanedCommand;
    commandEndIndex=commandName.length();
  }
  String parameterPart=cleanedCommand.substring(commandEndIndex).trim();
  List<String> params=splitParameters(parameterPart);
  CommandInfo cmd=commandLookup.get(commandName,params.size());
  if (cmd == null) {
    if (commandLookup.containsRow(commandName)) {
      addErrorMessage("String_Node_Str");
      for (      CommandInfo ci : commandLookup.row(commandName).values()) {
        addMessage(ci.getUsageMessage());
      }
    }
 else {
      addErrorMessage("String_Node_Str" + commandName + "String_Node_Str");
    }
    return false;
  }
  if (cmd.isRunOnServer() && !networkSystem.getMode().isAuthority()) {
    String paramsStr=PARAMETER_JOINER.join(params);
    callingClient.send(new CommandEvent(commandName,paramsStr));
    return true;
  }
 else {
    try {
      String result=cmd.execute(params,callingClient);
      if (result != null && !result.isEmpty()) {
        if (callingClient.exists()) {
          callingClient.send(new ConsoleMessageEvent(result));
        }
 else {
          addMessage(result);
        }
      }
      return true;
    }
 catch (    IllegalArgumentException e) {
      String msgText=e.getLocalizedMessage();
      if (msgText != null && !msgText.isEmpty()) {
        addErrorMessage(e.getLocalizedMessage());
      }
      return false;
    }
catch (    Exception e) {
      addErrorMessage("String_Node_Str" + commandName + "String_Node_Str"+ e.getLocalizedMessage());
      logger.error("String_Node_Str",e);
      return false;
    }
  }
}