Program: 126592
Project: 126592
Buggy source:
@Override public Set<String> list(IProgressMonitor... monitorWrap){
  Set<String> names=new HashSet<String>();
  try {
    List<File> jarFiles=FilesUtils.getJarFilesFromFolder(getStorageDirectory(),null);
    if (jarFiles.size() > 0) {
      for (      File file : jarFiles) {
        names.add(file.getName());
      }
    }
 else {
    }
  }
 catch (  MalformedURLException e) {
    CommonExceptionHandler.process(e);
  }
  LibrariesIndexManager.getInstance().loadResource();
  EMap<String,String> jarsToRelative=LibrariesIndexManager.getInstance().getIndex().getJarsToRelativePath();
  Map<String,File> componentsFolders=null;
  Set<String> contributeIdSet=null;
  if (GlobalServiceRegister.getDefault().isServiceRegistered(IComponentsService.class)) {
    IComponentsService service=(IComponentsService)GlobalServiceRegister.getDefault().getService(IComponentsService.class);
    componentsFolders=service.getComponentsFactory().getComponentsProvidersFolder();
    contributeIdSet=componentsFolders.keySet();
  }
  for (  String jarName : jarsToRelative.keySet()) {
    String relativePath=jarsToRelative.get(jarName);
    boolean jarFound=false;
    if (relativePath != null) {
      if (relativePath.startsWith("String_Node_Str")) {
        jarFound=checkJarInstalledFromPlatform(relativePath);
      }
 else {
        if (componentsFolders != null && contributeIdSet != null) {
          for (          String contributor : contributeIdSet) {
            if (relativePath.contains(contributor)) {
              String bundleLocation=componentsFolders.get(contributor).getAbsolutePath();
              int index=bundleLocation.indexOf(contributor);
              String jarLocation=new Path(bundleLocation.substring(0,index)).append(relativePath).toPortableString();
              File file=new File(jarLocation);
              if (file.exists()) {
                jarFound=true;
              }
              break;
            }
          }
        }
      }
    }
    if (jarFound) {
      names.add(jarName);
    }
  }
  return names;
}

Fixed version (ground truth):
@Override public Set<String> list(boolean withComponent,IProgressMonitor... monitorWrap){
  Set<String> names=new HashSet<String>();
  try {
    List<File> jarFiles=FilesUtils.getJarFilesFromFolder(getStorageDirectory(),null);
    if (jarFiles.size() > 0) {
      for (      File file : jarFiles) {
        names.add(file.getName());
      }
    }
  }
 catch (  MalformedURLException e) {
    CommonExceptionHandler.process(e);
  }
  LibrariesIndexManager.getInstance().loadResource();
  EMap<String,String> jarsToRelative=LibrariesIndexManager.getInstance().getIndex().getJarsToRelativePath();
  Map<String,File> componentsFolders=null;
  Set<String> contributeIdSet=null;
  if (GlobalServiceRegister.getDefault().isServiceRegistered(IComponentsService.class)) {
    IComponentsService service=(IComponentsService)GlobalServiceRegister.getDefault().getService(IComponentsService.class);
    componentsFolders=service.getComponentsFactory().getComponentsProvidersFolder();
    contributeIdSet=componentsFolders.keySet();
  }
  for (  String jarName : jarsToRelative.keySet()) {
    String relativePath=jarsToRelative.get(jarName);
    boolean jarFound=false;
    if (relativePath != null) {
      if (relativePath.startsWith("String_Node_Str")) {
        jarFound=checkJarInstalledFromPlatform(relativePath);
      }
 else {
        if (componentsFolders != null && contributeIdSet != null) {
          for (          String contributor : contributeIdSet) {
            if (relativePath.contains(contributor)) {
              String bundleLocation=componentsFolders.get(contributor).getAbsolutePath();
              int index=bundleLocation.indexOf(contributor);
              String jarLocation=new Path(bundleLocation.substring(0,index)).append(relativePath).toPortableString();
              File file=new File(jarLocation);
              if (file.exists()) {
                jarFound=true;
              }
              break;
            }
          }
        }
      }
    }
    if (jarFound) {
      if (!withComponent) {
        if (ModulesNeededProvider.getModulesNeededNames().contains(jarName)) {
          names.add(jarName);
        }
      }
 else {
        names.add(jarName);
      }
    }
  }
  return names;
}