Buggy code:
JPanel colorBox = new JPanel ( ) ; JTextField [ ] info = new JTextField [ ] { new JTextField ( 10 ) , new JTextField ( 10 ) , new JTextField ( 10 ) } ; JSlider sldBrushSize = new JSlider ( JSlider . HORIZONTAL , BRUSH_SIZE_MIN , BRUSH_SIZE_MAX , BRUSH_SIZE_INV ) ; JButton random = new JButton ( "Random" ) ; JButton eraseBox = new JButton ( "Eraser" ) ; JButton backGround = new JButton ( "BG<seq2seq4repair_space>Color" ) ; JButton save = new JButton ( "Save" ) ; JButton open = new JButton ( "Open" ) ; JButton chooseColor = new JButton ( "Color" ) ; JButton connector = new JButton ( "Connect" ) ; String [ ] brushShape = new String [ ] { "Square" , "Circle" , "Pen" , "Line" } ; JComboBox < String > shape = new JComboBox < String > ( brushShape ) ; private int brushMode = 0 ; String [ ] type = new String [ ] { "Clear<seq2seq4repair_space>Forground" , "Clear<seq2seq4repair_space>All" } ; JComboBox < String > clear = new JComboBox < String > ( type ) ; public JFileChooser fileChooser = new JFileChooser ( ) ; private boolean clearMode = true ; private boolean eraseMode = false ; private int brushSize = BRUSH_SIZE_MIN ; private Color bgColor = Color . WHITE ; private Color current = Color . BLACK ; private Color bgGUI = new Color ( 198 , 255 , 125 ) ; private Color buttonColor = new Color ( 195 , 252 , 219 ) ; private File loadedImage = null ; private String username = "" ; private String password = "" ; private int group = - 1 ; Connection cnn = null ; PreparedStatement pStmt = null ; Statement stmt = null ; ResultSet res = null ; ResultSetMetaData meta = null ; String url = "jdbc:oracle:thin:@delphi.cs.csubak.edu:1521:dbs01" ; Socket paintSocket = null ; ObjectOutputStream out = null ; ObjectInputStream in = null ; private final int PORT = 8704 ; private final String HOST = "localhost" ; private boolean connected = false ; public static void main ( String [ ] args ) { } public void init ( ) { } private void initSliders ( ) { } public void connect ( int group ) { if ( connected ) return ; this . group = group ; try { try { Class . forName ( "oracle.jdbc.driver.OracleDriver" ) ; } catch ( ClassNotFoundException ee ) { ee . printStackTrace ( ) ; System . exit ( ( - 1 ) ) ; } cnn = DriverManager . getConnection ( url , "cs342" , "c3m4p2s" ) ; cnn . setAutoCommit ( false ) ; } catch ( SQLException e ) { e . printStackTrace ( ) ; System . exit ( ( - 1 ) ) ; } try { if ( ( stmt ) == null ) stmt = cnn . createStatement ( ResultSet . TYPE_SCROLL_INSENSITIVE , ResultSet . CONCUR_UPDATABLE ) ; } catch ( SQLException e ) { e . printStackTrace ( ) ; } try { String query = ( "SELECT<seq2seq4repair_space>*<seq2seq4repair_space>FROM<seq2seq4repair_space>SDUNN_SROCHA_USERS<seq2seq4repair_space>WHERE<seq2seq4repair_space>UserName<seq2seq4repair_space>=<seq2seq4repair_space>'" + ( username ) ) + "'" ; System . out . println ( query ) ; res = stmt . executeQuery ( query ) ; meta = res . getMetaData ( ) ; String row ; int numColumns = meta . getColumnCount ( ) ; while ( res . next ( ) ) { for ( int i = 1 ; i <= numColumns ; i ++ ) { if ( meta . getColumnLabel ( i ) . equals ( "PASSWORD" ) ) { if ( ! ( res . getString ( i ) . equals ( password ) ) ) { username = "" ; JOptionPane . showMessageDialog ( null , "Incorrect<seq2seq4repair_space>Username<seq2seq4repair_space>or<seq2seq4repair_space>Password!" ) ; } else { try { paintSocket = new Socket ( HOST , PORT ) ; out = new ObjectOutputStream ( paintSocket . getOutputStream ( ) ) ; in = new ObjectInputStream ( paintSocket . getInputStream ( ) ) ; new Thread ( new BrushStrokeReciever ( in , drawPad , this , chat , chat . box ) ) . start ( ) ; Message msg = new Message ( ) ; msg . set ( username , "Logged<seq2seq4repair_space>in..." , null ) ; <START_BUG> Thread send = new BrushStrokeSender ( out , new BrushStroke ( 0 , 0 , 0 , 0 , ( - 1 ) , 0 , null , username , msg , group ) ) ; <END_BUG> send . start ( ) ; try { send . join ( ) ; } catch ( InterruptedException f ) { } setConnected ( true ) ; } catch ( IOException er ) { er . printStackTrace ( ) ; } shape . setSelectedIndex ( 0 ) ; connector . setBackground ( Color . GREEN ) ; connector . setText ( "Connected..." ) ; } } } } } catch ( SQLException e1 ) { e1 . printStackTrace ( ) ; } } private Color generateColor ( ) { } @ Override public void actionPerformed ( ActionEvent e ) { } public Color getColor ( boolean erase ) { } public int getBrushSize ( ) { } public void setBrushSize ( int size ) { } public int getBrushShape ( ) { } public void setBrushShape ( int bt ) { } public boolean isEraseMode ( ) { } public Color getBgColor ( ) { } public void setBgColor ( Color bg ) { } public boolean getClearMode ( ) { } public boolean getConnected ( ) { } public void setConnected ( boolean c ) { } public ObjectOutputStream getOutput ( ) { } public ObjectInputStream getInput ( ) { } public String getUser ( ) { } public void setUser ( String user ) { } public int getGroup ( ) { } public void setGroup ( int group ) { } No newline ; at end ;

Fix:
Thread send = new BrushStrokeSender ( out , new BrushStroke ( 0 , 0 , 0 , 0 , ( - 1 ) , 0 , null , username , msg , group , null ) ) ;