Bug 60257 SearchPattern API: R_CASE_SENSITIVE vs. boolean isCaseSensitive
The SearchPattern API for stringPattern searches to java elements is somewhat odd: There's a public constant R_CASE_SENSITIVE, which is not mentioned in the javadoc of createPattern(String stringPattern, int searchFor, int limitTo, int matchMode, boolean isCaseSensitive) , and there's also an extra boolean parameter isCaseSensitive. I don't see why R_CASE_SENSITIVE is made public if it should not be used by clients. On the other hand, it could also be turned into an official bit-flag and the boolean isCaseSensitive removed. To have both options seems strange to me.
org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/util/TestSearchEngine.java
}
		return true;
	}
	
	private static boolean isTestType(IType type) throws JavaModelException {
		if (Flags.isAbstract(type.getFlags())) 
			return false;
		if (!Flags.isPublic(type.getFlags())) 
			return false;
		
		IType[] interfaces= type.newSupertypeHierarchy(null).getAllSuperInterfaces(type);
		for (int i= 0; i < interfaces.length; i++)
			if(interfaces[i].getFullyQualifiedName().equals(JUnitPlugin.TEST_INTERFACE_NAME))
				return true;
		return false;
	}
	public static boolean isTestImplementor(IType type) throws JavaModelException {
		ITypeHierarchy typeHier= type.newSupertypeHierarchy(null);
		IType[] superInterfaces= typeHier.getAllInterfaces();
		for (int i= 0; i < superInterfaces.length; i++) {
			if (superInterfaces[i].getFullyQualifiedName().equals(JUnitPlugin.TEST_INTERFACE_NAME))
				return true;
		}
		return false;
	}
	public static boolean isTestOrTestSuite(IType type) throws JavaModelException {
		return hasSuiteMethod(type) || isTestType(type);
	}
}