#fixed code
                             public static DataSize parse(CharSequence text, DataUnit defaultUnit) {
		Assert.notNull(text, "Text must not be null");
		try {
			final Matcher matcher = PATTERN.matcher(text);
			Assert.state(matcher.matches(), "Does not match data size pattern");

			final DataUnit unit = determineDataUnit(matcher.group(3), defaultUnit);
			return DataSize.of(new BigDecimal(matcher.group(1)), unit);
		} catch (Exception ex) {
			throw new IllegalArgumentException("'" + text + "' is not a valid data size", ex);
		}
	}
#vulnerable code 
                             public static DataSize parse(CharSequence text, DataUnit defaultUnit) {
		Assert.notNull(text, "Text must not be null");
		try {
			Matcher matcher = PATTERN.matcher(text);
			Assert.state(matcher.matches(), "Does not match data size pattern");
			DataUnit unit = determineDataUnit(matcher.group(3), defaultUnit);
			String value = matcher.group(1);
			if (value.indexOf(".") > -1) {
				return DataSize.of(new BigDecimal(value), unit);
			} else {
				long amount = Long.parseLong(matcher.group(1));
				return DataSize.of(amount, unit);
			}
		} catch (Exception ex) {
			throw new IllegalArgumentException("'" + text + "' is not a valid data size", ex);
		}
	} 
                            #location 8 
                            #vulnerability type NULL_DEREFERENCE