diff --git a/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/BoundingBoxDeserializer.java b/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/BoundingBoxDeserializer.java
deleted file mode 100644
index 8c107d9..0000000
--- a/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/BoundingBoxDeserializer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Licensed under MIT 2023-2024. */
-package edu.kit.kastel.mcse.ardoco.core.api.diagramrecognition;
-
-import java.io.IOException;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.databind.DeserializationContext;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
-
-/**
- * Deserializes a JSON bounding box node into a {@link BoundingBox}. For example the JSON node
- *
- * {@code
- * {
- * "x": 12,
- * "y": 30,
- * "w": 50,
- * "h": 60
- * }
- * }
is converted to a bounding box with {@code minX = 12, minY
- * = 30, maxX = 62, maxY = 90}.
- */
-public class BoundingBoxDeserializer extends StdDeserializer {
- public BoundingBoxDeserializer() {
- this(BoundingBox.class);
- }
-
- protected BoundingBoxDeserializer(Class> vc) {
- super(vc);
- }
-
- @Override
- public BoundingBox deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException {
- JsonNode node = jsonParser.getCodec().readTree(jsonParser);
-
- var x = node.get("x").asInt();
- var y = node.get("y").asInt();
- var w = node.get("w").asInt();
- var h = node.get("h").asInt();
-
- return new BoundingBox(x, y, x + w, y + h);
- }
-}
diff --git a/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/BoxGS.java b/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/BoxGS.java
deleted file mode 100644
index 365da82..0000000
--- a/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/BoxGS.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/* Licensed under MIT 2023-2024. */
-package edu.kit.kastel.mcse.ardoco.core.api.diagramrecognition;
-
-import java.awt.*;
-import java.io.File;
-import java.io.Serializable;
-import java.util.Arrays;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Set;
-
-import com.fasterxml.jackson.annotation.JacksonInject;
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-import edu.kit.kastel.mcse.ardoco.core.api.models.tracelinks.diagrams.DiagramGoldStandardTraceLink;
-import edu.kit.kastel.mcse.ardoco.core.api.text.Sentence;
-import edu.kit.kastel.mcse.ardoco.core.architecture.Deterministic;
-
-/**
- * Connector for the {@link Box} JSON representation.
- */
-@Deterministic
-public class BoxGS extends Box implements Serializable {
- private final DiagramGS diagramGS;
- private final BoxGS[] subBoxes;
- private final TraceLinkGS[] tracelinks;
-
- /**
- * Create a new box from the goldstandard.
- *
- * @param diagram the {@link Diagram} of the box.
- * @param boundingBox the {@link BoundingBox} of the box.
- * @param textBoxes all {@link TextBox} instances that are directly contained in this box (does not include sub boxes!)
- * @param subBoxes all subboxes that are contained withing the bounding box of this box
- * @param tracelinks all tracelinks associated with this box (does not include sub boxes!)
- */
- @JsonCreator
- public BoxGS(@JacksonInject DiagramGS diagram, @JsonProperty("boundingBox") BoundingBox boundingBox, @JsonProperty("textBoxes") TextBox[] textBoxes,
- @JsonProperty("subBoxes") BoxGS[] subBoxes, @JsonProperty("tracelinks") TraceLinkGS[] tracelinks) {
- super(diagram, calculateUUID(boundingBox.toCoordinates()), boundingBox.toCoordinates(), 1, Classification.UNKNOWN.getClassificationString(), Arrays
- .asList(textBoxes), Color.BLACK);
- this.diagramGS = diagram;
- this.subBoxes = subBoxes;
- this.tracelinks = tracelinks;
- }
-
- /**
- * {@return the set of diagram-sentence trace links associated with this box} The sentences are used to resolve the sentence numbers to actual sentences
- * from the document.
- *
- * @param sentences the sentences from the text
- */
- public Set getTraceLinks(List sentences) {
- var list = Arrays.stream(tracelinks)
- .filter(t -> getDiagram().getDiagramProject().getTextResourceName().contains(t.name()))
- .flatMap(t -> t.toTraceLinks(this, sentences).stream())
- .toList();
- var set = new LinkedHashSet<>(list);
- assert set.size() == list.size();
- return set;
- }
-
- /**
- * {@return the set of sub boxes contained by this box} Only direct children are returned. In comparison to {@link #getChildren()}, this entirely relies on
- * the JSON structure of the gold standard file to determine the hierarchy of boxes.
- */
- public BoxGS[] getSubBoxes() {
- return subBoxes;
- }
-
- /**
- * {@return the diagram this box belongs to}
- */
- @Override
- public DiagramGS getDiagram() {
- return this.diagramGS;
- }
-
- @Override
- public String toString() {
- var allText = getTexts().stream().map(TextBox::getText).reduce((l, r) -> l + " | " + r).orElse("");
- var preText = getDiagram() + File.separator;
- return String.format("BoxGS [%s %s]", super.toString(false), preText + allText.substring(0, Math.min(allText.length(), 20)));
- }
-
- @Override
- public boolean equals(Object obj) {
- return super.equals(obj);
- }
-
- @Override
- public int hashCode() {
- return super.hashCode();
- }
-}
diff --git a/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/DiagramGS.java b/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/DiagramGS.java
deleted file mode 100644
index 95c6180..0000000
--- a/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/DiagramGS.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/* Licensed under MIT 2023-2024. */
-package edu.kit.kastel.mcse.ardoco.core.api.diagramrecognition;
-
-import static edu.kit.kastel.mcse.ardoco.core.common.JsonHandling.createObjectMapper;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.List;
-import java.util.Objects;
-
-import org.apache.commons.lang3.NotImplementedException;
-import org.eclipse.collections.api.factory.Lists;
-
-import com.fasterxml.jackson.annotation.JacksonInject;
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.InjectableValues;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.module.SimpleModule;
-
-import edu.kit.kastel.mcse.ardoco.core.api.models.tracelinks.diagrams.DiagramGoldStandardTraceLink;
-import edu.kit.kastel.mcse.ardoco.core.api.text.Sentence;
-import edu.kit.kastel.mcse.ardoco.core.architecture.Deterministic;
-import edu.kit.kastel.mcse.ardoco.core.common.util.wordsim.WordSimUtils;
-import edu.kit.kastel.mcse.ardoco.core.tests.eval.DiagramProject;
-import edu.kit.kastel.mcse.ardoco.core.tests.eval.GoldStandardDiagrams;
-
-/**
- * Implementation of the {@link Diagram} interface used for JSON deserialization. Instances are created from a
- * {@link GoldStandardDiagrams GoldStandardDiagrams}.
- */
-@Deterministic
-public class DiagramGS implements Diagram {
- private String resourceName;
- private List properBoxes = new ArrayList<>();
- private List properTextBoxes = new ArrayList<>();
- private DiagramProject project;
-
- /**
- * JSON constructor for deserialization
- *
- * @param project the project this diagram belongs to
- * @param resourceName the resource name of this diagram
- * @param boxesNode the unprocessed JSON node representing the top-level diagram boxes
- * @throws JsonProcessingException can occur during deserialization if the structure does not match
- */
- @JsonCreator
- public DiagramGS(@JacksonInject DiagramProject project, @JsonProperty("path") String resourceName, @JsonProperty("boxes") JsonNode boxesNode)
- throws JsonProcessingException {
- SimpleModule module = new SimpleModule();
- module.addDeserializer(BoundingBox.class, new BoundingBoxDeserializer());
- module.addDeserializer(TextBox.class, new TextBoxDeserializer());
- ObjectMapper objectMapper = createObjectMapper();
- objectMapper.registerModule(module);
- objectMapper.setInjectableValues(new InjectableValues.Std().addValue(DiagramGS.class, this));
- var boxes = objectMapper.treeToValue(boxesNode, BoxGS[].class);
- this.project = project;
-
- if (!project.getDiagramResourceNames().contains(resourceName)) {
- var closest = project.getDiagramResourceNames()
- .stream()
- .max(Comparator.comparingDouble(a -> new WordSimUtils().getSimilarity(a, resourceName)))
- .orElse("NONE");
- throw new IllegalArgumentException(String.format("The resource name \"%s\" doesn't match any known resource of \"%s\". Did you mean \"%s\"?",
- resourceName, project.getProjectName(), closest));
- }
-
- this.resourceName = resourceName;
- addBoxes(boxes);
- }
-
- DiagramGS(DiagramProject project, String path, BoxGS[] boxes) {
- this.project = project;
- this.resourceName = path;
- addBoxes(boxes);
- }
-
- private void addBoxes(BoxGS[] boxes) {
- for (BoxGS boxGS : boxes) {
- addBox(boxGS);
- addBoxes(boxGS.getSubBoxes());
- }
- }
-
- @Override
- public String getResourceName() {
- return resourceName;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- } else if (obj instanceof DiagramGS other) {
- return resourceName.equals(other.resourceName);
- }
- return false;
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(resourceName);
- }
-
- @Override
- public File getLocation() {
- return project.getDiagramsGoldStandardFile();
- }
-
- @Override
- public void addBox(Box box) {
- properBoxes.add(box);
- }
-
- @Override
- public boolean removeBox(Box box) {
- return properBoxes.remove(box);
- }
-
- @Override
- public List getBoxes() {
- return List.copyOf(properBoxes);
- }
-
- @Override
- public void addTextBox(TextBox textBox) {
- properTextBoxes.add(textBox);
- }
-
- @Override
- public boolean removeTextBox(TextBox textBox) {
- return properTextBoxes.remove(textBox);
- }
-
- @Override
- public List getTextBoxes() {
- return List.copyOf(properTextBoxes);
- }
-
- @Override
- public void addConnector(Connector connector) {
- throw new NotImplementedException();
- }
-
- @Override
- public boolean removeConnector(Connector connector) {
- throw new NotImplementedException();
- }
-
- @Override
- public List getConnectors() {
- throw new NotImplementedException();
- }
-
- /**
- * {@return the list of diagram-sentence trace links associated with this diagram} The sentences are used to resolve the sentence numbers to actual
- * sentences from the document.
- *
- * @param sentences the sentences from the text
- */
- public List getTraceLinks(List sentences) {
- var traceLinks = Lists.mutable.empty();
- for (Box box : properBoxes) {
- if (box instanceof BoxGS boxGS) {
- var boxTLs = boxGS.getTraceLinks(sentences).stream().toList();
- traceLinks.addAll(boxTLs);
- }
- }
- assert traceLinks.size() == traceLinks.distinct().size(); //Otherwise there are duplicates in the goldstandard
- return traceLinks;
- }
-
- /**
- * Retrieves a distinct list of diagram text trace links associated with the diagram
- *
- * @param textGoldstandard Partial path to the goldstandard text file
- * @return List of tracelinks
- */
- public List getTraceLinks(List sentences, String textGoldstandard) {
- if (textGoldstandard == null)
- return getTraceLinks(sentences);
- return getTraceLinks(sentences).stream().filter(t -> textGoldstandard.contains(t.getGoldStandard())).distinct().toList();
- }
-
- public DiagramProject getDiagramProject() {
- return project;
- }
-
- @Override
- public String toString() {
- return getShortResourceName();
- }
-}
diff --git a/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/DiagramsGS.java b/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/DiagramsGS.java
deleted file mode 100644
index c387e13..0000000
--- a/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/DiagramsGS.java
+++ /dev/null
@@ -1,13 +0,0 @@
-/* Licensed under MIT 2023-2024. */
-package edu.kit.kastel.mcse.ardoco.core.api.diagramrecognition;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/**
- * Encapsulates multiple {@link DiagramGS} instances from the gold standard.
- */
-public class DiagramsGS {
- @JsonProperty("$schema")
- public String schema;
- public DiagramGS[] diagrams;
-}
diff --git a/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/TextBoxDeserializer.java b/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/TextBoxDeserializer.java
deleted file mode 100644
index 9c9092d..0000000
--- a/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/TextBoxDeserializer.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Licensed under MIT 2023-2024. */
-package edu.kit.kastel.mcse.ardoco.core.api.diagramrecognition;
-
-import java.io.IOException;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.databind.DeserializationContext;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
-
-/**
- * Deserializes a JSON text box node into a {@link TextBox}. For example the JSON node
- *
- * {@code
- * [
- * {
- * "text": "User Management",
- * "boundingBox": {
- * "x": 12,
- * "y": 30,
- * "w": 50,
- * "h": 60
- * }
- * }
- * ]
- * }
is converted to a text box with {@code text = "User Management"} and its bounding box with {@code minX = 12, minY
- * = 30, maxX = 62, maxY = 90}.
- */
-public class TextBoxDeserializer extends StdDeserializer {
- public TextBoxDeserializer() {
- this(TextBox.class);
- }
-
- protected TextBoxDeserializer(Class> vc) {
- super(vc);
- }
-
- @Override
- public TextBox deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException {
- JsonNode node = jsonParser.getCodec().readTree(jsonParser);
-
- var text = node.get("text").asText();
- var boundingBox = deserializationContext.readValue(node.get("boundingBox").traverse(jsonParser.getCodec()), BoundingBox.class);
- return new TextBox(boundingBox.minX(), boundingBox.minY(), boundingBox.width(), boundingBox.height(), 1, text);
- }
-}
diff --git a/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/TraceLinkGS.java b/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/TraceLinkGS.java
deleted file mode 100644
index 5b9af45..0000000
--- a/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/TraceLinkGS.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/* Licensed under MIT 2023-2024. */
-package edu.kit.kastel.mcse.ardoco.core.api.diagramrecognition;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.stream.Collectors;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-import edu.kit.kastel.mcse.ardoco.core.api.models.tracelinks.diagrams.DiagramGoldStandardTraceLink;
-import edu.kit.kastel.mcse.ardoco.core.api.models.tracelinks.diagrams.TraceType;
-import edu.kit.kastel.mcse.ardoco.core.api.text.Sentence;
-import edu.kit.kastel.mcse.ardoco.core.architecture.Deterministic;
-
-/**
- * Encapsulates the diagram-sentence trace links to its parent diagram element. Used for deserialization purposes.
- *
- * @param name the name of the text file the sentence numbers refer to
- * @param sentenceIds contains the sentence number of each trace link
- * @param typedTracelinks a set of trace links with additional information
- */
-@Deterministic
-public record TraceLinkGS(@JsonProperty("name") String name, @JsonProperty("sentences") int[] sentenceIds,
- @JsonProperty("typedTracelinks") TypedTraceLinkGS[] typedTracelinks) implements Serializable {
- /**
- * {@return the set of diagram-sentence trace links associated with this box} The sentences are used to resolve the sentence numbers to actual sentences
- * from the document.
- *
- * @param boxGS the box this trace link points to
- * @param sentences the sentences from the text
- */
- public Set toTraceLinks(BoxGS boxGS, List sentences) {
- //From sentences, set default trace type ENTITY
- var list = toTraceLinks(boxGS, sentences, sentenceIds, TraceType.ENTITY);
- //From typed trace links
- var typedList = List.of();
- if (typedTracelinks != null)
- typedList = Arrays.stream(typedTracelinks).flatMap(typed -> toTraceLinks(boxGS, sentences, typed.sentences(), typed.traceType()).stream()).toList();
- list.addAll(typedList);
-
- var set = new LinkedHashSet<>(list);
- assert set.size() == list.size(); //Otherwise there are duplicates in the goldstandard
- return set;
- }
-
- private List toTraceLinks(BoxGS boxGS, List sentences, int[] sentenceIds, TraceType traceType) {
- var project = boxGS.getDiagram().getDiagramProject();
- return Arrays.stream(sentenceIds)
- .mapToObj(i -> new DiagramGoldStandardTraceLink(boxGS, sentences.get(i - 1), project.name(), name, traceType))
- .collect(Collectors.toCollection(ArrayList::new));
- }
-}
diff --git a/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/TypedTraceLinkGS.java b/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/TypedTraceLinkGS.java
deleted file mode 100644
index daaccf4..0000000
--- a/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/TypedTraceLinkGS.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/* Licensed under MIT 2023-2024. */
-package edu.kit.kastel.mcse.ardoco.core.api.diagramrecognition;
-
-import java.io.Serializable;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-import edu.kit.kastel.mcse.ardoco.core.api.models.tracelinks.diagrams.TraceType;
-
-/**
- * Encapsulates a diagram-sentence trace link of a specific type.
- *
- * @param sentences
- * @param traceType
- */
-public record TypedTraceLinkGS(@JsonProperty("sentences") int[] sentences, @JsonProperty("traceType") TraceType traceType) implements Serializable {
-}
diff --git a/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/tests/eval/DiagramProject.java b/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/tests/eval/DiagramProject.java
deleted file mode 100644
index 40d4cc5..0000000
--- a/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/tests/eval/DiagramProject.java
+++ /dev/null
@@ -1,305 +0,0 @@
-/* Licensed under MIT 2021-2024. */
-package edu.kit.kastel.mcse.ardoco.core.tests.eval;
-
-import static edu.kit.kastel.mcse.ardoco.core.common.JsonHandling.createObjectMapper;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.*;
-import java.util.function.Predicate;
-import java.util.stream.Collectors;
-
-import com.fasterxml.jackson.databind.InjectableValues;
-
-import edu.kit.kastel.mcse.ardoco.core.api.diagramrecognition.DiagramGS;
-import edu.kit.kastel.mcse.ardoco.core.api.diagramrecognition.DiagramsGS;
-import edu.kit.kastel.mcse.ardoco.core.api.models.ArchitectureModelType;
-import edu.kit.kastel.mcse.ardoco.core.api.models.Metamodel;
-import edu.kit.kastel.mcse.ardoco.core.api.models.tracelinks.diagrams.DiagramGoldStandardTraceLink;
-import edu.kit.kastel.mcse.ardoco.core.api.models.tracelinks.diagrams.TraceType;
-import edu.kit.kastel.mcse.ardoco.core.api.text.Sentence;
-import edu.kit.kastel.mcse.ardoco.core.common.tuple.Pair;
-import edu.kit.kastel.mcse.ardoco.core.tests.eval.results.ExpectedResults;
-
-/**
- * This enum captures the different case studies that are used for evaluation in the integration tests.
- */
-public enum DiagramProject implements GoldStandardDiagramsWithTLR {
- MEDIASTORE(//
- Project.MEDIASTORE, //
- "/benchmark/mediastore/goldstandards/goldstandard_sad_id_2016.json", //
- new ExpectedResults(.87, .93, .9, .99, .89, .99), //Expected Diagram-Sentence TLR results (Mock)
- new ExpectedResults(.81, .93, .87, .98, .86, .98), //Expected Diagram-Sentence TLR results (No-Mock)
- new ExpectedResults(.89, .72, .68, .94, .72, .96), //Expected MME results (Mock)
- new ExpectedResults(.89, .72, .68, .94, .72, .96), //Expected MME results (No-Mock)
- new ExpectedResults(.76, .79, .77, .97, .76, 1), //Expected SAD-SAM TLR results (Mock),
- new ExpectedResults(.76, .79, .77, .97, .76, .99), //Expected SAD-SAM TLR results (No-Mock),
- List.of("/benchmark/mediastore/diagrams_2016/ArchitectureWithCache.png") //
- ), //
- TEASTORE( //
- Project.TEASTORE, //
- "/benchmark/teastore/goldstandards/goldstandard_sad_id_2018.json", //
- new ExpectedResults(.95, .74, .83, .97, .82, 1), //Expected Diagram-Sentence TLR results (Mock)
- new ExpectedResults(.65, .74, .69, .93, .65, .95), //Expected Diagram-Sentence TLR results (No-Mock)
- new ExpectedResults(1, .70, .80, .96, .83, 1), //Expected MME results (Mock)
- new ExpectedResults(.96, .70, .78, .95, .80, 1), //Expected MME results (No-Mock)
- new ExpectedResults(1, .74, .85, .98, .85, 1), //Expected SAD-SAM TLR results (Mock),
- new ExpectedResults(1, .74, .85, .98, .85, 1), //Expected SAD-SAM TLR results (No-Mock),
- List.of("/benchmark/teastore/diagrams_2018/Overview.jpg") //
- ), //
- TEAMMATES( //
- Project.TEAMMATES, //
- "/benchmark/teammates/goldstandards/goldstandard_sad_id_2023.json", //
- new ExpectedResults(.60, .67, .63, .98, .62, .99), //Expected Diagram-Sentence TLR results (Mock)
- new ExpectedResults(.37, .25, .30, .97, .29, .99), //Expected Diagram-Sentence TLR results (No-Mock)
- new ExpectedResults(.61, .70, .53, .96, .58, .97), //Expected MME results (Mock)
- new ExpectedResults(.61, .70, .53, .96, .58, .97), //Expected MME results (No-Mock)
- new ExpectedResults(.73, .88, .80, .98, .79, 1), //Expected SAD-SAM TLR results (Mock),
- new ExpectedResults(.73, .88, .80, .98, .79, .99), //Expected SAD-SAM TLR results (No-Mock),
- List.of("/benchmark/teammates/diagrams_2023/highlevelArchitecture.png", "/benchmark/teammates/diagrams_2023/packageDiagram.png") //
- ), //
- BIGBLUEBUTTON( //
- Project.BIGBLUEBUTTON, //
- "/benchmark/bigbluebutton/goldstandards/goldstandard_sad_id_2021.json", //
- new ExpectedResults(.79, .72, .75, .97, .74, .99), //Expected Diagram-Sentence TLR results (Mock)
- new ExpectedResults(.76, .61, .67, .97, .66, .99), //Expected Diagram-Sentence TLR results (No-Mock)
- new ExpectedResults(.93, .38, .39, .96, .55, .99), //Expected MME results (Mock)
- new ExpectedResults(.93, .38, .39, .96, .55, .99), //Expected MME results (No-Mock)
- new ExpectedResults(.87, .82, .85, .98, .84, 1), //Expected SAD-SAM TLR results (Mock),
- new ExpectedResults(.87, .82, .85, .98, .84, .99), //Expected SAD-SAM TLR results (No-Mock),
- List.of("/benchmark/bigbluebutton/diagrams_2021/bbb-arch-overview.png") //
- ), //
- TEASTORE_HISTORICAL( //
- Project.TEASTORE_HISTORICAL, //
- "/benchmark/teastore/goldstandards/goldstandard_sad_id_2018.json", //
- new ExpectedResults(1, .92, .96, .99, .95, 1), //Expected Diagram-Sentence TLR results (Mock)
- new ExpectedResults(.77, .92, .84, .96, .82, .96), //Expected Diagram-Sentence TLR results (No-Mock)
- new ExpectedResults(1, .91, .91, .99, .95, 1), //Expected MME results (Mock)
- new ExpectedResults(.84, .91, .87, .98, .86, .99), //Expected MME results (No-Mock)
- new ExpectedResults(1, .93, .96, .99, .96, 1), //Expected SAD-SAM TLR results (Mock),
- new ExpectedResults(1, .93, .96, .99, .96, 1), //Expected SAD-SAM TLR results (No-Mock),
- List.of("/benchmark/teastore/diagrams_2018/Overview.jpg") //
- ), //
- TEAMMATES_HISTORICAL( //
- Project.TEAMMATES_HISTORICAL, //
- "/benchmark/teammates/goldstandards/goldstandard_sad_id_2015.json", //
- new ExpectedResults(.62, .71, .66, .98, .66, .99), //Expected Diagram-Sentence TLR results (Mock)
- new ExpectedResults(.51, .39, .44, .98, .43, .99), //Expected Diagram-Sentence TLR results (No-Mock)
- new ExpectedResults(.31, .69, .42, .93, .44, .94), //Expected MME results (Mock)
- new ExpectedResults(.45, .69, .49, .95, .53, .96), //Expected MME results (No-Mock)
- new ExpectedResults(.72, .76, .74, .98, .73, 1), //Expected SAD-SAM TLR results (Mock),
- new ExpectedResults(.68, .76, .72, .98, .71, .99), //Expected SAD-SAM TLR results (No-Mock),
- List.of("/benchmark/teammates/diagrams_2015/highlevelArchitecture.png", "/benchmark/teammates/diagrams_2015/packageDiagram.png") //
- ), //
- BIGBLUEBUTTON_HISTORICAL( //
- Project.BIGBLUEBUTTON_HISTORICAL, //
- "/benchmark/bigbluebutton/goldstandards/goldstandard_sad_id_2015.json", //
- new ExpectedResults(.73, .91, .81, .98, .8, .98), //Expected Diagram-Sentence TLR results (Mock)
- new ExpectedResults(.69, .77, .73, .97, .71, .98), //Expected Diagram-Sentence TLR results (No-Mock)
- new ExpectedResults(.07, .20, .10, .73, -0.01, .79), //Expected MME results (Mock)
- new ExpectedResults(.07, .20, .10, .73, -0.01, .79), //Expected MME results (No-Mock)
- new ExpectedResults(.77, .61, .68, .97, .68, 1), //Expected SAD-SAM TLR results (Mock),
- new ExpectedResults(.77, .61, .68, .97, .68, .99), //Expected SAD-SAM TLR results (No-Mock),
- List.of("/benchmark/bigbluebutton/diagrams_2015/bbb-arch-overview.png") //
- );
-
- private final Project baseProject;
- private final String goldStandardDiagrams;
-
- private final ExpectedResults expectedDiagramSentenceTlrResultsMock;
- private final ExpectedResults expectedDiagramSentenceTlrResultsNoMock;
- private final ExpectedResults expectedMMEResultsMock;
- private final ExpectedResults expectedMMEResultsNoMock;
- private final ExpectedResults expectedSadSamTlrResultsMock;
- private final ExpectedResults expectedSadSamTlrResultsNoMock;
-
- private final SortedSet diagramResourceNames;
-
- private final ArchitectureModelType architectureModelType;
- private final SortedSet resourceNames;
-
- /**
- * Sole constructor for a project with diagrams.
- *
- * @param project the base {@link Project} that is extended
- * @param goldStandardDiagrams the name of the JSON file containing the combined gold standard
- * @param expectedDiagramSentenceTlrResultsMock the {@link ExpectedResults} for the Diagram-Sentence TLR using gold standard diagrams
- * @param expectedDiagramSentenceTlrResultsNoMock the {@link ExpectedResults} for the Diagram-Sentence TLR
- * @param expectedMMEResultsMock the {@link ExpectedResults} for the MME inconsistency detection using gold standard diagrams
- * @param expectedMMEResultsNoMock the {@link ExpectedResults} for the MME inconsistency detection using the diagram recognition
- * @param expectedSadSamTlrResultsMock the {@link ExpectedResults} for the SAD SAM TLR using gold standard diagrams
- * @param expectedSadSamTlrResultsNoMock the {@link ExpectedResults} for the SAD SAM TLR
- * @param diagramResourceNames a set of diagram-related resources
- */
- DiagramProject(Project project, String goldStandardDiagrams, ExpectedResults expectedDiagramSentenceTlrResultsMock,
- ExpectedResults expectedDiagramSentenceTlrResultsNoMock, ExpectedResults expectedMMEResultsMock, ExpectedResults expectedMMEResultsNoMock,
- ExpectedResults expectedSadSamTlrResultsMock, ExpectedResults expectedSadSamTlrResultsNoMock, List diagramResourceNames) {
- //We need to keep the paths as well, because the actual files are just temporary at this point due to jar packaging
- this.goldStandardDiagrams = goldStandardDiagrams;
- this.baseProject = project;
- this.expectedDiagramSentenceTlrResultsMock = expectedDiagramSentenceTlrResultsMock;
- this.expectedDiagramSentenceTlrResultsNoMock = expectedDiagramSentenceTlrResultsNoMock;
- this.expectedMMEResultsMock = expectedMMEResultsMock;
- this.expectedMMEResultsNoMock = expectedMMEResultsNoMock;
- this.expectedSadSamTlrResultsMock = expectedSadSamTlrResultsMock;
- this.expectedSadSamTlrResultsNoMock = expectedSadSamTlrResultsNoMock;
- this.diagramResourceNames = new TreeSet<>(diagramResourceNames);
- this.architectureModelType = setupArchitectureModelType();
- var set = new TreeSet<>(project.getResourceNames());
- set.add(goldStandardDiagrams);
- set.addAll(diagramResourceNames);
- resourceNames = set;
- }
-
- @Override
- public String getProjectName() {
- return this.name();
- }
-
- @Override
- public SortedSet getResourceNames() {
- return new TreeSet<>(resourceNames);
- }
-
- /**
- * TODO This should probably be part of {@link ArchitectureModelType}
- */
- public Metamodel getMetamodel() {
- return switch (architectureModelType) {
- case PCM, UML -> Metamodel.ARCHITECTURE;
- };
- }
-
- public ArchitectureModelType getArchitectureModelType() {
- return architectureModelType;
- }
-
- private ArchitectureModelType setupArchitectureModelType() {
- if (baseProject.getModelResourceName().contains("/pcm/")) {
- return ArchitectureModelType.PCM;
- } else if (baseProject.getModelResourceName().contains("/uml/")) {
- return ArchitectureModelType.UML;
- } else {
- throw new IllegalArgumentException(
- "The model file could not be resolved to a known ArchitectureModelType. Please comply with the mandatory folder structure!");
- }
- }
-
- /**
- * Returns an {@link Optional} containing the project that has a name that equals the given name, ignoring case.
- *
- * @param name the name of the project
- * @return the Optional containing the project with the given name or is empty if no such is found.
- */
- public static Optional getFromName(String name) {
- for (DiagramProject project : DiagramProject.values()) {
- if (project.name().equalsIgnoreCase(name)) {
- return Optional.of(project);
- }
- }
- return Optional.empty();
- }
-
- /**
- * {@return the list of historical diagram projects}
- */
- public static List getHistoricalProjects() {
- return filterForHistoricalProjects(List.of(values()));
- }
-
- /**
- * {@return the list of non-historical diagram projects}
- */
- public static List getNonHistoricalProjects() {
- return filterForNonHistoricalProjects(List.of(values()));
- }
-
- private static > List filterForHistoricalProjects(Collection unfilteredProjects) {
- return filterForProjects(unfilteredProjects, p -> p.name().endsWith("HISTORICAL"));
- }
-
- private static > List filterForNonHistoricalProjects(Collection unfilteredProjects) {
- return filterForProjects(unfilteredProjects, p -> !p.name().endsWith("HISTORICAL"));
- }
-
- private static > List filterForProjects(Collection unfilteredProjects, Predicate filter) {
- return unfilteredProjects.stream().filter(filter).toList();
- }
-
- @Override
- public String getDiagramsGoldStandardResourceName() {
- return goldStandardDiagrams;
- }
-
- @Override
- public File getDiagramsGoldStandardFile() {
- return ProjectHelper.loadFileFromResources(goldStandardDiagrams);
- }
-
- @Override
- public ExpectedResults getExpectedDiagramSentenceTlrResultsWithMock() {
- return expectedDiagramSentenceTlrResultsMock;
- }
-
- @Override
- public ExpectedResults getExpectedDiagramSentenceTlrResults() {
- return expectedDiagramSentenceTlrResultsNoMock;
- }
-
- @Override
- public ExpectedResults getExpectedMMEResults() {
- return expectedMMEResultsNoMock;
- }
-
- @Override
- public ExpectedResults getExpectedMMEResultsWithMock() {
- return expectedMMEResultsMock;
- }
-
- @Override
- public ExpectedResults getExpectedSadSamResults() {
- return expectedSadSamTlrResultsNoMock;
- }
-
- @Override
- public ExpectedResults getExpectedSadSamResultsWithMock() {
- return expectedSadSamTlrResultsMock;
- }
-
- @Override
- public Set getDiagramTraceLinks(List sentences) {
- return getDiagramTraceLinks(sentences, baseProject.getTextResourceName());
- }
-
- @Override
- public Map> getDiagramTraceLinksAsMap(List sentences) {
- var traceLinks = getDiagramTraceLinks(sentences);
- return traceLinks.stream().collect(Collectors.groupingBy(DiagramGoldStandardTraceLink::getTraceType));
- }
-
- private Set getDiagramTraceLinks(List sentences, String textGoldstandard) {
- return getDiagramsGoldStandard().stream().flatMap(d -> d.getTraceLinks(sentences, textGoldstandard).stream()).collect(Collectors.toSet());
- }
-
- @Override
- public Set getDiagramsGoldStandard() {
- try {
- var objectMapper = createObjectMapper();
- var file = getDiagramsGoldStandardFile();
- objectMapper.setInjectableValues(new InjectableValues.Std().addValue(DiagramProject.class, this));
- return new LinkedHashSet<>(List.of(objectMapper.readValue(file, DiagramsGS.class).diagrams));
- } catch (IOException e) {
- throw new IllegalStateException(e);
- }
- }
-
- @Override
- public SortedSet getDiagramResourceNames() {
- return new TreeSet<>(diagramResourceNames);
- }
-
- @Override
- public List> getDiagramData() {
- return getDiagramResourceNames().stream().map(rn -> new Pair<>(rn, ProjectHelper.loadFileFromResources(rn))).toList();
- }
-}
diff --git a/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/tests/eval/GoldStandardDiagramTLR.java b/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/tests/eval/GoldStandardDiagramTLR.java
deleted file mode 100644
index d1e2b82..0000000
--- a/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/tests/eval/GoldStandardDiagramTLR.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/* Licensed under MIT 2023-2024. */
-package edu.kit.kastel.mcse.ardoco.core.tests.eval;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import edu.kit.kastel.mcse.ardoco.core.api.models.tracelinks.diagrams.DiagramGoldStandardTraceLink;
-import edu.kit.kastel.mcse.ardoco.core.api.models.tracelinks.diagrams.DiagramTextTraceLink;
-import edu.kit.kastel.mcse.ardoco.core.api.models.tracelinks.diagrams.TraceType;
-import edu.kit.kastel.mcse.ardoco.core.api.text.Sentence;
-import edu.kit.kastel.mcse.ardoco.core.tests.eval.results.ExpectedResults;
-
-/**
- * This interface represents an interface which contains a set of {@link DiagramTextTraceLink Diagram-Sentence Trace Links} for the underlying
- * {@link GoldStandardProject}.
- */
-public interface GoldStandardDiagramTLR extends GoldStandardProject {
- /**
- * {@return the set of diagram-sentence trace links} The sentence numbers from the gold standard are resolved to full sentences using the provided list of
- * sentences.
- *
- * @param sentences sentences of the text
- */
- Set getDiagramTraceLinks(List sentences);
-
- /**
- * {@return a map of diagram-sentence trace links to their corresponding trace type} The sentence numbers from the gold standard are resolved to full
- * sentences using the provided list of sentences.
- *
- * @param sentences sentences of the text
- */
- Map> getDiagramTraceLinksAsMap(List sentences);
-
- /**
- * Returns the expected results from the diagram-sentence traceability link recovery using gold standard diagrams
- *
- * @return the expectedDiagramTraceLinkResults
- */
- ExpectedResults getExpectedDiagramSentenceTlrResultsWithMock();
-
- /**
- * Returns the expected results from the diagram-sentence traceability link recovery
- *
- * @return the expectedDiagramTraceLinkResults
- */
- ExpectedResults getExpectedDiagramSentenceTlrResults();
-
- /**
- * {@return the expected results for MME detection}
- */
- ExpectedResults getExpectedMMEResults();
-
- /**
- * {@return the expected results for MME detection using the gold standard diagrams}
- */
- ExpectedResults getExpectedMMEResultsWithMock();
-
- /**
- * {@return the expected SAD-SAM trace link results}
- */
- ExpectedResults getExpectedSadSamResults();
-
- /**
- * {@return the expected SAD-SAM trace link results using the gold standard diagrams}
- */
- ExpectedResults getExpectedSadSamResultsWithMock();
-}
diff --git a/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/tests/eval/GoldStandardDiagrams.java b/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/tests/eval/GoldStandardDiagrams.java
deleted file mode 100644
index 75992de..0000000
--- a/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/tests/eval/GoldStandardDiagrams.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Licensed under MIT 2023-2024. */
-package edu.kit.kastel.mcse.ardoco.core.tests.eval;
-
-import java.io.File;
-import java.util.List;
-import java.util.Set;
-import java.util.SortedSet;
-
-import edu.kit.kastel.mcse.ardoco.core.api.diagramrecognition.DiagramGS;
-import edu.kit.kastel.mcse.ardoco.core.common.tuple.Pair;
-
-/**
- * This interface represents a gold standard, which contains a set of {@link edu.kit.kastel.mcse.ardoco.core.api.diagramrecognition.Diagram Diagrams} for the
- * underlying {@link GoldStandardProject}.
- */
-public interface GoldStandardDiagrams extends GoldStandardProject {
- /**
- * {@return the resource name that represents the diagrams gold standard for this project}
- */
- String getDiagramsGoldStandardResourceName();
-
- /**
- * {@return the File that contains the gold standard for this project}
- */
- File getDiagramsGoldStandardFile();
-
- /**
- * {@return the set of manually extracted diagrams from the gold standard}
- */
- Set getDiagramsGoldStandard();
-
- /**
- * {@return the set of diagram-related resources} For example, the list contains the names of the diagram image resources.
- */
- SortedSet getDiagramResourceNames();
-
- /**
- * {@return the list of diagram-related resources as name and file pair} For example, the list contains a pair with the name and file of each diagram image
- * resources.
- */
- List> getDiagramData();
-}
diff --git a/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/tests/eval/GoldStandardDiagramsWithTLR.java b/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/tests/eval/GoldStandardDiagramsWithTLR.java
deleted file mode 100644
index 94c1bab..0000000
--- a/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/tests/eval/GoldStandardDiagramsWithTLR.java
+++ /dev/null
@@ -1,13 +0,0 @@
-/* Licensed under MIT 2023-2024. */
-package edu.kit.kastel.mcse.ardoco.core.tests.eval;
-
-import edu.kit.kastel.mcse.ardoco.core.api.models.tracelinks.diagrams.DiagramTextTraceLink;
-
-/**
- * This interface represents a combined gold standard. The gold standard contains the
- * {@link edu.kit.kastel.mcse.ardoco.core.api.diagramrecognition.Diagram Diagrams} and
- * {@link DiagramTextTraceLink Diagram-Sentence Trace Links} associated with the underlying
- * {@link edu.kit.kastel.mcse.ardoco.core.tests.eval.GoldStandardProject}.
- */
-public interface GoldStandardDiagramsWithTLR extends GoldStandardDiagrams, GoldStandardDiagramTLR {
-}
diff --git a/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/tests/eval/helper/CombineGoldStandards.java b/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/tests/eval/helper/CombineGoldStandards.java
deleted file mode 100644
index f73ae12..0000000
--- a/tests/integration-tests/tests-base/src/main/java/edu/kit/kastel/mcse/ardoco/core/tests/eval/helper/CombineGoldStandards.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Licensed under MIT 2022-2024. */
-package edu.kit.kastel.mcse.ardoco.core.tests.eval.helper;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Scanner;
-
-public class CombineGoldStandards {
- public static void main(String[] args) throws IOException {
- try (Scanner scan = new Scanner(System.in)) {
- System.out.println("Enter TextFile1: ");
- File text1 = new File(scan.nextLine());
- System.out.println("Enter GoldStandard1: ");
- File gs1 = new File(scan.nextLine());
-
- System.out.println("Enter TextFile2: ");
- File text2 = new File(scan.nextLine());
- System.out.println("Enter GoldStandard2: ");
- File gs2 = new File(scan.nextLine());
-
- merge(text1, gs1, text2, gs2);
- }
- }
-
- private static void merge(File text1file, File gs1file, File text2file, File gs2file) throws IOException {
- System.out.println(""//
- + "Merging Text " + text1file.getAbsolutePath() + " and " + text2file.getAbsolutePath() //
- + " with " + gs1file.getAbsolutePath() + " and " + gs2file.getAbsolutePath() //
- );
-
- var text1 = read(text1file);
- var text2 = read(text2file);
- var gs1 = read(gs1file);
- var gs2 = read(gs2file);
-
- List textLines = new ArrayList<>();
- List goldStandard = new ArrayList<>();
-
- final int offset = text1.size();
-
- textLines.addAll(text1);
- textLines.addAll(text2);
- goldStandard.addAll(gs1);
-
- for (var gsLine : gs2) {
- String[] nameXLine = gsLine.strip().split(",");
- if (nameXLine.length != 2 || !nameXLine[1].matches("\\d+")) {
- System.err.println("Skipping Line: " + gsLine);
- continue;
- }
- int newLine = offset + Integer.parseInt(nameXLine[1]);
- goldStandard.add(nameXLine[0] + "," + newLine);
- }
-
- Files.write(Path.of(".", "target", "merged_text.txt"), textLines);
- Files.write(Path.of(".", "target", "merged_gs.txt"), goldStandard);
- }
-
- private static List read(File file) throws FileNotFoundException {
- try (var scan = new Scanner(file).useDelimiter("\\A")) {
- return Arrays.stream(scan.next().strip().split("\\n")).map(String::strip).toList();
- }
- }
-}
diff --git a/tests/integration-tests/tests-base/src/test/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/BoundingBoxTest.java b/tests/integration-tests/tests-base/src/test/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/BoundingBoxTest.java
deleted file mode 100644
index 111aaee..0000000
--- a/tests/integration-tests/tests-base/src/test/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/BoundingBoxTest.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Licensed under MIT 2023-2024. */
-package edu.kit.kastel.mcse.ardoco.core.api.diagramrecognition;
-
-import static org.junit.jupiter.api.Assertions.*;
-
-import org.junit.jupiter.api.Test;
-
-class BoundingBoxTest {
- double epsilon = 0.000001d;
- BoundingBox topLeft = new BoundingBox(0, 0, 10, 10);
- BoundingBox bottomLeft = new BoundingBox(0, 10, 10, 20);
- BoundingBox middle = new BoundingBox(5, 5, 15, 15);
- BoundingBox subMiddle = new BoundingBox(7, 7, 13, 13);
- BoundingBox topRight = new BoundingBox(10, 0, 20, 10);
- BoundingBox bottomRight = new BoundingBox(10, 10, 20, 20);
-
- @Test
- void area() {
- assertEquals(100.0, new BoundingBox(5, 5, 15, 15).area(), epsilon);
- assertEquals(200.0, new BoundingBox(5, 5, 25, 15).area(), epsilon);
- assertEquals(200.0, new BoundingBox(5, 5, 15, 25).area(), epsilon);
- }
-
- @Test
- void intersect() {
- assertEquals(middle.area(), middle.intersect(middle).orElseThrow().area(), epsilon);
- assertEquals(25, middle.intersect(topLeft).orElseThrow().area(), epsilon);
- assertEquals(25, middle.intersect(topRight).orElseThrow().area(), epsilon);
- assertEquals(25, middle.intersect(bottomLeft).orElseThrow().area(), epsilon);
- assertEquals(25, middle.intersect(bottomRight).orElseThrow().area(), epsilon);
- }
-
- @Test
- void union() {
- assertEquals(middle.area(), middle.union(middle), epsilon);
- assertEquals(topLeft.area() + topRight.area(), topLeft.union(topRight), epsilon);
- assertEquals(175, topLeft.union(middle), epsilon);
- }
-
- @Test
- void intersectionOverUnion() {
- assertEquals(1, middle.intersectionOverUnion(middle), epsilon);
- assertEquals(0, topLeft.intersectionOverUnion(topRight), epsilon);
- assertEquals(25.0 / 175.0, topLeft.intersectionOverUnion(middle), epsilon);
- }
-
- @Test
- void contains() {
- assertEquals(1, middle.contains(middle), epsilon);
- assertEquals(1, middle.contains(subMiddle), epsilon);
- assertEquals(0.36, subMiddle.contains(middle), epsilon);
- assertEquals(0.0, subMiddle.contains(middle, true), epsilon);
- assertEquals(0, topLeft.contains(topRight), epsilon);
- assertEquals(0.25, topLeft.contains(middle), epsilon);
- }
-
- @Test
- void containsEntirely() {
- assertTrue(middle.containsEntirely(middle));
- assertTrue(middle.containsEntirely(subMiddle));
- assertFalse(topLeft.containsEntirely(topRight));
- assertFalse(topLeft.containsEntirely(middle));
- }
-}
diff --git a/tests/integration-tests/tests-base/src/test/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/BoxGSTest.java b/tests/integration-tests/tests-base/src/test/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/BoxGSTest.java
deleted file mode 100644
index 21c2ef1..0000000
--- a/tests/integration-tests/tests-base/src/test/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/BoxGSTest.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Licensed under MIT 2023-2024. */
-package edu.kit.kastel.mcse.ardoco.core.api.diagramrecognition;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-
-import org.junit.jupiter.api.DisplayName;
-import org.junit.jupiter.api.Test;
-
-public class BoxGSTest {
- public static final BoxGS DUMMY_BOX_GS = new BoxGS(DiagramGSTest.DUMMY_DIAGRAM_GS, DummyObjects.DUMMY_BOUNDING_BOX, new TextBox[] {
- DummyObjects.DUMMY_TEXT_BOX }, new BoxGS[] {}, new TraceLinkGS[] { DummyObjects.DUMMY_TRACE_LINK_GS });
-
- @DisplayName("Evaluate Serialize BoxG")
- @Test
- void serialize() throws IOException, ClassNotFoundException {
- var byteArrayOutputStream = new ByteArrayOutputStream();
- new ObjectOutputStream(byteArrayOutputStream).writeObject(DUMMY_BOX_GS);
- var byteArrayInputStream = new ByteArrayInputStream(byteArrayOutputStream.toByteArray());
- var deserialized = (BoxGS) new ObjectInputStream(byteArrayInputStream).readObject();
-
- assertEquals(DUMMY_BOX_GS, deserialized);
- }
-}
diff --git a/tests/integration-tests/tests-base/src/test/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/DiagramGSTest.java b/tests/integration-tests/tests-base/src/test/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/DiagramGSTest.java
deleted file mode 100644
index 10036f1..0000000
--- a/tests/integration-tests/tests-base/src/test/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/DiagramGSTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Licensed under MIT 2023-2024. */
-package edu.kit.kastel.mcse.ardoco.core.api.diagramrecognition;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-
-import org.junit.jupiter.api.Test;
-
-import edu.kit.kastel.mcse.ardoco.core.tests.eval.DiagramProject;
-
-public class DiagramGSTest {
- public static final DiagramGS DUMMY_DIAGRAM_GS = new DiagramGS(DiagramProject.TEAMMATES, "SomePath.jpg", new BoxGS[] {});
-
- @Test
- void serialize() throws IOException, ClassNotFoundException {
- var serialize = DUMMY_DIAGRAM_GS;
- var byteArrayOutputStream = new ByteArrayOutputStream();
- new ObjectOutputStream(byteArrayOutputStream).writeObject(serialize);
- var byteArrayInputStream = new ByteArrayInputStream(byteArrayOutputStream.toByteArray());
- var deserialized = (DiagramGS) new ObjectInputStream(byteArrayInputStream).readObject();
-
- assertEquals(serialize.getResourceName(), deserialized.getResourceName());
- assertTrue(serialize.getBoxes().containsAll(deserialized.getBoxes()));
- assertTrue(deserialized.getBoxes().containsAll(serialize.getBoxes()));
- assertTrue(serialize.getTextBoxes().containsAll(deserialized.getTextBoxes()));
- assertTrue(deserialized.getTextBoxes().containsAll(serialize.getTextBoxes()));
- assertTrue(serialize.getTraceLinks(null).containsAll(deserialized.getTraceLinks(null)));
- assertTrue(deserialized.getTraceLinks(null).containsAll(serialize.getTraceLinks(null)));
- assertEquals(serialize.getDiagramProject(), deserialized.getDiagramProject());
- }
-}
diff --git a/tests/integration-tests/tests-base/src/test/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/DummyObjects.java b/tests/integration-tests/tests-base/src/test/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/DummyObjects.java
deleted file mode 100644
index af08e58..0000000
--- a/tests/integration-tests/tests-base/src/test/java/edu/kit/kastel/mcse/ardoco/core/api/diagramrecognition/DummyObjects.java
+++ /dev/null
@@ -1,11 +0,0 @@
-/* Licensed under MIT 2023-2024. */
-package edu.kit.kastel.mcse.ardoco.core.api.diagramrecognition;
-
-import edu.kit.kastel.mcse.ardoco.core.api.models.tracelinks.diagrams.TraceType;
-
-public class DummyObjects {
- public static final BoundingBox DUMMY_BOUNDING_BOX = new BoundingBox(0, 0, 100, 100);
- public static final TextBox DUMMY_TEXT_BOX = new TextBox(DUMMY_BOUNDING_BOX, 1.0, "Lorem Ipsum");
- public static final TraceLinkGS DUMMY_TRACE_LINK_GS = new TraceLinkGS("SomeName", new int[] { 0, 42, 404 }, new TypedTraceLinkGS[] { new TypedTraceLinkGS(
- new int[] { 3, 7, 11 }, TraceType.ENTITY_COREFERENCE) });
-}
diff --git a/tests/integration-tests/tests-base/src/test/java/edu/kit/kastel/mcse/ardoco/core/api/models/tracelinks/DiagramTextTraceLinkTest.java b/tests/integration-tests/tests-base/src/test/java/edu/kit/kastel/mcse/ardoco/core/api/models/tracelinks/DiagramTextTraceLinkTest.java
deleted file mode 100644
index ec6c5fb..0000000
--- a/tests/integration-tests/tests-base/src/test/java/edu/kit/kastel/mcse/ardoco/core/api/models/tracelinks/DiagramTextTraceLinkTest.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/* Licensed under MIT 2023-2024. */
-package edu.kit.kastel.mcse.ardoco.core.api.models.tracelinks;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.util.List;
-
-import org.eclipse.collections.api.factory.Sets;
-import org.eclipse.collections.api.set.ImmutableSet;
-import org.junit.jupiter.api.DisplayName;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.MethodSource;
-import org.mockito.Mockito;
-
-import edu.kit.kastel.mcse.ardoco.core.api.diagramrecognition.BoxGSTest;
-import edu.kit.kastel.mcse.ardoco.core.api.models.tracelinks.diagrams.DiagramGoldStandardTraceLink;
-import edu.kit.kastel.mcse.ardoco.core.api.models.tracelinks.diagrams.DiagramTextTraceLink;
-import edu.kit.kastel.mcse.ardoco.core.api.models.tracelinks.diagrams.DiagramWordTraceLink;
-import edu.kit.kastel.mcse.ardoco.core.api.text.Phrase;
-import edu.kit.kastel.mcse.ardoco.core.api.text.Sentence;
-import edu.kit.kastel.mcse.ardoco.core.api.text.Word;
-
-class DiagramTextTraceLinkTest {
- public static final Word mockWord = Mockito.mock(Word.class, Mockito.withSettings().serializable());
- public static final Sentence mockSentence = Mockito.mock(Sentence.class, Mockito.withSettings().serializable());
- public static final Phrase mockPhrase = Mockito.mock(Phrase.class, Mockito.withSettings().serializable());
-
- static {
- Mockito.doReturn("The SomeText example").when(mockPhrase).getText();
- Mockito.doReturn("SomeText").when(mockWord).getText();
- Mockito.doReturn(0).when(mockWord).getPosition();
- Mockito.doReturn(0).when(mockWord).getSentenceNo();
- Mockito.doReturn(mockPhrase).when(mockWord).getPhrase();
- Mockito.doReturn(mockSentence).when(mockWord).getSentence();
- Mockito.doReturn("The SomeText example is part of a sentence").when(mockSentence).getText();
- Mockito.doReturn(0).when(mockSentence).getSentenceNumber();
- Mockito.doReturn(1).when(mockSentence).getSentenceNumberForOutput();
- }
-
- public static final DiagramTextTraceLink DUMMY_DIAGRAM_TEXT_TRACE_LINK_SENTENCE = new DiagramGoldStandardTraceLink(BoxGSTest.DUMMY_BOX_GS, mockSentence,
- "SomeIdentifier", "SomeStandard.json");
- public static final DiagramTextTraceLink DUMMY_DIAGRAM_TEXT_TRACE_LINK_WORD = new DiagramWordTraceLink(BoxGSTest.DUMMY_BOX_GS, mockWord, "SomeIdentifier",
- 0.5, null);
-
- public static List getDummyDiaTexTraceLinks() {
- return List.of(DUMMY_DIAGRAM_TEXT_TRACE_LINK_SENTENCE, DUMMY_DIAGRAM_TEXT_TRACE_LINK_WORD);
- }
-
- @DisplayName("Evaluate Serialize DiaTextTraceLinks")
- @ParameterizedTest(name = "{0}")
- @MethodSource("getDummyDiaTexTraceLinks")
- void serialize(DiagramTextTraceLink diagramTextTraceLink) throws IOException, ClassNotFoundException {
- var byteArrayOutputStream = new ByteArrayOutputStream();
- new ObjectOutputStream(byteArrayOutputStream).writeObject(diagramTextTraceLink);
- var byteArrayInputStream = new ByteArrayInputStream(byteArrayOutputStream.toByteArray());
- var deserialized = (DiagramTextTraceLink) new ObjectInputStream(byteArrayInputStream).readObject();
-
- assertEquals(diagramTextTraceLink, deserialized);
- }
-
- @DisplayName("Evaluate Serialize DiaTextTraceLinks")
- @Test
- void serialize() throws IOException, ClassNotFoundException {
- var byteArrayOutputStream = new ByteArrayOutputStream();
- new ObjectOutputStream(byteArrayOutputStream).writeObject(Sets.immutable.fromStream(getDummyDiaTexTraceLinks().stream()));
- var byteArrayInputStream = new ByteArrayInputStream(byteArrayOutputStream.toByteArray());
- var deserialized = (ImmutableSet) new ObjectInputStream(byteArrayInputStream).readObject();
-
- assertTrue(getDummyDiaTexTraceLinks().containsAll(deserialized.toList()));
- assertTrue(deserialized.containsAll(getDummyDiaTexTraceLinks()));
- }
-}
diff --git a/tests/integration-tests/tests-base/src/test/java/edu/kit/kastel/mcse/ardoco/tests/eval/DiagramProjectTest.java b/tests/integration-tests/tests-base/src/test/java/edu/kit/kastel/mcse/ardoco/tests/eval/DiagramProjectTest.java
deleted file mode 100644
index ebbe795..0000000
--- a/tests/integration-tests/tests-base/src/test/java/edu/kit/kastel/mcse/ardoco/tests/eval/DiagramProjectTest.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Licensed under MIT 2023-2024. */
-package edu.kit.kastel.mcse.ardoco.tests.eval;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-import java.io.IOException;
-import java.nio.file.Files;
-
-import org.junit.jupiter.api.DisplayName;
-import org.junit.jupiter.api.Order;
-import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.MethodSource;
-
-import edu.kit.kastel.mcse.ardoco.core.tests.eval.DiagramProject;
-
-class DiagramProjectTest {
-
- @DisplayName("Test Diagram Project")
- @ParameterizedTest(name = "{0}")
- @MethodSource("edu.kit.kastel.mcse.ardoco.core.tests.eval.DiagramProject#getNonHistoricalProjects")
- @Order(1)
- void getDiagramsFromGoldstandard(DiagramProject diagramProject) throws IOException {
- assertEquals(-1L, Files.mismatch(diagramProject.getDiagramsGoldStandardFile().toPath(), diagramProject.getDiagramsGoldStandardFile().toPath()));
- }
-}