During refactoring for #59 I found the following possible bug in preliminary/pattern/semantic/MoveElse.java. I did not test if this is actually a bug, but I'm pretty sure.
The following lines (38-42 on 93f836e)
Collection<DiffNode> commonAddElse = annotationNode.getAllChildren();
commonAddElse.retainAll(annotationNode.getParent(AFTER).getAllChildren());
Collection<DiffNode> commonRemElse = removedElse.getAllChildren();
commonRemElse.retainAll(annotationNode.getParent(AFTER).getAllChildren());
modify the collection returned by DiffNode.getAllChildren by using Collection.retainAll. The problem is that DiffNode.getAllChildren returns an unmodifiable collection since 0a4b318. Therefore this will result in an UnsupportedOperationException exception.
During refactoring for #59 I found the following possible bug in
preliminary/pattern/semantic/MoveElse.java. I did not test if this is actually a bug, but I'm pretty sure.The following lines (38-42 on 93f836e)
modify the collection returned by
DiffNode.getAllChildrenby usingCollection.retainAll. The problem is thatDiffNode.getAllChildrenreturns an unmodifiable collection since 0a4b318. Therefore this will result in anUnsupportedOperationExceptionexception.