A Similarity-based Test Case Quality Metric using Historical Failure Data