CPD Results

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

Duplications

File Line
net\sourceforge\joceanus\jthemis\analysis\ThemisAnalysisClass.java 78
net\sourceforge\joceanus\jthemis\analysis\ThemisAnalysisInterface.java 86
final ThemisAnalysisContainer myParent = pParser.getParent();
        final ThemisAnalysisDataMap myParentDataMap = myParent.getDataMap();
        theDataMap = new ThemisAnalysisDataMap(myParentDataMap);

        /* If this is a local class */
        if (!(myParent instanceof ThemisAnalysisObject)
            &&  (!(myParent instanceof ThemisAnalysisFile))) {
            final int myId = myParentDataMap.getLocalId(theShortName);
            theFullName = myParent.determineFullChildName(myId + theShortName);

            /* else handle standard name */
        } else {
            theFullName = myParent.determineFullChildName(theShortName);
        }

        /* Handle generic variables */
        ThemisAnalysisLine myLine = pLine;
        if (ThemisAnalysisGeneric.isGeneric(pLine)) {
            /* Declare them to the properties */
            theProperties = theProperties.setGenericVariables(new ThemisAnalysisGenericBase(pParser, myLine));
            myLine = (ThemisAnalysisLine) pParser.popNextLine();
        }

        /* declare the class */
        theDataMap.declareObject(this);

        /* Parse the headers */
        final Deque<ThemisAnalysisElement> myHeaders = ThemisAnalysisBuilder.parseHeaders(pParser, myLine);
        theNumLines = myHeaders.size() + 1;

        /* Parse the body */
        final Deque<ThemisAnalysisElement> myLines = ThemisAnalysisBuilder.processBody(pParser);

        /* Create a parser */
        theContents = new ArrayDeque<>();
        final ThemisAnalysisParser myParser = new ThemisAnalysisParser(myLines, theContents, this);

        /* Resolve the generics */
        theProperties.resolveGeneric(myParser);

        /* Parse the ancestors and lines */
        theAncestors = myParser.parseAncestors(myHeaders);
        myParser.processLines();
    }
File Line
net\sourceforge\joceanus\jthemis\analysis\ThemisAnalysisClass.java 77
net\sourceforge\joceanus\jthemis\analysis\ThemisAnalysisEnum.java 84
theProperties = pLine.getProperties();
        final ThemisAnalysisContainer myParent = pParser.getParent();
        final ThemisAnalysisDataMap myParentDataMap = myParent.getDataMap();
        theDataMap = new ThemisAnalysisDataMap(myParentDataMap);

        /* If this is a local class */
        if (!(myParent instanceof ThemisAnalysisObject)
            &&  (!(myParent instanceof ThemisAnalysisFile))) {
            final int myId = myParentDataMap.getLocalId(theShortName);
            theFullName = myParent.determineFullChildName(myId + theShortName);

            /* else handle standard name */
        } else {
            theFullName = myParent.determineFullChildName(theShortName);
        }

        /* Handle generic variables */
        ThemisAnalysisLine myLine = pLine;
        if (ThemisAnalysisGeneric.isGeneric(pLine)) {
            /* Declare them to the properties */
            theProperties = theProperties.setGenericVariables(new ThemisAnalysisGenericBase(pParser, myLine));
            myLine = (ThemisAnalysisLine) pParser.popNextLine();
        }

        /* declare the class */
        theDataMap.declareObject(this);

        /* Parse the headers */
        final Deque<ThemisAnalysisElement> myHeaders = ThemisAnalysisBuilder.parseHeaders(pParser, myLine);
        theNumLines = myHeaders.size() + 1;

        /* Parse the body */
        final Deque<ThemisAnalysisElement> myLines = ThemisAnalysisBuilder.processBody(pParser);

        /* Create a parser */
        theContents = new ArrayDeque<>();
        final ThemisAnalysisParser myParser = new ThemisAnalysisParser(myLines, theContents, this);

        /* Resolve the generics */
        theProperties.resolveGeneric(myParser);

        /* Parse the ancestors and lines */
        theAncestors = myParser.parseAncestors(myHeaders);
File Line
net\sourceforge\joceanus\jthemis\analysis\ThemisAnalysisEnum.java 85
net\sourceforge\joceanus\jthemis\analysis\ThemisAnalysisInterface.java 86
final ThemisAnalysisContainer myParent = pParser.getParent();
        final ThemisAnalysisDataMap myParentDataMap = myParent.getDataMap();
        theDataMap = new ThemisAnalysisDataMap(myParentDataMap);

        /* If this is a local enum */
        if (!(myParent instanceof ThemisAnalysisObject)
                &&  (!(myParent instanceof ThemisAnalysisFile))) {
            final int myId = myParentDataMap.getLocalId(theShortName);
            theFullName = myParent.determineFullChildName(myId + theShortName);

            /* else handle standard name */
        } else {
            theFullName = myParent.determineFullChildName(theShortName);
        }

        /* Handle generic variables */
        ThemisAnalysisLine myLine = pLine;
        if (ThemisAnalysisGeneric.isGeneric(pLine)) {
            /* Declare them to the properties */
            theProperties = theProperties.setGenericVariables(new ThemisAnalysisGenericBase(pParser, myLine));
            myLine = (ThemisAnalysisLine) pParser.popNextLine();
        }

        /* declare the enum */
        theDataMap.declareObject(this);

        /* Parse the headers */
        final Deque<ThemisAnalysisElement> myHeaders = ThemisAnalysisBuilder.parseHeaders(pParser, myLine);
        theNumLines = myHeaders.size() + 1;

        /* Parse the body */
        final Deque<ThemisAnalysisElement> myLines = ThemisAnalysisBuilder.processBody(pParser);

        /* Create a parser */
        theContents = new ArrayDeque<>();
        final ThemisAnalysisParser myParser = new ThemisAnalysisParser(myLines, theContents, this);

        /* Resolve the generics */
        theProperties.resolveGeneric(myParser);

        /* Parse the ancestors and lines */
        theAncestors = myParser.parseAncestors(myHeaders);
File Line
net\sourceforge\joceanus\jthemis\analysis\ThemisAnalysisDoWhile.java 78
net\sourceforge\joceanus\jthemis\analysis\ThemisAnalysisWhile.java 79
theContents = new ArrayDeque<>();
        final ThemisAnalysisParser myParser = new ThemisAnalysisParser(myLines, theContents, this);
        myParser.processLines();
    }

    @Override
    public Deque<ThemisAnalysisElement> getContents() {
        return theContents;
    }

    @Override
    public Iterator<ThemisAnalysisStatement> statementIterator() {
        return Collections.singleton(theCondition).iterator();
    }

    @Override
    public ThemisAnalysisContainer getParent() {
        return theParent;
    }

    @Override
    public void setParent(final ThemisAnalysisContainer pParent) {
        theParent = pParent;
        theDataMap.setParent(pParent.getDataMap());
    }

    @Override
    public ThemisAnalysisDataMap getDataMap() {
        return theDataMap;
    }

    @Override
    public int getNumLines() {
        return theNumLines;
    }

    @Override
    public String toString() {
        return theCondition.toString();
    }
}
File Line
net\sourceforge\joceanus\jthemis\analysis\ThemisAnalysisBlock.java 74
net\sourceforge\joceanus\jthemis\analysis\ThemisAnalysisLambda.java 59
theParent = pParser.getParent();
        theDataMap = new ThemisAnalysisDataMap(theParent.getDataMap());

        /* Create the arrays */
        final Deque<ThemisAnalysisElement> myLines = ThemisAnalysisBuilder.processBody(pParser);

        /* Create a parser */
        theContents = new ArrayDeque<>();
        final ThemisAnalysisParser myParser = new ThemisAnalysisParser(myLines, theContents, this);
        myParser.processLines();
    }

    @Override
    public Deque<ThemisAnalysisElement> getContents() {
        return theContents;
    }

    @Override
    public ThemisAnalysisContainer getParent() {
        return theParent;
    }

    @Override
    public void setParent(final ThemisAnalysisContainer pParent) {
        theParent = pParent;
        theDataMap.setParent(pParent.getDataMap());
    }

    @Override
    public ThemisAnalysisDataMap getDataMap() {
        return theDataMap;
    }

    @Override
    public int getNumLines() {
        return theNumLines;
File Line
net\sourceforge\joceanus\jthemis\analysis\ThemisAnalysisClass.java 121
net\sourceforge\joceanus\jthemis\analysis\ThemisAnalysisInterface.java 137
}

    @Override
    public String getShortName() {
        return theShortName;
    }

    @Override
    public String getFullName() {
        return theFullName;
    }

    @Override
    public ThemisAnalysisDataMap getDataMap() {
        return theDataMap;
    }

    @Override
    public ThemisAnalysisProperties getProperties() {
        return theProperties;
    }

    @Override
    public Deque<ThemisAnalysisElement> getContents() {
        return theContents;
    }

    @Override
    public ThemisAnalysisContainer getParent() {
        return this;
    }

    @Override
    public List<ThemisAnalysisReference> getAncestors() {
        return theAncestors;
    }

    @Override
    public int getNumLines() {
        return theNumLines;
    }

    @Override
    public String toString() {
        return getShortName();
    }
}
File Line
net\sourceforge\joceanus\jthemis\analysis\ThemisAnalysisBlock.java 78
net\sourceforge\joceanus\jthemis\analysis\ThemisAnalysisFinally.java 72
final Deque<ThemisAnalysisElement> myLines = ThemisAnalysisBuilder.processBody(pParser);

        /* Create a parser */
        theContents = new ArrayDeque<>();
        final ThemisAnalysisParser myParser = new ThemisAnalysisParser(myLines, theContents, this);
        myParser.processLines();
    }

    @Override
    public Deque<ThemisAnalysisElement> getContents() {
        return theContents;
    }

    @Override
    public ThemisAnalysisContainer getParent() {
        return theParent;
    }

    @Override
    public void setParent(final ThemisAnalysisContainer pParent) {
        theParent = pParent;
        theDataMap.setParent(pParent.getDataMap());
    }

    @Override
    public ThemisAnalysisDataMap getDataMap() {
        return theDataMap;
    }

    @Override
    public int getNumLines() {
        return theNumLines;
    }