Program: 73363
Project: 73363
Buggy source:
/** 
 * Make modifications to the specified container, which is defined in a MoML element with the specified name. This method is called when an end element in MoML is encountered. A typical use of this method is to make some modification to the object (the container) that was constructed. <p> If an implementor makes changes to the specified container, then it should call MoMLParser.setModified(true) which indicates that the model was modified so that the user can optionally save the modified model.
 * @param container The object defined by the element that thisis the end of.
 * @param elementName The element name.
 * @param currentCharData The character data, which appearsonly in the doc and configure elements
 * @param xmlFile The file currently being parsed.
 * @exception Exception If there is a problem modifying thespecified container.
 */
public void filterEndElement(NamedObj container,String elementName,StringBuffer currentCharData,String xmlFile) throws Exception {
  if (container instanceof VersionAttribute) {
    VersionAttribute version=(VersionAttribute)container;
    try {
      if (xmlFile != null) {
        _changesNeededForXmlFile.put(xmlFile,version != null && version.isLessThan(new VersionAttribute("String_Node_Str")));
      }
    }
 catch (    IllegalActionException e) {
      throw new IllegalStateException(e);
    }
  }
 else   if (container instanceof IORelation) {
    if (_currentlyProcessingRelation && !_currentlyProcessingWidth) {
      if (_changedNeeded(container,xmlFile)) {
        IORelation relation=(IORelation)container;
        relation.setWidth(1);
        relation.width.propagateValue();
        MoMLParser.setModified(true);
      }
    }
    _currentlyProcessingRelation=false;
    _currentlyProcessingWidth=false;
  }
}

Fixed version (ground truth):
/** 
 * Make modifications to the specified container, which is defined in a MoML element with the specified name. This method is called when an end element in MoML is encountered. A typical use of this method is to make some modification to the object (the container) that was constructed. <p> If an implementor makes changes to the specified container, then it should call MoMLParser.setModified(true) which indicates that the model was modified so that the user can optionally save the modified model.
 * @param container The object defined by the element that thisis the end of.
 * @param elementName The element name.
 * @param currentCharData The character data, which appearsonly in the doc and configure elements
 * @param xmlFile The file currently being parsed.
 * @exception Exception If there is a problem modifying thespecified container.
 */
public void filterEndElement(NamedObj container,String elementName,StringBuffer currentCharData,String xmlFile) throws Exception {
  if (container instanceof VersionAttribute) {
    VersionAttribute version=(VersionAttribute)container;
    try {
      if (xmlFile != null) {
        _changesNeededForXmlFile.put(xmlFile,version.isLessThan(new VersionAttribute("String_Node_Str")));
      }
    }
 catch (    IllegalActionException e) {
      throw new IllegalStateException(e);
    }
  }
 else   if (container instanceof IORelation) {
    if (_currentlyProcessingRelation && !_currentlyProcessingWidth) {
      if (_changedNeeded(container,xmlFile)) {
        IORelation relation=(IORelation)container;
        relation.setWidth(1);
        relation.width.propagateValue();
        MoMLParser.setModified(true);
      }
    }
    _currentlyProcessingRelation=false;
    _currentlyProcessingWidth=false;
  }
}