Program: 46709
Project: 46709
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,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){
  Runnable delayedTask=new Runnable(){
    private List<List<ResidenceSign>> residenceSignPackages;
    private List<Residence> invalidResidences=new LinkedList<Residence>();
    public void run(){
      try {
        if (residenceSignPackages == null) {
          List<ResidenceSign> residenceSigns=getDatabase().find(ResidenceSign.class).findList();
          plugin.info("String_Node_Str",residenceSigns.size());
          residenceSignPackages=new LinkedList<List<ResidenceSign>>();
          for (int index=0; index < residenceSigns.size(); index+=5) {
            List<ResidenceSign> residenceSignPackage=residenceSigns.subList(index,index + Math.min(residenceSigns.size() - index,5));
            residenceSignPackage.add(residenceSignPackage);
          }
          plugin.info("String_Node_Str",residenceSignPackages.size());
        }
        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);
}