Program: 34534
Project: 34534
Buggy source:
public LogTraceData parse(RoutedMessage routedMessage,LogRecord logRecord){
  LogTraceData logData=new LogTraceData();
  long dateVal=logRecord.getMillis();
  logData.setDatetime(dateVal);
  String messageIdVal=null;
  String messageVal=extractMessage(routedMessage,logRecord);
  logData.setMessage(messageVal);
  if (messageVal != null) {
    messageIdVal=parseMessageId(messageVal);
  }
  logData.setMessageId(messageIdVal);
  int threadIdVal=(int)Thread.currentThread().getId();
  logData.setThreadId(threadIdVal);
  logData.setModule(logRecord.getLoggerName());
  logData.setSeverity(LogFormatUtils.mapLevelToType(logRecord));
  logData.setLoglevel(LogFormatUtils.mapLevelToRawType(logRecord));
  logData.setMethodName(logRecord.getSourceMethodName());
  logData.setClassName(logRecord.getSourceClassName());
  logData.setLevelValue(logRecord.getLevel().intValue());
  String threadName=Thread.currentThread().getName();
  logData.setThreadName(threadName);
  WsLogRecord wsLogRecord=getWsLogRecord(logRecord);
  KeyValuePairList extensions=null;
  if (wsLogRecord != null) {
    logData.setCorrelationId(wsLogRecord.getCorrelationId());
    logData.setOrg(wsLogRecord.getOrganization());
    logData.setProduct(wsLogRecord.getProduct());
    logData.setComponent(wsLogRecord.getComponent());
    if (wsLogRecord.getExtensions() != null) {
      extensions=new KeyValuePairList(LogFieldConstants.EXTENSIONS_KVPL);
      Map<String,String> extMap=wsLogRecord.getExtensions();
      for (      Map.Entry<String,String> entry : extMap.entrySet()) {
        CollectorJsonHelpers.handleExtensions(extensions,entry.getKey(),entry.getValue());
      }
    }
  }
 else {
    logData.setCorrelationId(null);
    logData.setOrg(null);
    logData.setProduct(null);
    logData.setComponent(null);
    extensions=null;
  }
  logData.setSequence(sequenceNumber.next(dateVal));
  Throwable thrown=logRecord.getThrown();
  if (thrown != null) {
    String stackTrace=DataFormatHelper.throwableToString(thrown);
    logData.setThrowable(stackTrace);
    String s=thrown.getLocalizedMessage();
    if (s == null) {
      s=thrown.toString();
    }
    logData.setThrowableLocalized(s);
  }
 else {
    logData.setThrowable(null);
    logData.setThrowableLocalized(null);
  }
  if (routedMessage.getFormattedMsg() != null) {
    logData.setFormattedMsg(routedMessage.getFormattedMsg());
  }
 else {
    logData.setFormattedMsg(null);
  }
  logData.setExtensions(extensions);
  logData.setSourceType(sourceName);
  return logData;
}

Fixed version (ground truth):
public LogTraceData parse(RoutedMessage routedMessage,LogRecord logRecord){
  LogTraceData logData=new LogTraceData();
  long dateVal=logRecord.getMillis();
  logData.setDatetime(dateVal);
  String messageIdVal=null;
  String messageVal=extractMessage(routedMessage,logRecord);
  if (messageVal != null) {
    messageIdVal=parseMessageId(messageVal);
  }
  logData.setMessageId(messageIdVal);
  int threadIdVal=(int)Thread.currentThread().getId();
  logData.setThreadId(threadIdVal);
  logData.setModule(logRecord.getLoggerName());
  logData.setSeverity(LogFormatUtils.mapLevelToType(logRecord));
  logData.setLoglevel(LogFormatUtils.mapLevelToRawType(logRecord));
  logData.setMethodName(logRecord.getSourceMethodName());
  logData.setClassName(logRecord.getSourceClassName());
  logData.setLevelValue(logRecord.getLevel().intValue());
  String threadName=Thread.currentThread().getName();
  logData.setThreadName(threadName);
  WsLogRecord wsLogRecord=getWsLogRecord(logRecord);
  KeyValuePairList extensions=null;
  if (wsLogRecord != null) {
    logData.setCorrelationId(wsLogRecord.getCorrelationId());
    logData.setOrg(wsLogRecord.getOrganization());
    logData.setProduct(wsLogRecord.getProduct());
    logData.setComponent(wsLogRecord.getComponent());
    if (wsLogRecord.getExtensions() != null) {
      extensions=new KeyValuePairList(LogFieldConstants.EXTENSIONS_KVPL);
      Map<String,String> extMap=wsLogRecord.getExtensions();
      for (      Map.Entry<String,String> entry : extMap.entrySet()) {
        CollectorJsonHelpers.handleExtensions(extensions,entry.getKey(),entry.getValue());
      }
    }
  }
 else {
    logData.setCorrelationId(null);
    logData.setOrg(null);
    logData.setProduct(null);
    logData.setComponent(null);
    extensions=null;
  }
  logData.setSequence(sequenceNumber.next(dateVal));
  Throwable thrown=logRecord.getThrown();
  if (thrown != null) {
    String stackTrace=DataFormatHelper.throwableToString(thrown);
    logData.setThrowable(stackTrace);
    String s=thrown.getLocalizedMessage();
    if (s == null) {
      s=thrown.toString();
    }
    logData.setThrowableLocalized(s);
  }
 else {
    logData.setThrowable(null);
    logData.setThrowableLocalized(null);
  }
  logData.setMessage(messageVal);
  if (routedMessage.getFormattedMsg() != null) {
    logData.setFormattedMsg(routedMessage.getFormattedMsg());
  }
 else {
    logData.setFormattedMsg(null);
  }
  logData.setExtensions(extensions);
  logData.setSourceType(sourceName);
  return logData;
}