test_class.declarator: corruptionRiskDashboardTablesController
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private CorruptionRiskDashboardTablesController corruptionRiskDashboardTablesController;
test_class.type: CorruptionRiskDashboardTablesController
test_class.var_name: corruptionRiskDashboardTablesController
test_class.declarator: releaseFlaggingService
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private ReleaseFlaggingService releaseFlaggingService;
test_class.type: ReleaseFlaggingService
test_class.var_name: releaseFlaggingService
test_class.declarator: releaseRepository
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private FlaggedReleaseRepository releaseRepository;
test_class.type: FlaggedReleaseRepository
test_class.var_name: releaseRepository
test_class.declarator: objectMapper
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private ObjectMapper objectMapper;
test_class.type: ObjectMapper
test_class.var_name: objectMapper
test_class.file: web/src/test/java/org/devgateway/ocds/web/rest/controller/CorruptionRiskDashboardTablesControllerTest.java
test_class.identifier: CorruptionRiskDashboardTablesControllerTest
test_class.superclass: extends AbstractEndPointControllerTest
test_case.body: @Test
      public void corruptionRiskOverviewTableTest() throws Exception {
          final List<Document> result = corruptionRiskDashboardTablesController
                  .corruptionRiskOverviewTable(new YearFilterPagingRequest());
          Assert.assertEquals(1, result.size());
          Assert.assertEquals("[ocds-endpoint-001] procuringEntity name",
                  ((DBObject)result.get(0).get("procuringEntity")).get("name"));
      }
test_case.class_method_signature: CorruptionRiskDashboardTablesControllerTest.corruptionRiskOverviewTableTest()
test_case.full_signature: @Test public void corruptionRiskOverviewTableTest()
test_case.identifier: corruptionRiskOverviewTableTest
test_case.invocations: corruptionRiskOverviewTable assertEquals size assertEquals get get get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void corruptionRiskOverviewTableTest()
focal_class.file: web/src/main/java/org/devgateway/ocds/web/rest/controller/CorruptionRiskDashboardTablesController.java
focal_class.identifier: CorruptionRiskDashboardTablesController
focal_class.class_method_signature: CorruptionRiskDashboardTablesController.corruptionRiskOverviewTable(
              @ModelAttribute @Valid final YearFilterPagingRequest filter)
focal_class.full_signature: @ApiOperation(value = "Returns data to show in the table on corruption risk overview page." + "This is presented as releases only with the information in the table present and unwinded by " + "flags.flaggedStats") @RequestMapping(value = "/api/corruptionRiskOverviewTable", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json") public List<Document> corruptionRiskOverviewTable(
              @ModelAttribute @Valid final YearFilterPagingRequest filter)
focal_class.identifier: corruptionRiskOverviewTable
focal_class.modifiers: @ApiOperation(value = "Returns data to show in the table on corruption risk overview page." + "This is presented as releases only with the information in the table present and unwinded by " + "flags.flaggedStats") @RequestMapping(value = "/api/corruptionRiskOverviewTable", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json") public
focal_class.parameters: (
              @ModelAttribute @Valid final YearFilterPagingRequest filter)
focal_class.return: List<Document>
focal_class.signature: List<Document> corruptionRiskOverviewTable(
              @ModelAttribute @Valid final YearFilterPagingRequest filter)
focal_class.class_method_signature: CorruptionRiskDashboardTablesController.corruptionRiskOverviewTableCount(
              @ModelAttribute @Valid final YearFilterPagingRequest filter)
focal_class.full_signature: @ApiOperation(value = "Counts data to show in the table on corruption risk overview page.") @RequestMapping(value = "/api/corruptionRiskOverviewTable/count", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json") public List<Document> corruptionRiskOverviewTableCount(
              @ModelAttribute @Valid final YearFilterPagingRequest filter)
focal_class.identifier: corruptionRiskOverviewTableCount
focal_class.modifiers: @ApiOperation(value = "Counts data to show in the table on corruption risk overview page.") @RequestMapping(value = "/api/corruptionRiskOverviewTable/count", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json") public
focal_class.parameters: (
              @ModelAttribute @Valid final YearFilterPagingRequest filter)
focal_class.return: List<Document>
focal_class.signature: List<Document> corruptionRiskOverviewTableCount(
              @ModelAttribute @Valid final YearFilterPagingRequest filter)
focal_class.superclass: extends GenericOCDSController
focal_method.body: @ApiOperation(value = "Returns data to show in the table on corruption risk overview page."
              + "This is presented as releases only with the information in the table present and unwinded by "
              + "flags.flaggedStats")
      @RequestMapping(value = "/api/corruptionRiskOverviewTable",
              method = {RequestMethod.POST, RequestMethod.GET},
              produces = "application/json")
      public List<Document> corruptionRiskOverviewTable(
              @ModelAttribute @Valid final YearFilterPagingRequest filter) {
  
  
          Aggregation agg = newAggregation(
                  match(where("flags.flaggedStats.0").exists(true)
                          .andOperator(getYearDefaultFilterCriteria(filter,
                                  MongoConstants.FieldNames.TENDER_PERIOD_START_DATE))),
                  unwind("flags.flaggedStats"),
                  project("ocid", "tender.procuringEntity.name", "tender.tenderPeriod", "flags",
                          "tender.title", "tag")
                          .and("tender.value").as("tender.value").and("awards.value").as("awards.value")
                          .and(MongoConstants.FieldNames.AWARDS_STATUS).as(MongoConstants.FieldNames.AWARDS_STATUS)
                          .andExclude(Fields.UNDERSCORE_ID),
                  sort(Sort.Direction.DESC, "flags.flaggedStats.count"),
                  skip(filter.getSkip()),
                  limit(filter.getPageSize())
          );
  
          return releaseAgg(agg);
      }
focal_method.class_method_signature: CorruptionRiskDashboardTablesController.corruptionRiskOverviewTable(
              @ModelAttribute @Valid final YearFilterPagingRequest filter)
focal_method.full_signature: @ApiOperation(value = "Returns data to show in the table on corruption risk overview page." + "This is presented as releases only with the information in the table present and unwinded by " + "flags.flaggedStats") @RequestMapping(value = "/api/corruptionRiskOverviewTable", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json") public List<Document> corruptionRiskOverviewTable(
              @ModelAttribute @Valid final YearFilterPagingRequest filter)
focal_method.identifier: corruptionRiskOverviewTable
focal_method.invocations: newAggregation match andOperator exists where getYearDefaultFilterCriteria unwind andExclude as and as and as and project sort skip getSkip limit getPageSize releaseAgg
focal_method.modifiers: @ApiOperation(value = "Returns data to show in the table on corruption risk overview page." + "This is presented as releases only with the information in the table present and unwinded by " + "flags.flaggedStats") @RequestMapping(value = "/api/corruptionRiskOverviewTable", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json") public
focal_method.parameters: (
              @ModelAttribute @Valid final YearFilterPagingRequest filter)
focal_method.return: List<Document>
focal_method.signature: List<Document> corruptionRiskOverviewTable(
              @ModelAttribute @Valid final YearFilterPagingRequest filter)