From 0b0ae7e6a134f7073cbdf5ad3c058fd8c46a2ccf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B6ren=20Henning?= <stu114708@informatik.uni-kiel.de>
Date: Mon, 18 Jan 2016 16:56:06 +0100
Subject: [PATCH] add identifier for operation call

---
 .../tracediagnosis/OperationCallAggregator.java      |  2 +-
 .../traceanalysisdomain/AbstractOperationCall.java   | 12 ++++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/main/java/kieker/analysis/stage/tracediagnosis/OperationCallAggregator.java b/src/main/java/kieker/analysis/stage/tracediagnosis/OperationCallAggregator.java
index abdeb195..3a35e4f5 100644
--- a/src/main/java/kieker/analysis/stage/tracediagnosis/OperationCallAggregator.java
+++ b/src/main/java/kieker/analysis/stage/tracediagnosis/OperationCallAggregator.java
@@ -37,7 +37,7 @@ public final class OperationCallAggregator extends AbstractTransformation<Operat
 
 	@Override
 	protected void execute(final OperationCall call) {
-		final String key = call.getContainer() + "," + call.getComponent() + "," + call.getOperation() + ", " + call.getFailedCause();
+		final String key = call.getIdentifier();
 
 		if (!this.aggregationMap.containsKey(key)) {
 			final List<OperationCall> aggregationList = new ArrayList<>();
diff --git a/src/main/java/kieker/analysis/traceanalysisdomain/AbstractOperationCall.java b/src/main/java/kieker/analysis/traceanalysisdomain/AbstractOperationCall.java
index 28ea6840..d5716dc9 100644
--- a/src/main/java/kieker/analysis/traceanalysisdomain/AbstractOperationCall.java
+++ b/src/main/java/kieker/analysis/traceanalysisdomain/AbstractOperationCall.java
@@ -39,6 +39,8 @@ public abstract class AbstractOperationCall<T extends AbstractOperationCall<T>>
 	private final String component;
 	private final String operation;
 
+	private final String identifier;
+
 	private int stackDepth;
 	private int stackSize;
 	private String failedCause;
@@ -55,6 +57,8 @@ public abstract class AbstractOperationCall<T extends AbstractOperationCall<T>>
 		this.operation = operation.intern();
 		this.orderIndex = orderIndex;
 		this.failedCause = (failedCause != null) ? failedCause.intern() : null;
+
+		this.identifier = container + ',' + component + ',' + operation;
 	}
 
 	public void addChild(final T child) {
@@ -115,6 +119,14 @@ public abstract class AbstractOperationCall<T extends AbstractOperationCall<T>>
 		return this.isFailed() || this.children.parallelStream().anyMatch(T::containsFailure);
 	}
 
+	public String getIdentifier() {
+		return identifier;
+	}
+
+	public String getIdentifierWithFailure() {
+		return identifier + ',' + failedCause;
+	}
+
 	public final int calculateHashCode() {
 		final int prime = 31;
 		int result = 1;
-- 
GitLab