question: public ASTContainer parseQuery2 ( final String queryStr , final String baseURI ) throws MalformedQueryException { final long startTime = System . nanoTime ( ) ; if ( log . isInfoEnabled ( ) ) log . info ( queryStr ) ; try { final ASTQueryContainer qc = SyntaxTreeBuilder . parseQuery ( queryStr ) ; StringEscapesProcessor . process ( qc ) ; BaseDeclProcessor . process ( qc , baseURI ) ; final Map < String , String > prefixes = PrefixDeclProcessor . process ( qc ) ; BlankNodeVarProcessor . process ( qc ) ; final ASTDeferredIVResolutionInitializer resolver = new ASTDeferredIVResolutionInitializer ( ) ; resolver . process ( qc ) ; final QueryRoot queryRoot = buildQueryModel ( qc , resolver . getValues ( ) ) ; final ASTContainer ast = new ASTContainer ( queryRoot ) ; ast . setQueryString ( queryStr ) ; ast . setParseTree ( qc ) ; doQueryIdHint ( ast , queryRoot ) ; queryRoot . setPrefixDecls ( prefixes ) ; VerifyAggregates . verifyAggregate ( queryRoot ) ; ast . setQueryParseTime ( System . nanoTime ( ) - startTime ) ; return ast ; } catch ( final IllegalArgumentException e ) { throw new MalformedQueryException ( e . getMessage ( ) , e ) ; } catch ( final VisitorException e ) { throw new MalformedQueryException ( e . getMessage ( ) , e ) ; } catch ( final ParseException e ) { throw new MalformedQueryException ( e . getMessage ( ) , e ) ; } catch ( final TokenMgrError e ) { throw new MalformedQueryException ( e . getMessage ( ) , e ) ; } }
target:  Parse a SPARQL query.