Program trace analyzer based on edit distance