Buggy code:
public class MessagesView extends ViewPart { public static final String VIEW_ID = "org.eclipse.ecf.presence.ui.MessagesView" ; private static final int [ ] WEIGHTS = new int [ ] { 75 , 25 } ; private CTabFolder tabFolder ; private Color redColor ; private Color blueColor ; private Image image ; private FormToolkit toolkit ; private List switchActions ; private List menuManagers ; private Map tabs ; public MessagesView ( ) { } public void createPartControl ( Composite parent ) { } public void dispose ( ) { } private MessagesView . ChatTab getTab ( IChatMessageSender messageSender , ITypingMessageSender typingSender , ID userID ) { } public void displayTypingNotification ( ID fromID ) { } public synchronized void openTab ( IChatMessageSender messageSender , ITypingMessageSender typingSender , ID userID ) { } synchronized void selectTab ( IChatMessageSender messageSender , ITypingMessageSender typingSender , ID userID ) { } public synchronized void showMessage ( ID userID , ID fromID , String body ) { } private synchronized void removeTab ( MessagesView . ChatTab tab ) { } public void setFocus ( ) { } private class ChatTab { private CTabItem item ; private Form form ; private StyledText chatText ; private Text inputText ; private IMenuManager manager ; private ActionContributionItem switchItem ; private IChatMessageSender icms ; private ITypingMessageSender itms ; private boolean sendTyping = false ; private ID remoteID ; private ChatTab ( IChatMessageSender icms , ITypingMessageSender itms , ID userID ) { } private void addListeners ( ) { } private void append ( ID fromID , String body ) { } private void constructWidgets ( ) { item = new CTabItem ( tabFolder , SWT . NONE ) ; form = toolkit . createForm ( tabFolder ) ; form . setImage ( image ) ; toolkit . decorateFormHeading ( form ) ; form . setText ( remoteID . getName ( ) ) ; form . getBody ( ) . setLayout ( new GridLayout ( ) ) ; SashForm sash = new SashForm ( form . getBody ( ) , SWT . VERTICAL ) ; sash . setLayoutData ( new org . eclipse . swt . layout . GridData ( SWT . FILL , SWT . FILL , true , true ) ) ; Composite client = toolkit . createComposite ( sash ) ; client . setLayout ( new FillLayout ( ) ) ; <START_BUG> chatText = new StyledText ( client , ( ( ( SWT . BORDER ) | ( SWT . MULTI ) ) | ( SWT . V_SCROLL ) ) ) ; <END_BUG> client = toolkit . createComposite ( sash ) ; client . setLayoutData ( new org . eclipse . swt . layout . GridData ( SWT . FILL , SWT . FILL , true , true ) ) ; client . setLayout ( new FillLayout ( ) ) ; inputText = new Text ( client , ( ( ( SWT . MULTI ) | ( SWT . BORDER ) ) | ( SWT . V_SCROLL ) ) ) ; sash . setWeights ( MessagesView . WEIGHTS ) ; IAction action = new Action ( ( ( remoteID . getName ( ) ) + '\t' ) , IAction . AS_RADIO_BUTTON ) { public void run ( ) { tabFolder . setSelection ( item ) ; } } ; switchItem = new ActionContributionItem ( action ) ; manager = form . getMenuManager ( ) ; switchActions . add ( switchItem ) ; menuManagers . add ( manager ) ; for ( int i = ( menuManagers . size ( ) ) - 1 ; i > ( - 1 ) ; i -- ) { IMenuManager manager = ( ( IMenuManager ) ( menuManagers . get ( i ) ) ) ; manager . removeAll ( ) ; for ( int j = 0 ; j < ( switchActions . size ( ) ) ; j ++ ) { IAction switchAction = ( ( ActionContributionItem ) ( switchActions . get ( j ) ) ) . getAction ( ) ; switchAction . setChecked ( false ) ; manager . add ( new ActionContributionItem ( switchAction ) ) ; } manager . update ( ) ; } action . setChecked ( true ) ; action = new Action ( ) { public void run ( ) { item . dispose ( ) ; removeTab ( MessagesView . ChatTab . this ) ; switchActions . remove ( switchItem ) ; menuManagers . remove ( manager ) ; for ( int i = 0 ; i < ( menuManagers . size ( ) ) ; i ++ ) { IMenuManager manager = ( ( IMenuManager ) ( menuManagers . get ( i ) ) ) ; manager . remove ( switchItem ) ; manager . update ( true ) ; } } } ; action . setImageDescriptor ( PlatformUI . getWorkbench ( ) . getSharedImages ( ) . getImageDescriptor ( IMG_TOOL_DELETE ) ) ; form . getToolBarManager ( ) . add ( action ) ; form . getToolBarManager ( ) . update ( true ) ; item . setControl ( form ) ; item . setText ( remoteID . getName ( ) ) ; toolkit . paintBordersFor ( form . getBody ( ) ) ; } private CTabItem getCTab ( ) { } private void showIsTyping ( ) { } } }

Fix:
chatText = new StyledText ( client , ( ( ( ( SWT . BORDER ) | ( SWT . MULTI ) ) | ( SWT . V_SCROLL ) ) | ( SWT . READ_ONLY ) ) ) ;