Program: 46707
Project: 46707
Buggy source:
public void searchInvalidResidences(final InvalidResidenceListener invalidResidenceListener){
  final List<List<ResidenceSign>> residenceSignPackages=new LinkedList<List<ResidenceSign>>();
  final List<Residence> invalidResidences=new LinkedList<Residence>();
  List<ResidenceSign> residenceSigns=getDatabase().find(ResidenceSign.class).findList();
  plugin.info("String_Node_Str",residenceSigns.size());
  for (int index=0; index < residenceSigns.size(); index+=5) {
    List<ResidenceSign> residenceSignPackage=residenceSigns.subList(index,Math.min(residenceSigns.size() - index,5));
    residenceSignPackages.add(residenceSignPackage);
  }
  plugin.info("String_Node_Str",residenceSignPackages.size());
  Runnable delayedTask=new Runnable(){
    public void run(){
      try {
        plugin.info("String_Node_Str");
        plugin.info("String_Node_Str",residenceSignPackages.size());
        List<ResidenceSign> residenceSignsToCheck=residenceSignPackages.remove(0);
        plugin.info("String_Node_Str",residenceSignsToCheck.size());
        for (        ResidenceSign residenceSign : residenceSignsToCheck) {
          plugin.info("String_Node_Str",residenceSign.getWorld(),residenceSign.getX(),residenceSign.getY(),residenceSign.getZ(),residenceSign.getResidenceId());
          Block residenceSignBlock=plugin.getServer().getWorld(residenceSign.getWorld()).getBlockAt(residenceSign.getX(),residenceSign.getY(),residenceSign.getZ());
          if (!(residenceSignBlock.getType().equals(Material.SIGN_POST) || residenceSignBlock.getType().equals(Material.WALL_SIGN))) {
            invalidResidences.add(getResidence(residenceSign.getResidenceId()));
          }
        }
        if (!residenceSignPackages.isEmpty()) {
          plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin,this,5);
        }
 else {
          invalidResidenceListener.invalidResidencesFound(invalidResidences);
        }
      }
 catch (      Throwable e) {
        e.printStackTrace();
      }
    }
  }
;
  plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin,delayedTask);
}

Fixed version (ground truth):
public void searchInvalidResidences(final InvalidResidenceListener invalidResidenceListener){
  final List<List<ResidenceSign>> residenceSignPackages=new LinkedList<List<ResidenceSign>>();
  final List<Residence> invalidResidences=new LinkedList<Residence>();
  List<ResidenceSign> residenceSigns=getDatabase().find(ResidenceSign.class).findList();
  plugin.info("String_Node_Str",residenceSigns.size());
  for (int index=0; index < residenceSigns.size(); index+=5) {
    List<ResidenceSign> residenceSignPackage=residenceSigns.subList(index,index + Math.min(residenceSigns.size() - index,5));
    residenceSignPackages.add(residenceSignPackage);
  }
  plugin.info("String_Node_Str",residenceSignPackages.size());
  Runnable delayedTask=new Runnable(){
    public void run(){
      try {
        plugin.info("String_Node_Str");
        plugin.info("String_Node_Str",residenceSignPackages.size());
        List<ResidenceSign> residenceSignsToCheck=residenceSignPackages.remove(0);
        plugin.info("String_Node_Str",residenceSignsToCheck.size());
        for (        ResidenceSign residenceSign : residenceSignsToCheck) {
          plugin.info("String_Node_Str",residenceSign.getWorld(),residenceSign.getX(),residenceSign.getY(),residenceSign.getZ(),residenceSign.getResidenceId());
          Block residenceSignBlock=plugin.getServer().getWorld(residenceSign.getWorld()).getBlockAt(residenceSign.getX(),residenceSign.getY(),residenceSign.getZ());
          if (!(residenceSignBlock.getType().equals(Material.SIGN_POST) || residenceSignBlock.getType().equals(Material.WALL_SIGN))) {
            invalidResidences.add(getResidence(residenceSign.getResidenceId()));
          }
        }
        if (!residenceSignPackages.isEmpty()) {
          plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin,this,5);
        }
 else {
          invalidResidenceListener.invalidResidencesFound(invalidResidences);
        }
      }
 catch (      Throwable e) {
        e.printStackTrace();
      }
    }
  }
;
  plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin,delayedTask);
}