Program: 72766
Project: 72766
Buggy source:
/** 
 * Construct a frame to control code generation for the specified Ptolemy II model. After constructing this, it is necessary to call setVisible(true) to make the frame appear. This is typically accomplished by calling show() on enclosing tableau.
 * @param modelConverter The modelConverter to put in this frame,or null if none.
 * @param tableau The tableau responsible for this frame.
 * @exception IllegalActionException If the model rejects theconfiguration attribute.
 * @exception NameDuplicationException If a name collision occurs.
 * @deprecated ptolemy.de.lib.TimedDelay is deprecated, use ptolemy.actor.lib.TimeDelay.
 */
public MathematicalModelConverterGUI(final MathematicalModelConverter modelConverter,Tableau tableau) throws IllegalActionException, NameDuplicationException {
  super(modelConverter,tableau);
  setTitle(modelConverter.getName());
  JPanel caveatsPanel=new JPanel();
  caveatsPanel.setBorder(BorderFactory.createEmptyBorder(5,0,0,0));
  caveatsPanel.setLayout(new BoxLayout(caveatsPanel,BoxLayout.X_AXIS));
  JTextArea messageArea=new JTextArea("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str",2,10);
  messageArea.setEditable(false);
  messageArea.setBorder(BorderFactory.createEtchedBorder());
  messageArea.setLineWrap(true);
  messageArea.setWrapStyleWord(true);
  caveatsPanel.add(messageArea);
  JPanel left=new JPanel();
  left.setSize(500,400);
  left.setLayout(new BoxLayout(left,BoxLayout.Y_AXIS));
  caveatsPanel.setMaximumSize(new Dimension(500,100));
  left.add(caveatsPanel);
  JPanel buttonPanel=new JPanel();
  JButton goButton=new JButton("String_Node_Str");
  goButton.setToolTipText("String_Node_Str");
  buttonPanel.add(goButton,BorderLayout.CENTER);
  JButton clearButton=new JButton("String_Node_Str");
  clearButton.setToolTipText("String_Node_Str");
  buttonPanel.add(clearButton);
  JButton moreInfoButton=new JButton("String_Node_Str");
  moreInfoButton.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent evt){
      try {
        Configuration configuration=getConfiguration();
        URL infoURL=Thread.currentThread().getContextClassLoader().getResource("String_Node_Str");
        if (configuration != null) {
          configuration.openModel(null,infoURL,infoURL.toExternalForm());
        }
      }
 catch (      Exception ex) {
        throw new InternalErrorException(modelConverter,ex,"String_Node_Str");
      }
    }
  }
);
  buttonPanel.add(moreInfoButton);
  buttonPanel.setMaximumSize(new Dimension(500,50));
  left.add(buttonPanel);
  JPanel queryPanel=new JPanel();
  _query=new PtolemyQuery(modelConverter);
  _query.setInsets(new Insets(2,0,2,0));
  _query.setTextWidth(25);
  queryPanel.add(EditorPaneFactory.createEditorPane(modelConverter,_query));
  JScrollPane scrollPane=new JScrollPane(queryPanel);
  left.add(scrollPane,BorderLayout.CENTER);
  final JTextAreaExec exec=new JTextAreaExec("String_Node_Str",false);
  JSplitPane splitPane=new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,left,exec);
  splitPane.setOneTouchExpandable(true);
  Dimension preferred=left.getPreferredSize();
  splitPane.setDividerLocation(preferred.width + 20);
  getContentPane().add(splitPane,BorderLayout.CENTER);
  clearButton.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent evt){
      exec.clear();
    }
  }
);
  goButton.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent evt){
      try {
        ModelType modelType=(ModelType)modelConverter.modelType.getChosenValue();
        File file=modelConverter.target.asFile();
        exec.updateStatusBar("String_Node_Str" + modelConverter + "String_Node_Str");
        String inputTemporalFormula=modelConverter.formula.getExpression();
        FormulaType formulaType=(FormulaType)modelConverter.formulaType.getChosenValue();
        int span=((IntToken)modelConverter.span.getToken()).intValue();
        OutputType outputType=(OutputType)modelConverter.outputType.getChosenValue();
        int bufferSize=((IntToken)modelConverter.buffer.getToken()).intValue();
        if (formulaType == FormulaType.Risk || formulaType == FormulaType.Reachability) {
          inputTemporalFormula=modelConverter.generateGraphicalSpec(formulaType);
          formulaType=FormulaType.CTL;
        }
        StringBuffer code=new StringBuffer("String_Node_Str");
        try {
          code.append(modelConverter.generateFile(file,modelType,inputTemporalFormula,formulaType,span,outputType,bufferSize));
        }
 catch (        Exception e) {
          MessageHandler.error("String_Node_Str" + "String_Node_Str",e);
          return;
        }
        File codeFileNameWritten=modelConverter.getCodeFile();
        if (codeFileNameWritten != null) {
          Configuration configuration=getConfiguration();
          URL codeURL=codeFileNameWritten.toURI().toURL();
          if (configuration != null) {
            configuration.openModel(null,codeURL,codeURL.toExternalForm());
          }
        }
        exec.updateStatusBar(code.toString());
        exec.updateStatusBar("String_Node_Str" + "String_Node_Str");
      }
 catch (      Exception ex) {
        MessageHandler.error("String_Node_Str",ex);
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Construct a frame to control code generation for the specified Ptolemy II model. After constructing this, it is necessary to call setVisible(true) to make the frame appear. This is typically accomplished by calling show() on enclosing tableau.
 * @param modelConverter The modelConverter to put in this frame,or null if none.
 * @param tableau The tableau responsible for this frame.
 * @exception IllegalActionException If the model rejects theconfiguration attribute.
 * @exception NameDuplicationException If a name collision occurs.
 * @deprecated ptolemy.de.lib.TimedDelay is deprecated, use ptolemy.actor.lib.TimeDelay.
 */
public MathematicalModelConverterGUI(final MathematicalModelConverter modelConverter,Tableau tableau) throws IllegalActionException, NameDuplicationException {
  super(modelConverter,tableau);
  setTitle(modelConverter.getName());
  JPanel caveatsPanel=new JPanel();
  caveatsPanel.setBorder(BorderFactory.createEmptyBorder(5,0,0,0));
  caveatsPanel.setLayout(new BoxLayout(caveatsPanel,BoxLayout.X_AXIS));
  JTextArea messageArea=new JTextArea("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str",2,10);
  messageArea.setEditable(false);
  messageArea.setBorder(BorderFactory.createEtchedBorder());
  messageArea.setLineWrap(true);
  messageArea.setWrapStyleWord(true);
  caveatsPanel.add(messageArea);
  JPanel upper=new JPanel();
  upper.setLayout(new BoxLayout(upper,BoxLayout.Y_AXIS));
  caveatsPanel.setMaximumSize(new Dimension(500,100));
  upper.add(caveatsPanel);
  JPanel buttonPanel=new JPanel();
  buttonPanel.setLayout(new GridLayout(1,3));
  JButton goButton=new JButton("String_Node_Str");
  goButton.setToolTipText("String_Node_Str");
  buttonPanel.add(goButton,BorderLayout.CENTER);
  JButton clearButton=new JButton("String_Node_Str");
  clearButton.setToolTipText("String_Node_Str");
  buttonPanel.add(clearButton);
  JButton moreInfoButton=new JButton("String_Node_Str");
  moreInfoButton.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent evt){
      try {
        Configuration configuration=getConfiguration();
        URL infoURL=Thread.currentThread().getContextClassLoader().getResource("String_Node_Str");
        if (configuration != null) {
          configuration.openModel(null,infoURL,infoURL.toExternalForm());
        }
      }
 catch (      Exception ex) {
        throw new InternalErrorException(modelConverter,ex,"String_Node_Str");
      }
    }
  }
);
  buttonPanel.add(moreInfoButton);
  buttonPanel.setMaximumSize(new Dimension(500,50));
  upper.add(buttonPanel);
  Configurer configurer=new Configurer(modelConverter);
  JPanel controlPanel=new JPanel();
  controlPanel.add(configurer);
  JScrollPane scrollPane=new JScrollPane(controlPanel);
  upper.add(scrollPane,BorderLayout.CENTER);
  final JTextAreaExec exec=new JTextAreaExec("String_Node_Str",false);
  exec.setPreferredSize(new Dimension(500,300));
  JSplitPane splitPane=new JSplitPane(JSplitPane.VERTICAL_SPLIT,upper,exec);
  splitPane.setOneTouchExpandable(true);
  Dimension preferred=upper.getPreferredSize();
  splitPane.setDividerLocation(preferred.height + 20);
  getContentPane().add(splitPane,BorderLayout.CENTER);
  clearButton.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent evt){
      exec.clear();
    }
  }
);
  goButton.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent evt){
      try {
        ModelType modelType=(ModelType)modelConverter.modelType.getChosenValue();
        File file=modelConverter.target.asFile();
        exec.stdout("String_Node_Str" + file);
        exec.updateStatusBar("String_Node_Str" + modelConverter + "String_Node_Str");
        String inputTemporalFormula=modelConverter.formula.getExpression();
        FormulaType formulaType=(FormulaType)modelConverter.formulaType.getChosenValue();
        int span=((IntToken)modelConverter.span.getToken()).intValue();
        OutputType outputType=(OutputType)modelConverter.outputType.getChosenValue();
        int bufferSize=((IntToken)modelConverter.buffer.getToken()).intValue();
        if (formulaType == FormulaType.Risk || formulaType == FormulaType.Reachability) {
          inputTemporalFormula=modelConverter.generateGraphicalSpec(formulaType);
          formulaType=FormulaType.CTL;
        }
        StringBuffer code=new StringBuffer("String_Node_Str");
        try {
          code.append(modelConverter.generateFile(file,modelType,inputTemporalFormula,formulaType,span,outputType,bufferSize));
        }
 catch (        Exception e) {
          MessageHandler.error("String_Node_Str" + "String_Node_Str",e);
          return;
        }
        File codeFileNameWritten=modelConverter.getCodeFile();
        if (codeFileNameWritten != null) {
          Configuration configuration=getConfiguration();
          URL codeURL=codeFileNameWritten.toURI().toURL();
          if (configuration != null) {
            configuration.openModel(null,codeURL,codeURL.toExternalForm());
          }
        }
        exec.updateStatusBar(code.toString());
        exec.updateStatusBar("String_Node_Str" + "String_Node_Str");
      }
 catch (      Exception ex) {
        MessageHandler.error("String_Node_Str",ex);
      }
    }
  }
);
}