Program: 34269
Project: 34269
Buggy source:
public static void main(String[] args){
  KafkaArgs spraynozzleArgs;
  try {
    spraynozzleArgs=CliFactory.parseArguments(KafkaArgs.class,args);
  }
 catch (  ArgumentValidationException e) {
    System.err.println(e.getMessage());
    return;
  }
  String topic=spraynozzleArgs.getTopic();
  final String url=spraynozzleArgs.getUrl();
  String cleanedUrl=url.replaceAll("String_Node_Str","String_Node_Str");
  String zk=spraynozzleArgs.getZk();
  final int threadCount=spraynozzleArgs.getThreadCount();
  final int partitionCount=spraynozzleArgs.getPartitionCount();
  boolean buffering=spraynozzleArgs.getBuffering();
  final String filterClass=spraynozzleArgs.getFilterClass();
  final String filterClasspath=spraynozzleArgs.getFilterClasspath();
  final String filterClassArgs=spraynozzleArgs.getFilterClassArgs();
  final String statsClass=spraynozzleArgs.getStatsClass();
  final String statsClasspath=spraynozzleArgs.getStatsClasspath();
  final String statsClassArgs=spraynozzleArgs.getStatsClassArgs();
  String[] topics=string.split("String_Node_Str");
  if (topics.length == 1) {
    System.out.println("String_Node_Str" + topic + "String_Node_Str"+ zk+ "String_Node_Str"+ url);
  }
 else {
    System.out.println("String_Node_Str" + topic + "String_Node_Str"+ zk+ "String_Node_Str"+ url);
  }
  if (!buffering) {
    ZkClient zkClient=new ZkClient(zk,10000);
    ZkUtils.deletePathRecursive(zkClient,"String_Node_Str" + topic + cleanedUrl);
    while (ZkUtils.pathExists(zkClient,"String_Node_Str" + topic + cleanedUrl)) {
      try {
        Thread.sleep(250);
      }
 catch (      java.lang.InterruptedException e) {
        System.out.println("String_Node_Str");
        e.printStackTrace();
      }
    }
  }
  Properties kafkaProps=new Properties();
  kafkaProps.put("String_Node_Str",zk);
  kafkaProps.put("String_Node_Str","String_Node_Str");
  kafkaProps.put("String_Node_Str","String_Node_Str" + topic + cleanedUrl);
  kafkaProps.put("String_Node_Str","String_Node_Str");
  kafkaProps.put("String_Node_Str",String.valueOf(2 * 1024 * 1024));
  ConsumerConfig consumerConfig=new ConsumerConfig(kafkaProps);
  ConsumerConnector consumerConnector=Consumer.createJavaConsumerConnector(consumerConfig);
  HashMap<String,Integer> topicParallelism=new HashMap<String,Integer>();
  topicParallelism.put(topic,partitionCount);
  Map<String,List<KafkaStream<Message>>> topicMessageStreams=consumerConnector.createMessageStreams(topicParallelism);
  List<KafkaStream<Message>>[] streams=new List<KafkaStream<Message>>[topics.length];
  for (int i=0; i < topics.length; i++) {
    List<KafkaStream<Message>> streams=topicMessageStreams.get(topics[i]);
  }
  ExecutorService executor=Executors.newFixedThreadPool(threadCount + (partitionCount * topics.length) + 1);
  final PoolingHttpClientConnectionManager cm=new PoolingHttpClientConnectionManager();
  cm.setMaxTotal(threadCount);
  cm.setDefaultMaxPerRoute(threadCount);
  final ConcurrentLinkedQueue<ByteArrayEntity> queue=new ConcurrentLinkedQueue<ByteArrayEntity>();
  final ConcurrentLinkedQueue<String> logQueue=new ConcurrentLinkedQueue<String>();
  StatsReporter statsReporter=getStatsReporter(statsClasspath,statsClass,statsClassArgs);
  executor.submit(new KafkaLog(logQueue,statsReporter,topic,url));
  for (int i=0; i < topics.length; i++) {
    for (    final KafkaStream<Message> stream : streams[i]) {
      executor.submit(new KafkaReader(queue,stream,logQueue));
    }
  }
  for (int i=0; i < threadCount; i++) {
    KafkaFilter messageFilter=getKafkaFilter(filterClass,filterClasspath,filterClassArgs);
    executor.submit(new KafkaPoster(queue,cm,url,logQueue,messageFilter));
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  KafkaArgs spraynozzleArgs;
  try {
    spraynozzleArgs=CliFactory.parseArguments(KafkaArgs.class,args);
  }
 catch (  ArgumentValidationException e) {
    System.err.println(e.getMessage());
    return;
  }
  String topic=spraynozzleArgs.getTopic();
  final String url=spraynozzleArgs.getUrl();
  String cleanedUrl=url.replaceAll("String_Node_Str","String_Node_Str");
  String zk=spraynozzleArgs.getZk();
  final int threadCount=spraynozzleArgs.getThreadCount();
  final int partitionCount=spraynozzleArgs.getPartitionCount();
  boolean buffering=spraynozzleArgs.getBuffering();
  final String filterClass=spraynozzleArgs.getFilterClass();
  final String filterClasspath=spraynozzleArgs.getFilterClasspath();
  final String filterClassArgs=spraynozzleArgs.getFilterClassArgs();
  final String statsClass=spraynozzleArgs.getStatsClass();
  final String statsClasspath=spraynozzleArgs.getStatsClasspath();
  final String statsClassArgs=spraynozzleArgs.getStatsClassArgs();
  String[] topics=topic.split("String_Node_Str");
  if (topics.length == 1) {
    System.out.println("String_Node_Str" + topic + "String_Node_Str"+ zk+ "String_Node_Str"+ url);
  }
 else {
    System.out.println("String_Node_Str" + topic + "String_Node_Str"+ zk+ "String_Node_Str"+ url);
  }
  if (!buffering) {
    ZkClient zkClient=new ZkClient(zk,10000);
    ZkUtils.deletePathRecursive(zkClient,"String_Node_Str" + topic + cleanedUrl);
    while (ZkUtils.pathExists(zkClient,"String_Node_Str" + topic + cleanedUrl)) {
      try {
        Thread.sleep(250);
      }
 catch (      java.lang.InterruptedException e) {
        System.out.println("String_Node_Str");
        e.printStackTrace();
      }
    }
  }
  Properties kafkaProps=new Properties();
  kafkaProps.put("String_Node_Str",zk);
  kafkaProps.put("String_Node_Str","String_Node_Str");
  kafkaProps.put("String_Node_Str","String_Node_Str" + topic + cleanedUrl);
  kafkaProps.put("String_Node_Str","String_Node_Str");
  kafkaProps.put("String_Node_Str",String.valueOf(2 * 1024 * 1024));
  ConsumerConfig consumerConfig=new ConsumerConfig(kafkaProps);
  ConsumerConnector consumerConnector=Consumer.createJavaConsumerConnector(consumerConfig);
  HashMap<String,Integer> topicParallelism=new HashMap<String,Integer>();
  topicParallelism.put(topic,partitionCount);
  Map<String,List<KafkaStream<Message>>> topicMessageStreams=consumerConnector.createMessageStreams(topicParallelism);
  ArrayList<List<KafkaStream<Message>>> streams=new ArrayList<List<KafkaStream<Message>>>();
  for (int i=0; i < topics.length; i++) {
    streams.add(topicMessageStreams.get(topics[i]));
  }
  ExecutorService executor=Executors.newFixedThreadPool(threadCount + (partitionCount * topics.length) + 1);
  final PoolingHttpClientConnectionManager cm=new PoolingHttpClientConnectionManager();
  cm.setMaxTotal(threadCount);
  cm.setDefaultMaxPerRoute(threadCount);
  final ConcurrentLinkedQueue<ByteArrayEntity> queue=new ConcurrentLinkedQueue<ByteArrayEntity>();
  final ConcurrentLinkedQueue<String> logQueue=new ConcurrentLinkedQueue<String>();
  StatsReporter statsReporter=getStatsReporter(statsClasspath,statsClass,statsClassArgs);
  executor.submit(new KafkaLog(logQueue,statsReporter,topic,url));
  for (  List<KafkaStream<Message>> streamList : streams) {
    for (    final KafkaStream<Message> stream : streamList) {
      executor.submit(new KafkaReader(queue,stream,logQueue));
    }
  }
  for (int i=0; i < threadCount; i++) {
    KafkaFilter messageFilter=getKafkaFilter(filterClass,filterClasspath,filterClassArgs);
    executor.submit(new KafkaPoster(queue,cm,url,logQueue,messageFilter));
  }
}