Program: 73759
Project: 73759
Buggy source:
private void _updateDisplayedModel() throws Exception {
  try {
    if (_modelToSave.getAttribute("String_Node_Str") == null) {
      Variable dbModel=new Variable(_modelToSave.workspace());
      dbModel.setContainer(_modelToSave);
      dbModel.setName("String_Node_Str");
    }
    ArrayList<DBAttribute> attributesList=new ArrayList();
    for (    Object a : _modelToSave.attributeList()) {
      if (a instanceof DBAttribute) {
        attributesList.add((DBAttribute)a);
      }
    }
    for (    DBAttribute attribute : attributesList) {
      attribute.setContainer(null);
    }
    Component[] componentArray1=_attListPanel.getComponents();
    for (int i=0; i < componentArray1.length; i++) {
      if (componentArray1[i] instanceof JPanel) {
        Component[] componentArray2=((JPanel)componentArray1[i]).getComponents();
        for (int j=0; j < componentArray2.length; j++) {
          if (componentArray2[j] instanceof ModelAttributePanel) {
            DBAttribute attributeToAdd=new DBAttribute(_modelToSave,((ModelAttributePanel)componentArray2[j]).getAttributeName());
            attributeToAdd.setExpression(((ModelAttributePanel)componentArray2[j]).getValue());
            attributeToAdd.setContainer(_modelToSave);
            SingletonAttribute sa=new SingletonAttribute(attributeToAdd.workspace());
            sa.setContainer(attributeToAdd);
            sa.setName("String_Node_Str");
            ValueIcon vi=new ValueIcon(attributeToAdd,"String_Node_Str");
            vi.setContainer(attributeToAdd);
            ColorAttribute ca=new ColorAttribute(vi,"String_Node_Str");
            ca.setContainer(vi);
            ca.setExpression("String_Node_Str");
            SingletonConfigurableAttribute sca=new SingletonConfigurableAttribute(attributeToAdd.workspace());
            sca.setContainer(attributeToAdd);
            sca.configure(null,attributeToAdd.getSource(),"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
            VisibleParameterEditorFactory vpef=new VisibleParameterEditorFactory(attributeToAdd,"String_Node_Str");
            vpef.setContainer(attributeToAdd);
            double[] xy={250,170};
            Location l=new Location(attributeToAdd,"String_Node_Str");
            l.setLocation(xy);
            try {
              MoMLChangeRequest change=new MoMLChangeRequest(this,null,_modelToSave.exportMoML());
              change.setUndoable(true);
              _modelToSave.requestChange(change);
            }
 catch (            Exception e) {
              throw e;
            }
          }
        }
      }
    }
  }
 catch (  NameDuplicationException exception) {
    throw exception;
  }
catch (  IllegalActionException exception) {
    throw exception;
  }
}

Fixed version (ground truth):
private void _updateDisplayedModel() throws Exception {
  try {
    if (_modelToSave.getAttribute("String_Node_Str") == null) {
      StringParameter dbModelParam=new StringParameter(_modelToSave,"String_Node_Str");
      dbModelParam.setExpression("String_Node_Str");
    }
    ArrayList<DBAttribute> attributesList=new ArrayList();
    for (    Object a : _modelToSave.attributeList()) {
      if (a instanceof DBAttribute) {
        attributesList.add((DBAttribute)a);
      }
    }
    for (    DBAttribute attribute : attributesList) {
      attribute.setContainer(null);
    }
    Component[] componentArray1=_attListPanel.getComponents();
    for (int i=0; i < componentArray1.length; i++) {
      if (componentArray1[i] instanceof JPanel) {
        Component[] componentArray2=((JPanel)componentArray1[i]).getComponents();
        for (int j=0; j < componentArray2.length; j++) {
          if (componentArray2[j] instanceof ModelAttributePanel) {
            DBAttribute attributeToAdd=new DBAttribute(_modelToSave,((ModelAttributePanel)componentArray2[j]).getAttributeName());
            attributeToAdd.setExpression(((ModelAttributePanel)componentArray2[j]).getValue());
            attributeToAdd.setContainer(_modelToSave);
            SingletonAttribute sa=new SingletonAttribute(attributeToAdd.workspace());
            sa.setContainer(attributeToAdd);
            sa.setName("String_Node_Str");
            ValueIcon vi=new ValueIcon(attributeToAdd,"String_Node_Str");
            vi.setContainer(attributeToAdd);
            ColorAttribute ca=new ColorAttribute(vi,"String_Node_Str");
            ca.setContainer(vi);
            ca.setExpression("String_Node_Str");
            SingletonConfigurableAttribute sca=new SingletonConfigurableAttribute(attributeToAdd.workspace());
            sca.setContainer(attributeToAdd);
            sca.configure(null,attributeToAdd.getSource(),"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
            VisibleParameterEditorFactory vpef=new VisibleParameterEditorFactory(attributeToAdd,"String_Node_Str");
            vpef.setContainer(attributeToAdd);
            double[] xy={250,170};
            Location l=new Location(attributeToAdd,"String_Node_Str");
            l.setLocation(xy);
            try {
              MoMLChangeRequest change=new MoMLChangeRequest(this,null,_modelToSave.exportMoML());
              change.setUndoable(true);
              _modelToSave.requestChange(change);
            }
 catch (            Exception e) {
              throw e;
            }
          }
        }
      }
    }
  }
 catch (  NameDuplicationException exception) {
    throw exception;
  }
catch (  IllegalActionException exception) {
    throw exception;
  }
}