Program: 126237
Project: 126237
Buggy source:
@Override public void deployModules(Collection<ModuleNeeded> modules,IProgressMonitor monitorWrap){
  boolean modified=false;
  LibrariesIndex index=LibrariesIndexManager.getInstance().getStudioLibIndex();
  EMap<String,String> jarsToRelativePath=index.getJarsToRelativePath();
  List<File> filesToDeploy=new ArrayList<File>();
  for (  ModuleNeeded module : modules) {
    String moduleLocation=module.getModuleLocaion();
    EMap<String,String> jarsToMavenUri=LibrariesIndexManager.getInstance().getMavenLibIndex().getJarsToRelativePath();
    String mavenUri=jarsToMavenUri.get(module.getModuleName());
    if (checkJarInstalledInMaven(mavenUri)) {
      continue;
    }
    if (module.getMavenUri() != null && !module.getMavenUri().isEmpty()) {
      if (checkJarInstalledInMaven(module.getMavenUri())) {
        continue;
      }
    }
    boolean found=false;
    if (moduleLocation != null && moduleLocation.startsWith("String_Node_Str")) {
      if (jarsToRelativePath.containsKey(module.getModuleName())) {
        String relativePath=jarsToRelativePath.get(module.getModuleName());
        if (relativePath.equals(moduleLocation)) {
          continue;
        }
 else {
          if (!urlWarned.contains(moduleLocation)) {
            System.out.println(module.getModuleName() + "String_Node_Str" + relativePath+ "String_Node_Str"+ moduleLocation);
            urlWarned.add(moduleLocation);
          }
        }
      }
      if (checkJarInstalledFromPlatform(moduleLocation)) {
        jarsToRelativePath.put(module.getModuleName(),moduleLocation);
        modified=true;
        found=true;
        filesToDeploy.add(new File(studioJarInstalled.get(moduleLocation)));
      }
    }
    if (!found) {
      EMap<String,String> jarsToRelative=LibrariesIndexManager.getInstance().getStudioLibIndex().getJarsToRelativePath();
      String relativePath=jarsToRelative.get(module.getModuleName());
      if (relativePath != null && checkJarInstalledFromPlatform(relativePath)) {
        found=true;
        filesToDeploy.add(new File(studioJarInstalled.get(relativePath)));
      }
    }
    if (!found) {
      ExceptionHandler.log("String_Node_Str" + module.getModuleName());
    }
  }
  Map<String,String> customUriToAdd=new HashMap<String,String>();
  for (  File file : filesToDeploy) {
    deployFile(file,customUriToAdd,monitorWrap);
  }
  if (!customUriToAdd.isEmpty()) {
    deployMavenIndex(customUriToAdd,monitorWrap);
  }
  if (modified) {
    LibrariesIndexManager.getInstance().saveStudioIndexResource();
  }
}

Fixed version (ground truth):
@Override public void deployModules(Collection<ModuleNeeded> modules,IProgressMonitor monitorWrap){
  boolean modified=false;
  LibrariesIndex index=LibrariesIndexManager.getInstance().getStudioLibIndex();
  EMap<String,String> jarsToRelativePath=index.getJarsToRelativePath();
  List<File> filesToDeploy=new ArrayList<File>();
  for (  ModuleNeeded module : modules) {
    String moduleLocation=module.getModuleLocaion();
    EMap<String,String> jarsToMavenUri=LibrariesIndexManager.getInstance().getMavenLibIndex().getJarsToRelativePath();
    String mavenUri=jarsToMavenUri.get(module.getModuleName());
    if (checkJarInstalledInMaven(mavenUri)) {
      continue;
    }
    if (module.getMavenUri() != null && !module.getMavenUri().isEmpty()) {
      if (checkJarInstalledInMaven(module.getMavenUri())) {
        continue;
      }
    }
    boolean found=false;
    if (moduleLocation != null && moduleLocation.startsWith("String_Node_Str")) {
      if (jarsToRelativePath.containsKey(module.getModuleName())) {
        String relativePath=jarsToRelativePath.get(module.getModuleName());
        if (!relativePath.equals(moduleLocation)) {
          if (!urlWarned.contains(moduleLocation)) {
            System.out.println(module.getModuleName() + "String_Node_Str" + relativePath+ "String_Node_Str"+ moduleLocation);
            urlWarned.add(moduleLocation);
          }
          moduleLocation=relativePath;
        }
      }
      if (checkJarInstalledFromPlatform(moduleLocation)) {
        jarsToRelativePath.put(module.getModuleName(),moduleLocation);
        modified=true;
        found=true;
        filesToDeploy.add(new File(studioJarInstalled.get(moduleLocation)));
      }
    }
    if (!found) {
      EMap<String,String> jarsToRelative=LibrariesIndexManager.getInstance().getStudioLibIndex().getJarsToRelativePath();
      String relativePath=jarsToRelative.get(module.getModuleName());
      if (relativePath != null && checkJarInstalledFromPlatform(relativePath)) {
        found=true;
        filesToDeploy.add(new File(studioJarInstalled.get(relativePath)));
      }
    }
    if (!found) {
      ExceptionHandler.log("String_Node_Str" + module.getModuleName());
    }
  }
  Map<String,String> customUriToAdd=new HashMap<String,String>();
  for (  File file : filesToDeploy) {
    deployFile(file,customUriToAdd,monitorWrap);
  }
  if (!customUriToAdd.isEmpty()) {
    deployMavenIndex(customUriToAdd,monitorWrap);
  }
  if (modified) {
    LibrariesIndexManager.getInstance().saveStudioIndexResource();
  }
}