Program: 126144
Project: 126144
Buggy source:
@Override public String getJarPath(String jarName){
  String libPath=null;
  try {
    EMap<String,String> jarsToMavenUri=LibrariesIndexManager.getInstance().getMavenLibIndex().getJarsToRelativePath();
    String mavenUri=jarsToMavenUri.get(jarName);
    if (mavenUri == null) {
      mavenUri=mavenUriFromExtensions.get(jarName);
    }
    if (mavenUri != null) {
      libPath=mavenJarInstalled.get(mavenUri);
      if (libPath != null) {
        return libPath;
      }
    }
 else {
      mavenUri=MavenUrlHelper.generateMvnUrlForJarName(jarName);
      if (checkJarInstalledInMaven(mavenUri)) {
        libPath=mavenJarInstalled.get(mavenUri);
        if (libPath != null) {
          return libPath;
        }
      }
    }
    List<File> jarFiles=FilesUtils.getJarFilesFromFolder(getStorageDirectory(),jarName);
    if (jarFiles.size() > 0) {
      File file=jarFiles.get(0);
      libPath=file.getAbsolutePath();
    }
    EMap<String,String> jarsToRelative=LibrariesIndexManager.getInstance().getStudioLibIndex().getJarsToRelativePath();
    String relativePath=jarsToRelative.get(jarName);
    if (relativePath == null) {
      relativePath=platfromUriFromExtensions.get(jarName);
    }
    if (relativePath != null && relativePath.startsWith("String_Node_Str")) {
      boolean jarFound=checkJarInstalledFromPlatform(relativePath);
      if (jarFound) {
        libPath=studioJarInstalled.get(relativePath);
      }
    }
  }
 catch (  IOException e) {
    CommonExceptionHandler.process(e);
  }
catch (  Exception e) {
    CommonExceptionHandler.process(e);
  }
  return libPath;
}

Fixed version (ground truth):
@Override public String getJarPath(String jarName){
  String libPath=null;
  try {
    EMap<String,String> jarsToMavenUri=LibrariesIndexManager.getInstance().getMavenLibIndex().getJarsToRelativePath();
    String mavenUri=jarsToMavenUri.get(jarName);
    if (mavenUri == null) {
      mavenUri=mavenUriFromExtensions.get(jarName);
    }
    if (mavenUri == null) {
      mavenUri=MavenUrlHelper.generateMvnUrlForJarName(jarName);
    }
    libPath=mavenJarInstalled.get(mavenUri);
    if (libPath != null) {
      return libPath;
    }
 else     if (checkJarInstalledInMaven(mavenUri)) {
      libPath=mavenJarInstalled.get(mavenUri);
      if (libPath != null) {
        return libPath;
      }
    }
    List<File> jarFiles=FilesUtils.getJarFilesFromFolder(getStorageDirectory(),jarName);
    if (jarFiles.size() > 0) {
      File file=jarFiles.get(0);
      libPath=file.getAbsolutePath();
    }
    EMap<String,String> jarsToRelative=LibrariesIndexManager.getInstance().getStudioLibIndex().getJarsToRelativePath();
    String relativePath=jarsToRelative.get(jarName);
    if (relativePath == null) {
      relativePath=platfromUriFromExtensions.get(jarName);
    }
    if (relativePath != null && relativePath.startsWith("String_Node_Str")) {
      boolean jarFound=checkJarInstalledFromPlatform(relativePath);
      if (jarFound) {
        libPath=studioJarInstalled.get(relativePath);
      }
    }
  }
 catch (  IOException e) {
    CommonExceptionHandler.process(e);
  }
catch (  Exception e) {
    CommonExceptionHandler.process(e);
  }
  return libPath;
}