CPD Results

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

Duplications

FileLine
info/magnolia/cms/gui/dialog/DialogButtonSet.java105
info/magnolia/cms/gui/dialog/DialogSelect.java95
                options.add(option);
            }
        }
        catch (RepositoryException e) {
            if (log.isDebugEnabled()) {
                log.debug("Exception caught: " + e.getMessage(), e); //$NON-NLS-1$
            }
        }
        this.setOptions(options);
    }

    protected Collection getOptionNodes(Content configNode) throws PathNotFoundException, RepositoryException, AccessDeniedException {
        Content optionsNode = null;

        if(configNode.hasContent("options")){
            optionsNode = configNode.getContent("options"); //$NON-NLS-1$
        }
        else{
            String repository = this.getConfigValue("repository", ContentRepository.WEBSITE);
            String path = this.getConfigValue("path");
            if(StringUtils.isNotEmpty(path)){
                optionsNode = ContentUtil.getContent(repository, path);
            }
        }

        if(optionsNode != null){
            return ContentUtil.getAllChildren(optionsNode);
        }
        return new ArrayList();
    }

    /**
     * @see info.magnolia.cms.gui.dialog.DialogControl#init(HttpServletRequest, HttpServletResponse, Content, Content)
     */
    public void init(HttpServletRequest request, HttpServletResponse response, Content websiteNode, Content configNode)
FileLine
info/magnolia/cms/gui/dialog/DialogEditWithButton.java91
info/magnolia/cms/gui/dialog/DialogEditWithCustomButtons.java137
        Edit control = new Edit(this.getName(), this.getValue());
        control.setType(this.getConfigValue("type", PropertyType.TYPENAME_STRING)); //$NON-NLS-1$
        if (this.getConfigValue("saveInfo").equals("false")) { //$NON-NLS-1$ //$NON-NLS-2$
            control.setSaveInfo(false);
        }
        control.setCssClass(CssConstants.CSSCLASS_EDIT);
        control.setRows(this.getConfigValue("rows", "1")); //$NON-NLS-1$ //$NON-NLS-2$
        control.setCssStyles("width", "100%"); //$NON-NLS-1$ //$NON-NLS-2$
        if (this.getConfigValue("onchange", null) != null) { //$NON-NLS-1$
            control.setEvent("onchange", this.getConfigValue("onchange")); //$NON-NLS-1$ //$NON-NLS-2$
        }
        this.drawHtmlPre(out);
        String width = this.getConfigValue("width", "95%"); //$NON-NLS-1$ //$NON-NLS-2$
        out.write("<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"" + width + "\">"); //$NON-NLS-1$ //$NON-NLS-2$
        out.write("<tr><td width=\"100%\"  class=\"" + CssConstants.CSSCLASS_EDITWITHBUTTON + "\">"); //$NON-NLS-1$ //$NON-NLS-2$