test_class.file: mubench/src/test/java/de/tu_darmstadt/stg/mudetect/OnlyDefPrefixNoViolationPredicateTest.java
test_class.identifier: OnlyDefPrefixNoViolationPredicateTest
test_case.body: @Test @Ignore("This property might be reasonable, but it's not easy to implement it, hence, we didn't for now.")
      public void onlyDefPrefixWithAdditionalEdgesIsNoViolation() {
          TestAUGBuilder pattern = buildAUG().withActionNodes("iterator()", "hasNext()", "next()").withDataNode("Iterator")
                  .withEdge("iterator()", DEFINITION, "Iterator")
                  .withEdge("Iterator", RECEIVER, "hasNext()")
                  .withEdge("Iterator", RECEIVER, "next()")
                  .withEdge("iterator()", REPETITION, "next()")
                  .withEdge("hasNext()", REPETITION, "next()");
          TestAUGBuilder target = buildAUG().withActionNodes("iterator()").withDataNode("Iterator")
                  .withEdge("iterator()", DEFINITION, "Iterator");
          TestOverlapBuilder overlap = buildOverlap(target, pattern).withNodes("iterator()", "Iterator")
                  .withEdge("iterator()", DEFINITION, "Iterator");
  
          Optional<Boolean> decision = new OnlyDefPrefixNoViolationPredicate().apply(overlap.build());
  
          assertThat(decision, is(Optional.of(false)));
      }
test_case.class_method_signature: OnlyDefPrefixNoViolationPredicateTest.onlyDefPrefixWithAdditionalEdgesIsNoViolation()
test_case.full_signature: @Test @Ignore("This property might be reasonable, but it's not easy to implement it, hence, we didn't for now.") public void onlyDefPrefixWithAdditionalEdgesIsNoViolation()
test_case.identifier: onlyDefPrefixWithAdditionalEdgesIsNoViolation
test_case.invocations: withEdge withEdge withEdge withEdge withEdge withDataNode withActionNodes buildAUG withEdge withDataNode withActionNodes buildAUG withEdge withNodes buildOverlap apply build assertThat is of
test_case.modifiers: @Test @Ignore("This property might be reasonable, but it's not easy to implement it, hence, we didn't for now.") public
test_case.parameters: ()
test_case.return: void
test_case.signature: void onlyDefPrefixWithAdditionalEdgesIsNoViolation()
focal_class.file: mubench/src/main/java/de/tu_darmstadt/stg/mudetect/OnlyDefPrefixNoViolationPredicate.java
focal_class.identifier: OnlyDefPrefixNoViolationPredicate
focal_class.interfaces: implements ViolationPredicate
focal_class.class_method_signature: OnlyDefPrefixNoViolationPredicate.apply(Overlap overlap)
focal_class.full_signature: @Override public Optional<Boolean> apply(Overlap overlap)
focal_class.identifier: apply
focal_class.modifiers: @Override public
focal_class.parameters: (Overlap overlap)
focal_class.return: Optional<Boolean>
focal_class.signature: Optional<Boolean> apply(Overlap overlap)
focal_class.class_method_signature: OnlyDefPrefixNoViolationPredicate.isProducerDataPair(Set<Node> missingEdgeSources, Overlap overlap)
focal_class.full_signature: private boolean isProducerDataPair(Set<Node> missingEdgeSources, Overlap overlap)
focal_class.identifier: isProducerDataPair
focal_class.modifiers: private
focal_class.parameters: (Set<Node> missingEdgeSources, Overlap overlap)
focal_class.return: boolean
focal_class.signature: boolean isProducerDataPair(Set<Node> missingEdgeSources, Overlap overlap)
focal_class.class_method_signature: OnlyDefPrefixNoViolationPredicate.hasMappedDefinitionEdge(Overlap overlap, Node producer, Node defined)
focal_class.full_signature: private boolean hasMappedDefinitionEdge(Overlap overlap, Node producer, Node defined)
focal_class.identifier: hasMappedDefinitionEdge
focal_class.modifiers: private
focal_class.parameters: (Overlap overlap, Node producer, Node defined)
focal_class.return: boolean
focal_class.signature: boolean hasMappedDefinitionEdge(Overlap overlap, Node producer, Node defined)
focal_class.class_method_signature: OnlyDefPrefixNoViolationPredicate.isSingleDataNode(Set<Node> missingEdgeSources)
focal_class.full_signature: private boolean isSingleDataNode(Set<Node> missingEdgeSources)
focal_class.identifier: isSingleDataNode
focal_class.modifiers: private
focal_class.parameters: (Set<Node> missingEdgeSources)
focal_class.return: boolean
focal_class.signature: boolean isSingleDataNode(Set<Node> missingEdgeSources)
focal_class.class_method_signature: OnlyDefPrefixNoViolationPredicate.getSources(Set<Edge> missingDirectConnectionEdges)
focal_class.full_signature: private Set<Node> getSources(Set<Edge> missingDirectConnectionEdges)
focal_class.identifier: getSources
focal_class.modifiers: private
focal_class.parameters: (Set<Edge> missingDirectConnectionEdges)
focal_class.return: Set<Node>
focal_class.signature: Set<Node> getSources(Set<Edge> missingDirectConnectionEdges)
focal_class.class_method_signature: OnlyDefPrefixNoViolationPredicate.allHaveMappedSourceAndMissingTarget(Set<Edge> missingDirectConnectionEdges, Overlap overlap)
focal_class.full_signature: private boolean allHaveMappedSourceAndMissingTarget(Set<Edge> missingDirectConnectionEdges, Overlap overlap)
focal_class.identifier: allHaveMappedSourceAndMissingTarget
focal_class.modifiers: private
focal_class.parameters: (Set<Edge> missingDirectConnectionEdges, Overlap overlap)
focal_class.return: boolean
focal_class.signature: boolean allHaveMappedSourceAndMissingTarget(Set<Edge> missingDirectConnectionEdges, Overlap overlap)
focal_class.class_method_signature: OnlyDefPrefixNoViolationPredicate.hasMappedSourceAndMissingTarget(Overlap overlap, Edge edge)
focal_class.full_signature: private boolean hasMappedSourceAndMissingTarget(Overlap overlap, Edge edge)
focal_class.identifier: hasMappedSourceAndMissingTarget
focal_class.modifiers: private
focal_class.parameters: (Overlap overlap, Edge edge)
focal_class.return: boolean
focal_class.signature: boolean hasMappedSourceAndMissingTarget(Overlap overlap, Edge edge)
focal_class.class_method_signature: OnlyDefPrefixNoViolationPredicate.connectsToMappedNode(Edge edge, Overlap overlap)
focal_class.full_signature: private boolean connectsToMappedNode(Edge edge, Overlap overlap)
focal_class.identifier: connectsToMappedNode
focal_class.modifiers: private
focal_class.parameters: (Edge edge, Overlap overlap)
focal_class.return: boolean
focal_class.signature: boolean connectsToMappedNode(Edge edge, Overlap overlap)
focal_method.body: @Override
      public Optional<Boolean> apply(Overlap overlap) {
          Set<Edge> missingDirectConnectionEdges = overlap.getMissingEdges().stream()
                  .filter(Edge::isDirect)
                  .filter(edge -> connectsToMappedNode(edge, overlap))
                  .collect(Collectors.toSet());
  
          if (allHaveMappedSourceAndMissingTarget(missingDirectConnectionEdges, overlap)) {
              Set<Node> missingEdgeSources = getSources(missingDirectConnectionEdges);
              if (isSingleDataNode(missingEdgeSources) || isProducerDataPair(missingEdgeSources, overlap)) {
                  return Optional.of(false);
              }
          }
  
          return Optional.empty();
      }
focal_method.class_method_signature: OnlyDefPrefixNoViolationPredicate.apply(Overlap overlap)
focal_method.full_signature: @Override public Optional<Boolean> apply(Overlap overlap)
focal_method.identifier: apply
focal_method.invocations: collect filter filter stream getMissingEdges connectsToMappedNode toSet allHaveMappedSourceAndMissingTarget getSources isSingleDataNode isProducerDataPair of empty
focal_method.modifiers: @Override public
focal_method.parameters: (Overlap overlap)
focal_method.return: Optional<Boolean>
focal_method.signature: Optional<Boolean> apply(Overlap overlap)