Skip to content

Troubleshooting

Vis Kirubakaran edited this page Apr 15, 2023 · 1 revision

Common Types of Errors

When running the CodeSmell tool, there are a few common types of errors that you may run into when analyzing projects. These can include ConnectionRefused or Invalid/Empty Directory.

Handling ConnectionRefusedError

ConnectionRefusedError occurs because the CodeSmell tool uses a random port between 8000-9999 on localhost (127.0.0.1) to start a local Joern server instance and then have a client connect to it to send requests, sometimes this does not work due to firewall settings.

In this case, the best course of action is to simply restart the tool as it will select a new port upon restart.

Handling Invalid/Empty Directory

Invalid/Empty directory occurs when the directory chosen contains no files of any kind, however, it should be noted that currently the CodeSmell tool only supports Java and that means the directory chosen should contain .java files.

It should also be noted that the chosen directory should avoid having test classes used for testing your project as the CodeSmell tool will take these into account as well which can take a long time during the setup/data retrieval process prior to code smell detection.