BugSet query(SortableValue keyValuePair){
  if (doneMap.containsKey(keyValuePair)) {
    return doneMap.get(keyValuePair);
  }
  ArrayList<BugLeafNode> bugs=new ArrayList<BugLeafNode>();
  for (  BugLeafNode b : mainList) {
    if (b.matches(keyValuePair)) {
      bugs.add(b);
    }
  }
  BugSet temp=new BugSet(bugs);
  doneMap.put(keyValuePair,temp);
  return temp;
}

BugSet query ( SortableValue keyValuePair ) { if ( doneMap . containsKey ( keyValuePair ) ) { return doneMap . get ( keyValuePair ) ; } ArrayList < BugLeafNode > bugs = new ArrayList < BugLeafNode > ( ) ; for ( BugLeafNode b : mainList ) { if ( b . matches ( keyValuePair ) ) { bugs . add ( b ) ; } } BugSet temp = new BugSet ( bugs ) ; doneMap . put ( keyValuePair , temp ) ; return temp ; }
a string pair has a key and a value . the key is the general category ie : type the value is the value ie : malicious code . query looks through a bugleafnode set with a keyvaluepair to see which bugleafnodes inside match the value under the category of key . passing in a key of abbrev and a value of ms should return a new bugset with all the mutable static bugs in the current set note also : this query will only be performed once , and then stored and reused if the same query is used again .
