Tag List Report
The following document contains the listing of user tags found in the code. Below is the summary of the occurrences per tag.
Tag Class | Total number of occurrences | Tag strings used by tag class |
---|---|---|
Open issues in the code | 6 | TODO, FIXME, XXX |
Each tag is detailed below:
Open issues in the code
Number of occurrences found in the code: 6
org.opentrafficsim.animation.DefaultAnimationFactory | Line |
---|---|
this.animatedObjects.get(object).destroy(object.getSimulator()); | 262 |
this is now a memory leak; we don't expect static animation objects to be removed during the run | 263 |
this.animatedObjects.get(object).destroy(object.getSimulator()); | 274 |
this is now a memory leak; we don't expect static animation objects to be removed during the run | 275 |
org.opentrafficsim.draw.graphs.ContourPlotTest | Line |
looks wrong / PK assertFalse("Z value should not be NaN", Double.isNaN(z)); } } } else { if (Double.isNaN(expectedZValue)) { // if (!Double.isNaN(z)) // { // System.out.println("Oops"); // Time cellStartTime = new Time(x, SECOND); // Time cellEndTime = // new Time(Math.min(car.getOperationalPlan().getEndTime().getSI(), x + useTimeGranularity), // SECOND); // double xAtCellStartTime = initialPosition.si + initialSpeed.si * cellStartTime.si; // double xAtCellEndTime = initialPosition.si + initialSpeed.si * cellEndTime.si; // System.out.println("cellStartTime=" + cellStartTime + " cellEndTime=" + cellEndTime // + " xAtCellStartTime=" + xAtCellStartTime + " xAtCellEndTime=" + xAtCellEndTime); // double cellX = cp.getXValue(0, item); // double cellY = cp.getYValue(0, item); // double cellZ = cp.getZValue(0, item); // System.out.println("cellX=" + cellX + " cellY=" + cellY + " cellZ=" + cellZ + " timeGranularity=" // + useTimeGranularity + " distanceGranularity=" + useDistanceGranularity); // cp.getZValue(0, item); // } assertTrue("Z value should be NaN", Double.isNaN(z)); } else { assertEquals("Z value should be " + expectedZValue, expectedZValue, z, 0.0001); } if (Double.isNaN(expectedZValue)) { assertTrue("Alternate Z value should be NaN", Double.isNaN(alternateZ.doubleValue())); } else { assertEquals("Alternate Z value should be " + expectedZValue, expectedZValue, alternateZ.doubleValue(), 0.0000); } } } // System.out.println("Running simulator from " + simulator.getSimulatorTime() + " to " // + gtuFollowingModel.timeAfterCompletionOfStep(1)); stopTime = gtuFollowingModel.timeAfterCompletionOfStep(1).si; simulator.runUpToAndIncluding(new Time(stopTime, TimeUnit.BASE_SECOND)); while (simulator.isStartingOrRunning()) { try { Thread.sleep(10); } catch (InterruptedException ie) { ie = null; // ignore } } // System.out.println("Simulator is now at " + simulator.getSimulatorTime()); // Check that the time range has expanded xBins = cp.getDataPool().timeAxis.getBinCount(); bins = cp.getItemCount(0); double observedHighestTime = Double.MIN_VALUE; for (int bin = 0; bin < bins; bin++) { double xValue = cp.getXValue(0, bin); if (xValue > observedHighestTime) { observedHighestTime = xValue; } } double expectedHighestTime = Math.floor((car.getSimulator().getSimulatorTime().si - 0.001) / useTimeGranularity) * useTimeGranularity; assertEquals("Time range should run up to " + expectedHighestTime, expectedHighestTime, observedHighestTime, 0.0001); Check the updateHint method in the PointerHandler First get the panel that stores the result of updateHint (this is ugly) JLabel hintPanel = null; ChartPanel chartPanel = null; for (Component c0 : cp.getComponents()) { for (Component c1 : ((Container) c0).getComponents()) { if (c1 instanceof Container) { for (Component c2 : ((Container) c1).getComponents()) { // System.out.println("c2 is " + c2); if (c2 instanceof Container) { for (Component c3 : ((Container) c2).getComponents()) { // System.out.println("c3 is " + c3); if (c3 instanceof JLabel) { if (null == hintPanel) { hintPanel = (JLabel) c3; } else { fail("There should be only one JPanel in a ContourPlot"); } } if (c3 instanceof ChartPanel) { if (null == chartPanel) { chartPanel = (ChartPanel) c3; } else { fail("There should be only one ChartPanel in a ContourPlot"); } } } } } } } } if (null == hintPanel) { fail("Could not find a JLabel in ContourPlot"); } if (null == chartPanel) { fail("Could not find a ChartPanel in ContourPlot"); } assertEquals("Initially the text should be a single space", " ", hintPanel.getText()); PointerHandler ph = null; for (MouseListener ml : chartPanel.getMouseListeners()) { if (ml instanceof PointerHandler) { if (null == ph) { ph = (PointerHandler) ml; } else { fail("There should be only one PointerHandler on the chartPanel"); } } } if (null == ph) { fail("Could not find the PointerHandler for the chartPanel"); } ph.updateHint(1, 2); // System.out.println("Hint text is now " + hintPanel.getText()); assertFalse("Hint should not be a single space", " ".equals(hintPanel.getText())); ph.updateHint(Double.NaN, Double.NaN); assertEquals("The text should again be a single space", " ", hintPanel.getText()); | 588 |
simulator argument can be remove, but this method is currently only used in code that is commented out | 768 |