// Path: src/main/java/nl/vu/jena/graph/FilteredTriple.java
// public class FilteredTriple extends Triple {
// 	
// 	private Expr simpleFilter;
// 
// 	public FilteredTriple(Node s, Node p, Node o, Expr simpleFilter) {
// 		super(s, p, o);
// 		this.simpleFilter = simpleFilter;
// 	}
// 	
// 	public FilteredTriple(Triple t, Expr simpleFilter){
// 		super(t.getSubject(), t.getPredicate(), t.getMatchObject());
// 		this.simpleFilter = simpleFilter;
// 	}
// 
// 	public Expr getSimpleFilter() {
// 		return simpleFilter;
// 	}
// 
// 	public void setSimpleFilter(Expr simpleFilter) {
// 		this.simpleFilter = simpleFilter;
// 	}
// 	
// }


import static com.hp.hpl.jena.sparql.engine.optimizer.reorder.PatternElements.ANY;
import static com.hp.hpl.jena.sparql.engine.optimizer.reorder.PatternElements.BNODE;
import static com.hp.hpl.jena.sparql.engine.optimizer.reorder.PatternElements.LITERAL;
import static com.hp.hpl.jena.sparql.engine.optimizer.reorder.PatternElements.TERM;
import static com.hp.hpl.jena.sparql.engine.optimizer.reorder.PatternElements.URI;
import static com.hp.hpl.jena.sparql.engine.optimizer.reorder.PatternElements.VAR;
import static com.hp.hpl.jena.sparql.engine.optimizer.reorder.PatternElements.isAny;
import static com.hp.hpl.jena.sparql.engine.optimizer.reorder.PatternElements.isAnyBNode;
import static com.hp.hpl.jena.sparql.engine.optimizer.reorder.PatternElements.isAnyLiteral;
import static com.hp.hpl.jena.sparql.engine.optimizer.reorder.PatternElements.isAnyTerm;
import static com.hp.hpl.jena.sparql.engine.optimizer.reorder.PatternElements.isAnyURI;
import static com.hp.hpl.jena.sparql.engine.optimizer.reorder.PatternElements.isAnyVar;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import nl.vu.jena.graph.FilteredTriple;
import org.openjena.atlas.io.IndentedWriter;
import org.openjena.atlas.logging.Log;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.hp.hpl.jena.graph.Node;
import com.hp.hpl.jena.graph.Triple;
import com.hp.hpl.jena.sparql.ARQException;
import com.hp.hpl.jena.sparql.core.Var;
import com.hp.hpl.jena.sparql.graph.NodeConst;
import com.hp.hpl.jena.sparql.sse.Item;
import com.hp.hpl.jena.sparql.sse.ItemException;
import com.hp.hpl.jena.sparql.sse.ItemList;
import com.hp.hpl.jena.sparql.sse.SSE;
            {
                details.exactMatches ++ ;
                return true ;
            }
        
            if ( isAnyTerm(item) )
            {
                details.termMatches ++ ;
                return true ;
            }
            
            if ( isAnyURI(item) && n.isURI() )
            {
                details.termMatches ++ ;
                return true ;
            }
            if ( isAnyLiteral(item) && n.isLiteral() )
            {
                details.termMatches ++ ;
                return true ;
            }
            if ( isAnyBNode(item) && n.isBlank() )
            {
                details.termMatches ++ ;
                return true ;
            }
        }
        return false ;
    }
    
// Path: src/main/java/nl/vu/jena/graph/FilteredTriple.java
// public class FilteredTriple extends Triple {
// 	
// 	private Expr simpleFilter;
// 
// 	public FilteredTriple(Node s, Node p, Node o, Expr simpleFilter) {
// 		super(s, p, o);
// 		this.simpleFilter = simpleFilter;
// 	}
// 	
// 	public FilteredTriple(Triple t, Expr simpleFilter){
// 		super(t.getSubject(), t.getPredicate(), t.getMatchObject());
// 		this.simpleFilter = simpleFilter;
// 	}
// 
// 	public Expr getSimpleFilter() {
// 		return simpleFilter;
// 	}
// 
// 	public void setSimpleFilter(Expr simpleFilter) {
// 		this.simpleFilter = simpleFilter;
// 	}
// 	
// }


// Path: src/main/java/nl/vu/jena/sparql/engine/optimizer/reorder/StatsMatcher.java
import static com.hp.hpl.jena.sparql.engine.optimizer.reorder.PatternElements.ANY;
import static com.hp.hpl.jena.sparql.engine.optimizer.reorder.PatternElements.BNODE;
import static com.hp.hpl.jena.sparql.engine.optimizer.reorder.PatternElements.LITERAL;
import static com.hp.hpl.jena.sparql.engine.optimizer.reorder.PatternElements.TERM;
import static com.hp.hpl.jena.sparql.engine.optimizer.reorder.PatternElements.URI;
import static com.hp.hpl.jena.sparql.engine.optimizer.reorder.PatternElements.VAR;
import static com.hp.hpl.jena.sparql.engine.optimizer.reorder.PatternElements.isAny;
import static com.hp.hpl.jena.sparql.engine.optimizer.reorder.PatternElements.isAnyBNode;
import static com.hp.hpl.jena.sparql.engine.optimizer.reorder.PatternElements.isAnyLiteral;
import static com.hp.hpl.jena.sparql.engine.optimizer.reorder.PatternElements.isAnyTerm;
import static com.hp.hpl.jena.sparql.engine.optimizer.reorder.PatternElements.isAnyURI;
import static com.hp.hpl.jena.sparql.engine.optimizer.reorder.PatternElements.isAnyVar;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import nl.vu.jena.graph.FilteredTriple;
import org.openjena.atlas.io.IndentedWriter;
import org.openjena.atlas.logging.Log;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.hp.hpl.jena.graph.Node;
import com.hp.hpl.jena.graph.Triple;
import com.hp.hpl.jena.sparql.ARQException;
import com.hp.hpl.jena.sparql.core.Var;
import com.hp.hpl.jena.sparql.graph.NodeConst;
import com.hp.hpl.jena.sparql.sse.Item;
import com.hp.hpl.jena.sparql.sse.ItemException;
import com.hp.hpl.jena.sparql.sse.ItemList;
import com.hp.hpl.jena.sparql.sse.SSE;

            {
                details.exactMatches ++ ;
                return true ;
            }
        
            if ( isAnyTerm(item) )
            {
                details.termMatches ++ ;
                return true ;
            }
            
            if ( isAnyURI(item) && n.isURI() )
            {
                details.termMatches ++ ;
                return true ;
            }
            if ( isAnyLiteral(item) && n.isLiteral() )
            {
                details.termMatches ++ ;
                return true ;
            }
            if ( isAnyBNode(item) && n.isBlank() )
            {
                details.termMatches ++ ;
                return true ;
            }
        }
        return false ;
    }
    
    @Override