Ejemplo n.º 1
0
  // --- internal stuff
  public ObjectTracker(Config conf, JPF jpf) {
    out = new PrintWriter(System.out, true);

    includes = StringSetMatcher.getNonEmpty(conf.getStringArray("ot.include"));
    excludes = StringSetMatcher.getNonEmpty(conf.getStringArray("ot.exclude"));

    logLife = conf.getBoolean("ot.log_life", true);
    logCall = conf.getBoolean("ot.log_call", true);
    logPut = conf.getBoolean("ot.log_put", true);
    logShared = conf.getBoolean("ot.log_shared", true);
    checkShared = conf.getBoolean("ot.check_shared", false);
    checkConst = conf.getBoolean("ot.check_const", false);

    trackedObjects = new HashMap<Integer, Record>();
  }
Ejemplo n.º 2
0
  public CoverageAnalyzer(Config conf, JPF jpf) {
    includes = StringSetMatcher.getNonEmpty(conf.getStringArray("coverage.include"));
    excludes = StringSetMatcher.getNonEmpty(conf.getStringArray("coverage.exclude"));

    showMethods = conf.getBoolean("coverage.show_methods", false);
    showMethodBodies = conf.getBoolean("coverage.show_bodies", false);
    excludeHandlers = conf.getBoolean("coverage.exclude_handlers", false);
    showBranchCoverage = conf.getBoolean("coverage.show_branches", true);
    loadedOnly = conf.getBoolean("coverage.loaded_only", true);
    showRequirements = conf.getBoolean("coverage.show_requirements", false);

    if (!loadedOnly) {
      getCoverageCandidates(); // this might take a little while
    }

    jpf.addPublisherExtension(ConsolePublisher.class, this);

    jpf.addPublisherExtension(HTMLPublisher.class, this);
  }