Buggy code:
public class GetProdFromFileTask extends Task < Vector < Product > > { File f ; String supplier ; Vector < Product > products ; public GetProdFromFileTask ( File f , String supplier ) { } @ Override protected Vector < Product > call ( ) throws Exception { products = new Vector < Product > ( ) ; FileHelper fh = new FileHelper ( ) ; Vector < SupplierCol > suppliers = fh . getSuppliersCol ( ) ; SupplierCol sup = null ; for ( SupplierCol s : suppliers ) { if ( s . getName ( ) . equals ( supplier ) ) sup = s ; } if ( sup != null ) { Vector < ParsedRow > rows = null ; CategoriesSet catSet = fh . getCategories ( ) ; String supAvail = sup . getIsAvailable ( ) ; Vector < String > keys = sup . getColVector ( ) ; if ( ! ( sup . isXml ( ) ) ) { rows = CsvParser . fileToVect ( f , sup . getSeparator ( ) ) ; } else { XmlParser xmlp = new XmlParser ( ) ; String sep = sup . getSeparator ( ) ; rows = xmlp . getFileToVect ( f , sep , keys ) ; } if ( ( rows . size ( ) ) >= 1 ) for ( int i = 0 ; i < ( rows . size ( ) ) ; i ++ ) { ParsedRow r = rows . get ( i ) ; Product prod = new Product ( ) ; updateProgress ( i , rows . size ( ) ) ; updateMessage ( ( ( ( "Reading<seq2seq4repair_space>product<seq2seq4repair_space>" + i ) + "<seq2seq4repair_space>from<seq2seq4repair_space>" ) + ( rows . size ( ) ) ) ) ; if ( ! ( supAvail . contains ( ">=" ) ) ) { if ( ( ( ( sup . getAvailability ( ) ) != null ) && ( ( r . getElement ( sup . getAvailability ( ) ) ) != null ) ) && ( r . getElement ( sup . getAvailability ( ) ) . equals ( supAvail ) ) ) { prod . setQuantity ( 28 ) ; } else { prod . setQuantity ( 0 ) ; } } else { String rest = supAvail . split ( ">=" ) [ 1 ] . trim ( ) ; try { Integer threshold = Integer . parseInt ( rest ) ; <START_BUG> Integer rowQuantity = Integer . parseInt ( r . getElement ( sup . getAvailability ( ) ) ) ; <END_BUG> if ( rowQuantity >= threshold ) { prod . setQuantity ( 28 ) ; } else { prod . setQuantity ( 0 ) ; } } catch ( Exception e ) { e . printStackTrace ( ) ; } } prod . setPic ( r . getElement ( sup . getImg ( ) . trim ( ) ) ) ; prod . setAddPic ( r . getElement ( sup . getAddImg ( ) . trim ( ) ) ) ; String foreignCat = r . getElement ( sup . getCategory ( ) ) ; String nativeCat = catSet . getContainingCat ( foreignCat ) ; if ( nativeCat != null ) { prod . setCategory ( nativeCat ) ; prod . setDescription ( r . getElement ( sup . getDescription ( ) ) ) ; if ( r . getElement ( sup . getEan ( ) ) . equals ( "" ) ) { System . out . println ( "GetprodfromFiletask.call::<seq2seq4repair_space>no<seq2seq4repair_space>ean<seq2seq4repair_space>found!!" ) ; } prod . setEan ( r . getElement ( sup . getEan ( ) ) ) ; prod . setNumber ( r . getElement ( sup . getItemNumber ( ) ) ) ; prod . setRPrice ( r . getElement ( sup . getRetailPrice ( ) ) ) ; prod . setSupNum ( r . getElement ( sup . getSupItemNumber ( ) ) ) ; prod . setModel ( ( ( sup . getModelPrefix ( ) . trim ( ) ) + ( r . getElement ( sup . getItemNumber ( ) ) . trim ( ) ) ) ) ; if ( ( ( ( sup . getMpn ( ) ) != null ) && ( ( sup . getManuf ( ) ) != null ) ) && ( ( sup . getItemName ( ) ) != null ) ) { prod . setMpn ( r . getElement ( sup . getMpn ( ) ) ) ; prod . setManufact ( r . getElement ( sup . getManuf ( ) ) ) ; prod . setpName ( r . getElement ( sup . getItemName ( ) ) ) ; } prod . setDoublePrice ( ( - 1 ) ) ; products . add ( prod ) ; } else { prod . setCategory ( foreignCat ) ; prod . setDescription ( r . getElement ( sup . getDescription ( ) ) ) ; prod . setEan ( r . getElement ( sup . getEan ( ) ) ) ; prod . setNumber ( r . getElement ( sup . getItemNumber ( ) ) ) ; prod . setRPrice ( r . getElement ( sup . getRetailPrice ( ) ) ) ; prod . setSupNum ( r . getElement ( sup . getSupItemNumber ( ) ) ) ; } } } return products ; } }

Fix:
Double rowQuantity = Double . parseDouble ( r . getElement ( sup . getAvailability ( ) ) ) ;