Closed GerardPaligot closed 9 years ago
At this point a check whether a specific child extends a a specific parent failed.
I assume this appeared in a Create Superclass test case and the inheritance relations have not been updated by the refactoring.
In this case the program is still executable but nothing changed, except for a new but unused class.
The failure message is maybe not the best one.
My conclude was the same but when I print the result in another directory to see generated sources, I see that child classes extends parent class:
package example04;
public class ChildClass1 extends example04.parent {
public static void main(java.lang.String[] args) {
}
public void method() {
java.lang.System.out.println("Hello World!");
}
}
package example04;
public class ChildClass2 extends example04.parent {
public void method() {
java.lang.System.out.println("Hello World!");
}
}
package example04;
public class parent {}
I assume this appeared in a Create Superclass test case
Yep. Sorry, I forgot to specify it.
Maybe we are not able to check the explicit given fully classified name correctly. I will check this.
Thanks. I'm waiting them because I can't test this refactoring for now.
I have pushed a new version of ARTE which now checks this correct.
I've updated my clone of java-refactoring-ttc project to get the new version of ARTE but the bug is still there.
execute --test pub_exs1_1
####################################################################
#################### Executing public tests. ####################
####################################################################
Executing test case: "pub_exs1_1"
Description:
EXS-POS: Create a superclass for two child classes not explicitly extending an other class.
SUCCESS: The java program has been compiled.
Output of execution before refactoring:
sssssssssssssss Triggering Program Graph Generation ssssssssssssssss
avr. 23, 2015 9:15:34 AM fr.inria.SpoonTtc createProgramGraph
INFOS: parse /var/folders/yd/kdk6_3wn4fvc71sblyjpgnn80000gn/T/tmp_ttc/paper-example04
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
ssssssssssss Triggering Extract Superclass Refactoring ssssssssssss
avr. 23, 2015 9:15:34 AM fr.inria.SpoonTtc applyCreateSuperclass
INFOS: create superclass: example04.parent
avr. 23, 2015 9:15:34 AM fr.inria.SpoonTtc applyCreateSuperclass
INFOS: change child: example04.ChildClass1
avr. 23, 2015 9:15:34 AM fr.inria.SpoonTtc applyCreateSuperclass
INFOS: change child: example04.ChildClass2
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
ssssssssssss Triggering Synchronization with Java Code ssssssssssss
avr. 23, 2015 9:15:34 AM fr.inria.SpoonTtc synchronizeChanges
INFOS: will print to /var/folders/yd/kdk6_3wn4fvc71sblyjpgnn80000gn/T/tmp_ttc/paper-example04/src
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
FAILURE: Implementation of specific class expected but is not implemented. (false-negative)
Output of execution after refactoring:
SUCCESS: Output before and after refactoring are equal.
--------------------------------------------------------------------
FAILURE: Test case "pub_exs1_1" has not been executed successfully.
The solution needed 0,002 seconds for execution.
--------------------------------------------------------------------
####################################################################
#################### Summary of test results. ####################
####################################################################
The test case "pub_exs1_1" was executed with status "FAILURE".
At least this test should work as I've tested it with your solution.
Can you Plesse send me the jar-File oft your solution.
or mvn clean assembly:assembly
on this project.
On my system your solution runs successful
####################################################################
#################### Executing public tests. ####################
####################################################################
Executing test case: "pub_exs1_1"
Description:
EXS-POS: Create a superclass for two child classes not explicitly extending an other class.
SUCCESS: The java program has been compiled.
Output of execution before refactoring:
sssssssssssssss Triggering Program Graph Generation ssssssssssssssss
Apr 23, 2015 10:09:29 AM fr.inria.SpoonTtc createProgramGraph
INFORMATION: parse /tmp/tmp_ttc/paper-example04
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
ssssssssssss Triggering Extract Superclass Refactoring ssssssssssss
Apr 23, 2015 10:09:30 AM fr.inria.SpoonTtc applyCreateSuperclass
INFORMATION: create superclass: example04.parent
Apr 23, 2015 10:09:30 AM fr.inria.SpoonTtc applyCreateSuperclass
INFORMATION: change child: example04.ChildClass1
Apr 23, 2015 10:09:30 AM fr.inria.SpoonTtc applyCreateSuperclass
INFORMATION: change child: example04.ChildClass2
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
ssssssssssss Triggering Synchronization with Java Code ssssssssssss
Apr 23, 2015 10:09:30 AM fr.inria.SpoonTtc synchronizeChanges
INFORMATION: will print to /tmp/tmp_ttc/paper-example04/src
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
Output of execution after refactoring:
SUCCESS: Output before and after refactoring are equal.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
SUCCESS: Test case "pub_exs1_1" has been executed SUCCESSFULLY.
The solution needed 0,02 seconds for execution.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
####################################################################
#################### Summary of test results. ####################
####################################################################
The test case "pub_exs1_1" was executed with status "SUCCESS".
Summary of the test results:
+ 100% of the test cases were executed successfull
? 0% of the test cases ended in a warning but were still successful.
- 0% of the test cases resulted in a failure.
I think this problem and your second problem are related and are due to some MAC specific reasons.
I will try to fix it.
I have created a version of ARTE with additional debug messages for you.
Can you please execute the test cases of your two issues and post the results.
https://www.dropbox.com/s/ojq7augwif3exgn/ARTEDebugGerardPaligot.zip?dl=0
With this version, the test is green:
execute --test pub_exs1_1
####################################################################
#################### Executing public tests. ####################
####################################################################
Executing test case: "pub_exs1_1"
Description:
EXS-POS: Create a superclass for two child classes not explicitly extending an other class.
SUCCESS: The java program has been compiled.
Output of execution before refactoring:
sssssssssssssss Triggering Program Graph Generation ssssssssssssssss
avr. 23, 2015 11:02:01 AM fr.inria.SpoonTtc createProgramGraph
INFOS: parse /var/folders/yd/kdk6_3wn4fvc71sblyjpgnn80000gn/T/tmp_ttc/paper-example04
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
ssssssssssss Triggering Extract Superclass Refactoring ssssssssssss
avr. 23, 2015 11:02:01 AM fr.inria.SpoonTtc applyCreateSuperclass
INFOS: create superclass: example04.parent
avr. 23, 2015 11:02:01 AM fr.inria.SpoonTtc applyCreateSuperclass
INFOS: change child: example04.ChildClass1
avr. 23, 2015 11:02:01 AM fr.inria.SpoonTtc applyCreateSuperclass
INFOS: change child: example04.ChildClass2
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
Print java program
Proces java file: /var/folders/yd/kdk6_3wn4fvc71sblyjpgnn80000gn/T/tmp_ttc/paper-example04/src/example04/ChildClass1.java
### Content:
> package example04;
>
> public class ChildClass1 {
>
> public static void main(String[] args) {
> // TODO Auto-generated method stub
>
> }
>
> public void method(){
> System.out.println("Hello World!");
> }
>
> }
###
Proces java file: /var/folders/yd/kdk6_3wn4fvc71sblyjpgnn80000gn/T/tmp_ttc/paper-example04/src/example04/ChildClass2.java
### Content:
> package example04;
>
> public class ChildClass2 {
>
> public void method(){
> System.out.println("Hello World!");
> }
>
> }
###
ssssssssssss Triggering Synchronization with Java Code ssssssssssss
avr. 23, 2015 11:02:01 AM fr.inria.SpoonTtc synchronizeChanges
INFOS: will print to /var/folders/yd/kdk6_3wn4fvc71sblyjpgnn80000gn/T/tmp_ttc/paper-example04/src
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
Print java program
Proces java file: /var/folders/yd/kdk6_3wn4fvc71sblyjpgnn80000gn/T/tmp_ttc/paper-example04/src/example04/ChildClass1.java
### Content:
> package example04;
>
>
> public class ChildClass1 extends example04.parent {
> public static void main(java.lang.String[] args) {
> }
>
> public void method() {
> java.lang.System.out.println("Hello World!");
> }
> }
>
###
Proces java file: /var/folders/yd/kdk6_3wn4fvc71sblyjpgnn80000gn/T/tmp_ttc/paper-example04/src/example04/ChildClass2.java
### Content:
> package example04;
>
>
> public class ChildClass2 extends example04.parent {
> public void method() {
> java.lang.System.out.println("Hello World!");
> }
> }
>
###
Proces java file: /var/folders/yd/kdk6_3wn4fvc71sblyjpgnn80000gn/T/tmp_ttc/paper-example04/src/example04/parent.java
### Content:
> package example04;
>
>
> public class parent {}
>
###
Output of execution after refactoring:
SUCCESS: Output before and after refactoring are equal.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
SUCCESS: Test case "pub_exs1_1" has been executed SUCCESSFULLY.
The solution needed 0,016 seconds for execution.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
####################################################################
#################### Summary of test results. ####################
####################################################################
The test case "pub_exs1_1" was executed with status "SUCCESS".
Summary of the test results:
+ 100 % of the test cases were executed successfull
? 0 % of the test cases ended in a warning but were still successful.
- 0 % of the test cases resulted in a failure.
Have you also tested the hidden test cases with this version?
Have you also tested the hidden test cases with this version?
It doesn't work.
execute --test hidden_pum1_2
####################################################################
#################### Executing public tests. ####################
####################################################################
There is no test case "hidden_pum1_2" in the test suite.
Can you update the jar file of this Git project with the custom version given here?
There should already be a version online with all the changes from the custom version.
Sorry, I forgot to mention it here.
Especially in the test cases were some bug fixes, so please update to the public version.
Yep, everything is ok.
I would like to know what is the meaning of this message from ARTE:
Because my method of the refactoring returns true and prints well refactored files.
Thanks in advance!