class PeepholeOptimizer extends BodyTransformer {
  private static final Logger logger = LoggerFactory.getLogger(PeepholeOptimizer.class);

  public PeepholeOptimizer(Singletons.Global g) {
  }

  public static PeepholeOptimizer v() {
    return G.v().soot_baf_toolkits_base_PeepholeOptimizer();
  }

  private final String packageName = "soot.baf.toolkits.base";
  private static boolean peepholesLoaded = false;
  private static final Object loaderLock = new Object();

  private final Map<String, Class<?>> peepholeMap = new HashMap<String, Class<?>>();

  /* This is the public interface to PeepholeOptimizer */
  /**
   * The method that drives the optimizations.
   */
  @Override
  protected void internalTransform(Body body, String phaseName, Map<String, String> options) {<FILL_FUNCTION_BODY>}
}

    if (!peepholesLoaded) {
      synchronized (loaderLock) {
        if (!peepholesLoaded) {
          peepholesLoaded = true;

          InputStream peepholeListingStream = null;
          peepholeListingStream = PeepholeOptimizer.class.getResourceAsStream("/peephole.dat");
          if (peepholeListingStream == null) {
            logger.warn("Could not find peephole.dat in the classpath");
            return;
          }
          BufferedReader reader = new BufferedReader(new InputStreamReader(peepholeListingStream));

          String line = null;
          List<String> peepholes = new LinkedList<String>();
          try {
            line = reader.readLine();
            while (line != null) {
              if (line.length() > 0) {
                if (!(line.charAt(0) == '#')) {
                  peepholes.add(line);
                }
              }
              line = reader.readLine();
            }
          } catch (IOException e) {
            throw new RuntimeException(
                "IO error occured while reading file:  " + line + System.getProperty("line.separator") + e);
          }

          try {
            reader.close();
            peepholeListingStream.close();
          } catch (IOException e) {
            logger.debug(e.getMessage(), e);
          }

          for (String peepholeName : peepholes) {
            Class<?> peepholeClass;
            if ((peepholeClass = peepholeMap.get(peepholeName)) == null) {
              try {
                peepholeClass = Class.forName(packageName + '.' + peepholeName);
              } catch (ClassNotFoundException e) {
                throw new RuntimeException(e.toString());
              }
              peepholeMap.put(peepholeName, peepholeClass);
            }
          }
        }
      }
    }

    boolean changed = true;
    while (changed) {
      changed = false;

      for (String peepholeName : peepholeMap.keySet()) {
        boolean peepholeWorked = true;
        while (peepholeWorked) {
          peepholeWorked = false;
          Peephole p = null;

          try {
            p = (Peephole) peepholeMap.get(peepholeName).newInstance();
          } catch (IllegalAccessException e) {
            throw new RuntimeException(e.toString());
          } catch (InstantiationException e) {
            throw new RuntimeException(e.toString());
          }

          if (p.apply(body)) {
            peepholeWorked = true;
            changed = true;
          }
        }
      }
    }
  
<methods>public non-sealed void <init>() ,public final void transform(soot.Body, java.lang.String, Map<java.lang.String,java.lang.String>) ,public final void transform(soot.Body, java.lang.String) ,public final void transform(soot.Body) <variables>private static final Map<java.lang.String,java.lang.String> enabledOnlyMap