test_class.file: aw-reporting-model/src/test/java/com/google/api/ads/adwords/awreporting/model/util/BigDecimalUtilTest.java
test_class.identifier: BigDecimalUtilTest
test_case.body: @Test
    public void testEmtpy() {
      String numString = "";
      BigDecimal parsed = BigDecimalUtil.parseFromNumberString(numString);
      assertNull("The parsed value is not null.", parsed);
    }
test_case.class_method_signature: BigDecimalUtilTest.testEmtpy()
test_case.full_signature: @Test public void testEmtpy()
test_case.identifier: testEmtpy
test_case.invocations: parseFromNumberString assertNull
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testEmtpy()
focal_class.declarator: MICRO = new BigDecimal(1000000)
focal_class.modifier: private static final
focal_class.original_string: private static final BigDecimal MICRO = new BigDecimal(1000000);
focal_class.type: BigDecimal
focal_class.var_name: MICRO
focal_class.declarator: humanReadableFormat =
        new ThreadLocal<DecimalFormat>() {
          @Override
          protected DecimalFormat initialValue() {
            return new DecimalFormat("#0.00");
          }
        }
focal_class.modifier: private static final
focal_class.original_string: private static final ThreadLocal<DecimalFormat> humanReadableFormat =
        new ThreadLocal<DecimalFormat>() {
          @Override
          protected DecimalFormat initialValue() {
            return new DecimalFormat("#0.00");
          }
        };
focal_class.type: ThreadLocal<DecimalFormat>
focal_class.var_name: humanReadableFormat
focal_class.file: aw-reporting-model/src/main/java/com/google/api/ads/adwords/awreporting/model/util/BigDecimalUtil.java
focal_class.identifier: BigDecimalUtil
focal_class.class_method_signature: BigDecimalUtil.BigDecimalUtil()
focal_class.full_signature: private  BigDecimalUtil()
focal_class.identifier: BigDecimalUtil
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  BigDecimalUtil()
focal_class.class_method_signature: BigDecimalUtil.parseFromNumberString(@Nullable String numberString)
focal_class.full_signature: public static BigDecimal parseFromNumberString(@Nullable String numberString)
focal_class.identifier: parseFromNumberString
focal_class.modifiers: public static
focal_class.parameters: (@Nullable String numberString)
focal_class.return: BigDecimal
focal_class.signature: BigDecimal parseFromNumberString(@Nullable String numberString)
focal_class.class_method_signature: BigDecimalUtil.parseFromNumberStringPercentage(@Nullable String numberString)
focal_class.full_signature: public static BigDecimal parseFromNumberStringPercentage(@Nullable String numberString)
focal_class.identifier: parseFromNumberStringPercentage
focal_class.modifiers: public static
focal_class.parameters: (@Nullable String numberString)
focal_class.return: BigDecimal
focal_class.signature: BigDecimal parseFromNumberStringPercentage(@Nullable String numberString)
focal_class.class_method_signature: BigDecimalUtil.formatAsReadable(@Nullable BigDecimal number)
focal_class.full_signature: public static String formatAsReadable(@Nullable BigDecimal number)
focal_class.identifier: formatAsReadable
focal_class.modifiers: public static
focal_class.parameters: (@Nullable BigDecimal number)
focal_class.return: String
focal_class.signature: String formatAsReadable(@Nullable BigDecimal number)
focal_class.class_method_signature: BigDecimalUtil.parseFromMoneyString(@Nullable String numberString)
focal_class.full_signature: public static BigDecimal parseFromMoneyString(@Nullable String numberString)
focal_class.identifier: parseFromMoneyString
focal_class.modifiers: public static
focal_class.parameters: (@Nullable String numberString)
focal_class.return: BigDecimal
focal_class.signature: BigDecimal parseFromMoneyString(@Nullable String numberString)
focal_method.body: public static BigDecimal parseFromNumberString(@Nullable String numberString) {
      BigDecimal result = null;
  
      if (numberString != null) {
        String nonSpacedString = numberString.replaceAll("[ \\t\\n\\x0B\\f\\r%]", "");
  
        if (!Strings.isNullOrEmpty(nonSpacedString)){
          int indexOfComma = nonSpacedString.indexOf(',');
          int indexOfDot = nonSpacedString.indexOf('.');
    
          DecimalFormat decimalFormat = (DecimalFormat) NumberFormat.getInstance();
          DecimalFormatSymbols otherSymbols = new DecimalFormatSymbols();
    
          if (indexOfComma < indexOfDot) {
            otherSymbols.setDecimalSeparator('.');
            otherSymbols.setGroupingSeparator(',');
          } else {
            otherSymbols.setDecimalSeparator(',');
            otherSymbols.setGroupingSeparator('.');
          }
    
          decimalFormat.setParseBigDecimal(true);
          decimalFormat.setDecimalFormatSymbols(otherSymbols);
    
          try {
            result = (BigDecimal) decimalFormat.parse(nonSpacedString);
          } catch (ParseException e) {
            throw new RuntimeException("Error parsing '" + nonSpacedString + "' as BigDecimal", e);
          }
        }
      }
      return result;
    }
focal_method.class_method_signature: BigDecimalUtil.parseFromNumberString(@Nullable String numberString)
focal_method.full_signature: public static BigDecimal parseFromNumberString(@Nullable String numberString)
focal_method.identifier: parseFromNumberString
focal_method.invocations: replaceAll isNullOrEmpty indexOf indexOf getInstance setDecimalSeparator setGroupingSeparator setDecimalSeparator setGroupingSeparator setParseBigDecimal setDecimalFormatSymbols parse
focal_method.modifiers: public static
focal_method.parameters: (@Nullable String numberString)
focal_method.return: BigDecimal
focal_method.signature: BigDecimal parseFromNumberString(@Nullable String numberString)