@Override
    public boolean visit(VariableDeclarationStatement node)
    {
        for (int i = 0; i < node.fragments().size(); ++i)
        {
            String nodeType = node.getType().toString();
            VariableDeclarationFragment frag = (VariableDeclarationFragment) node.fragments().get(i);
            state.getNames().add(frag.getName().getIdentifier());
            state.getNameInstance().put(frag.getName().toString(), nodeType.toString());
        }

        processType(node.getType(), TypeReferenceLocation.VARIABLE_DECLARATION,
                    compilationUnit.getLineNumber(node.getStartPosition()),
                    compilationUnit.getColumnNumber(node.getStartPosition()), node.getLength(), node.toString());
        return super.visit(node);
    }
@ Override public boolean visit ( VariableDeclarationStatement node ) { for ( int i = 0 ; i < node . fragments ( ) . size ( ) ; ++ i ) { String nodeType = node . getType ( ) . toString ( ) ; VariableDeclarationFragment frag = ( VariableDeclarationFragment ) node . fragments ( ) . get ( i ) ; state . getNames ( ) . add ( frag . getName ( ) . getIdentifier ( ) ) ; state . getNameInstance ( ) . put ( frag . getName ( ) . toString ( ) , nodeType . toString ( ) ) ; } processType ( node . getType ( ) , TypeReferenceLocation . VARIABLE_DECLARATION , compilationUnit . getLineNumber ( node . getStartPosition ( ) ) , compilationUnit . getColumnNumber ( node . getStartPosition ( ) ) , node . getLength ( ) , node . toString ( ) ) ; return super . visit ( node ) ; }
Declaration of the variable within a block