test_class.file: mubench/src/test/java/de/tu_darmstadt/stg/mudetect/ranking/AverageWeightFunctionTest.java
test_class.identifier: AverageWeightFunctionTest
test_case.body: @Test
      public void addsAndNormalizesTwoWeights() {
          Overlap instance = someOverlap();
          Overlaps overlaps = new Overlaps();
          Model model = () -> asSet(instance.getPattern());
          ViolationWeightFunction weightFunction = new AverageWeightFunction(
                  w((v, os, m) -> 2.0),
                  w((v, os, m) -> 4.0));
  
          double weight = weightFunction.getWeight(instance, overlaps, model);
  
          assertThat(weight, is(3.0));
      }
test_case.class_method_signature: AverageWeightFunctionTest.addsAndNormalizesTwoWeights()
test_case.full_signature: @Test public void addsAndNormalizesTwoWeights()
test_case.identifier: addsAndNormalizesTwoWeights
test_case.invocations: someOverlap asSet getPattern w w getWeight assertThat is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void addsAndNormalizesTwoWeights()
focal_class.declarator: strategies
focal_class.modifier: private final
focal_class.original_string: private final ViolationWeightFunction[] strategies;
focal_class.type: ViolationWeightFunction[]
focal_class.var_name: strategies
focal_class.file: mubench/src/main/java/de/tu_darmstadt/stg/mudetect/ranking/AverageWeightFunction.java
focal_class.identifier: AverageWeightFunction
focal_class.interfaces: implements ViolationWeightFunction
focal_class.class_method_signature: AverageWeightFunction.AverageWeightFunction(ViolationWeightFunction... functions)
focal_class.full_signature: public  AverageWeightFunction(ViolationWeightFunction... functions)
focal_class.identifier: AverageWeightFunction
focal_class.modifiers: public
focal_class.parameters: (ViolationWeightFunction... functions)
focal_class.signature:  AverageWeightFunction(ViolationWeightFunction... functions)
focal_class.class_method_signature: AverageWeightFunction.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: AverageWeightFunction.getFormula(Overlap violation, Overlaps overlaps, Model model)
focal_class.full_signature: public String getFormula(Overlap violation, Overlaps overlaps, Model model)
focal_class.identifier: getFormula
focal_class.modifiers: 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: AverageWeightFunction.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) {
          double weight = 0;
          for (ViolationWeightFunction strategy : strategies) {
              weight += strategy.getWeight(violation, overlaps, model);
          }
          return weight / strategies.length;
      }
focal_method.class_method_signature: AverageWeightFunction.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: getWeight
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)