Buggy code:
public class ChatRoomView extends ViewPart implements IInvitationListener , IMessageListener , IParticipantListener { private static final int RATIO_WRITE_PANE = 12 ; private static final int RATIO_READ_PANE = 88 ; private static final int RATIO_READ_WRITE_PANE = 85 ; private static final int RATIO_PRESENCE_PANE = 15 ; protected static final String DEFAULT_ME_COLOR = "0,255,0" ; protected static final String DEFAULT_OTHER_COLOR = "0,0,0" ; protected static final String DEFAULT_SYSTEM_COLOR = "0,0,255" ; protected static final String DEFAULT_DATE_COLOR = "0,0,0" ; protected static final String VIEW_PREFIX = "Chat:<seq2seq4repair_space>" ; protected static final String DEFAULT_TIME_FORMAT = "HH:mm:ss" ; protected static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd" ; protected static final int DEFAULT_INPUT_HEIGHT = 25 ; protected static final int DEFAULT_INPUT_SEPARATOR = 5 ; private Composite mainComp = null ; private IRoomInfo roomInfo = null ; private Text writeText = null ; private TextViewer readText = null ; private ListViewer memberViewer = null ; IChatRoomViewCloseListener closeListener = null ; IChatMessageSender messageSender = null ; IChatRoomContainer chatRoomContainer = null ; String viewID = null ; private Color meColor = null ; private Color otherColor = null ; private Color systemColor = null ; private Color dateColor = null ; private IUser localUser = null ; private List otherUsers = Collections . synchronizedList ( new ArrayList ( ) ) ; Action outputClear = null ; Action outputCopy = null ; Action outputPaste = null ; Action outputSelectAll = null ; boolean disposed = false ; private Color colorFromRGBString ( String rgb ) { } public void createPartControl ( Composite parent ) { } protected void setEnabled ( boolean enabled ) { } protected void clearInput ( ) { } protected void handleTextInput ( String text ) { } protected void handleEnter ( ) { } protected void handleKeyPressed ( KeyEvent evt ) { } protected void handleKeyReleased ( KeyEvent evt ) { } public void setFocus ( ) { } public IRoomInfo getRoomInfo ( ) { } public void initialize ( final IChatRoomViewCloseListener parent , final String secondaryID , final IChatRoomContainer container , final IRoomInfo info , final IChatMessageSender sender ) { } public void dispose ( ) { } protected String getMessageString ( ID fromID , String text ) { } public void handleMessage ( final ID fromID , final ID toID , final Type type , final String subject , final String messageBody ) { <START_BUG> Display . getDefault ( ) . syncExec ( new Runnable ( ) { <END_BUG> public void run ( ) { if ( disposed ) return ; appendText ( new ChatLine ( messageBody , new ChatRoomView . Participant ( fromID ) ) ) ; } } ) ; } class Participant implements IUser { private static final long serialVersionUID = 2008114088656711572L ; String name ; ID id ; public Participant ( ID id ) { } public ID getID ( ) { } public String getName ( ) { } public boolean equals ( Object other ) { } public int hashCode ( ) { } public String toString ( ) { } public Map getProperties ( ) { } public Object getAdapter ( Class adapter ) { } } protected String getCurrentDate ( String format ) { } protected String getDateTime ( ) { } protected void addParticipant ( IUser p ) { } protected void removeParticipant ( IUser p ) { } protected void removeAllParticipants ( ) { } public void handlePresence ( final ID fromID , final IPresence presence ) { } public void handleInvitationReceived ( ID roomID , ID from , ID toID , String subject , String body ) { } protected void appendText ( ChatLine text ) { } protected void outputClear ( ) { } protected void outputCopy ( ) { } protected void outputPaste ( ) { } public void handleJoin ( ID user ) { } public void handleLeave ( ID user ) { } protected void outputSelectAll ( ) { } protected void makeActions ( ) { } private void fillContextMenu ( IMenuManager manager ) { } private void hookContextMenu ( ) { } }

Fix:
Display . getDefault ( ) . asyncExec ( new Runnable ( ) {