Program: 72535
Project: 72535
Buggy source:
/** 
 * Callback to receive updated value of a HLA attribute from the whole Federation (delivered by the RTI (CERTI)).
 */
@Override public void reflectAttributeValues(int theObject,ReflectedAttributes theAttributes,byte[] userSuppliedTag,LogicalTime theTime,EventRetractionHandle retractionHandle) throws ObjectNotKnown, AttributeNotKnown, FederateOwnsAttributes, InvalidFederationTime, FederateInternalError {
  try {
    int classHandle=_objectIdToClassHandle.get(theObject);
    for (int i=0; i < theAttributes.size(); i++) {
      Iterator<Entry<String,Object[]>> ot=_hlaAttributesSubscribedTo.entrySet().iterator();
      while (ot.hasNext()) {
        Map.Entry<String,Object[]> elt=ot.next();
        Object[] tObj=elt.getValue();
        Time ts=null;
        TimedEvent te=null;
        Object value=null;
        if (theAttributes.getAttributeHandle(i) == _getAttributeHandleFromTab(tObj) && _getClassHandleFromTab(tObj) == classHandle) {
          try {
            HlaSubscriber hs=(HlaSubscriber)_getPortFromTab(tObj).getContainer();
            if (_getTypeFromTab(tObj) instanceof RecordType) {
              HlaPtidesEvent hpe=new HlaPtidesEvent(theAttributes.getValue(i));
              ts=new Time(_director,((CertiLogicalTime)theTime).getTime());
              te=new TimedEvent(ts,new Object[]{(RecordType)_getTypeFromTab(tObj),MessageProcessing.decodeHlaValue(hs,(RecordType)_getTypeFromTab(tObj),hpe.getValue()),ts.getDoubleValue(),hpe.getMicroStep(),hpe.getSourceTime()});
            }
 else {
              ts=new Time(_director,((CertiLogicalTime)theTime).getTime());
              value=MessageProcessing.decodeHlaValue(hs,(BaseType)_getTypeFromTab(tObj),theAttributes.getValue(i));
              te=new OriginatedEvent(ts,new Object[]{(BaseType)_getTypeFromTab(tObj),value},theObject);
            }
          }
 catch (          IllegalActionException e) {
            e.printStackTrace();
          }
          HlaSubscriber hs=(HlaSubscriber)(_getPortFromTab(tObj)).getContainer();
          _fromFederationEvents.get(hs.getIdentity()).add(te);
          if (_debugging) {
            _debug(getDisplayName() + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ hs.getParameterName()+ "String_Node_Str"+ te.timeStamp+ "String_Node_Str"+ value.toString()+ "String_Node_Str"+ hs.getDisplayName());
          }
        }
      }
    }
  }
 catch (  ArrayIndexOutOfBounds e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * Callback to receive updated value of a HLA attribute from the whole Federation (delivered by the RTI (CERTI)).
 */
@Override public void reflectAttributeValues(int theObject,ReflectedAttributes theAttributes,byte[] userSuppliedTag,LogicalTime theTime,EventRetractionHandle retractionHandle) throws ObjectNotKnown, AttributeNotKnown, FederateOwnsAttributes, InvalidFederationTime, FederateInternalError {
  try {
    int classHandle=_objectIdToClassHandle.get(theObject);
    for (int i=0; i < theAttributes.size(); i++) {
      Iterator<Entry<String,Object[]>> ot=_hlaAttributesSubscribedTo.entrySet().iterator();
      while (ot.hasNext()) {
        Map.Entry<String,Object[]> elt=ot.next();
        Object[] tObj=elt.getValue();
        Time ts=null;
        TimedEvent te=null;
        Object value=null;
        if (theAttributes.getAttributeHandle(i) == _getAttributeHandleFromTab(tObj) && _getClassHandleFromTab(tObj) == classHandle) {
          try {
            HlaSubscriber hs=(HlaSubscriber)_getPortFromTab(tObj).getContainer();
            if (_getTypeFromTab(tObj) instanceof RecordType) {
              HlaPtidesEvent hpe=new HlaPtidesEvent(theAttributes.getValue(i));
              ts=new Time(_director,((CertiLogicalTime)theTime).getTime());
              te=new TimedEvent(ts,new Object[]{(RecordType)_getTypeFromTab(tObj),MessageProcessing.decodeHlaValue(hs,(RecordType)_getTypeFromTab(tObj),hpe.getValue()),ts.getDoubleValue(),hpe.getMicroStep(),hpe.getSourceTime()});
            }
 else {
              ts=new Time(_director,((CertiLogicalTime)theTime).getTime());
              value=MessageProcessing.decodeHlaValue(hs,(BaseType)_getTypeFromTab(tObj),theAttributes.getValue(i));
              te=new OriginatedEvent(ts,new Object[]{(BaseType)_getTypeFromTab(tObj),value},theObject);
            }
            _fromFederationEvents.get(hs.getIdentity()).add(te);
            if (_debugging) {
              _debug(getDisplayName() + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ hs.getParameterName()+ "String_Node_Str"+ te.timeStamp+ "String_Node_Str"+ value.toString()+ "String_Node_Str"+ hs.getDisplayName());
            }
          }
 catch (          IllegalActionException e) {
            e.printStackTrace();
          }
        }
      }
    }
  }
 catch (  ArrayIndexOutOfBounds e) {
    e.printStackTrace();
  }
}