From 31f0dc352960370561d27041c0252258c23c2766 Mon Sep 17 00:00:00 2001 From: Florian Bossert Date: Sun, 18 Aug 2024 08:59:06 +0200 Subject: [PATCH] Fully consider composite requirements & provisions for composite borders --- .../retriever/extraction/commonalities/CompositeBuilder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bundles/org.palladiosimulator.retriever.extraction/src/org/palladiosimulator/retriever/extraction/commonalities/CompositeBuilder.java b/bundles/org.palladiosimulator.retriever.extraction/src/org/palladiosimulator/retriever/extraction/commonalities/CompositeBuilder.java index fcc47ceb..81f9511c 100644 --- a/bundles/org.palladiosimulator.retriever.extraction/src/org/palladiosimulator/retriever/extraction/commonalities/CompositeBuilder.java +++ b/bundles/org.palladiosimulator.retriever.extraction/src/org/palladiosimulator/retriever/extraction/commonalities/CompositeBuilder.java @@ -120,7 +120,7 @@ public Composite construct(final Collection allComponents, final Requ .warn("Chose name " + chosenPrefix + " supported by " + maxSupport + "/" + parts.size() + " parts."); final Set externalRequirements = requirements.stream() - .filter(x -> compositeRequirements.containsEntire(x)) + .filter(x -> compositeRequirements.containsEntire(x) || compositeProvisions.containsEntire(x)) .collect(Collectors.toSet()); final Set externalProvisions = MapMerger.merge(provisions) @@ -128,7 +128,7 @@ public Composite construct(final Collection allComponents, final Requ .stream() .filter(entry -> entry.getValue() .stream() - .anyMatch(operation -> compositeProvisions.containsEntire(operation))) + .anyMatch(operation -> compositeRequirements.containsEntire(operation) || compositeProvisions.containsEntire(operation))) .map(entry -> entry.getKey()) .collect(Collectors.toSet());