Program: 10305
Project: 10305
Buggy source:
public void spawnAt(Location location){
  if (isNPC()) {
    if (getNPC().isSpawned())     getNPC().teleport(location,TeleportCause.PLUGIN);
 else {
      getNPC().spawn(location);
      entity=getNPC().getEntity();
      uuid=getNPC().getEntity().getUniqueId();
    }
  }
 else   if (entity != null && isUnique())   entity.teleport(location);
 else {
    if (entity_type != null) {
      if (despawned_entity != null) {
        if (despawned_entity.custom_script != null) {
        }
 else         entity=location.getWorld().spawnEntity(location,entity_type);
        getLivingEntity().teleport(location);
        getLivingEntity().getEquipment().setArmorContents(despawned_entity.equipment);
        getLivingEntity().setHealth(despawned_entity.health);
        despawned_entity=null;
      }
 else {
        org.bukkit.entity.Entity ent=null;
        if (entity_type.name().matches("String_Node_Str")) {
          NPC npc=CitizensAPI.getNPCRegistry().createNPC(EntityType.PLAYER,data1);
          npc.spawn(location);
          entity=npc.getEntity();
          uuid=entity.getUniqueId();
        }
 else         if (entity_type.name().matches("String_Node_Str")) {
          Material material=null;
          if (data1 != null && dMaterial.matches(data1)) {
            material=dMaterial.valueOf(data1).getMaterial();
            while (data1.equalsIgnoreCase("String_Node_Str") && ((!material.isBlock()) || material == Material.AIR || material == Material.PORTAL || material == Material.ENDER_PORTAL)) {
              material=dMaterial.valueOf(data1).getMaterial();
            }
          }
          if (material == null || (!material.isBlock())) {
            material=Material.SAND;
          }
          byte materialData=0;
          if (data2 != null && aH.matchesInteger(data2)) {
            materialData=(byte)aH.getIntegerFrom(data2);
          }
          ent=location.getWorld().spawnFallingBlock(location,material,materialData);
          entity=ent;
          uuid=entity.getUniqueId();
        }
 else {
          ent=location.getWorld().spawnEntity(location,entity_type);
          entity=ent;
          uuid=entity.getUniqueId();
          if (entity_type.name().matches("String_Node_Str")) {
            if (!dItem.matches(data1)) {
              data1="String_Node_Str";
            }
            ((PigZombie)entity).getEquipment().setItemInHand(dItem.valueOf(data1).getItemStack());
          }
 else           if (entity_type.name().matches("String_Node_Str")) {
            if (!dItem.matches(data2)) {
              data2="String_Node_Str";
            }
            ((Skeleton)entity).getEquipment().setItemInHand(dItem.valueOf(data2).getItemStack());
          }
          if (data1 != null) {
            try {
              if (ent instanceof Creeper && data1.equalsIgnoreCase("String_Node_Str")) {
                ((Creeper)entity).setPowered(true);
              }
 else               if (ent instanceof Enderman && dMaterial.matches(data1)) {
                ((Enderman)entity).setCarriedMaterial(dMaterial.valueOf(data1).getMaterialData());
              }
 else               if (ent instanceof Horse) {
                setSubtype("String_Node_Str","String_Node_Str","String_Node_Str",data1);
                if (data2 != null) {
                  setSubtype("String_Node_Str","String_Node_Str","String_Node_Str",data2);
                }
              }
 else               if (ent instanceof Ocelot) {
                setSubtype("String_Node_Str","String_Node_Str","String_Node_Str",data1);
              }
 else               if (ent instanceof Sheep) {
                setSubtype("String_Node_Str","String_Node_Str","String_Node_Str",data1);
              }
 else               if (ent instanceof Skeleton) {
                setSubtype("String_Node_Str","String_Node_Str","String_Node_Str",data1);
              }
 else               if (ent instanceof Slime && aH.matchesInteger(data1)) {
                ((Slime)entity).setSize(aH.getIntegerFrom(data1));
              }
 else               if (ent instanceof Villager) {
                setSubtype("String_Node_Str","String_Node_Str","String_Node_Str",data1);
              }
            }
 catch (            Exception e) {
              dB.echoError(e);
            }
          }
        }
      }
    }
 else     dB.echoError("String_Node_Str");
    for (    Mechanism mechanism : mechanisms) {
      adjust(mechanism);
    }
    mechanisms.clear();
  }
}

Fixed version (ground truth):
public void spawnAt(Location location){
  if (isNPC()) {
    if (getNPC().isSpawned())     getNPC().teleport(location,TeleportCause.PLUGIN);
 else {
      getNPC().spawn(location);
      entity=getNPC().getEntity();
      uuid=getNPC().getEntity().getUniqueId();
    }
  }
 else   if (entity != null && isUnique())   entity.teleport(location);
 else {
    if (entity_type != null) {
      if (despawned_entity != null) {
        if (despawned_entity.custom_script != null) {
        }
 else         entity=location.getWorld().spawnEntity(location,entity_type);
        getLivingEntity().teleport(location);
        getLivingEntity().getEquipment().setArmorContents(despawned_entity.equipment);
        getLivingEntity().setHealth(despawned_entity.health);
        despawned_entity=null;
      }
 else {
        org.bukkit.entity.Entity ent=null;
        if (entity_type.name().matches("String_Node_Str")) {
          NPC npc=CitizensAPI.getNPCRegistry().createNPC(EntityType.PLAYER,data1);
          npc.spawn(location);
          entity=npc.getEntity();
          uuid=entity.getUniqueId();
        }
 else         if (entity_type.name().matches("String_Node_Str")) {
          Material material=null;
          if (data1 != null && dMaterial.matches(data1)) {
            material=dMaterial.valueOf(data1).getMaterial();
            while (data1.equalsIgnoreCase("String_Node_Str") && ((!material.isBlock()) || material == Material.AIR || material == Material.PORTAL || material == Material.ENDER_PORTAL)) {
              material=dMaterial.valueOf(data1).getMaterial();
            }
          }
          if (material == null || (!material.isBlock())) {
            material=Material.SAND;
          }
          byte materialData=0;
          if (data2 != null && aH.matchesInteger(data2)) {
            materialData=(byte)aH.getIntegerFrom(data2);
          }
          ent=location.getWorld().spawnFallingBlock(location,material,materialData);
          entity=ent;
          uuid=entity.getUniqueId();
        }
 else {
          ent=location.getWorld().spawnEntity(location,entity_type);
          entity=ent;
          uuid=entity.getUniqueId();
          if (entity_type.name().matches("String_Node_Str")) {
            if (!dItem.matches(data1)) {
              data1="String_Node_Str";
            }
            ((PigZombie)entity).getEquipment().setItemInHand(dItem.valueOf(data1).getItemStack());
          }
 else           if (entity_type.name().matches("String_Node_Str")) {
            if (!dItem.matches(data2)) {
              data2="String_Node_Str";
            }
            ((Skeleton)entity).getEquipment().setItemInHand(dItem.valueOf(data2).getItemStack());
          }
          if (data1 != null) {
            try {
              if (ent instanceof Creeper && data1.equalsIgnoreCase("String_Node_Str")) {
                ((Creeper)entity).setPowered(true);
              }
 else               if (ent instanceof Enderman && dMaterial.matches(data1)) {
                ((Enderman)entity).setCarriedMaterial(dMaterial.valueOf(data1).getMaterialData());
              }
 else               if (ent instanceof Horse) {
                setSubtype("String_Node_Str","String_Node_Str","String_Node_Str",data1);
                if (data2 != null) {
                  setSubtype("String_Node_Str","String_Node_Str","String_Node_Str",data2);
                }
              }
 else               if (ent instanceof Ocelot) {
                setSubtype("String_Node_Str","String_Node_Str","String_Node_Str",data1);
              }
 else               if (ent instanceof Sheep) {
                setSubtype("String_Node_Str","String_Node_Str","String_Node_Str",data1);
              }
 else               if (ent instanceof Skeleton) {
                setSubtype("String_Node_Str","String_Node_Str","String_Node_Str",data1);
              }
 else               if (ent instanceof Slime && aH.matchesInteger(data1)) {
                ((Slime)entity).setSize(aH.getIntegerFrom(data1));
              }
 else               if (ent instanceof Villager) {
                setSubtype("String_Node_Str","String_Node_Str","String_Node_Str",data1);
              }
            }
 catch (            Exception e) {
              dB.echoError("String_Node_Str");
              dB.echoError(e);
            }
          }
        }
      }
    }
 else     dB.echoError("String_Node_Str");
    if (!isUnique()) {
      dB.echoError("String_Node_Str");
      return;
    }
    for (    Mechanism mechanism : mechanisms) {
      adjust(mechanism);
    }
    mechanisms.clear();
  }
}