Buggy code:
public class SourceTypeConverter implements CompilerModifiers { public static final int FIELD = 1 ; public static final int CONSTRUCTOR = 2 ; public static final int METHOD = 4 ; public static final int MEMBER_TYPE = 8 ; public static final int FIELD_INITIALIZATION = 16 ; public static final int FIELD_AND_METHOD = ( ( SourceTypeConverter . FIELD ) | ( SourceTypeConverter . CONSTRUCTOR ) ) | ( SourceTypeConverter . METHOD ) ; public static final int LOCAL_TYPE = 32 ; public static final int NONE = 0 ; private int flags ; private CompilationUnitDeclaration unit ; private Parser parser ; private ProblemReporter problemReporter ; int namePos ; private SourceTypeConverter ( int flags , ProblemReporter problemReporter ) { } public static CompilationUnitDeclaration buildCompilationUnit ( ISourceType [ ] sourceTypes , int flags , ProblemReporter problemReporter , CompilationResult compilationResult ) { } private CompilationUnitDeclaration convert ( ISourceType [ ] sourceTypes , CompilationResult compilationResult ) { } private Initializer convert ( InitializerElementInfo initializerInfo , CompilationResult compilationResult ) { } private FieldDeclaration convert ( ISourceField sourceField , TypeDeclaration type , CompilationResult compilationResult ) { } private AbstractMethodDeclaration convert ( ISourceMethod sourceMethod , CompilationResult compilationResult ) { } private TypeDeclaration convert ( ISourceType sourceType , CompilationResult compilationResult ) { TypeDeclaration type = new TypeDeclaration ( compilationResult ) ; if ( ( ( sourceType . getEnclosingType ( ) ) == null ) && ( sourceType instanceof SourceTypeElementInfo ) ) { IType typeHandle = ( ( SourceTypeElementInfo ) ( sourceType ) ) . getHandle ( ) ; try { if ( typeHandle . isAnonymous ( ) ) { type . name = ANONYMOUS_EMPTY_NAME ; type . bits |= AnonymousAndLocalMask ; } else { if ( typeHandle . isLocal ( ) ) { type . bits |= IsLocalTypeMASK ; } } } catch ( JavaModelException e ) { } } else { type . bits |= IsMemberTypeMASK ; } if ( ( ( type . bits ) & ( IsAnonymousTypeMASK ) ) == 0 ) { type . name = sourceType . getName ( ) ; } type . name = sourceType . getName ( ) ; int start ; int end ; type . sourceStart = start = sourceType . getNameSourceStart ( ) ; type . sourceEnd = end = sourceType . getNameSourceEnd ( ) ; type . modifiers = sourceType . getModifiers ( ) ; type . declarationSourceStart = sourceType . getDeclarationSourceStart ( ) ; type . declarationSourceEnd = sourceType . getDeclarationSourceEnd ( ) ; type . bodyEnd = type . declarationSourceEnd ; char [ ] [ ] typeParameterNames = sourceType . getTypeParameterNames ( ) ; <START_BUG> if ( typeParameterNames != null ) { <END_BUG> int parameterCount = typeParameterNames . length ; char [ ] [ ] [ ] typeParameterBounds = sourceType . getTypeParameterBounds ( ) ; type . typeParameters = new TypeParameter [ parameterCount ] ; for ( int i = 0 ; i < parameterCount ; i ++ ) { type . typeParameters [ i ] = createTypeParameter ( typeParameterNames [ i ] , typeParameterBounds [ i ] , start , end ) ; } } if ( ( sourceType . getSuperclassName ( ) ) != null ) { type . superclass = createTypeReference ( sourceType . getSuperclassName ( ) , start , end ) ; type . superclass . bits |= ASTNode . IsSuperType ; } char [ ] [ ] interfaceNames = sourceType . getInterfaceNames ( ) ; int interfaceCount = ( interfaceNames == null ) ? 0 : interfaceNames . length ; type . superInterfaces = new TypeReference [ interfaceCount ] ; for ( int i = 0 ; i < interfaceCount ; i ++ ) { type . superInterfaces [ i ] = createTypeReference ( interfaceNames [ i ] , start , end ) ; type . superInterfaces [ i ] . bits |= ASTNode . IsSuperType ; } if ( ( ( this . flags ) & ( SourceTypeConverter . MEMBER_TYPE ) ) != 0 ) { ISourceType [ ] sourceMemberTypes = sourceType . getMemberTypes ( ) ; int sourceMemberTypeCount = ( sourceMemberTypes == null ) ? 0 : sourceMemberTypes . length ; type . memberTypes = new TypeDeclaration [ sourceMemberTypeCount ] ; for ( int i = 0 ; i < sourceMemberTypeCount ; i ++ ) { type . memberTypes [ i ] = convert ( sourceMemberTypes [ i ] , compilationResult ) ; } } InitializerElementInfo [ ] initializers = null ; int initializerCount = 0 ; if ( ( ( ( this . flags ) & ( SourceTypeConverter . LOCAL_TYPE ) ) != 0 ) && ( sourceType instanceof SourceTypeElementInfo ) ) { initializers = ( ( SourceTypeElementInfo ) ( sourceType ) ) . getInitializers ( ) ; initializerCount = initializers . length ; } ISourceField [ ] sourceFields = null ; int sourceFieldCount = 0 ; if ( ( ( this . flags ) & ( SourceTypeConverter . FIELD ) ) != 0 ) { sourceFields = sourceType . getFields ( ) ; sourceFieldCount = ( sourceFields == null ) ? 0 : sourceFields . length ; } int length = initializerCount + sourceFieldCount ; if ( length > 0 ) { type . fields = new FieldDeclaration [ length ] ; for ( int i = 0 ; i < initializerCount ; i ++ ) { type . fields [ i ] = convert ( initializers [ i ] , compilationResult ) ; } int index = 0 ; for ( int i = initializerCount ; i < length ; i ++ ) { type . fields [ i ] = convert ( sourceFields [ ( index ++ ) ] , type , compilationResult ) ; } } boolean needConstructor = ( ( this . flags ) & ( SourceTypeConverter . CONSTRUCTOR ) ) != 0 ; boolean needMethod = ( ( this . flags ) & ( SourceTypeConverter . METHOD ) ) != 0 ; if ( needConstructor || needMethod ) { ISourceMethod [ ] sourceMethods = sourceType . getMethods ( ) ;

Fix:
if ( ( typeParameterNames != null ) && ( ( typeParameterNames . length ) > 0 ) ) {