CPD Results

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

Duplications

FileProjectLine
name/angoca/zemucan/core/syntactic/model/GraphAnswerTest.javaZemucan - Core - analyzers197
name/angoca/zemucan/core/syntactic/model/GraphAnswerTest.javaZemucan - Core - analyzers308
    public void testHashCodeDifferent() throws InvalidTokenException {
        final String phrase1 = GraphAnswerTest.CREATE_TABLE;
        final String option11 = GraphAnswerTest.TABLE;
        final String option12 = GraphAnswerTest.TABLESPACE;

        final String phrase2 = GraphAnswerTest.CREATE_TABLESPACE;
        final String option21 = GraphAnswerTest.TABLENAME;
        final String option22 = GraphAnswerTest.TABLESPACENAME;

        final List<Token> phrases1 = new ArrayList<Token>();
        phrases1.add(new Token(phrase1, true));
        final List<Token> options1 = new ArrayList<Token>();
        options1.add(new Token(option11, true));
        options1.add(new Token(option12, true));
        final GraphAnswer expected = new GraphAnswer(phrases1, options1);

        final List<Token> phrases2 = new ArrayList<Token>();
        phrases2.add(new Token(phrase2, true));
        final List<Token> options2 = new ArrayList<Token>();
        options2.add(new Token(option21, true));
        options2.add(new Token(option22, true));
        final GraphAnswer actual = new GraphAnswer(phrases2, options2);

        final boolean condition = expected.hashCode() != actual.hashCode();
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph794
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph858
    public void testMergeAndSimplify() throws AbstractZemucanException {
        final String graphName1 = GraphTest.GRAPH1;
        final String graphName2 = GraphTest.GRAPH2;
        final String create = GraphTest.CREATE;
        final Graph graph1 = new Graph(graphName1, false);
        final Graph graph2 = new Graph(graphName2, false);

        graph1.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph1.addNode(create, create, true);
        graph1.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph1.firstPhaseFinished();
        graph1.addRelation(Constants.STARTING_NODE, create);
        graph1.addRelation(create, Constants.ENDING_NODE);
        graph1.secondPhaseFinished();

        graph2.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph2.addNode(create, create, true);
        graph2.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph2.firstPhaseFinished();
        graph2.addRelation(Constants.STARTING_NODE, create);
        graph2.addRelation(create, Constants.ENDING_NODE);
        graph2.secondPhaseFinished();

        graph1.merge(graph2);
FileProjectLine
name/angoca/zemucan/core/syntactic/model/GraphAnswerTest.javaZemucan - Core - analyzers233
name/angoca/zemucan/core/syntactic/model/GraphAnswerTest.javaZemucan - Core - analyzers344
    public void testHashCodeIdentical() throws InvalidTokenException {
        final String phrase1 = GraphAnswerTest.CREATE;
        final String option1 = GraphAnswerTest.TABLE;
        final String option2 = GraphAnswerTest.TABLESPACE;

        final List<Token> phrases1 = new ArrayList<Token>();
        phrases1.add(new Token(phrase1, true));
        final List<Token> options1 = new ArrayList<Token>();
        options1.add(new Token(option1, true));
        options1.add(new Token(option2, true));
        final GraphAnswer expected = new GraphAnswer(phrases1, options1);

        final List<Token> phrases2 = new ArrayList<Token>();
        phrases2.add(new Token(phrase1, true));
        final List<Token> options2 = new ArrayList<Token>();
        options2.add(new Token(option1, true));
        options2.add(new Token(option2, true));
        final GraphAnswer actual = new GraphAnswer(phrases2, options2);
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1284
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1593
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_CREATE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // create Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_CREATE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_CREATE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_ENDING_NODE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // Ending Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_ENDING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_ENDING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKENS_2;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_2;

        final Graph graph = new Graph("delimiters", false); //$NON-NLS-1$
        final InputSource contentToParse = new InputSource(
                new StringReader(xml));
        final InputSource contentToValidate = new InputSource(new StringReader(
                xml));
        ImplementationXMLGrammarReaderTest.LOGGER.info("testNoDelimiters");
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1988
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph2019
        final Graph graph = new Graph(GraphTest.VALIDATED_TWICE, false);
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(GraphTest.TABLE, GraphTest.TABLE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph.firstPhaseFinished();
        graph.addRelation(Constants.STARTING_NODE, GraphTest.CREATE);
        graph.addRelation(Constants.STARTING_NODE, GraphTest.TABLE);
        graph.addRelation(GraphTest.CREATE, Constants.ENDING_NODE);
        graph.addRelation(GraphTest.TABLE, Constants.ENDING_NODE);
        graph.secondPhaseFinished();
        graph.addRelation(GraphTest.CREATE, GraphTest.TABLE);
        graph.secondPhaseFinished();

        final StartingNode node = graph.getStartingNode();

        final List<AbstractGraphNode> nodes = node.getChildren();

        Assert.assertEquals(GraphTest.QTY_OF_WAYS, 2, nodes.size());
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1900
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1929
        final Graph graph = new Graph(GraphTest.VALIDATED_GRAPH, false);
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(GraphTest.TABLE, GraphTest.TABLE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph.firstPhaseFinished();
        graph.addRelation(Constants.STARTING_NODE, GraphTest.CREATE);
        graph.addRelation(Constants.STARTING_NODE, GraphTest.TABLE);
        graph.addRelation(GraphTest.CREATE, Constants.ENDING_NODE);
        graph.addRelation(GraphTest.TABLE, Constants.ENDING_NODE);
        graph.secondPhaseFinished();

        final StartingNode node = graph.getStartingNode();

        final List<AbstractGraphNode> nodes = node.getChildren();

        Assert.assertEquals(GraphTest.QTY_OF_WAYS, 2, nodes.size());
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph991
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1124
        final Graph graph = new Graph(graphName, true); //$NON-NLS-1$
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph.firstPhaseFinished();
        graph.addRelation(Constants.STARTING_NODE, GraphTest.CREATE);
        graph.addRelation(GraphTest.CREATE, Constants.ENDING_NODE);
        graph.secondPhaseFinished();

        final StartingNode startingNode = graph.getStartingNode();

        final List<AbstractGraphNode> nodes = startingNode.getChildren();
        boolean found = false;
        for (final AbstractGraphNode node : nodes) {
            if (node.getId().equals(
                    graphName + ':' + Constants.LICENSE_TOKEN_ID)) {
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1956
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1988
        final Graph graph = new Graph("validated twice extra nodes", true); //$NON-NLS-1$
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(GraphTest.TABLE, GraphTest.TABLE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph.firstPhaseFinished();
        graph.addRelation(Constants.STARTING_NODE, GraphTest.CREATE);
        graph.addRelation(Constants.STARTING_NODE, GraphTest.TABLE);
        graph.addRelation(GraphTest.CREATE, Constants.ENDING_NODE);
        graph.addRelation(GraphTest.TABLE, Constants.ENDING_NODE);
        graph.secondPhaseFinished();
        graph.addRelation(GraphTest.CREATE, GraphTest.TABLE);
        graph.secondPhaseFinished();

        final StartingNode node = graph.getStartingNode();
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1131
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1242
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_CREATE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // create Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_CREATE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_CREATE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_ENDING_NODE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // Ending Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_ENDING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_ENDING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKENS_2;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_2;
        return xml;
    }

    /**
     * Tests that the configuration file has wrongly defined the delimiters.
     *
     * @throws AbstractZemucanException
     *             Never
     */
    @Test
    public void testEmptyDelimiters() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph342
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph2019
        final Graph graph = new Graph(GraphTest.VALIDATED_TWICE, false);
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(GraphTest.TABLE, GraphTest.TABLE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph.firstPhaseFinished();
        graph.addRelation(Constants.STARTING_NODE, GraphTest.CREATE);
        graph.addRelation(Constants.STARTING_NODE, GraphTest.TABLE);
        graph.addRelation(GraphTest.CREATE, Constants.ENDING_NODE);
        graph.addRelation(GraphTest.TABLE, Constants.ENDING_NODE);
        graph.secondPhaseFinished();
        graph.addRelation(GraphTest.CREATE, GraphTest.TABLE);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph342
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1988
        final Graph graph = new Graph("validated twice extra nodes", true); //$NON-NLS-1$
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(GraphTest.TABLE, GraphTest.TABLE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph.firstPhaseFinished();
        graph.addRelation(Constants.STARTING_NODE, GraphTest.CREATE);
        graph.addRelation(Constants.STARTING_NODE, GraphTest.TABLE);
        graph.addRelation(GraphTest.CREATE, Constants.ENDING_NODE);
        graph.addRelation(GraphTest.TABLE, Constants.ENDING_NODE);
        graph.secondPhaseFinished();
        graph.addRelation(GraphTest.CREATE, GraphTest.TABLE);
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1131
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1593
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_CREATE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // create Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_CREATE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_CREATE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_ENDING_NODE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // Ending Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_ENDING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_ENDING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKENS_2;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_2;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1242
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1284
                + ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_CREATE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // create Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_CREATE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_CREATE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_ENDING_NODE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // Ending Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_ENDING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_ENDING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKENS_2;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_2;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1179
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1437
                .info("testErrorBuildWithExtraTokens");
        ImplementationXMLGrammarReaderTest.LOGGER.debug(xml);
        final ImplementationXMLGrammarReader grammar = new ImplementationXMLGrammarReader(
                actual, contentToParse, contentToValidate);
        grammar.generateGraph();
        grammar.getStartingNode();

        final Graph expected = new Graph(
                ImplementationXMLGrammarReaderTest.NORMAL_GRAPH, false);
        expected
                .addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        expected.addNode(ImplementationXMLGrammarReaderTest.CREATE,
                ImplementationXMLGrammarReaderTest.CREATE, true);
        expected.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);

        expected.firstPhaseFinished();

        expected.addRelation(Constants.STARTING_NODE,
                ImplementationXMLGrammarReaderTest.CREATE);
        expected.addRelation(ImplementationXMLGrammarReaderTest.CREATE,
                Constants.ENDING_NODE);

        expected.secondPhaseFinished();

        Assert.assertFalse(
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1131
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1284
                + ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_CREATE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // create Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_CREATE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_CREATE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_ENDING_NODE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // Ending Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_ENDING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_ENDING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKENS_2;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_2;
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1182
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1315
        final Graph graph = new Graph("not going ending node", true); //$NON-NLS-1$
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(GraphTest.TABLE, GraphTest.TABLE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);

        graph.addNode(GraphTest.OTHER, GraphTest.OTHER, true);

        graph.firstPhaseFinished();
        graph.addRelation(Constants.STARTING_NODE, GraphTest.CREATE);
        graph.addRelation(GraphTest.CREATE, GraphTest.TABLE);
        graph.addRelation(GraphTest.TABLE, Constants.ENDING_NODE);

        graph.addRelation(GraphTest.TABLE, GraphTest.OTHER);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph342
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1929
        final Graph graph = new Graph(GraphTest.VALIDATED_GRAPH, false);
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(GraphTest.TABLE, GraphTest.TABLE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph.firstPhaseFinished();
        graph.addRelation(Constants.STARTING_NODE, GraphTest.CREATE);
        graph.addRelation(Constants.STARTING_NODE, GraphTest.TABLE);
        graph.addRelation(GraphTest.CREATE, Constants.ENDING_NODE);
        graph.addRelation(GraphTest.TABLE, Constants.ENDING_NODE);
        graph.secondPhaseFinished();
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph342
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1900
        final Graph graph = new Graph("validated extra nodes", true); //$NON-NLS-1$
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(GraphTest.TABLE, GraphTest.TABLE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph.firstPhaseFinished();
        graph.addRelation(Constants.STARTING_NODE, GraphTest.CREATE);
        graph.addRelation(Constants.STARTING_NODE, GraphTest.TABLE);
        graph.addRelation(GraphTest.CREATE, Constants.ENDING_NODE);
        graph.addRelation(GraphTest.TABLE, Constants.ENDING_NODE);
        graph.secondPhaseFinished();
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers727
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers767
        final List<Token> phraseIn = new ArrayList<Token>();
        // Bogus warning in the next lines, but it's a test case :)
        phraseIn.add(new Token(tokenIn1, true));
        phraseIn.add(new Token(tokenIn2, true));
        phraseIn.add(new Token(tokenIn3, true));
        phraseIn.add(new Token(tokenIn4, true));
        phraseIn.add(new Token(tokenIn5, true));
        phraseIn.add(new Token(tokenIn6, true));
        phraseIn.add(new Token(tokenIn7, true));
        phraseIn.add(new Token(tokenIn8, true));
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers584
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers618
    public void testGetOptions4options() throws AbstractZemucanException {
        final String tokenIn1 = ImplementationSyntacticAnalyzerTest.CREATE;
        final String tokenIn2 = ImplementationSyntacticAnalyzerTest.TABLE;
        final String tokenIn3 = ImplementationSyntacticAnalyzerTest.T1;
        final String tokenIn4 = ImplementationSyntacticAnalyzerTest.OPEN_PARENTHESIS;

        final String option1 = ImplementationSyntacticAnalyzerTest.COL_NAME;

        final List<Token> phraseIn = new ArrayList<Token>();
        phraseIn.add(new Token(tokenIn1, true));
        phraseIn.add(new Token(tokenIn2, true));
        phraseIn.add(new Token(tokenIn3, true));
        phraseIn.add(new Token(tokenIn4, true));
        final boolean endsWithSpace = false;
        final GraphAnswer graph = ImplementationSyntacticAnalyzer.getInstance()
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers238
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers1081
    public void testCase6() throws AbstractZemucanException {
        final String cmdIn = "db2 create tables"; //$NON-NLS-1$

        final ReturnOptions ret = ImplementationLexicalAnalyzer.getInstance()
                .analyzePhrase(cmdIn);

        final String actual = ret.getPhrase();

        final String expected = "db2 create tablespace";

        final int actualOptionsSize = ret.getOptions().length;
        final int actualPhrasesSize = ret.getPhrases().length;
        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        Assert.assertEquals("options: '" + cmdIn + "'", 0, actualOptionsSize);
        // The only option is added in the phrase.
        Assert.assertEquals("phrases: '" + cmdIn + "'", 0, actualPhrasesSize);
    }

    /**
     * Tests case 7: Zero phrases and multiples options. command 'db2 create'
     *
     * @throws AbstractZemucanException
     */
    @Test
    public void testCase7() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/tools/messages/executer/MessagesTest.javaZemucan - executer impl52
name/angoca/zemucan/tools/messages/MessagesTest.javaZemucan - Core - tools52
@RunWith(RandomTestRunner.class)
public final class MessagesTest {
    /**
     * Default constructor.
     */
    public MessagesTest() {
        // Nothing.
    }

    /**
     * Tests to obtain an empty message.
     */
    @Test(expected = AssertionError.class)
    public void testGetEmpty() {
        Messages.getString(""); //$NON-NLS-1$
    }

    /**
     * Tests to obtain a null message.
     */
    @Test(expected = AssertionError.class)
    public void testGetNull() {
        Messages.getString(null);
    }

    /**
     * Test the retrieve of a non existing message.
     */
    @Test
    public void testGetStringNotExistant() {
        final String name = "NOT_EXISTING_MESSAGE"; //$NON-NLS-1$

        final String actual = Messages.getString(name);

        final String expected = '¡' + name + '!';

        Assert.assertEquals("Not existing message", expected, actual); //$NON-NLS-1$
    }
}
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers735
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers957
    public void testCase1() throws AbstractZemucanException {
        final String cmdIn = "db2"; //$NON-NLS-1$

        final ReturnOptions ret = ImplementationLexicalAnalyzer.getInstance()
                .analyzePhrase(cmdIn);

        final String actual = ret.getPhrase();

        final String expected = "db2";

        final int actualOptionsSize = ret.getOptions().length;
        final int actualPhrasesSize = ret.getPhrases().length;
        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        // catalog, create, attach
        Assert.assertEquals("options: '" + cmdIn + "'", 3, actualOptionsSize);
        // db2ilist, db2auto, db2fm, db2fmcu
        Assert.assertEquals("phrases: '" + cmdIn + "'", 4, actualPhrasesSize);
    }
FileProjectLine
name/angoca/zemucan/core/syntactic/model/GraphAnswerTest.javaZemucan - Core - analyzers171
name/angoca/zemucan/core/syntactic/model/GraphAnswerTest.javaZemucan - Core - analyzers281
    public void testHashCode() throws InvalidTokenException {
        final String phrase1 = GraphAnswerTest.CREATE;
        final String option1 = GraphAnswerTest.TABLE;
        final String option2 = GraphAnswerTest.TABLESPACE;

        final List<Token> phrases = new ArrayList<Token>();
        phrases.add(new Token(phrase1, true));
        final List<Token> options = new ArrayList<Token>();
        options.add(new Token(option1, true));
        options.add(new Token(option2, true));
        final GraphAnswer object = new GraphAnswer(phrases, options);
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1127
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1384
    private String testEmptyGrammarText() {
        String xml = ""; //$NON-NLS-1$
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_OPEN;
        xml += ImplementationXMLGrammarReaderTest.DELIMITERS_DELIMITERS;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_CREATE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // create Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_CREATE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_CREATE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_ENDING_NODE_ID_TOKEN;
        xml += "    <idToken>STARTING_NODE</idToken>"; //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML247
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1340
    public void testEmptyGrammar() throws AbstractZemucanException {
        String xml = ""; //$NON-NLS-1$
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_OPEN;
        xml += ImplementationXMLGrammarReaderTest.DELIMITERS_DELIMITERS;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_ENDING_NODE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // Ending Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_ENDING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_ENDING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKENS_2;
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers689
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers767
        final List<Token> phraseIn = new ArrayList<Token>();
        // Bogus warning in the next lines, but it's a test case :)
        phraseIn.add(new Token(tokenIn1, true));
        phraseIn.add(new Token(tokenIn2, true));
        phraseIn.add(new Token(tokenIn3, true));
        phraseIn.add(new Token(tokenIn4, true));
        phraseIn.add(new Token(tokenIn5, true));
        phraseIn.add(new Token(tokenIn6, true));
        phraseIn.add(new Token(tokenIn7, true));
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers865
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers889
        final ReturnOptions ret = ImplementationLexicalAnalyzer.getInstance()
                .analyzePhrase(cmdIn);

        final String actual = ret.getPhrase();

        final String expected = "db2 create";

        final int actualOptionsSize = ret.getOptions().length;
        final int actualPhrasesSize = ret.getPhrases().length;
        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        Assert.assertEquals("options: '" + cmdIn + "'", 0, actualOptionsSize);
        Assert.assertEquals("phrases: '" + cmdIn + "'", 0, actualPhrasesSize);
    }

    /**
     * Tests the command ' db2 crea'
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @Test
    public void test8a() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers612
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers712
        final ReturnOptions ret = ImplementationLexicalAnalyzer.getInstance()
                .analyzePhrase(cmdIn);

        final String actual = ret.getPhrase();

        final String expected = "db2";

        final int actualOptionsSize = ret.getOptions().length;
        final int actualPhrasesSize = ret.getPhrases().length;
        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        // EMPTY
        Assert.assertEquals("options: '" + cmdIn + "'", 0, actualOptionsSize);
        // db2, db2ilist, db2auto, db2fm, db2fmcu
        Assert.assertEquals("phrases: '" + cmdIn + "'", 5, actualPhrasesSize);
    }

    /**
     * Tests the command 'db2'
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @Test
    public void test4() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers560
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers738
        final ReturnOptions ret = ImplementationLexicalAnalyzer.getInstance()
                .analyzePhrase(cmdIn);

        final String actual = ret.getPhrase();

        final String expected = "db2";

        final int actualOptionsSize = ret.getOptions().length;
        final int actualPhrasesSize = ret.getPhrases().length;
        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        // catalog, create, attach
        Assert.assertEquals("options: '" + cmdIn + "'", 3, actualOptionsSize);
        // db2ilist, db2auto, db2fm, db2fmcu
        Assert.assertEquals("phrases: '" + cmdIn + "'", 4, actualPhrasesSize);
    }

    /**
     * Tests the command 'db2 '
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @Test
    public void test5() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers191
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers1108
        final ReturnOptions ret = ImplementationLexicalAnalyzer.getInstance()
                .analyzePhrase(cmdIn);

        final String actual = ret.getPhrase();

        final String expected = "db2 create table";

        final int actualOptionsSize = ret.getOptions().length;
        final int actualPhrasesSize = ret.getPhrases().length;
        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        Assert.assertEquals("options: '" + cmdIn + "'", 2, actualOptionsSize);
        Assert.assertEquals("phrases: '" + cmdIn + "'", 0, actualPhrasesSize);
    }

    /**
     * Tests case 8: Zero phrases and one option. command 'db2 create table'
     *
     * @throws AbstractZemucanException
     */
    @Test
    public void testCase8() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/interfaze/model/ReturnOptionsTest.javaZemucan - Core - ui API112
name/angoca/zemucan/interfaze/model/ReturnOptionsTest.javaZemucan - Core - ui API303
    public void testHashCodeDifferent() throws ParameterNullException {
        final String phrase1 = "create table"; //$NON-NLS-1$
        final String phrase11 = ReturnOptionsTest.TABLESPACE;
        final String option11 = ReturnOptionsTest.TABLE_NAME;

        final String phrase2 = ReturnOptionsTest.CREATE;
        final String option21 = ReturnOptionsTest.TABLE;
        final String option22 = ReturnOptionsTest.TABLESPACE;

        final ReturnOptions object1 = new ReturnOptions(phrase1,
                new String[] { phrase11 }, new String[] { option11 });

        final ReturnOptions object2 = new ReturnOptions(phrase2,
                new String[] {}, new String[] { option21, option22 });
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML563
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1384
    private String testBuildWithExtraTokensText() {
        String xml = ""; //$NON-NLS-1$
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_OPEN;
        xml += ImplementationXMLGrammarReaderTest.DELIMITERS_DELIMITERS;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_CREATE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // create Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_CREATE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_CREATE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_ENDING_NODE_ID_TOKEN;
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph555
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1873
    public void testValidateGraph() throws AbstractZemucanException {
        final Graph graph = new Graph(GraphTest.VALIDATED_GRAPH, false);
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph.firstPhaseFinished();
        graph.addRelation(Constants.STARTING_NODE, GraphTest.CREATE);
        graph.addRelation(GraphTest.CREATE, Constants.ENDING_NODE);
        graph.secondPhaseFinished();

        final GraphState actual = graph.getGraphState();
FileProjectLine
name/angoca/zemucan/tools/messages/executer/Messages.javaZemucan - executer API61
name/angoca/zemucan/tools/messages/Messages.javaZemucan - Core - tools61
    private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
            .getBundle(Messages.BUNDLE_NAME);

    /**
     * Retrieves a message for the given string.
     *
     * @param key
     *            Name of the message.
     * @return Message in the corresponding language.
     */
    public static/* ! */String getString(final String/* ! */key) {
        assert (key != null) && !key.equals(""); //$NON-NLS-1$

        String message = ""; //$NON-NLS-1$
        try {
            message = Messages.RESOURCE_BUNDLE.getString(key);
        } catch (final MissingResourceException e) {
            message = '¡' + key + '!';
        }

        assert (message != null) && !message.equals(""); //$NON-NLS-1$
        return message;
    }

    /**
     * Default constructor hidden.
     */
    private Messages() {
        // Nothing. No tests.
    }
}
FileProjectLine
name/angoca/zemucan/core/graph/model/Graph.javaZemucan - Core - graph563
name/angoca/zemucan/core/graph/model/Graph.javaZemucan - Core - graph928
                "Removing relation in graph '{}' between '{}' and '{}'", //$NON-NLS-1$
                new String[] { this.name, parentId, childId });

        if (parentId == null) {
            throw new ParameterNullException("parentId"); //$NON-NLS-1$
        }
        if (childId == null) {
            throw new ParameterNullException("childId"); //$NON-NLS-1$
        }
        if (this.graphState.equals(GraphState.FirstPhase)) {
            throw new InvalidGraphStateException(this.graphState,
                    GraphState.SecondPhase);
        }
        if (this.graphState.equals(GraphState.Validated)) {
            this.graphState = GraphState.SecondPhase;
        }

        final AbstractGraphNode parent = this.nodes.get(this.name + ':'
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers241
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers1155
        final ReturnOptions ret = ImplementationLexicalAnalyzer.getInstance()
                .analyzePhrase(cmdIn);

        final String actual = ret.getPhrase();

        final String expected = "db2 create tablespace";

        final int actualOptionsSize = ret.getOptions().length;
        final int actualPhrasesSize = ret.getPhrases().length;
        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        Assert.assertEquals("options: '" + cmdIn + "'", 0, actualOptionsSize);
        Assert.assertEquals("phrases: '" + cmdIn + "'", 0, actualPhrasesSize);
    }
FileProjectLine
name/angoca/zemucan/core/syntactic/model/GraphAnswerTest.javaZemucan - Core - analyzers233
name/angoca/zemucan/core/syntactic/model/GraphAnswerTest.javaZemucan - Core - analyzers425
    public void testToString() throws InvalidTokenException {
        final String phrase1 = GraphAnswerTest.CREATE;
        final String option1 = GraphAnswerTest.TABLE;
        final String option2 = GraphAnswerTest.TABLESPACE;

        final List<Token> phrases1 = new ArrayList<Token>();
        phrases1.add(new Token(phrase1, true));
        final List<Token> options1 = new ArrayList<Token>();
        options1.add(new Token(option1, true));
        options1.add(new Token(option2, true));
        final GraphAnswer answer = new GraphAnswer(phrases1, options1);
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers626
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers656
        final List<Token> phraseIn = new ArrayList<Token>();
        phraseIn.add(new Token(tokenIn1, true));
        phraseIn.add(new Token(tokenIn2, true));
        phraseIn.add(new Token(tokenIn3, true));
        phraseIn.add(new Token(tokenIn4, true));
        final boolean endsWithSpace = false;
        final GraphAnswer graph = ImplementationSyntacticAnalyzer.getInstance()
                .analyzeTokens(phraseIn, endsWithSpace);
        final List<Token> actual = graph.getPhrases();
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1750
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1809
        final Graph graph = new Graph(name, false);
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        final String id = "CREA"; //$NON-NLS-1$
        final String nameNode = GraphTest.CREATE;
        graph.addNode(id, nameNode, true);
        graph.firstPhaseFinished();
        graph.addRelation(Constants.STARTING_NODE, id);
        graph.addRelation(id, Constants.ENDING_NODE);
        graph.secondPhaseFinished();

        final String actual = graph.toString();
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers496
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers527
    public void testGetOptions3options() throws AbstractZemucanException {
        final String tokenIn1 = ImplementationSyntacticAnalyzerTest.CREATE;
        final String tokenIn2 = ImplementationSyntacticAnalyzerTest.TABLE;
        final String tokenIn3 = ImplementationSyntacticAnalyzerTest.T1;

        final String option1 = ImplementationSyntacticAnalyzerTest.OPEN_PARENTHESIS;

        final List<Token> phraseIn = new ArrayList<Token>();
        phraseIn.add(new Token(tokenIn1, true));
        phraseIn.add(new Token(tokenIn2, true));
        phraseIn.add(new Token(tokenIn3, true));
        final boolean endsWithSpace = false;
        final GraphAnswer graph = ImplementationSyntacticAnalyzer.getInstance()
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML563
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML644
    public void testBuildNoEndingNode() throws AbstractZemucanException {
        String xml = ""; //$NON-NLS-1$
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_OPEN;
        xml += ImplementationXMLGrammarReaderTest.DELIMITERS_DELIMITERS;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_CREATE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // create Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_CREATE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_CREATE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers764
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers789
        final ReturnOptions ret = ImplementationLexicalAnalyzer.getInstance()
                .analyzePhrase(cmdIn);

        final String actual = ret.getPhrase();

        final String expected = "db2 ";

        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        // catalog, create, attach
        Assert.assertTrue("options: '" + cmdIn + "'",
                ret.getOptions().length == 3);
        Assert.assertTrue("phrases: '" + cmdIn + "'",
                ret.getPhrases().length == 0);
    }

    /**
     * Tests the command 'db2 c'
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @Test
    public void test6() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers363
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers387
        final ReturnOptions ret = ImplementationLexicalAnalyzer.getInstance()
                .analyzePhrase(cmdIn);

        final String actual = ret.getPhrase();

        final String expected = "db2 create table t1 (";

        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        Assert.assertTrue("options: '" + cmdIn + "'",
                ret.getOptions().length == 0);
        Assert.assertTrue("phrases: '" + cmdIn + "'",
                ret.getPhrases().length == 0);
    }

    /**
     * Tests the command 'd'
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @Test
    public void test2() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers217
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers289
        final ReturnOptions ret = ImplementationLexicalAnalyzer.getInstance()
                .analyzePhrase(cmdIn);

        final String actual = ret.getPhrase();

        final String expected = "db2 create table";

        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        Assert.assertTrue("options: '" + cmdIn + "'",
                ret.getOptions().length == 0);
        Assert.assertTrue("phrases: '" + cmdIn + "'",
                ret.getPhrases().length == 2);
    }

    /**
     * Tests the command 'db2 create table'
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @Test
    public void test16() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/core/graph/model/Graph.javaZemucan - Core - graph530
name/angoca/zemucan/core/graph/model/Graph.javaZemucan - Core - graph895
    public void removeRelation(final AbstractGraphNode parentNode,
            final AbstractGraphNode childNode)
            throws AbstractZemucanException {
        final int size = this.name.length() + 1;
        String parentId = parentNode.getId();
        String childId = childNode.getId();
        if (parentId.startsWith(this.name)) {
            parentId = parentId.substring(size);
        }
        if (childId.startsWith(this.name)) {
            childId = childId.substring(size);
        }
        this.removeRelation(parentId, childId);
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers389
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers803
        final List<Token> phraseIn = new ArrayList<Token>();
        phraseIn.add(new Token(tokenIn1, true));
        phraseIn.add(new Token(tokenIn2, true));
        final boolean endsWithSpace = false;
        final GraphAnswer actual = ImplementationSyntacticAnalyzer
                .getInstance().analyzeTokens(phraseIn, endsWithSpace);

        final List<Token> phraseOut = new ArrayList<Token>();
        phraseOut.add(new Token(tokenOut1, true));
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1366
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1393
        final Graph graph = new Graph("referencing starting node", true); //$NON-NLS-1$
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph.firstPhaseFinished();
        graph.addRelation(Constants.STARTING_NODE, GraphTest.CREATE);
        graph.addRelation(GraphTest.CREATE, Constants.ENDING_NODE);

        Exception e = null;
        try {
            graph.addRelation(GraphTest.CREATE, Constants.STARTING_NODE);
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML644
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML813
    public void testBuildNoName() throws AbstractZemucanException {
        String xml = ""; //$NON-NLS-1$
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_OPEN;
        xml += ImplementationXMLGrammarReaderTest.DELIMITERS_DELIMITERS;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_CREATE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // create Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_CREATE_ID;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
FileProjectLine
name/angoca/zemucan/core/syntactic/model/GraphAnswerTest.javaZemucan - Core - analyzers117
name/angoca/zemucan/core/syntactic/model/GraphAnswerTest.javaZemucan - Core - analyzers403
    public void testSymmetric() throws InvalidTokenException {
        final String tokenString1 = GraphAnswerTest.TEST1;
        final String tokenString2 = GraphAnswerTest.TEST2;

        final List<Token> phrases = new ArrayList<Token>();
        phrases.add(new Token(tokenString1, true));
        final List<Token> options = new ArrayList<Token>();
        options.add(new Token(tokenString2, true));
        final GraphAnswer actual = new GraphAnswer(phrases, options);

        final boolean value = actual.equals(actual);
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers283
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers362
        final GraphAnswer actual = ImplementationSyntacticAnalyzer
                .getInstance().analyzeTokens(phraseIn, endsWithSpace);

        final List<Token> phraseOut = new ArrayList<Token>();
        final List<Token> options = new ArrayList<Token>();
        options.add(new Token(option1, true));
        options.add(new Token(option2, true));
        final GraphAnswer expected = new GraphAnswer(phraseOut, options);

        Assert.assertEquals("'create ' command", expected, actual); //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1540
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1692
        expected += expectedGraphName + graphName1 + ':'
                + Constants.ENDING_NODE + '-' + expectedGraphName + graphName1
                + ':' + Constants.ENDING_NODE + '\n';
        expected += expectedGraphName + graphName1 + ':'
                + Constants.STARTING_NODE + '-' + expectedGraphName
                + graphName1 + ':' + Constants.STARTING_NODE + '\n';
        expected += expectedGraphName + graphName1 + ':' + a + '-' + a + '\n';
        expected += expectedGraphName + graphName1 + ':' + create1Id + '-'
                + create + '\n';
        expected += expectedGraphName + graphName1 + ':' + e + '-' + e + '\n';
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1242
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1388
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_CREATE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // create Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_CREATE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_CREATE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_ENDING_NODE_ID_TOKEN;
        xml += "    <idToken>STARTING_NODE</idToken>"; //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1107
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1187
                ImplementationXMLGrammarReaderTest.NORMAL_GRAPH, false);
        expected
                .addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        expected.addNode(ImplementationXMLGrammarReaderTest.CREATE,
                ImplementationXMLGrammarReaderTest.CREATE, true);
        expected.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);

        expected.firstPhaseFinished();

        expected.addRelation(Constants.STARTING_NODE,
                ImplementationXMLGrammarReaderTest.CREATE);
        expected.addRelation(ImplementationXMLGrammarReaderTest.CREATE,
                Constants.ENDING_NODE);

        expected.secondPhaseFinished();

        Assert.assertEquals("Simple graph without extra tokens", expected, //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1284
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1388
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_CREATE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // create Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_CREATE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_CREATE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_ENDING_NODE_ID_TOKEN;
        xml += "    <idToken>STARTING_NODE</idToken>"; //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers534
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers562
        final List<Token> phraseIn = new ArrayList<Token>();
        phraseIn.add(new Token(tokenIn1, true));
        phraseIn.add(new Token(tokenIn2, true));
        phraseIn.add(new Token(tokenIn3, true));
        final boolean endsWithSpace = false;
        final GraphAnswer graph = ImplementationSyntacticAnalyzer.getInstance()
                .analyzeTokens(phraseIn, endsWithSpace);
        final List<Token> actual = graph.getPhrases();
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers506
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers596
        phraseIn.add(new Token(tokenIn4, true));
        final boolean endsWithSpace = false;
        final GraphAnswer actual = ImplementationSyntacticAnalyzer
                .getInstance().analyzeTokens(phraseIn, endsWithSpace);

        final List<Token> phraseOut = new ArrayList<Token>();
        final List<Token> options = new ArrayList<Token>();
        options.add(new Token(option1, true));
        final GraphAnswer expected = new GraphAnswer(phraseOut, options);

        Assert.assertEquals("Phrases for 'create table t1' command", //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph180
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1874
        final Graph graph = new Graph(GraphTest.VALIDATED_GRAPH, false);
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph.firstPhaseFinished();
        graph.addRelation(Constants.STARTING_NODE, GraphTest.CREATE);
        graph.addRelation(GraphTest.CREATE, Constants.ENDING_NODE);
        graph.secondPhaseFinished();
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML813
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1127
    private String testBuildWithExtraTokensText() {
        String xml = ""; //$NON-NLS-1$
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_OPEN;
        xml += ImplementationXMLGrammarReaderTest.DELIMITERS_DELIMITERS;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_CREATE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // create Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_CREATE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_CREATE_NAME;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML567
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1242
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_CREATE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // create Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_CREATE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_CREATE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_ENDING_NODE_ID_TOKEN;
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph556
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph991
        final Graph graph = new Graph(graphName, true); //$NON-NLS-1$
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph.firstPhaseFinished();
        graph.addRelation(Constants.STARTING_NODE, GraphTest.CREATE);
        graph.addRelation(GraphTest.CREATE, Constants.ENDING_NODE);
        graph.secondPhaseFinished();

        final StartingNode startingNode = graph.getStartingNode();
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph342
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph420
        final Graph graph = new Graph(GraphTest.DUMMY_GRAPH, true);
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(GraphTest.TABLE, GraphTest.TABLE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph.firstPhaseFinished();
        graph.addRelation(Constants.STARTING_NODE, GraphTest.CREATE);
        graph.addRelation(GraphTest.CREATE, GraphTest.TABLE);
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML644
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML755
    public void testBuildNoIdNoName() throws AbstractZemucanException {
        String xml = ""; //$NON-NLS-1$
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_OPEN;
        xml += ImplementationXMLGrammarReaderTest.DELIMITERS_DELIMITERS;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_CREATE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // create Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph180
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph991
        final Graph graph = new Graph(graphName, true); //$NON-NLS-1$
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph.firstPhaseFinished();
        graph.addRelation(Constants.STARTING_NODE, GraphTest.CREATE);
        graph.addRelation(GraphTest.CREATE, Constants.ENDING_NODE);
        graph.secondPhaseFinished();
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML567
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1284
                + ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_CREATE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // create Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_CREATE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_CREATE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_ENDING_NODE_ID_TOKEN;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML916
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1143
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_CREATE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_CREATE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_ENDING_NODE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // Ending Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_ENDING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_ENDING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKENS_2;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_2;
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers280
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers829
        final List<Token> phraseIn = new ArrayList<Token>();
        phraseIn.add(new Token(tokenIn1, true));
        final boolean endsWithSpace = false;
        final GraphAnswer actual = ImplementationSyntacticAnalyzer
                .getInstance().analyzeTokens(phraseIn, endsWithSpace);

        final List<Token> phraseOut = new ArrayList<Token>();
        final List<Token> options = new ArrayList<Token>();
FileProjectLine
name/angoca/zemucan/interfaze/model/ReturnOptionsTest.javaZemucan - Core - ui API186
name/angoca/zemucan/interfaze/model/ReturnOptionsTest.javaZemucan - Core - ui API331
    public void testHashCodeIdentical() throws ParameterNullException {
        final String phrase = "create table"; //$NON-NLS-1$
        final String phrase1 = ReturnOptionsTest.TABLESPACE;
        final String option1 = ReturnOptionsTest.TABLE_NAME;

        final ReturnOptions object1 = new ReturnOptions(phrase,
                new String[] { phrase1 }, new String[] { option1 });

        final ReturnOptions object2 = new ReturnOptions(phrase,
                new String[] { phrase1 }, new String[] { option1 });
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph991
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1366
        final Graph graph = new Graph("referencing ending node", true); //$NON-NLS-1$
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph.firstPhaseFinished();
        graph.addRelation(Constants.STARTING_NODE, GraphTest.CREATE);
        graph.addRelation(GraphTest.CREATE, Constants.ENDING_NODE);
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML696
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1127
    private String testBuildWithExtraTokensText() {
        String xml = ""; //$NON-NLS-1$
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_OPEN;
        xml += ImplementationXMLGrammarReaderTest.DELIMITERS_DELIMITERS;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_CREATE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // create Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_CREATE_ID;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML648
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1242
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_CREATE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // create Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_CREATE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_CREATE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers197
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers281
        phraseIn.add(new Token(tokenIn1, true));
        final boolean endsWithSpace = false;
        final GraphAnswer actual = ImplementationSyntacticAnalyzer
                .getInstance().analyzeTokens(phraseIn, endsWithSpace);

        final List<Token> phraseOut = new ArrayList<Token>();
        final List<Token> options = new ArrayList<Token>();
        options.add(new Token(option1, true));
        options.add(new Token(option2, true));
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers1061
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers1108
        final ReturnOptions ret = ImplementationLexicalAnalyzer.getInstance()
                .analyzePhrase(cmdIn);

        final String actual = ret.getPhrase();

        final String expected = "db2 create table";

        final int actualOptionsSize = ret.getOptions().length;
        final int actualPhrasesSize = ret.getPhrases().length;
        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        Assert.assertEquals("options: '" + cmdIn + "'", 2, actualOptionsSize);
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers560
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers638
        final ReturnOptions ret = ImplementationLexicalAnalyzer.getInstance()
                .analyzePhrase(cmdIn);

        final String actual = ret.getPhrase();

        final String expected = "db2";

        final int actualOptionsSize = ret.getOptions().length;
        final int actualPhrasesSize = ret.getPhrases().length;
        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        // EMPTY
        Assert.assertEquals("options: '" + cmdIn + "'", 0, actualOptionsSize);
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers191
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers1061
        final ReturnOptions ret = ImplementationLexicalAnalyzer.getInstance()
                .analyzePhrase(cmdIn);

        final String actual = ret.getPhrase();

        final String expected = "db2 create table";

        final int actualOptionsSize = ret.getOptions().length;
        final int actualPhrasesSize = ret.getPhrases().length;
        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        Assert.assertEquals("options: '" + cmdIn + "'", 1, actualOptionsSize);
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML247
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML962
    public void testBuildNotAllChildren() throws AbstractZemucanException {
        String xml = ""; //$NON-NLS-1$
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_OPEN;
        xml += ImplementationXMLGrammarReaderTest.DELIMITERS_DELIMITERS;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_ENDING_NODE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKENS_2;
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers389
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers853
        final List<Token> phraseIn = new ArrayList<Token>();
        phraseIn.add(new Token(tokenIn1, true));
        phraseIn.add(new Token(tokenIn2, true));
        final boolean endsWithSpace = false;
        final GraphAnswer actual = ImplementationSyntacticAnalyzer
                .getInstance().analyzeTokens(phraseIn, endsWithSpace);

        final List<Token> phraseOut = new ArrayList<Token>();
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph838
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph894
        expected += expectedGraphName + graphName2 + ':'
                + Constants.ENDING_NODE + '-' + expectedGraphName + graphName2
                + ':' + Constants.ENDING_NODE + '\n';
        expected += expectedGraphName + graphName2 + ':'
                + Constants.STARTING_NODE + '-' + expectedGraphName
                + graphName2 + ':' + Constants.STARTING_NODE + '\n';
        expected += expectedGraphName + graphName2 + ':' + create + '-'
                + create + '\n';
        expected += ")]"; //$NON-NLS-1$

        Assert.assertEquals("Merge and Simplify", expected, actual); //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML648
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1284
                + ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_CREATE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // create Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_CREATE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_CREATE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers478
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers598
        final GraphAnswer actual = ImplementationSyntacticAnalyzer
                .getInstance().analyzeTokens(phraseIn, endsWithSpace);

        final List<Token> phraseOut = new ArrayList<Token>();
        final List<Token> options = new ArrayList<Token>();
        options.add(new Token(option1, true));
        final GraphAnswer expected = new GraphAnswer(phraseOut, options);

        Assert.assertEquals("'create table t1' command", expected, //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers118
name/angoca/zemucan/interfaze/InterfaceCoreTest.javaZemucan - Core - interface89
    @BeforeClass
    public static void setUpBeforeClass() throws AbstractZemucanException {
        System.setProperty(Constants.ZEMUCAN_CONF_XML_PROPERTY,
                "sa_conf-test.xml"); //$NON-NLS-1$
        Configurator.getInstance().setProperty(
                Constants.GRAMMAR_READER_NAME_PROPERTY,
                Configurator.GRAMMAR_READER_NAME_VALUE);
        Configurator.getInstance()
                .setProperty(Constants.GRAMMAR_FILE_DESCRIPTORS_PROPERTY,
                        "grammar-test.xml"); //$NON-NLS-1$

        // Creates the lexical analyzer instance.
        ImplementationLexicalAnalyzer.getInstance();
    }

    /**
     * Clears the configuration file name property at the end of the test.
     */
    @AfterClass
    public static void tearDownAfterClass() {
        // Destroys any existent instance.
        ImplementationLexicalAnalyzer.destroyInstance();
FileProjectLine
name/angoca/zemucan/core/syntactic/model/GraphAnswerTest.javaZemucan - Core - analyzers117
name/angoca/zemucan/core/syntactic/model/GraphAnswerTest.javaZemucan - Core - analyzers373
    public void testSimpleMethods() throws AbstractZemucanException {
        final String tokenString1 = GraphAnswerTest.TEST1;
        final String tokenString2 = GraphAnswerTest.TEST2;

        final List<Token> phrases = new ArrayList<Token>();
        phrases.add(new Token(tokenString1, true));
        final List<Token> options = new ArrayList<Token>();
        options.add(new Token(tokenString2, true));
        final GraphAnswer graphAnswer = new GraphAnswer(phrases, options);
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers592
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers656
        final List<Token> phraseIn = new ArrayList<Token>();
        phraseIn.add(new Token(tokenIn1, true));
        phraseIn.add(new Token(tokenIn2, true));
        phraseIn.add(new Token(tokenIn3, true));
        phraseIn.add(new Token(tokenIn4, true));
        final boolean endsWithSpace = false;
        final GraphAnswer graph = ImplementationSyntacticAnalyzer.getInstance()
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers248
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers671
        final int actualOptionsSize = ret.getOptions().length;
        final int actualPhrasesSize = ret.getPhrases().length;
        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        Assert.assertEquals("options: '" + cmdIn + "'", 0, actualOptionsSize);
        Assert.assertEquals("phrases: '" + cmdIn + "'", 0, actualPhrasesSize);
    }

    /**
     * Tests the command 'db2 crea '
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @Test
    public void test9() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers696
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers737
        phraseIn.add(new Token(tokenIn1, true));
        final boolean endsWithSpace = false;
        final GraphAnswer actual = ImplementationSyntacticAnalyzer
                .getInstance().analyzeTokens(phraseIn, endsWithSpace);

        final List<Token> phraseOut = new ArrayList<Token>();
        final List<Token> options = new ArrayList<Token>();
        final GraphAnswer expected = new GraphAnswer(phraseOut, options);

        Assert.assertEquals("'toto' phrase", expected, actual); //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers418
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers446
        final List<Token> phraseIn = new ArrayList<Token>();
        phraseIn.add(new Token(tokenIn1, true));
        phraseIn.add(new Token(tokenIn2, true));
        final boolean endsWithSpace = false;
        final GraphAnswer graph = ImplementationSyntacticAnalyzer.getInstance()
                .analyzeTokens(phraseIn, endsWithSpace);
        final List<Token> actual = graph.getPhrases();
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers412
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers468
    public void testGetOptions2WithSpace() throws AbstractZemucanException {
        final String tokenIn1 = ImplementationSyntacticAnalyzerTest.CREATE;
        final String tokenIn2 = ImplementationSyntacticAnalyzerTest.TABLE;

        final String option1 = ImplementationSyntacticAnalyzerTest.TABLE_NAME;

        final List<Token> phraseIn = new ArrayList<Token>();
        phraseIn.add(new Token(tokenIn1, true));
        phraseIn.add(new Token(tokenIn2, true));
        final boolean endsWithSpace = true;
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers200
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers362
        final GraphAnswer actual = ImplementationSyntacticAnalyzer
                .getInstance().analyzeTokens(phraseIn, endsWithSpace);

        final List<Token> phraseOut = new ArrayList<Token>();
        final List<Token> options = new ArrayList<Token>();
        options.add(new Token(option1, true));
        options.add(new Token(option2, true));
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1521
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1590
        graph2.addRelation(z, Constants.ENDING_NODE);
        graph2.secondPhaseFinished();

        graph2.merge(graph1);
        graph1.simplifyGraph();

        final String actual = graph1.toString();

        String expectedGraphName = "merged:{" + graphName1 + ',' + graphName2
                + "}:";
        String expected = expectedGraphName + '[' + GraphState.Validated
                + "-WithoutExtraNodes{{" + Constants.STARTING_NODE + '<'
                + expectedGraphName + graphName1 + ':' + create1Id + '-'
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML714
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML772
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_ENDING_NODE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // Ending Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_ENDING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_ENDING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKENS_2;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_2;

        final Graph graph = new Graph("node without name", false); //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers420
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers630
        phraseIn.add(new Token(tokenIn4, true));
        final boolean endsWithSpace = false;
        final GraphAnswer graph = ImplementationSyntacticAnalyzer.getInstance()
                .analyzeTokens(phraseIn, endsWithSpace);
        final List<Token> actual = graph.getOptions();

        final List<Token> expected = new ArrayList<Token>();
        expected.add(new Token(option1, true));

        Assert.assertEquals("Options for 'create table t1 (' command", //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML713
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML918
        xml += ImplementationXMLGrammarReaderTest.NAME_CREATE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_ENDING_NODE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // Ending Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_ENDING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_ENDING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKENS_2;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_2;

        final String id = "no StartingNode"; //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/ui/impl/jline/ImplementationJlineInterfaceController.javaZemucan - ui impl jLine138
name/angoca/zemucan/ui/impl/system/ImplementationSystemInterfaceController.javaZemucan - ui impl System118
        if (Boolean.parseBoolean(Configurator.getInstance().getProperty(
                AbstractInterfaceController.SHOW_LICENSE))) {
            this.output.writeLine(AboutNode.readAboutInformation());
        }

        // Shows a introductory help.
        if (Boolean.parseBoolean(Configurator.getInstance().getProperty(
                AbstractInterfaceController.SHOW_INTRO_PROPERTY))) {
            this.output
                    .writeLine(Messages
                            .getString("ImplementationSystemInterfaceController.Instructions")); //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/executer/impl/ImplementationExecuterTest.javaZemucan - executer impl222
name/angoca/zemucan/executer/impl/ImplementationExecuterTest.javaZemucan - executer impl252
        System.setProperty(ImplementationExecuter.DB2_PARAMS, "-v"); //$NON-NLS-1$
        final String command = "db2 !dir"; //$NON-NLS-1$
        final String os = System.getProperty("os.name"); //$NON-NLS-1$

        System.setProperty("os.name", "Windows 7"); //$NON-NLS-1$ //$NON-NLS-2$
        final String[] actuals = ImplementationExecuter.getInstance()
                .getCommandsToExecute(command);
        System.setProperty("os.name", os); //$NON-NLS-1$

        final String[] expecteds = new String[] { "cmd.exe", "/c", "db2", "-v", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers555
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers581
        final String cmdOut = "create table t2 ( "; //$NON-NLS-1$

        final String opt1 = ImplementationLexicalAnalyzerTest.COL_NAME;

        final ReturnOptions actual = ImplementationLexicalAnalyzer
                .getInstance().analyzePhrase(cmdIn);

        final ReturnOptions expected = new ReturnOptions(cmdOut,
                new String[] {}, new String[] { opt1 });

        Assert.assertEquals("object for 'create table t2 ('", expected, //$NON-NLS-1$
                actual);
    }

    /**
     * Test of the options for the 'create table t2(c1' command.
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @Test
    public void testDataType() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/core/graph/model/AboutNodeTest.javaZemucan - Core - graph206
name/angoca/zemucan/core/graph/model/EndingNodeTest.javaZemucan - Core - graph195
        final EndingNode actual = new EndingNode(new Graph("test", false));

        Assert.assertTrue("HashCode different to 1", //$NON-NLS-1$
                1 != actual.hashCode());
        Assert.assertTrue("HashCode different to 0", //$NON-NLS-1$
                0 != actual.hashCode());
        Assert.assertTrue("HashCode different to -1", //$NON-NLS-1$
                -1 != actual.hashCode());
    }

    /**
     * Test the equals method to a null.
     *
     * @throws AbstractZemucanException
     *             Never
     */
    @Test
    public void testNullEqualsObject() throws AbstractZemucanException {
        final EndingNode actual = new EndingNode(new Graph("test", false));
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1089
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1427
    public void testErrorBuildWithExtraTokens() throws AbstractZemucanException {
        final String xml = this.testBuildWithExtraTokensText();

        final String id = ImplementationXMLGrammarReaderTest.NORMAL_GRAPH;
        final Graph actual = new Graph(id, true);
        final InputSource contentToParse = new InputSource(
                new StringReader(xml));
        final InputSource contentToValidate = new InputSource(new StringReader(
                xml));
        ImplementationXMLGrammarReaderTest.LOGGER
                .info("testErrorBuildWithExtraTokens");
FileProjectLine
name/angoca/zemucan/tools/messages/executer/Messages.javaZemucan - executer API72
name/angoca/zemucan/tools/messages/xml/Messages.javaZemucan - grammar reader impl XML74
        assert !key.equals(""); //$NON-NLS-1$

        String message = ""; //$NON-NLS-1$
        try {
            message = Messages.RESOURCE_BUNDLE.getString(key);
        } catch (final MissingResourceException e) {
            message = '¡' + key + '!';
        }

        assert (message != null) && !message.equals(""); //$NON-NLS-1$
        return message;
    }

    /**
     * Default constructor hidden.
     */
    private Messages() {
        // Nothing. No tests.
    }
}
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers309
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers630
        phraseIn.add(new Token(tokenIn2, true));
        final boolean endsWithSpace = false;
        final GraphAnswer graph = ImplementationSyntacticAnalyzer.getInstance()
                .analyzeTokens(phraseIn, endsWithSpace);
        final List<Token> actual = graph.getOptions();

        final List<Token> expected = new ArrayList<Token>();
        expected.add(new Token(option1, true));
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers592
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers767
        final List<Token> phraseIn = new ArrayList<Token>();
        phraseIn.add(new Token(tokenIn1, true));
        phraseIn.add(new Token(tokenIn2, true));
        phraseIn.add(new Token(tokenIn3, true));
        phraseIn.add(new Token(tokenIn4, true));
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph420
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1182
        final Graph graph = new Graph("not coming starting node", true); //$NON-NLS-1$
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(GraphTest.TABLE, GraphTest.TABLE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);

        graph.addNode(GraphTest.OTHER, GraphTest.OTHER, true);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph293
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph430
        final String node23 = GraphNodeTest.TABLESPACE;

        final GraphNode actual = new GraphNode(node11, graph);
        final GraphNode child1 = new GraphNode(node12, graph);
        actual.addChild(child1);
        final GraphNode expected = new GraphNode(node21, graph);
        final GraphNode child2 = new GraphNode(node22, graph);
        expected.addChild(child2);
        final GraphNode child3 = new GraphNode(node23, graph);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphNode.javaZemucan - Core - graph148
name/angoca/zemucan/core/graph/model/NonReservedGraphNode.javaZemucan - Core - graph81
	}

	/*
	 * (non-Javadoc)
	 *
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public final int hashCode() {
		int superHash = super.hashCode();
		if (superHash == 0) {
			superHash = 1;
		}
		final int value = superHash + GraphNode.class.getName().hashCode();
		return value;
	}

	/*
	 * (non-Javadoc)
	 *
	 * @see
	 * name.angoca.zemucan.core.graph.model.AbstractGraphNode#represent(java
	 * .lang.String)
	 */
	@Override
	public final boolean represent(final String/* ! */token) {
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML831
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML919
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_ENDING_NODE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // Ending Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_ENDING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_ENDING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKENS_2;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_2;

        final String id = "no StartingNode"; //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1538
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1606
                + z + "]}}(4:\n";

        expected += expectedGraphName + graphName1 + ':'
                + Constants.ENDING_NODE + '-' + expectedGraphName + graphName1
                + ':' + Constants.ENDING_NODE + '\n';
        expected += expectedGraphName + graphName1 + ':'
                + Constants.STARTING_NODE + '-' + expectedGraphName
                + graphName1 + ':' + Constants.STARTING_NODE + '\n';
        expected += expectedGraphName + graphName1 + ':' + create1Id + '-'
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1318
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1627
        ImplementationXMLGrammarReaderTest.LOGGER.info("testNoDelimiters");
        ImplementationXMLGrammarReaderTest.LOGGER.debug(xml);
        final ImplementationXMLGrammarReader grammar = new ImplementationXMLGrammarReader(
                graph, contentToParse, contentToValidate);

        Exception e = null;
        try {
            grammar.generateGraph();
        } catch (final Exception exception) {
            e = exception;
        }
        Assert.assertTrue("DelimitersIncorrectlyDefinedException",
                e instanceof DelimitersIncorrectlyDefinedException);
    }

    /**
     * Tests a not existing file as grammar.
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @Test
    public void testNotExistingFile() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1146
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1350
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_ENDING_NODE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // Ending Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_ENDING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_ENDING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKENS_2;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_2;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML887
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML940
                .info("testBuildNoStartingNode");
        ImplementationXMLGrammarReaderTest.LOGGER.debug(xml);
        final ImplementationXMLGrammarReader grammar = new ImplementationXMLGrammarReader(
                graph, contentToParse, contentToValidate);

        Exception e = null;
        try {
            grammar.generateGraph();
        } catch (final Exception exception) {
            e = exception;
        }
        Assert.assertTrue("StartingNodeNotDefinedException",
                e instanceof StartingNodeNotDefinedException);
    }

    /**
     * Tests a grammar that has defined all the nodes that are children.
     *
     * @throws AbstractZemucanException
     *             Never
     */
    @Test
    public void testBuildNotAllChildren() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML515
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML714
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_ENDING_NODE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // Ending Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_ENDING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_ENDING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKENS_2;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_2;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML313
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1067
                .info("testBuildUnknownStructure");
        ImplementationXMLGrammarReaderTest.LOGGER.debug(xml);
        final ImplementationXMLGrammarReader grammar = new ImplementationXMLGrammarReader(
                graph, contentToParse, contentToValidate);

        Exception e = null;
        try {
            grammar.generateGraph();
        } catch (final Exception exception) {
            e = exception;
        }
        Assert.assertTrue("XMLProblemException",
                e instanceof XMLProblemException);
    }

    /**
     * Tests that a simple graph can be constructed with extra tokens.
     *
     * @throws AbstractZemucanException
     *             Never
     */
    @Test
    public void testBuildWithExtraTokens() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers716
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers757
    public void testGetOptions7() throws AbstractZemucanException {
        final String tokenIn1 = ImplementationSyntacticAnalyzerTest.CREATE;
        final String tokenIn2 = ImplementationSyntacticAnalyzerTest.TABLE;
        final String tokenIn3 = ImplementationSyntacticAnalyzerTest.T1;
        final String tokenIn4 = ImplementationSyntacticAnalyzerTest.OPEN_PARENTHESIS;
        final String tokenIn5 = ImplementationSyntacticAnalyzerTest.C1;
        final String tokenIn6 = ImplementationSyntacticAnalyzerTest.INT;
        final String tokenIn7 = ImplementationSyntacticAnalyzerTest.CLOSE_PARENTHESIS;
        final String tokenIn8 = "in"; //$NON-NLS-1$

        final List<Token> phraseIn = new ArrayList<Token>();
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers1068
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers1138
        final int actualOptionsSize = ret.getOptions().length;
        final int actualPhrasesSize = ret.getPhrases().length;
        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        Assert.assertEquals("options: '" + cmdIn + "'", 1, actualOptionsSize);
        Assert.assertEquals("phrases: '" + cmdIn + "'", 0, actualPhrasesSize);
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers619
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers1091
        final int actualOptionsSize = ret.getOptions().length;
        final int actualPhrasesSize = ret.getPhrases().length;
        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        Assert.assertEquals("options: '" + cmdIn + "'", 0, actualOptionsSize);
        Assert.assertEquals("phrases: '" + cmdIn + "'", 2, actualPhrasesSize);
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers289
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers313
        final ReturnOptions ret = ImplementationLexicalAnalyzer.getInstance()
                .analyzePhrase(cmdIn);

        final String actual = ret.getPhrase();

        final String expected = "db2 create table";

        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        // <tableName>
        Assert.assertTrue("options: '" + cmdIn + "'",
                ret.getOptions().length == 1);
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers248
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers1020
        final int actualOptionsSize = ret.getOptions().length;
        final int actualPhrasesSize = ret.getPhrases().length;
        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        Assert.assertEquals("options: '" + cmdIn + "'", 0, actualOptionsSize);
        Assert.assertEquals("phrases: '" + cmdIn + "'", 2, actualPhrasesSize);
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers217
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers313
        final ReturnOptions ret = ImplementationLexicalAnalyzer.getInstance()
                .analyzePhrase(cmdIn);

        final String actual = ret.getPhrase();

        final String expected = "db2 create table";

        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        // <tableName>
        Assert.assertTrue("options: '" + cmdIn + "'",
                ret.getOptions().length == 1);
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers198
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers1043
        final int actualOptionsSize = ret.getOptions().length;
        final int actualPhrasesSize = ret.getPhrases().length;
        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        // -t, -i
        Assert.assertEquals("options: '" + cmdIn + "'", 2, actualOptionsSize);
        // db2fmcu
        Assert.assertEquals("phrases: '" + cmdIn + "'", 1, actualPhrasesSize);
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers141
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers217
        final ReturnOptions ret = ImplementationLexicalAnalyzer.getInstance()
                .analyzePhrase(cmdIn);

        final String actual = ret.getPhrase();

        final String expected = "db2 create table";

        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        Assert.assertTrue("options: '" + cmdIn + "'",
                ret.getOptions().length == 0);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1182
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1929
        final Graph graph = new Graph(GraphTest.VALIDATED_GRAPH, false);
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(GraphTest.TABLE, GraphTest.TABLE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph.firstPhaseFinished();
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML700
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1593
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_CREATE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // create Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_CREATE_ID;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML500
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1293
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // create Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_CREATE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_CREATE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_ENDING_NODE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // Ending Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_ENDING_NODE_ID;
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers274
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers302
    public void testGetOptions1options() throws AbstractZemucanException {
        final String tokenIn1 = ImplementationSyntacticAnalyzerTest.CREATE;

        final String option1 = ImplementationSyntacticAnalyzerTest.TABLE;
        final String option2 = ImplementationSyntacticAnalyzerTest.TABLESPACE;

        final List<Token> phraseIn = new ArrayList<Token>();
        phraseIn.add(new Token(tokenIn1, true));
        final boolean endsWithSpace = false;
        final GraphAnswer graph = ImplementationSyntacticAnalyzer.getInstance()
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers543
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers944
        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        Assert.assertTrue("options: '" + cmdIn + "'",
                ret.getOptions().length == 0);
        Assert.assertTrue("phrases: '" + cmdIn + "'",
                ret.getPhrases().length == 0);
    }

    /**
     * Tests case 1: Multiples phrases and multiples options. command 'db2'
     *
     * @throws AbstractZemucanException
     */
    @Test
    public void testCase1() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers493
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers518
        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        // int, char
        Assert.assertTrue("options: '" + cmdIn + "'",
                ret.getOptions().length == 2);
        Assert.assertTrue("phrases: '" + cmdIn + "'",
                ret.getPhrases().length == 0);
    }

    /**
     * Tests the command 'db2 create table t1 ( c1 int )'
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @Test
    public void test24() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers444
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers468
        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        // <colName>
        Assert.assertTrue("options: '" + cmdIn + "'",
                ret.getOptions().length == 1);
        Assert.assertTrue("phrases: '" + cmdIn + "'",
                ret.getPhrases().length == 0);
    }

    /**
     * Tests the command 'db2 create table t1 (c1'
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @Test
    public void test22() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers370
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers944
        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        Assert.assertTrue("options: '" + cmdIn + "'",
                ret.getOptions().length == 0);
        Assert.assertTrue("phrases: '" + cmdIn + "'",
                ret.getPhrases().length == 0);
    }

    /**
     * Tests the command ' db2'
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @Test
    public void test25() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers345
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers444
        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        Assert.assertTrue("options: '" + cmdIn + "'",
                ret.getOptions().length == 1);
        Assert.assertTrue("phrases: '" + cmdIn + "'",
                ret.getPhrases().length == 0);
    }

    /**
     * Tests the command 'db2 create table t1('
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @Test
    public void test21() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers296
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers845
        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        Assert.assertTrue("options: '" + cmdIn + "'",
                ret.getOptions().length == 0);
        Assert.assertTrue("phrases: '" + cmdIn + "'",
                ret.getPhrases().length == 2);
    }

    // TODO v2.0 tests "db2 update db" Aquí se usan alias y no
    // funciona

    /**
     * Tests the command 'db2 c'
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @Test
    public void test7() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers272
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers370
        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        Assert.assertTrue("options: '" + cmdIn + "'",
                ret.getOptions().length == 0);
        Assert.assertTrue("phrases: '" + cmdIn + "'",
                ret.getPhrases().length == 0);
    }

    /**
     * Tests the command 'db2 create table t1 '
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @Test
    public void test19() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers224
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers845
        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        Assert.assertTrue("options: '" + cmdIn + "'",
                ret.getOptions().length == 0);
        Assert.assertTrue("phrases: '" + cmdIn + "'",
                ret.getPhrases().length == 2);
    }

    // TODO v2.0 tests "db2 update db" Aquí se usan alias y no
    // funciona

    /**
     * Tests the command 'db2 c'
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @Test
    public void test7() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers148
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers173
        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        // int, char
        Assert.assertTrue("options: '" + cmdIn + "'",
                ret.getOptions().length == 2);
        Assert.assertTrue("phrases: '" + cmdIn + "'",
                ret.getPhrases().length == 0);
    }

    /**
     * Tests the command 'db2 create table t1( c1'
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @Test
    public void test23() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1608
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1692
        expected += expectedGraphName + graphName1 + ':'
                + Constants.ENDING_NODE + '-' + expectedGraphName + graphName1
                + ':' + Constants.ENDING_NODE + '\n';
        expected += expectedGraphName + graphName1 + ':'
                + Constants.STARTING_NODE + '-' + expectedGraphName
                + graphName1 + ':' + Constants.STARTING_NODE + '\n';
        expected += expectedGraphName + graphName1 + ':' + a + '-' + a + '\n';
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph522
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph655
    public void testHashCodeIdenticalReserved()
            throws AbstractZemucanException {
        final Graph graph = new Graph("test", false);

        final String node1 = GraphNodeTest.CREATE;
        final String node2 = GraphNodeTest.CREATE;

        final GraphNode actual = new GraphNode(node1, graph);
        final GraphNode expected = new GraphNode(node2, graph);

        final boolean condition = actual.hashCode() == expected.hashCode();
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph456
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph630
    public void testHashCodeIdenticalNotReserved()
            throws AbstractZemucanException {
        final Graph graph = new Graph("test", false);

        final String node1 = GraphNodeTest.TABLENAME;
        final String node2 = GraphNodeTest.TABLENAME;

        final NonReservedGraphNode actual = new NonReservedGraphNode(node1,
                graph);
        final NonReservedGraphNode expected = new NonReservedGraphNode(node2,
                graph);

        final boolean condition = actual.hashCode() == expected.hashCode();
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph295
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph554
        final GraphNode actual = new GraphNode(node11, graph);
        final GraphNode child1 = new GraphNode(node12, graph);
        actual.addChild(child1);
        final GraphNode expected = new GraphNode(node21, graph);
        final GraphNode child2 = new GraphNode(node22, graph);
        expected.addChild(child2);
        final boolean condition = actual.equals(expected);
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML247
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML696
    public void testBuildNoEndingNode() throws AbstractZemucanException {
        String xml = ""; //$NON-NLS-1$
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_OPEN;
        xml += ImplementationXMLGrammarReaderTest.DELIMITERS_DELIMITERS;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_CREATE_ID_TOKEN;
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph432
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph554
        final GraphNode actual = new GraphNode(node11, graph);
        final GraphNode child1 = new GraphNode(node12, graph);
        actual.addChild(child1);
        final GraphNode expected = new GraphNode(node21, graph);
        final GraphNode child2 = new GraphNode(node22, graph);
        expected.addChild(child2);
        final boolean condition = actual.equals(expected);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph286
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph369
    public void testEqualsDifferentParents()
            throws AbstractZemucanException {
        final Graph graph = new Graph("test", false);

        final String node11 = GraphNodeTest.CREATE;
        final String node12 = GraphNodeTest.TABLE;
        final String node21 = GraphNodeTest.CREATE;
        final String node22 = GraphNodeTest.TABLESPACE;

        final GraphNode actual = new GraphNode(node11, graph);
        final GraphNode parent1 = new GraphNode(node12, graph);
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML700
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1284
                + ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_CREATE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // create Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_CREATE_ID;
FileProjectLine
name/angoca/zemucan/executer/impl/ImplementationExecuterTest.javaZemucan - executer impl224
name/angoca/zemucan/executer/impl/ImplementationExecuterTest.javaZemucan - executer impl283
        final String os = System.getProperty("os.name"); //$NON-NLS-1$

        System.setProperty("os.name", "Windows 7"); //$NON-NLS-1$ //$NON-NLS-2$
        final String[] actuals = ImplementationExecuter.getInstance()
                .getCommandsToExecute(command);
        System.setProperty("os.name", os); //$NON-NLS-1$

        final String[] expecteds = new String[] { "cmd.exe", "/c", "dir" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers503
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers562
        final List<Token> phraseIn = new ArrayList<Token>();
        phraseIn.add(new Token(tokenIn1, true));
        phraseIn.add(new Token(tokenIn2, true));
        phraseIn.add(new Token(tokenIn3, true));
        final boolean endsWithSpace = false;
        final GraphAnswer graph = ImplementationSyntacticAnalyzer.getInstance()
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph532
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph609
        final Graph graph = new Graph(GraphTest.STARTING_NODE, false);
        graph.addNode(GraphTest.ID1, GraphTest.ID1, true);
        graph.addNode(GraphTest.ID2, GraphTest.ID2, true);
        graph.firstPhaseFinished();
        graph.addRelation(GraphTest.ID1, GraphTest.ID2);

        Exception e = null;
        try {
            graph.getStartingNode();
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph423
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1028
        graph.addNode("tablespace", GraphTest.TABLE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph.firstPhaseFinished();
        graph.addRelation(Constants.STARTING_NODE, GraphTest.CREATE);
        graph.addRelation(GraphTest.CREATE, GraphTest.TABLE);
        graph.addRelation(GraphTest.CREATE, "tablespace");
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1067
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1222
        ImplementationXMLGrammarReaderTest.LOGGER.info("testDoubleDelimiters");
        ImplementationXMLGrammarReaderTest.LOGGER.debug(xml);
        final ImplementationXMLGrammarReader grammar = new ImplementationXMLGrammarReader(
                graph, contentToParse, contentToValidate);

        Exception e = null;
        try {
            grammar.generateGraph();
        } catch (final Exception exception) {
            e = exception;
        }
        Assert.assertTrue("XMLProblemException",
                e instanceof XMLProblemException);
    }
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML487
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1384
    private String testBuildNodeNotGoesToEndingNodeText() {
        String xml = ""; //$NON-NLS-1$
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_OPEN;
        xml += ImplementationXMLGrammarReaderTest.DELIMITERS_DELIMITERS;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_CREATE_ID_TOKEN;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML472
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1036
                .info("testBuildNotConnectedGraph");
        ImplementationXMLGrammarReaderTest.LOGGER.debug(xml);
        final ImplementationXMLGrammarReader grammar = new ImplementationXMLGrammarReader(
                graph, contentToParse, contentToValidate);

        Exception e = null;
        try {
            grammar.generateGraph();
        } catch (final Exception exception) {
            e = exception;
        }
        Assert.assertTrue("NodeNotComesFromStartingNodeException",
                e instanceof NodeNotComesFromStartingNodeException);
    }
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML313
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1222
        ImplementationXMLGrammarReaderTest.LOGGER.info("testDoubleDelimiters");
        ImplementationXMLGrammarReaderTest.LOGGER.debug(xml);
        final ImplementationXMLGrammarReader grammar = new ImplementationXMLGrammarReader(
                graph, contentToParse, contentToValidate);

        Exception e = null;
        try {
            grammar.generateGraph();
        } catch (final Exception exception) {
            e = exception;
        }
        Assert.assertTrue("XMLProblemException",
                e instanceof XMLProblemException);
    }
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers308
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers333
        final List<Token> phraseIn = new ArrayList<Token>();
        phraseIn.add(new Token(tokenIn1, true));
        final boolean endsWithSpace = false;
        final GraphAnswer graph = ImplementationSyntacticAnalyzer.getInstance()
                .analyzeTokens(phraseIn, endsWithSpace);
        final List<Token> actual = graph.getPhrases();
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers302
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers353
    public void testGetOptions1WithSpace() throws AbstractZemucanException {
        final String tokenIn1 = ImplementationSyntacticAnalyzerTest.CREATE;

        final String option1 = ImplementationSyntacticAnalyzerTest.TABLE;
        final String option2 = ImplementationSyntacticAnalyzerTest.TABLESPACE;

        final List<Token> phraseIn = new ArrayList<Token>();
        phraseIn.add(new Token(tokenIn1, true));
        final boolean endsWithSpace = true;
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers283
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers478
        final GraphAnswer actual = ImplementationSyntacticAnalyzer
                .getInstance().analyzeTokens(phraseIn, endsWithSpace);

        final List<Token> phraseOut = new ArrayList<Token>();
        final List<Token> options = new ArrayList<Token>();
        options.add(new Token(option1, true));
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers274
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers353
    public void testGetOptions1WithSpace() throws AbstractZemucanException {
        final String tokenIn1 = ImplementationSyntacticAnalyzerTest.CREATE;

        final String option1 = ImplementationSyntacticAnalyzerTest.TABLE;
        final String option2 = ImplementationSyntacticAnalyzerTest.TABLESPACE;

        final List<Token> phraseIn = new ArrayList<Token>();
        phraseIn.add(new Token(tokenIn1, true));
        final boolean endsWithSpace = true;
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers200
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers478
        final GraphAnswer actual = ImplementationSyntacticAnalyzer
                .getInstance().analyzeTokens(phraseIn, endsWithSpace);

        final List<Token> phraseOut = new ArrayList<Token>();
        final List<Token> options = new ArrayList<Token>();
        options.add(new Token(option1, true));
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers188
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers875
        final String option1 = ","; //$NON-NLS-1$
        final String option2 = ImplementationLexicalAnalyzerTest.CLOSE_PARENTHESIS;

        final ReturnOptions actual = ImplementationLexicalAnalyzer
                .getInstance().analyzePhrase(cmdIn);

        final ReturnOptions expected = new ReturnOptions(cmdOut,
                new String[] {}, new String[] { option1, option2 });

        Assert.assertEquals(
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers680
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers716
    public void testGetOptions6() throws AbstractZemucanException {
        final String tokenIn1 = ImplementationSyntacticAnalyzerTest.CREATE;
        final String tokenIn2 = ImplementationSyntacticAnalyzerTest.TABLE;
        final String tokenIn3 = ImplementationSyntacticAnalyzerTest.T1;
        final String tokenIn4 = ImplementationSyntacticAnalyzerTest.OPEN_PARENTHESIS;
        final String tokenIn5 = ImplementationSyntacticAnalyzerTest.C1;
        final String tokenIn6 = ImplementationSyntacticAnalyzerTest.INT;
        final String tokenIn7 = ImplementationSyntacticAnalyzerTest.CLOSE_PARENTHESIS;
        final String tokenIn8 = "in"; //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers334
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers565
        phraseIn.add(new Token(tokenIn4, true));
        final boolean endsWithSpace = false;
        final GraphAnswer graph = ImplementationSyntacticAnalyzer.getInstance()
                .analyzeTokens(phraseIn, endsWithSpace);
        final List<Token> actual = graph.getPhrases();

        final List<Token> expected = new ArrayList<Token>();

        Assert.assertEquals("Phrase for 'create table t1 (' command", //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers229
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers309
        phraseIn.add(new Token(tokenIn1, true));
        final boolean endsWithSpace = false;
        final GraphAnswer graph = ImplementationSyntacticAnalyzer.getInstance()
                .analyzeTokens(phraseIn, endsWithSpace);

        final List<Token> actual = graph.getOptions();
        final List<Token> expected = new ArrayList<Token>();
        expected.add(new Token(option1, true));
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph235
name/angoca/zemucan/core/graph/model/StartingNodeTest.javaZemucan - Core - graph92
                e instanceof ParentStartingNodeException);
    }

    /**
     * Tests if two consecutive calls returns the same value.
     *
     * @throws AbstractZemucanException
     *             Never
     */
    @Test
    public void testCongruent() throws AbstractZemucanException {
        final String node = "test"; //$NON-NLS-1$

        final GraphNode node1 = new GraphNode(node, new Graph("test", false));
        final int val1 = node1.hashCode();
        final int val2 = node1.hashCode();

        final boolean condition = val1 == val2;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML487
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML644
    public void testBuildNoEndingNode() throws AbstractZemucanException {
        String xml = ""; //$NON-NLS-1$
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_OPEN;
        xml += ImplementationXMLGrammarReaderTest.DELIMITERS_DELIMITERS;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_CREATE_ID_TOKEN;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML421
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML510
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // table Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_TABLE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_TABLE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_ENDING_NODE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // Ending Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_ENDING_NODE_ID;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML257
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML919
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_ENDING_NODE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // Ending Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_ENDING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_ENDING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKENS_2;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML247
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML487
    private String testBuildNodeNotComeFromStartingNodeText() {
        String xml = ""; //$NON-NLS-1$
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_OPEN;
        xml += ImplementationXMLGrammarReaderTest.DELIMITERS_DELIMITERS;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_TABLE_ID_TOKEN;
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers189
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers221
    public void testGetOptions0options() throws AbstractZemucanException {
        // There is nothing as token in.

        final String option1 = ImplementationSyntacticAnalyzerTest.CREATE;
        final String option2 = ImplementationSyntacticAnalyzerTest.ABOUT;
        final String option3 = ImplementationSyntacticAnalyzerTest.HELP;
        final String option4 = ImplementationSyntacticAnalyzerTest.LICENSE;

        final List<Token> phraseIn = new ArrayList<Token>();
        final boolean endsWithSpace = false;
        final GraphAnswer graph = ImplementationSyntacticAnalyzer.getInstance()
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers411
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers560
        final ReturnOptions ret = ImplementationLexicalAnalyzer.getInstance()
                .analyzePhrase(cmdIn);

        final String actual = ret.getPhrase();

        final String expected = "db2";

        final int actualOptionsSize = ret.getOptions().length;
        final int actualPhrasesSize = ret.getPhrases().length;
        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph317
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph575
    public void testHashCodeDifferent() throws AbstractZemucanException {
        final Graph graph = new Graph("test", false);

        final String node1 = GraphNodeTest.CREATE;
        final String node2 = GraphNodeTest.TABLENAME;

        final GraphNode actual = new GraphNode(node1, graph);
        final NonReservedGraphNode expected = new NonReservedGraphNode(node2,
                graph);

        final int actualHashcode = actual.hashCode();
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML247
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1009
    public void testBuildNotConnectedGraph() throws AbstractZemucanException {
        String xml = ""; //$NON-NLS-1$
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_OPEN;
        xml += ImplementationXMLGrammarReaderTest.DELIMITERS_DELIMITERS;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers281
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers696
        phraseIn.add(new Token(tokenIn7, true));
        final boolean endsWithSpace = false;
        final GraphAnswer actual = ImplementationSyntacticAnalyzer
                .getInstance().analyzeTokens(phraseIn, endsWithSpace);

        final List<Token> phraseOut = new ArrayList<Token>();
        final List<Token> options = new ArrayList<Token>();
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers148
name/angoca/zemucan/IntegrationTest.javaZemucan - main71
    @BeforeClass
    public static void setUpBeforeClass() throws AbstractZemucanException {
        System.setProperty(Constants.ZEMUCAN_CONF_XML_PROPERTY,
                "sa_conf-test.xml"); //$NON-NLS-1$
        Configurator.getInstance().setProperty(
                Constants.GRAMMAR_READER_NAME_PROPERTY,
                Configurator.GRAMMAR_READER_NAME_VALUE);
        Configurator.getInstance()
                .setProperty(Constants.GRAMMAR_FILE_DESCRIPTORS_PROPERTY,
                        "grammar-test.xml"); //$NON-NLS-1$
        ImplementationSyntacticAnalyzer.getInstance();
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerAcceptanceTest.javaZemucan - Core - analyzers57
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers64
public final class ImplementationLexicalAnalyzerRealGrammarTest {

    /**
     * Load the graph.
     *
     * @throws AbstractZemucanException
     *             Never
     */
    @BeforeClass
    public static void setUpBeforeClass() throws AbstractZemucanException {
        System.setProperty(Constants.ZEMUCAN_CONF_XML_PROPERTY,
                "sa_conf-test-realGrammar.xml"); //$NON-NLS-1$
        Configurator.getInstance().setProperty(
                Constants.GRAMMAR_READER_NAME_PROPERTY,
                Configurator.GRAMMAR_READER_NAME_VALUE);

        // Creates the Lexical analyzer instance.
        ImplementationLexicalAnalyzer.getInstance();
    }

    /**
     * Clears the configuration file name property at the end of the test.
     */
    @AfterClass
    public static void tearDownAfterClass() {
FileProjectLine
name/angoca/zemucan/interfaze/InterfaceCoreTest.javaZemucan - Core - interface82
name/angoca/zemucan/IntegrationTest.javaZemucan - main63
public final class IntegrationTest {

    /**
     * Refreshes the singletons.
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @BeforeClass
    public static void setUpBeforeClass() throws AbstractZemucanException {
        System.setProperty(Constants.ZEMUCAN_CONF_XML_PROPERTY,
                "sa_conf-test.xml"); //$NON-NLS-1$
        Configurator.getInstance().setProperty(
                Constants.GRAMMAR_READER_NAME_PROPERTY,
                Configurator.GRAMMAR_READER_NAME_VALUE);
        Configurator.getInstance()
                .setProperty(Constants.GRAMMAR_FILE_DESCRIPTORS_PROPERTY,
                        "grammar-test.xml"); //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML518
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1407
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // Ending Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_ENDING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_ENDING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKENS_2;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_2;
        return xml;
    }

    /**
     * Tests that a simple graph is different with and without extra tokens.
     *
     * @throws AbstractZemucanException
     *             Never
     */
    @Test
    public void testErrorBuildWithExtraTokens() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers387
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers416
        final String option1 = ImplementationSyntacticAnalyzerTest.TABLE_NAME;

        final List<Token> phraseIn = new ArrayList<Token>();
        phraseIn.add(new Token(tokenIn1, true));
        phraseIn.add(new Token(tokenIn2, true));
        final boolean endsWithSpace = false;
        final GraphAnswer graph = ImplementationSyntacticAnalyzer.getInstance()
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers370
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers845
        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        Assert.assertTrue("options: '" + cmdIn + "'",
                ret.getOptions().length == 0);
        Assert.assertTrue("phrases: '" + cmdIn + "'",
                ret.getPhrases().length == 2);
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers320
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers444
        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        // <tableName>
        Assert.assertTrue("options: '" + cmdIn + "'",
                ret.getOptions().length == 1);
        Assert.assertTrue("phrases: '" + cmdIn + "'",
                ret.getPhrases().length == 0);
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers224
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers272
        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        Assert.assertTrue("options: '" + cmdIn + "'",
                ret.getOptions().length == 0);
        Assert.assertTrue("phrases: '" + cmdIn + "'",
                ret.getPhrases().length == 0);
FileProjectLine
name/angoca/zemucan/core/graph/model/Graph.javaZemucan - Core - graph581
name/angoca/zemucan/core/graph/model/Graph.javaZemucan - Core - graph946
                + parentId);
        if (parent == null) {
            throw new NotExistingNodeException(parentId);
        }

        // Retrieves the child and established the relation.
        final AbstractGraphNode childNode = this.nodes.get(this.name + ':'
                + childId);
        if (childNode == null) {
            throw new NotExistingChildNodeException(parentId, childId);
        }

        parent.removeChild(childNode);
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers334
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers448
        phraseIn.add(new Token(tokenIn2, true));
        final boolean endsWithSpace = false;
        final GraphAnswer graph = ImplementationSyntacticAnalyzer.getInstance()
                .analyzeTokens(phraseIn, endsWithSpace);
        final List<Token> actual = graph.getPhrases();

        final List<Token> expected = new ArrayList<Token>();
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers148
name/angoca/zemucan/interfaze/InterfaceCoreTest.javaZemucan - Core - interface89
    @BeforeClass
    public static void setUpBeforeClass() throws AbstractZemucanException {
        System.setProperty(Constants.ZEMUCAN_CONF_XML_PROPERTY,
                "sa_conf-test.xml"); //$NON-NLS-1$
        Configurator.getInstance().setProperty(
                Constants.GRAMMAR_READER_NAME_PROPERTY,
                Configurator.GRAMMAR_READER_NAME_VALUE);
        Configurator.getInstance()
                .setProperty(Constants.GRAMMAR_FILE_DESCRIPTORS_PROPERTY,
                        "grammar-test.xml"); //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers629
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers897
        final String cmdIn = ImplementationLexicalAnalyzerTest.SPACE;

        final String cmdOut = ""; //$NON-NLS-1$

        final ReturnOptions ret = ImplementationLexicalAnalyzer.getInstance()
                .analyzePhrase(cmdIn);
        final String actual = ret.getPhrase();

        final String expected = cmdOut;

        Assert.assertEquals("Empty phrase for an space", expected, //$NON-NLS-1$
                actual);
    }

    /**
     * The string with just one space returns a string with one space also.
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @Test
    public void testSpace2() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers118
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers148
    @BeforeClass
    public static void setUpBeforeClass() throws AbstractZemucanException {
        System.setProperty(Constants.ZEMUCAN_CONF_XML_PROPERTY,
                "sa_conf-test.xml"); //$NON-NLS-1$
        Configurator.getInstance().setProperty(
                Constants.GRAMMAR_READER_NAME_PROPERTY,
                Configurator.GRAMMAR_READER_NAME_VALUE);
        Configurator.getInstance()
                .setProperty(Constants.GRAMMAR_FILE_DESCRIPTORS_PROPERTY,
                        "grammar-test.xml"); //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/IntegrationTest.javaZemucan - main155
name/angoca/zemucan/IntegrationTest.javaZemucan - main177
        final OutputWriter writer = null;

        Exception e = null;
        try {
            ImplementationExecuter.getInstance().execute(command, writer);
        } catch (final Exception exception) {
            e = exception;
        }
        Assert.assertTrue("ParameterNullException",
                e instanceof ParameterNullException);
    }

    /**
     * Tests the execution of a quit command.
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @Test
    public void testExecuteQuit() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers503
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers767
        final List<Token> phraseIn = new ArrayList<Token>();
        phraseIn.add(new Token(tokenIn1, true));
        phraseIn.add(new Token(tokenIn2, true));
        phraseIn.add(new Token(tokenIn3, true));
FileProjectLine
name/angoca/zemucan/interfaze/model/ReturnOptionsTest.javaZemucan - Core - ui API208
name/angoca/zemucan/interfaze/model/ReturnOptionsTest.javaZemucan - Core - ui API280
    public void testHashCode() throws ParameterNullException {
        final String phrase = "create table"; //$NON-NLS-1$
        final String phrase1 = ReturnOptionsTest.TABLESPACE;
        final String option1 = ReturnOptionsTest.TABLE_NAME;

        final ReturnOptions object = new ReturnOptions(phrase,
                new String[] { phrase1 }, new String[] { option1 });
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1530
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1680
        String expectedGraphName = "merged:{" + graphName1 + ',' + graphName2
                + "}:";
        String expected = expectedGraphName + '[' + GraphState.Validated
                + "-WithoutExtraNodes{{" + Constants.STARTING_NODE + '<'
                + expectedGraphName + graphName1 + ':' + a + '-'
                + expectedGraphName + graphName1 + ':' + create1Id + '-'
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1024
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1315
        final Graph graph = new Graph("not coming starting node", true); //$NON-NLS-1$
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(GraphTest.TABLE, GraphTest.TABLE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph817
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph883
        graph2.simplifyGraph();

        final String actual = graph2.toString();

        String expectedGraphName = "merged:{" + graphName2 + ',' + graphName1
                + "}:";
        String expected = expectedGraphName + '[' + GraphState.Validated
                + "-WithoutExtraNodes{{" + Constants.STARTING_NODE + '<'
                + expectedGraphName + graphName2 + ':' + create + ">}-{"
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph420
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1024
        final Graph graph = new Graph("Duplicated node name", true); //$NON-NLS-1$
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(GraphTest.TABLE, GraphTest.TABLE, true);
        graph.addNode("tablespace", GraphTest.TABLE, true);
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1036
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1222
        ImplementationXMLGrammarReaderTest.LOGGER.info("testEmptyGrammar");
        ImplementationXMLGrammarReaderTest.LOGGER.debug(xml);
        final ImplementationXMLGrammarReader grammar = new ImplementationXMLGrammarReader(
                graph, contentToParse, contentToValidate);

        Exception e = null;
        try {
            grammar.generateGraph();
        } catch (final Exception exception) {
            e = exception;
        }
        Assert.assertTrue("EmptyGrammarException",
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1009
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1127
    private String testBuildWithExtraTokensText() {
        String xml = ""; //$NON-NLS-1$
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_OPEN;
        xml += ImplementationXMLGrammarReaderTest.DELIMITERS_DELIMITERS;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML283
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML986
                .info("testBuildNotAllChildren");
        ImplementationXMLGrammarReaderTest.LOGGER.debug(xml);
        final ImplementationXMLGrammarReader grammar = new ImplementationXMLGrammarReader(
                graph, contentToParse, contentToValidate);

        Exception e = null;
        try {
            grammar.generateGraph();
        } catch (final Exception exception) {
            e = exception;
        }
        Assert.assertTrue("NotExistingChildNodeException",
FileProjectLine
name/angoca/zemucan/core/syntactic/model/GraphAnswerTest.javaZemucan - Core - analyzers238
name/angoca/zemucan/core/syntactic/model/GraphAnswerTest.javaZemucan - Core - analyzers454
        final List<Token> phrases1 = new ArrayList<Token>();
        phrases1.add(new Token(phrase1, true));
        final List<Token> options1 = new ArrayList<Token>();
        options1.add(new Token(option1, false));
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers444
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers801
        final String tokenOut2 = ImplementationSyntacticAnalyzerTest.TABLESPACE;

        final List<Token> phraseIn = new ArrayList<Token>();
        phraseIn.add(new Token(tokenIn1, true));
        phraseIn.add(new Token(tokenIn2, true));
        final boolean endsWithSpace = false;
        final GraphAnswer actual = ImplementationSyntacticAnalyzer
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers532
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers557
        final String opt1 = ImplementationLexicalAnalyzerTest.COL_NAME;

        final ReturnOptions actual = ImplementationLexicalAnalyzer
                .getInstance().analyzePhrase(cmdIn);

        final ReturnOptions expected = new ReturnOptions(cmdOut,
                new String[] {}, new String[] { opt1 });

        Assert.assertEquals("object for 'create table t2 ('", expected, //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph251
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph609
        final Graph graph = new Graph("ending node", false); //$NON-NLS-1$
        graph.addNode(GraphTest.ID1, GraphTest.ID1, true);
        graph.addNode(GraphTest.ID2, GraphTest.ID2, true);
        graph.firstPhaseFinished();
        graph.addRelation(GraphTest.ID1, GraphTest.ID2);
FileProjectLine
name/angoca/zemucan/core/graph/model/LicenseNodeTest.javaZemucan - Core - graph138
name/angoca/zemucan/core/graph/model/LicenseNodeTest.javaZemucan - Core - graph160
    public void testEqualsNodeReserved() throws AbstractZemucanException {
        final String node = LicenseNodeTest.LICENSE_NODE;
        final Graph graph = new Graph("test", false);

        final LicenseNode actual = new LicenseNode(graph);
        final GraphNode notExpected = new GraphNode(node, graph);

        Assert.assertFalse(
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph206
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph228
    public void testAddNullRelation2() throws AbstractZemucanException {
        final Graph graph = new Graph(GraphTest.NULL_RELATION, false);
        graph.addNode(GraphTest.ID1, GraphTest.ID1, true);
        graph.firstPhaseFinished();

        Exception e = null;
        try {
            graph.addRelation(null, GraphTest.ID1);
FileProjectLine
name/angoca/zemucan/core/graph/model/EndingNodeTest.javaZemucan - Core - graph150
name/angoca/zemucan/core/graph/model/EndingNodeTest.javaZemucan - Core - graph172
    public void testEqualsNodeReserved() throws AbstractZemucanException {
        final String node = EndingNodeTest.ENDING_NODE;
        final Graph graph = new Graph("test", false);

        final EndingNode actual = new EndingNode(graph);
        final GraphNode notExpected = new GraphNode(node, graph);

        Assert.assertFalse(
FileProjectLine
name/angoca/zemucan/core/graph/model/AboutNodeTest.javaZemucan - Core - graph162
name/angoca/zemucan/core/graph/model/AboutNodeTest.javaZemucan - Core - graph184
    public void testEqualsNodeReserved() throws AbstractZemucanException {
        final String node = AboutNodeTest.ABOUT_NODE;
        final Graph graph = new Graph("test", false);

        final AboutNode actual = new AboutNode(graph);
        final GraphNode notExpected = new GraphNode(node, graph);

        Assert.assertFalse("Equals between AboutNode and a reserved GraphNode", //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/core/graph/model/AboutNodeTest.javaZemucan - Core - graph100
name/angoca/zemucan/core/graph/model/LicenseNodeTest.javaZemucan - Core - graph77
        final LicenseNode node1 = new LicenseNode(new Graph("test", false));
        final int val1 = node1.hashCode();
        final int val2 = node1.hashCode();

        final boolean val = val1 == val2;

        Assert.assertTrue("Two consecutive calls return the same value", val); //$NON-NLS-1$
    }

    /**
     * Test the toString method with no license file.
     *
     * @throws AbstractZemucanException
     *             Never
     */
    @Test
    public void testDefaultLicense() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML519
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML593
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // Ending Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_ENDING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_ENDING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKENS_2;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_2;
        return xml;
    }

    /**
     * Tests a grammar that has a node that references to StartingNode.
     *
     * @throws AbstractZemucanException
     *             Never
     */
    @Test
    public void testBuildNodeReferencingStartingNode()
FileProjectLine
name/angoca/zemucan/core/syntactic/model/GraphAnswerTest.javaZemucan - Core - analyzers206
name/angoca/zemucan/core/syntactic/model/GraphAnswerTest.javaZemucan - Core - analyzers238
        final List<Token> phrases1 = new ArrayList<Token>();
        phrases1.add(new Token(phrase1, true));
        final List<Token> options1 = new ArrayList<Token>();
        options1.add(new Token(option1, true));
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzer.javaZemucan - Core - analyzers263
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzer.javaZemucan - Core - analyzers295
	private ReturnOptions phraseOne(String newPhrase, final List<Token> tokens,
			final GraphAnswer answer, final int sizeOptions,
			String[] setOfOptions, String[] setOfPhrases)
			throws GeneralException, ParameterNullException {
		if (sizeOptions > 1) {
			// There are one phrase and multiple options, then add them.
			ImplementationLexicalAnalyzer.LOGGER.debug("Case 4!");
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph950
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1439
        final Graph graph1 = new Graph(GraphTest.GRAPH1, false);
        final Graph graph2 = new Graph(GraphTest.GRAPH2, false);

        graph1.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph1.addNode(GraphTest.CREATE1, GraphTest.CREATE, true);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph424
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1188
        graph.addNode(GraphTest.OTHER, GraphTest.OTHER, true);

        graph.firstPhaseFinished();
        graph.addRelation(Constants.STARTING_NODE, GraphTest.CREATE);
        graph.addRelation(GraphTest.CREATE, GraphTest.TABLE);
        graph.addRelation(GraphTest.TABLE, Constants.ENDING_NODE);

        graph.addRelation(GraphTest.OTHER, GraphTest.CREATE);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph250
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph317
    public void testAddRelationInSecondPhase()
            throws AbstractZemucanException {
        final Graph graph = new Graph(GraphTest.ADD_RELATION, false);
        graph.addNode(GraphTest.ID1, GraphTest.ID1, true);
        graph.addNode(GraphTest.ID2, GraphTest.ID2, true);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph1076
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph1104
    public void testToStringWithParents() throws AbstractZemucanException {
        final Graph graph = new Graph("test", false);

        final String nodeIn = GraphNodeTest.TABLENAME;
        final String nodeIn1 = GraphNodeTest.TABLENAME;
        final String nodeOut = GraphNodeTest.TABLENAME + "::" + '{'
                + GraphNodeTest.TABLENAME
                + "\n1\t<" + GraphNodeTest.TABLENAME + ">\n0\nfalse|false}"; //$NON-NLS-1$ //$NON-NLS-2$
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers198
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers671
        final int actualOptionsSize = ret.getOptions().length;
        final int actualPhrasesSize = ret.getPhrases().length;
        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        Assert.assertEquals("options: '" + cmdIn + "'", 0, actualOptionsSize);
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers122
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers418
        final int actualOptionsSize = ret.getOptions().length;
        final int actualPhrasesSize = ret.getPhrases().length;
        Assert.assertEquals("phrase '" + cmdIn + "'", expected, actual);
        // EMPTY
        Assert.assertEquals("options '" + cmdIn + "'", 0, actualOptionsSize);
FileProjectLine
name/angoca/zemucan/core/graph/model/StartingNodeTest.javaZemucan - Core - graph141
name/angoca/zemucan/core/graph/model/StartingNodeTest.javaZemucan - Core - graph161
    public void testEqualsNodeReserved() throws AbstractZemucanException {
        final String node = "StartingNode"; //$NON-NLS-1$
        final Graph graph = new Graph("test", false);

        final StartingNode actual = new StartingNode(graph);
        final GraphNode notExpected = new GraphNode(node, graph);

        Assert.assertFalse("equals for a reserved object", //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph423
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph546
    public void testEqualsSameChildren() throws AbstractZemucanException {
        final Graph graph = new Graph("test", false);

        final String node11 = GraphNodeTest.CREATE;
        final String node12 = GraphNodeTest.TABLE;
        final String node21 = GraphNodeTest.CREATE;
        final String node22 = GraphNodeTest.TABLE;

        final GraphNode actual = new GraphNode(node11, graph);
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML775
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1407
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // Ending Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_ENDING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_ENDING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKENS_2;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_2;
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers389
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers446
        final List<Token> phraseIn = new ArrayList<Token>();
        phraseIn.add(new Token(tokenIn1, true));
        phraseIn.add(new Token(tokenIn2, true));
        final boolean endsWithSpace = false;
        final GraphAnswer graph = ImplementationSyntacticAnalyzer.getInstance()
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerAcceptanceTest.javaZemucan - Core - analyzers57
name/angoca/zemucan/ui/impl/jline/JlineInputReaderTest.javaZemucan - ui impl jLine74
public final class JlineInputReaderTest {
    /**
     * Establishes the configuration for the tests. This configuration is before
     * all the tests.
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @BeforeClass
    public static void setUpBeforeClass() throws AbstractZemucanException {
        System.setProperty(Constants.ZEMUCAN_CONF_XML_PROPERTY,
                "sa_conf-test-realGrammar.xml"); //$NON-NLS-1$
        Configurator.getInstance().setProperty(
                Constants.GRAMMAR_READER_NAME_PROPERTY,
                Configurator.GRAMMAR_READER_NAME_VALUE);

        // Creates the Lexical analyzer instance.
        ImplementationLexicalAnalyzer.getInstance();
    }

    /**
     * Configuration before each test.
     *
     * @throws IOException
     *             If there is a problem when initializing the console.
     */
    @Before
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph407
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph528
        final GraphNode actual = new GraphNode(node1, graph);
        final GraphNode expected = new GraphNode(node2, graph);
        final boolean condition = actual.equals(expected);
        final boolean condition2 = expected.equals(actual);

        Assert.assertTrue("two identical nodes - reserved word", //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph349
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph462
        final NonReservedGraphNode actual = new NonReservedGraphNode(node1,
                graph);
        final NonReservedGraphNode expected = new NonReservedGraphNode(node2,
                graph);
        final boolean condition = actual.equals(expected);
        final boolean condition2 = expected.equals(actual);

        Assert.assertTrue("two identical node reserved", condition); //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/core/graph/model/AboutNodeTest.javaZemucan - Core - graph100
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph248
        final GraphNode node1 = new GraphNode(node, new Graph("test", false));
        final int val1 = node1.hashCode();
        final int val2 = node1.hashCode();

        final boolean val = val1 == val2;

        Assert.assertTrue("Two consecutive calls return the same value", val); //$NON-NLS-1$
    }

    /**
     * Tests that the graph node has to receive a not null parameter.
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @Test(expected = AssertionError.class)
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML441
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML651
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_CREATE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // create Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML429
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML576
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // create Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_CREATE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_CREATE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_TABLE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_ENDING_NODE_ID_TOKEN;
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers229
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers255
        final List<Token> phraseIn = new ArrayList<Token>();
        final boolean endsWithSpace = false;
        final GraphAnswer graph = ImplementationSyntacticAnalyzer.getInstance()
                .analyzeTokens(phraseIn, endsWithSpace);
        final List<Token> actual = graph.getPhrases();
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers191
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers610
        final ReturnOptions actual = ImplementationLexicalAnalyzer
                .getInstance().analyzePhrase(cmdIn);

        final ReturnOptions expected = new ReturnOptions(cmdOut,
                new String[] {}, new String[] { option1, option2 });

        Assert.assertEquals("object for 'create table t2(c1'", expected, //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph286
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph546
    public void testEqualsMoreChildren() throws AbstractZemucanException {
        final Graph graph = new Graph("test", false);

        final String node11 = GraphNodeTest.CREATE;
        final String node12 = GraphNodeTest.TABLE;
        final String node21 = GraphNodeTest.CREATE;
        final String node22 = GraphNodeTest.TABLE;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1680
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1708
                .info("testNullContentToValidate");

        Exception e = null;
        try {
            new ImplementationXMLGrammarReader(graph, contentToParse,
                    contentToValidate);
        } catch (final Exception exception) {
            e = exception;
        }
        Assert.assertTrue("ParameterNullException",
                e instanceof ParameterNullException);
    }

    /**
     * Tests that a graph cannot be null.
     *
     * @throws AbstractZemucanException
     *             Never
     */
    @Test
    public void testNullGraph() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1099
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1179
                .info("testBuildWithoutExtraTokens");
        ImplementationXMLGrammarReaderTest.LOGGER.debug(xml);
        final ImplementationXMLGrammarReader grammar = new ImplementationXMLGrammarReader(
                actual, contentToParse, contentToValidate);
        grammar.generateGraph();
        grammar.getStartingNode();

        final Graph expected = new Graph(
                ImplementationXMLGrammarReaderTest.NORMAL_GRAPH, false);
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML669
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML882
        final Graph graph = new Graph(id, false);
        final InputSource contentToParse = new InputSource(
                new StringReader(xml));
        final InputSource contentToValidate = new InputSource(new StringReader(
                xml));
        ImplementationXMLGrammarReaderTest.LOGGER
                .info("testBuildNoStartingNode");
FileProjectLine
name/angoca/zemucan/executer/impl/ImplementationExecuterTest.javaZemucan - executer impl116
name/angoca/zemucan/executer/impl/ImplementationExecuterTest.javaZemucan - executer impl143
        System.setProperty(ImplementationExecuter.DB2_PARAMS, "-v"); //$NON-NLS-1$
        System.setProperty("os.name", "Linux Virtual"); //$NON-NLS-1$ //$NON-NLS-2$

        final String command = "db2 !ls"; //$NON-NLS-1$
        final String[] actuals = ImplementationExecuter.getInstance()
                .getCommandsToExecute(command);

        final String[] expecteds = new String[] { "db2", "-v", "!ls" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1492
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1561
    public void testSimplify3() throws AbstractZemucanException {
        final String graphName1 = GraphTest.GRAPH1;
        final String graphName2 = GraphTest.GRAPH2;
        final String create1Id = GraphTest.CREATE1;
        final String create2Id = GraphTest.CREATE2;
        final String create = GraphTest.CREATE;
        final String z = "z"; //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1028
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1087
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph.firstPhaseFinished();
        graph.addRelation(Constants.STARTING_NODE, GraphTest.CREATE);
        graph.addRelation(GraphTest.CREATE, Constants.ENDING_NODE);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1028
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1903
        graph.addNode(GraphTest.TABLE, GraphTest.TABLE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph.firstPhaseFinished();
        graph.addRelation(Constants.STARTING_NODE, GraphTest.CREATE);
        graph.addRelation(Constants.STARTING_NODE, GraphTest.TABLE);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph932
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1274
        graph2.addNode(GraphTest.OTHER, GraphTest.OTHER, true);
        graph2.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph2.firstPhaseFinished();
        graph2.addRelation(Constants.STARTING_NODE, GraphTest.CREATE);
        graph2.addRelation(GraphTest.CREATE, GraphTest.OTHER);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph423
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1876
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph.firstPhaseFinished();
        graph.addRelation(Constants.STARTING_NODE, GraphTest.CREATE);
        graph.addRelation(GraphTest.CREATE, Constants.ENDING_NODE);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph274
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph297
        graph.addNode(GraphTest.ID2, GraphTest.ID2, true);
        graph.firstPhaseFinished();

        Exception e = null;
        try {
            graph.addRelation(GraphTest.ID1, GraphTest.ID2);
        } catch (final Exception exception) {
            e = exception;
        }
        Assert.assertTrue("NotExistingNodeException",
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph182
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph423
        graph.addNode(GraphTest.TABLE, GraphTest.TABLE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph.firstPhaseFinished();
        graph.addRelation(Constants.STARTING_NODE, GraphTest.CREATE);
        graph.addRelation(GraphTest.CREATE, GraphTest.TABLE);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph149
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph173
    public void testAddNullParent() throws AbstractZemucanException {
        final String name = GraphNodeTest.NODE;
        final GraphNode nul = null;

        final GraphNode graphNode = new GraphNode(name,
                new Graph("test", false));

        Exception e = null;
        try {
            graphNode.addParent(nul);
FileProjectLine
name/angoca/zemucan/executer/impl/ImplementationExecuter.javaZemucan - executer impl494
name/angoca/zemucan/executer/impl/ImplementationExecuter.javaZemucan - executer impl551
    private String[]/* [!]! */getWindowsCommand(final boolean isADB2Command,
            final boolean thereAreDB2Params, final String/* ? */db2params,
            final String/* ! */db2Command) {
        assert db2Command != null;

        String[] commands;
        if (isADB2Command) {
            if (thereAreDB2Params) {
                ImplementationExecuter.LOGGER
                        .debug("Windows and db2 command with params"); //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers446
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers474
        final List<Token> phraseIn = new ArrayList<Token>();
        phraseIn.add(new Token(tokenIn1, true));
        phraseIn.add(new Token(tokenIn2, true));
        final boolean endsWithSpace = true;
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers397
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers481
        final List<Token> phraseOut = new ArrayList<Token>();
        final List<Token> options = new ArrayList<Token>();
        options.add(new Token(option1, true));
        final GraphAnswer expected = new GraphAnswer(phraseOut, options);

        Assert.assertEquals("'create table ' command", expected, actual); //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers488
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers534
        final ReturnOptions actual = ImplementationLexicalAnalyzer
                .getInstance().analyzePhrase(cmdIn);

        final ReturnOptions expected = new ReturnOptions(cmdOut,
                new String[] {}, new String[] { opt1 });

        Assert.assertEquals("object for 'create table t2('", expected, //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers286
name/angoca/zemucan/core/syntactic/model/GraphAnswerTest.javaZemucan - Core - analyzers177
        phrases.add(new Token(phrase1, true));
        final List<Token> options = new ArrayList<Token>();
        options.add(new Token(option1, true));
        options.add(new Token(option2, true));
        final GraphAnswer object = new GraphAnswer(phrases, options);
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers166
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers982
        final ReturnOptions actual = ImplementationLexicalAnalyzer
                .getInstance().analyzePhrase(cmdIn);

        final ReturnOptions expected = new ReturnOptions(cmdOut,
                new String[] {}, new String[] {});

        Assert.assertEquals(
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers78
name/angoca/zemucan/interfaze/InterfaceCoreTest.javaZemucan - Core - interface98
                        "grammar-test.xml"); //$NON-NLS-1$

        // Creates the lexical analyzer instance.
        ImplementationLexicalAnalyzer.getInstance();
    }

    /**
     * Clears the configuration file name property at the end of the test.
     */
    @AfterClass
    public static void tearDownAfterClass() {
        // Destroys any existent instance.
        ImplementationLexicalAnalyzer.destroyInstance();

        // Recreates the configurator instance.
        Configurator.destroyInstance();
        GrammarReaderController.destroyInstance();
        System.clearProperty(Constants.ZEMUCAN_CONF_XML_PROPERTY);
    }

    /**
     * Default constructor.
     */
    public InterfaceCoreTest() {
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph798
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1568
        final Graph graph1 = new Graph(graphName1, false);
        final Graph graph2 = new Graph(graphName2, false);

        graph1.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph1.addNode(create1Id, GraphTest.CREATE, true);
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML669
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1173
        final Graph actual = new Graph(id, false);
        final InputSource contentToParse = new InputSource(
                new StringReader(xml));
        final InputSource contentToValidate = new InputSource(new StringReader(
                xml));
        ImplementationXMLGrammarReaderTest.LOGGER
                .info("testBuildWithoutExtraTokens");
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph511
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph536
        graph.addRelation(GraphTest.ID1, GraphTest.ID2);

        Exception e = null;
        try {
            graph.getEndingNode();
        } catch (final Exception exception) {
            e = exception;
        }
        Assert.assertTrue("InvalidGraphStateException",
                e instanceof InvalidGraphStateException);
    }

    /**
     * Tests the retrieve of starting node.
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @Test
    public void testGetStartingNode() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph724
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph801
    public void testRemoveParent() throws AbstractZemucanException {
        final Graph graph = new Graph("test", false);

        final String name = GraphNodeTest.GRAPHNODE;
        final GraphNode graphNode = new GraphNode(name, graph);

        int size = graphNode.getParents().size();
FileProjectLine
name/angoca/zemucan/core/graph/model/EndingNodeTest.javaZemucan - Core - graph286
name/angoca/zemucan/core/graph/model/StartingNodeTest.javaZemucan - Core - graph272
        final StartingNode actual = new StartingNode(new Graph("test", false));

        final boolean value = actual.equals(actual);

        Assert.assertTrue("Symmetry", value); //$NON-NLS-1$
    }

    /**
     * Test the toString method.
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @Test
    public void testToString() throws AbstractZemucanException {
        final StartingNode actual = new StartingNode(new Graph("test", false));
FileProjectLine
name/angoca/zemucan/core/graph/model/AboutNodeTest.javaZemucan - Core - graph100
name/angoca/zemucan/core/graph/model/EndingNodeTest.javaZemucan - Core - graph113
        final EndingNode node1 = new EndingNode(graph);
        final int val1 = node1.hashCode();
        final int val2 = node1.hashCode();

        final boolean val = val1 == val2;

        Assert.assertTrue("Two consecutive calls return the same value", val); //$NON-NLS-1$
    }

    /**
     * Test that the hash code is different to hashCode of StartingNode.
     *
     * @throws AbstractZemucanException
     *             Never
     */
    @Test
    public void testDifferentStartingNodeHashCode()
FileProjectLine
name/angoca/zemucan/core/graph/model/AbstractGraphNode.javaZemucan - Core - graph229
name/angoca/zemucan/core/graph/model/AbstractGraphNode.javaZemucan - Core - graph250
        final int size = this.parents.size();
        boolean ret = false;
        for (int i = 0; (i < size) && !ret; i += 1) {
            if (graphNode.getId().equals(this.parents.get(i).getId())) {
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML966
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1593
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_CREATE_ID_TOKEN;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML429
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML500
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // create Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_CREATE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_CREATE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_ENDING_NODE_ID_TOKEN;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML380
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1437
                .info("testBuildWithExtraTokens");
        ImplementationXMLGrammarReaderTest.LOGGER.debug(xml);
        final ImplementationXMLGrammarReader grammar = new ImplementationXMLGrammarReader(
                actual, contentToParse, contentToValidate);
        grammar.generateGraph();
        grammar.getStartingNode();

        final Graph expected = new Graph(
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML335
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML644
    public void testBuildNoEndingNode() throws AbstractZemucanException {
        String xml = ""; //$NON-NLS-1$
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_OPEN;
        xml += ImplementationXMLGrammarReaderTest.DELIMITERS_DELIMITERS;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML251
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1593
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_CREATE_ID_TOKEN;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML247
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML335
    public void testBuildInvalidStructure() throws AbstractZemucanException {
        String xml = ""; //$NON-NLS-1$
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_OPEN;
        xml += ImplementationXMLGrammarReaderTest.DELIMITERS_DELIMITERS;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers281
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers805
        phraseIn.add(new Token(tokenIn2, true));
        final boolean endsWithSpace = false;
        final GraphAnswer actual = ImplementationSyntacticAnalyzer
                .getInstance().analyzeTokens(phraseIn, endsWithSpace);

        final List<Token> phraseOut = new ArrayList<Token>();
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers203
name/angoca/zemucan/core/syntactic/model/GraphAnswerTest.javaZemucan - Core - analyzers177
        phrases.add(new Token(phrase1, true));
        final List<Token> options = new ArrayList<Token>();
        options.add(new Token(option1, true));
        options.add(new Token(option2, true));
FileProjectLine
name/angoca/zemucan/core/lexical/model/TokenTest.javaZemucan - Core - analyzers116
name/angoca/zemucan/core/lexical/model/TokenTest.javaZemucan - Core - analyzers194
    public void testHashCodeDifferentObject() throws InvalidTokenException {
        final String token1 = TokenTest.CREATE;
        final String token2 = "table"; //$NON-NLS-1$

        final Token expected = new Token(token1, true);
        final Token actual = new Token(token2, true);
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers532
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers849
        final String option = ImplementationLexicalAnalyzerTest.COL_NAME;

        final ReturnOptions actual = ImplementationLexicalAnalyzer
                .getInstance().analyzePhrase(cmdIn);

        final ReturnOptions expected = new ReturnOptions(cmdOut,
                new String[] {}, new String[] { option });
FileProjectLine
name/angoca/zemucan/interfaze/model/ReturnOptionsTest.javaZemucan - Core - ui API90
name/angoca/zemucan/interfaze/model/ReturnOptionsTest.javaZemucan - Core - ui API465
    public void testSymmetric() throws ParameterNullException {
        final String phrase = "test"; //$NON-NLS-1$
        final String[] phrases = new String[] { "test1" }; //$NON-NLS-1$
        final String[] options = new String[] { "test2" }; //$NON-NLS-1$
        final ReturnOptions actual = new ReturnOptions(phrase, phrases, options);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1086
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1157
        final Graph graph = new Graph("no starting node", false); //$NON-NLS-1$
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph.firstPhaseFinished();
        graph.addRelation(GraphTest.CREATE, Constants.ENDING_NODE);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1029
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1188
        graph.addNode(GraphTest.OTHER, GraphTest.OTHER, true);

        graph.firstPhaseFinished();
        graph.addRelation(Constants.STARTING_NODE, GraphTest.CREATE);
        graph.addRelation(GraphTest.CREATE, GraphTest.TABLE);
        graph.addRelation(GraphTest.TABLE, Constants.ENDING_NODE);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph557
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1157
        final Graph graph = new Graph("no starting node", false); //$NON-NLS-1$
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph.firstPhaseFinished();
        graph.addRelation(GraphTest.CREATE, Constants.ENDING_NODE);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph182
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph345
        graph.addNode(GraphTest.TABLE, GraphTest.TABLE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph.firstPhaseFinished();
        graph.addRelation(Constants.STARTING_NODE, GraphTest.CREATE);
        graph.addRelation(Constants.STARTING_NODE, GraphTest.TABLE);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph181
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1157
        final Graph graph = new Graph("no starting node", false); //$NON-NLS-1$
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph.firstPhaseFinished();
        graph.addRelation(GraphTest.CREATE, Constants.ENDING_NODE);
FileProjectLine
name/angoca/zemucan/core/graph/model/Graph.javaZemucan - Core - graph115
name/angoca/zemucan/core/graph/model/Graph.javaZemucan - Core - graph148
    private static void changeDescendancyNodeRelations(
            final AbstractGraphNode/* ! */n1, final AbstractGraphNode/* ! */n2,
            final AbstractGraphNode /* ! */node) throws AbstractGraphException {
        assert n1 != null;
        assert n2 != null;
        assert node != null;
        assert n1 != n2;
        assert n2 != node;

        // First adds the parent relation.
        node.addParent(n1);
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML247
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML909
    public void testBuildNoStartingNode() throws AbstractZemucanException {
        String xml = ""; //$NON-NLS-1$
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_OPEN;
        xml += ImplementationXMLGrammarReaderTest.DELIMITERS_DELIMITERS;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // create Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_CREATE_ID;
FileProjectLine
name/angoca/zemucan/grammarReader/api/ImplementationInMemoryGrammarReader.javaZemucan - Core - grammar reader API130
name/angoca/zemucan/grammarReader/api/ImplementationInMemoryGrammarReader.javaZemucan - Core - grammar reader API150
        graphToFill.addNode(create, create, true);
        graphToFill.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graphToFill.firstPhaseFinished();
        graphToFill.addRelation(Constants.STARTING_NODE, create);
        graphToFill.addRelation(create, Constants.ENDING_NODE);
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers389
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers767
        final List<Token> phraseIn = new ArrayList<Token>();
        phraseIn.add(new Token(tokenIn1, true));
        phraseIn.add(new Token(tokenIn2, true));
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers835
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers1010
    public void testCase3() throws AbstractZemucanException {
        final String cmdIn = "db2 c"; //$NON-NLS-1$

        final ReturnOptions ret = ImplementationLexicalAnalyzer.getInstance()
                .analyzePhrase(cmdIn);

        final String actual = ret.getPhrase();

        final String expected = "db2 c";
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers335
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers1128
    public void testCase8() throws AbstractZemucanException {
        final String cmdIn = "db2 create table "; //$NON-NLS-1$

        final ReturnOptions ret = ImplementationLexicalAnalyzer.getInstance()
                .analyzePhrase(cmdIn);

        final String actual = ret.getPhrase();

        final String expected = "db2 create table ";
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers310
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers1058
    public void testCase5() throws AbstractZemucanException {
        final String cmdIn = "db2 create table"; //$NON-NLS-1$

        final ReturnOptions ret = ImplementationLexicalAnalyzer.getInstance()
                .analyzePhrase(cmdIn);

        final String actual = ret.getPhrase();

        final String expected = "db2 create table";
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers138
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers1105
    public void testCase7() throws AbstractZemucanException {
        final String cmdIn = "db2 create"; //$NON-NLS-1$

        final ReturnOptions ret = ImplementationLexicalAnalyzer.getInstance()
                .analyzePhrase(cmdIn);

        final String actual = ret.getPhrase();

        final String expected = "db2 create table";
FileProjectLine
name/angoca/zemucan/interfaze/model/ReturnOptionsTest.javaZemucan - Core - ui API382
name/angoca/zemucan/interfaze/model/ReturnOptionsTest.javaZemucan - Core - ui API449
            new ReturnOptions(phrase, new String[] { null },
                    new String[] { options });
        } catch (final Exception exception) {
            e = exception;
        }
        Assert.assertTrue("ParameterNullException",
                e instanceof ParameterNullException);
    }

    /**
     * Tests the symmetry of equals.
     *
     * @throws ParameterNullException
     *             Never.
     */
    @Test
    public void testSymmetric() throws ParameterNullException {
FileProjectLine
name/angoca/zemucan/main/Main.javaZemucan - main129
name/angoca/zemucan/main/Main.javaZemucan - main341
                controller.start(thread, synchronizedLoad);
            } catch (final AbstractZemucanException exception) {
                Main.LOGGER.error(exception.getMessage());
                Main.LOGGER.info(exception.getStackTrace().toString());
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1598
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1680
        String expectedGraphName = "merged:{" + graphName1 + ',' + graphName2
                + "}:";
        String expected = expectedGraphName + '[' + GraphState.Validated
                + "-WithoutExtraNodes{{" + Constants.STARTING_NODE + '<'
                + expectedGraphName + graphName1 + ':' + a + '-'
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph757
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph779
    public void testRemoveNullParent() throws AbstractZemucanException {
        final String name = GraphNodeTest.GRAPHNODE;
        final GraphNode graphNode = new GraphNode(name,
                new Graph("test", false));

        Exception e = null;
        try {
            graphNode.removeParent(null);
FileProjectLine
name/angoca/zemucan/core/graph/model/EndingNodeTest.javaZemucan - Core - graph113
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph248
        final GraphNode node1 = new GraphNode(node, new Graph("test", false));
        final int val1 = node1.hashCode();
        final int val2 = node1.hashCode();

        final boolean val = val1 == val2;

        Assert.assertTrue("Two consecutive calls return the same value", val); //$NON-NLS-1$
    }

    /**
     * Tests that the graph node has to receive a not null parameter.
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @Test(expected = AssertionError.class)
FileProjectLine
name/angoca/zemucan/core/graph/model/AboutNodeTest.javaZemucan - Core - graph259
name/angoca/zemucan/core/graph/model/AboutNodeTest.javaZemucan - Core - graph276
    public void testSameHashCode() throws AbstractZemucanException {
        final AboutNode actual = new AboutNode(new Graph("test", false));
        final AboutNode expected = new AboutNode(new Graph("test", false));

        Assert.assertEquals("Two AboutNode generate the same hashcode.", //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML491
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1284
                + ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_CREATE_ID_TOKEN;
FileProjectLine
name/angoca/zemucan/grammarReader/api/GrammarReaderControllerTest.javaZemucan - Core - grammar reader API217
name/angoca/zemucan/grammarReader/api/GrammarReaderControllerTest.javaZemucan - Core - grammar reader API286
                "sa_conf-test-grammar1.xml ; sa_conf-test-grammar2.xml"); //$NON-NLS-1$

        try {
            GrammarReaderController.getInstance().getStartingNode();
        } catch (final Exception exception) {
            Assert.assertTrue("GeneralGrammarReaderProblemException",
                    exception instanceof GeneralGrammarReaderProblemException);
        }
    }

    /**
     * Test an invalid value for the grammar reader.
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @Test
    public final void testInexistantGrammar() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers631
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers653
        final String cmdOut = ""; //$NON-NLS-1$

        final ReturnOptions ret = ImplementationLexicalAnalyzer.getInstance()
                .analyzePhrase(cmdIn);
        final String actual = ret.getPhrase();

        final String expected = cmdOut;

        Assert.assertEquals("Return Empty phrase", expected, actual); //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzer.javaZemucan - Core - analyzers264
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzer.javaZemucan - Core - analyzers322
			final boolean endsWithSpace, final GraphAnswer answer,
			final int sizeOptions, String[] setOfOptions, String[] setOfPhrases)
			throws GeneralException, ParameterNullException {
		if (sizeOptions > 1) {
			// There are multiple options and 0 phrases, then show all options
			// and add a space at the end.
			ImplementationLexicalAnalyzer.LOGGER.debug("Case 7");
FileProjectLine
name/angoca/zemucan/interfaze/model/ReturnOptionsTest.javaZemucan - Core - ui API382
name/angoca/zemucan/interfaze/model/ReturnOptionsTest.javaZemucan - Core - ui API404
            new ReturnOptions(phrase, null, new String[] { options });
        } catch (final Exception exception) {
            e = exception;
        }
        Assert.assertTrue("ParameterNullException",
                e instanceof ParameterNullException);
    }

    /**
     * Tests the null exception when one element in the options is null.
     *
     * @throws ParameterNullException
     *             Never.
     */
    @Test
    public void testReturnOptionsOneNullInOptions()
FileProjectLine
name/angoca/zemucan/interfaze/model/ReturnOptionsTest.javaZemucan - Core - ui API355
name/angoca/zemucan/interfaze/model/ReturnOptionsTest.javaZemucan - Core - ui API419
    public void testReturnOptionsOneNullInOptions()
            throws ParameterNullException {
        final String phrase = "create table"; //$NON-NLS-1$
        final String phrases = ReturnOptionsTest.TABLESPACE;

        Exception e = null;
        try {
            new ReturnOptions(phrase, new String[] { phrases },
FileProjectLine
name/angoca/zemucan/core/graph/model/StartingNodeTest.javaZemucan - Core - graph235
name/angoca/zemucan/core/graph/model/StartingNodeTest.javaZemucan - Core - graph254
    public void testSameHashCode() throws AbstractZemucanException {
        final Graph graph = new Graph("test", false);

        final StartingNode actual = new StartingNode(graph);
        final StartingNode expected = new StartingNode(graph);

        Assert.assertEquals("hashcode for two identical objects", //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/core/graph/model/LicenseNodeTest.javaZemucan - Core - graph255
name/angoca/zemucan/core/graph/model/LicenseNodeTest.javaZemucan - Core - graph274
    public void testSameHashCode() throws AbstractZemucanException {
        final Graph graph = new Graph("test", false);

        final LicenseNode actual = new LicenseNode(graph);
        final LicenseNode expected = new LicenseNode(graph);

        Assert.assertEquals("Two LicenseNode generate the same hashcode.", //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph954
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1443
        graph1.addNode(GraphTest.CREATE1, GraphTest.CREATE, true);
        graph1.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph1.firstPhaseFinished();
        graph1.addRelation(Constants.STARTING_NODE, GraphTest.CREATE1);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph932
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1451
        graph2.addNode(GraphTest.CREATE2, GraphTest.CREATE, true);
        graph2.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph2.firstPhaseFinished();
        graph2.addRelation(Constants.STARTING_NODE, GraphTest.CREATE2);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph207
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph273
        final Graph graph = new Graph("inexistant child", false); //$NON-NLS-1$
        graph.addNode(GraphTest.ID1, GraphTest.ID1, true);
        graph.firstPhaseFinished();

        Exception e = null;
        try {
            graph.addRelation(GraphTest.ID1, GraphTest.ID2);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph197
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph221
    public void testAddTwiceSameParent() throws AbstractZemucanException {
        final Graph graph = new Graph("test", false);

        final String name = GraphNodeTest.NODE;
        final GraphNode node = new GraphNode(name, graph);

        final String parentName = GraphNodeTest.PARENT;
FileProjectLine
name/angoca/zemucan/core/graph/model/EndingNodeTest.javaZemucan - Core - graph248
name/angoca/zemucan/core/graph/model/EndingNodeTest.javaZemucan - Core - graph267
    public void testSameHashCode() throws AbstractZemucanException {
        final Graph graph = new Graph("test", false);

        final EndingNode actual = new EndingNode(graph);
        final EndingNode expected = new EndingNode(graph);

        Assert.assertEquals(
FileProjectLine
name/angoca/zemucan/core/graph/model/Graph.javaZemucan - Core - graph751
name/angoca/zemucan/core/graph/model/Graph.javaZemucan - Core - graph794
    public final StartingNode getStartingNode()
            throws InvalidGraphStateException {
        if (!this.graphState.equals(GraphState.Validated)) {
            throw new InvalidGraphStateException(this.graphState,
                    GraphState.Validated);
        }
        return this.startingNode;
FileProjectLine
name/angoca/zemucan/core/syntactic/model/GraphAnswerTest.javaZemucan - Core - analyzers210
name/angoca/zemucan/core/syntactic/model/GraphAnswerTest.javaZemucan - Core - analyzers242
        options1.add(new Token(option2, true));
        final GraphAnswer expected = new GraphAnswer(phrases1, options1);

        final List<Token> phrases2 = new ArrayList<Token>();
        phrases2.add(new Token(phrase1, true));
FileProjectLine
name/angoca/zemucan/core/lexical/model/TokenTest.javaZemucan - Core - analyzers134
name/angoca/zemucan/core/lexical/model/TokenTest.javaZemucan - Core - analyzers215
    public void testHashCodeIdenticalObject() throws InvalidTokenException {
        final String token = TokenTest.CREATE;

        final Token expected = new Token(token, true);
        final Token actual = new Token(token, true);

        Assert.assertEquals("Two identical objects with the same hashcode", //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers610
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers827
        final ReturnOptions actual = ImplementationLexicalAnalyzer
                .getInstance().analyzePhrase(cmdIn);

        final ReturnOptions expected = new ReturnOptions(cmdOut,
                new String[] {}, new String[] { option1 });
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers349
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers488
        final ReturnOptions actual = ImplementationLexicalAnalyzer
                .getInstance().analyzePhrase(cmdIn);

        final ReturnOptions expected = new ReturnOptions(cmdOut,
                new String[] {}, new String[] { opt1 });
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers191
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers827
        final ReturnOptions actual = ImplementationLexicalAnalyzer
                .getInstance().analyzePhrase(cmdIn);

        final ReturnOptions expected = new ReturnOptions(cmdOut,
                new String[] {}, new String[] { option1 });
FileProjectLine
name/angoca/zemucan/IntegrationTest.javaZemucan - main135
name/angoca/zemucan/IntegrationTest.javaZemucan - main198
        final OutputWriter writer = new SystemOutputWriter();

        final ExecutionState actual = ImplementationExecuter.getInstance()
                .execute(command, writer);

        final ExecutionState expected = ExecutionState.APPLICATION_EXIT;

        Assert.assertEquals("Execution of 'quit'", expected, actual); //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1315
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1393
        final Graph graph = new Graph("referencing starting node", true); //$NON-NLS-1$
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1217
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1271
        final Graph graph2 = new Graph(GraphTest.DUMMY_GRAPH, true);
        graph2.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph2.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph2.addNode(GraphTest.OTHER, GraphTest.OTHER, true);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph991
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1024
        final Graph graph = new Graph("Duplicated node name", true); //$NON-NLS-1$
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(GraphTest.TABLE, GraphTest.TABLE, true);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph929
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1217
        final Graph graph2 = new Graph(GraphTest.TEST, false);
        graph2.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph2.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph2.addNode(GraphTest.TABLE, GraphTest.TABLE, true);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph878
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1455
        graph2.addRelation(GraphTest.CREATE2, Constants.ENDING_NODE);
        graph2.secondPhaseFinished();

        graph1.merge(graph2);

        graph2.simplifyGraph();

        final String actual = graph2.toString();

        String expectedGraphName = "merged:{" + GraphTest.GRAPH2 + ','
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph342
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1874
        final Graph graph = new Graph(GraphTest.VALIDATED_GRAPH, false);
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph275
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph321
        graph.addNode(GraphTest.ID2, GraphTest.ID2, true);

        Exception e = null;
        try {
            graph.addRelation(GraphTest.ID1, GraphTest.ID2);
        } catch (final Exception exception) {
            e = exception;
        }
        Assert.assertTrue("InvalidGraphStateException",
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph180
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1956
        final Graph graph = new Graph("add relation validated", false); //$NON-NLS-1$
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(GraphTest.TABLE, GraphTest.TABLE, true);
FileProjectLine
name/angoca/zemucan/core/graph/model/Graph.javaZemucan - Core - graph605
name/angoca/zemucan/core/graph/model/Graph.javaZemucan - Core - graph1089
        Iterator<AbstractGraphNode> it = this.nodes.values().iterator();
        while (it.hasNext()) {
            final AbstractGraphNode node = it.next();
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML466
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML786
        final Graph graph = new Graph("empty grammar", false); //$NON-NLS-1$
        final InputSource contentToParse = new InputSource(
                new StringReader(xml));
        final InputSource contentToValidate = new InputSource(new StringReader(
                xml));
        ImplementationXMLGrammarReaderTest.LOGGER.info("testEmptyGrammar");
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML375
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1093
        final Graph actual = new Graph(id, true);
        final InputSource contentToParse = new InputSource(
                new StringReader(xml));
        final InputSource contentToValidate = new InputSource(new StringReader(
                xml));
        ImplementationXMLGrammarReaderTest.LOGGER
                .info("testBuildWithExtraTokens");
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML344
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML786
        final Graph graph = new Graph("node without parent", false); //$NON-NLS-1$
        final InputSource contentToParse = new InputSource(
                new StringReader(xml));
        final InputSource contentToValidate = new InputSource(new StringReader(
                xml));
        ImplementationXMLGrammarReaderTest.LOGGER
                .info("testBuildNodeNotComeFromStartingNode");
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML335
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML487
    private String testBuildNodeNotComeFromStartingNodeText() {
        String xml = ""; //$NON-NLS-1$
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_OPEN;
        xml += ImplementationXMLGrammarReaderTest.DELIMITERS_DELIMITERS;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML277
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML845
        final Graph graph = new Graph("incomplete structure", false); //$NON-NLS-1$
        final InputSource contentToParse = new InputSource(
                new StringReader(xml));
        final InputSource contentToValidate = new InputSource(new StringReader(
                xml));
        ImplementationXMLGrammarReaderTest.LOGGER
                .info("testBuildInvalidStructure");
FileProjectLine
name/angoca/zemucan/executer/impl/ImplementationExecuterTest.javaZemucan - executer impl309
name/angoca/zemucan/executer/impl/ImplementationExecuterTest.javaZemucan - executer impl334
        System.clearProperty(ImplementationExecuter.DB2_PARAMS);

        final String command = "db2 !dir"; //$NON-NLS-1$
        final String[] actuals = ImplementationExecuter.getInstance()
                .getCommandsToExecute(command);

        final String[] expecteds = new String[] { "db2", "!dir" }; //$NON-NLS-1$//$NON-NLS-2$
FileProjectLine
name/angoca/zemucan/executer/impl/ImplementationExecuterTest.javaZemucan - executer impl109
name/angoca/zemucan/executer/impl/ImplementationExecuterTest.javaZemucan - executer impl163
    public void testExecutionInLinuxNoDB2() throws ParameterNullException {
        // Deletes the property, loading other configuration file.
        System.setProperty(Constants.ZEMUCAN_CONF_XML_PROPERTY,
                "sa_conf-test-NoDB2Native.xml"); //$NON-NLS-1$

        // Sets an environment property.
        System.clearProperty(ImplementationExecuter.DB2_PARAMS);
        System.setProperty("os.name", "Linux Virtual"); //$NON-NLS-1$ //$NON-NLS-2$

        final String command = "ls"; //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers584
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers680
    public void testGetOptions5() throws AbstractZemucanException {
        final String tokenIn1 = ImplementationSyntacticAnalyzerTest.CREATE;
        final String tokenIn2 = ImplementationSyntacticAnalyzerTest.TABLE;
        final String tokenIn3 = ImplementationSyntacticAnalyzerTest.T1;
        final String tokenIn4 = ImplementationSyntacticAnalyzerTest.OPEN_PARENTHESIS;
        final String tokenIn5 = ImplementationSyntacticAnalyzerTest.C1;
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers166
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers534
        final ReturnOptions actual = ImplementationLexicalAnalyzer
                .getInstance().analyzePhrase(cmdIn);

        final ReturnOptions expected = new ReturnOptions(cmdOut,
                new String[] {}, new String[] { opt1, opt2 });
FileProjectLine
name/angoca/zemucan/core/graph/model/StartingNodeTest.javaZemucan - Core - graph122
name/angoca/zemucan/core/graph/model/StartingNodeTest.javaZemucan - Core - graph216
    public void testOtherTypeEqualsObject() throws AbstractZemucanException {
        final Graph graph = new Graph("test", false);

        final StartingNode actual = new StartingNode(graph);
        final EndingNode notExpected = new EndingNode(graph);
FileProjectLine
name/angoca/zemucan/core/graph/model/LicenseNodeTest.javaZemucan - Core - graph117
name/angoca/zemucan/core/graph/model/LicenseNodeTest.javaZemucan - Core - graph236
    public void testOtherTypeEqualsObject() throws AbstractZemucanException {
        final Graph graph = new Graph("test", false);

        final LicenseNode actual = new LicenseNode(graph);
        final StartingNode notExpected = new StartingNode(graph);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph753
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph774
    public void testInvalidStartingNode2() throws AbstractZemucanException {
        final Graph graph = new Graph(GraphTest.NAME, true);

        Exception e = null;
        try {
            graph.addNode(Constants.STARTING_NODE, Constants.ENDING_NODE, true);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph713
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph733
    public void testInvalidEndingNode21() throws AbstractZemucanException {
        final Graph graph = new Graph(GraphTest.NAME, true);

        Exception e = null;
        try {
            graph.addNode(Constants.ENDING_NODE, Constants.STARTING_NODE, true);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph698
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph724
    public void testRemoveChild() throws AbstractZemucanException {
        final Graph graph = new Graph("test", false);

        final String name = GraphNodeTest.GRAPHNODE;
        final GraphNode graphNode = new GraphNode(name, graph);
FileProjectLine
name/angoca/zemucan/core/graph/model/EndingNodeTest.javaZemucan - Core - graph129
name/angoca/zemucan/core/graph/model/EndingNodeTest.javaZemucan - Core - graph229
    public void testOtherTypeEqualsObject() throws AbstractZemucanException {
        final Graph graph = new Graph("test", false);

        final EndingNode actual = new EndingNode(graph);
        final StartingNode notExpected = new StartingNode(graph);
FileProjectLine
name/angoca/zemucan/core/graph/model/AboutNodeTest.javaZemucan - Core - graph141
name/angoca/zemucan/core/graph/model/AboutNodeTest.javaZemucan - Core - graph240
    public void testOtherTypeEqualsObject() throws AbstractZemucanException {
        final Graph graph = new Graph("test", false);

        final AboutNode actual = new AboutNode(graph);
        final StartingNode notExpected = new StartingNode(graph);
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1013
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1242
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML909
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1127
    private String testBuildWithExtraTokensText() {
        String xml = ""; //$NON-NLS-1$
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_OPEN;
        xml += ImplementationXMLGrammarReaderTest.DELIMITERS_DELIMITERS;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML506
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML515
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_ENDING_NODE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // Ending Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_ENDING_NODE_ID;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML500
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML657
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // create Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_CREATE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_CREATE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML426
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML919
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_ENDING_NODE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // Ending Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_ENDING_NODE_ID;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML335
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML410
    private String testBuildInvertedText() {
        String xml = ""; //$NON-NLS-1$
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_OPEN;
        xml += ImplementationXMLGrammarReaderTest.DELIMITERS_DELIMITERS;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Ending Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_ENDING_NODE_ID;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML263
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML417
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_ENDING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_ENDING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // table Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_TABLE_ID;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML257
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML426
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
        xml += ImplementationXMLGrammarReaderTest.ID_TOKEN_ENDING_NODE_ID_TOKEN;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN_2;
        xml += ImplementationXMLGrammarReaderTest.TOKEN_2;
        // create Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_CREATE_ID;
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers650
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers716
    public void testGetOptions5() throws AbstractZemucanException {
        final String tokenIn1 = ImplementationSyntacticAnalyzerTest.CREATE;
        final String tokenIn2 = ImplementationSyntacticAnalyzerTest.TABLE;
        final String tokenIn3 = ImplementationSyntacticAnalyzerTest.T1;
        final String tokenIn4 = ImplementationSyntacticAnalyzerTest.OPEN_PARENTHESIS;
        final String tokenIn5 = ImplementationSyntacticAnalyzerTest.C1;
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers334
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers630
        phraseIn.add(new Token(tokenIn2, true));
        final boolean endsWithSpace = false;
        final GraphAnswer graph = ImplementationSyntacticAnalyzer.getInstance()
                .analyzeTokens(phraseIn, endsWithSpace);
        final List<Token> actual = graph.getOptions();
FileProjectLine
name/angoca/zemucan/ui/impl/jline/ImplementationJlineInterfaceController.javaZemucan - ui impl jLine155
name/angoca/zemucan/ui/impl/system/ImplementationSystemInterfaceController.javaZemucan - ui impl System131
        if (synchro != null) {
            synchronized (synchro) {
                synchronizedLoad.alreadyLoaded();
                synchro.notifyAll();
            }
        }

        while (execState != ExecutionState.APPLICATION_EXIT) {
FileProjectLine
name/angoca/zemucan/main/MainTest.javaZemucan - main91
name/angoca/zemucan/main/MainTest.javaZemucan - main103
        final String[] args = new String[] { "Other" }; //$NON-NLS-1$
        final int actual = Main.getInterfaceControllerType(args);
        final int expected = Main.ID_JLINE;
        Assert.assertEquals("Interface controller type", expected, //$NON-NLS-1$
                actual);
    }

    /**
     * Tests that the controller is System.
     */
    @Test
    public void testGetControllerSystem() {
FileProjectLine
name/angoca/zemucan/main/Main.javaZemucan - main203
name/angoca/zemucan/main/Main.javaZemucan - main304
    Main(final String[]/* [!]! */args) throws AbstractZemucanException {
        assert args != null;
        boolean assertsEnabled = false;
        // Intentional side-effect!
        assert assertsEnabled = true;
        if (assertsEnabled) {
            for (final String string : args) {
                assert string != null;
            }
        }
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1124
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1929
        final Graph graph = new Graph(GraphTest.VALIDATED_GRAPH, false);
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(GraphTest.TABLE, GraphTest.TABLE, true);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph929
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1271
        final Graph graph2 = new Graph(GraphTest.DUMMY_GRAPH, true);
        graph2.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph2.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph2.addNode(GraphTest.OTHER, GraphTest.OTHER, true);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph556
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1900
        final Graph graph = new Graph("validated extra nodes", true); //$NON-NLS-1$
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(GraphTest.TABLE, GraphTest.TABLE, true);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph556
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1055
        final Graph graph = new Graph("no ending node", false); //$NON-NLS-1$
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.firstPhaseFinished();
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph342
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph991
        final Graph graph = new Graph(graphName, true); //$NON-NLS-1$
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph342
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1055
        final Graph graph = new Graph("no ending node", false); //$NON-NLS-1$
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.firstPhaseFinished();
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph180
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph420
        final Graph graph = new Graph(GraphTest.DUMMY_GRAPH, true);
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.addNode(GraphTest.TABLE, GraphTest.TABLE, true);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph180
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1055
        final Graph graph = new Graph("no ending node", false); //$NON-NLS-1$
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.firstPhaseFinished();
FileProjectLine
name/angoca/zemucan/core/graph/model/EndingNode.javaZemucan - Core - graph108
name/angoca/zemucan/core/graph/model/StartingNode.javaZemucan - Core - graph109
            final StartingNode token = (StartingNode) object;
            final List<AbstractGraphNode> ways = token.getChildren();
            if ((ways.size() == this.getChildren().size())) {
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1476
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1544
    public final void testGrammarFilesInOneDirectory()
            throws AbstractZemucanException {
        Configurator.getInstance().setProperty(
                Constants.GRAMMAR_READER_NAME_PROPERTY,
                ImplementationXMLGrammarReaderTest.XML_GRAMMAR_READER);
        Configurator.getInstance().setProperty(
                Constants.GRAMMAR_FILE_DESCRIPTORS_PROPERTY,
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML882
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1093
        final Graph actual = new Graph(id, true);
        final InputSource contentToParse = new InputSource(
                new StringReader(xml));
        final InputSource contentToValidate = new InputSource(new StringReader(
                xml));
        ImplementationXMLGrammarReaderTest.LOGGER
                .info("testBuildWithExtraTokens");
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML872
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1340
    public void testBuildNotAllChildren() throws AbstractZemucanException {
        String xml = ""; //$NON-NLS-1$
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_OPEN;
        xml += ImplementationXMLGrammarReaderTest.DELIMITERS_DELIMITERS;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML845
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1093
        final Graph actual = new Graph(id, true);
        final InputSource contentToParse = new InputSource(
                new StringReader(xml));
        final InputSource contentToValidate = new InputSource(new StringReader(
                xml));
        ImplementationXMLGrammarReaderTest.LOGGER
                .info("testBuildWithExtraTokens");
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML813
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML872
    public void testBuildNoNodes() throws AbstractZemucanException {
        String xml = ""; //$NON-NLS-1$
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_OPEN;
        xml += ImplementationXMLGrammarReaderTest.DELIMITERS_DELIMITERS;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        xml += ImplementationXMLGrammarReaderTest.TOKENS_2;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML786
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1431
        final Graph actual = new Graph(id, true);
        final InputSource contentToParse = new InputSource(
                new StringReader(xml));
        final InputSource contentToValidate = new InputSource(new StringReader(
                xml));
        ImplementationXMLGrammarReaderTest.LOGGER
                .info("testBuildWithExtraTokens");
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML755
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML872
    public void testBuildNoNodes() throws AbstractZemucanException {
        String xml = ""; //$NON-NLS-1$
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_OPEN;
        xml += ImplementationXMLGrammarReaderTest.DELIMITERS_DELIMITERS;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        xml += ImplementationXMLGrammarReaderTest.TOKENS_2;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML728
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1093
        final Graph actual = new Graph(id, true);
        final InputSource contentToParse = new InputSource(
                new StringReader(xml));
        final InputSource contentToValidate = new InputSource(new StringReader(
                xml));
        ImplementationXMLGrammarReaderTest.LOGGER
                .info("testBuildWithExtraTokens");
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML696
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML872
    public void testBuildNoNodes() throws AbstractZemucanException {
        String xml = ""; //$NON-NLS-1$
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_OPEN;
        xml += ImplementationXMLGrammarReaderTest.DELIMITERS_DELIMITERS;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        xml += ImplementationXMLGrammarReaderTest.TOKENS_2;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML669
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1431
        final Graph actual = new Graph(id, true);
        final InputSource contentToParse = new InputSource(
                new StringReader(xml));
        final InputSource contentToValidate = new InputSource(new StringReader(
                xml));
        ImplementationXMLGrammarReaderTest.LOGGER
                .info("testBuildWithExtraTokens");
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML644
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML872
    public void testBuildNoNodes() throws AbstractZemucanException {
        String xml = ""; //$NON-NLS-1$
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_OPEN;
        xml += ImplementationXMLGrammarReaderTest.DELIMITERS_DELIMITERS;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        xml += ImplementationXMLGrammarReaderTest.TOKENS_2;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML344
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML375
        final Graph actual = new Graph("grammar inversed", true); //$NON-NLS-1$
        final InputSource contentToParse = new InputSource(
                new StringReader(xml));
        final InputSource contentToValidate = new InputSource(new StringReader(
                xml));
        ImplementationXMLGrammarReaderTest.LOGGER.info("testBuildInverted");
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML335
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML872
    public void testBuildNoNodes() throws AbstractZemucanException {
        String xml = ""; //$NON-NLS-1$
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_OPEN;
        xml += ImplementationXMLGrammarReaderTest.DELIMITERS_DELIMITERS;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        xml += ImplementationXMLGrammarReaderTest.TOKENS_2;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML277
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML375
        final Graph actual = new Graph("grammar inversed", true); //$NON-NLS-1$
        final InputSource contentToParse = new InputSource(
                new StringReader(xml));
        final InputSource contentToValidate = new InputSource(new StringReader(
                xml));
        ImplementationXMLGrammarReaderTest.LOGGER.info("testBuildInverted");
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML247
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML872
    public void testBuildNoNodes() throws AbstractZemucanException {
        String xml = ""; //$NON-NLS-1$
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_OPEN;
        xml += ImplementationXMLGrammarReaderTest.DELIMITERS_DELIMITERS;
        xml += ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        xml += ImplementationXMLGrammarReaderTest.TOKENS_2;
FileProjectLine
name/angoca/zemucan/grammarReader/api/GrammarReaderControllerTest.javaZemucan - Core - grammar reader API360
name/angoca/zemucan/grammarReader/api/GrammarReaderControllerTest.javaZemucan - Core - grammar reader API400
    public final void testUnrecognizedGrammar() throws AbstractZemucanException {
        Configurator.getInstance().setProperty(
                Constants.GRAMMAR_READER_NAME_PROPERTY,
                GrammarReaderControllerTest.IN_MEMORY_GRAMMAR_READER);
        Configurator.getInstance()
                .setProperty(Constants.GRAMMAR_FILE_DESCRIPTORS_PROPERTY,
FileProjectLine
name/angoca/zemucan/grammarReader/api/GrammarReaderControllerTest.javaZemucan - Core - grammar reader API305
name/angoca/zemucan/grammarReader/api/GrammarReaderControllerTest.javaZemucan - Core - grammar reader API324
                "sa_conf-test-InvalidGrammarReaderDefined.xml"); //$NON-NLS-1$

        try {
            GrammarReaderController.getInstance();
        } catch (final Exception exception) {
            Assert.assertTrue("GeneralGrammarReaderProblemException",
                    exception instanceof GeneralGrammarReaderProblemException);
        }
    }

    /**
     * Tests that the grammar reader name cannot be null.
     *
     * @throws AbstractZemucanException
     *             Never
     */
    @Test
    public final void testNullValue() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/grammarReader/api/GrammarReaderControllerTest.javaZemucan - Core - grammar reader API148
name/angoca/zemucan/grammarReader/api/GrammarReaderControllerTest.javaZemucan - Core - grammar reader API211
    public final void testSameGrammarFileTwice() throws AbstractZemucanException {
        Configurator.getInstance().setProperty(
                Constants.GRAMMAR_READER_NAME_PROPERTY,
                GrammarReaderControllerTest.IN_MEMORY_GRAMMAR_READER);
        Configurator.getInstance().setProperty(
                Constants.GRAMMAR_FILE_DESCRIPTORS_PROPERTY,
FileProjectLine
name/angoca/zemucan/grammarReader/api/GrammarReaderControllerTest.javaZemucan - Core - grammar reader API91
name/angoca/zemucan/grammarReader/api/GrammarReaderControllerTest.javaZemucan - Core - grammar reader API324
                Constants.GRAMMAR_READER_NAME_PROPERTY, "Inexistant"); //$NON-NLS-1$

        try {
            GrammarReaderController.getInstance();
        } catch (final Exception exception) {
            Assert.assertTrue("GeneralGrammarReaderProblemException",
                    exception instanceof GeneralGrammarReaderProblemException);
        }
    }

    /**
     * Tests that the grammar reader name cannot be empty.
     *
     * @throws AbstractZemucanException
     *             Never
     */
    @Test
    public final void testInvalidValue() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/executer/impl/ImplementationExecuterTest.javaZemucan - executer impl196
name/angoca/zemucan/executer/impl/ImplementationExecuterTest.javaZemucan - executer impl309
        System.setProperty(ImplementationExecuter.DB2_PARAMS, "-v"); //$NON-NLS-1$

        final String command = "db2 !dir"; //$NON-NLS-1$
        final String[] actuals = ImplementationExecuter.getInstance()
                .getCommandsToExecute(command);

        final String[] expecteds = new String[] { "db2", "-v", "!dir" }; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers308
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers829
        final List<Token> phraseIn = new ArrayList<Token>();
        phraseIn.add(new Token(tokenIn1, true));
        final boolean endsWithSpace = false;
        final GraphAnswer actual = ImplementationSyntacticAnalyzer
FileProjectLine
name/angoca/zemucan/core/syntactic/model/GraphAnswer.javaZemucan - Core - analyzers155
name/angoca/zemucan/core/syntactic/model/GraphAnswer.javaZemucan - Core - analyzers182
        for (final Token node : this.phrases) {
            try {
                copy.add(node.clone());
            } catch (final CloneNotSupportedException e) {
                throw new GeneralException(e);
            }
        }

        return copy;
    }
FileProjectLine
name/angoca/zemucan/ui/impl/jline/JlineInputReaderTest.javaZemucan - ui impl jLine597
name/angoca/zemucan/ui/impl/jline/JlineInputReaderTest.javaZemucan - ui impl jLine612
        final Buffer b = new Buffer(command);
        b.op(ConsoleOperations.COMPLETE);

        AssertionHelper.assertBuffer(command, "db2 create", b);
    }

    /**
     * Tests the command ' db2 crea'
     *
     * @throws IOException
     *             Never
     */
    @Test
    public void test8a() throws IOException {
FileProjectLine
name/angoca/zemucan/ui/impl/jline/JlineInputReaderTest.javaZemucan - ui impl jLine326
name/angoca/zemucan/ui/impl/jline/JlineInputReaderTest.javaZemucan - ui impl jLine507
        final Buffer b = new Buffer(command);
        b.op(ConsoleOperations.COMPLETE);

        AssertionHelper.assertBuffer(command, "db2", b);
    }

    /**
     * Tests the command 'db2 '
     *
     * @throws IOException
     *             Never
     */
    @Test
    public void test5() throws IOException {
FileProjectLine
name/angoca/zemucan/ui/impl/jline/JlineInputReaderTest.javaZemucan - ui impl jLine296
name/angoca/zemucan/ui/impl/jline/JlineInputReaderTest.javaZemucan - ui impl jLine311
        final Buffer b = new Buffer(command);
        b.op(ConsoleOperations.COMPLETE);

        AssertionHelper.assertBuffer(command, "db2 create table t1 (", b);
    }

    /**
     * Tests the command 'd'
     *
     * @throws IOException
     *             Never
     */
    @Test
    public void test2() throws IOException {
FileProjectLine
name/angoca/zemucan/ui/impl/jline/JlineInputReaderTest.javaZemucan - ui impl jLine251
name/angoca/zemucan/ui/impl/jline/JlineInputReaderTest.javaZemucan - ui impl jLine266
        final Buffer b = new Buffer(command);
        b.op(ConsoleOperations.COMPLETE);

        AssertionHelper.assertBuffer(command, "db2 create table", b);
    }

    /**
     * Tests the command 'db2 create table '
     *
     * @throws IOException
     *             Never
     */
    @Test
    public void test17() throws IOException {
FileProjectLine
name/angoca/zemucan/ui/impl/jline/JlineInputReaderTest.javaZemucan - ui impl jLine221
name/angoca/zemucan/ui/impl/jline/JlineInputReaderTest.javaZemucan - ui impl jLine236
        final Buffer b = new Buffer(command);
        b.op(ConsoleOperations.COMPLETE);

        AssertionHelper.assertBuffer(command, "db2 create tablespace", b);
    }

    /**
     * Tests the command 'db2 create ta'
     *
     * @throws IOException
     *             Never
     */
    @Test
    public void test15() throws IOException {
FileProjectLine
name/angoca/zemucan/ui/impl/jline/JlineInputReaderTest.javaZemucan - ui impl jLine160
name/angoca/zemucan/ui/impl/jline/JlineInputReaderTest.javaZemucan - ui impl jLine266
        final Buffer b = new Buffer(command);
        b.op(ConsoleOperations.COMPLETE);

        AssertionHelper.assertBuffer(command, "db2 create table", b);
    }

    /**
     * Tests the command 'db2 create table'
     *
     * @throws IOException
     *             Never
     */
    @Test
    public void test16() throws IOException {
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1274
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1451
        graph2.addNode(GraphTest.CREATE2, GraphTest.CREATE, true);
        graph2.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph2.firstPhaseFinished();
        graph2.addRelation(Constants.STARTING_NODE, GraphTest.CREATE2);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1059
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1195
        graph.addRelation(GraphTest.OTHER, GraphTest.CREATE);

        Exception e = null;
        try {
            graph.secondPhaseFinished();
        } catch (final Exception exception) {
            e = exception;
        }
        Assert.assertTrue("NodeNotComesFromStartingNodeException",
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1035
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1161
        graph.addRelation(GraphTest.CREATE, Constants.ENDING_NODE);

        Exception e = null;
        try {
            graph.secondPhaseFinished();
        } catch (final Exception exception) {
            e = exception;
        }
        Assert.assertTrue("StartingNodeNotDefinedException",
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph874
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1515
        graph2.addNode(create2Id, create, true);
        graph2.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph2.firstPhaseFinished();
        graph2.addRelation(Constants.STARTING_NODE, a);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph866
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1504
        graph1.addNode(create1Id, create, true);
        graph1.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph1.firstPhaseFinished();
        graph1.addRelation(Constants.STARTING_NODE, a);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph810
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1515
        graph2.addNode(create2Id, create, true);
        graph2.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph2.firstPhaseFinished();
        graph2.addRelation(Constants.STARTING_NODE, a);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph802
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1504
        graph1.addNode(create1Id, create, true);
        graph1.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph1.firstPhaseFinished();
        graph1.addRelation(Constants.STARTING_NODE, a);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph489
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1161
        graph.addRelation("tablespace", Constants.ENDING_NODE);

        Exception e = null;
        try {
            graph.secondPhaseFinished();
        } catch (final Exception exception) {
            e = exception;
        }
        Assert.assertTrue("DuplicatedNodeNameException",
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph229
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph273
        final Graph graph = new Graph("inexistant child", false); //$NON-NLS-1$
        graph.addNode(GraphTest.ID1, GraphTest.ID1, true);
        graph.firstPhaseFinished();

        Exception e = null;
        try {
            graph.addRelation(GraphTest.ID1, GraphTest.ID2);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph1089
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph1117
        actualnode.addParent(actualnode1);

        final String actual = actualnode.toString();
        final String expected = nodeOut;

        Assert.assertEquals("String of a node", expected, actual); //$NON-NLS-1$
    }

    /**
     * Tests the transitivity of the equals.
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @Test
    public void testTransitivity() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/core/graph/model/EndingNode.javaZemucan - Core - graph155
name/angoca/zemucan/core/graph/model/StartingNode.javaZemucan - Core - graph155
            for (final AbstractGraphNode node : super.getChildren()) {
                ret += node.getId() + '-';
            }
            ret = ret.substring(0, ret.length() - 1);
            ret += '>';
FileProjectLine
name/angoca/zemucan/core/graph/model/EndingNode.javaZemucan - Core - graph125
name/angoca/zemucan/core/graph/model/StartingNode.javaZemucan - Core - graph125
        return Constants.STARTING_NODE.hashCode() * -1;
    }

    /*
     * (non-Javadoc)
     *
     * @see
     * name.angoca.zemucan.core.graph.model.AbstractGraphNode#represent(java
     * .lang.String)
     */
    @Override
    public final boolean represent(final String token) {
        boolean ret = false;
        if (token.equals(Constants.STARTING_NODE)) {
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1684
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1739
            new ImplementationXMLGrammarReader(null, contentToParse,
                    contentToValidate);
        } catch (final Exception exception) {
            e = exception;
        }
        Assert.assertTrue("ParameterNullException",
                e instanceof ParameterNullException);
    }

    /**
     * Test the exception thrown when no filename defined.
     *
     * @throws AbstractZemucanException
     *             Never
     */
    @Test
    public void testReadNoFileDefined() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1031
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1731
        final InputSource contentToParse = new InputSource(
                new StringReader(xml));
        final InputSource contentToValidate = new InputSource(new StringReader(
                xml));
        ImplementationXMLGrammarReaderTest.LOGGER.info("testNullGraph");
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1013
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1284
                + ImplementationXMLGrammarReaderTest.GRAMMAR_1_CLOSE;
        xml += ImplementationXMLGrammarReaderTest.TOKENS;
        // Starting Node.
        xml += ImplementationXMLGrammarReaderTest.TOKEN;
        xml += ImplementationXMLGrammarReaderTest.ID_STARTING_NODE_ID;
        xml += ImplementationXMLGrammarReaderTest.NAME_STARTING_NODE_NAME;
        xml += ImplementationXMLGrammarReaderTest.RESERVED;
        xml += ImplementationXMLGrammarReaderTest.CHILDREN;
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML278
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1731
        final InputSource contentToParse = new InputSource(
                new StringReader(xml));
        final InputSource contentToValidate = new InputSource(new StringReader(
                xml));
        ImplementationXMLGrammarReaderTest.LOGGER.info("testNullGraph");
FileProjectLine
name/angoca/zemucan/executer/impl/ImplementationExecuter.javaZemucan - executer impl516
name/angoca/zemucan/executer/impl/ImplementationExecuter.javaZemucan - executer impl570
            commands = new String[] { "cmd.exe", "/c", db2Command }; //$NON-NLS-1$ //$NON-NLS-2$
        }

        assert commands != null;
        if (this.assertsEnabled) {
            for (final String retCommand : commands) {
                assert retCommand != null;
            }
        }
        return commands;
    }
FileProjectLine
name/angoca/zemucan/core/syntactic/model/GraphAnswerTest.javaZemucan - Core - analyzers122
name/angoca/zemucan/core/syntactic/model/GraphAnswerTest.javaZemucan - Core - analyzers152
        phrases2.add(new Token(tokenString1, true));
        final List<Token> options = new ArrayList<Token>();
        options.add(new Token(tokenString4, true));
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers265
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers633
        final ReturnOptions ret = ImplementationLexicalAnalyzer.getInstance()
                .analyzePhrase(cmdIn);
        final String actual = ret.getPhrase();

        final String expected = cmdOut;

        Assert.assertEquals("Empty phrase for an space", expected, //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers148
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers845
        Assert.assertEquals("phrase: '" + cmdIn + "'", expected, actual);
        // catalog, create, attach
        Assert.assertTrue("options: '" + cmdIn + "'",
                ret.getOptions().length == 3);
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzer.javaZemucan - Core - analyzers419
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzer.javaZemucan - Core - analyzers495
		assert tokens != null;
		boolean assertsEnabled = false;
		// Intentional side-effect!
		assert assertsEnabled = true;
		if (assertsEnabled) {
			for (final Token token : tokens) {
				assert token != null;
			}
		}
FileProjectLine
name/angoca/zemucan/main/Main.javaZemucan - main121
name/angoca/zemucan/main/Main.javaZemucan - main130
            } catch (final AbstractZemucanException exception) {
                Main.LOGGER.error(exception.getMessage());
                Main.LOGGER.info(exception.getStackTrace().toString());
FileProjectLine
name/angoca/zemucan/core/graph/model/LicenseNodeTest.javaZemucan - Core - graph263
name/angoca/zemucan/core/graph/model/StartingNodeTest.javaZemucan - Core - graph243
        Assert.assertTrue("equals fot two identical objects 2", //$NON-NLS-1$
                expected.equals(actual));
    }

    /**
     * Test that the hash code is the same.
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @Test
    public void testSameHashCode() throws AbstractZemucanException {
        final Graph graph = new Graph("test", false);

        final StartingNode actual = new StartingNode(graph);
FileProjectLine
name/angoca/zemucan/core/graph/model/LicenseNodeTest.javaZemucan - Core - graph244
name/angoca/zemucan/core/graph/model/StartingNodeTest.javaZemucan - Core - graph224
        Assert.assertFalse("equals for two different objects 2", //$NON-NLS-1$
                notExpected.equals(actual));
    }

    /**
     * Test the equals method to the same object.
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @Test
    public void testSameEqualsObject() throws AbstractZemucanException {
        final Graph graph = new Graph("test", false);

        final StartingNode actual = new StartingNode(graph);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph991
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1055
        final Graph graph = new Graph("no ending node", false); //$NON-NLS-1$
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph.firstPhaseFinished();
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph927
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph949
    public void testMergeNotValidated2() throws AbstractZemucanException {
        final Graph graph1 = new Graph(GraphTest.GRAPH1, false);
        final Graph graph2 = new Graph(GraphTest.GRAPH2, false);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph372
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph388
        final Graph graph2 = new Graph(GraphTest.NO_CONGRUENT_2, true);

        final boolean result = graph1.hashCode() == graph2.hashCode();

        Assert.assertTrue(GraphTest.SAME_HASHCODE, result);
    }

    /**
     * Tests the construction of a graph.
     *
     * @throws ParameterNullException
     *             Never.
     */
    @Test
    public void testConstructed() throws ParameterNullException {
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph319
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph532
        final Graph graph = new Graph("ending node", false); //$NON-NLS-1$
        graph.addNode(GraphTest.ID1, GraphTest.ID1, true);
        graph.addNode(GraphTest.ID2, GraphTest.ID2, true);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph858
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph912
        final GraphNode node = new GraphNode(node1, new Graph("test", false));
        final boolean condition = node.represent(node2);

        Assert.assertTrue("Not represents a reserved word", condition); //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph840
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph895
        final GraphNode node = new GraphNode(node1, new Graph("test", false));
        final boolean condition = node.represent(node2);

        Assert.assertFalse("Represents a reserved word", condition); //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph522
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph599
    public void testHashCodeDifferentWithChildren()
            throws AbstractZemucanException {
        final Graph graph = new Graph("test", false);

        final String node1 = GraphNodeTest.CREATE;
        final String node2 = GraphNodeTest.CREATE;
        final String node21 = GraphNodeTest.TABLE;
FileProjectLine
name/angoca/zemucan/core/graph/model/EndingNodeTest.javaZemucan - Core - graph256
name/angoca/zemucan/core/graph/model/LicenseNodeTest.javaZemucan - Core - graph263
        Assert.assertTrue("Two LicenseNode are equals 2", //$NON-NLS-1$
                expected.equals(actual));
    }

    /**
     * Test that the hash code is the same.
     *
     * @throws AbstractZemucanException
     *             Never
     */
    @Test
    public void testSameHashCode() throws AbstractZemucanException {
        final Graph graph = new Graph("test", false);

        final LicenseNode actual = new LicenseNode(graph);
FileProjectLine
name/angoca/zemucan/core/graph/model/EndingNodeTest.javaZemucan - Core - graph237
name/angoca/zemucan/core/graph/model/LicenseNodeTest.javaZemucan - Core - graph244
        Assert.assertFalse("Equals between LicenseNode and StartingNode 2", //$NON-NLS-1$
                notExpected.equals(actual));
    }

    /**
     * Test the equals method to the same object.
     *
     * @throws AbstractZemucanException
     *             Never
     */
    @Test
    public void testSameEqualsObject() throws AbstractZemucanException {
        final Graph graph = new Graph("test", false);

        final LicenseNode actual = new LicenseNode(graph);
FileProjectLine
name/angoca/zemucan/core/graph/model/AboutNodeTest.javaZemucan - Core - graph145
name/angoca/zemucan/core/graph/model/EndingNodeTest.javaZemucan - Core - graph133
        final LicenseNode actual = new LicenseNode(graph);
        final StartingNode notExpected = new StartingNode(graph);

        final boolean condition = notExpected.hashCode() == actual.hashCode();

        Assert.assertFalse(
FileProjectLine
name/angoca/zemucan/core/graph/model/Graph.javaZemucan - Core - graph186
name/angoca/zemucan/core/graph/model/Graph.javaZemucan - Core - graph610
                final List<AbstractGraphNode> children = new ArrayList<AbstractGraphNode>();
                children.addAll(node.getChildren());
                Collections.sort(children);
                AbstractGraphNode n0 = children.get(0);
FileProjectLine
name/angoca/zemucan/executer/impl/ImplementationExecuterTest.javaZemucan - executer impl147
name/angoca/zemucan/executer/impl/ImplementationExecuterTest.javaZemucan - executer impl312
        final String[] actuals = ImplementationExecuter.getInstance()
                .getCommandsToExecute(command);

        final String[] expecteds = new String[] { "db2", "-v", "!dir" }; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
FileProjectLine
name/angoca/zemucan/executer/impl/ImplementationExecuterTest.javaZemucan - executer impl136
name/angoca/zemucan/executer/impl/ImplementationExecuterTest.javaZemucan - executer impl189
    public void testExecutionInUnknownOS() throws ParameterNullException {
        // Deletes the property, loading other configuration file.
        System.setProperty(Constants.ZEMUCAN_CONF_XML_PROPERTY,
                "sa_conf-test-NoDB2Native.xml"); //$NON-NLS-1$

        // Sets an environment property.
        System.setProperty(ImplementationExecuter.DB2_PARAMS, "-v"); //$NON-NLS-1$
        System.setProperty("os.name", "Unknown OS"); //$NON-NLS-1$ //$NON-NLS-2$
FileProjectLine
name/angoca/zemucan/core/syntactic/model/GraphAnswerTest.javaZemucan - Core - analyzers171
name/angoca/zemucan/core/syntactic/model/GraphAnswerTest.javaZemucan - Core - analyzers425
    public void testEqualsObjectTrue() throws InvalidTokenException {
        final String phrase1 = GraphAnswerTest.CREATE;
        final String option1 = GraphAnswerTest.TABLE;
        final String option2 = GraphAnswerTest.TABLESPACE;

        final List<Token> phrases1 = new ArrayList<Token>();
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers255
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers309
        phraseIn.add(new Token(tokenIn1, true));
        final boolean endsWithSpace = false;
        final GraphAnswer graph = ImplementationSyntacticAnalyzer.getInstance()
                .analyzeTokens(phraseIn, endsWithSpace);

        final List<Token> actual = graph.getOptions();
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers678
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers921
        final ReturnOptions actual = ImplementationLexicalAnalyzer
                .getInstance().analyzePhrase(cmdIn);

        final boolean condition = 0 < actual.getOptions().length;

        Assert.assertTrue("Several options for a space", //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/IntegrationTest.javaZemucan - main116
name/angoca/zemucan/IntegrationTest.javaZemucan - main135
        final OutputWriter writer = new SystemOutputWriter();

        final ExecutionState actual = ImplementationExecuter.getInstance()
                .execute(command, writer);

        final ExecutionState expected = ExecutionState.APPLICATION_EXIT;
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1515
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1584
        graph2.addNode(z, z, true);
        graph2.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph2.firstPhaseFinished();
        graph2.addRelation(Constants.STARTING_NODE, create2Id);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1504
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1573
        graph1.addNode(z, z, true);
        graph1.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph1.firstPhaseFinished();
        graph1.addRelation(Constants.STARTING_NODE, create1Id);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1451
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1584
        graph2.addNode(z, z, true);
        graph2.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph2.firstPhaseFinished();
        graph2.addRelation(Constants.STARTING_NODE, create2Id);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1443
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1573
        graph1.addNode(create1Id, create, true);
        graph1.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph1.firstPhaseFinished();
        graph1.addRelation(Constants.STARTING_NODE, a);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1368
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1664
        graph.addNode(e, e, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph.firstPhaseFinished();
        graph.addRelation(Constants.STARTING_NODE, a);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1274
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1584
        graph2.addNode(z, z, true);
        graph2.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph2.firstPhaseFinished();
        graph2.addRelation(Constants.STARTING_NODE, create2Id);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph993
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1664
        graph.addNode(e, e, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph.firstPhaseFinished();
        graph.addRelation(Constants.STARTING_NODE, a);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph954
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1504
        graph1.addNode(create1Id, create, true);
        graph1.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph1.firstPhaseFinished();
        graph1.addRelation(Constants.STARTING_NODE, a);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph874
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1274
        graph2.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph2.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph2.firstPhaseFinished();
        graph2.addRelation(Constants.STARTING_NODE, GraphTest.CREATE);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph866
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1573
        graph1.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph1.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph1.firstPhaseFinished();
        graph1.addRelation(Constants.STARTING_NODE, GraphTest.CREATE);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph810
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph932
        graph2.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph2.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph2.firstPhaseFinished();
        graph2.addRelation(Constants.STARTING_NODE, GraphTest.CREATE);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph802
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph954
        graph1.addNode(GraphTest.CREATE, GraphTest.CREATE, true);
        graph1.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph1.firstPhaseFinished();
        graph1.addRelation(Constants.STARTING_NODE, GraphTest.CREATE);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph713
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph753
    public void testInvalidStartingNode1() throws AbstractZemucanException {
        final Graph graph = new Graph(GraphTest.NAME, true);

        Exception e = null;
        try {
            graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE,
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph345
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph1664
        graph.addNode(e, e, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);
        graph.firstPhaseFinished();
        graph.addRelation(Constants.STARTING_NODE, a);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph213
name/angoca/zemucan/interfaze/model/ReturnOptionsTest.javaZemucan - Core - ui API361
            new ReturnOptions(phrase, new String[] { phrases }, null);
        } catch (final Exception exception) {
            e = exception;
        }
        Assert.assertTrue("ParameterNullException",
                e instanceof ParameterNullException);
    }

    /**
     * Tests the null exception when the phrase is null.
     *
     * @throws ParameterNullException
     *             Never.
     */
    @Test
    public void testReturnOptionsNullPhrase() throws ParameterNullException {
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph182
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph485
        graph.addNode(Constants.STARTING_NODE, Constants.STARTING_NODE, true);
        graph.addNode(Constants.ENDING_NODE, Constants.ENDING_NODE, true);

        graph.firstPhaseFinished();
        graph.addRelation(Constants.STARTING_NODE, Constants.ENDING_NODE);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph164
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph191
            graph.addNode(GraphTest.TABLE, GraphTest.TABLE, true);
        } catch (final Exception exception) {
            e = exception;
        }
        Assert.assertTrue("InvalidGraphStateException",
                e instanceof InvalidGraphStateException);
    }

    /**
     * Tests that a relation cannot have a null child.
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @Test
    public void testAddNullRelation1() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph158
name/angoca/zemucan/core/graph/model/GraphTest.javaZemucan - Core - graph229
        final Graph graph = new Graph(GraphTest.NULL_RELATION, false);
        graph.addNode(GraphTest.ID1, GraphTest.ID1, true);
        graph.firstPhaseFinished();

        Exception e = null;
        try {
            graph.addRelation(GraphTest.ID1, null);
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph764
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph786
            graphNode.removeParent(null);
        } catch (final Exception exception) {
            e = exception;
        }
        Assert.assertTrue("NullGraphNodeException",
                e instanceof NullGraphNodeException);
    }

    /**
     * Removes a parent from the list of parents.
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @Test
    public void testRemoveParent() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph158
name/angoca/zemucan/core/graph/model/GraphNodeTest.javaZemucan - Core - graph182
            graphNode.addParent(nul);
        } catch (final Exception exception) {
            e = exception;
        }
        Assert.assertTrue("NullGraphNodeException",
                e instanceof NullGraphNodeException);
    }

    /**
     * Adds twice the same child node.
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @Test
    public void testAddTwiceSameChild() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1169
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReaderTest.javaZemucan - grammar reader impl XML1427
    public void testErrorBuildWithExtraTokens() throws AbstractZemucanException {
        final String xml = this.testBuildWithExtraTokensText();

        final String id = ImplementationXMLGrammarReaderTest.NORMAL_GRAPH;
        final Graph actual = new Graph(id, true);
FileProjectLine
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReader.javaZemucan - grammar reader impl XML547
name/angoca/zemucan/grammarReader/impl/xml/ImplementationXMLGrammarReader.javaZemucan - grammar reader impl XML733
				validator.validate(source);
			} catch (final SAXException exception) {
				throw new XMLProblemException(exception);
			} catch (final IOException exception) {
				// I don't know how to test this part. It's outside my scope.
				throw new GeneralGrammarFileProblemException(exception);
			}
FileProjectLine
name/angoca/zemucan/grammarReader/api/GrammarReaderControllerTest.javaZemucan - Core - grammar reader API154
name/angoca/zemucan/grammarReader/api/GrammarReaderControllerTest.javaZemucan - Core - grammar reader API175
                ";sa_conf-test-grammar1.xml;sa_conf-test-grammar2.xml"); //$NON-NLS-1$

        final StartingNode node = GrammarReaderController.getInstance()
                .getStartingNode();

        Assert.assertTrue("Extra commas", node != null);
    }

    /**
     * Tests to read the files with extra spaces.
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @Test
    public final void testExtraSpaces1() throws AbstractZemucanException {
FileProjectLine
name/angoca/zemucan/grammarReader/api/GrammarReaderControllerTest.javaZemucan - Core - grammar reader API131
name/angoca/zemucan/grammarReader/api/GrammarReaderControllerTest.javaZemucan - Core - grammar reader API343
                "sa_conf-test-NoGrammarReader.xml"); //$NON-NLS-1$

        try {
            GrammarReaderController.getInstance();
        } catch (final Exception exception) {
            Assert.assertTrue("GrammarReaderNotDefinedException",
                    exception instanceof GrammarReaderNotDefinedException);
        }
    }

    /**
     * Tests the merge of the same file twice.
     *
     * @throws AbstractZemucanException
     *             Never.
     */
    @Test(expected = AssertionError.class)
FileProjectLine
name/angoca/zemucan/executer/impl/ImplementationExecuter.javaZemucan - executer impl470
name/angoca/zemucan/executer/impl/ImplementationExecuter.javaZemucan - executer impl517
        }

        assert commands != null;
        if (this.assertsEnabled) {
            for (final String retCommand : commands) {
                assert retCommand != null;
            }
        }
        return commands;
    }
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers701
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers812
        phraseOut.add(new Token(tokenOut2, true));
        final List<Token> options = new ArrayList<Token>();
        final GraphAnswer expected = new GraphAnswer(phraseOut, options);

        Assert.assertEquals("'create tab' command", expected, actual); //$NON-NLS-1$
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers397
name/angoca/zemucan/core/syntactic/model/GraphAnswerTest.javaZemucan - Core - analyzers177
        phrases.add(new Token(phrase1, true));
        final List<Token> options = new ArrayList<Token>();
        options.add(new Token(option1, true));
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers393
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers478
        final GraphAnswer actual = ImplementationSyntacticAnalyzer
                .getInstance().analyzeTokens(phraseIn, endsWithSpace);

        final List<Token> phraseOut = new ArrayList<Token>();
FileProjectLine
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers359
name/angoca/zemucan/core/syntactic/impl/ImplementationSyntacticAnalyzerTest.javaZemucan - Core - analyzers829
        final List<Token> phraseIn = new ArrayList<Token>();
        phraseIn.add(new Token(tokenIn1, true));
        final boolean endsWithSpace = false;
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers347
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers370
        final String opt1 = "tablespace"; //$NON-NLS-1$

        final ReturnOptions actual = ImplementationLexicalAnalyzer
                .getInstance().analyzePhrase(cmdIn);

        final ReturnOptions expected = new ReturnOptions(cmdOut,
                new String[] { opt1 }, new String[] {});
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers281
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerTest.javaZemucan - Core - analyzers300
    public void testCreaPhrase3() throws AbstractZemucanException {
        final String cmdIn = "crea"; //$NON-NLS-1$

        final ReturnOptions ret = ImplementationLexicalAnalyzer.getInstance()
                .analyzePhrase(cmdIn);
        final int actual = ret.getPhrases().length;
FileProjectLine
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers198
name/angoca/zemucan/core/lexical/impl/ImplementationLexicalAnalyzerRealGrammarTest.javaZemucan - Core - analyzers993
        final int actualOptionsSize = ret.getOptions().length;
        final int actualPhrasesSize = ret.getPhrases().length;
        Assert.assertEquals("phrase: '" + cmdIn + "' TODO", expected, actual);
FileProjectLine
name/angoca/zemucan/core/syntactic/model/GraphAnswer.javaZemucan - Core - analyzers149
name/angoca/zemucan/core/syntactic/model/GraphAnswer.javaZemucan - Core - analyzers176
            for (final Token token : this.phrases) {
                assert token != null;
            }
        }

        final List<Token> copy = new ArrayList<Token>();
        for (final Token node : this.phrases) {