test_class.declarator: service
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private AggregationService service;
test_class.type: AggregationService
test_class.var_name: service
test_class.file: dataprep-transformation/src/test/java/org/talend/dataprep/transformation/aggregation/AggregationServiceTest.java
test_class.identifier: AggregationServiceTest
test_class.superclass: extends TransformationBaseTest
test_case.body: @Test(expected = TDPException.class)
      public void shouldNotAggregateBecauseNoOperation() {
          service.aggregate(new AggregationParameters(), new DataSet());
      }
test_case.class_method_signature: AggregationServiceTest.shouldNotAggregateBecauseNoOperation()
test_case.full_signature: @Test(expected = TDPException.class) public void shouldNotAggregateBecauseNoOperation()
test_case.identifier: shouldNotAggregateBecauseNoOperation
test_case.invocations: aggregate
test_case.modifiers: @Test(expected = TDPException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldNotAggregateBecauseNoOperation()
focal_class.declarator: factory
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private AggregatorFactory factory;
focal_class.type: AggregatorFactory
focal_class.var_name: factory
focal_class.declarator: filterService
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private FilterService filterService;
focal_class.type: FilterService
focal_class.var_name: filterService
focal_class.file: dataprep-transformation/src/main/java/org/talend/dataprep/transformation/aggregation/AggregationService.java
focal_class.identifier: AggregationService
focal_class.class_method_signature: AggregationService.aggregate(AggregationParameters parameters, DataSet dataset)
focal_class.full_signature: public AggregationResult aggregate(AggregationParameters parameters, DataSet dataset)
focal_class.identifier: aggregate
focal_class.modifiers: public
focal_class.parameters: (AggregationParameters parameters, DataSet dataset)
focal_class.return: AggregationResult
focal_class.signature: AggregationResult aggregate(AggregationParameters parameters, DataSet dataset)
focal_method.body: public AggregationResult aggregate(AggregationParameters parameters, DataSet dataset) {
  
          // check the parameters
          if (parameters.getOperations().isEmpty() || parameters.getGroupBy().isEmpty()) {
              throw new TDPException(CommonErrorCodes.BAD_AGGREGATION_PARAMETERS);
          }
  
          AggregationResult result = new AggregationResult(parameters.getOperations().get(0).getOperator());
  
          // get the aggregator
          Aggregator aggregator = factory.get(parameters);
  
          // Build optional filter
          final DataSetMetadata metadata = dataset.getMetadata();
          final RowMetadata rowMetadata = metadata != null ? metadata.getRowMetadata() : new RowMetadata();
          final Predicate<DataSetRow> filter = filterService.build(parameters.getFilter(), rowMetadata);
  
          // process the dataset
          dataset.getRecords().filter(filter).forEach(row -> aggregator.accept(row, result));
  
          // Normalize result (perform clean / optimization now that all input was processed).
          aggregator.normalize(result);
  
          return result;
      }
focal_method.class_method_signature: AggregationService.aggregate(AggregationParameters parameters, DataSet dataset)
focal_method.full_signature: public AggregationResult aggregate(AggregationParameters parameters, DataSet dataset)
focal_method.identifier: aggregate
focal_method.invocations: isEmpty getOperations isEmpty getGroupBy getOperator get getOperations get getMetadata getRowMetadata build getFilter forEach filter getRecords accept normalize
focal_method.modifiers: public
focal_method.parameters: (AggregationParameters parameters, DataSet dataset)
focal_method.return: AggregationResult
focal_method.signature: AggregationResult aggregate(AggregationParameters parameters, DataSet dataset)