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

Unable to use GZoltar on Command-Line #52

Open
riteshreddy99 opened this issue Apr 11, 2022 · 14 comments
Open

Unable to use GZoltar on Command-Line #52

riteshreddy99 opened this issue Apr 11, 2022 · 14 comments

Comments

@riteshreddy99
Copy link

Context

Hi, @jose,
I tried running the tool on terminal on Ubuntu and it is not able run the command mvn package .

Steps to Reproduce

Ran mvn package command to start GZoltar

GZoltar arguments

Command-Line Interface*

Environment (please complete the following information, if relevant):

-Distributor ID: Ubuntu
-Description: Ubuntu 20.04.4 LTS
-Release: 20.04
openjdk 11.0.14.1 2022-02-08
OpenJDK Runtime Environment (build 11.0.14.1+1-Ubuntu-0ubuntu1.20.04)
OpenJDK 64-Bit Server VM (build 11.0.14.1+1-Ubuntu-0ubuntu1.20.04, mixed mode, shari

Thanks! Would appreciate an early respons
gzoltar
e

@jose
Copy link
Member

jose commented Apr 12, 2022

Hi @riteshreddy99,

I'm confused. Can't you compile GZoltar ou can't you run GZoltar from the command line?

  • From your instructions and screenshot it seems you're having problems compiling it because some GZoltar's tests are failing. It might be they are indeed failing due to a fault or it might be they are simplying failing because you are not using the recommend Java version (i.e., JDK 8). I would recommend you compile GZoltar with mvn clean package -DskipTests.

  • From this issue's title it seems you're having problems running GZoltar on the command line but I failed to see how, as the instructions point to the compilation of GZoltar.

--
Best,
Jose

@riteshreddy99
Copy link
Author

Yeah that was the issue, I was not using JDK 8. After switching to JDK 8 the build was successful. Could you please help me out on how I can use the GZoltar VSCode extension on these two datasets containing java projects.

https://github.com/jkoppel/QuixBugs

https://github.com/Spirals-Team/IntroClassJava

Thanks.
Ritesh

@jose
Copy link
Member

jose commented Apr 14, 2022

  • Projects on QuixBugs do not follow the standard structure used in Java/Maven projects and therefore you will have a very hard time just importing them to VSCode.

  • Project on IntroClassJava, on the other hand, seem to follow the standard structure used in Java/Maven projects. I haven't tried VSCode + GZoltar + IntroClassJava, but I would say you would have to:

  1. Open VSCode.
  2. Import a single project, e.g., https://github.com/Spirals-Team/IntroClassJava/tree/master/dataset/checksum/08c7ea4ac39aa6a5ab206393bb4412de9d2c365ecdda9c1b391be963c1811014ed23d2722d7433b8e8a95305eee314d39da4950f31e01f9147f90af91a5c433a/006.
  3. Run GZoltar as described in here.

--
Best,
Jose

@riteshreddy99
Copy link
Author

Is there any other dataset I could use to test the tool on other than the https://github.com/jkoppel/QuixBugs

@jose
Copy link
Member

jose commented Apr 15, 2022

Yes, there are many others you could use, e.g.: Bugs.jar, Bears, and of course the well known Defects4J.

@riteshreddy99
Copy link
Author

Thanks! I will check it out.

@riteshreddy99
Copy link
Author

For some reason GZoltar is unable to detect the open folder of the IntroClassJava project. What could be the issue?

Gzoltar_vscode

@riteshreddy99
Copy link
Author

Hey @jose,
This is the error I'm facing upon trying to test the example GZoltar maven projects. Please take a look.
Thanks,
Ritesh
gzoltar-error

@jose
Copy link
Member

jose commented Apr 17, 2022

For some reason GZoltar is unable to detect the open folder of the IntroClassJava project. What could be the issue?

By just looking at the screenshot it is impossible to guess what the issue could be as I don't see any error message of any kind.

This is the error I'm facing upon trying to test the example GZoltar maven projects. Please take a look.

It seens your IDE is complaining of a missing runtime dependency. Have you managed to successfully compile/package GZoltar?

--
Best,
Jose

@riteshreddy99
Copy link
Author

I just installed the GZoltar Extension from the VSCode Marketplace.

@jose
Copy link
Member

jose commented Apr 17, 2022

And that's fine, but the project you're using (i.e., maven-examples) requires you to successfully compile GZoltar first.

--
Best,
Jose

@riteshreddy99
Copy link
Author

mvn clean test-compile
mvn -P sufire gzoltar:prepare-agent test
mvn gzoltar:fl-report

This is what is supposed to be run?

@jose
Copy link
Member

jose commented Apr 17, 2022

This is what is supposed to be run?

No. As described in this README file, those are the commands to run the maven-examples from the command line using "Online instrumentation with maven-sufire test case executor".

That same README file also says:

Note that the GZoltar project must be 'packaged' before running any of the usage examples described below, i.e., mvn package must be executed on the root directory.

which is exactly what I was trying to tell you.

@riteshreddy99
Copy link
Author

Okay, so I ran mvn package

Upon, trying to open vulnerability report an error pops up.

gzoltar-maven

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