CPD Results

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

Duplications

FileLine
org/deegree/rendering/r2d/RenderHelper.java139
org/deegree/rendering/r2d/RenderHelper.java193
        } else {

            if ( !crs.equals( WGS84 ) ) {
                // transform the bounding box of the request to EPSG:4326
                GeometryTransformer trans = new GeometryTransformer( WGS84 );
                try {
                    bbox = trans.transform( bbox, crs );
                } catch ( IllegalArgumentException e ) {
                    LOG.error( "Unknown error", e );
                } catch ( TransformationException e ) {
                    LOG.error( "Unknown error", e );
                }
            }
            double dx = bbox.getSpan0() / mapWidth;
            double dy = bbox.getSpan1() / mapHeight;
            double minx = bbox.getMin().get0() + dx * ( mapWidth / 2d - 1 );
            double miny = bbox.getMin().get1() + dy * ( mapHeight / 2d - 1 );
            double maxx = bbox.getMin().get0() + dx * ( mapWidth / 2d );
            double maxy = bbox.getMin().get1() + dy * ( mapHeight / 2d );
FileLine
org/deegree/rendering/r2d/strokes/TextStroke.java353
org/deegree/rendering/r2d/strokes/TextStroke.java404
        double upsideDown = 0, total = 0;

        while ( !it.isDone() ) {
            int type = it.currentSegment( points );
            switch ( type ) {
            case PathIterator.SEG_MOVETO:
                moveX = lastX = points[0];
                moveY = lastY = points[1];

                break;

            case PathIterator.SEG_CLOSE:
                points[0] = moveX;
                points[1] = moveY;
                // Fall into....

            case PathIterator.SEG_LINETO:
                thisX = points[0];
                thisY = points[1];

                double dx = thisX - lastX;
                double dy = thisY - lastY;

                double distance = sqrt( dx * dx + dy * dy );