ps.println("Class " + numClasses++ + " ; cardinality: " + e.getValue() + "; # executions: " + t.getLength() + "; representative: " + t.getTraceId() + "; max. stack depth: " + t.getMaxEss());
@Override public boolean equals(final Object obj) { if (this == obj) { return true; } if ((obj == null) || !(obj instanceof AbstractExecutionTraceHashContainer)) { return false; } final ExecutionTrace otherTrace = ((AbstractExecutionTraceHashContainer) obj).getExecutionTrace(); if (super.getExecutionTrace().getLength() != otherTrace.getLength()) { return false; } final Iterator<Execution> otherIterator = otherTrace.getTraceAsSortedExecutionSet().iterator(); for (final Execution r1 : super.getExecutionTrace().getTraceAsSortedExecutionSet()) { final Execution r2 = otherIterator.next(); if (!this.executionsEqual(r1, r2)) { return false; } } return true; } }
@Override public boolean equals(final Object obj) { if (this == obj) { return true; } if ((obj == null) || !(obj instanceof AbstractExecutionTraceHashContainer)) { return false; } final ExecutionTrace otherTrace = ((AbstractExecutionTraceHashContainer) obj).getExecutionTrace(); if (super.getExecutionTrace().getLength() != otherTrace.getLength()) { return false; } final Iterator<Execution> otherIterator = otherTrace.getTraceAsSortedExecutionSet().iterator(); for (final Execution r1 : super.getExecutionTrace().getTraceAsSortedExecutionSet()) { final Execution r2 = otherIterator.next(); if (!this.executionsEqual(r1, r2)) { return false; } } return true; } }
/** * Tests whether the "well-known" Bookstore trace gets correctly * represented as an Execution Trace. * * @throws InvalidTraceException * If the internally assembled execution trace is somehow invalid. */ @Test public void testValidExecutionTrace() throws InvalidTraceException { final ExecutionTrace executionTrace = this.genValidBookstoreTrace(); // Perform some validity checks on the execution trace object Assert.assertEquals("Invalid length of Execution Trace", executionTrace.getLength(), this.numExecutions); Assert.assertEquals("Invalid maximum stack depth", executionTrace.getMaxEss(), 2); Assert.assertEquals("Invalid minimum tin timestamp", executionTrace.getMinTin(), this.minTin); Assert.assertEquals("Invalid maximum tout timestamp", executionTrace.getMaxTout(), this.maxTout); }