Program: 39771
Project: 39771
Buggy source:
@Override public void run(){
  double xLoc=sm.config.getCustomConfig().getDouble("String_Node_Str");
  double yLoc=sm.config.getCustomConfig().getDouble("String_Node_Str");
  double zLoc=sm.config.getCustomConfig().getDouble("String_Node_Str");
  int maxSize;
  for (  World world : Bukkit.getWorlds()) {
    if (sm.config.getCustomConfig().getStringList("String_Node_Str").contains(world.getName())) {
      continue;
    }
    for (    Entity first : world.getLivingEntities()) {
      if (first instanceof ArmorStand) {
        continue;
      }
      if (sm.tools.notTaskSuitable(first)) {
        continue;
      }
      if (first.hasMetadata(GlobalValues.NOT_ENOUGH_NEAR) && first.getMetadata(GlobalValues.NOT_ENOUGH_NEAR).get(0).asBoolean()) {
        sm.tools.notEnoughNearby(first);
      }
      maxSize=sm.config.getCustomConfig().getInt("String_Node_Str");
      if (sm.config.getCustomConfig().isInt("String_Node_Str" + first.getType() + "String_Node_Str")) {
        maxSize=sm.config.getCustomConfig().getInt("String_Node_Str" + first.getType() + "String_Node_Str");
      }
      if (first.hasMetadata(GlobalValues.METATAG) && first.getMetadata(GlobalValues.METATAG).size() == 0) {
        if (first.getMetadata(GlobalValues.METATAG).get(0).asInt() == maxSize) {
          continue;
        }
      }
      for (      Entity nearby : first.getNearbyEntities(xLoc,yLoc,zLoc)) {
        if (first.getType() != nearby.getType()) {
          continue;
        }
        if (!nearby.hasMetadata(GlobalValues.METATAG) || nearby.getMetadata(GlobalValues.METATAG).size() == 0 || nearby.getMetadata(GlobalValues.METATAG).get(0).asInt() == maxSize) {
          continue;
        }
        if (sm.tools.notTaskSuitable(nearby)) {
          continue;
        }
        if (sm.tools.notMatching(first,nearby)) {
          continue;
        }
        int nearbySize=nearby.getMetadata(GlobalValues.METATAG).get(0).asInt();
        int firstSize;
        if (first.hasMetadata(GlobalValues.METATAG)) {
          firstSize=first.getMetadata(GlobalValues.METATAG).get(0).asInt();
        }
 else {
          firstSize=1;
        }
        if (nearbySize > firstSize && sm.config.getCustomConfig().getBoolean("String_Node_Str")) {
          Entity holder=nearby;
          nearby=first;
          first=holder;
        }
        sm.tools.onceStacked(first,nearby);
        int amountTotal=nearbySize + firstSize;
        if (amountTotal > maxSize) {
          first.setMetadata(GlobalValues.METATAG,new FixedMetadataValue(sm,maxSize));
          nearby.setMetadata(GlobalValues.METATAG,new FixedMetadataValue(sm,amountTotal - maxSize));
        }
 else {
          first.setMetadata(GlobalValues.METATAG,new FixedMetadataValue(sm,amountTotal));
          nearby.remove();
        }
        break;
      }
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  double xLoc=sm.config.getCustomConfig().getDouble("String_Node_Str");
  double yLoc=sm.config.getCustomConfig().getDouble("String_Node_Str");
  double zLoc=sm.config.getCustomConfig().getDouble("String_Node_Str");
  int maxSize;
  for (  World world : Bukkit.getWorlds()) {
    if (sm.config.getCustomConfig().getStringList("String_Node_Str").contains(world.getName())) {
      continue;
    }
    for (    Entity first : world.getLivingEntities()) {
      if (first instanceof ArmorStand) {
        continue;
      }
      if (sm.tools.notTaskSuitable(first)) {
        continue;
      }
      if (first.hasMetadata(GlobalValues.NOT_ENOUGH_NEAR) && first.getMetadata(GlobalValues.NOT_ENOUGH_NEAR).get(0).asBoolean()) {
        sm.tools.notEnoughNearby(first);
      }
      maxSize=sm.config.getCustomConfig().getInt("String_Node_Str");
      if (sm.config.getCustomConfig().isInt("String_Node_Str" + first.getType() + "String_Node_Str")) {
        maxSize=sm.config.getCustomConfig().getInt("String_Node_Str" + first.getType() + "String_Node_Str");
      }
      if (first.hasMetadata(GlobalValues.METATAG) && first.getMetadata(GlobalValues.METATAG).size() == 0) {
        continue;
      }
      if (first.getMetadata(GlobalValues.METATAG).get(0).asInt() == maxSize) {
        continue;
      }
      for (      Entity nearby : first.getNearbyEntities(xLoc,yLoc,zLoc)) {
        if (first.getType() != nearby.getType()) {
          continue;
        }
        if (!nearby.hasMetadata(GlobalValues.METATAG) || nearby.getMetadata(GlobalValues.METATAG).size() == 0 || nearby.getMetadata(GlobalValues.METATAG).get(0).asInt() == maxSize) {
          continue;
        }
        if (sm.tools.notTaskSuitable(nearby)) {
          continue;
        }
        if (sm.tools.notMatching(first,nearby)) {
          continue;
        }
        int nearbySize=nearby.getMetadata(GlobalValues.METATAG).get(0).asInt();
        int firstSize;
        if (first.hasMetadata(GlobalValues.METATAG)) {
          firstSize=first.getMetadata(GlobalValues.METATAG).get(0).asInt();
        }
 else {
          firstSize=1;
        }
        if (nearbySize > firstSize && sm.config.getCustomConfig().getBoolean("String_Node_Str")) {
          Entity holder=nearby;
          nearby=first;
          first=holder;
        }
        sm.tools.onceStacked(first,nearby);
        int amountTotal=nearbySize + firstSize;
        if (amountTotal > maxSize) {
          first.setMetadata(GlobalValues.METATAG,new FixedMetadataValue(sm,maxSize));
          nearby.setMetadata(GlobalValues.METATAG,new FixedMetadataValue(sm,amountTotal - maxSize));
        }
 else {
          first.setMetadata(GlobalValues.METATAG,new FixedMetadataValue(sm,amountTotal));
          nearby.remove();
        }
        break;
      }
    }
  }
}