Source:
<code>VoltCSVFormatter(String formatName, Properties prop) { if (!("csv".equalsIgnoreCase(formatName) || "tsv".equalsIgnoreCase(formatName))) { throw new IllegalArgumentException( "Invalid format " + formatName + ", choices are either \"csv\" or \"tsv\"."); } m_separator = "csv".equalsIgnoreCase(formatName) ? ',' : '\t'; String separatorProp = prop.getProperty("separator", ""); if (!separatorProp.isEmpty() && separatorProp.length() == 1) { m_separator = separatorProp.charAt(0); } char quotechar = '"'; String quoteCharProp = prop.getProperty("quotechar", ""); if (!quoteCharProp.isEmpty() && quoteCharProp.length() == 1) { quotechar = quoteCharProp.charAt(0); } m_escape = '\\'; String escapeProp = prop.getProperty("escape", ""); if (!escapeProp.isEmpty() && escapeProp.length() == 1) { m_escape = escapeProp.charAt(0); } m_strictquotes = false; String strictQuotesProp = prop.getProperty("strictquotes", ""); if (!strictQuotesProp.isEmpty()) { <START> m_strictquotes = Boolean.parseBoolean(strictQuotesProp); <END> } m_surroundingSpacesNeedQuotes = false; String surroundingSpacesNeedQuotes = prop.getProperty("surroundingSpacesNeedQuotes", ""); if (!surroundingSpacesNeedQuotes.isEmpty()) { m_surroundingSpacesNeedQuotes = Boolean.parseBoolean(surroundingSpacesNeedQuotes); } m_blank = prop.getProperty("blank", ""); m_customNullString = prop.getProperty("customNullString", ""); if (!m_customNullString.isEmpty() && !"error".equals(m_blank)) { m_blank = "empty"; } m_nowhitespace = false; String ignoreWhiteSpaceProp = prop.getProperty("nowhitespace", ""); if (!ignoreWhiteSpaceProp.isEmpty()) { m_nowhitespace = Boolean.parseBoolean(ignoreWhiteSpaceProp); } CsvPreference.Builder builder = new CsvPreference.Builder(quotechar, m_separator, "\n"); if (m_surroundingSpacesNeedQuotes) { builder.surroundingSpacesNeedQuotes(true); } m_csvPreference = builder.build(); }</code><technical_language>if parsing of boolean fails? handle error conditions pick defaults</technical_language>

Target:
VoltCSVFormatter (String formatName, Properties prop) { if (!("csv".equalsIgnoreCase(formatName) || "tsv".equalsIgnoreCase(formatName))) { throw new IllegalArgumentException("Invalid format " + formatName + ", choices are either \"csv\" or \"tsv\"."); } char separator = "csv".equalsIgnoreCase(formatName) ? ',' : '\t'; String separatorProp = prop.getProperty("separator", ""); if (!separatorProp.isEmpty() && separatorProp.length() == 1) { separator = separatorProp.charAt(0); } char quotechar = CSVParser.DEFAULT_QUOTE_CHARACTER; String quoteCharProp = prop.getProperty("quotechar", ""); if (!quoteCharProp.isEmpty() && quoteCharProp.length() == 1) { quotechar = quoteCharProp.charAt(0); } char escape = CSVParser.DEFAULT_ESCAPE_CHARACTER; String escapeProp = prop.getProperty("escape", ""); if (!escapeProp.isEmpty() && escapeProp.length() == 1) { escape = escapeProp.charAt(0); } boolean strictQuotes = CSVParser.DEFAULT_STRICT_QUOTES; String strictQuotesProp = prop.getProperty("strictquotes", ""); if (!strictQuotesProp.isEmpty()) { strictQuotes = Boolean.parseBoolean(strictQuotesProp); } boolean ignoreLeadingWhiteSpace = CSVParser.DEFAULT_IGNORE_LEADING_WHITESPACE; String ignoreLeadingWhiteSpaceProp = prop.getProperty("ignoreleadingwhitespace", ""); if (!ignoreLeadingWhiteSpaceProp.isEmpty()) { ignoreLeadingWhiteSpace = Boolean.parseBoolean(ignoreLeadingWhiteSpaceProp); } m_parser = new CSVParser(separator, quotechar, escape, strictQuotes, ignoreLeadingWhiteSpace); }