test_class.file: mubench/src/test/java/de/tu_darmstadt/stg/mudetect/ranking/PatternSizeWeightFunctionTest.java
test_class.identifier: PatternSizeWeightFunctionTest
test_case.body: @Test
      public void smoothesWeight() throws Exception {
          APIUsagePattern smallerPattern = somePattern(buildAUG().withActionNodes("N").build());
          APIUsagePattern largerPattern = somePattern(buildAUG().withActionNodes("N", "M").build());
          APIUsagePattern largestPattern = somePattern(buildAUG().withActionNodes("N", "M", "O").build());
          Model model = () -> asSet(smallerPattern, largerPattern, largestPattern);
  
          double smallerWeight = new PatternSizeWeightFunction().getWeight(instance(smallerPattern), null, model);
          double largerWeight = new PatternSizeWeightFunction().getWeight(instance(largerPattern), null, model);
          double largestWeight = new PatternSizeWeightFunction().getWeight(instance(largestPattern), null, model);
  
          assertThat(largerWeight - smallerWeight, is(greaterThan(largestWeight - largerWeight)));
      }
test_case.class_method_signature: PatternSizeWeightFunctionTest.smoothesWeight()
test_case.full_signature: @Test public void smoothesWeight()
test_case.identifier: smoothesWeight
test_case.invocations: somePattern build withActionNodes buildAUG somePattern build withActionNodes buildAUG somePattern build withActionNodes buildAUG asSet getWeight instance getWeight instance getWeight instance assertThat is greaterThan
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void smoothesWeight()
focal_class.file: mubench/src/main/java/de/tu_darmstadt/stg/mudetect/ranking/PatternSizeWeightFunction.java
focal_class.identifier: PatternSizeWeightFunction
focal_class.interfaces: implements ViolationWeightFunction
focal_class.class_method_signature: PatternSizeWeightFunction.getWeight(Overlap violation, Overlaps overlaps, Model model)
focal_class.full_signature: @Override public double getWeight(Overlap violation, Overlaps overlaps, Model model)
focal_class.identifier: getWeight
focal_class.modifiers: @Override public
focal_class.parameters: (Overlap violation, Overlaps overlaps, Model model)
focal_class.return: double
focal_class.signature: double getWeight(Overlap violation, Overlaps overlaps, Model model)
focal_class.class_method_signature: PatternSizeWeightFunction.getPatternWeight(Overlap violation)
focal_class.full_signature: private int getPatternWeight(Overlap violation)
focal_class.identifier: getPatternWeight
focal_class.modifiers: private
focal_class.parameters: (Overlap violation)
focal_class.return: int
focal_class.signature: int getPatternWeight(Overlap violation)
focal_class.class_method_signature: PatternSizeWeightFunction.getMaxPatternWeight(Model model)
focal_class.full_signature: private int getMaxPatternWeight(Model model)
focal_class.identifier: getMaxPatternWeight
focal_class.modifiers: private
focal_class.parameters: (Model model)
focal_class.return: int
focal_class.signature: int getMaxPatternWeight(Model model)
focal_class.class_method_signature: PatternSizeWeightFunction.getFormula(Overlap violation, Overlaps overlaps, Model model)
focal_class.full_signature: @Override public String getFormula(Overlap violation, Overlaps overlaps, Model model)
focal_class.identifier: getFormula
focal_class.modifiers: @Override public
focal_class.parameters: (Overlap violation, Overlaps overlaps, Model model)
focal_class.return: String
focal_class.signature: String getFormula(Overlap violation, Overlaps overlaps, Model model)
focal_class.class_method_signature: PatternSizeWeightFunction.getId()
focal_class.full_signature: @Override public String getId()
focal_class.identifier: getId
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getId()
focal_method.body: @Override
      public double getWeight(Overlap violation, Overlaps overlaps, Model model) {
          return Math.log10(getPatternWeight(violation)) / Math.log10(getMaxPatternWeight(model));
      }
focal_method.class_method_signature: PatternSizeWeightFunction.getWeight(Overlap violation, Overlaps overlaps, Model model)
focal_method.full_signature: @Override public double getWeight(Overlap violation, Overlaps overlaps, Model model)
focal_method.identifier: getWeight
focal_method.invocations: log10 getPatternWeight log10 getMaxPatternWeight
focal_method.modifiers: @Override public
focal_method.parameters: (Overlap violation, Overlaps overlaps, Model model)
focal_method.return: double
focal_method.signature: double getWeight(Overlap violation, Overlaps overlaps, Model model)