Buggy code:
if ( expressionsLength > 1 ) { if ( insert_new_line_after_opening_brace ) { this . scribe . printNewLine ( ) ; } Alignment arrayInitializerAlignment = this . scribe . createAlignment ( "array_initializer" , this . preferences . alignment_for_expressions_in_array_initializer , R_OUTERMOST , expressionsLength , this . scribe . scanner . currentPosition , this . preferences . continuation_indentation_for_array_initializer , true ) ; if ( insert_new_line_after_opening_brace ) { arrayInitializerAlignment . fragmentIndentations [ 0 ] = arrayInitializerAlignment . breakIndentationLevel ; } this . scribe . enterAlignment ( arrayInitializerAlignment ) ; boolean ok = false ; do { try { this . scribe . alignFragment ( arrayInitializerAlignment , 0 ) ; if ( this . preferences . insert_space_after_opening_brace_in_array_initializer ) { this . scribe . space ( ) ; } expressions [ 0 ] . traverse ( this , scope ) ; for ( int i = 1 ; i < expressionsLength ; i ++ ) { this . scribe . printNextToken ( TerminalTokens . TokenNameCOMMA , this . preferences . insert_space_before_comma_in_array_initializer ) ; this . scribe . printTrailingComment ( ) ; this . scribe . alignFragment ( arrayInitializerAlignment , i ) ; if ( this . preferences . insert_space_after_comma_in_array_initializer ) { this . scribe . space ( ) ; } expressions [ i ] . traverse ( this , scope ) ; if ( i == ( expressionsLength - 1 ) ) { if ( isNextToken ( TerminalTokens . TokenNameCOMMA ) ) { this . scribe . printNextToken ( TerminalTokens . TokenNameCOMMA , this . preferences . insert_space_before_comma_in_array_initializer ) ; this . scribe . printTrailingComment ( ) ; } } } ok = true ; } catch ( AlignmentException e ) { this . scribe . redoAlignment ( e ) ; } } while ( ! ok ) ; this . scribe . exitAlignment ( arrayInitializerAlignment , true ) ; } else { if ( insert_new_line_after_opening_brace ) { this . scribe . printNewLine ( ) ; this . scribe . indent ( ) ; } if ( this . preferences . insert_space_after_opening_brace_in_array_initializer ) { this . scribe . space ( ) ; } else { this . scribe . needSpace = false ; } expressions [ 0 ] . traverse ( this , scope ) ; if ( isNextToken ( TerminalTokens . TokenNameCOMMA ) ) { this . scribe . printNextToken ( TerminalTokens . TokenNameCOMMA , this . preferences . insert_space_before_comma_in_array_initializer ) ; this . scribe . printTrailingComment ( ) ; } if ( insert_new_line_after_opening_brace ) { this . scribe . unIndent ( ) ; } } if ( this . preferences . insert_new_line_before_closing_brace_in_array_initializer ) { this . scribe . printNewLine ( ) ; } else if ( this . preferences . insert_space_before_closing_brace_in_array_initializer ) { this . scribe . space ( ) ; } this . scribe . printNextToken ( TerminalTokens . TokenNameRBRACE , false ) ; if ( array_initializer_brace_position . equals ( DefaultCodeFormatterConstants . NEXT_LINE_SHIFTED ) ) { this . scribe . unIndent ( ) ; } } else { boolean keepEmptyArrayInitializerOnTheSameLine = this . preferences . keep_empty_array_initializer_on_one_line ; String array_initializer_brace_position = this . preferences . brace_position_for_array_initializer ; if ( keepEmptyArrayInitializerOnTheSameLine ) { this . scribe . printNextToken ( TerminalTokens . TokenNameLBRACE , this . preferences . insert_space_before_opening_brace_in_array_initializer ) ; if ( isNextToken ( TerminalTokens . TokenNameCOMMA ) ) { this . scribe . printNextToken ( TerminalTokens . TokenNameCOMMA , this . preferences . insert_space_before_comma_in_array_initializer ) ; this . scribe . printTrailingComment ( ) ; } this . scribe . printNextToken ( TerminalTokens . TokenNameRBRACE , this . preferences . insert_space_between_empty_braces_in_array_initializer ) ; } else { formatOpeningBrace ( array_initializer_brace_position , this . preferences . insert_space_before_opening_brace_in_array_initializer ) ; if ( isNextToken ( TerminalTokens . TokenNameCOMMA ) ) { this . scribe . printNextToken ( TerminalTokens . TokenNameCOMMA , this . preferences . insert_space_before_comma_in_array_initializer ) ; this . scribe . printTrailingComment ( ) ; } <START_BUG> this . scribe . printNextToken ( TerminalTokens . TokenNameRBRACE , false ) ; <END_BUG> if ( array_initializer_brace_position . equals ( DefaultCodeFormatterConstants . NEXT_LINE_SHIFTED ) ) { this . scribe . unIndent ( ) ; } } } if ( numberOfParens > 0 ) { manageClosingParenthesizedExpression ( arrayInitializer , numberOfParens ) ; } return false ; } public boolean visit ( ArrayQualifiedTypeReference arrayQualifiedTypeReference , BlockScope scope ) { } public boolean visit ( ArrayQualifiedTypeReference arrayQualifiedTypeReference , ClassScope scope ) { } public boolean visit ( ArrayReference arrayReference , BlockScope scope ) { } public boolean visit ( ArrayTypeReference arrayTypeReference , BlockScope scope ) { } public boolean visit ( ArrayTypeReference arrayTypeReference , ClassScope scope ) { } public boolean visit ( AssertStatement assertStatement , BlockScope scope ) { } public boolean visit ( Assignment assignment , BlockScope scope ) { } public boolean visit ( BinaryExpression binaryExpression , BlockScope scope ) { } public boolean visit ( Block block , BlockScope scope ) { } public boolean visit ( BreakStatement breakStatement , BlockScope scope ) { } public boolean visit ( CaseStatement caseStatement , BlockScope scope ) { } public boolean visit ( CastExpression castExpression , BlockScope scope ) { } public boolean visit ( CharLiteral charLiteral , BlockScope scope ) { } public boolean visit ( ClassLiteralAccess classLiteral , BlockScope scope ) { } public boolean visit ( Clinit clinit , ClassScope scope ) { } public boolean visit ( CompilationUnitDeclaration compilationUnitDeclaration , CompilationUnitScope scope ) { } public boolean visit ( CompoundAssignment compoundAssignment , BlockScope scope ) { } public boolean visit ( ConditionalExpression conditionalExpression , BlockScope scope ) { } public boolean visit ( ConstructorDeclaration constructorDeclaration , ClassScope scope ) { } public boolean visit ( ContinueStatement continueStatement , BlockScope scope ) { } public boolean visit ( DoStatement doStatement , BlockScope scope ) { } public boolean visit ( DoubleLiteral doubleLiteral , BlockScope scope ) { } public boolean visit ( EmptyStatement statement , BlockScope scope ) { } public boolean visit ( FieldDeclaration enumConstant , MethodScope scope ) { } public boolean visit ( EqualExpression equalExpression , BlockScope scope ) { }

Fix:
this . scribe . printNextToken ( TerminalTokens . TokenNameRBRACE , this . preferences . insert_space_between_empty_braces_in_array_initializer ) ;