code: public static int getPosition(Term subTerm, Term term) {
  		int startingIndex = -1;
  		int j = 0;
  		for(int i=0; i<term.getWords().size(); i++) {
  			if(term.getWords().get(i).equals(subTerm.getWords().get(j))) {
  				j++;
  				if(startingIndex == -1) 
  					startingIndex = i;
  			} else {
  				startingIndex = -1;
  				j = 0;
  			}
  			if(j == subTerm.getWords().size())
  				return startingIndex;
  		}
  		return -1;
  	}
docs: Finds the index of appearance of a term's sub-term.
  
  
  @param subTerm
  the inner term, must be included in <code>term</code>
  @param term
  the container term.
  @return
  the starting index of <code>subTerm</code> in <code>term</code>. -1 otherwise.