Buggy code:
if ( methodDeclarationBracePositionOption != null ) { this . method_declaration_brace_position = ( ( String ) ( methodDeclarationBracePositionOption ) ) ; } final Object methodThrowsClauseAlignmentOption = settings . get ( FORMATTER_METHOD_THROWS_CLAUSE_ALIGNMENT ) ; if ( methodThrowsClauseAlignmentOption != null ) { this . method_throws_clause_alignment = Integer . parseInt ( ( ( String ) ( methodThrowsClauseAlignmentOption ) ) ) ; } final Object multipleFieldsAlignmentOption = settings . get ( FORMATTER_MULTIPLE_FIELDS_ALIGNMENT ) ; if ( multipleFieldsAlignmentOption != null ) { this . multiple_fields_alignment = Integer . parseInt ( ( ( String ) ( multipleFieldsAlignmentOption ) ) ) ; } final Object numberOfBlankLinesToInsertAtBeginningOfMethodBodyOption = settings . get ( FORMATTER_NUMBER_OF_BLANK_LINES_TO_INSERT_AT_BEGINNING_OF_METHOD_BODY ) ; if ( numberOfBlankLinesToInsertAtBeginningOfMethodBodyOption != null ) { this . number_of_blank_lines_to_insert_at_beginning_of_method_body = Integer . parseInt ( ( ( String ) ( numberOfBlankLinesToInsertAtBeginningOfMethodBodyOption ) ) ) ; } final Object numberOfEmptyLinesToPreserveOption = settings . get ( DefaultCodeFormatterConstants . FORMATTER_NUMBER_OF_EMPTY_LINES_TO_PRESERVE ) ; if ( numberOfEmptyLinesToPreserveOption != null ) { this . number_of_empty_lines_to_preserve = Integer . parseInt ( ( ( String ) ( numberOfEmptyLinesToPreserveOption ) ) ) ; } final Object pageWidthOption = settings . get ( DefaultCodeFormatterConstants . FORMATTER_LINE_SPLIT ) ; if ( pageWidthOption != null ) { this . page_width = Integer . parseInt ( ( ( String ) ( pageWidthOption ) ) ) ; } final Object preserveUserLinebreaksOption = settings . get ( FORMATTER_PRESERVE_USER_LINEBREAKS ) ; if ( preserveUserLinebreaksOption != null ) { this . preserve_user_linebreaks = DefaultCodeFormatterConstants . TRUE . equals ( preserveUserLinebreaksOption ) ; } final Object putEmptyStatementOnNewLineOption = settings . get ( DefaultCodeFormatterConstants . FORMATTER_PUT_EMPTY_STATEMENT_ON_NEW_LINE ) ; if ( putEmptyStatementOnNewLineOption != null ) { this . put_empty_statement_on_new_line = DefaultCodeFormatterConstants . TRUE . equals ( putEmptyStatementOnNewLineOption ) ; } final Object qualifiedAllocationExpressionArgumentsAlignmentOption = settings . get ( FORMATTER_QUALIFIED_ALLOCATION_EXPRESSION_ARGUMENTS_ALIGNMENT ) ; if ( qualifiedAllocationExpressionArgumentsAlignmentOption != null ) { this . qualified_allocation_expression_arguments_alignment = Integer . parseInt ( ( ( String ) ( qualifiedAllocationExpressionArgumentsAlignmentOption ) ) ) ; } final Object switchBracePositionOption = settings . get ( FORMATTER_SWITCH_BRACE_POSITION ) ; if ( switchBracePositionOption != null ) { this . switch_brace_position = ( ( String ) ( switchBracePositionOption ) ) ; } final Object tabSizeOption = settings . get ( DefaultCodeFormatterConstants . FORMATTER_TAB_SIZE ) ; if ( tabSizeOption != null ) { this . tab_size = Integer . parseInt ( ( ( String ) ( tabSizeOption ) ) ) ; } final Object typeDeclarationBracePositionOption = settings . get ( FORMATTER_TYPE_DECLARATION_BRACE_POSITION ) ; if ( typeDeclarationBracePositionOption != null ) { this . type_declaration_brace_position = ( ( String ) ( typeDeclarationBracePositionOption ) ) ; } final Object typeDeclarationSuperclassAlignmentOption = settings . get ( FORMATTER_TYPE_DECLARATION_SUPERCLASS_ALIGNMENT ) ; if ( typeDeclarationSuperclassAlignmentOption != null ) { this . type_declaration_superclass_alignment = Integer . parseInt ( ( ( String ) ( typeDeclarationSuperclassAlignmentOption ) ) ) ; } final Object typeDeclarationSuperinterfacesAlignmentOption = settings . get ( FORMATTER_TYPE_DECLARATION_SUPERINTERFACES_ALIGNMENT ) ; if ( typeDeclarationSuperinterfacesAlignmentOption != null ) { this . type_declaration_superinterfaces_alignment = Integer . parseInt ( ( ( String ) ( typeDeclarationSuperinterfacesAlignmentOption ) ) ) ; } final Object typeMemberAlignmentOption = settings . get ( FORMATTER_TYPE_MEMBER_ALIGNMENT ) ; if ( typeMemberAlignmentOption != null ) { this . type_member_alignment = Integer . parseInt ( ( ( String ) ( typeMemberAlignmentOption ) ) ) ; } final Object useTabOption = settings . get ( DefaultCodeFormatterConstants . FORMATTER_TAB_CHAR ) ; if ( useTabOption != null ) { this . use_tab = JavaCore . TAB . equals ( useTabOption ) ; } final Object clearBlankLines = settings . get ( JavaCore . FORMATTER_CLEAR_BLANK_LINES ) ; if ( clearBlankLines != null ) { if ( JavaCore . CLEAR_ALL . equals ( clearBlankLines ) ) { this . number_of_empty_lines_to_preserve = 0 ; } else if ( JavaCore . PRESERVE_ONE . equals ( clearBlankLines ) ) { this . number_of_empty_lines_to_preserve = 1 ; } else { this . number_of_empty_lines_to_preserve = Integer . MAX_VALUE ; } } final Object compactAssignment = settings . get ( JavaCore . FORMATTER_COMPACT_ASSIGNMENT ) ; if ( compactAssignment != null ) { this . insert_space_before_assignment_operators = JavaCore . NORMAL . equals ( compactAssignment ) ; } final Object newLineOpenBrace = settings . get ( JavaCore . FORMATTER_NEWLINE_OPENING_BRACE ) ; if ( newLineOpenBrace != null ) { if ( JavaCore . INSERT . equals ( newLineOpenBrace ) ) { this . anonymous_type_declaration_brace_position = DefaultCodeFormatterConstants . NEXT_LINE ; this . type_declaration_brace_position = DefaultCodeFormatterConstants . NEXT_LINE ; this . method_declaration_brace_position = DefaultCodeFormatterConstants . NEXT_LINE ; this . block_brace_position = DefaultCodeFormatterConstants . NEXT_LINE ; this . switch_brace_position = DefaultCodeFormatterConstants . NEXT_LINE ; } else { this . anonymous_type_declaration_brace_position = DefaultCodeFormatterConstants . END_OF_LINE ; this . type_declaration_brace_position = DefaultCodeFormatterConstants . END_OF_LINE ; this . method_declaration_brace_position = DefaultCodeFormatterConstants . END_OF_LINE ; this . block_brace_position = DefaultCodeFormatterConstants . END_OF_LINE ; this . switch_brace_position = DefaultCodeFormatterConstants . END_OF_LINE ; } } final Object newLineControl = settings . get ( JavaCore . FORMATTER_NEWLINE_CONTROL ) ; if ( newLineControl != null ) { this . insert_new_line_in_control_statements = JavaCore . INSERT . equals ( newLineControl ) ; } <START_BUG> final Object newLineElseIf = settings . get ( JavaCore . FORMATTER_NEWLINE_CONTROL ) ; <END_BUG> if ( newLineElseIf != null ) { this . compact_else_if = JavaCore . DO_NOT_INSERT . equals ( newLineElseIf ) ; } final Object newLineEmptyBlock = settings . get ( JavaCore . FORMATTER_NEWLINE_EMPTY_BLOCK ) ; if ( newLineEmptyBlock != null ) { if ( JavaCore . INSERT . equals ( newLineEmptyBlock ) ) { this . insert_new_line_in_empty_anonymous_type_declaration = true ; this . insert_new_line_in_empty_type_declaration = true ; this . insert_new_line_in_empty_method_body = true ; this . insert_new_line_in_empty_block = true ; } else { this . insert_new_line_in_empty_anonymous_type_declaration = false ; this . insert_new_line_in_empty_type_declaration = false ; this . insert_new_line_in_empty_method_body = false ; this . insert_new_line_in_empty_block = false ; } } final Object castExpression = settings . get ( JavaCore . FORMATTER_SPACE_CASTEXPRESSION ) ; if ( castExpression != null ) { this . insert_space_after_closing_paren_in_cast = JavaCore . INSERT . equals ( castExpression ) ; } } public static DefaultCodeFormatterOptions getDefault ( ) { } public static DefaultCodeFormatterOptions getSunSetttings ( ) { } }

Fix:
final Object newLineElseIf = settings . get ( JavaCore . FORMATTER_NEWLINE_ELSE_IF ) ;