CPD Results

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

Duplications

FileLine
org/deegree/client/sos/utils/Writer.java48
org/deegree/client/sos/utils/Writer.java63
org/deegree/client/sos/utils/Writer.java78
org/deegree/client/sos/utils/Writer.java93
org/deegree/client/sos/utils/Writer.java108
org/deegree/client/sos/utils/Writer.java123
org/deegree/client/sos/utils/Writer.java138
org/deegree/client/sos/utils/Writer.java153
org/deegree/client/sos/utils/Writer.java168
org/deegree/client/sos/utils/Writer.java183
org/deegree/client/sos/utils/Writer.java198
            for ( OMElement element : storage.getCapabilities() ) {
                if ( !element.getText().trim().equals( "" ) ) {
                    printWriter.write( "<tr><td>" + element.getLocalName() + "</td>" );
                    printWriter.write( "<td>" + element.getText() + "</td></tr>" );
                }
                Iterator<OMAttribute> attributes;
                for ( attributes = element.getAllAttributes(); attributes.hasNext(); ) {
                    OMAttribute attribute = attributes.next();
                    printWriter.write( "<tr><td>" + element.getLocalName() + ": " + attribute.getLocalName() + "</td>" );
                    printWriter.write( "<td>" + attribute.getAttributeValue() + "</td></tr>" );
                }
            }
        }
        if ( storage.getCharacteristics().size() > 0 ) {
FileLine
org/deegree/client/sos/SOSClient.java165
org/deegree/client/sos/SOSClient.java212
                PrintWriter pw = response.getWriter();
                new Writer( pw, handler.getStorage() );
                pw.flush();
                pw.close();
            } catch ( IOException e ) {
                LOG.error( "Unexpected error:", e.getLocalizedMessage() );
                LOG.debug( "Stack trace:", e );
            }
        } else {
            try {
                PrintWriter pw = response.getWriter();
                new Writer( pw, handler.getException() );
                pw.flush();
                pw.close();
            } catch ( IOException e ) {
                LOG.error( "Unexpected error:", e.getLocalizedMessage() );
                LOG.debug( "Stack trace:", e );
            }
        }
    }

    private void doGetObservation( HttpServletRequest request, HttpServletResponse response ) {
FileLine
org/deegree/client/sos/utils/Writer.java48
org/deegree/client/sos/utils/Writer.java63
org/deegree/client/sos/utils/Writer.java78
org/deegree/client/sos/utils/Writer.java93
org/deegree/client/sos/utils/Writer.java108
org/deegree/client/sos/utils/Writer.java123
org/deegree/client/sos/utils/Writer.java138
org/deegree/client/sos/utils/Writer.java153
org/deegree/client/sos/utils/Writer.java168
org/deegree/client/sos/utils/Writer.java183
org/deegree/client/sos/utils/Writer.java198
org/deegree/client/sos/utils/Writer.java213
            for ( OMElement element : storage.getCapabilities() ) {
                if ( !element.getText().trim().equals( "" ) ) {
                    printWriter.write( "<tr><td>" + element.getLocalName() + "</td>" );
                    printWriter.write( "<td>" + element.getText() + "</td></tr>" );
                }
                Iterator<OMAttribute> attributes;
                for ( attributes = element.getAllAttributes(); attributes.hasNext(); ) {
                    OMAttribute attribute = attributes.next();
                    printWriter.write( "<tr><td>" + element.getLocalName() + ": " + attribute.getLocalName() + "</td>" );
                    printWriter.write( "<td>" + attribute.getAttributeValue() + "</td></tr>" );
                }
            }
        }
FileLine
org/deegree/client/sos/requesthandler/HandleDescribeSensor.java154
org/deegree/client/sos/requesthandler/HandleGetObservation.java184
    }

    /**
     * @return OWSException with containing exceptionCode, locator and exceptionText from the DescribeSensor response
     */
    private OWSException parseException() {
        OWSException result = new OWSException();
        String exceptionCode = "";
        String locator = "";
        String exceptionText = "";

        xpath = new XPath( "descendant::*", nsContext );
        List<OMElement> elements = xml.getElements( xml.getRootElement(), xpath );
        for ( OMElement element : elements ) {
            if ( element.getLocalName().equals( "Exception" ) ) {
                exceptionCode = element.getAttribute( new QName( "exceptionCode" ) ).getAttributeValue();
                locator = element.getAttribute( new QName( "locator" ) ).getAttributeValue();