<commit_before>package org.shypl.common.util;


import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.text.NumberFormat;
import java.util.Locale;

public final class NumberFormatUtils {
	
	private NumberFormatUtils() {
		
	}
	
	public static DecimalFormat decimalFormat() {
		return decimalFormat(false);
	}
	
	public static DecimalFormat decimalFormat(boolean showSign) {
		DecimalFormat formatter = (DecimalFormat)NumberFormat.getInstance(Locale.US);
		DecimalFormatSymbols symbols = formatter.getDecimalFormatSymbols();
		
		symbols.setGroupingSeparator(' ');
		formatter.setDecimalFormatSymbols(symbols);
		
		if (showSign) {
			formatter.setPositivePrefix("+");
		}
		<commit_msg>add ability not to use groupping separator<commit_after>package org.shypl.common.util;


import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.text.NumberFormat;
import java.util.Locale;

public final class NumberFormatUtils {
	
	private NumberFormatUtils() {
		
	}
	
	public static DecimalFormat decimalFormat() {
		return decimalFormat(false);
	}
	
	
	public static DecimalFormat decimalFormat(boolean showSign) {
		return decimalFormat(true, showSign);
	}
	
	public static DecimalFormat decimalFormat(boolean useGroupingSeparator, boolean showSign) {
		DecimalFormat formatter = (DecimalFormat)NumberFormat.getInstance(Locale.US);
		DecimalFormatSymbols symbols = formatter.getDecimalFormatSymbols();
		
		if (useGroupingSeparator) {
			symbols.setGroupingSeparator(' ');
		}
		
		formatter.setDecimalFormatSymbols(symbols);
		
		if (showSign) {
			formatter.setPositivePrefix("+");
		}
		
{'fraction_non_alphanumeric': 0.09133765468473777, 'fraction_numerical': 0.0, 'mean_word_length': 5.4562737642585555, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1369654', 'n_tokens_mistral': 545, 'n_tokens_neox': 480, 'n_words': 98}