Program: 8161
Project: 8161
Buggy source:
private SendResult send0(final Message message,final byte[] encodedData,final long timeout,final TimeUnit unit) throws InterruptedException, MetaClientException {
  try {
    final String topic=message.getTopic();
    Partition partition=null;
    String serverUrl=null;
    if (this.isInTransaction()) {
      final LastSentInfo info=this.lastSentInfo.get();
      if (info != null) {
        serverUrl=info.serverUrl;
        partition=this.producerZooKeeper.selectPartition(topic,message,this.partitionSelector,serverUrl);
        if (partition == null) {
          throw new MetaClientException("String_Node_Str" + serverUrl + "String_Node_Str"+ topic+ "String_Node_Str");
        }
      }
    }
    if (partition == null) {
      partition=this.selectPartition(message);
    }
    if (partition == null) {
      throw new MetaClientException("String_Node_Str" + topic + "String_Node_Str");
    }
    if (serverUrl == null) {
      serverUrl=this.producerZooKeeper.selectBroker(topic,partition);
    }
    if (serverUrl == null) {
      throw new MetaClientException("String_Node_Str" + topic + "String_Node_Str"+ partition+ "String_Node_Str");
    }
    if (this.isInTransaction() && this.lastSentInfo.get() == null) {
      this.beforeSendMessageFirstTime(serverUrl);
    }
    final int flag=MessageFlagUtils.getFlag(message);
    final PutCommand putCommand=new PutCommand(topic,partition.getPartition(),encodedData,this.getTransactionId(),flag,OpaqueGenerator.getNextOpaque());
    final BooleanCommand resp=this.invokeToGroup(serverUrl,partition,putCommand,message,timeout,unit);
    return this.genSendResult(message,partition,serverUrl,resp);
  }
 catch (  final TimeoutException e) {
    throw new MetaOpeartionTimeoutException("String_Node_Str" + TimeUnit.MILLISECONDS.convert(timeout,unit) + "String_Node_Str");
  }
catch (  final InterruptedException e) {
    throw e;
  }
catch (  final Exception e) {
    throw new MetaClientException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
private SendResult send0(final Message message,final byte[] encodedData,final long timeout,final TimeUnit unit) throws InterruptedException, MetaClientException {
  try {
    final String topic=message.getTopic();
    Partition partition=null;
    String serverUrl=null;
    if (this.isInTransaction()) {
      final LastSentInfo info=this.lastSentInfo.get();
      if (info != null) {
        serverUrl=info.serverUrl;
        partition=this.producerZooKeeper.selectPartition(topic,message,this.partitionSelector,serverUrl);
        if (partition == null) {
          throw new MetaClientException("String_Node_Str" + serverUrl + "String_Node_Str"+ topic+ "String_Node_Str");
        }
      }
    }
    if (partition == null) {
      partition=this.selectPartition(message);
    }
    if (partition == null) {
      throw new MetaClientException("String_Node_Str" + topic + "String_Node_Str");
    }
    if (serverUrl == null) {
      serverUrl=this.producerZooKeeper.selectBroker(topic,partition);
    }
    if (serverUrl == null) {
      throw new MetaClientException("String_Node_Str" + topic + "String_Node_Str"+ partition+ "String_Node_Str");
    }
    if (this.isInTransaction() && this.lastSentInfo.get() == null) {
      this.beforeSendMessageFirstTime(serverUrl);
    }
    final int flag=MessageFlagUtils.getFlag(message);
    final PutCommand putCommand=new PutCommand(topic,partition.getPartition(),encodedData,this.getTransactionId(),flag,CheckSum.crc32(encodedData),OpaqueGenerator.getNextOpaque());
    final BooleanCommand resp=this.invokeToGroup(serverUrl,partition,putCommand,message,timeout,unit);
    return this.genSendResult(message,partition,serverUrl,resp);
  }
 catch (  final TimeoutException e) {
    throw new MetaOpeartionTimeoutException("String_Node_Str" + TimeUnit.MILLISECONDS.convert(timeout,unit) + "String_Node_Str");
  }
catch (  final InterruptedException e) {
    throw e;
  }
catch (  final Exception e) {
    throw new MetaClientException("String_Node_Str",e);
  }
}