Program: 74144
Project: 74144
Buggy source:
protected void _loadAttributes(NamedObj model,File attributesPath,boolean force) throws IllegalActionException {
  Collection<NamedObj> children=new LinkedList<NamedObj>(GTTools.getChildren(model,true,true,true,true));
  for (  NamedObj child : children) {
    List<NaomiParameter> parameters=child.attributeList(NaomiParameter.class);
    for (    NaomiParameter parameter : parameters) {
      String attributeName=parameter.getAttributeName();
      if (!_inputAttributes.contains(attributeName)) {
        continue;
      }
      Tuple<String,String,Date,String,String> tuple=_loadAttribute(attributesPath,attributeName);
      String value=tuple.getV1();
      String resource=tuple.getV2();
      String protocol="String_Node_Str";
      if (resource.startsWith(protocol)) {
        resource=resource.substring(protocol.length());
      }
      Date date=tuple.getV3();
      String unit=tuple.getV4();
      String doc=tuple.getV5();
      if (!force) {
        Date attributeDate=parameter.getModifiedDate();
        if (!attributeDate.before(date)) {
          continue;
        }
      }
      System.out.println("String_Node_Str" + attributeName + "String_Node_Str"+ value);
      if (parameter instanceof CompositeNaomiAttribute) {
        CompositeNaomiAttribute compositeAttr=(CompositeNaomiAttribute)parameter;
        InputStreamReader reader=null;
        File resourceFile=new File(_root,resource);
        if (resourceFile.canRead()) {
          try {
            reader=new InputStreamReader(new FileInputStream(resourceFile));
            compositeAttr.loadCompositeAttribute(reader);
          }
 catch (          IOException e) {
            throw new IllegalActionException(null,e,"String_Node_Str");
          }
 finally {
            if (reader != null) {
              try {
                reader.close();
              }
 catch (              IOException e) {
                throw new IllegalActionException(null,e,"String_Node_Str");
              }
            }
          }
        }
 else {
          System.out.println("String_Node_Str" + resource + "String_Node_Str");
        }
      }
 else       if (child instanceof Variable) {
        String moml="String_Node_Str" + child.getName() + "String_Node_Str"+ value+ "String_Node_Str";
        MoMLChangeRequest request=new MoMLChangeRequest(this,child.getContainer(),moml);
        if (_undoable) {
          request.setUndoable(true);
          request.setMergeWithPreviousUndo(_mergeWithPrevious);
          _mergeWithPrevious=true;
        }
        request.execute();
      }
 else {
        throw new IllegalActionException("String_Node_Str" + "String_Node_Str" + child.getName() + "String_Node_Str");
      }
      String moml="String_Node_Str" + parameter.getName() + "String_Node_Str"+ NaomiParameter.formatExpression(parameter.getMethod(),parameter.getAttributeName(),date,unit,doc)+ "String_Node_Str";
      MoMLChangeRequest request=new MoMLChangeRequest(this,child,moml);
      if (_undoable) {
        request.setUndoable(true);
        request.setMergeWithPreviousUndo(_mergeWithPrevious);
        _mergeWithPrevious=true;
      }
      request.execute();
      break;
    }
    _loadAttributes(child,attributesPath,force);
  }
}

Fixed version (ground truth):
protected void _loadAttributes(NamedObj model,File attributesPath,boolean force) throws IllegalActionException {
  Collection<NamedObj> children=new LinkedList<NamedObj>(GTTools.getChildren(model,true,true,true,true));
  for (  NamedObj child : children) {
    List<NaomiParameter> parameters=child.attributeList(NaomiParameter.class);
    for (    NaomiParameter parameter : parameters) {
      String attributeName=parameter.getAttributeName();
      if (!_inputAttributes.contains(attributeName)) {
        continue;
      }
      Tuple<String,String,Date,String,String> tuple=_loadAttribute(attributesPath,attributeName);
      String value=tuple.getV1();
      String resource=tuple.getV2();
      String protocol="String_Node_Str";
      if (resource.startsWith(protocol)) {
        resource=resource.substring(protocol.length());
      }
      Date date=tuple.getV3();
      String unit=tuple.getV4();
      String doc=tuple.getV5();
      if (!force) {
        Date attributeDate=parameter.getModifiedDate();
        if (!attributeDate.before(date)) {
          continue;
        }
      }
      System.out.println("String_Node_Str" + attributeName + "String_Node_Str"+ value);
      if (parameter instanceof CompositeNaomiAttribute) {
        CompositeNaomiAttribute compositeAttr=(CompositeNaomiAttribute)parameter;
        InputStreamReader reader=null;
        File resourceFile=new File(_root,resource);
        if (resourceFile.canRead()) {
          try {
            reader=new InputStreamReader(new FileInputStream(resourceFile));
            compositeAttr.loadCompositeAttribute(reader);
          }
 catch (          IOException e) {
            throw new IllegalActionException(null,e,"String_Node_Str");
          }
 finally {
            if (reader != null) {
              try {
                reader.close();
              }
 catch (              IOException e) {
                throw new IllegalActionException(null,e,"String_Node_Str");
              }
            }
          }
        }
 else {
          System.out.println("String_Node_Str" + resource + "String_Node_Str");
        }
      }
 else       if (child instanceof Variable) {
        String moml="String_Node_Str" + child.getName() + "String_Node_Str"+ StringUtilities.escapeForXML(value)+ "String_Node_Str";
        MoMLChangeRequest request=new MoMLChangeRequest(this,child.getContainer(),moml);
        if (_undoable) {
          request.setUndoable(true);
          request.setMergeWithPreviousUndo(_mergeWithPrevious);
          _mergeWithPrevious=true;
        }
        request.execute();
      }
 else {
        throw new IllegalActionException("String_Node_Str" + "String_Node_Str" + child.getName() + "String_Node_Str");
      }
      String moml="String_Node_Str" + parameter.getName() + "String_Node_Str"+ NaomiParameter.formatExpression(parameter.getMethod(),parameter.getAttributeName(),date,unit,doc)+ "String_Node_Str";
      MoMLChangeRequest request=new MoMLChangeRequest(this,child,moml);
      if (_undoable) {
        request.setUndoable(true);
        request.setMergeWithPreviousUndo(_mergeWithPrevious);
        _mergeWithPrevious=true;
      }
      request.execute();
      break;
    }
    _loadAttributes(child,attributesPath,force);
  }
}