Program: 125946
Project: 125946
Buggy source:
/** 
 * deploy needed modules with snapshot version
 */
@Override public void deployModules(Collection<ModuleNeeded> modules,IProgressMonitor monitorWrap){
  boolean modified=false;
  EMap<String,String> libIndex=LibrariesIndexManager.getInstance().getStudioLibIndex().getJarsToRelativePath();
  EMap<String,String> mavenIndex=LibrariesIndexManager.getInstance().getMavenLibIndex().getJarsToRelativePath();
  for (  ModuleNeeded module : modules) {
    File fileToDeploy=null;
    String moduleLocation=module.getModuleLocaion();
    Set<String> toDeploy=new HashSet<String>();
    if (module.getMavenUri() == null && mavenIndex.get(module.getModuleName()) != null) {
      final String[] split=mavenIndex.get(module.getModuleName()).split(MavenUrlHelper.MVN_INDEX_SPLITER);
      for (      String mvnUri : split) {
        toDeploy.add(mvnUri);
      }
    }
 else {
      toDeploy.add(module.getMavenUriSnapshot());
    }
    for (    String mavenUri : toDeploy) {
      if (checkJarInstalledInMaven(mavenUri)) {
        continue;
      }
      boolean found=false;
      if (moduleLocation != null && moduleLocation.startsWith("String_Node_Str")) {
        if (libIndex.containsKey(module.getModuleName())) {
          String relativePath=libIndex.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)) {
          libIndex.put(module.getModuleName(),moduleLocation);
          modified=true;
          found=true;
          fileToDeploy=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;
          fileToDeploy=new File(studioJarInstalled.get(relativePath));
        }
      }
      if (!found) {
        try {
          fileToDeploy=getJarFile(module.getModuleName());
        }
 catch (        MalformedURLException e) {
          ExceptionHandler.process(e);
        }
        if (fileToDeploy != null) {
          found=true;
        }
      }
      if (fileToDeploy != null && !fileToDeploy.exists()) {
        fileToDeploy=null;
        found=false;
      }
      if (!found) {
        ExceptionHandler.log("String_Node_Str" + module.getModuleName());
      }
      if (fileToDeploy != null) {
        deployFile(fileToDeploy,mavenUri,monitorWrap);
      }
    }
  }
  if (modified) {
    LibrariesIndexManager.getInstance().saveStudioIndexResource();
  }
}

Fixed version (ground truth):
/** 
 * deploy needed modules with snapshot version
 */
@Override public void deployModules(Collection<ModuleNeeded> modules,IProgressMonitor monitorWrap){
  boolean modified=false;
  EMap<String,String> libIndex=LibrariesIndexManager.getInstance().getStudioLibIndex().getJarsToRelativePath();
  EMap<String,String> mavenIndex=LibrariesIndexManager.getInstance().getMavenLibIndex().getJarsToRelativePath();
  for (  ModuleNeeded module : modules) {
    File fileToDeploy=null;
    String moduleLocation=module.getModuleLocaion();
    Set<String> toDeploy=new HashSet<String>();
    if (module.getMavenUri() == null && mavenIndex.get(module.getModuleName()) != null) {
      final String[] split=mavenIndex.get(module.getModuleName()).split(MavenUrlHelper.MVN_INDEX_SPLITER);
      for (      String mvnUri : split) {
        toDeploy.add(mvnUri);
      }
    }
 else {
      toDeploy.add(module.getMavenUriSnapshot());
    }
    for (    String mavenUri : toDeploy) {
      if (checkJarInstalledInMaven(mavenUri)) {
        continue;
      }
      boolean found=false;
      if (moduleLocation != null && moduleLocation.startsWith("String_Node_Str")) {
        if (libIndex.containsKey(module.getModuleName())) {
          String relativePath=libIndex.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)) {
          libIndex.put(module.getModuleName(),moduleLocation);
          modified=true;
          found=true;
          fileToDeploy=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;
          fileToDeploy=new File(studioJarInstalled.get(relativePath));
        }
      }
      if (!found) {
        try {
          fileToDeploy=getJarFile(module.getModuleName());
        }
 catch (        MalformedURLException e) {
          ExceptionHandler.process(e);
        }
        if (fileToDeploy != null) {
          found=true;
        }
      }
      if (fileToDeploy != null && !fileToDeploy.exists()) {
        fileToDeploy=null;
        found=false;
      }
      if (!found) {
        ExceptionHandler.log("String_Node_Str" + module.getModuleName());
      }
      if (fileToDeploy != null) {
        deployFile(fileToDeploy,mavenUri,false,monitorWrap);
      }
    }
  }
  if (modified) {
    LibrariesIndexManager.getInstance().saveStudioIndexResource();
  }
}