Skip to content

Instantly share code, notes, and snippets.

@louismrose
louismrose / Palindrome.java
Last active August 29, 2015 14:02
Using mutation testing to detect bugs involving exceptions?
public class Palindrome {
// This method checks whether its input reads the same forwards
// as backwards. For example, isPalindrome("noon") should return
// true, but isPalindrome("night") should return false.
// Note that this implementation contains a deliberate bug.
public static boolean isPalindrome(String s) {
if (s.length() == 0) {