Buggy code:
TypeDeclaration [ ] memberTypeDeclarations = new TypeDeclaration [ existingCount + ( memberTypeCount ) ] ; if ( existingCount > 0 ) { System . arraycopy ( typeDeclaration . memberTypes , 0 , memberTypeDeclarations , 0 , existingCount ) ; } if ( ( memberTypes [ ( ( memberTypeCount ) - 1 ) ] . typeDeclaration . declarationSourceEnd ) == 0 ) { int bodyEndValue = bodyEnd ( ) ; memberTypes [ ( ( memberTypeCount ) - 1 ) ] . typeDeclaration . declarationSourceEnd = bodyEndValue ; memberTypes [ ( ( memberTypeCount ) - 1 ) ] . typeDeclaration . bodyEnd = bodyEndValue ; } for ( int i = 0 ; i < ( memberTypeCount ) ; i ++ ) { memberTypeDeclarations [ ( existingCount + i ) ] = memberTypes [ i ] . updatedTypeDeclaration ( ) ; } typeDeclaration . memberTypes = memberTypeDeclarations ; } if ( ( fieldCount ) > 0 ) { int existingCount = ( ( typeDeclaration . fields ) == null ) ? 0 : typeDeclaration . fields . length ; FieldDeclaration [ ] fieldDeclarations = new FieldDeclaration [ existingCount + ( fieldCount ) ] ; if ( existingCount > 0 ) { System . arraycopy ( typeDeclaration . fields , 0 , fieldDeclarations , 0 , existingCount ) ; } if ( ( fields [ ( ( fieldCount ) - 1 ) ] . fieldDeclaration . declarationSourceEnd ) == 0 ) { int temp = bodyEnd ( ) ; fields [ ( ( fieldCount ) - 1 ) ] . fieldDeclaration . declarationSourceEnd = temp ; fields [ ( ( fieldCount ) - 1 ) ] . fieldDeclaration . declarationEnd = temp ; } for ( int i = 0 ; i < ( fieldCount ) ; i ++ ) { fieldDeclarations [ ( existingCount + i ) ] = fields [ i ] . updatedFieldDeclaration ( ) ; } typeDeclaration . fields = fieldDeclarations ; } int existingCount = ( ( typeDeclaration . methods ) == null ) ? 0 : typeDeclaration . methods . length ; boolean hasConstructor = false ; boolean hasRecoveredConstructor = false ; boolean hasAbstractMethods = false ; int defaultConstructorIndex = - 1 ; if ( ( methodCount ) > 0 ) { AbstractMethodDeclaration [ ] methodDeclarations = new AbstractMethodDeclaration [ existingCount + ( methodCount ) ] ; for ( int i = 0 ; i < existingCount ; i ++ ) { AbstractMethodDeclaration m = typeDeclaration . methods [ i ] ; if ( m . isDefaultConstructor ( ) ) defaultConstructorIndex = i ; if ( m . isAbstract ( ) ) hasAbstractMethods = true ; methodDeclarations [ i ] = m ; } if ( ( methods [ ( ( methodCount ) - 1 ) ] . methodDeclaration . declarationSourceEnd ) == 0 ) { int bodyEndValue = bodyEnd ( ) ; methods [ ( ( methodCount ) - 1 ) ] . methodDeclaration . declarationSourceEnd = bodyEndValue ; methods [ ( ( methodCount ) - 1 ) ] . methodDeclaration . bodyEnd = bodyEndValue ; } for ( int i = 0 ; i < ( methodCount ) ; i ++ ) { AbstractMethodDeclaration updatedMethod = methods [ i ] . updatedMethodDeclaration ( ) ; if ( updatedMethod . isConstructor ( ) ) hasRecoveredConstructor = true ; if ( updatedMethod . isAbstract ( ) ) hasAbstractMethods = true ; methodDeclarations [ ( existingCount + i ) ] = updatedMethod ; } typeDeclaration . methods = methodDeclarations ; if ( hasAbstractMethods ) typeDeclaration . bits |= ASTNode . HasAbstractMethods ; hasConstructor = typeDeclaration . checkConstructors ( this . parser ( ) ) ; } else { for ( int i = 0 ; i < existingCount ; i ++ ) { if ( typeDeclaration . methods [ i ] . isConstructor ( ) ) hasConstructor = true ; } } if ( typeDeclaration . needClassInitMethod ( ) ) { boolean alreadyHasClinit = false ; for ( int i = 0 ; i < existingCount ; i ++ ) { if ( typeDeclaration . methods [ i ] . isClinit ( ) ) { alreadyHasClinit = true ; break ; } } if ( ! alreadyHasClinit ) typeDeclaration . addClinit ( ) ; } if ( ( defaultConstructorIndex >= 0 ) && hasRecoveredConstructor ) { AbstractMethodDeclaration [ ] methodDeclarations = new AbstractMethodDeclaration [ ( typeDeclaration . methods . length ) - 1 ] ; if ( defaultConstructorIndex != 0 ) { System . arraycopy ( typeDeclaration . methods , 0 , methodDeclarations , 0 , defaultConstructorIndex ) ; } if ( defaultConstructorIndex != ( ( typeDeclaration . methods . length ) - 1 ) ) { System . arraycopy ( typeDeclaration . methods , ( defaultConstructorIndex + 1 ) , methodDeclarations , defaultConstructorIndex , ( ( ( typeDeclaration . methods . length ) - defaultConstructorIndex ) - 1 ) ) ; } typeDeclaration . methods = methodDeclarations ; } else { <START_BUG> if ( ( ! hasConstructor ) && ( ( typeDeclaration . kind ( ) ) != ( INTERFACE_DECL ) ) ) { <END_BUG> boolean insideFieldInitializer = false ; RecoveredElement parentElement = this . parent ; while ( parentElement != null ) { if ( parentElement instanceof RecoveredField ) { insideFieldInitializer = true ; break ; } parentElement = parentElement . parent ; } typeDeclaration . createDefaultConstructor ( ( ( ! ( parser ( ) . diet ) ) || insideFieldInitializer ) , true ) ; } } if ( ( parent ) instanceof RecoveredType ) { typeDeclaration . bits |= IsMemberTypeMASK ; } else if ( ( parent ) instanceof RecoveredMethod ) { typeDeclaration . bits |= IsLocalTypeMASK ; } return typeDeclaration ; } public void updateFromParserState ( ) { } public RecoveredElement updateOnClosingBrace ( int braceStart , int braceEnd ) { } public RecoveredElement updateOnOpeningBrace ( int braceStart , int braceEnd ) { } public void updateParseTree ( ) { } public void updateSourceEndIfNecessary ( int start , int end ) { } }

Fix:
if ( ( ( ! hasConstructor ) && ( ( typeDeclaration . kind ( ) ) != ( INTERFACE_DECL ) ) ) && ( ( typeDeclaration . kind ( ) ) != ( ANNOTATION_TYPE_DECL ) ) ) {