int y = elem.getY() + diffY;
if (elem.isSelected() && !canMoveElement(x, y, elem)) {
return false;
}
}
<BUG>for (ConnectionLine line : lines) {
if (line.isSelected() && !line.canMoveAllPoints(diffX, diffY)) {
</BUG>
return false;
<BUG>}</BUG>
}
for (Element elem : allElements) {
<BUG>int x = elem.getX() + diffX;
int y = elem.getY() + diffY;</BUG>
if (elem.isSelected()) {

int y = elem.getY() + diffY;
if (elem.isSelected() && !canMoveElement(x, y, elem)) {
return false;
