Buggy code:
@ Path ( "//" ) @ Produces ( APPLICATION_JSON ) @ Consumes ( APPLICATION_JSON ) @ Api ( value = "//.*//relationships" , description = "Work<seq2seq4repair_space>with<seq2seq4repair_space>the<seq2seq4repair_space>relationships." ) public class RestRelationships extends RestBase { public static Map < String , Class < ? extends Entity < ? , ? > > > entityMap ; @ Context private Providers providers ; @ GET @ Path ( "{path:.*}//relationships" ) @ ApiOperation ( "Retrieves<seq2seq4repair_space>relationships" ) @ ApiResponses ( { @ ApiResponse ( code = 200 , message = "The<seq2seq4repair_space>list<seq2seq4repair_space>of<seq2seq4repair_space>relationships" ) , @ ApiResponse ( code = 404 , message = "Accompanying<seq2seq4repair_space>entity<seq2seq4repair_space>doesn't<seq2seq4repair_space>exist" , response = ApiError . class ) , @ ApiResponse ( code = 500 , message = "Server<seq2seq4repair_space>error" , response = ApiError . class ) } ) public Response get ( @ PathParam ( "path" ) String path , @ DefaultValue ( "both" ) @ QueryParam ( "direction" ) String direction , @ DefaultValue ( "" ) @ QueryParam ( "property" ) String propertyName , @ DefaultValue ( "" ) @ QueryParam ( "propertyValue" ) String propertyValue , @ DefaultValue ( "" ) @ QueryParam ( "named" ) String named , @ DefaultValue ( "" ) @ QueryParam ( "sourceType" ) String sourceType , @ DefaultValue ( "" ) @ QueryParam ( "targetType" ) String targetType , @ DefaultValue ( "false" ) @ QueryParam ( "jsonld" ) String jsonLd , @ Context UriInfo uriInfo ) { } @ DELETE @ Path ( "{path:.*}//relationships" ) @ ApiOperation ( "Deletes<seq2seq4repair_space>a<seq2seq4repair_space>relationship" ) @ ApiResponses ( { @ ApiResponse ( code = 200 , message = "The<seq2seq4repair_space>list<seq2seq4repair_space>of<seq2seq4repair_space>relationships" ) , @ ApiResponse ( code = 404 , message = "Accompanying<seq2seq4repair_space>entity<seq2seq4repair_space>doesn't<seq2seq4repair_space>exist" , response = ApiError . class ) , @ ApiResponse ( code = 500 , message = "Server<seq2seq4repair_space>error" , response = ApiError . class ) } ) public Response delete ( @ PathParam ( "path" ) String path , @ ApiParam ( required = true ) Relationship relation , @ Context UriInfo uriInfo ) { } @ POST @ Path ( "{path:.*}//relationships" ) @ ApiOperation ( "Creates<seq2seq4repair_space>a<seq2seq4repair_space>relationship" ) @ ApiResponses ( { @ ApiResponse ( code = 201 , message = "OK" ) , @ ApiResponse ( code = 400 , message = "Invalid<seq2seq4repair_space>input<seq2seq4repair_space>data" , response = ApiError . class ) , @ ApiResponse ( code = 404 , message = "Accompanying<seq2seq4repair_space>entity<seq2seq4repair_space>doesn't<seq2seq4repair_space>exist" , response = ApiError . class ) , @ ApiResponse ( code = 409 , message = "Relationship<seq2seq4repair_space>already<seq2seq4repair_space>exists" , response = ApiError . class ) , @ ApiResponse ( code = 500 , message = "Server<seq2seq4repair_space>error" , response = ApiError . class ) } ) public Response create ( @ PathParam ( "path" ) String path , @ ApiParam ( required = true ) Relationship relation , @ Context UriInfo uriInfo ) { } @ PUT @ Path ( "{path:.*}//relationships" ) @ ApiOperation ( "Updates<seq2seq4repair_space>a<seq2seq4repair_space>relationship" ) @ ApiResponses ( { @ ApiResponse ( code = 204 , message = "OK" ) , @ ApiResponse ( code = 400 , message = "Invalid<seq2seq4repair_space>input<seq2seq4repair_space>data" , response = ApiError . class ) , @ ApiResponse ( code = 404 , message = "Accompanying<seq2seq4repair_space>entity<seq2seq4repair_space>doesn't<seq2seq4repair_space>exist" , response = ApiError . class ) , @ ApiResponse ( code = 500 , message = "Server<seq2seq4repair_space>error" , response = ApiError . class ) } ) public Response update ( @ PathParam ( "path" ) String path , @ ApiParam ( required = true ) Relationship relation , @ Context UriInfo uriInfo ) { } private String toSecurityId ( String urlPath ) { } private ResolvableToSingleWithRelationships getResolvableFromCanonicalPath ( CanonicalPath cPath ) { Tenants . Single tenant = inventory . tenants ( ) . get ( getTenantId ( ) ) ; ResolvableToSingleWithRelationships resolvable = tenant ; if ( ( cPath . getEnvironmentId ( ) ) != null ) { Environments . Single env = tenant . environments ( ) . get ( cPath . getEnvironmentId ( ) ) ; if ( ( cPath . getFeedId ( ) ) != null ) { if ( ( cPath . getResourceId ( ) ) != null ) { resolvable = env . feeds ( ) . get ( cPath . getFeedId ( ) ) . resources ( ) . get ( cPath . getResourceId ( ) ) ; } else if ( ( cPath . getMetricId ( ) ) != null ) { resolvable = env . feeds ( ) . get ( cPath . getFeedId ( ) ) . metrics ( ) . get ( cPath . getMetricId ( ) ) ; } else { resolvable = env . feeds ( ) . get ( cPath . getFeedId ( ) ) ; } } else if ( ( cPath . getResourceId ( ) ) != null ) { resolvable = env . feedlessResources ( ) . get ( cPath . getResourceId ( ) ) ; } else if ( ( cPath . getMetricId ( ) ) != null ) { resolvable = env . feedlessMetrics ( ) . get ( cPath . getMetricId ( ) ) ; } else { resolvable = env ; } } else if ( ( cPath . getResourceTypeId ( ) ) != null ) { resolvable = tenant . resourceTypes ( ) . get ( cPath . getResourceTypeId ( ) ) ; } else if ( ( cPath . getMetricTypeId ( ) ) != null ) { <START_BUG> resolvable = tenant . resourceTypes ( ) . get ( cPath . getMetricTypeId ( ) ) ; <END_BUG> } return resolvable ; } public static RelationFilter [ ] extractFilters ( String propertyName , String propertyValue , String named , String sourceType , String targetType , UriInfo info ) { } private void checkForWellKnownLabels ( String name , String operation ) { } }

Fix:
resolvable = tenant . metricTypes ( ) . get ( cPath . getMetricTypeId ( ) ) ;