Program: 90452
Project: 90452
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) @Override public void saveBatch(List<? extends Object> entityList,boolean autoGeneratedKeys){
  if (entityList == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  List<Object> globalList=Lists.newArrayList();
  List<Object> shardingList=Lists.newArrayList();
  for (  Object entity : entityList) {
    if (entityMetaManager.isShardingEntity(entity.getClass())) {
      shardingList.add(entity);
    }
 else {
      globalList.add(entity);
    }
  }
  if (!globalList.isEmpty()) {
    Map<String,List<Object>> clusterEntityMap=Maps.newHashMap();
    String clusterName=null;
    for (    Object globalEntity : globalList) {
      clusterName=entityMetaManager.getClusterName(globalEntity.getClass());
      List<Object> theSameClusterNameList=clusterEntityMap.get(clusterName);
      if (theSameClusterNameList != null) {
        theSameClusterNameList.add(globalEntity);
      }
 else {
        theSameClusterNameList=Lists.newArrayList(globalEntity);
        clusterEntityMap.put(clusterName,theSameClusterNameList);
      }
    }
    for (    Map.Entry<String,List<Object>> entry : clusterEntityMap.entrySet()) {
      this.globalUpdater.saveBatch(entry.getValue(),entry.getKey(),autoGeneratedKeys);
    }
  }
  if (!shardingList.isEmpty()) {
    Map<IShardingKey<?>,List<Object>> theSameShardingKeyMap=Maps.newHashMap();
    ShardingKey<?> shardingKey=null;
    for (    Object shardingEntity : shardingList) {
      shardingKey=new ShardingKey(entityMetaManager.getClusterName(shardingEntity.getClass()),entityMetaManager.getShardingValue(shardingEntity));
      List<Object> theSameShardingKeyList=theSameShardingKeyMap.get(shardingKey);
      if (theSameShardingKeyList != null) {
        theSameShardingKeyList.add(shardingEntity);
      }
 else {
        theSameShardingKeyList=Lists.newArrayList(shardingEntity);
        theSameShardingKeyMap.put(shardingKey,theSameShardingKeyList);
      }
    }
    for (    Map.Entry<IShardingKey<?>,List<Object>> entry : theSameShardingKeyMap.entrySet()) {
      this.shardingUpdater.saveBatch(entry.getValue(),entry.getKey(),autoGeneratedKeys);
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) @Override public void saveBatch(List<? extends Object> entityList,boolean autoGeneratedKeys){
  if (entityList == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  List<Object> globalList=Lists.newArrayList();
  List<Object> shardingList=Lists.newArrayList();
  for (  Object entity : entityList) {
    if (entityMetaManager.isShardingEntity(entity.getClass())) {
      shardingList.add(entity);
    }
 else {
      globalList.add(entity);
    }
  }
  if (!globalList.isEmpty()) {
    Map<String,List<Object>> clusterEntityMap=Maps.newHashMap();
    String clusterName=null;
    for (    Object globalEntity : globalList) {
      clusterName=entityMetaManager.getClusterName(globalEntity.getClass());
      List<Object> theSameClusterNameList=clusterEntityMap.get(clusterName);
      if (theSameClusterNameList != null) {
        theSameClusterNameList.add(globalEntity);
      }
 else {
        theSameClusterNameList=Lists.newArrayList(globalEntity);
        clusterEntityMap.put(clusterName,theSameClusterNameList);
      }
    }
    for (    Map.Entry<String,List<Object>> entry : clusterEntityMap.entrySet()) {
      this.globalUpdater.saveBatch(entry.getValue(),entry.getKey(),autoGeneratedKeys);
    }
  }
  if (!shardingList.isEmpty()) {
    Map<IShardingKey<?>,List<Object>> theSameShardingKeyMap=Maps.newHashMap();
    IShardingKey<?> shardingKey=null;
    for (    Object shardingEntity : shardingList) {
      shardingKey=entityMetaManager.getShardingKey(shardingEntity);
      List<Object> theSameShardingKeyList=theSameShardingKeyMap.get(shardingKey);
      if (theSameShardingKeyList != null) {
        theSameShardingKeyList.add(shardingEntity);
      }
 else {
        theSameShardingKeyList=Lists.newArrayList(shardingEntity);
        theSameShardingKeyMap.put(shardingKey,theSameShardingKeyList);
      }
    }
    for (    Map.Entry<IShardingKey<?>,List<Object>> entry : theSameShardingKeyMap.entrySet()) {
      this.shardingUpdater.saveBatch(entry.getValue(),entry.getKey(),autoGeneratedKeys);
    }
  }
}