Closed zqxyus closed 2 years ago
Hi @xy-whu
while reading the source code of Cardumen , i just wonde what is the difference between the two java files ./src/main/java/fr/inria/astor/approaches/cardumholes/Cardumen1HApproach.java, ./src-cardumen/main/java/fr/inria/astor/approaches/cardumen/CardumenApproach.java , which exist in the astor directory?
The file ./src/main/java/fr/inria/astor/approaches/cardumholes/Cardumen1HApproach.java
is just a prototype we did. You can ignore it and use ./src-cardumen/main/java/fr/inria/astor/approaches/cardumen/CardumenApproach.java
Cardument mines code templates from the code of the application under repair for creating a template-based search space. The second question arises that which part of source code implements the function?
The third question is how to add manual repair templates in Cardumen?
One way would be to overwrite the method loadIngredientPool
(https://github.com/SpoonLabs/astor/blob/bcc8463eeb00545f921f9216be694807014263ea/src-cardumen/main/java/fr/inria/astor/approaches/cardumen/CardumenApproach.java#L46) in order to create an Ingredient Pool with the ingredients you wish (in Cardumen, an ingredient is a 'template').
Regards
Matias
I have downloaded astor and built successfully. When i am trying to use Cardumen tool to repair bugs, it seems that i really works. However, while reading the source code of Cardumen , i just wonde what is the difference between the two java files ./src/main/java/fr/inria/astor/approaches/cardumholes/Cardumen1HApproach.java,
./src-cardumen/main/java/fr/inria/astor/approaches/cardumen/CardumenApproach.java , which exist in the astor directory?
According to the descriptions mentioned in the paper proposing Cardumen, Cardument mines code templates from the code of the application under repair for creating a template-based search space. The second question arises that which part of source code implements the function?
The third question is how to add manual repair templates in Cardumen? After scanning the source code, i have no idea what to do?