code: public void duplicateAndMunge (String pattern, String... replace)
      {
          Pattern pat = makePattern(pattern);
          HashSet<String> toMunge = Sets.newHashSet();
          for (String name : _imports) {
              if (pat.matcher(name).matches()) {
                  toMunge.add(name);
              }
          }
          for (String name : toMunge) {
              String newname = name;
              for (int ii = 0; ii < replace.length; ii += 2) {
                  newname = newname.replace(replace[ii], replace[ii + 1]);
              }
              _imports.add(newname);
          }
      }
docs: Adds a new munged import for each existing import that matches a pattern. The new entry is
  a copy of the old entry but modified according to the given find/replace pairs (see
  description above).
  @param pattern to qualify imports to duplicate
  @param replace pairs to find/replace on the new import