class SmartLocalDefsPool {

  protected Map<Body, Pair<Long, SmartLocalDefs>> pool = Maps.newHashMap();

  /**
   * This method returns a fresh instance of a {@link SmartLocalDefs} analysis, based on a freshly created
   * {@link ExceptionalUnitGraph} for b, with standard parameters. If the body b's modification count has not changed since
   * the last time such an analysis was requested for b, then the previously created analysis is returned instead.
   *
   * @see Body#getModificationCount()
   */
  public SmartLocalDefs getSmartLocalDefsFor(Body b) {<FILL_FUNCTION_BODY>}

  public void clear() {
    pool.clear();
  }

  public static SmartLocalDefsPool v() {
    return G.v().soot_toolkits_scalar_SmartLocalDefsPool();
  }

  public SmartLocalDefsPool(Singletons.Global g) {
  }

  public void invalidate(Body b) {
    pool.remove(b);
  }

}

    Pair<Long, SmartLocalDefs> modCountAndSLD = pool.get(b);
    if (modCountAndSLD != null && modCountAndSLD.o1.longValue() == b.getModificationCount()) {
      return modCountAndSLD.o2;
    } else {
      ExceptionalUnitGraph g = ExceptionalUnitGraphFactory.createExceptionalUnitGraph(b);
      SmartLocalDefs newSLD = new SmartLocalDefs(g, new SimpleLiveLocals(g));
      pool.put(b, new Pair<Long, SmartLocalDefs>(b.getModificationCount(), newSLD));
      return newSLD;
    }
  
<no_super_class>