Buggy code:
public class DefaultCodeFormatter extends CodeFormatter { public static final boolean DEBUG = false ; private CodeFormatterVisitor newCodeFormatter ; private Map options ; private Map defaultCompilerOptions ; private DefaultCodeFormatterOptions preferences ; private CodeSnippetParsingUtil codeSnippetParsingUtil ; public DefaultCodeFormatter ( ) { } public DefaultCodeFormatter ( DefaultCodeFormatterOptions preferences ) { } public DefaultCodeFormatter ( DefaultCodeFormatterOptions defaultCodeFormatterOptions , Map options ) { } public DefaultCodeFormatter ( Map options ) { } public TextEdit format ( int kind , String source , int offset , int length , int indentationLevel , String lineSeparator ) { } private TextEdit formatClassBodyDeclarations ( String source , int indentationLevel , String lineSeparator , int offset , int length ) { } private TextEdit formatCompilationUnit ( String source , int indentationLevel , String lineSeparator , int offset , int length ) { } private TextEdit formatExpression ( String source , int indentationLevel , String lineSeparator , int offset , int length ) { } private TextEdit formatStatements ( String source , int indentationLevel , String lineSeparator , int offset , int length ) { } public String getDebugOutput ( ) { } private Map getDefaultCompilerOptions ( ) { if ( ( this . defaultCompilerOptions ) == null ) { Map optionsMap = new HashMap ( 30 ) ; optionsMap . put ( CompilerOptions . OPTION_LocalVariableAttribute , CompilerOptions . DO_NOT_GENERATE ) ; optionsMap . put ( CompilerOptions . OPTION_LineNumberAttribute , CompilerOptions . DO_NOT_GENERATE ) ; optionsMap . put ( CompilerOptions . OPTION_SourceFileAttribute , CompilerOptions . DO_NOT_GENERATE ) ; optionsMap . put ( CompilerOptions . OPTION_PreserveUnusedLocal , CompilerOptions . PRESERVE ) ; optionsMap . put ( CompilerOptions . OPTION_DocCommentSupport , CompilerOptions . DISABLED ) ; optionsMap . put ( CompilerOptions . OPTION_ReportMethodWithConstructorName , CompilerOptions . IGNORE ) ; optionsMap . put ( CompilerOptions . OPTION_ReportOverridingPackageDefaultMethod , CompilerOptions . IGNORE ) ; optionsMap . put ( CompilerOptions . OPTION_ReportDeprecation , CompilerOptions . IGNORE ) ; optionsMap . put ( CompilerOptions . OPTION_ReportDeprecationInDeprecatedCode , CompilerOptions . DISABLED ) ; optionsMap . put ( CompilerOptions . OPTION_ReportDeprecationWhenOverridingDeprecatedMethod , CompilerOptions . DISABLED ) ; optionsMap . put ( CompilerOptions . OPTION_ReportHiddenCatchBlock , CompilerOptions . IGNORE ) ; optionsMap . put ( CompilerOptions . OPTION_ReportUnusedLocal , CompilerOptions . IGNORE ) ; optionsMap . put ( CompilerOptions . OPTION_ReportUnusedParameter , CompilerOptions . IGNORE ) ; optionsMap . put ( CompilerOptions . OPTION_ReportUnusedImport , CompilerOptions . IGNORE ) ; optionsMap . put ( CompilerOptions . OPTION_ReportSyntheticAccessEmulation , CompilerOptions . IGNORE ) ; optionsMap . put ( CompilerOptions . OPTION_ReportNoEffectAssignment , CompilerOptions . IGNORE ) ; optionsMap . put ( CompilerOptions . OPTION_ReportNonExternalizedStringLiteral , CompilerOptions . IGNORE ) ; optionsMap . put ( CompilerOptions . OPTION_ReportNoImplicitStringConversion , CompilerOptions . IGNORE ) ; optionsMap . put ( CompilerOptions . OPTION_ReportNonStaticAccessToStatic , CompilerOptions . IGNORE ) ; optionsMap . put ( CompilerOptions . OPTION_ReportIndirectStaticAccess , CompilerOptions . IGNORE ) ; optionsMap . put ( CompilerOptions . OPTION_ReportIncompatibleNonInheritedInterfaceMethod , CompilerOptions . IGNORE ) ; optionsMap . put ( CompilerOptions . OPTION_ReportUnusedPrivateMember , CompilerOptions . IGNORE ) ; optionsMap . put ( CompilerOptions . OPTION_ReportLocalVariableHiding , CompilerOptions . IGNORE ) ; optionsMap . put ( CompilerOptions . OPTION_ReportFieldHiding , CompilerOptions . IGNORE ) ; optionsMap . put ( CompilerOptions . OPTION_ReportPossibleAccidentalBooleanAssignment , CompilerOptions . IGNORE ) ; <START_BUG> optionsMap . put ( OPTION_ReportSuperfluousSemicolon , CompilerOptions . IGNORE ) ; <END_BUG> optionsMap . put ( CompilerOptions . OPTION_ReportAssertIdentifier , CompilerOptions . IGNORE ) ; optionsMap . put ( CompilerOptions . OPTION_ReportUndocumentedEmptyBlock , CompilerOptions . IGNORE ) ; optionsMap . put ( CompilerOptions . OPTION_ReportUnnecessaryTypeCheck , CompilerOptions . IGNORE ) ; optionsMap . put ( CompilerOptions . OPTION_ReportInvalidJavadoc , CompilerOptions . IGNORE ) ; optionsMap . put ( CompilerOptions . OPTION_ReportInvalidJavadocTagsVisibility , CompilerOptions . PUBLIC ) ; optionsMap . put ( CompilerOptions . OPTION_ReportInvalidJavadocTags , CompilerOptions . DISABLED ) ; optionsMap . put ( CompilerOptions . OPTION_ReportMissingJavadocTags , CompilerOptions . IGNORE ) ; optionsMap . put ( CompilerOptions . OPTION_ReportMissingJavadocTagsVisibility , CompilerOptions . PUBLIC ) ; optionsMap . put ( CompilerOptions . OPTION_ReportMissingJavadocTagsOverriding , CompilerOptions . DISABLED ) ; optionsMap . put ( CompilerOptions . OPTION_ReportMissingJavadocComments , CompilerOptions . IGNORE ) ; optionsMap . put ( CompilerOptions . OPTION_ReportMissingJavadocCommentsVisibility , CompilerOptions . IGNORE ) ; optionsMap . put ( CompilerOptions . OPTION_ReportMissingJavadocCommentsOverriding , CompilerOptions . DISABLED ) ; optionsMap . put ( CompilerOptions . OPTION_ReportFinallyBlockNotCompletingNormally , CompilerOptions . IGNORE ) ; optionsMap . put ( CompilerOptions . OPTION_ReportUnusedDeclaredThrownException , CompilerOptions . IGNORE ) ; optionsMap . put ( CompilerOptions . OPTION_ReportUnusedDeclaredThrownExceptionWhenOverriding , CompilerOptions . DISABLED ) ; optionsMap . put ( CompilerOptions . OPTION_ReportUnqualifiedFieldAccess , CompilerOptions . IGNORE ) ; optionsMap . put ( CompilerOptions . OPTION_Compliance , CompilerOptions . VERSION_1_4 ) ; optionsMap . put ( CompilerOptions . OPTION_TargetPlatform , CompilerOptions . VERSION_1_2 ) ; optionsMap . put ( CompilerOptions . OPTION_TaskTags , "" ) ; optionsMap . put ( CompilerOptions . OPTION_TaskPriorities , "" ) ; optionsMap . put ( CompilerOptions . OPTION_TaskCaseSensitive , CompilerOptions . DISABLED ) ; optionsMap . put ( CompilerOptions . OPTION_ReportUnusedParameterWhenImplementingAbstract , CompilerOptions . DISABLED ) ; optionsMap . put ( CompilerOptions . OPTION_ReportUnusedParameterWhenOverridingConcrete , CompilerOptions . DISABLED ) ; optionsMap . put ( CompilerOptions . OPTION_ReportSpecialParameterHidingField , CompilerOptions . DISABLED ) ; optionsMap . put ( CompilerOptions . OPTION_MaxProblemPerUnit , String . valueOf ( 100 ) ) ; optionsMap . put ( CompilerOptions . OPTION_InlineJsr , CompilerOptions . DISABLED ) ; this . defaultCompilerOptions = optionsMap ; } Object sourceOption = this . options . get ( CompilerOptions . OPTION_Source ) ; if ( sourceOption != null ) { this . defaultCompilerOptions . put ( CompilerOptions . OPTION_Source , sourceOption ) ; } else { this . defaultCompilerOptions . put ( CompilerOptions . OPTION_Source , CompilerOptions . VERSION_1_3 ) ; } return this . defaultCompilerOptions ; } private TextEdit internalFormatClassBodyDeclarations ( String source , int indentationLevel , String lineSeparator , ASTNode [ ] bodyDeclarations , int offset , int length ) { } private TextEdit internalFormatExpression ( String source , int indentationLevel , String lineSeparator , Expression expression , int offset , int length ) { }

Fix:
optionsMap . put ( CompilerOptions . OPTION_ReportEmptyStatement , CompilerOptions . IGNORE ) ;