Program: 90447
Project: 90447
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) @Override public void updateBatch(List<? extends Object> entityList){
  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>> theSameClusterNameMap=Maps.newHashMap();
    String clusterName=null;
    for (    Object globalEntity : globalList) {
      clusterName=entityMetaManager.getClusterName(globalEntity.getClass());
      List<Object> theSameClusterNameList=theSameClusterNameMap.get(clusterName);
      if (theSameClusterNameList != null) {
        theSameClusterNameList.add(globalEntity);
      }
 else {
        theSameClusterNameList=Lists.newArrayList(globalEntity);
        theSameClusterNameMap.put(clusterName,theSameClusterNameList);
      }
    }
    for (    Map.Entry<String,List<Object>> entry : theSameClusterNameMap.entrySet()) {
      this.globalUpdater.updateBatch(entry.getValue(),entry.getKey());
    }
  }
  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.updateBatch(entry.getValue(),entry.getKey());
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) @Override public void updateBatch(List<? extends Object> entityList){
  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>> theSameClusterNameMap=Maps.newHashMap();
    String clusterName=null;
    for (    Object globalEntity : globalList) {
      clusterName=entityMetaManager.getClusterName(globalEntity.getClass());
      List<Object> theSameClusterNameList=theSameClusterNameMap.get(clusterName);
      if (theSameClusterNameList != null) {
        theSameClusterNameList.add(globalEntity);
      }
 else {
        theSameClusterNameList=Lists.newArrayList(globalEntity);
        theSameClusterNameMap.put(clusterName,theSameClusterNameList);
      }
    }
    for (    Map.Entry<String,List<Object>> entry : theSameClusterNameMap.entrySet()) {
      this.globalUpdater.updateBatch(entry.getValue(),entry.getKey());
    }
  }
  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.updateBatch(entry.getValue(),entry.getKey());
    }
  }
}