Program: 47263
Project: 47263
Buggy source:
private void addAdminFolder(){
  DLNAResource res=new VirtualFolder(Messages.getString("String_Node_Str"),null);
  DLNAResource vsf=getVideoSettingssFolder();
  if (vsf != null) {
    res.addChild(vsf);
  }
  res.addChild(new VirtualFolder(Messages.getString("String_Node_Str"),null){
    @Override public void discoverChildren(){
      final ArrayList<DownloadPlugins> plugins=DownloadPlugins.downloadList();
      for (      final DownloadPlugins plugin : plugins) {
        addChild(new VirtualVideoAction(plugin.getName(),true){
          @Override public boolean enable(){
            try {
              plugin.install(null);
            }
 catch (            Exception e) {
            }
            return true;
          }
        }
);
      }
    }
  }
);
  if (configuration.getScriptDir() != null) {
    final File scriptDir=new File(configuration.getScriptDir());
    if (scriptDir.exists()) {
      res.addChild(new VirtualFolder(Messages.getString("String_Node_Str"),null){
        @Override public void discoverChildren(){
          File[] files=scriptDir.listFiles();
          for (int i=0; i < files.length; i++) {
            String name=files[i].getName().replaceAll("String_Node_Str","String_Node_Str");
            int pos=name.lastIndexOf("String_Node_Str");
            if (pos != -1) {
              name=name.substring(0,pos);
            }
            final File f=files[i];
            addChild(new VirtualVideoAction(name,true){
              @Override public boolean enable(){
                try {
                  ProcessBuilder pb=new ProcessBuilder(f.getAbsolutePath());
                  Process pid=pb.start();
                  InputStream is=pid.getInputStream();
                  InputStreamReader isr=new InputStreamReader(is);
                  BufferedReader br=new BufferedReader(isr);
                  while (br.readLine() != null) {
                  }
                  pid.waitFor();
                }
 catch (                IOException|InterruptedException e) {
                }
                return true;
              }
            }
);
          }
        }
      }
);
    }
  }
  if (configuration.isResumeEnabled()) {
    final File[] files=ResumeObj.resumeFiles();
    if (files.length > 0) {
      res.addChild(new VirtualFolder(Messages.getString("String_Node_Str"),null){
        @Override public void discoverChildren(){
          addChild(new VirtualVideoAction(Messages.getString("String_Node_Str"),true){
            @Override public boolean enable(){
              for (              File f : files) {
                f.delete();
              }
              getParent().getChildren().clear();
              return true;
            }
          }
);
          for (          final File f : files) {
            String name=FileUtil.getFileNameWithoutExtension(f.getName());
            name=name.replaceAll(ResumeObj.CLEAN_REG,"String_Node_Str");
            addChild(new VirtualVideoAction(name,false){
              @Override public boolean enable(){
                f.delete();
                getParent().getChildren().remove(this);
                return false;
              }
            }
);
          }
        }
      }
);
    }
  }
  addChild(res);
}

Fixed version (ground truth):
private void addAdminFolder(){
  DLNAResource res=new VirtualFolder(Messages.getString("String_Node_Str"),null);
  DLNAResource vsf=getVideoSettingssFolder();
  if (vsf != null) {
    res.addChild(vsf);
  }
  res.addChild(new VirtualFolder(Messages.getString("String_Node_Str"),null){
    @Override public void discoverChildren(){
      final ArrayList<DownloadPlugins> plugins=DownloadPlugins.downloadList();
      for (      final DownloadPlugins plugin : plugins) {
        addChild(new VirtualVideoAction(plugin.getName(),true){
          @Override public boolean enable(){
            try {
              plugin.install(null);
            }
 catch (            Exception e) {
            }
            return true;
          }
        }
);
      }
    }
  }
);
  if (configuration.getScriptDir() != null) {
    final File scriptDir=new File(configuration.getScriptDir());
    if (scriptDir.exists()) {
      res.addChild(new VirtualFolder(Messages.getString("String_Node_Str"),null){
        @Override public void discoverChildren(){
          File[] files=scriptDir.listFiles();
          for (int i=0; i < files.length; i++) {
            String name=files[i].getName().replaceAll("String_Node_Str","String_Node_Str");
            int pos=name.lastIndexOf("String_Node_Str");
            if (pos != -1) {
              name=name.substring(0,pos);
            }
            final File f=files[i];
            addChild(new VirtualVideoAction(name,true){
              @Override public boolean enable(){
                try {
                  ProcessBuilder pb=new ProcessBuilder(f.getAbsolutePath());
                  Process pid=pb.start();
                  InputStream is=pid.getInputStream();
                  InputStreamReader isr=new InputStreamReader(is);
                  BufferedReader br=new BufferedReader(isr);
                  while (br.readLine() != null) {
                  }
                  pid.waitFor();
                }
 catch (                IOException|InterruptedException e) {
                }
                return true;
              }
            }
);
          }
        }
      }
);
    }
  }
  if (configuration.isResumeEnabled()) {
    res.addChild(new VirtualFolder(Messages.getString("String_Node_Str"),null){
      @Override public void discoverChildren(){
        final File[] files=ResumeObj.resumeFiles();
        addChild(new VirtualVideoAction(Messages.getString("String_Node_Str"),true){
          @Override public boolean enable(){
            for (            File f : files) {
              f.delete();
            }
            getParent().getChildren().clear();
            return true;
          }
        }
);
        for (        final File f : files) {
          String name=FileUtil.getFileNameWithoutExtension(f.getName());
          name=name.replaceAll(ResumeObj.CLEAN_REG,"String_Node_Str");
          addChild(new VirtualVideoAction(name,false){
            @Override public boolean enable(){
              f.delete();
              getParent().getChildren().remove(this);
              return false;
            }
          }
);
        }
      }
    }
);
  }
  addChild(res);
}