program-repair / RepairThemAll

Automatic Repair Framework that abstract repair tools and bug benchmarks
MIT License
68 stars 23 forks source link

How is the repair process going on? #4

Closed Kaka727 closed 5 years ago

Kaka727 commented 5 years ago

Hi, dear authors. Here is a picture from my repair.log image

I have read the source code and understand the prepare process of the repair task. But from this sentence on "Fault localization starts...", I do not find the corresponding code. I'd like to know how the repair process for each bug goes on. Where is the code that locates and repairs the bug. Is it integrated in the benchmark files or APR tools files?

fermadeiral commented 5 years ago

Hi @Kaka727.

Where is the code that locates and repairs the bug. Is it integrated in the benchmark files or APR tools files?

Indeed you will not find that code in this repository. It comes from the repair tool being executed. Note that repair tools are executed by their .jar file (see folder repair_tools). If you want to see the code of specific tools, you can find the link to them in our README.md.

Kaka727 commented 5 years ago

I got it. So how you build the .jar file? I mean, for example, CapGen contains a .jar file in its repository. Is it copied directly into this repository or something is added to create a more comprehensive .jar file. Thanks~

tdurieux commented 5 years ago

We only compiled and create a jar file from a specific commit of each tool, the commit of each tool is provided in the paper. And we follow the instructions provided in the readme when available

Kaka727 commented 5 years ago

So in this repository, where is the code that calls the .jar files in the folder repair_tools? I think it is related to RepairTool.py but I do not understand clearly.

Kaka727 commented 5 years ago

Hi, now I change my mind and believe the repair process is related to the localRunner.py since I find the require queue in it. But I am still confused about the parameters. Specially, see the following picture: image

When I execute jKali on Chart-5, the log records a list of parameters for calling the Astor.jar for repairing (e.g., the mode and dependencies). I do not understand how are these parameters delivered. Would you please help me? Thanks a lot.

fermadeiral commented 5 years ago

Hi, @Kaka727. We have a deadline for tomorrow morning related to this repository. We will come back to help you after this if it's ok for you.

Kaka727 commented 5 years ago

Thanks. Sorry for disturbing you and of course it is ok for me.

------------------ Original ------------------ From: Fernanda Madeiral notifications@github.com Date: Tue,Jun 11,2019 0:00 AM To: program-repair/RepairThemAll RepairThemAll@noreply.github.com Cc: Kaka727 1453505201@qq.com, Mention mention@noreply.github.com Subject: Re: [program-repair/RepairThemAll] How is the repair process going on? (#4)

Hi, @Kaka727. We have a deadline for tomorrow morning related to this repository. We will come back to help you after this if it's ok for you.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

fermadeiral commented 5 years ago

Hi @Kaka727.

Sorry for disturbing you

There is nothing to be sorry about :)

When I execute jKali on Chart-5, the log records a list of parameters for calling the Astor.jar for repairing (e.g., the mode and dependencies). I do not understand how are these parameters delivered.

Note that the LocalRunner.py you mentioned is related to RepairTask.py, which is related to the execution of a repair tool on a bug from a benchmark. RepairTask.py will call the function repair at some point, which is defined in the class of each repair tool (e.g. NPEFix) or repair framework (e.g. Astor, which contains jKali): these classes are in the folder script/core/repair_tools. Inside the function repair, a given tool is actually invoked by a command line. In such a command line, the parameters are delivered. For instance, for NPEFix, the parameters are passing in the repair function in the file script/core/repair_tools/NPEFix.py file.

I hope this help you.

I suggest you to describe to us what you are actually trying to do (i.e. your final goal) so we can be more specific in helping you.

Kaka727 commented 5 years ago

Thanks a lot. I have succeeded with your help. I try to make sub-frameworks like Astor execute under different FL strategies and now it works~

------------------ Original ------------------ From: Fernanda Madeiral notifications@github.com Date: Tue,Jun 11,2019 11:54 PM To: program-repair/RepairThemAll RepairThemAll@noreply.github.com Cc: Kaka727 1453505201@qq.com, Mention mention@noreply.github.com Subject: Re: [program-repair/RepairThemAll] How is the repair process going on? (#4)

Hi @Kaka727.

Sorry for disturbing you

There is nothing to be sorry about :)

When I execute jKali on Chart-5, the log records a list of parameters for calling the Astor.jar for repairing (e.g., the mode and dependencies). I do not understand how are these parameters delivered.

Note that the LocalRunner.py you mentioned is related to RepairTask.py, which is related to the execution of a repair tool on a bug from a benchmark. RepairTask.py will call the function repair at some point, which is defined in the class of each repair tool (e.g. NPEFix) or repair framework (e.g. Astor, which contains jKali): these classes are in the folder script/core/repair_tools. Inside the function repair, a given tool is actually invoked by a command line. In such a command line, the parameters are delivered. For instance, for NPEFix, the parameters are passing in the repair function in the file script/core/repair_tools/NPEFix.py file.

I hope this help you.

I suggest you to describe to us what you are actually trying to do (i.e. your final goal) so we can be more specific in helping you.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.