예제 #1
0
 @Override
 public Number measure(final MetricData data, final Def_Function function) {
   final Counter c = new Counter(0);
   final Module myModule = function.getMyScope().getModuleScope();
   function.accept(new ExternalFeatureEnvyDetector(myModule, c));
   return c.val();
 }
예제 #2
0
 @Override
 public Number measure(final MetricData data, final Module module) {
   final Counter externalReferences = new Counter(0);
   final ExternalFeatureEnvyDetector detector =
       new ExternalFeatureEnvyDetector(module, externalReferences);
   module.accept(detector);
   return externalReferences.val();
 }