From 452c94c9a92d27733cbaddd676dedb3c725237cd 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 17:19:45 +0100
Subject: [PATCH] refactoring

---
 .../analysis/dev/OperationsDependency.java    | 55 +++----------------
 1 file changed, 9 insertions(+), 46 deletions(-)

diff --git a/src/main/java/kieker/analysis/dev/OperationsDependency.java b/src/main/java/kieker/analysis/dev/OperationsDependency.java
index 4d5f23fc..f24c70f9 100644
--- a/src/main/java/kieker/analysis/dev/OperationsDependency.java
+++ b/src/main/java/kieker/analysis/dev/OperationsDependency.java
@@ -23,10 +23,7 @@ public class OperationsDependency {
 
 	public void addCall(final AggregatedOperationCall call) {
 
-		// Add call (node)
 		addOperation(call);
-
-		// Add relation (edge)
 		addRelation(call);
 	}
 
@@ -40,22 +37,21 @@ public class OperationsDependency {
 	}
 
 	private void addRelation(final AggregatedOperationCall call) {
-		// TODO Rename
-		String key2 = call.getIdentifier() + ',' + call.getIdentifier();
 
-		if (!relations.containsKey(key2)) {
+		String key = call.getIdentifier() + ',' + call.getIdentifier();
+
+		if (!relations.containsKey(key)) {
 
-			// Todo rename
-			AggregatedOperationCall thiz = operations.get(call.getIdentifier());
-			AggregatedOperationCall parent = operations.get(call.getParent().getIdentifier());
+			AggregatedOperationCall callee = operations.get(call.getIdentifier());
+			AggregatedOperationCall caller = operations.get(call.getParent().getIdentifier());
 
-			OperationsDependencyRelation relation = new OperationsDependencyRelation(thiz, parent);
-			relations.put(key2, relation);
+			OperationsDependencyRelation relation = new OperationsDependencyRelation(callee, caller);
+			relations.put(key, relation);
 		}
 		if (call.isFailed()) {
-			relations.get(key2).addCall();
+			relations.get(key).addCall();
 		} else {
-			relations.get(key2).addFailuredCall();
+			relations.get(key).addFailuredCall();
 		}
 	}
 
@@ -101,39 +97,6 @@ public class OperationsDependency {
 	 * }
 	 */
 
-	/**
-	 * Wrapper class for {@link AggregatedOperationCall} for calculating the hash code and check equality of two {@link AggregatedOperationCall}.
-	 *
-	 * @author Sören Henning
-	 *
-	 */
-	private static class OperationCallWrapper {
-
-		private final AggregatedOperationCall operationCall;
-
-		public OperationCallWrapper(final AggregatedOperationCall operationCall) {
-			this.operationCall = operationCall;
-		}
-
-		public AggregatedOperationCall getOperationCall() {
-			return operationCall;
-		}
-
-		@Override
-		public int hashCode() {
-			return this.operationCall.calculateHashCode();
-		}
-
-		@Override
-		public boolean equals(final Object obj) {
-			if (!(obj instanceof OperationCallWrapper)) {
-				return false;
-			}
-			return this.operationCall.isEqualTo(((OperationCallWrapper) obj).operationCall);
-		}
-
-	}
-
 	/**
 	 * Relation between two {@link AggregatedOperationCall}. If this class will be
 	 * extended by more attributes, new hashCode() and equals() methods are required.
-- 
GitLab