Program: 90744
Project: 90744
Buggy source:
/** 
 * Create a Flume Avro Appender.
 * @param agents An array of Agents.
 * @param delay The amount of time in milliseconds to wait between retries.
 * @param agentRetries The number of times to retry an agent before failing to the next agent.
 * @param name The name of the Appender.
 * @param suppress If true exceptions will be handled in the appender.
 * @param excludes A comma separated list of MDC elements to exclude.
 * @param includes A comma separated list of MDC elements to include.
 * @param required A comma separated list of MDC elements that are required.
 * @param mdcPrefix The prefix to add to MDC key names.
 * @param eventPrefix The prefix to add to event key names.
 * @param compressBody If true the event body will be compressed.
 * @param batchSize Number of events to include in a batch. Defaults to 1.
 * @param factory The factory to use to create Flume events.
 * @param layout The layout to format the event.
 * @param filter A Filter to filter events.
 * @return A Flume Avro Appender.
 */
@PluginFactory public static FlumeAppender createAppender(@PluginElement("String_Node_Str") Agent[] agents,@PluginElement("String_Node_Str") final Property[] properties,@PluginAttr("String_Node_Str") final String embedded,@PluginAttr("String_Node_Str") final String dataDir,@PluginAttr("String_Node_Str") final String delay,@PluginAttr("String_Node_Str") final String agentRetries,@PluginAttr("String_Node_Str") final String name,@PluginAttr("String_Node_Str") final String suppress,@PluginAttr("String_Node_Str") final String excludes,@PluginAttr("String_Node_Str") final String includes,@PluginAttr("String_Node_Str") final String required,@PluginAttr("String_Node_Str") final String mdcPrefix,@PluginAttr("String_Node_Str") final String eventPrefix,@PluginAttr("String_Node_Str") final String compressBody,@PluginAttr("String_Node_Str") final String batchSize,@PluginElement("String_Node_Str") final FlumeEventFactory factory,@PluginElement("String_Node_Str") Layout layout,@PluginElement("String_Node_Str") final Filter filter){
  final boolean embed=embedded != null ? Boolean.valueOf(embedded) : (agents == null || agents.length == 0) && properties != null && properties.length > 0;
  final boolean handleExceptions=suppress == null ? true : Boolean.valueOf(suppress);
  final boolean compress=compressBody == null ? true : Boolean.valueOf(compressBody);
  final int batchCount=batchSize == null ? 1 : Integer.parseInt(batchSize);
  final int reconnectDelay=delay == null ? 0 : Integer.parseInt(delay);
  final int retries=agentRetries == null ? 0 : Integer.parseInt(agentRetries);
  if (layout == null) {
    layout=RFC5424Layout.createLayout(null,null,null,"String_Node_Str",null,null,null,null,excludes,includes,required,null,null,null,null);
  }
  if (name == null) {
    LOGGER.error("String_Node_Str");
    return null;
  }
  AbstractFlumeManager manager;
  if (embed) {
    manager=FlumeEmbeddedManager.getManager(name,agents,properties,batchCount,dataDir);
  }
 else {
    if (agents == null || agents.length == 0) {
      LOGGER.debug("String_Node_Str");
      agents=new Agent[]{Agent.createAgent(null,null)};
    }
    manager=FlumeAvroManager.getManager(name,agents,batchCount);
  }
  if (manager == null) {
    return null;
  }
  return new FlumeAppender(name,filter,layout,handleExceptions,includes,excludes,required,mdcPrefix,eventPrefix,compress,reconnectDelay,retries,factory,manager);
}

Fixed version (ground truth):
/** 
 * Create a Flume Avro Appender.
 * @param agents An array of Agents.
 * @param properties Properties to pass to the embedded agent.
 * @param embedded true if the embedded agent manager should be used. otherwise the Avro mangaer will be used.
 * @param dataDir The directory where the Flume FileChannel should write its data.
 * @param delay The amount of time in milliseconds to wait between retries.
 * @param agentRetries The number of times to retry an agent before failing to the next agent.
 * @param name The name of the Appender.
 * @param suppress If true exceptions will be handled in the appender.
 * @param excludes A comma separated list of MDC elements to exclude.
 * @param includes A comma separated list of MDC elements to include.
 * @param required A comma separated list of MDC elements that are required.
 * @param mdcPrefix The prefix to add to MDC key names.
 * @param eventPrefix The prefix to add to event key names.
 * @param compressBody If true the event body will be compressed.
 * @param batchSize Number of events to include in a batch. Defaults to 1.
 * @param factory The factory to use to create Flume events.
 * @param layout The layout to format the event.
 * @param filter A Filter to filter events.
 * @return A Flume Avro Appender.
 */
@PluginFactory public static FlumeAppender createAppender(@PluginElement("String_Node_Str") Agent[] agents,@PluginElement("String_Node_Str") final Property[] properties,@PluginAttr("String_Node_Str") final String embedded,@PluginAttr("String_Node_Str") final String dataDir,@PluginAttr("String_Node_Str") final String delay,@PluginAttr("String_Node_Str") final String agentRetries,@PluginAttr("String_Node_Str") final String name,@PluginAttr("String_Node_Str") final String suppress,@PluginAttr("String_Node_Str") final String excludes,@PluginAttr("String_Node_Str") final String includes,@PluginAttr("String_Node_Str") final String required,@PluginAttr("String_Node_Str") final String mdcPrefix,@PluginAttr("String_Node_Str") final String eventPrefix,@PluginAttr("String_Node_Str") final String compressBody,@PluginAttr("String_Node_Str") final String batchSize,@PluginElement("String_Node_Str") final FlumeEventFactory factory,@PluginElement("String_Node_Str") Layout layout,@PluginElement("String_Node_Str") final Filter filter){
  final boolean embed=embedded != null ? Boolean.valueOf(embedded) : (agents == null || agents.length == 0) && properties != null && properties.length > 0;
  final boolean handleExceptions=suppress == null ? true : Boolean.valueOf(suppress);
  final boolean compress=compressBody == null ? true : Boolean.valueOf(compressBody);
  final int batchCount=batchSize == null ? 1 : Integer.parseInt(batchSize);
  final int reconnectDelay=delay == null ? 0 : Integer.parseInt(delay);
  final int retries=agentRetries == null ? 0 : Integer.parseInt(agentRetries);
  if (layout == null) {
    layout=RFC5424Layout.createLayout(null,null,null,"String_Node_Str",null,null,null,null,excludes,includes,required,null,null,null,null);
  }
  if (name == null) {
    LOGGER.error("String_Node_Str");
    return null;
  }
  AbstractFlumeManager manager;
  if (embed) {
    manager=FlumeEmbeddedManager.getManager(name,agents,properties,batchCount,dataDir);
  }
 else {
    if (agents == null || agents.length == 0) {
      LOGGER.debug("String_Node_Str");
      agents=new Agent[]{Agent.createAgent(null,null)};
    }
    manager=FlumeAvroManager.getManager(name,agents,batchCount);
  }
  if (manager == null) {
    return null;
  }
  return new FlumeAppender(name,filter,layout,handleExceptions,includes,excludes,required,mdcPrefix,eventPrefix,compress,reconnectDelay,retries,factory,manager);
}