Program: 90450
Project: 90450
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) @Override public void delete(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>> sameClusterNameEntry : theSameClusterNameMap.entrySet()) {
      Map<Class<?>,List<Object>> theSameClassMap=Maps.newHashMap();
      Class<?> clazz=null;
      for (      Object sameClusterNameEntity : sameClusterNameEntry.getValue()) {
        clazz=sameClusterNameEntity.getClass();
        List<Object> theSameClassList=theSameClassMap.get(clazz);
        if (theSameClassList != null) {
          theSameClassList.add(sameClusterNameEntity);
        }
 else {
          theSameClassMap.put(clazz,Lists.newArrayList(sameClusterNameEntity));
        }
        for (        Map.Entry<Class<?>,List<Object>> sameClassEntry : theSameClassMap.entrySet()) {
          List<EntityPK> pks=Lists.newArrayList();
          for (          Object sameClassEntity : sameClassEntry.getValue()) {
            pks.add(entityMetaManager.getEntityPK(sameClassEntity));
          }
          this.globalUpdater.removeByPks(pks,sameClassEntry.getKey(),sameClusterNameEntry.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>> sameShardingKeyEntry : theSameShardingKeyMap.entrySet()) {
      Map<Class<?>,List<Object>> theSameClassMap=Maps.newHashMap();
      Class<?> clazz=null;
      for (      Object sameShardingKeyEntity : sameShardingKeyEntry.getValue()) {
        clazz=sameShardingKeyEntity.getClass();
        List<Object> theSameClassList=theSameClassMap.get(clazz);
        if (theSameClassList != null) {
          theSameClassList.add(sameShardingKeyEntity);
        }
 else {
          theSameClassMap.put(clazz,Lists.newArrayList(sameShardingKeyEntity));
        }
        for (        Map.Entry<Class<?>,List<Object>> sameClassEntry : theSameClassMap.entrySet()) {
          List<EntityPK> pks=Lists.newArrayList();
          for (          Object sameClassEntity : sameClassEntry.getValue()) {
            pks.add(entityMetaManager.getEntityPK(sameClassEntity));
          }
          this.shardingUpdater.removeByPks(pks,sameShardingKeyEntry.getKey(),sameClassEntry.getKey());
        }
      }
    }
  }
}

Fixed version (ground truth):
@Override public void delete(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>> sameClusterNameEntry : theSameClusterNameMap.entrySet()) {
      Map<Class<?>,List<Object>> theSameClassMap=Maps.newHashMap();
      Class<?> clazz=null;
      for (      Object sameClusterNameEntity : sameClusterNameEntry.getValue()) {
        clazz=sameClusterNameEntity.getClass();
        List<Object> theSameClassList=theSameClassMap.get(clazz);
        if (theSameClassList != null) {
          theSameClassList.add(sameClusterNameEntity);
        }
 else {
          theSameClassMap.put(clazz,Lists.newArrayList(sameClusterNameEntity));
        }
        for (        Map.Entry<Class<?>,List<Object>> sameClassEntry : theSameClassMap.entrySet()) {
          List<EntityPK> pks=Lists.newArrayList();
          for (          Object sameClassEntity : sameClassEntry.getValue()) {
            pks.add(entityMetaManager.getEntityPK(sameClassEntity));
          }
          this.globalUpdater.removeByPks(pks,sameClassEntry.getKey(),sameClusterNameEntry.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>> sameShardingKeyEntry : theSameShardingKeyMap.entrySet()) {
      Map<Class<?>,List<Object>> theSameClassMap=Maps.newHashMap();
      Class<?> clazz=null;
      for (      Object sameShardingKeyEntity : sameShardingKeyEntry.getValue()) {
        clazz=sameShardingKeyEntity.getClass();
        List<Object> theSameClassList=theSameClassMap.get(clazz);
        if (theSameClassList != null) {
          theSameClassList.add(sameShardingKeyEntity);
        }
 else {
          theSameClassMap.put(clazz,Lists.newArrayList(sameShardingKeyEntity));
        }
        for (        Map.Entry<Class<?>,List<Object>> sameClassEntry : theSameClassMap.entrySet()) {
          List<EntityPK> pks=Lists.newArrayList();
          for (          Object sameClassEntity : sameClassEntry.getValue()) {
            pks.add(entityMetaManager.getEntityPK(sameClassEntity));
          }
          this.shardingUpdater.removeByPks(pks,sameShardingKeyEntry.getKey(),sameClassEntry.getKey());
        }
      }
    }
  }
}