Buggy code:
public Alignment createAlignment ( String name , int mode , int tieBreakRule , int count , int sourceRestart ) { } public Alignment createAlignment ( String name , int mode , int count , int sourceRestart , int continuationIndent , boolean adjust ) { } public Alignment createAlignment ( String name , int mode , int tieBreakRule , int count , int sourceRestart , int continuationIndent , boolean adjust ) { } public Alignment createMemberAlignment ( String name , int mode , int count , int sourceRestart ) { } public void enterAlignment ( Alignment alignment ) { } public void enterMemberAlignment ( Alignment alignment ) { } public void exitAlignment ( Alignment alignment , boolean discardAlignment ) { } public void exitMemberAlignment ( Alignment alignment ) { } public Alignment getAlignment ( String name ) { } public int getColumnIndentationLevel ( ) { } public final int getCommentIndex ( int position ) { } private int getCommentIndex ( int start , int position ) { } private IRegion getCoveringAdaptedRegion ( int offset , int end ) { } private int getCurrentCommentIndentation ( int start ) { } int getCurrentIndentation ( char [ ] whitespaces , int offset ) { } int getCurrentIndentation ( int start ) { } public String getEmptyLines ( int linesNumber ) { } private int getIndexOfAdaptedRegionAt ( int offset ) { } public OptimizedReplaceEdit getLastEdit ( ) { } public final int getLineEnd ( int lineNumber ) { } Alignment getMemberAlignment ( ) { } public String getNewLine ( ) { } public int getNextIndentationLevel ( int someColumn ) { } private String getPreserveEmptyLines ( int count ) { } private IRegion getAdaptedRegionAt ( int offset ) { } public TextEdit getRootEdit ( ) { } public void handleLineTooLong ( ) { } private boolean hasNLSTag ( int sourceStart ) { } private boolean includesBlockComments ( ) { } private boolean includesJavadocComments ( ) { } private boolean includesLineComments ( ) { } boolean includesComments ( ) { } public void indent ( ) { } private void initializeScanner ( long sourceLevel , DefaultCodeFormatterOptions preferences ) { } private void initFormatterCommentParser ( ) { } private boolean isOnFirstColumn ( int start ) { } private boolean isValidEdit ( OptimizedReplaceEdit edit ) { } private void preserveEmptyLines ( int count , int insertPosition ) { } private void print ( int length , boolean considerSpaceIfAny ) { } private void printBlockComment ( boolean isJavadoc ) { } private boolean printBlockComment ( int currentTokenStartPosition , int currentTokenEndPosition ) { } private void printBlockCommentHeaderLine ( StringBuffer buffer ) { } public void printEndOfCompilationUnit ( ) { } private void printCodeSnippet ( int startPosition , int endPosition ) { } void printComment ( ) { } void printComment ( int kind , int trailing ) { } void printComment ( int kind , String source , int start , int end , int level ) { } private void printLineComment ( ) { int currentTokenStartPosition = this . scanner . getCurrentTokenStartPosition ( ) ; int currentTokenEndPosition = ( this . scanner . getCurrentTokenEndPosition ( ) ) + 1 ; boolean includesLineComments = includesLineComments ( ) ; boolean isNlsTag = false ; if ( ( CharOperation . indexOf ( Scanner . TAG_PREFIX , this . scanner . source , true , currentTokenStartPosition , currentTokenEndPosition ) ) != ( - 1 ) ) { this . nlsTagCounter = 0 ; isNlsTag = true ; } this . scanner . resetTo ( currentTokenStartPosition , ( currentTokenEndPosition - 1 ) ) ; int currentCharacter ; int start = currentTokenStartPosition ; int nextCharacterStart = currentTokenStartPosition ; int commentIndentationLevel ; boolean onFirstColumn = isOnFirstColumn ( start ) ; if ( ( this . indentationLevel ) == 0 ) { commentIndentationLevel = ( this . column ) - 1 ; } else { <START_BUG> if ( onFirstColumn && ( ( ! ( this . formatter . preferences . comment_format_line_comment_starting_on_first_column ) ) || ( this . formatter . preferences . never_indent_line_comments_on_first_column ) ) ) { <END_BUG> commentIndentationLevel = ( this . column ) - 1 ; } else { if ( this . lastLineComment . contiguous ) { int currentCommentIndentation = getCurrentIndentation ( this . lastLineComment . leadingSpaces , 0 ) ; int lastCommentIndentation = this . lastLineComment . currentIndentation ; if ( ( this . tabLength ) > 0 ) { if ( ( currentCommentIndentation % ( this . tabLength ) ) == 0 ) { lastCommentIndentation = ( lastCommentIndentation // ( this . tabLength ) ) * ( this . tabLength ) ; } else { currentCommentIndentation = ( ( currentCommentIndentation // ( this . tabLength ) ) + 1 ) * ( this . tabLength ) ; } } if ( ( currentCommentIndentation >= lastCommentIndentation ) && ( ( this . lastLineComment . indentation ) != ( this . indentationLevel ) ) ) { int currentIndentationLevel = this . indentationLevel ; this . indentationLevel = this . lastLineComment . indentation ; printIndentationIfNecessary ( ) ; this . indentationLevel = currentIndentationLevel ; commentIndentationLevel = this . lastLineComment . indentation ; } else { printIndentationIfNecessary ( ) ; commentIndentationLevel = ( this . column ) - 1 ; } } else { if ( ( ( ( ( this . currentAlignment ) != null ) && ( this . currentAlignment . name . equals ( "array_initializer" ) ) ) && ( ( this . indentationLevel ) < ( this . currentAlignment . breakIndentationLevel ) ) ) && ( ( this . lastLineComment . lines ) > 0 ) ) { int currentIndentationLevel = this . indentationLevel ; this . indentationLevel = this . currentAlignment . breakIndentationLevel ; printIndentationIfNecessary ( ) ; this . indentationLevel = currentIndentationLevel ; commentIndentationLevel = this . currentAlignment . breakIndentationLevel ; } else { printIndentationIfNecessary ( ) ; commentIndentationLevel = ( this . column ) - 1 ; } } } }

Fix:
if ( onFirstColumn && ( ( includesLineComments && ( ! ( this . formatter . preferences . comment_format_line_comment_starting_on_first_column ) ) ) || ( this . formatter . preferences . never_indent_line_comments_on_first_column ) ) ) {