package com.blogspot.activeactive.kata;

import java.util.Collection;

public class BankOcr {
  public void parseLines(final Collection<String> lines) {
    if (lines == null || lines.isEmpty()) {
      throw new IllegalArgumentException("The lines parameter is required and"
          + " must not be null-valued or empty.");
    }
    if ((lines.size() % 4) != 0) {
      throw new IllegalArgumentException("Each valid entry in the lines"
          + " parameter must contain exactly four lines. The lines parameter"
          + " does not contain a whole number of valid entries.");
    }
    for (final String line : lines) {
      if (line.length() != 27) {
        throw new IllegalArgumentException("Each valid line contained in the"
            + " lines parameter must contain exactly 27 characters.");
      }
      if (line.replaceAll("[|_ ]", "").equals("")) {
      } else {
        throw new IllegalArgumentException("Each valid line contained in the"
            + " lines parameter may only contain underscore (\"_\")"
            + " characters, pipe (\"|\") characters, or spaces (\" \").");
      }
    }
  }
}

@@ -819,24 +819,26 @@
 %7D%0A      if (
+! 
 line.replace
@@ -872,23 +872,8 @@
 ) %7B%0A
-      %7D else %7B%0A
     

refactor switch if/else to negated if