private PhrasePositions[] repeatingPPs(HashMap<Term,Integer> rptTerms){
  ArrayList<PhrasePositions> rp=new ArrayList<>();
  for (  PhrasePositions pp : phrasePositions) {
    for (    Term t : pp.terms) {
      if (rptTerms.containsKey(t)) {
        rp.add(pp);
        hasMultiTermRpts|=(pp.terms.length > 1);
        break;
      }
    }
  }
  return rp.toArray(new PhrasePositions[0]);
}

private PhrasePositions [ ] repeatingPPs ( HashMap < Term , Integer > rptTerms ) { ArrayList < PhrasePositions > rp = new ArrayList < > ( ) ; for ( PhrasePositions pp : phrasePositions ) { for ( Term t : pp . terms ) { if ( rptTerms . containsKey ( t ) ) { rp . add ( pp ) ; hasMultiTermRpts |= ( pp . terms . length > 1 ) ; break ; } } } return rp . toArray ( new PhrasePositions [ 0 ] ) ; }
find repeating pps , and for each , if has multi - terms , update this . hasmultitermrpts
