Getting error message "Code Recommenders cannot download its model repository index"

As written in the other answer, Code Recommenders has been archived due to lack of active maintainers, see this forum post.

Therefore when the plugin tries to download the models it fails because the site does not exist anymore, and you will see the following error dialog: Code Recommenders error dialog

While you could choose to ignore this download failure in the future, I am not sure if Code Recommenders actually does anything without its models (please correct me if I am wrong), so at this point you could also uninstall the plugin.

OR, you could download the models manually:

  1. Download the archived data of Code Recommenders: https://archive.eclipse.org/archived_projects/recommenders.tgz (9.7 GB!)
  2. Extract recommenders/downloads/models/photon
  3. In Eclipse: Open "Window" > "Preferences" > "Code Recommenders" > "Models"
  4. Remove the existing download.eclipse.org entry
  5. Add a new entry with a file URI pointing to the folder you extracted earlier. Note that you have to percent escape the URI, e.g.
    C:\Program Files\eclipse\recommenders becomes file:///C:/Program%20Files/eclipse/recommenders
  6. Click the "Apply" (and Close) button

Note however, that since you downloaded the files locally and there is no active development, you won't get recommendations for new Java features.


If you go to "Preferences"/"Code Recommenders"/"Models" you will see some Repository URL's listed. In my case it is http://download.eclipse.org/recommenders/models/photon/.

But when you call that URL you will get a 404 since the site has been archived in July 2019.

So this URL beeing invalid causes the Error. Since the URL is not available is seems save to silently ignore it, as beeing suggested in the error-dialog.

As beeing said in the Reviews on eclipse Marketplace the project is archived due to lack of comitting developers. And you may find an archived last version here: https://repo.eclipse.org/content/shadows/releases.unzip/org/eclipse/recommenders/stable/


I don't want any of you to have to download 10 gigabytes like in @Marcono1234's solution, so I re-uploaded version-specific code recommender models to mega.nz and shared them here.

  1. Download the code recommenders

For Eclipse Juno users: https://mega.nz/file/tuRFGYQD#zB_mq6XwO7nupLqMDRWQRnnhD3-FAgT3ijtDQyGvjFE

For Eclipse Kelper users: https://mega.nz/file/NjxXFYyb#uwpP3zxESL02prgTimhDL35xPXMnDkbDwzrhJG1rcgc

For Eclipse Luna users: https://mega.nz/file/02g1DASB#3GSzaKtFSGsxhdnNx2aX47DoD22ZZ6aUu9eXTUvoxKg

For Eclipse Mars users: https://mega.nz/file/xnQDTQLC#wmA0cfL_ChVHuQ9r0Mo_Js3ef_eDyg2yU6Z2_JTUPbE

For Eclipse Neon users: https://mega.nz/file/siBF1QYC#aVfX3-FS5sNfLmRqCPg6eUaovQPpEkMqIPWugv3E3qk

For Eclipse Oxygen users: https://mega.nz/file/9nAjUITQ#BpQ4HagdlrfZOelW8jqVgJWI-5QlA38JLCGpGoMbWpc

For Eclipse Photon users: https://mega.nz/file/oq5klCBR#vB8f0vmPH3gaYGwkw7U1SVThW5IxKMuvhBughN-sJi4

  1. Extract it to any folders you want (in my case, c:\workspaces\eclipse\recommenders)
  2. In Eclipse: Open "Window" > "Preferences" > "Code Recommenders" > "Models"
  3. Remove the default entry
  4. Add a file URL to the path you extracted your code recommender model. In my case, it's file://workspaces/eclipse/recommenders.
  5. Click the "Apply" (and Close) button
  6. Enjoy!

Tags:

Java

Eclipse