Buggy code:
public class Text extends Scrollable { int textLimit = Text . LIMIT ; int tabs = 8 ; char echoCharacter ; boolean doubleClick ; boolean receivingFocus ; String hiddenText ; String message ; NSRange selectionRange ; public static final int LIMIT ; public static final String DELIMITER ; static final char PASSWORD = '•' ; public Text ( Composite parent , int style ) { } public void addModifyListener ( ModifyListener listener ) { } public void addSelectionListener ( SelectionListener listener ) { } public void addVerifyListener ( VerifyListener listener ) { } public void append ( String string ) { } boolean becomeFirstResponder ( int id , int sel ) { } static int checkStyle ( int style ) { } public void clearSelection ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } public void copy ( ) { } void createHandle ( ) { } void createWidget ( ) { } public void cut ( ) { } Color defaultBackground ( ) { } Color defaultForeground ( ) { } boolean dragDetect ( int x , int y , boolean filter , boolean [ ] consume ) { } public int getCaretLineNumber ( ) { } public Point getCaretLocation ( ) { } public int getCaretPosition ( ) { } public int getCharCount ( ) { } public boolean getDoubleClickEnabled ( ) { } public char getEchoChar ( ) { } public boolean getEditable ( ) { } public int getLineCount ( ) { checkWidget ( ) ; if ( ( ( style ) & ( SWT . SINGLE ) ) != 0 ) return 1 ; <START_BUG> return ( ( ( NSTextView ) ( view ) ) . textStorage ( ) . paragraphs ( ) . count ( ) ) + 1 ; <END_BUG> } public String getLineDelimiter ( ) { } public int getLineHeight ( ) { } public int getOrientation ( ) { } public String getMessage ( ) { } int getPosition ( int x , int y ) { } int getPosition ( Point point ) { } public Point getSelection ( ) { } public int getSelectionCount ( ) { } public String getSelectionText ( ) { } public int getTabs ( ) { } public String getText ( ) { } public String getText ( int start , int end ) { } public int getTextLimit ( ) { } public int getTopIndex ( ) { } public int getTopPixel ( ) { } public void insert ( String string ) { } public void paste ( ) { } void releaseWidget ( ) { } public void removeModifyListener ( ModifyListener listener ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void removeVerifyListener ( VerifyListener listener ) { } public void selectAll ( ) { } void setBackground ( float [ ] color ) { } public void setDoubleClickEnabled ( boolean doubleClick ) { } public void setEchoChar ( char echo ) { } public void setEditable ( boolean editable ) { } void setFont ( NSFont font ) { } void setForeground ( float [ ] color ) { } public void setOrientation ( int orientation ) { } public void setMessage ( String message ) { } public void setSelection ( int start ) { } public void setSelection ( int start , int end ) { } public void setSelection ( Point selection ) { } public void setTabs ( int tabs ) { } public void setText ( String string ) { } public void setTextLimit ( int limit ) { } public void setTopIndex ( int index ) { } public void showSelection ( ) { } void textViewDidChangeSelection ( int aNotification ) { } NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange ( int aTextView , int oldSelectedCharRange , int newSelectedCharRange ) { } int traversalCode ( int key , NSEvent theEvent ) { } String verifyText ( String string , int start , int end , Event keyEvent ) { } }

Fix:
return ( ( NSTextView ) ( view ) ) . textStorage ( ) . paragraphs ( ) . count ( ) ;