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

Looking for your help on integrating a repair tool to Repairnator #1257

Open
DehengYang opened this issue Aug 30, 2022 · 3 comments
Open

Looking for your help on integrating a repair tool to Repairnator #1257

DehengYang opened this issue Aug 30, 2022 · 3 comments

Comments

@DehengYang
Copy link

Dear the Repairnator Team,

Thank you for contributing the great Repairnator tool to the community. That's really an amazing tool to automate the repair process and aid practitioners in real-world scenarios.

I am trying to integrate a repair tool I developed (named "TransplantFix") into Repairnator. I mainly refer to the following links:

And during the exploration process, I have encountered the following problems, which I would like to report for your further guidance and help:

  1. Fail to replicate:
    I ran the command in https://github.com/eclipse/repairnator/blob/master/doc/README.md#travis-scanner:
git clone https://github.com/eclipse/repairnator/
cd repairnator/src/scripts/
# doc at https://github.com/eclipse/repairnator/blob/master/doc/scripts.md#launch_rtscannersh
bash launch_rtscanner.sh

But the error occurs:

[main] 16:08:35.579 INFO f.i.s.r.realtime.RTLauncher - Initialize file serializer engines.
[main] 16:08:35.581 INFO f.i.s.r.realtime.RTLauncher - MongoDB won't be used for serialization.
[main] 16:08:35.582 INFO f.i.s.r.realtime.RTLauncher - The summary email engine will not be used.
[main] 16:08:35.582 INFO f.i.s.r.realtime.RTLauncher - Init RTScanner...
[main] 16:08:35.582 INFO f.i.s.r.realtime.RTLauncher - RTScanner mode : REPAIR
[main] 16:08:35.582 INFO f.i.s.r.realtime.RTLauncher - Number of tools[Ljava.lang.String;@7f3b84b8
[main] 16:08:35.603 INFO f.i.s.r.r.DockerPipelineRunner - Init build runner
[main] 16:08:35.603 INFO f.i.s.r.r.DockerPipelineRunner - Init build runner
[main] 16:08:36.398 INFO f.i.s.r.r.DockerPipelineRunner - Executor service initialized with 4 threads.
[main] 16:08:36.401 INFO f.i.s.r.realtime.RTScanner - Init whitelist repository...
[main] 16:08:36.401 INFO f.i.s.r.realtime.RTScanner - Whitelist initialized with: 0 entries
[main] 16:08:36.401 INFO f.i.s.r.realtime.RTScanner - Init blacklist repository...
[main] 16:08:36.402 INFO f.i.s.r.realtime.RTScanner - Blacklist initialized with: 0 entries
[main] 16:08:36.402 INFO f.i.s.r.realtime.RTLauncher - Start RTScanner...
[main] 16:08:36.402 INFO f.i.s.r.realtime.RTScanner - Start running RTScanner...
[main] 16:08:36.431 INFO f.i.s.r.r.DockerPipelineRunner - Executor service initialized with 4 threads.
[Thread-0] 16:08:36.431 INFO f.i.s.r.realtime.InspectBuilds - Refresh all waiting build (nb builds: 0)
[Thread-2] 16:08:36.441 INFO f.i.s.r.r.InspectProcessDuration - The process will finish at: 2022-08-30T08:18:36.432Z
[Thread-1] 16:08:42.238 ERROR f.i.s.r.realtime.JobHelperv2 - Error while getting jobs from V2 API
java.io.IOException: The response answer to https://api.travis-ci.org/jobs is not 200: 500
at fr.inria.jtravis.helpers.AbstractHelper.checkResponse(AbstractHelper.java:84)
at fr.inria.jtravis.helpers.AbstractHelper.get(AbstractHelper.java:100)
at fr.inria.jtravis.helpers.AbstractHelper.get(AbstractHelper.java:123)
at fr.inria.jtravis.helpers.AbstractHelper.get(AbstractHelper.java:123)
at fr.inria.spirals.repairnator.realtime.JobHelperv2.allFromV2(JobHelperv2.java:38)
at fr.inria.spirals.repairnator.realtime.InspectJobs.run(InspectJobs.java:47)
at java.base/java.lang.Thread.run(Thread.java:834)
[Thread-0] 16:08:46.432 INFO f.i.s.r.realtime.InspectBuilds - Refresh all waiting build (nb builds: 0)
[Thread-0] 16:08:56.432 INFO f.i.s.r.realtime.InspectBuilds - Refresh all waiting build (nb builds: 0)
[Thread-1] 16:08:57.504 ERROR f.i.s.r.realtime.JobHelperv2 - Error while getting jobs from V2 API
java.io.IOException: The response answer to https://api.travis-ci.org/jobs is not 200: 500
at fr.inria.jtravis.helpers.AbstractHelper.checkResponse(AbstractHelper.java:84)
at fr.inria.jtravis.helpers.AbstractHelper.get(AbstractHelper.java:100)
at fr.inria.jtravis.helpers.AbstractHelper.get(AbstractHelper.java:123)
at fr.inria.jtravis.helpers.AbstractHelper.get(AbstractHelper.java:123)
at fr.inria.spirals.repairnator.realtime.JobHelperv2.allFromV2(JobHelperv2.java:38)
at fr.inria.spirals.repairnator.realtime.InspectJobs.run(InspectJobs.java:47)
at java.base/java.lang.Thread.run(Thread.java:834)

  1. Fail to package:

I ran:

cd src/repairnator-pipeline
mvn clean package

and got the following error:

[ERROR] Failed to execute goal on project repairnator-pipeline: Could not resolve dependencies for project fr.inria.repairnator:repairnator-pipeline:jar:3.3-SNAPSHOT: The following artifacts could not be resolved: eu.stamp-project:assert-fixer:jar:1.0.10, fr.inria.gforge.spirals:npefix:jar:0.8: Could not transfer artifact eu.stamp-project:assert-fixer:jar:1.0.10 from/to tdurieux-maven-repository-release (https://tdurieux.github.io/maven-repository/releases/): peer not authenticated -> [Help 1]

  1. Fail to debug the repairnator:

I have now deployed my repair tool into maven repository:

It is available by adding the following dependency:

<dependency>
  <groupId>io.github.dehengyang</groupId>
  <artifactId>mcrepair</artifactId>
  <version>1.0</version>
</dependency>

I then try to follow the guide of https://github.com/eclipse/repairnator/blob/master/doc/add-repair-tool.md, but I cannot find the entry point for debugging (i.e., public static void main() method). As debugging may help me understand the project faster, I would much appreciate it if any relevant guidance could be provided.

Thank you in advance for your time and help.

Yours sincerely,
Deheng

@monperrus
Copy link
Contributor

bash launch_rtscanner.sh

The shell scripts are meant for production. For development, it's easier to directly use the Java command-line:

cd src/repairnator-pipeline
mvn exec:java -Dexec.mainClass=fr.inria.spirals.repairnator.pipeline.Launcher -Dexec.args="--buildId=235838150"

I cannot find the entry point for debugging (i.e., public static void main() method)

I would suggest to debug the main method of fr.inria.spirals.repairnator.pipeline.Launcher from your IDE

@sofiabobadilla
Copy link
Contributor

Hi @DehengYang ,
I'm currently working in Repairnator to integrate a new tool, so I have seen some of the bugs you show.
I must warn you that a few docs are deprecated, but we are preparing a new version to add apps.
If you want, I can share the information I have collected so far and help you with the integration.
Feel free to email me at: sofbob@kth.se.
I will be more than happy to help. 😄

@DehengYang
Copy link
Author

Dear Prof. Monperrus @monperrus ,
Thank you very much for the prompt help and guidance!

Dear Sofia @Sofi1410 ,
That's really appreciated! I will take a try based on the guidance of Prof. Monperrus and get back here as soon as possible.
Thank you in advance for your great help!

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

3 participants