Buggy code:
public class Util { private static final char [ ] DOUBLE_QUOTES = "''" . toCharArray ( ) ; private static final char [ ] SINGLE_QUOTE = "'" . toCharArray ( ) ; public interface Comparable { int compareTo ( Util . Comparable c ) { } } public interface Comparer { int compare ( Object a , Object b ) { } } public static final String [ ] fgEmptyStringArray = new String [ 0 ] ; private static boolean JDK1_1 = false ; protected static ResourceBundle bundle ; private static final String bundleName = "org.eclipse.jdt.internal.core.messages" ; public static final char [ ] SUFFIX_class = ".class" . toCharArray ( ) ; public static final char [ ] SUFFIX_CLASS = ".CLASS" . toCharArray ( ) ; public static final char [ ] SUFFIX_java = ".java" . toCharArray ( ) ; public static final char [ ] SUFFIX_JAVA = ".JAVA" . toCharArray ( ) ; private static int checkTypeSignature ( String sig , int start , int end , boolean allowVoid ) { } public static int combineHashCodes ( int hashCode1 , int hashCode2 ) { } public static int compare ( byte [ ] a , byte [ ] b ) { } public static int compare ( char [ ] v1 , char [ ] v2 ) { } public static String concat ( String s1 , char c , String s2 ) { } public static String concat ( String s1 , String s2 ) { } public static String concat ( String s1 , String s2 , String s3 ) { } public static String convertTypeSignature ( char [ ] sig ) { } public static boolean equalArraysOrNull ( int [ ] a , int [ ] b ) { } public static boolean equalArraysOrNull ( Object [ ] a , Object [ ] b ) { } public static boolean equalArraysOrNullSortFirst ( String [ ] a , String [ ] b ) { } public static boolean equalArraysOrNullSortFirst ( Util . Comparable [ ] a , Util . Comparable [ ] b ) { } public static boolean equalOrNull ( Object a , Object b ) { } public static String extractLastName ( String qualifiedName ) { } public static String [ ] extractParameterTypes ( char [ ] sig ) { } public static String extractReturnType ( String sig ) { } public static int getParameterCount ( char [ ] sig ) { } public static byte [ ] getResourceContentsAsByteArray ( IFile file ) throws JavaModelException { } public static char [ ] getResourceContentsAsCharArray ( IFile file ) throws JavaModelException { } public static boolean isValidMethodSignature ( String sig ) { } public static boolean isValidTypeSignature ( String sig , boolean allowVoid ) { } public static boolean isValidFolderNameForPackage ( String folderName ) { <START_BUG> return ( folderName . indexOf ( '.' ) ) == ( - 1 ) ; <END_BUG> } public static void log ( String message ) { } public static void log ( Throwable e ) { } private static void quickSort ( Object [ ] sortedCollection , int left , int right , int [ ] sortOrder ) { } private static void quickSort ( Object [ ] sortedCollection , int left , int right , Util . Comparer comparer ) { } private static void quickSort ( String [ ] sortedCollection , int left , int right ) { } public static String packageName ( IPath pkgPath ) { } private static void quickSort ( Util . Comparable [ ] sortedCollection , int left , int right ) { } private static void quickSortReverse ( String [ ] sortedCollection , int left , int right ) { } public static void sort ( Object [ ] objects , int [ ] sortOrder ) { } public static void sort ( Object [ ] objects , Util . Comparer comparer ) { } public static void sort ( String [ ] strings ) { } public static void sort ( Util . Comparable [ ] objects ) { } public static Object [ ] sortCopy ( Object [ ] objects , Util . Comparer comparer ) { } public static String [ ] sortCopy ( String [ ] objects ) { } public static Util . Comparable [ ] sortCopy ( Util . Comparable [ ] objects ) { } public static void sortReverseOrder ( String [ ] strings ) { } public static char [ ] [ ] toCharArrays ( String [ ] a ) { } public static char [ ] toChars ( String s ) { } public static char [ ] [ ] toCompoundChars ( String s ) { } public static String toString ( char [ ] [ ] c ) { } public static String toString ( char [ ] [ ] c , char [ ] d ) { } public static String toString ( char [ ] c ) { } public static void validateMethodSignature ( String sig ) { } public static void validateTypeSignature ( String sig , boolean allowVoid ) { } public static String bind ( String id ) { } public static String bind ( String id , String [ ] bindings ) { } public static String bind ( String id , String binding ) { } public static String bind ( String id , String binding1 , String binding2 ) { } public static final boolean endsWithIgnoreCase ( String str , String end ) { } public static final boolean isClassFileName ( String name ) { } public static boolean isValidCompilationUnitName ( String name ) { } public static boolean isValidClassFileName ( String name ) { } public static final boolean isJavaFileName ( String name ) { } public static void relocalize ( ) { } }

Fix:
return JavaConventions . validateIdentifier ( folderName ) . isOK ( ) ;