Buggy code:
} @ Override public void insertUpdate ( DocumentEvent e ) { checkFields = Util . getInstance ( ) . fieldsCheck ( textFieldResultSILowTemp , "labelSIMin" ) ; } @ Override public void changedUpdate ( DocumentEvent e ) { checkFields = Util . getInstance ( ) . fieldsCheck ( textFieldCandTemp , "labelSIMin" ) ; } } ) ; contentPanel . add ( textFieldResultSILowTemp , new GridBagConstraints ( 14 , ( 14 + ( Util . getInstance ( ) . row ) ) , 1 , 1 , 0.0 , 0.0 , GridBagConstraints . CENTER , GridBagConstraints . BOTH , new Insets ( 0 , 0 , 5 , 5 ) , 0 , 0 ) ) ; WindowRelevantFactors . textFieldResultSILow . add ( textFieldResultSILowTemp ) ; textFieldResultSIHighTemp . setMinimumSize ( getPreferredSize ( ) ) ; textFieldResultSIHighTemp . setColumns ( 8 ) ; textFieldResultSIHighTemp . setBorder ( BorderFactory . createMatteBorder ( 1 , 1 , 1 , 1 , Color . BLACK ) ) ; textFieldResultSIHighTemp . getDocument ( ) . addDocumentListener ( new DocumentListener ( ) { @ Override public void removeUpdate ( DocumentEvent e ) { if ( ! ( comboBoxRoleTemp . getSelectedItem ( ) . equals ( "constant" ) ) ) { checkFields = Util . getInstance ( ) . fieldsCheck ( textFieldResultSIHighTemp , "labelSIMax" ) ; } } @ Override public void insertUpdate ( DocumentEvent e ) { if ( ! ( comboBoxRoleTemp . getSelectedItem ( ) . equals ( "constant" ) ) ) { checkFields = Util . getInstance ( ) . fieldsCheck ( textFieldResultSIHighTemp , "labelSIMax" ) ; } } @ Override public void changedUpdate ( DocumentEvent e ) { if ( ! ( comboBoxRoleTemp . getSelectedItem ( ) . equals ( "constant" ) ) ) { checkFields = Util . getInstance ( ) . fieldsCheck ( textFieldResultSIHighTemp , "labelSIMax" ) ; } } } ) ; contentPanel . add ( textFieldResultSIHighTemp , new GridBagConstraints ( 15 , ( 14 + ( Util . getInstance ( ) . row ) ) , 1 , 1 , 0.0 , 0.0 , GridBagConstraints . CENTER , GridBagConstraints . BOTH , new Insets ( 0 , 0 , 5 , 5 ) , 0 , 0 ) ) ; WindowRelevantFactors . textFieldResultSIHigh . add ( textFieldResultSIHighTemp ) ; JButton buttonUpdateCSVTemp = new JButton ( Util . getInstance ( ) . getStringFromXML ( "buttonUpdateCSV" ) ) ; buttonUpdateCSVTemp . setToolTipText ( Util . getInstance ( ) . getStringFromXML ( "textOverUpdateCSV" ) ) ; buttonUpdateCSVTemp . setFocusPainted ( false ) ; buttonUpdateCSVTemp . setEnabled ( false ) ; buttonUpdateCSVTemp . setMinimumSize ( getPreferredSize ( ) ) ; buttonUpdateCSVTemp . addActionListener ( new ActionListener ( ) { public void actionPerformed ( ActionEvent e ) { if ( ( e . getSource ( ) ) == buttonUpdateCSVTemp ) { System . out . println ( "UpdateCSV:<seq2seq4repair_space>Start" ) ; try { double gradient = 0 ; double offset = 0 ; if ( ( comboBoxRoleTemp . getSelectedItem ( ) ) == "constant" ) { gradient = ( Double . parseDouble ( textFieldResultSILowTemp . getText ( ) ) ) // ( Double . parseDouble ( textFieldLowTemp . getText ( ) ) ) ; System . out . println ( ( "gradient:<seq2seq4repair_space>" + gradient ) ) ; offset = 0 ; System . out . println ( ( "offset:<seq2seq4repair_space>" + offset ) ) ; } else { gradient = ( ( Double . parseDouble ( textFieldResultSIHighTemp . getText ( ) ) ) - ( Double . parseDouble ( textFieldResultSILowTemp . getText ( ) ) ) ) // ( ( Double . parseDouble ( textFieldHighTemp . getText ( ) ) ) - ( Double . parseDouble ( textFieldLowTemp . getText ( ) ) ) ) ; System . out . println ( ( "gradient:<seq2seq4repair_space>" + gradient ) ) ; offset = ( ( Double . parseDouble ( textFieldResultSILowTemp . getText ( ) ) ) - ( Double . parseDouble ( textFieldLowTemp . getText ( ) ) ) ) * gradient ; System . out . println ( ( "offset:<seq2seq4repair_space>" + offset ) ) ; } RawUnits tempRaw = new RawUnits ( textFieldDimensionTemp . getText ( ) , textFieldUnitTemp . getText ( ) , Integer . parseInt ( textFieldMTemp . getText ( ) ) , Integer . parseInt ( textFieldKTemp . getText ( ) ) , Integer . parseInt ( textFieldSTemp . getText ( ) ) , Integer . parseInt ( textFieldKelTemp . getText ( ) ) , Integer . parseInt ( textFieldMolTemp . getText ( ) ) , Integer . parseInt ( textFieldAmpTemp . getText ( ) ) , Integer . parseInt ( textFieldCandTemp . getText ( ) ) , offset , gradient ) ; Util . getInstance ( ) . unitsArray . add ( tempRaw ) ; <START_BUG> Util . getInstance ( ) . writeCSV ( Util . getInstance ( ) . USER_CSV_FILENAME ) ; <END_BUG> } catch ( Exception ex ) { ex . printStackTrace ( ) ; } System . out . println ( "UpdateCSV:<seq2seq4repair_space>done." ) ; textFieldDimensionTemp . setText ( "" ) ; textFieldUnitTemp . setText ( "" ) ; textFieldLowTemp . setText ( ( "" + 0 ) ) ; textFieldHighTemp . setText ( ( "" + 0 ) ) ; textFieldMTemp . setText ( ( "" + 0 ) ) ; textFieldKTemp . setText ( ( "" + 0 ) ) ; textFieldSTemp . setText ( ( "" + 0 ) ) ; textFieldKelTemp . setText ( ( "" + 0 ) ) ; textFieldMolTemp . setText ( ( "" + 0 ) ) ; textFieldAmpTemp . setText ( ( "" + 0 ) ) ; textFieldCandTemp . setText ( ( "" + 0 ) ) ; textFieldResultSILowTemp . setText ( ( "" + 0 ) ) ; textFieldResultSIHighTemp . setText ( ( "" + 0 ) ) ; buttonUpdateCSVTemp . setEnabled ( false ) ; } } } ) ;

Fix:
Util . getInstance ( ) . writeCSV ( Util . getInstance ( ) . USER_CSV_FILENAME , tempRaw ) ;