qaengine/src/HitsTable.cxx
//------------------------------------------------------------------
// This member function will try to locate hits in this table 
// which match the given hit (using AST path)
//------------------------------------------------------------------
This member function will try to locate hits in this table
which match the given hit (using AST path)
This member function will try to locate hits in this table which match the given hit ( using AST path )
HitsSet HitsTable::compare(string query,Hit hit) {
HitsSet matchingHits;
HitsSet thisModuleHits;
   ScopeSet scope;
   scope.insert(hit.getModule());
   thisModuleHits = search(query,scope);
   HitsSet::iterator i;
   for(i=thisModuleHits.begin();i!=thisModuleHits.end();i++) {
	   Hit* h = *i;
	   if(*(h->getAstPathPtr())==*(hit.getAstPathPtr())) {
		   matchingHits.push_back(h);
	   }
   }
   return matchingHits;
}
HitsSet HitsTable :: compare ( string query , Hit hit ) { HitsSet matchingHits ; HitsSet thisModuleHits ; ScopeSet scope ; scope . insert ( hit . getModule ( ) ) ; thisModuleHits = search ( query , scope ) ; HitsSet :: iterator i ; for ( i = thisModuleHits . begin ( ) ; i != thisModuleHits . end ( ) ; i ++ ) { Hit * h = * i ; if ( * ( h -> getAstPathPtr ( ) ) == * ( hit . getAstPathPtr ( ) ) ) { matchingHits . push_back ( h ) ; } } return matchingHits ; }
This member function will try to locate hits in this table
which match the given hit (using AST path)
This member function will try to locate hits in this table which match the given hit ( using AST path )