Buggy code:
DOMType ( char [ ] document , int [ ] sourceRange , String name , int [ ] nameRange , int [ ] commentRange , int flags , int [ ] modifierRange , int [ ] typeRange , int [ ] superclassRange , int [ ] extendsRange , String [ ] implementsList , int [ ] implementsRange , int [ ] implementsKeywordRange , int [ ] openBodyRange , int [ ] closeBodyRange , boolean isClass ) { } DOMType ( char [ ] document , int [ ] sourceRange , String name , int [ ] nameRange , int flags , String [ ] implementsList , boolean isClass ) { } public void addSuperInterface ( String name ) throws IllegalArgumentException { } protected void appendMemberBodyContents ( CharArrayBuffer buffer ) { } protected void appendMemberDeclarationContents ( CharArrayBuffer buffer ) { } protected void appendSimpleContents ( CharArrayBuffer buffer ) { } public boolean canHaveChildren ( ) { } int getCloseBodyPosition ( ) { } protected DOMNode getDetailedNode ( ) { } public int getInsertionPosition ( ) { } public IJavaElement getJavaElement ( IJavaElement parent ) throws IllegalArgumentException { } protected int getMemberDeclarationStartPosition ( ) { } public int getNodeType ( ) { } int getOpenBodyEnd ( ) { } public String getSuperclass ( ) { } public String [ ] getSuperInterfaces ( ) { } public boolean isAllowableChild ( IDOMNode node ) { } public boolean isClass ( ) { } protected DOMNode newDOMNode ( ) { } void normalize ( ILineStartFinder finder ) { int openBodyEnd ; int openBodyStart ; int closeBodyStart ; int closeBodyEnd ; DOMNode first = ( ( DOMNode ) ( getFirstChild ( ) ) ) ; DOMNode lastNode = null ; Scanner scanner = new Scanner ( ) ; scanner . setSource ( fDocument ) ; scanner . resetTo ( ( ( fNameRange [ 1 ] ) + 1 ) , fDocument . length ) ; try { int currentToken = scanner . getNextToken ( ) ; while ( ( currentToken != ( TerminalTokens . TokenNameLBRACE ) ) && ( currentToken != ( TerminalTokens . TokenNameEOF ) ) ) { currentToken = scanner . getNextToken ( ) ; } if ( currentToken == ( TerminalTokens . TokenNameLBRACE ) ) { openBodyEnd = ( scanner . currentPosition ) - 1 ; openBodyStart = scanner . startPosition ; } else { openBodyEnd = fDocument . length ; openBodyStart = fDocument . length ; } } catch ( InvalidInputException e ) { openBodyEnd = fDocument . length ; openBodyStart = fDocument . length ; } if ( first != null ) { int lineStart = finder . getLineStart ( first . getStartPosition ( ) ) ; if ( lineStart > openBodyEnd ) { openBodyEnd = lineStart - 1 ; } else { openBodyEnd = ( first . getStartPosition ( ) ) - 1 ; } lastNode = ( ( DOMNode ) ( first . getNextNode ( ) ) ) ; if ( lastNode == null ) { lastNode = first ; } else { while ( ( lastNode . getNextNode ( ) ) != null ) { lastNode = ( ( DOMNode ) ( lastNode . getNextNode ( ) ) ) ; } } scanner . setSource ( fDocument ) ; scanner . resetTo ( ( ( lastNode . getEndPosition ( ) ) + 1 ) , fDocument . length ) ; try { int currentToken = scanner . getNextToken ( ) ; while ( ( currentToken != ( TerminalTokens . TokenNameRBRACE ) ) && ( currentToken != ( TerminalTokens . TokenNameEOF ) ) ) { currentToken = scanner . getNextToken ( ) ; } if ( currentToken == ( TerminalTokens . TokenNameRBRACE ) ) { closeBodyStart = scanner . startPosition ; closeBodyEnd = ( scanner . currentPosition ) - 1 ; } else { closeBodyStart = fDocument . length ; closeBodyEnd = fDocument . length ; } } catch ( InvalidInputException e ) { closeBodyStart = fDocument . length ; closeBodyEnd = fDocument . length ; } } else { scanner . resetTo ( openBodyEnd , fDocument . length ) ; try { int currentToken = scanner . getNextToken ( ) ; while ( ( currentToken != ( TerminalTokens . TokenNameRBRACE ) ) && ( currentToken != ( TerminalTokens . TokenNameEOF ) ) ) { currentToken = scanner . getNextToken ( ) ; } if ( currentToken == ( TerminalTokens . TokenNameRBRACE ) ) { closeBodyStart = scanner . startPosition ; closeBodyEnd = ( scanner . currentPosition ) - 1 ; } else { closeBodyStart = fDocument . length ; closeBodyEnd = fDocument . length ; } } catch ( InvalidInputException e ) { closeBodyStart = fDocument . length ; closeBodyEnd = fDocument . length ; } openBodyEnd = closeBodyEnd - 1 ; } setOpenBodyRangeEnd ( openBodyEnd ) ; setOpenBodyRangeStart ( openBodyStart ) ; setCloseBodyRangeStart ( closeBodyStart ) ; setCloseBodyRangeEnd ( closeBodyEnd ) ; fInsertionPosition = finder . getLineStart ( closeBodyStart ) ; if ( ( lastNode != null ) && ( ( fInsertionPosition ) < ( lastNode . getEndPosition ( ) ) ) ) { fInsertionPosition = getCloseBodyPosition ( ) ; } <START_BUG> if ( ( fInsertionPosition ) < openBodyEnd ) { <END_BUG> fInsertionPosition = getCloseBodyPosition ( ) ; } super . normalize ( finder ) ; } void normalizeEndPosition ( ILineStartFinder finder , DOMNode next ) { } protected void offset ( int offset ) { } public void setClass ( boolean b ) { } void setCloseBodyRangeEnd ( int end ) { } void setCloseBodyRangeStart ( int start ) { } public void setName ( String name ) throws IllegalArgumentException { } void setOpenBodyRangeEnd ( int end ) { } void setOpenBodyRangeStart ( int start ) { } public void setSuperclass ( String superclassName ) { } public void setSuperInterfaces ( String [ ] names ) { } void setTypeKeyword ( String keyword ) { } protected void shareContents ( DOMNode node ) { } public String toString ( ) { } }

Fix:
if ( ( fInsertionPosition ) <= openBodyEnd ) {