Buggy code:
public class RuleBasedDriver { private Properties prop ; private StanfordCoreNLP pipeline ; private static Pattern numberPat ; private static Pattern yearPat ; private HashSet < String > countryList ; private boolean unitsActive ; private static final String countriesFileName = "//mnt//a99//d0//ashishm//workspace//depbased//data//countries_list" ; private UnitExtractor ue = null ; int cumulativeLen ; private final int NUM_PAIRS_MAX = 20 ; public RuleBasedDriver ( boolean unitsActive ) { } public RuleBasedDriver ( UnitExtractor ue , boolean unitsActive ) { } public static void main ( String [ ] args ) throws Exception { } public Graph getDepGraph ( List < Triple < Integer , String , Integer > > deps , CoreMap sentence ) { } public ArrayList < Relation > extractFromMultiRDepString ( List < Triple < Integer , String , Integer > > deps , CoreMap sentence ) throws IOException { } public ArrayList < Relation > spotPossibleRelations ( List < Triple < Integer , String , Integer > > deps , CoreMap sentence ) throws IOException { } ArrayList < Relation > getSpots ( Graph depGraph , ArrayList < Pair < Country , Number > > pairs ) throws IOException { } public Graph constructDepGraph ( String sentenceString ) { } public ArrayList < Relation > extract ( String sentenceString ) throws IOException { } public void batchExtract ( String fileString , String outFile ) throws IOException { } public boolean isYear ( String token ) { } public boolean unitRelationMatch ( String rel , Pair < Country , Number > arg ) { } ArrayList < Relation > getExtractions ( Graph depGraph , ArrayList < Pair < Country , Number > > pairs , boolean augmentPhrases ) throws IOException { } private static Relation augment ( Graph depGraph , Relation rel ) { } public boolean isCountry ( String token ) { } public boolean isNumber ( String token ) { } public ArrayList < Pair < Country , Number > > getPairs ( Graph depGraph , String sentenceString ) { } public ArrayList < Pair < Country , Number > > getPairs ( Graph depGraph , CoreMap sentence ) { ArrayList < Country > countries = new ArrayList < Country > ( ) ; ArrayList < Number > numbers = new ArrayList < Number > ( ) ; ArrayList < Pair < Country , Number > > res = new ArrayList < Pair < Country , Number > > ( ) ; float [ ] [ ] values = new float [ 1 ] [ 1 ] ; int idx = 1 ; for ( CoreLabel token : sentence . get ( TokensAnnotation . class ) ) { String tokenStr = token . get ( TextAnnotation . class ) ; Word currWord = depGraph . getWordForIndex ( idx ) ; idx ++ ; if ( isCountry ( tokenStr ) ) { countries . add ( new Country ( currWord . getIdx ( ) , currWord . getVal ( ) , currWord . getStartOff ( ) , currWord . getEndOff ( ) ) ) ; } if ( ( isNumber ( tokenStr ) ) && ( ! ( isYear ( tokenStr ) ) ) ) { <START_BUG> Float num_val = Float . valueOf ( Unit . parseDecimalExpressionL ( tokenStr ) ) ; <END_BUG> Number num = new Number ( currWord . getIdx ( ) , currWord . getVal ( ) , currWord . getStartOff ( ) , currWord . getEndOff ( ) ) ; if ( unitsActive ) { String sentString = sentence . toString ( ) ; int beginIdx = sentString . indexOf ( tokenStr ) ; int endIdx = beginIdx + ( tokenStr . length ( ) ) ; String front = sentString . substring ( 0 , beginIdx ) ; if ( ( front . length ( ) ) > 20 ) { front = front . substring ( ( ( front . length ( ) ) - 20 ) ) ; } String back = sentString . substring ( endIdx ) ; if ( ( back . length ( ) ) > 20 ) { back = back . substring ( 0 , 20 ) ; } String utString = ( ( ( front + "<b>" ) + tokenStr ) + "<//b>" ) + back ; List < ? extends EntryWithScore < Unit > > unitsS = ue . parser . getTopKUnitsValues ( utString , "b" , 1 , 0 , values ) ; if ( ( unitsS != null ) && ( ( unitsS . size ( ) ) > 0 ) ) { String curUnit = unitsS . get ( 0 ) . getKey ( ) . getBaseName ( ) ; num . setUnit ( curUnit ) ; QuantityCatalog qu = ue . quantDict ; String [ ] unit_parts = curUnit . split ( "\\[" ) ; Unit b_unit ; Unit multiplier = null ; if ( ( unit_parts . length ) == 1 ) { b_unit = qu . getUnitFromBaseName ( unit_parts [ 0 ] ) ; } else { b_unit = qu . getUnitFromBaseName ( unit_parts [ 0 ] . trim ( ) ) ; String mult = unit_parts [ 1 ] . split ( "\\]" ) [ 0 ] ; multiplier = qu . getUnitFromBaseName ( mult ) ; } if ( b_unit != null ) { Unit SIUnit = b_unit . getParentQuantity ( ) . getCanonicalUnit ( ) ; if ( SIUnit != null ) { boolean [ ] success = new boolean [ 1 ] ; num_val = qu . convert ( num_val , b_unit , SIUnit , success ) ; } } if ( ( multiplier != null ) && ( ( multiplier . getParentQuantity ( ) ) != null ) ) { boolean [ ] success = new boolean [ 1 ] ; num_val = qu . convert ( num_val . floatValue ( ) , multiplier , multiplier . getParentQuantity ( ) . getCanonicalUnit ( ) , success ) ; } num . setFlatVal ( num_val ) ;

Fix:
Float num_val = Number . getDoubleValue ( Unit . parseDecimalExpressionL ( tokenStr ) ) . floatValue ( ) ;