@SuppressWarnings("static-method") @Test(expected = IllegalArgumentException.class) @edu.umd.cs.findbugs.annotations.SuppressFBWarnings( value = "NP_NULL_PARAM_DEREF_NONVIRTUAL", justification = "Testing null argument") public void testNormalize_IllegalArgument() throws IOException { LoremIpsum.normalize(null); }
public static String normalize(final String text_) throws IOException { Verify.notNull(text_, PARM_text); try (final Reader fileReader = new StringReader(text_); final BufferedReader reader = new BufferedReader(fileReader)) { final StringBuilder buf = new StringBuilder(); for (String line = reader.readLine(); line != null; line = reader.readLine()) { line = line.trim(); if (line.length() > 0) { line = line.replaceAll("\\s\\s+", " "); buf.append(line); buf.append('\n'); } } return buf.toString().trim(); } }
LoremIpsum { public static String normalize(final String text_) throws IOException { Verify.notNull(text_, PARM_text); try (final Reader fileReader = new StringReader(text_); final BufferedReader reader = new BufferedReader(fileReader)) { final StringBuilder buf = new StringBuilder(); for (String line = reader.readLine(); line != null; line = reader.readLine()) { line = line.trim(); if (line.length() > 0) { line = line.replaceAll("\\s\\s+", " "); buf.append(line); buf.append('\n'); } } return buf.toString().trim(); } } }
LoremIpsum { public static String normalize(final String text_) throws IOException { Verify.notNull(text_, PARM_text); try (final Reader fileReader = new StringReader(text_); final BufferedReader reader = new BufferedReader(fileReader)) { final StringBuilder buf = new StringBuilder(); for (String line = reader.readLine(); line != null; line = reader.readLine()) { line = line.trim(); if (line.length() > 0) { line = line.replaceAll("\\s\\s+", " "); buf.append(line); buf.append('\n'); } } return buf.toString().trim(); } } LoremIpsum();  LoremIpsum(final String text_); }
LoremIpsum { public static String normalize(final String text_) throws IOException { Verify.notNull(text_, PARM_text); try (final Reader fileReader = new StringReader(text_); final BufferedReader reader = new BufferedReader(fileReader)) { final StringBuilder buf = new StringBuilder(); for (String line = reader.readLine(); line != null; line = reader.readLine()) { line = line.trim(); if (line.length() > 0) { line = line.replaceAll("\\s\\s+", " "); buf.append(line); buf.append('\n'); } } return buf.toString().trim(); } } LoremIpsum();  LoremIpsum(final String text_); int getNumParagraphs(); int getNumSentences(); int getNumWords(); String getText(); String getParagraph(final int i_); String getSentence(final int i_); String getWord(final int i_); final void loadTextResource(); final void loadTextResource(final String resource_); static String normalize(final String text_); void setText(final String text_); }
LoremIpsum { public static String normalize(final String text_) throws IOException { Verify.notNull(text_, PARM_text); try (final Reader fileReader = new StringReader(text_); final BufferedReader reader = new BufferedReader(fileReader)) { final StringBuilder buf = new StringBuilder(); for (String line = reader.readLine(); line != null; line = reader.readLine()) { line = line.trim(); if (line.length() > 0) { line = line.replaceAll("\\s\\s+", " "); buf.append(line); buf.append('\n'); } } return buf.toString().trim(); } } LoremIpsum();  LoremIpsum(final String text_); int getNumParagraphs(); int getNumSentences(); int getNumWords(); String getText(); String getParagraph(final int i_); String getSentence(final int i_); String getWord(final int i_); final void loadTextResource(); final void loadTextResource(final String resource_); static String normalize(final String text_); void setText(final String text_); static final String LOREM_IPSUM_RESOURCE; }