import java.util.regex.*;

class BadRegEx {

	boolean f(String s) {
		return s.matches("][");
	}

	String g(String s) {
		return s.replaceAll("][", "xx");
	}

	String h(String s) {
		return s.replaceFirst("][", "xx");
	}

	void x(String s) throws Exception {
		Pattern.matches("][", s);
	}

	Pattern y(String s) throws Exception {
		return Pattern.compile("][", Pattern.CASE_INSENSITIVE);
	}

	Pattern z(String s) {
		return Pattern.compile("][");
	}

}

@@ -445,10 +445,267 @@
 %22);%0A%09%7D%0A%0A
+%09Pattern literalOne(String s) throws Exception %7B%0A%09%09return Pattern.compile(%22%5D%5B%22, Pattern.LITERAL); // not a bug%0A%09%7D%0A%0A%09Pattern literalTwo(String s) throws Exception %7B%0A%09%09return Pattern.compile(%22%5D%5B%22, Pattern.CASE_INSENSITIVE %7C Pattern.LITERAL); // not a bug%0A%09%7D%0A%0A
 %7D%0A

false positives with Pattern.LITERAL