Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Running code_graph_gen.py #34

Open
Wendel6866799 opened this issue Jul 22, 2024 · 1 comment
Open

Error Running code_graph_gen.py #34

Wendel6866799 opened this issue Jul 22, 2024 · 1 comment

Comments

@Wendel6866799
Copy link

When I run the file as instructed: python code_graph_gen.py 1, the following error occurs:

Warning: Unknown option --params=filename=/home/diaowd/counterfactual-vulnerability-detection/cfexplainer/storage/processed/bigvul/after/188624.c
Jul 22, 2024 8:41:43 PM org.jline.utils.Log logr
WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)
executing /home/diaowd/counterfactual-vulnerability-detection/cfexplainer/storage/external/get_func_graph.scala
Missing argument: --filename
Expected Signature: exec
--filename
[07/22/2024 - 20:41:50] File "/home/diaowd/counterfactual-vulnerability-detection/cfexplainer/helpers/joern.py", line 228
Failed /home/diaowd/counterfactual-vulnerability-detection/cfexplainer/storage/processed/bigvul/after/188624.c: [Errno 2] No such file or directory: '/home/diaowd/counterfactual-vulnerability-detection/cfexplainer/storage/processed/bigvul/after/188624.c.edges.json'

How should this issue be resolved? Is there anyone kind enough to provide a solution?
Thanks

@Zhaoyang-Chu
Copy link
Collaborator

Sorry for the delayed response.

From the error message, it seems that the problem might be related to the version of Joern you have installed. Joern frequently updates, and newer versions might have changes in API or configuration parameters. I recommend installing Joern version 1.1.260 with the following commands:

wget https://github.com/joernio/joern/releases/download/v1.1.260/joern-install.sh
chmod +x ./joern-install.sh
printf 'Y\n/bin/joern\ny\n/usr/local/bin\n\n'  | sudo ./joern-install.sh --interactive

Additionally, if you encounter issues with generating the code graph, you might find this link helpful: https://drive.google.com/drive/folders/12iUTp4YFRG9qgAtqOV0hXRDpMZmvDp_O?usp=sharing. It contains key data for reproducing the results, including pre-generated code graph data in .pt format.

If you have further questions, please submit an issue in my repo here: https://github.com/Zhaoyang-Chu/counterfactual-vulnerability-detection/issues to ensure I can see it promptly. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants