Buggy code:
public final class JavaConventions { private static final char DOT = '.' ; private static final Scanner SCANNER = new Scanner ( ) ; private JavaConventions ( ) { } public static boolean isOverlappingRoots ( IPath rootPath1 , IPath rootPath2 ) { } private static synchronized char [ ] scannedIdentifier ( String id ) { } public static IStatus validateCompilationUnitName ( String name ) { } public static IStatus validateClassFileName ( String name ) { } public static IStatus validateFieldName ( String name ) { } public static IStatus validateIdentifier ( String id ) { } public static IStatus validateImportDeclaration ( String name ) { } public static IStatus validateJavaTypeName ( String name ) { } public static IStatus validateMethodName ( String name ) { } public static IStatus validatePackageName ( String name ) { if ( name == null ) { return new Status ( IStatus . ERROR , JavaCore . PLUGIN_ID , ( - 1 ) , org . eclipse . jdt . internal . core . util . Util . bind ( "convention.package.nullName" ) , null ) ; } int length ; if ( ( length = name . length ( ) ) == 0 ) { return new Status ( IStatus . ERROR , JavaCore . PLUGIN_ID , ( - 1 ) , org . eclipse . jdt . internal . core . util . Util . bind ( "convention.package.emptyName" ) , null ) ; } if ( ( ( name . charAt ( 0 ) ) == ( JavaConventions . DOT ) ) || ( ( name . charAt ( ( length - 1 ) ) ) == ( JavaConventions . DOT ) ) ) { return new Status ( IStatus . ERROR , JavaCore . PLUGIN_ID , ( - 1 ) , org . eclipse . jdt . internal . core . util . Util . bind ( "convention.package.dotName" ) , null ) ; } if ( ( CharOperation . isWhitespace ( name . charAt ( 0 ) ) ) || ( CharOperation . isWhitespace ( name . charAt ( ( ( name . length ( ) ) - 1 ) ) ) ) ) { return new Status ( IStatus . ERROR , JavaCore . PLUGIN_ID , ( - 1 ) , org . eclipse . jdt . internal . core . util . Util . bind ( "convention.package.nameWithBlanks" ) , null ) ; } int dot = 0 ; while ( ( dot != ( - 1 ) ) && ( dot < ( length - 1 ) ) ) { if ( ( ( ( dot = name . indexOf ( JavaConventions . DOT , ( dot + 1 ) ) ) != ( - 1 ) ) && ( dot < ( length - 1 ) ) ) && ( ( name . charAt ( ( dot + 1 ) ) ) == ( JavaConventions . DOT ) ) ) { return new Status ( IStatus . ERROR , JavaCore . PLUGIN_ID , ( - 1 ) , org . eclipse . jdt . internal . core . util . Util . bind ( "convention.package.consecutiveDotsName" ) , null ) ; } } IWorkspace workspace = ResourcesPlugin . getWorkspace ( ) ; <START_BUG> StringTokenizer st = new StringTokenizer ( name , new String ( new char [ ] { JavaConventions . DOT } ) ) ; <END_BUG> boolean firstToken = true ; IStatus warningStatus = null ; while ( st . hasMoreTokens ( ) ) { String typeName = st . nextToken ( ) ; typeName = typeName . trim ( ) ; char [ ] scannedID = JavaConventions . scannedIdentifier ( typeName ) ; if ( scannedID == null ) { return new Status ( IStatus . ERROR , JavaCore . PLUGIN_ID , ( - 1 ) , org . eclipse . jdt . internal . core . util . Util . bind ( "convention.illegalIdentifier" , typeName ) , null ) ; } IStatus status = workspace . validateName ( new String ( scannedID ) , IResource . FOLDER ) ; if ( ! ( status . isOK ( ) ) ) { return status ; } if ( ( firstToken && ( ( scannedID . length ) > 0 ) ) && ( Character . isUpperCase ( scannedID [ 0 ] ) ) ) { if ( warningStatus == null ) { warningStatus = new Status ( IStatus . WARNING , JavaCore . PLUGIN_ID , ( - 1 ) , org . eclipse . jdt . internal . core . util . Util . bind ( "convention.package.uppercaseName" ) , null ) ; } } firstToken = false ; } if ( warningStatus != null ) { return warningStatus ; } return JavaModelStatus . VERIFIED_OK ; } public static IJavaModelStatus validateClasspath ( IJavaProject javaProject , IClasspathEntry [ ] rawClasspath , IPath projectOutputLocation ) { } public static IJavaModelStatus validateClasspathEntry ( IJavaProject project , IClasspathEntry entry , boolean checkSourceAttachment ) { } public static IStatus validateTypeVariableName ( String name ) { } }

Fix:
StringTokenizer st = new StringTokenizer ( name , "." ) ;