Program: 19533
Project: 19533
Buggy source:
@Override public void onDeleted(AbstractBuild build){
  DescribableList<Publisher,Descriptor<Publisher>> projectPublishers=build.getProject().getPublishersList();
  Iterator<Publisher> it=projectPublishers.iterator();
  ArtifactDeployerPublisher instance=null;
  while (it.hasNext()) {
    Publisher publisher=it.next();
    if (ArtifactDeployerDescriptor.DISPLAY_NAME.equals(publisher.getDescriptor().getDisplayName())) {
      instance=(ArtifactDeployerPublisher)publisher;
    }
  }
  if (instance != null) {
    DeployedArtifacts deployedArtifacts=build.getAction(DeployedArtifacts.class);
    if (deployedArtifacts != null) {
      Map<Integer,List<ArtifactDeployerVO>> info=deployedArtifacts.getDeployedArtifactsInfo();
      if (info != null) {
        for (        ArtifactDeployerEntry entry : instance.getEntries()) {
          if (entry.isDeleteRemoteArtifacts()) {
            List<ArtifactDeployerVO> listArtifacts=info.get(entry.getUniqueId());
            for (            ArtifactDeployerVO vo : listArtifacts) {
              FilePath remoteArtifactPath=new FilePath(build.getWorkspace().getChannel(),vo.getRemotePath());
              try {
                if (remoteArtifactPath.exists()) {
                  remoteArtifactPath.deleteRecursive();
                }
                if (remoteArtifactPath.getParent().exists() && remoteArtifactPath.getParent().list().size() == 0) {
                  remoteArtifactPath.getParent().delete();
                }
              }
 catch (              IOException ioe) {
                logger.log(Level.SEVERE,"String_Node_Str",ioe);
              }
catch (              InterruptedException ie) {
                logger.log(Level.SEVERE,"String_Node_Str",ie);
              }
            }
          }
          if (entry.isDeleteRemoteArtifactsByScript()) {
            Binding binding=new Binding();
            if (deployedArtifacts != null) {
              List<ArtifactDeployerVO> listArtifacts=info.get(entry.getUniqueId());
              binding.setVariable("String_Node_Str",listArtifacts);
            }
            GroovyShell shell=new GroovyShell(binding);
            shell.evaluate(entry.getGroovyExpression());
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
@Override public void onDeleted(AbstractBuild build){
  DescribableList<Publisher,Descriptor<Publisher>> projectPublishers=build.getProject().getPublishersList();
  Iterator<Publisher> it=projectPublishers.iterator();
  ArtifactDeployerPublisher instance=null;
  while (it.hasNext()) {
    Publisher publisher=it.next();
    if (ArtifactDeployerDescriptor.DISPLAY_NAME.equals(publisher.getDescriptor().getDisplayName())) {
      instance=(ArtifactDeployerPublisher)publisher;
    }
  }
  if (instance != null) {
    DeployedArtifacts deployedArtifacts=build.getAction(DeployedArtifacts.class);
    if (deployedArtifacts != null) {
      Map<Integer,List<ArtifactDeployerVO>> info=deployedArtifacts.getDeployedArtifactsInfo();
      if (info != null) {
        for (        ArtifactDeployerEntry entry : instance.getEntries()) {
          if (entry.isDeleteRemoteArtifacts()) {
            List<ArtifactDeployerVO> listArtifacts=info.get(entry.getUniqueId());
            if (listArtifacts != null) {
              for (              ArtifactDeployerVO vo : listArtifacts) {
                FilePath remoteArtifactPath=new FilePath(build.getWorkspace().getChannel(),vo.getRemotePath());
                try {
                  if (remoteArtifactPath.exists()) {
                    remoteArtifactPath.deleteRecursive();
                  }
                  if (remoteArtifactPath.getParent().exists() && remoteArtifactPath.getParent().list().size() == 0) {
                    remoteArtifactPath.getParent().delete();
                  }
                }
 catch (                IOException ioe) {
                  logger.log(Level.SEVERE,"String_Node_Str",ioe);
                }
catch (                InterruptedException ie) {
                  logger.log(Level.SEVERE,"String_Node_Str",ie);
                }
              }
            }
          }
          if (entry.isDeleteRemoteArtifactsByScript()) {
            Binding binding=new Binding();
            if (deployedArtifacts != null) {
              List<ArtifactDeployerVO> listArtifacts=info.get(entry.getUniqueId());
              binding.setVariable("String_Node_Str",listArtifacts);
            }
            GroovyShell shell=new GroovyShell(binding);
            shell.evaluate(entry.getGroovyExpression());
          }
        }
      }
    }
  }
}