Program: 74125
Project: 74125
Buggy source:
/** 
 * Execute the compile and run commands in the <i>codeDirectory</i> directory.
 * @return The return value of the last subprocess that was executedor -1 if no commands were executed.
 * @exception IllegalActionException If there are problems readingparameters or executing the commands.
 */
protected int _executeCommands() throws IllegalActionException {
  List commands=new LinkedList();
  if (((BooleanToken)compile.getToken()).booleanValue()) {
    commands.add("String_Node_Str" + _sanitizedModelName + "String_Node_Str"+ compileTarget.stringValue());
  }
  if (_isTopLevel()) {
    if (((BooleanToken)run.getToken()).booleanValue()) {
      String command=codeDirectory.stringValue() + ((!codeDirectory.stringValue().endsWith("String_Node_Str") && !codeDirectory.stringValue().endsWith("String_Node_Str")) ? "String_Node_Str" : "String_Node_Str") + _sanitizedModelName;
      commands.add("String_Node_Str" + command.replace('\\','/') + "String_Node_Str");
    }
  }
  if (commands.size() == 0) {
    return -1;
  }
  _executeCommands.setCommands(commands);
  _executeCommands.setWorkingDirectory(codeDirectory.asFile());
  try {
    _executeCommands.start();
  }
 catch (  Exception ex) {
    StringBuffer errorMessage=new StringBuffer();
    Iterator allCommands=commands.iterator();
    while (allCommands.hasNext()) {
      errorMessage.append((String)allCommands.next() + _eol);
    }
    throw new IllegalActionException("String_Node_Str" + "String_Node_Str" + _eol + errorMessage);
  }
  return _executeCommands.getLastSubprocessReturnCode();
}

Fixed version (ground truth):
/** 
 * Execute the compile and run commands in the <i>codeDirectory</i> directory.
 * @return The return value of the last subprocess that was executedor -1 if no commands were executed.
 * @exception IllegalActionException If there are problems readingparameters or executing the commands.
 */
protected int _executeCommands() throws IllegalActionException {
  List<String> commands=new LinkedList<String>();
  if (((BooleanToken)compile.getToken()).booleanValue()) {
    commands.add("String_Node_Str" + _sanitizedModelName + "String_Node_Str"+ compileTarget.stringValue());
  }
  if (_isTopLevel()) {
    if (((BooleanToken)run.getToken()).booleanValue()) {
      String command=codeDirectory.stringValue() + ((!codeDirectory.stringValue().endsWith("String_Node_Str") && !codeDirectory.stringValue().endsWith("String_Node_Str")) ? "String_Node_Str" : "String_Node_Str") + _sanitizedModelName;
      commands.add("String_Node_Str" + command.replace('\\','/') + "String_Node_Str");
    }
  }
  if (commands.size() == 0) {
    return -1;
  }
  _executeCommands.setCommands(commands);
  _executeCommands.setWorkingDirectory(codeDirectory.asFile());
  try {
    _executeCommands.start();
  }
 catch (  Exception ex) {
    StringBuffer errorMessage=new StringBuffer();
    Iterator allCommands=commands.iterator();
    while (allCommands.hasNext()) {
      errorMessage.append((String)allCommands.next() + _eol);
    }
    throw new IllegalActionException("String_Node_Str" + "String_Node_Str" + _eol + errorMessage);
  }
  return _executeCommands.getLastSubprocessReturnCode();
}