CPD Results

The following document contains the results of PMD's CPD 4.2.5.

Duplications

FileLine
info/magnolia/ui/admincentral/shellapp/favorites/FavoritesEntry.java293
info/magnolia/ui/admincentral/shellapp/favorites/FavoritesGroup.java299
            listener.editGroup(relPath, titleField.getValue());
        }
        setEditable(false);
    }

    private class EnterKeyShortcutListener extends ShortcutListener {
        private FavoritesView.Listener listener;

        public EnterKeyShortcutListener(final FavoritesView.Listener listener) {
            super("", KeyCode.ENTER, null);
            this.listener = listener;
        }

        @Override
        public void handleAction(Object sender, Object target) {
            if (editable) {
                doEditTitle(listener);
            } else {
                setEditable(true);
            }
        }
    }

    private class EscapeKeyShortcutListener extends ShortcutListener {

        public EscapeKeyShortcutListener() {
            super("", KeyCode.ESCAPE, null);
        }

        @Override
        public void handleAction(Object sender, Object target) {
            reset();
        }
    }
}
FileLine
info/magnolia/ui/admincentral/shellapp/favorites/EntryDragAndDropWrapper.java60
info/magnolia/ui/admincentral/shellapp/favorites/GroupDragAndDropWrapper.java82
                    String groupToMove = ((FavoritesGroup) droppedComponent.getWrappedComponent()).getRelPath();
                    WrapperTransferable transferable = (WrapperTransferable) event.getTransferable();
                    WrapperTargetDetails details = (WrapperTargetDetails) event.getTargetDetails();
                    String verticalDropLocation = (String) details.getData("verticalLocation");

                    boolean isDragDown = (details.getMouseEvent().getClientY() - transferable.getMouseDownEvent().getClientY()) > 0;

                    if (isDragDown && (verticalDropLocation.equals(VerticalDropLocation.BOTTOM.name()) || verticalDropLocation.equals(VerticalDropLocation.MIDDLE.name()))) {
                        getListener().orderGroupAfter(groupToMove, group.getRelPath());