test_class.file: mubench/src/test/java/de/tu_darmstadt/stg/mudetect/AlternativeViolationPredicateTest.java
test_class.identifier: AlternativeViolationPredicateTest
test_case.body: @Test
      public void keepsIndependentViolations() {
          Violation violation1 = someViolation(buildOverlap(buildAUG().withActionNode("m()")).withNode("m()"));
          Violation violation2 = someViolation(buildOverlap(buildAUG().withActionNode("f()")).withNode("f()"));
  
          assertThat(Stream.of(violation1, violation2).filter(firstAlternativeViolation()).count(), is(2L));
      }
test_case.class_method_signature: AlternativeViolationPredicateTest.keepsIndependentViolations()
test_case.full_signature: @Test public void keepsIndependentViolations()
test_case.identifier: keepsIndependentViolations
test_case.invocations: someViolation withNode buildOverlap withActionNode buildAUG someViolation withNode buildOverlap withActionNode buildAUG assertThat count filter of firstAlternativeViolation is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void keepsIndependentViolations()
focal_class.file: mubench/src/main/java/de/tu_darmstadt/stg/mudetect/AlternativeViolationPredicate.java
focal_class.identifier: AlternativeViolationPredicate
focal_class.class_method_signature: AlternativeViolationPredicate.firstAlternativeViolation()
focal_class.full_signature: public static Predicate<Violation> firstAlternativeViolation()
focal_class.identifier: firstAlternativeViolation
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: Predicate<Violation>
focal_class.signature: Predicate<Violation> firstAlternativeViolation()
focal_method.body: public static Predicate<Violation> firstAlternativeViolation() {
          Set<Node> coveredNodes = new HashSet<>();
          return violation -> {
              Set<Node> mappedTargetNodes = violation.getOverlap().getMappedTargetNodes().stream()
                      .filter(node -> node instanceof MethodCallNode)
                      .collect(Collectors.toSet());
              if (mappedTargetNodes.stream().anyMatch(coveredNodes::contains)) {
                  return false;
              } else {
                  coveredNodes.addAll(mappedTargetNodes);
                  return true;
              }
          };
      }
focal_method.class_method_signature: AlternativeViolationPredicate.firstAlternativeViolation()
focal_method.full_signature: public static Predicate<Violation> firstAlternativeViolation()
focal_method.identifier: firstAlternativeViolation
focal_method.invocations: collect filter stream getMappedTargetNodes getOverlap toSet anyMatch stream addAll
focal_method.modifiers: public static
focal_method.parameters: ()
focal_method.return: Predicate<Violation>
focal_method.signature: Predicate<Violation> firstAlternativeViolation()