Buggy code:
@ Path ( "class" ) @ Api ( value = "//class" , description = "Operations<seq2seq4repair_space>about<seq2seq4repair_space>property" ) public class Class { @ Context ServletContext context ; public String ModelSparqlDataEndpoint ( ) { } @ GET @ Produces ( "application//ld+json" ) @ ApiOperation ( value = "Get<seq2seq4repair_space>property<seq2seq4repair_space>from<seq2seq4repair_space>model" , notes = "More<seq2seq4repair_space>notes<seq2seq4repair_space>about<seq2seq4repair_space>this<seq2seq4repair_space>method" ) @ ApiResponses ( { @ ApiResponse ( code = 400 , message = "Invalid<seq2seq4repair_space>model<seq2seq4repair_space>supplied" ) , @ ApiResponse ( code = 404 , message = "Service<seq2seq4repair_space>not<seq2seq4repair_space>found" ) , @ ApiResponse ( code = 500 , message = "Internal<seq2seq4repair_space>server<seq2seq4repair_space>error" ) } ) public Response json ( @ ApiParam ( "Class<seq2seq4repair_space>id" ) @ QueryParam ( "id" ) String id , @ ApiParam ( "Model<seq2seq4repair_space>id" ) @ QueryParam ( "model" ) String model ) { ResponseBuilder rb ; try { String queryString ; ParameterizedSparqlString pss = new ParameterizedSparqlString ( ) ; pss . setNsPrefixes ( PREFIX_MAP ) ; <START_BUG> queryString = "CONSTRUCT<seq2seq4repair_space>{<seq2seq4repair_space>?class<seq2seq4repair_space>rdfs:label<seq2seq4repair_space>?label<seq2seq4repair_space>.<seq2seq4repair_space>?class<seq2seq4repair_space>rdfs:comment<seq2seq4repair_space>?comment<seq2seq4repair_space>.<seq2seq4repair_space>?class<seq2seq4repair_space>rdfs:isDefinedBy<seq2seq4repair_space>?library<seq2seq4repair_space>.<seq2seq4repair_space>}<seq2seq4repair_space>WHERE<seq2seq4repair_space>{<seq2seq4repair_space>?class<seq2seq4repair_space>rdfs:label<seq2seq4repair_space>?label<seq2seq4repair_space>.<seq2seq4repair_space>OPTIONAL<seq2seq4repair_space>{<seq2seq4repair_space>?class<seq2seq4repair_space>rdfs:comment<seq2seq4repair_space>?comment<seq2seq4repair_space>}<seq2seq4repair_space>.<seq2seq4repair_space>?class<seq2seq4repair_space>a<seq2seq4repair_space>sh:ShapeClass<seq2seq4repair_space>.<seq2seq4repair_space>?library<seq2seq4repair_space>iow:classes<seq2seq4repair_space>?class<seq2seq4repair_space>.<seq2seq4repair_space>}" ; <END_BUG> if ( ( id != null ) && ( ! ( id . equals ( "undefined" ) ) ) ) pss . setIri ( "class" , id ) ; if ( ( model != null ) && ( ! ( model . equals ( "undefined" ) ) ) ) pss . setIri ( "library" , model ) ; pss . setCommandText ( queryString ) ; Logger . getLogger ( Class . class . getName ( ) ) . log ( Level . INFO , pss . toString ( ) ) ; Client client = Client . create ( ) ; WebResource webResource = client . resource ( ModelSparqlDataEndpoint ( ) ) . queryParam ( "query" , UriComponent . encode ( pss . toString ( ) , QUERY ) ) ; WebResource . Builder builder = webResource . accept ( "application//ld+json" ) ; ClientResponse response = builder . get ( ClientResponse . class ) ; rb = Response . status ( response . getStatus ( ) ) ; rb . entity ( response . getEntityInputStream ( ) ) ; return rb . build ( ) ; } catch ( UniformInterfaceException | ClientHandlerException ex ) { Logger . getLogger ( Class . class . getName ( ) ) . log ( Level . WARNING , "Expect<seq2seq4repair_space>the<seq2seq4repair_space>unexpected!" , ex ) ; return Response . serverError ( ) . entity ( "{}" ) . build ( ) ; } } }

Fix:
queryString = "CONSTRUCT<seq2seq4repair_space>{<seq2seq4repair_space>?class<seq2seq4repair_space>a<seq2seq4repair_space>sh:ShapeClass<seq2seq4repair_space>.<seq2seq4repair_space>?class<seq2seq4repair_space>?p<seq2seq4repair_space>?o<seq2seq4repair_space>.<seq2seq4repair_space>?class<seq2seq4repair_space>sh:property<seq2seq4repair_space>?prop<seq2seq4repair_space>.<seq2seq4repair_space>?prop<seq2seq4repair_space>?pp<seq2seq4repair_space>?po<seq2seq4repair_space>.<seq2seq4repair_space>?class<seq2seq4repair_space>rdfs:isDefinedBy<seq2seq4repair_space>?library<seq2seq4repair_space>.<seq2seq4repair_space>}<seq2seq4repair_space>WHERE<seq2seq4repair_space>{<seq2seq4repair_space>?class<seq2seq4repair_space>a<seq2seq4repair_space>sh:ShapeClass<seq2seq4repair_space>.<seq2seq4repair_space>?class<seq2seq4repair_space>?p<seq2seq4repair_space>?o<seq2seq4repair_space>.<seq2seq4repair_space>?class<seq2seq4repair_space>sh:property<seq2seq4repair_space>?prop<seq2seq4repair_space>.<seq2seq4repair_space>?prop<seq2seq4repair_space>?pp<seq2seq4repair_space>?po<seq2seq4repair_space>.<seq2seq4repair_space>?library<seq2seq4repair_space>iow:classes<seq2seq4repair_space>?class<seq2seq4repair_space>.<seq2seq4repair_space>}" ;