Program: 72762
Project: 72762
Buggy source:
/** 
 * Hide annotation names. If the attributeName is "name" and attributeValue ends with "annotation", then <pre> &lt;property name="_hideName" class="ptolemy.data.expr.SingletonParameter" value="true"&gt; &lt;/property&gt; </pre> is added if it is not yet present.
 * @param container  The container for this attribute.in this method.
 * @param element The XML element name.
 * @param attributeName The name of the attribute.
 * @param attributeValue The value of the attribute.
 * @param xmlFile The file currently being parsed.
 * @return the value of the attributeValue argument.
 */
public String filterAttributeValue(NamedObj container,String element,String attributeName,String attributeValue,String xmlFile){
  if (attributeValue == null) {
    return null;
  }
  if (attributeName.equals("String_Node_Str")) {
    if (attributeValue.endsWith("String_Node_Str")) {
      _currentlyProcessingAnnotation=true;
      _currentAnnotationFullName=container.getFullName() + "String_Node_Str" + attributeValue;
    }
 else     if (_currentlyProcessingAnnotation && attributeValue.equals("String_Node_Str")) {
      _currentlyProcessingAnnotation=false;
      _currentAnnotationFullName=null;
    }
  }
  if (_currentlyProcessingAnnotation && container != null && !container.getFullName().equals(_currentAnnotationFullName) && (_currentAnnotationFullName == null && (!_currentAnnotationFullName.startsWith(container.getFullName()) && !container.getFullName().startsWith(_currentAnnotationFullName)))) {
    _currentlyProcessingAnnotation=false;
    _currentAnnotationFullName=null;
  }
  return attributeValue;
}

Fixed version (ground truth):
/** 
 * Hide annotation names. If the attributeName is "name" and attributeValue ends with "annotation", then <pre> &lt;property name="_hideName" class="ptolemy.data.expr.SingletonParameter" value="true"&gt; &lt;/property&gt; </pre> is added if it is not yet present.
 * @param container  The container for this attribute.in this method.
 * @param element The XML element name.
 * @param attributeName The name of the attribute.
 * @param attributeValue The value of the attribute.
 * @param xmlFile The file currently being parsed.
 * @return the value of the attributeValue argument.
 */
public String filterAttributeValue(NamedObj container,String element,String attributeName,String attributeValue,String xmlFile){
  if (attributeValue == null) {
    return null;
  }
  if (attributeName.equals("String_Node_Str")) {
    if (attributeValue.endsWith("String_Node_Str")) {
      _currentlyProcessingAnnotation=true;
      _currentAnnotationFullName=container.getFullName() + "String_Node_Str" + attributeValue;
    }
 else     if (_currentlyProcessingAnnotation && attributeValue.equals("String_Node_Str")) {
      _currentlyProcessingAnnotation=false;
      _currentAnnotationFullName=null;
    }
  }
  if (_currentlyProcessingAnnotation) {
    if (container != null) {
      if (!container.getFullName().equals(_currentAnnotationFullName)) {
        if (_currentAnnotationFullName == null || (!_currentAnnotationFullName.startsWith(container.getFullName()) && !container.getFullName().startsWith(_currentAnnotationFullName))) {
          _currentlyProcessingAnnotation=false;
          _currentAnnotationFullName=null;
        }
      }
    }
  }
  return attributeValue;
}