Program: 73712
Project: 73712
Buggy source:
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");
      dbModelParam.setContainer(_modelToSave);
    }
    if (_modelToSave.getAttribute("String_Node_Str") == null) {
      StringParameter dbModelParam=new StringParameter(_modelToSave,"String_Node_Str");
      dbModelParam.setExpression(_modelToSave.getName());
      dbModelParam.setContainer(_modelToSave);
    }
 else {
      ((StringParameter)_modelToSave.getAttribute("String_Node_Str")).setExpression(_modelToSave.getName());
    }
    if (_modelToSave.getAttribute("String_Node_Str") == null) {
      java.util.Date time=new java.util.Date();
      StringParameter dbModelParam=new StringParameter(_modelToSave,"String_Node_Str");
      dbModelParam.setExpression(_modelToSave.getName() + "String_Node_Str" + String.valueOf(time.getTime()));
      dbModelParam.setContainer(_modelToSave);
    }
    ArrayList<StringParameter> attributesList=new ArrayList();
    for (    Object a : _modelToSave.attributeList()) {
      if (a instanceof StringParameter) {
        attributesList.add((StringParameter)a);
      }
    }
    for (    StringParameter attribute : attributesList) {
      if (attribute.getName() != "String_Node_Str" && attribute.getName() != "String_Node_Str" && attribute.getName() != "String_Node_Str" && _attributesListPanel.isDBAttribute(attribute.getName())) {
        attribute.setContainer(null);
      }
    }
    for (    Attribute attributeToAdd : _attributesListPanel.getAttributes()) {
      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");
      dbModelParam.setContainer(_modelToSave);
    }
    ArrayList<StringParameter> attributesList=new ArrayList();
    for (    Object a : _modelToSave.attributeList()) {
      if (a instanceof StringParameter) {
        attributesList.add((StringParameter)a);
      }
    }
    for (    StringParameter attribute : attributesList) {
      if (attribute.getName() != "String_Node_Str" && attribute.getName() != "String_Node_Str" && _attributesListPanel.isDBAttribute(attribute.getName())) {
        attribute.setContainer(null);
      }
    }
    for (    Attribute attributeToAdd : _attributesListPanel.getAttributes()) {
      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;
  }
}