Buggy code:
public class ViewOrderUI { JFrame frame ; static Connection connection = null ; private JTable table ; public int saleId ; public String statusOrder ; public int productId ; public ViewOrderUI ( ) { } public void setMyOrdersData ( String userId ) { } private void initialize ( ) { frame = new JFrame ( ) ; frame . setBounds ( 100 , 100 , 804 , 465 ) ; frame . setDefaultCloseOperation ( JFrame . DISPOSE_ON_CLOSE ) ; JPanel panel = new JPanel ( ) ; frame . getContentPane ( ) . add ( panel , BorderLayout . CENTER ) ; JScrollPane scrollPane = new JScrollPane ( ) ; JButton button = new JButton ( "Ακύρωση<seq2seq4repair_space>Παραγγελίας" ) ; button . addActionListener ( new ActionListener ( ) { public void actionPerformed ( ActionEvent arg0 ) { try { int x = ( ( int ) ( table . getSelectedRow ( ) ) ) ; if ( x > ( - 1 ) ) { saleId = ( ( int ) ( table . getValueAt ( x , 0 ) ) ) ; statusOrder = ( ( String ) ( table . getValueAt ( x , 12 ) ) ) ; if ( ( statusOrder . equals ( "Áíïé÷ôü" ) ) || ( statusOrder . equals ( "Óå<seq2seq4repair_space>ÅîÝëéîç" ) ) ) { String status = "Áêõñþèçêå" ; <START_BUG> String query = ( "UPDATE<seq2seq4repair_space>sales<seq2seq4repair_space>SET<seq2seq4repair_space>statusOrder='" + status ) + "'<seq2seq4repair_space>where<seq2seq4repair_space>sales.userId=users.userId" ; <END_BUG> PreparedStatement pst = ViewOrderUI . connection . prepareStatement ( query ) ; pst . execute ( ) ; pst . close ( ) ; JOptionPane . showMessageDialog ( null , "Ç<seq2seq4repair_space>áãïñÜ<seq2seq4repair_space>óáò<seq2seq4repair_space>áêõñþèçêå" , "Ðëçñïöïñßá" , JOptionPane . INFORMATION_MESSAGE ) ; } else JOptionPane . showMessageDialog ( null , "Ç<seq2seq4repair_space>ðáñáããåëßá<seq2seq4repair_space>Ý÷åé<seq2seq4repair_space>Þäç<seq2seq4repair_space>åðéâåâáéùèåß." , "ÓöÜëìá" , JOptionPane . ERROR_MESSAGE ) ; } else JOptionPane . showMessageDialog ( null , "Ðáñáêáëþ<seq2seq4repair_space>äéáëÝîôå<seq2seq4repair_space>ìßá<seq2seq4repair_space>ðáñáããåëåßá<seq2seq4repair_space>áðü<seq2seq4repair_space>ôïí<seq2seq4repair_space>ðßíáêá" , "ÓöÜëìá" , JOptionPane . ERROR_MESSAGE ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } } ) ; GroupLayout gl_panel = new GroupLayout ( panel ) ; gl_panel . setHorizontalGroup ( gl_panel . createParallelGroup ( GroupLayout . Alignment . LEADING ) . addGroup ( gl_panel . createSequentialGroup ( ) . addContainerGap ( ) . addGroup ( gl_panel . createParallelGroup ( GroupLayout . Alignment . LEADING ) . addGroup ( gl_panel . createSequentialGroup ( ) . addComponent ( scrollPane , GroupLayout . DEFAULT_SIZE , 768 , Short . MAX_VALUE ) . addContainerGap ( ) ) . addGroup ( GroupLayout . Alignment . TRAILING , gl_panel . createSequentialGroup ( ) . addComponent ( button ) . addGap ( 32 ) ) ) ) ) ; gl_panel . setVerticalGroup ( gl_panel . createParallelGroup ( GroupLayout . Alignment . LEADING ) . addGroup ( gl_panel . createSequentialGroup ( ) . addContainerGap ( ) . addComponent ( scrollPane , GroupLayout . PREFERRED_SIZE , 342 , GroupLayout . PREFERRED_SIZE ) . addGap ( 18 ) . addComponent ( button ) . addContainerGap ( 32 , Short . MAX_VALUE ) ) ) ; table = new JTable ( ) ; scrollPane . setViewportView ( table ) ; panel . setLayout ( gl_panel ) ; } }

Fix:
String query = ( ( ( "UPDATE<seq2seq4repair_space>sales<seq2seq4repair_space>SET<seq2seq4repair_space>statusOrder='" + status ) + "'<seq2seq4repair_space>where<seq2seq4repair_space>sales.saleId='" ) + ( saleId ) ) + "'" ;