private boolean resultExists(List<CodeMatchResult> lst,int value){
  for (  CodeMatchResult s : lst) {
    if (s.getLineNumber() == value) {
      return true;
    }
  }
  return false;
}

private boolean resultExists ( List < CodeMatchResult > lst , int value ) { for ( CodeMatchResult s : lst ) { if ( s . getLineNumber ( ) == value ) { return true ; } } return false ; }
helper to check if result exists in the collection based on line number
