Program: 7850
Project: 7850
Buggy source:
@Override public void init(String[] args){
  int brokerId=generateBrokerId();
  LOG.info(String.format("String_Node_Str",brokerId));
  CConfiguration cConf=CConfiguration.create();
  zkConnectStr=cConf.get(Constants.CFG_ZOOKEEPER_ENSEMBLE);
  zkNamespace=cConf.get(KafkaConstants.ConfigKeys.ZOOKEEPER_NAMESPACE_CONFIG);
  int port=cConf.getInt(KafkaConstants.ConfigKeys.PORT_CONFIG,-1);
  String hostname=cConf.get(KafkaConstants.ConfigKeys.HOSTNAME_CONFIG);
  if (hostname != null) {
    InetSocketAddress socketAddress=new InetSocketAddress(hostname,0);
    InetAddress address=socketAddress.getAddress();
    if (address.isAnyLocalAddress()) {
      try {
        hostname=InetAddress.getLocalHost().getCanonicalHostName();
      }
 catch (      UnknownHostException e) {
        throw Throwables.propagate(e);
      }
    }
  }
  int numPartitions=cConf.getInt(KafkaConstants.ConfigKeys.NUM_PARTITIONS_CONFIG,KafkaConstants.DEFAULT_NUM_PARTITIONS);
  String logDir=cConf.get(KafkaConstants.ConfigKeys.LOG_DIR_CONFIG);
  int replicationFactor=cConf.getInt(KafkaConstants.ConfigKeys.REPLICATION_FACTOR,KafkaConstants.DEFAULT_REPLICATION_FACTOR);
  LOG.info("String_Node_Str",replicationFactor);
  if (zkNamespace != null) {
    ZKClientService client=ZKClientService.Builder.of(zkConnectStr).build();
    try {
      client.startAndWait();
      String path="String_Node_Str" + zkNamespace;
      LOG.info(String.format("String_Node_Str",path));
      ZKOperations.ignoreError(client.create(path,null,CreateMode.PERSISTENT),KeeperException.NodeExistsException.class,path).get();
      client.stopAndWait();
      zkConnectStr=String.format("String_Node_Str",zkConnectStr,zkNamespace);
    }
 catch (    Exception e) {
      throw Throwables.propagate(e);
    }
 finally {
      client.stopAndWait();
    }
  }
  kafkaProperties=generateKafkaConfig(brokerId,zkConnectStr,hostname,port,numPartitions,replicationFactor,logDir);
}

Fixed version (ground truth):
@Override public void init(String[] args){
  int brokerId=generateBrokerId();
  LOG.info(String.format("String_Node_Str",brokerId));
  CConfiguration cConf=CConfiguration.create();
  String zkConnectStr=cConf.get(Constants.CFG_ZOOKEEPER_ENSEMBLE);
  String zkNamespace=cConf.get(KafkaConstants.ConfigKeys.ZOOKEEPER_NAMESPACE_CONFIG);
  int port=cConf.getInt(KafkaConstants.ConfigKeys.PORT_CONFIG,-1);
  String hostname=cConf.get(KafkaConstants.ConfigKeys.HOSTNAME_CONFIG);
  if (hostname != null) {
    InetSocketAddress socketAddress=new InetSocketAddress(hostname,0);
    InetAddress address=socketAddress.getAddress();
    if (address.isAnyLocalAddress()) {
      try {
        hostname=InetAddress.getLocalHost().getCanonicalHostName();
      }
 catch (      UnknownHostException e) {
        throw Throwables.propagate(e);
      }
    }
  }
  int numPartitions=cConf.getInt(KafkaConstants.ConfigKeys.NUM_PARTITIONS_CONFIG,KafkaConstants.DEFAULT_NUM_PARTITIONS);
  String logDir=cConf.get(KafkaConstants.ConfigKeys.LOG_DIR_CONFIG);
  int replicationFactor=cConf.getInt(KafkaConstants.ConfigKeys.REPLICATION_FACTOR,KafkaConstants.DEFAULT_REPLICATION_FACTOR);
  LOG.info("String_Node_Str",replicationFactor);
  if (zkNamespace != null) {
    ZKClientService client=ZKClientService.Builder.of(zkConnectStr).build();
    try {
      client.startAndWait();
      String path="String_Node_Str" + zkNamespace;
      LOG.info(String.format("String_Node_Str",path));
      ZKOperations.ignoreError(client.create(path,null,CreateMode.PERSISTENT),KeeperException.NodeExistsException.class,path).get();
      client.stopAndWait();
      zkConnectStr=String.format("String_Node_Str",zkConnectStr,zkNamespace);
    }
 catch (    Exception e) {
      throw Throwables.propagate(e);
    }
 finally {
      client.stopAndWait();
    }
  }
  kafkaProperties=generateKafkaConfig(brokerId,zkConnectStr,hostname,port,numPartitions,replicationFactor,logDir);
}