Program: 82273
Project: 82273
Buggy source:
@Override public void enqueueMutateBatch(List<RowMutation> mutations) throws BlurException, TException {
  try {
    for (    RowMutation mutation : mutations) {
      MutationHelper.validateMutation(mutation);
    }
    Map<String,List<RowMutation>> batches=new HashMap<String,List<RowMutation>>();
    for (    RowMutation mutation : mutations) {
      checkTable(mutation.table);
      checkForUpdates(mutation.table);
      MutationHelper.validateMutation(mutation);
      String table=mutation.getTable();
      int numberOfShards=getShardCount(table);
      Map<String,String> tableLayout=_shardServerLayout.get().get(table);
      if (tableLayout == null || tableLayout.size() != numberOfShards) {
        throw new BException("String_Node_Str");
      }
      String shardName=MutationHelper.getShardName(table,mutation.rowId,numberOfShards,_blurPartitioner);
      String node=tableLayout.get(shardName);
      List<RowMutation> list=batches.get(node);
      if (list == null) {
        list=new ArrayList<RowMutation>();
        batches.put(node,list);
      }
      list.add(mutation);
    }
    List<Future<Void>> futures=new ArrayList<Future<Void>>();
    for (    Entry<String,List<RowMutation>> entry : batches.entrySet()) {
      final String node=entry.getKey();
      final List<RowMutation> mutationsLst=entry.getValue();
      futures.add(_executor.submit(new Callable<Void>(){
        @Override public Void call() throws Exception {
          return _client.execute(node,new BlurCommand<Void>(){
            @Override public Void call(            Client client) throws BlurException, TException {
              client.enqueueMutateBatch(mutationsLst);
              return null;
            }
          }
,_maxMutateRetries,_mutateDelay,_maxMutateDelay);
        }
      }
));
    }
    for (    Future<Void> future : futures) {
      try {
        future.get();
      }
 catch (      InterruptedException e) {
        LOG.error("String_Node_Str",e);
        throw new BException("String_Node_Str",e);
      }
catch (      ExecutionException e) {
        LOG.error("String_Node_Str",e.getCause());
        throw new BException("String_Node_Str",e.getCause());
      }
    }
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
    if (e instanceof BlurException) {
      throw (BlurException)e;
    }
    throw new BException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public void enqueueMutateBatch(List<RowMutation> mutations) throws BlurException, TException {
  try {
    for (    RowMutation mutation : mutations) {
      MutationHelper.validateMutation(mutation);
    }
    Map<String,List<RowMutation>> batches=new HashMap<String,List<RowMutation>>();
    for (    RowMutation mutation : mutations) {
      checkTable(mutation.table);
      checkForUpdates(mutation.table);
      MutationHelper.validateMutation(mutation);
      String table=mutation.getTable();
      int numberOfShards=getShardCount(table);
      Map<String,String> tableLayout=getTableLayout(table);
      if (tableLayout == null || tableLayout.size() != numberOfShards) {
        throw new BException("String_Node_Str");
      }
      String shardName=MutationHelper.getShardName(table,mutation.rowId,numberOfShards,_blurPartitioner);
      String node=tableLayout.get(shardName);
      List<RowMutation> list=batches.get(node);
      if (list == null) {
        list=new ArrayList<RowMutation>();
        batches.put(node,list);
      }
      list.add(mutation);
    }
    List<Future<Void>> futures=new ArrayList<Future<Void>>();
    for (    Entry<String,List<RowMutation>> entry : batches.entrySet()) {
      final String node=entry.getKey();
      final List<RowMutation> mutationsLst=entry.getValue();
      futures.add(_executor.submit(new Callable<Void>(){
        @Override public Void call() throws Exception {
          return _client.execute(node,new BlurCommand<Void>(){
            @Override public Void call(            Client client) throws BlurException, TException {
              client.enqueueMutateBatch(mutationsLst);
              return null;
            }
          }
,_maxMutateRetries,_mutateDelay,_maxMutateDelay);
        }
      }
));
    }
    for (    Future<Void> future : futures) {
      try {
        future.get();
      }
 catch (      InterruptedException e) {
        LOG.error("String_Node_Str",e);
        throw new BException("String_Node_Str",e);
      }
catch (      ExecutionException e) {
        LOG.error("String_Node_Str",e.getCause());
        throw new BException("String_Node_Str",e.getCause());
      }
    }
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
    if (e instanceof BlurException) {
      throw (BlurException)e;
    }
    throw new BException("String_Node_Str",e);
  }
}