test_class.declarator: gazePlay
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private GazePlay gazePlay;
test_class.type: GazePlay
test_class.var_name: gazePlay
test_class.declarator: mockStatsContext
test_class.modifier: @Mock(answer = Answers.RETURNS_DEEP_STUBS)
      private
test_class.original_string: @Mock(answer = Answers.RETURNS_DEEP_STUBS)
      private StatsContext mockStatsContext;
test_class.type: StatsContext
test_class.var_name: mockStatsContext
test_class.declarator: mockStats
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Stats mockStats;
test_class.type: Stats
test_class.var_name: mockStats
test_class.declarator: mockShootStats
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ShootGamesStats mockShootStats;
test_class.type: ShootGamesStats
test_class.var_name: mockShootStats
test_class.declarator: mockRegion
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Region mockRegion;
test_class.type: Region
test_class.var_name: mockRegion
test_class.declarator: screenDimensionSupplier
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ScreenDimensionSupplier screenDimensionSupplier;
test_class.type: ScreenDimensionSupplier
test_class.var_name: screenDimensionSupplier
test_class.declarator: captor
test_class.modifier: @Captor
      private
test_class.original_string: @Captor
      private ArgumentCaptor<Cursor> captor;
test_class.type: ArgumentCaptor<Cursor>
test_class.var_name: captor
test_class.file: gazeplay-core/src/test/java/net/gazeplay/commons/utils/stats/StatDisplayUtilsTest.java
test_class.identifier: StatDisplayUtilsTest
test_case.body: @Test
      void shouldZoomInToLineChart() {
          final List<Long> mockShots = new ArrayList<>(List.of(1L, 2L, 3L));
  
          when(mockStats.getOriginalDurationsBetweenGoals()).thenReturn(mockShots);
          when(mockStats.computeRoundsDurationStandardDeviation()).thenReturn(0d);
          when(mockStats.computeRoundsDurationAverageDuration()).thenReturn(2L);
  
          final LineChart<String, Number> lineChart = StatDisplayUtils.buildLineChart(mockStats, mockRegion);
          final VBox parent = new VBox();
          parent.getChildren().add(lineChart);
  
          lineChart.fireEvent(mouseClickEvent(lineChart));
  
          // These assertions are a bit rubbish - need to find a way to set the parent bounds.
          assertEquals(0, lineChart.getTranslateX());
          assertEquals(0, lineChart.getTranslateY());
      }
test_case.class_method_signature: StatDisplayUtilsTest.shouldZoomInToLineChart()
test_case.full_signature: @Test void shouldZoomInToLineChart()
test_case.identifier: shouldZoomInToLineChart
test_case.invocations: of thenReturn when getOriginalDurationsBetweenGoals thenReturn when computeRoundsDurationStandardDeviation thenReturn when computeRoundsDurationAverageDuration buildLineChart add getChildren fireEvent mouseClickEvent assertEquals getTranslateX assertEquals getTranslateY
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldZoomInToLineChart()
focal_class.file: gazeplay-core/src/main/java/net/gazeplay/commons/utils/stats/StatDisplayUtils.java
focal_class.identifier: StatDisplayUtils
focal_class.class_method_signature: StatDisplayUtils.createHomeButtonInStatsScreen(GazePlay gazePlay, StatsContext statsContext)
focal_class.full_signature: public static HomeButton createHomeButtonInStatsScreen(GazePlay gazePlay, StatsContext statsContext)
focal_class.identifier: createHomeButtonInStatsScreen
focal_class.modifiers: public static
focal_class.parameters: (GazePlay gazePlay, StatsContext statsContext)
focal_class.return: HomeButton
focal_class.signature: HomeButton createHomeButtonInStatsScreen(GazePlay gazePlay, StatsContext statsContext)
focal_class.class_method_signature: StatDisplayUtils.returnToMenu(GazePlay gazePlay, StatsContext statsContext)
focal_class.full_signature: static void returnToMenu(GazePlay gazePlay, StatsContext statsContext)
focal_class.identifier: returnToMenu
focal_class.modifiers: static
focal_class.parameters: (GazePlay gazePlay, StatsContext statsContext)
focal_class.return: void
focal_class.signature: void returnToMenu(GazePlay gazePlay, StatsContext statsContext)
focal_class.class_method_signature: StatDisplayUtils.buildLineChart(Stats stats, final Region root)
focal_class.full_signature: public static LineChart<String, Number> buildLineChart(Stats stats, final Region root)
focal_class.identifier: buildLineChart
focal_class.modifiers: public static
focal_class.parameters: (Stats stats, final Region root)
focal_class.return: LineChart<String, Number>
focal_class.signature: LineChart<String, Number> buildLineChart(Stats stats, final Region root)
focal_class.class_method_signature: StatDisplayUtils.buildAreaChart(LinkedList<FixationPoint> points, final Region root)
focal_class.full_signature: public static AreaChart<Number, Number> buildAreaChart(LinkedList<FixationPoint> points, final Region root)
focal_class.identifier: buildAreaChart
focal_class.modifiers: public static
focal_class.parameters: (LinkedList<FixationPoint> points, final Region root)
focal_class.return: AreaChart<Number, Number>
focal_class.signature: AreaChart<Number, Number> buildAreaChart(LinkedList<FixationPoint> points, final Region root)
focal_class.class_method_signature: StatDisplayUtils.buildGazeMetrics(Stats stats, final Region root)
focal_class.full_signature: public static ImageView buildGazeMetrics(Stats stats, final Region root)
focal_class.identifier: buildGazeMetrics
focal_class.modifiers: public static
focal_class.parameters: (Stats stats, final Region root)
focal_class.return: ImageView
focal_class.signature: ImageView buildGazeMetrics(Stats stats, final Region root)
focal_class.class_method_signature: StatDisplayUtils.resetToOriginalIndexInParent(Node node, int originalIndexInParent)
focal_class.full_signature: private static void resetToOriginalIndexInParent(Node node, int originalIndexInParent)
focal_class.identifier: resetToOriginalIndexInParent
focal_class.modifiers: private static
focal_class.parameters: (Node node, int originalIndexInParent)
focal_class.return: void
focal_class.signature: void resetToOriginalIndexInParent(Node node, int originalIndexInParent)
focal_class.class_method_signature: StatDisplayUtils.getOriginalIndexInParent(Node node)
focal_class.full_signature: private static int getOriginalIndexInParent(Node node)
focal_class.identifier: getOriginalIndexInParent
focal_class.modifiers: private static
focal_class.parameters: (Node node)
focal_class.return: int
focal_class.signature: int getOriginalIndexInParent(Node node)
focal_class.class_method_signature: StatDisplayUtils.createZoomOutAreaChartEventHandler(XYChart<Number, Number> chart,
                                                                            final Region root, int originalIndexInParent)
focal_class.full_signature: private static EventHandler<Event> createZoomOutAreaChartEventHandler(XYChart<Number, Number> chart,
                                                                            final Region root, int originalIndexInParent)
focal_class.identifier: createZoomOutAreaChartEventHandler
focal_class.modifiers: private static
focal_class.parameters: (XYChart<Number, Number> chart,
                                                                            final Region root, int originalIndexInParent)
focal_class.return: EventHandler<Event>
focal_class.signature: EventHandler<Event> createZoomOutAreaChartEventHandler(XYChart<Number, Number> chart,
                                                                            final Region root, int originalIndexInParent)
focal_class.class_method_signature: StatDisplayUtils.createZoomOutLineChartEventHandler(XYChart<String, Number> chart,
                                                                            final Region root, int originalIndexInParent)
focal_class.full_signature: private static EventHandler<Event> createZoomOutLineChartEventHandler(XYChart<String, Number> chart,
                                                                            final Region root, int originalIndexInParent)
focal_class.identifier: createZoomOutLineChartEventHandler
focal_class.modifiers: private static
focal_class.parameters: (XYChart<String, Number> chart,
                                                                            final Region root, int originalIndexInParent)
focal_class.return: EventHandler<Event>
focal_class.signature: EventHandler<Event> createZoomOutLineChartEventHandler(XYChart<String, Number> chart,
                                                                            final Region root, int originalIndexInParent)
focal_class.class_method_signature: StatDisplayUtils.createZoomInAreaChartEventHandler(XYChart<Number, Number> chart,
                                                                           final Region root)
focal_class.full_signature: private static EventHandler<Event> createZoomInAreaChartEventHandler(XYChart<Number, Number> chart,
                                                                           final Region root)
focal_class.identifier: createZoomInAreaChartEventHandler
focal_class.modifiers: private static
focal_class.parameters: (XYChart<Number, Number> chart,
                                                                           final Region root)
focal_class.return: EventHandler<Event>
focal_class.signature: EventHandler<Event> createZoomInAreaChartEventHandler(XYChart<Number, Number> chart,
                                                                           final Region root)
focal_class.class_method_signature: StatDisplayUtils.createZoomInLineChartEventHandler(XYChart<String, Number> chart,
                                                                           final Region root)
focal_class.full_signature: private static EventHandler<Event> createZoomInLineChartEventHandler(XYChart<String, Number> chart,
                                                                           final Region root)
focal_class.identifier: createZoomInLineChartEventHandler
focal_class.modifiers: private static
focal_class.parameters: (XYChart<String, Number> chart,
                                                                           final Region root)
focal_class.return: EventHandler<Event>
focal_class.signature: EventHandler<Event> createZoomInLineChartEventHandler(XYChart<String, Number> chart,
                                                                           final Region root)
focal_class.class_method_signature: StatDisplayUtils.createZoomOutGazeMetricsEventHandler(ImageView gazeMetrics, final Region root,
                                                                              int originalIndexInParent)
focal_class.full_signature: private static EventHandler<Event> createZoomOutGazeMetricsEventHandler(ImageView gazeMetrics, final Region root,
                                                                              int originalIndexInParent)
focal_class.identifier: createZoomOutGazeMetricsEventHandler
focal_class.modifiers: private static
focal_class.parameters: (ImageView gazeMetrics, final Region root,
                                                                              int originalIndexInParent)
focal_class.return: EventHandler<Event>
focal_class.signature: EventHandler<Event> createZoomOutGazeMetricsEventHandler(ImageView gazeMetrics, final Region root,
                                                                              int originalIndexInParent)
focal_class.class_method_signature: StatDisplayUtils.createZoomInGazeMetricsEventHandler(ImageView gazeMetrics, final Region root)
focal_class.full_signature: private static EventHandler<Event> createZoomInGazeMetricsEventHandler(ImageView gazeMetrics, final Region root)
focal_class.identifier: createZoomInGazeMetricsEventHandler
focal_class.modifiers: private static
focal_class.parameters: (ImageView gazeMetrics, final Region root)
focal_class.return: EventHandler<Event>
focal_class.signature: EventHandler<Event> createZoomInGazeMetricsEventHandler(ImageView gazeMetrics, final Region root)
focal_class.class_method_signature: StatDisplayUtils.zoomOutAndReset(Node node)
focal_class.full_signature: private static void zoomOutAndReset(Node node)
focal_class.identifier: zoomOutAndReset
focal_class.modifiers: private static
focal_class.parameters: (Node node)
focal_class.return: void
focal_class.signature: void zoomOutAndReset(Node node)
focal_class.class_method_signature: StatDisplayUtils.zoomInAndCenter(Node node, double initialWidth, double initialHeight, boolean preserveRatio)
focal_class.full_signature: private static void zoomInAndCenter(Node node, double initialWidth, double initialHeight, boolean preserveRatio)
focal_class.identifier: zoomInAndCenter
focal_class.modifiers: private static
focal_class.parameters: (Node node, double initialWidth, double initialHeight, boolean preserveRatio)
focal_class.return: void
focal_class.signature: void zoomInAndCenter(Node node, double initialWidth, double initialHeight, boolean preserveRatio)
focal_class.class_method_signature: StatDisplayUtils.convert(long totalTime)
focal_class.full_signature: public static String convert(long totalTime)
focal_class.identifier: convert
focal_class.modifiers: public static
focal_class.parameters: (long totalTime)
focal_class.return: String
focal_class.signature: String convert(long totalTime)
focal_method.body: public static LineChart<String, Number> buildLineChart(Stats stats, final Region root) {
  
          final CategoryAxis xAxis = new CategoryAxis();
          final NumberAxis yAxis = new NumberAxis();
  
          LineChart<String, Number> lineChart = new LineChart<>(xAxis, yAxis);
  
          // defining a series
          Series<String, Number> series = new Series<>();
          Series<String, Number> average = new Series<>();
          Series<String, Number> sdp = new Series<>();
          Series<String, Number> sdm = new Series<>();
          // populating the series with data
  
          final List<Long> shots;
          if (stats instanceof ShootGamesStats) {
              shots = stats.getSortedDurationsBetweenGoals();
          } else {
              shots = stats.getOriginalDurationsBetweenGoals();
          }
  
          double sd = stats.computeRoundsDurationStandardDeviation();
  
          String xValue = "0";
  
          average.getData().add(new Data<>(xValue, stats.computeRoundsDurationAverageDuration()));
          sdp.getData().add(new Data<>(xValue, stats.computeRoundsDurationAverageDuration() + sd));
          sdm.getData().add(new Data<>(xValue, stats.computeRoundsDurationAverageDuration() - sd));
  
          int i = 1;
  
          for (Long duration : shots) {
              xValue = Integer.toString(i);
              series.getData().add(new Data<>(xValue, duration));
              average.getData().add(new Data<>(xValue, stats.computeRoundsDurationAverageDuration()));
  
              sdp.getData().add(new Data<>(xValue, stats.computeRoundsDurationAverageDuration() + sd));
              sdm.getData().add(new Data<>(xValue, stats.computeRoundsDurationAverageDuration() - sd));
              i++;
          }
  
          xValue = Integer.toString(i);
          average.getData().add(new Data<>(xValue, stats.computeRoundsDurationAverageDuration()));
          sdp.getData().add(new Data<>(xValue, stats.computeRoundsDurationAverageDuration() + sd));
          sdm.getData().add(new Data<>(xValue, stats.computeRoundsDurationAverageDuration() - sd));
  
          lineChart.setCreateSymbols(false);
  
          lineChart.getData().add(average);
          lineChart.getData().add(sdp);
          lineChart.getData().add(sdm);
          lineChart.getData().add(series);
  
          series.getNode().setStyle("-fx-stroke-width: 3; -fx-stroke: red; -fx-stroke-dash-offset:5;");
          average.getNode().setStyle("-fx-stroke-width: 1; -fx-stroke: lightgreen;");
          sdp.getNode().setStyle("-fx-stroke-width: 1; -fx-stroke: grey;");
          sdm.getNode().setStyle("-fx-stroke-width: 1; -fx-stroke: grey;");
  
          EventHandler<Event> openLineChartEvent = createZoomInLineChartEventHandler(lineChart, root);
  
          lineChart.addEventHandler(MouseEvent.MOUSE_CLICKED, openLineChartEvent);
  
          lineChart.setLegendVisible(false);
  
          root.widthProperty().addListener((observable, oldValue, newValue) -> lineChart.setMaxWidth(newValue.doubleValue() * 0.4));
          root.heightProperty().addListener((observable, oldValue, newValue) -> lineChart.setMaxHeight(newValue.doubleValue() * 0.4));
          lineChart.setMaxWidth(root.getWidth() * 0.4);
          lineChart.setMaxHeight(root.getHeight() * 0.4);
  
          return lineChart;
      }
focal_method.class_method_signature: StatDisplayUtils.buildLineChart(Stats stats, final Region root)
focal_method.full_signature: public static LineChart<String, Number> buildLineChart(Stats stats, final Region root)
focal_method.identifier: buildLineChart
focal_method.invocations: getSortedDurationsBetweenGoals getOriginalDurationsBetweenGoals computeRoundsDurationStandardDeviation add getData computeRoundsDurationAverageDuration add getData computeRoundsDurationAverageDuration add getData computeRoundsDurationAverageDuration toString add getData add getData computeRoundsDurationAverageDuration add getData computeRoundsDurationAverageDuration add getData computeRoundsDurationAverageDuration toString add getData computeRoundsDurationAverageDuration add getData computeRoundsDurationAverageDuration add getData computeRoundsDurationAverageDuration setCreateSymbols add getData add getData add getData add getData setStyle getNode setStyle getNode setStyle getNode setStyle getNode createZoomInLineChartEventHandler addEventHandler setLegendVisible addListener widthProperty setMaxWidth doubleValue addListener heightProperty setMaxHeight doubleValue setMaxWidth getWidth setMaxHeight getHeight
focal_method.modifiers: public static
focal_method.parameters: (Stats stats, final Region root)
focal_method.return: LineChart<String, Number>
focal_method.signature: LineChart<String, Number> buildLineChart(Stats stats, final Region root)