Program: 72504
Project: 72504
Buggy source:
@Override public void fire() throws IllegalActionException {
  super.fire();
  StringBuffer content=new StringBuffer("String_Node_Str");
  try {
    Parser htmlParser=Parser.htmlParser();
    htmlParser.setTrackErrors(1);
    BufferedReader reader=null;
    StringBuffer lineBuffer=new StringBuffer();
    try {
      reader=template.openForReading();
      String newlineValue=((StringToken)newline.getToken()).stringValue();
      while (true) {
        String line=reader.readLine();
        if (line == null) {
          break;
        }
        lineBuffer=lineBuffer.append(line);
        lineBuffer=lineBuffer.append(newlineValue);
      }
    }
 catch (    Throwable throwable) {
      throw new IllegalActionException(this,throwable,"String_Node_Str" + template.getValueAsString() + "String_Node_Str");
    }
 finally {
      if (template != null) {
        template.close();
      }
    }
    _document=htmlParser.parseInput(lineBuffer.toString(),"String_Node_Str");
    List<ParseError> errors=htmlParser.getErrors();
    if (errors != null && !errors.isEmpty()) {
      StringBuffer messages=new StringBuffer();
      for (      ParseError error : errors) {
        messages.append(error.toString());
      }
      throw new IllegalActionException(this,"String_Node_Str" + template.getValueAsString() + "String_Node_Str"+ messages);
    }
    _document.title(htmlTitle.stringValue().trim());
    List<TypedIOPort> portList=inputPortList();
    for (    TypedIOPort port : portList) {
      String id=port.getName();
      Elements elements=_document.select("String_Node_Str" + id);
      if (elements == null || elements.isEmpty()) {
        throw new IllegalActionException(this,"String_Node_Str" + id + "String_Node_Str");
      }
      if (elements.size() > 1) {
        throw new IllegalActionException(this,"String_Node_Str" + id + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
      }
      for (int i=port.getWidth() - 1; i >= 0; i--) {
        Token token=port.get(i);
        StringBuffer htmlText=new StringBuffer();
        if (token instanceof ArrayToken) {
          ArrayToken array=(ArrayToken)token;
          Token[] lines=array.arrayValue();
          for (          Token line : lines) {
            htmlText.append(((StringToken)line).stringValue() + "String_Node_Str");
          }
        }
 else {
          htmlText.append(((StringToken)token).stringValue() + "String_Node_Str");
        }
        String testFragment="String_Node_Str" + htmlText.toString() + "String_Node_Str";
        htmlParser.parseInput(testFragment,"String_Node_Str");
        errors=htmlParser.getErrors();
        if (errors != null && !errors.isEmpty()) {
          StringBuffer messages=new StringBuffer();
          for (          ParseError error : errors) {
            messages.append(error.toString());
          }
          throw new IllegalActionException(this,"String_Node_Str" + htmlText.toString() + "String_Node_Str"+ messages);
        }
        for (        Element element : elements) {
          element.html(htmlText.toString());
        }
      }
    }
    content=new StringBuffer(_document.html());
    if (content != null && content.length() > 0) {
      int startTagIndex=content.indexOf("String_Node_Str",0);
      int closeTagIndex=0;
      while (startTagIndex != -1) {
        closeTagIndex=content.indexOf("String_Node_Str",startTagIndex);
        content.deleteCharAt(closeTagIndex);
        startTagIndex=content.indexOf("String_Node_Str",startTagIndex + 1);
      }
    }
    output.broadcast(new StringToken(content.toString()));
    if (((BooleanToken)saveToFile.getToken()).booleanValue()) {
      outputFile.openForWriting().write(content.toString());
      outputFile.close();
    }
    template.close();
  }
 catch (  IOException e) {
    throw new IllegalActionException(this,e,"String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void fire() throws IllegalActionException {
  super.fire();
  StringBuffer content=new StringBuffer("String_Node_Str");
  try {
    Parser htmlParser=Parser.htmlParser();
    htmlParser.setTrackErrors(1);
    BufferedReader reader=null;
    StringBuffer lineBuffer=new StringBuffer();
    try {
      reader=template.openForReading();
      String newlineValue=((StringToken)newline.getToken()).stringValue();
      while (true) {
        String line=reader.readLine();
        if (line == null) {
          break;
        }
        lineBuffer=lineBuffer.append(line);
        lineBuffer=lineBuffer.append(newlineValue);
      }
    }
 catch (    Throwable throwable) {
      throw new IllegalActionException(this,throwable,"String_Node_Str" + template.getValueAsString() + "String_Node_Str");
    }
 finally {
      if (template != null) {
        template.close();
      }
    }
    _document=htmlParser.parseInput(lineBuffer.toString(),"String_Node_Str");
    List<ParseError> errors=htmlParser.getErrors();
    if (errors != null && !errors.isEmpty()) {
      StringBuffer messages=new StringBuffer();
      for (      ParseError error : errors) {
        messages.append(error.toString());
      }
      throw new IllegalActionException(this,"String_Node_Str" + template.getValueAsString() + "String_Node_Str"+ messages);
    }
    _document.title(htmlTitle.stringValue().trim());
    List<TypedIOPort> portList=inputPortList();
    for (    TypedIOPort port : portList) {
      String id=port.getName();
      Elements elements=_document.select("String_Node_Str" + id);
      if (elements == null || elements.isEmpty()) {
        throw new IllegalActionException(this,"String_Node_Str" + id + "String_Node_Str");
      }
      if (elements.size() > 1) {
        throw new IllegalActionException(this,"String_Node_Str" + id + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
      }
      for (int i=port.getWidth() - 1; i >= 0; i--) {
        Token token=port.get(i);
        StringBuffer htmlText=new StringBuffer();
        if (token instanceof ArrayToken) {
          ArrayToken array=(ArrayToken)token;
          Token[] lines=array.arrayValue();
          for (          Token line : lines) {
            htmlText.append(((StringToken)line).stringValue() + "String_Node_Str");
          }
        }
 else {
          htmlText.append(((StringToken)token).stringValue() + "String_Node_Str");
        }
        String testFragment="String_Node_Str" + htmlText.toString() + "String_Node_Str";
        htmlParser.parseInput(testFragment,"String_Node_Str");
        errors=htmlParser.getErrors();
        if (errors != null && !errors.isEmpty()) {
          StringBuffer messages=new StringBuffer();
          for (          ParseError error : errors) {
            messages.append(error.toString());
          }
          throw new IllegalActionException(this,"String_Node_Str" + htmlText.toString() + "String_Node_Str"+ messages);
        }
        for (        Element element : elements) {
          element.html(htmlText.toString());
        }
      }
    }
    content=new StringBuffer(_document.html());
    if (content != null && content.length() > 0) {
      int startTagIndex=content.indexOf("String_Node_Str",0);
      int closeTagIndex=0;
      while (startTagIndex != -1) {
        closeTagIndex=content.indexOf("String_Node_Str",startTagIndex);
        if (closeTagIndex != -1) {
          content.deleteCharAt(closeTagIndex);
        }
        startTagIndex=content.indexOf("String_Node_Str",startTagIndex + 1);
      }
    }
    output.broadcast(new StringToken(content.toString()));
    if (((BooleanToken)saveToFile.getToken()).booleanValue()) {
      outputFile.openForWriting().write(content.toString());
      outputFile.close();
    }
    template.close();
  }
 catch (  IOException e) {
    throw new IllegalActionException(this,e,"String_Node_Str");
  }
}