Program: 90746
Project: 90746
Buggy source:
/** 
 * Returns a FlumeEmbeddedManager.
 * @param agents The agents to use.
 * @param batchSize The number of events to include in a batch.
 * @return A FlumeAvroManager.
 */
public static FlumeEmbeddedManager getManager(final String name,final Agent[] agents,final Property[] properties,int batchSize,final String dataDir){
  if (batchSize <= 0) {
    batchSize=1;
  }
  if ((agents == null || agents.length == 0) && (properties == null || properties.length == 0)) {
    throw new IllegalArgumentException("String_Node_Str");
  }
 else   if (agents != null && agents.length > 0 && properties != null && properties.length > 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final StringBuilder sb=new StringBuilder();
  boolean first=true;
  if (agents != null && agents.length > 0) {
    sb.append("String_Node_Str");
    for (    final Agent agent : agents) {
      if (!first) {
        sb.append("String_Node_Str");
      }
      sb.append(agent.getHost()).append("String_Node_Str").append(agent.getPort());
      first=false;
    }
    sb.append("String_Node_Str");
  }
 else {
    String sep="String_Node_Str";
    sb.append(name).append("String_Node_Str");
    final StringBuilder props=new StringBuilder();
    for (    final Property prop : properties) {
      props.append(sep);
      props.append(prop.getName()).append("String_Node_Str").append(prop.getValue());
      sep="String_Node_Str";
    }
    sb.append(NameUtil.md5(props.toString()));
  }
  return (FlumeEmbeddedManager)getManager(sb.toString(),factory,new FactoryData(name,agents,properties,batchSize,dataDir));
}

Fixed version (ground truth):
/** 
 * Returns a FlumeEmbeddedManager.
 * @param name The name of the manager.
 * @param agents The agents to use.
 * @param properties Properties for the embedded manager.
 * @param batchSize The number of events to include in a batch.
 * @param dataDir The directory where the Flume FileChannel should write to.
 * @return A FlumeAvroManager.
 */
public static FlumeEmbeddedManager getManager(final String name,final Agent[] agents,final Property[] properties,int batchSize,final String dataDir){
  if (batchSize <= 0) {
    batchSize=1;
  }
  if ((agents == null || agents.length == 0) && (properties == null || properties.length == 0)) {
    throw new IllegalArgumentException("String_Node_Str");
  }
 else   if (agents != null && agents.length > 0 && properties != null && properties.length > 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final StringBuilder sb=new StringBuilder();
  boolean first=true;
  if (agents != null && agents.length > 0) {
    sb.append("String_Node_Str");
    for (    final Agent agent : agents) {
      if (!first) {
        sb.append("String_Node_Str");
      }
      sb.append(agent.getHost()).append("String_Node_Str").append(agent.getPort());
      first=false;
    }
    sb.append("String_Node_Str");
  }
 else {
    String sep="String_Node_Str";
    sb.append(name).append("String_Node_Str");
    final StringBuilder props=new StringBuilder();
    for (    final Property prop : properties) {
      props.append(sep);
      props.append(prop.getName()).append("String_Node_Str").append(prop.getValue());
      sep="String_Node_Str";
    }
    sb.append(NameUtil.md5(props.toString()));
  }
  return (FlumeEmbeddedManager)getManager(sb.toString(),factory,new FactoryData(name,agents,properties,batchSize,dataDir));
}