SDA SE Wiki

Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering

User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

research:cultivate:notepulluprefactoring [2018/05/09 01:59] (current)
Line 1: Line 1:
  
 +=== a simple example where pull up is not enough (and eclipse pull-up fails without warning if both methods are selected) ===
 +
 +
 +<Code lang-java>​
 +
 +public class A { }
 +
 +</​Code>​
 +
 +
 +
 +<Code lang-java>​
 +
 +public class B1 extends A {
 +
 + public void myMethod() {
 + int x = 3;
 + }
 +
 +}
 +
 +</​Code>​
 +
 +
 +
 +<Code lang-java>​
 +
 +public class B2 extends A {
 +
 + public void myMethod() {
 + int x = 4;
 + }
 +
 +}
 +
 +</​Code>​
 +
 +
 +=== Possible Enhancements to Pull Up ===
 +
 +  * using slices instead of statement order to compare methods
 +  * extract differences (-> template method)
 +  * handle same variables with different names
 +  * detect differently named methods that do the same thing
 +  * automatically create common superclass if possible
 +  * use interface and delegation if extraction of common superclas is not possible
 +  * handle type problems
research/cultivate/notepulluprefactoring.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019