SDA SE Wiki

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

User Tools

Site Tools


Command disabled: backlink

a simple example where pull up is not enough (and eclipse pull-up fails without warning if both methods are selected)


public class A { }


public class B1 extends A {

	public void myMethod() {
		int x = 3;
	}

}


public class B2 extends A {

	public void myMethod() {
		int x = 4;
	}

}

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