Program: 74132
Project: 74132
Buggy source:
/** 
 * Process the specified code, replacing macros with their values.
 * @param code The code to process.
 * @return The processed code.
 * @exception IllegalActionException If illegal macro names are found.
 */
public String processCode(String code) throws IllegalActionException {
  StringBuffer result=new StringBuffer();
  int currentPos=_getMacroStartIndex(code,0);
  if (currentPos < 0) {
    return code;
  }
  result.append(code.substring(0,currentPos));
  while (currentPos < code.length()) {
    int openParenIndex=code.indexOf("String_Node_Str",currentPos + 1);
    if (openParenIndex == -1) {
      throw new IllegalActionException(getComponent(),"String_Node_Str" + code + "String_Node_Str");
    }
    int closeParenIndex=_findClosedParen(code,openParenIndex);
    if (closeParenIndex < 0) {
      result.append(code.substring(currentPos));
      return result.toString();
    }
    int nextPos=_getMacroStartIndex(code,closeParenIndex + 1);
    if (nextPos < 0) {
      nextPos=code.length();
    }
    String subcode=code.substring(currentPos,nextPos);
    if ((currentPos > 0) && (code.charAt(currentPos - 1) == '\\')) {
      result.append(subcode);
      currentPos=nextPos;
      continue;
    }
    String macro=code.substring(currentPos + 1,openParenIndex);
    macro=macro.trim();
    String name=code.substring(openParenIndex + 1,closeParenIndex);
    name=processCode(name.trim());
    try {
      result.append(_replaceMacro(macro,name));
    }
 catch (    Throwable throwable) {
      throw new IllegalActionException(this,throwable,"String_Node_Str" + name + "String_Node_Str"+ macro+ "String_Node_Str"+ code);
    }
    String string=code.substring(closeParenIndex + 1,nextPos);
    result.append(string);
    currentPos=nextPos;
  }
  return result.toString();
}

Fixed version (ground truth):
/** 
 * Process the specified code, replacing macros with their values.
 * @param code The code to process.
 * @return The processed code.
 * @exception IllegalActionException If illegal macro names are found.
 */
public String processCode(String code) throws IllegalActionException {
  StringBuffer result=new StringBuffer();
  boolean processAgain=false;
  int currentPos=_getMacroStartIndex(code,0);
  if (currentPos < 0) {
    return code;
  }
  result.append(code.substring(0,currentPos));
  while (currentPos < code.length()) {
    int openParenIndex=code.indexOf("String_Node_Str",currentPos + 1);
    if (openParenIndex == -1) {
      throw new IllegalActionException(getComponent(),"String_Node_Str" + code + "String_Node_Str");
    }
    int closeParenIndex=_findClosedParen(code,openParenIndex);
    if (closeParenIndex < 0) {
      result.append(code.substring(currentPos));
      return result.toString();
    }
    int nextPos=_getMacroStartIndex(code,closeParenIndex + 1);
    if (nextPos < 0) {
      nextPos=code.length();
    }
    String subcode=code.substring(currentPos,nextPos);
    if ((currentPos > 0) && (code.charAt(currentPos - 1) == '\\')) {
      result.append(subcode);
      currentPos=nextPos;
      continue;
    }
    String macro=code.substring(currentPos + 1,openParenIndex);
    macro=macro.trim();
    String name=code.substring(openParenIndex + 1,closeParenIndex);
    name=processCode(name.trim());
    try {
      String replaceString=_replaceMacro(macro,name);
      if (_getMacroStartIndex(replaceString,0) >= 0) {
        processAgain=true;
      }
      result.append(replaceString);
    }
 catch (    Throwable throwable) {
      throw new IllegalActionException(this,throwable,"String_Node_Str" + name + "String_Node_Str"+ macro+ "String_Node_Str"+ code);
    }
    result.append(code.substring(closeParenIndex + 1,nextPos));
    currentPos=nextPos;
  }
  if (processAgain) {
    return processCode(result.toString());
  }
  return result.toString();
}