test_class.declarator: issueRepository
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private IssueRepository issueRepository;
test_class.type: IssueRepository
test_class.var_name: issueRepository
test_class.file: mirrorgate-api/src/test/java/com/bbva/arq/devops/ae/mirrorgate/repository/IssueRepositoryImplTest.java
test_class.identifier: IssueRepositoryImplTest
test_case.body: @Test
      public void testAggregationWithResults() {
          final ProgramIncrementNamesAggregationResult piNames = issueRepository.getProductIncrementFromPiPattern(
              Pattern.compile("^PI.*$")
          );
  
          assertEquals(piNames.getPiNames().size(), 5);
          assertTrue(piNames.getPiNames().contains("PI1"));
          assertTrue(piNames.getPiNames().contains("PI2"));
          assertTrue(piNames.getPiNames().contains("PI3"));
          assertTrue(piNames.getPiNames().contains("PI4"));
          assertTrue(piNames.getPiNames().contains("PI5"));
      }
test_case.class_method_signature: IssueRepositoryImplTest.testAggregationWithResults()
test_case.full_signature: @Test public void testAggregationWithResults()
test_case.identifier: testAggregationWithResults
test_case.invocations: getProductIncrementFromPiPattern compile assertEquals size getPiNames assertTrue contains getPiNames assertTrue contains getPiNames assertTrue contains getPiNames assertTrue contains getPiNames assertTrue contains getPiNames
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAggregationWithResults()
focal_class.declarator: mongoTemplate
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private MongoTemplate mongoTemplate;
focal_class.type: MongoTemplate
focal_class.var_name: mongoTemplate
focal_class.file: mirrorgate-api/src/main/java/com/bbva/arq/devops/ae/mirrorgate/repository/IssueRepositoryImpl.java
focal_class.identifier: IssueRepositoryImpl
focal_class.interfaces: implements IssueRepositoryCustom
focal_class.class_method_signature: IssueRepositoryImpl.getBacklogEstimateByKeywords(final List<String> boards)
focal_class.full_signature: @Override public double getBacklogEstimateByKeywords(final List<String> boards)
focal_class.identifier: getBacklogEstimateByKeywords
focal_class.modifiers: @Override public
focal_class.parameters: (final List<String> boards)
focal_class.return: double
focal_class.signature: double getBacklogEstimateByKeywords(final List<String> boards)
focal_class.class_method_signature: IssueRepositoryImpl.getSprintStatsByKeywords(final List<String> boards)
focal_class.full_signature: @Override public SprintStats getSprintStatsByKeywords(final List<String> boards)
focal_class.identifier: getSprintStatsByKeywords
focal_class.modifiers: @Override public
focal_class.parameters: (final List<String> boards)
focal_class.return: SprintStats
focal_class.signature: SprintStats getSprintStatsByKeywords(final List<String> boards)
focal_class.class_method_signature: IssueRepositoryImpl.programIncrementBoardFeatures(
          final List<String> boards,
          final List<String> programIncrementFeatures
      )
focal_class.full_signature: @Override public List<String> programIncrementBoardFeatures(
          final List<String> boards,
          final List<String> programIncrementFeatures
      )
focal_class.identifier: programIncrementBoardFeatures
focal_class.modifiers: @Override public
focal_class.parameters: (
          final List<String> boards,
          final List<String> programIncrementFeatures
      )
focal_class.return: List<String>
focal_class.signature: List<String> programIncrementBoardFeatures(
          final List<String> boards,
          final List<String> programIncrementFeatures
      )
focal_class.class_method_signature: IssueRepositoryImpl.getProductIncrementFromPiPattern(final Pattern pi)
focal_class.full_signature: @Override public ProgramIncrementNamesAggregationResult getProductIncrementFromPiPattern(final Pattern pi)
focal_class.identifier: getProductIncrementFromPiPattern
focal_class.modifiers: @Override public
focal_class.parameters: (final Pattern pi)
focal_class.return: ProgramIncrementNamesAggregationResult
focal_class.signature: ProgramIncrementNamesAggregationResult getProductIncrementFromPiPattern(final Pattern pi)
focal_method.body: @Override
      public ProgramIncrementNamesAggregationResult getProductIncrementFromPiPattern(final Pattern pi) {
  
          final Aggregation agg = newAggregation(
              match(Criteria
                  .where("type").is(IssueType.FEATURE.getName())
              ),
              project("piNames").andExclude("_id"),
              unwind("piNames"),
              match(Criteria
                  .where("piNames").is(pi)
              ),
              group().addToSet("piNames").as("piNames")
          );
  
          final AggregationResults<ProgramIncrementNamesAggregationResult> aggregationResult
              = mongoTemplate.aggregate(agg, "issue", ProgramIncrementNamesAggregationResult.class);
  
          return aggregationResult.getUniqueMappedResult();
      }
focal_method.class_method_signature: IssueRepositoryImpl.getProductIncrementFromPiPattern(final Pattern pi)
focal_method.full_signature: @Override public ProgramIncrementNamesAggregationResult getProductIncrementFromPiPattern(final Pattern pi)
focal_method.identifier: getProductIncrementFromPiPattern
focal_method.invocations: newAggregation match is where getName andExclude project unwind match is where as addToSet group aggregate getUniqueMappedResult
focal_method.modifiers: @Override public
focal_method.parameters: (final Pattern pi)
focal_method.return: ProgramIncrementNamesAggregationResult
focal_method.signature: ProgramIncrementNamesAggregationResult getProductIncrementFromPiPattern(final Pattern pi)