tsantalis / JDeodorant

JDeodorant
https://marketplace.eclipse.org/content/jdeodorant
MIT License
139 stars 59 forks source link

Error while duplicate code removal #64

Closed mkgungor closed 6 years ago

mkgungor commented 6 years ago

When I try to do the same refactoring via watching this video https://www.youtube.com/watch?v=_WPtgG6JwJ8&t=601s

I faced the following Errors - could not proceed further. Your help will be appreciated.

image

Details: LineAndShapeRenderer.java ScatterRenderer.java

Look at getLegendItem() method in both classes.

tsantalis commented 6 years ago

We have updated the preconditions to make them more strict. In this particular example, there is a control dependence from statement if (isSeriesVisible(series) && isSeriesVisibleInLegend(series)) to statements boolean lineVisible = getItemLineVisible(series, 0); boolean shapeVisible = getItemShapeVisible(series, 0); that prevents moving these statements before the clone fragment