This CSR refactoring tries applyCreateSuperClass([hidden.program.two.ChildClass1, hidden.program.two.ChildClass2], hidden.program.two.NewParent) which cannot work because ChildClass1 has ParentClass as superclass while ChildClass2 doesn't. Therefore, my transformation doesn't apply that refactoring and the sources stay unchanged.
But the assertions still want the refactoring to have taken place:
Executing hidden test case: "hidden_csc2_1"
Description:
Have a look on inheritance relations.
SUCCESS: The java program has been compiled.
Output of execution before refactoring:
k=3
k=3
sssssssssssssss Triggering Program Graph Generation ssssssssssssssss
createProgramGraph(/tmp/tmp_ttc/hiddenProgram2)
Parsing file /tmp/tmp_ttc/hiddenProgram2/src/hidden/program/two/ParentClass.java... Done
Parsing file /tmp/tmp_ttc/hiddenProgram2/src/hidden/program/two/ChildClass3.java... Done
Parsing file /tmp/tmp_ttc/hiddenProgram2/src/hidden/program/two/ChildClass2.java... Done
Parsing file /tmp/tmp_ttc/hiddenProgram2/src/hidden/program/two/ChildClass1.java... Done
Base-package is hidden
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
ssssssssssss Triggering Extract Superclass Refactoring ssssssssssss
applyCreateSuperClass([hidden.program.two.ChildClass1, hidden.program.two.ChildClass2], hidden.program.two.NewParent)
The create-superclass rule didn't match!
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
ssssssssssss Triggering Synchronization with Java Code ssssssssssss
Deleting folder /home/horn/tmp/JR/not_executable_exs_1-before
Copying /tmp/tmp_ttc/hiddenProgram2 to /home/horn/tmp/JR/not_executable_exs_1-before
synchronizeChanges(): 0 changes to be applied
Saving resource to /tmp/tmp_ttc/hiddenProgram2/src/hidden/program/two/ParentClass.java
Saving resource to /tmp/tmp_ttc/hiddenProgram2/src/hidden/program/two/ChildClass3.java
Saving resource to /tmp/tmp_ttc/hiddenProgram2/src/hidden/program/two/ChildClass2.java
Saving resource to /tmp/tmp_ttc/hiddenProgram2/src/hidden/program/two/ChildClass1.java
Deleting folder /home/horn/tmp/JR/not_executable_exs_1-after
Copying /tmp/tmp_ttc/hiddenProgram2 to /home/horn/tmp/JR/not_executable_exs_1-after
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
FAILURE: Extension of "hidden.program.two.NewParent" expected but "hidden.program.two.ParentClass" has been extended. (false-negative)
Output of execution after refactoring:
k=3
k=3
SUCCESS: Output before and after refactoring are equal.
This CSR refactoring tries
applyCreateSuperClass([hidden.program.two.ChildClass1, hidden.program.two.ChildClass2], hidden.program.two.NewParent)
which cannot work becauseChildClass1
hasParentClass
as superclass whileChildClass2
doesn't. Therefore, my transformation doesn't apply that refactoring and the sources stay unchanged.But the assertions still want the refactoring to have taken place: