The algorithm that generates TPF responses using the Jena TDB backend is incorrect for cases in which the requested triple pattern contains a specific variable multiple times. For instance, suppose the client requests triple pattern (?x, foaf:knows, ?x) with variable ?x explicitly mentioned in the HTTP request (using both, the subject parameter and the object parameter). In response to this request, the existing algorithm would return all triples (from the dataset) that have foaf:knows in the predicate position; hence, the algorithm ignores the additional constraint that subject and object must be equivalent.
The algorithm that generates TPF responses using the Jena TDB backend is incorrect for cases in which the requested triple pattern contains a specific variable multiple times. For instance, suppose the client requests triple pattern (?x, foaf:knows, ?x) with variable ?x explicitly mentioned in the HTTP request (using both, the subject parameter and the object parameter). In response to this request, the existing algorithm would return all triples (from the dataset) that have foaf:knows in the predicate position; hence, the algorithm ignores the additional constraint that subject and object must be equivalent.