Program: 90871
Project: 90871
Buggy source:
public FlumeEvent(LogEvent event,String hostname,String includes,String excludes,String required,String mdcPrefix,String eventPrefix,boolean compress){
  this.event=event;
  this.hostname=hostname;
  this.compress=compress;
  if (mdcPrefix == null) {
    mdcPrefix=DEFAULT_MDC_PREFIX;
  }
  if (eventPrefix == null) {
    eventPrefix=DEFAULT_EVENT_PREFIX;
  }
  this.fields=new HashMap<String,byte[]>();
  Map<String,String> mdc=event.getContextMap();
  if (includes != null) {
    String[] array=includes.split("String_Node_Str");
    if (array.length > 0) {
      for (      String str : array) {
        if (mdc.containsKey(str)) {
          ctx.put(str,mdc.get(str));
        }
      }
    }
  }
 else   if (excludes != null) {
    String[] array=excludes.split("String_Node_Str");
    if (array.length > 0) {
      List<String> list=Arrays.asList(array);
      for (      Map.Entry<String,String> entry : mdc.entrySet()) {
        if (!list.contains(entry.getKey())) {
          ctx.put(entry.getKey(),entry.getValue());
        }
      }
    }
  }
  if (required != null) {
    String[] array=required.split("String_Node_Str");
    if (array.length > 0) {
      for (      String str : array) {
        if (!mdc.containsKey(str)) {
          throw new LoggingException("String_Node_Str" + str + "String_Node_Str");
        }
      }
    }
  }
  Message message=event.getMessage();
  if (message instanceof MapMessage) {
    if (message instanceof StructuredDataMessage) {
      addStructuredData(eventPrefix,fields,(StructuredDataMessage)message);
    }
    addMapData(eventPrefix,fields,(MapMessage)message);
  }
  addContextData(mdcPrefix,fields,ctx);
  addGuid(fields);
}

Fixed version (ground truth):
/** 
 * Construct the FlumeEvent.
 * @param event The Log4j LogEvent.
 * @param hostname The host name.
 * @param includes A comma separated list of MDC elements to include.
 * @param excludes A comma separated list of MDC elements to exclude.
 * @param required A comma separated list of MDC elements that are required to be defined.
 * @param mdcPrefix The value to prefix to MDC keys.
 * @param eventPrefix The value to prefix to event keys.
 * @param compress If true the event body should be compressed.
 */
public FlumeEvent(LogEvent event,String hostname,String includes,String excludes,String required,String mdcPrefix,String eventPrefix,boolean compress){
  this.event=event;
  this.hostname=hostname;
  this.compress=compress;
  if (mdcPrefix == null) {
    mdcPrefix=DEFAULT_MDC_PREFIX;
  }
  if (eventPrefix == null) {
    eventPrefix=DEFAULT_EVENT_PREFIX;
  }
  this.fields=new HashMap<String,byte[]>();
  Map<String,String> mdc=event.getContextMap();
  if (includes != null) {
    String[] array=includes.split("String_Node_Str");
    if (array.length > 0) {
      for (      String str : array) {
        if (mdc.containsKey(str)) {
          ctx.put(str,mdc.get(str));
        }
      }
    }
  }
 else   if (excludes != null) {
    String[] array=excludes.split("String_Node_Str");
    if (array.length > 0) {
      List<String> list=Arrays.asList(array);
      for (      Map.Entry<String,String> entry : mdc.entrySet()) {
        if (!list.contains(entry.getKey())) {
          ctx.put(entry.getKey(),entry.getValue());
        }
      }
    }
  }
  if (required != null) {
    String[] array=required.split("String_Node_Str");
    if (array.length > 0) {
      for (      String str : array) {
        if (!mdc.containsKey(str)) {
          throw new LoggingException("String_Node_Str" + str + "String_Node_Str");
        }
      }
    }
  }
  Message message=event.getMessage();
  if (message instanceof MapMessage) {
    if (message instanceof StructuredDataMessage) {
      addStructuredData(eventPrefix,fields,(StructuredDataMessage)message);
    }
    addMapData(eventPrefix,fields,(MapMessage)message);
  }
  addContextData(mdcPrefix,fields,ctx);
  addGuid(fields);
}