1. A computer-implemented method of finding a subset of candidate ordered sequences of symbols that match a query ordered sequence, the method comprising: obtaining relative importance weights of symbols in the candidate ordered sequences; finding a maximum match among the candidate ordered sequences by optimizing a weighted similarity measure; pruning uninformative sequences based on a false positive count, a false negative count, and a frequency count; incrementing the false positive count for all matching function names appearing above a first non-matching function name in a call-stack pair generated due to the same problem, and incrementing the false negative count for all non-matching function names appearing above the first matching function in the call-stack pair generated due to the same problem; and incrementing the frequency count for each appearance of either one of the matching or one of the non-matching functions in the call stack.