Program: 125287
Project: 125287
Buggy source:
@Override public void download(URL componentUrl,File destination,IProgressMonitor progressMonitor) throws Exception {
  File resolved=null;
  boolean downloadFromCustomNexus=toInstall.isFromCustomNexus();
  String mvnUri=componentUrl.toExternalForm();
  MavenArtifact mArtifact=MavenUrlHelper.parseMvnUrl(mvnUri,false);
  if (mArtifact != null) {
    String repositoryUrl=mArtifact.getRepositoryUrl();
    if (StringUtils.isNotEmpty(repositoryUrl)) {
      final NexusServerBean customNexusServer=new NexusServerBean(false);
      customNexusServer.setServer(repositoryUrl);
      String username=mArtifact.getUsername();
      String password=mArtifact.getPassword();
      if (StringUtils.isNotEmpty(username)) {
        customNexusServer.setUserName(username);
        customNexusServer.setPassword(password);
      }
      String resolvedMvnUri=MavenUrlHelper.generateMvnUrl(mArtifact.getGroupId(),mArtifact.getArtifactId(),mArtifact.getVersion(),mArtifact.getType(),mArtifact.getClassifier());
      progressMonitor.subTask("String_Node_Str" + toInstall.getName() + "String_Node_Str"+ resolvedMvnUri+ "String_Node_Str"+ customNexusServer.getServer());
      ILibraryManagerService libManager=(ILibraryManagerService)GlobalServiceRegister.getDefault().getService(ILibraryManagerService.class);
      String decryptedMvnUri=MavenUrlHelper.generateMvnUrl(mArtifact);
      resolved=libManager.resolveJar(customNexusServer,decryptedMvnUri);
      if (resolved != null && resolved.exists()) {
        return;
      }
    }
  }
  if (downloadFromCustomNexus) {
    TalendLibsServerManager manager=TalendLibsServerManager.getInstance();
    final NexusServerBean customNexusServer=manager.getCustomNexusServer();
    if (customNexusServer != null) {
      progressMonitor.subTask("String_Node_Str" + toInstall.getName() + "String_Node_Str"+ mvnUri+ "String_Node_Str"+ customNexusServer.getServer());
      ILibraryManagerService libManager=(ILibraryManagerService)GlobalServiceRegister.getDefault().getService(ILibraryManagerService.class);
      resolved=libManager.resolveJar(customNexusServer,mvnUri);
    }
  }
  if (resolved != null && resolved.exists()) {
    return;
  }
  super.download(componentUrl,destination,progressMonitor);
}

Fixed version (ground truth):
@Override public void download(URL componentUrl,File destination,IProgressMonitor progressMonitor) throws Exception {
  File resolved=null;
  boolean downloadFromCustomNexus=toInstall.isFromCustomNexus();
  String mvnUri=componentUrl.toExternalForm();
  MavenArtifact mArtifact=MavenUrlHelper.parseMvnUrl(mvnUri,false);
  if (mArtifact != null) {
    String repositoryUrl=mArtifact.getRepositoryUrl();
    if (StringUtils.isNotEmpty(repositoryUrl)) {
      final NexusServerBean customNexusServer=new NexusServerBean(false);
      customNexusServer.setServer(repositoryUrl);
      customNexusServer.setAbsoluteURL(true);
      String username=mArtifact.getUsername();
      String password=mArtifact.getPassword();
      if (StringUtils.isNotEmpty(username)) {
        customNexusServer.setUserName(username);
        customNexusServer.setPassword(password);
      }
      String resolvedMvnUri=MavenUrlHelper.generateMvnUrl(mArtifact.getGroupId(),mArtifact.getArtifactId(),mArtifact.getVersion(),mArtifact.getType(),mArtifact.getClassifier());
      progressMonitor.subTask("String_Node_Str" + toInstall.getName() + "String_Node_Str"+ resolvedMvnUri+ "String_Node_Str"+ customNexusServer.getServer());
      ILibraryManagerService libManager=(ILibraryManagerService)GlobalServiceRegister.getDefault().getService(ILibraryManagerService.class);
      String decryptedMvnUri=MavenUrlHelper.generateMvnUrl(mArtifact);
      resolved=libManager.resolveJar(customNexusServer,decryptedMvnUri);
      if (resolved != null && resolved.exists()) {
        return;
      }
    }
  }
  if (downloadFromCustomNexus) {
    TalendLibsServerManager manager=TalendLibsServerManager.getInstance();
    final NexusServerBean customNexusServer=manager.getCustomNexusServer();
    if (customNexusServer != null) {
      progressMonitor.subTask("String_Node_Str" + toInstall.getName() + "String_Node_Str"+ mvnUri+ "String_Node_Str"+ customNexusServer.getServer());
      ILibraryManagerService libManager=(ILibraryManagerService)GlobalServiceRegister.getDefault().getService(ILibraryManagerService.class);
      resolved=libManager.resolveJar(customNexusServer,mvnUri);
    }
  }
  if (resolved != null && resolved.exists()) {
    return;
  }
  super.download(componentUrl,destination,progressMonitor);
}