Program: 97616
Project: 97616
Buggy source:
@Override public synchronized boolean startRecording(RecordCommand cmd) throws RemoteException {
  if (terminated) {
    throw new IllegalStateException("String_Node_Str");
  }
  String user;
  try {
    user=cmd.getClient().getTestSessionKey().getUser().getName();
  }
 catch (  Exception ex) {
    OseeLog.log(MessageSystemTestEnvironment.class,Level.WARNING,"String_Node_Str",ex);
    user="String_Node_Str";
  }
  try {
    LinkedList<MessageRecordConfig> msgsToRecord=new LinkedList<MessageRecordConfig>();
    for (    MessageRecordDetails details : cmd.getMsgsToRecord()) {
      String name=details.getName();
      final Class<?> msgClass=Activator.getTestEnvironment().getRuntimeManager().loadFromRuntimeLibraryLoader(name);
      Message<?,?,?> reader=messageRequestor.getMessageReader(msgClass);
      if (reader == null) {
        throw new RemoteException("String_Node_Str" + name);
      }
      DataType type=details.getType();
      List<List<Object>> elementNames=details.getBodyElementNames();
      ArrayList<Element> elementsToRecord=new ArrayList<Element>(elementNames.size());
      for (      List<Object> elementName : elementNames) {
        final Element element=reader.getElement(elementName,type);
        if (element == null) {
        }
 else {
          if (!element.isNonMappingElement()) {
            elementsToRecord.add(element);
          }
        }
      }
      List<List<Object>> headerElementNames=details.getHeaderElementNames();
      ArrayList<Element> headerElementsToRecord=new ArrayList<Element>(headerElementNames.size());
      Element[] headerElements=reader.getActiveDataSource(type).getMsgHeader().getElements();
      if (headerElements != null) {
        for (        List<Object> elementName : headerElementNames) {
          Element element=reader.getElement(elementName);
          if (element != null) {
            headerElementsToRecord.add(element);
          }
        }
      }
      MessageRecordConfig config=new MessageRecordConfig(reader,type,details.getHeaderDump(),headerElementsToRecord.toArray(new Element[headerElementsToRecord.size()]),details.getBodyDump(),elementsToRecord.toArray(new Element[elementsToRecord.size()]));
      msgsToRecord.add(config);
    }
    recorderOutputChannel.connect(cmd.getDestAddress());
    recorder.startRecording(msgsToRecord,recorderOutputChannel);
    OseeLog.log(MessageSystemTestEnvironment.class,Level.INFO,"String_Node_Str" + user + "String_Node_Str"+ cmd.getDestAddress().toString());
    return true;
  }
 catch (  Throwable ex) {
    OseeLog.log(MessageSystemTestEnvironment.class,Level.INFO,"String_Node_Str" + user,ex);
    throw new RemoteException("String_Node_Str",ex);
  }
}

Fixed version (ground truth):
@Override public synchronized boolean startRecording(RecordCommand cmd) throws RemoteException {
  if (terminated) {
    throw new IllegalStateException("String_Node_Str");
  }
  String user;
  try {
    user=cmd.getClient().getTestSessionKey().getUser().getName();
  }
 catch (  Exception ex) {
    OseeLog.log(MessageSystemTestEnvironment.class,Level.WARNING,"String_Node_Str",ex);
    user="String_Node_Str";
  }
  try {
    LinkedList<MessageRecordConfig> msgsToRecord=new LinkedList<MessageRecordConfig>();
    for (    MessageRecordDetails details : cmd.getMsgsToRecord()) {
      String name=details.getName();
      final Class<?> msgClass=Activator.getTestEnvironment().getRuntimeManager().loadFromRuntimeLibraryLoader(name);
      Message<?,?,?> reader=messageRequestor.getMessageReader(msgClass);
      if (reader == null) {
        throw new RemoteException("String_Node_Str" + name);
      }
      DataType type=details.getType();
      List<List<Object>> elementNames=details.getBodyElementNames();
      ArrayList<Element> elementsToRecord=new ArrayList<Element>(elementNames.size());
      for (      List<Object> elementName : elementNames) {
        final Element element=reader.getElement(elementName,type);
        if (element == null) {
        }
 else {
          if (!element.isNonMappingElement()) {
            elementsToRecord.add(element);
          }
        }
      }
      List<List<Object>> headerElementNames=details.getHeaderElementNames();
      ArrayList<Element> headerElementsToRecord=new ArrayList<Element>(headerElementNames.size());
      Element[] headerElements=reader.getActiveDataSource(type).getMsgHeader().getElements();
      if (headerElements != null) {
        for (        List<Object> elementName : headerElementNames) {
          Element element=reader.getElement(elementName);
          if (element != null) {
            headerElementsToRecord.add(element);
          }
        }
      }
      MessageRecordConfig config=new MessageRecordConfig(reader,type,details.getHeaderDump(),headerElementsToRecord.toArray(new Element[headerElementsToRecord.size()]),details.getBodyDump(),elementsToRecord.toArray(new Element[elementsToRecord.size()]));
      msgsToRecord.add(config);
    }
    setupRecorderOutputChannel();
    recorderOutputChannel.connect(cmd.getDestAddress());
    recorder.startRecording(msgsToRecord,recorderOutputChannel);
    OseeLog.log(MessageSystemTestEnvironment.class,Level.INFO,"String_Node_Str" + user + "String_Node_Str"+ cmd.getDestAddress().toString());
    return true;
  }
 catch (  Throwable ex) {
    OseeLog.log(MessageSystemTestEnvironment.class,Level.INFO,"String_Node_Str" + user,ex);
    throw new RemoteException("String_Node_Str",ex);
  }
}