test_class.file: services/src/test/java/com/vsct/supervision/notification/util/GraphiteKeyUtilTest.java
test_class.identifier: GraphiteKeyUtilTest
test_case.body: @Test
      public void testExtractGraphiteKeys() throws Exception {
          assertThat(GraphiteKeyUtil.extractGraphiteKeys("log.hdfs.adminreport.dfsRemaining"))
              .containsOnly("log.hdfs.adminreport.dfsRemaining");
  
          assertThat(GraphiteKeyUtil.extractGraphiteKeys("keepLastValue(DT.log.flume.central.*-bck_63002.channelMut*.ChannelSize)"))
              .containsOnly("DT.log.flume.central.*-bck_63002.channelMut*.ChannelSize");
  
          assertThat(GraphiteKeyUtil.extractGraphiteKeys(
              "keepLastValue(alias(sumSeries(keepLastValue(nagios.*.Check_Socket_TUX.60004)), 'Nbre de socket port : 60004'))"))
              .containsOnly("nagios.*.Check_Socket_TUX.60004");
  
          assertThat(GraphiteKeyUtil.extractGraphiteKeys(
              "keepLastValue(summarize(nonNegativeDerivative(sumSeries(Zenith.MPD.MPD.*.*.PRD1.WAS.*.any.any.soap_finTransaction-POST.POST"
                  + ".io.any.any.vol.any.1min.count)), '1h', 'sum', false))"))
              .containsOnly("Zenith.MPD.MPD.*.*.PRD1.WAS.*.any.any.soap_finTransaction-POST.POST.io.any.any.vol.any.1min.count");
  
          assertThat(GraphiteKeyUtil.extractGraphiteKeys(
              "keepLastValue(asPercent(summarize(nonNegativeDerivative(DT.sum.flume.sink.piedipartino-bck_63101.channel_SUM_AQMI"
                  + ".EventTakeSuccessCount),'1h','avg'),averageSeries(timeShift(summarize(nonNegativeDerivative(DT.sum.flume.sink"
                  + ".piedipartino-bck_63101.channel_SUM_AQMI.EventTakeSuccessCount),'1h','avg'),'1d'))))"))
              .containsOnly("DT.sum.flume.sink.piedipartino-bck_63101.channel_SUM_AQMI.EventTakeSuccessCount",
                  "DT.sum.flume.sink.piedipartino-bck_63101.channel_SUM_AQMI.EventTakeSuccessCount");
  
          assertThat(GraphiteKeyUtil.extractGraphiteKeys(
              "keepLastValue(sumSeriesWithWildcards(aliasSub(sumSeriesWithWildcards(atos.VSL.*.PRD*.{LIL|SDN}.{BANQUE_POPULAIRE,"
                  + "BANQUE_POSTALE,BNP-PARIBAS,CAISSE_D_EPARGNE,CREDIT_AGRICOLE,CREDIT_MUTUEL,GIE,HSBC,OTHERS,SOCIETE_GENERALE|SG,"
                  + "CREDIT_COOP}, 4), 'atos.VSL.*.ATO.(\\w+)', '\1'), 2))"))
              .containsOnly(
                  "atos.VSL.*.PRD*.{LIL|SDN}.{BANQUE_POPULAIRE,BANQUE_POSTALE,BNP-PARIBAS,CAISSE_D_EPARGNE,CREDIT_AGRICOLE,CREDIT_MUTUEL,"
                      + "GIE,HSBC,OTHERS,SOCIETE_GENERALE|SG,CREDIT_COOP}",
                  "atos.VSL.*.ATO.");
  
          assertThat(GraphiteKeyUtil.extractGraphiteKeys(
              "keepLastValue(scale(divideSeries(diffSeries(functional.monitoring.omniture.VSL.CCL.frequentation,averageSeries(timeShift"
                  + "(functional.monitoring.omniture.VSL.CCL.frequentation, '7d'), timeShift(functional.monitoring.omniture.VSL.CCL"
                  + ".frequentation, '14d'), timeShift(functional.monitoring.omniture.VSL.CCL.frequentation, '21d'), timeShift(functional"
                  + ".monitoring.omniture.VSL.CCL.frequentation, '28d'))), functional.monitoring.omniture.VSL.CCL.frequentation), 100))"))
              .containsOnly("functional.monitoring.omniture.VSL.CCL.frequentation");
  
          assertThat(GraphiteKeyUtil.extractGraphiteKeys("keepLastValue(asPercent(DT.MPD.collectd.corone.df-MONGODB.df_complex-used, "
              + "sumSeries(DT.MPD.collectd.corone.df-MONGODB.df_complex-free, DT.MPD.collectd.corone.df-MONGODB.df_complex-used)))"))
              .containsOnly("DT.MPD.collectd.corone.df-MONGODB.df_complex-free", "DT.MPD.collectd.corone.df-MONGODB.df_complex-used");
  
          assertThat(GraphiteKeyUtil.extractGraphiteKeys(
              "summarize(aliasByNode(DT.SUM.PREP1.collectd.{rea,villalba,zambone}.*-election_rate.gauge-1-minutes, 4),'30min','avg')"))
              .containsOnly("DT.SUM.PREP1.collectd.{rea,villalba,zambone}.*-election_rate.gauge-1-minutes");
  
          assertThat(GraphiteKeyUtil.extractGraphiteKeys(
              "diffSeries(summarize(aliasByNode(DT.SUM.PREP1.collectd{rea}.*-election_rate.gauge-1-minutes, 4),'30min','avg'),timeShift"
                  + "(summarize(aliasByNode(DT.SUM.PREP1.collectd.{rea,villalba,zambone}.*-election_rate.gauge-1-minutes, 4),'30min','avg')"
                  + ", '10min'))")).containsOnly("DT.SUM.PREP1.collectd{rea}.*-election_rate.gauge-1-minutes",
              "DT.SUM.PREP1.collectd.{rea,villalba,zambone}.*-election_rate.gauge-1-minutes");
      }
test_case.class_method_signature: GraphiteKeyUtilTest.testExtractGraphiteKeys()
test_case.full_signature: @Test public void testExtractGraphiteKeys()
test_case.identifier: testExtractGraphiteKeys
test_case.invocations: containsOnly assertThat extractGraphiteKeys containsOnly assertThat extractGraphiteKeys containsOnly assertThat extractGraphiteKeys containsOnly assertThat extractGraphiteKeys containsOnly assertThat extractGraphiteKeys containsOnly assertThat extractGraphiteKeys containsOnly assertThat extractGraphiteKeys containsOnly assertThat extractGraphiteKeys containsOnly assertThat extractGraphiteKeys containsOnly assertThat extractGraphiteKeys
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testExtractGraphiteKeys()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(GraphiteKeyUtil.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(GraphiteKeyUtil.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: GRAPHITE_KEY_PATTERN = Pattern.compile("([\\w,\\*_\\-\\{\\}]+[.])+((\\{[\\w|_,-]*\\}[.]*)*|[\\w*_-]*)[\\w*_-]*")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern GRAPHITE_KEY_PATTERN = Pattern.compile("([\\w,\\*_\\-\\{\\}]+[.])+((\\{[\\w|_,-]*\\}[.]*)*|[\\w*_-]*)[\\w*_-]*");
focal_class.type: Pattern
focal_class.var_name: GRAPHITE_KEY_PATTERN
focal_class.file: services/src/main/java/com/vsct/supervision/notification/util/GraphiteKeyUtil.java
focal_class.identifier: GraphiteKeyUtil
focal_class.class_method_signature: GraphiteKeyUtil.GraphiteKeyUtil()
focal_class.full_signature: private  GraphiteKeyUtil()
focal_class.identifier: GraphiteKeyUtil
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  GraphiteKeyUtil()
focal_class.class_method_signature: GraphiteKeyUtil.extractGraphiteKeys(String target)
focal_class.full_signature: public static Collection<String> extractGraphiteKeys(String target)
focal_class.identifier: extractGraphiteKeys
focal_class.modifiers: public static
focal_class.parameters: (String target)
focal_class.return: Collection<String>
focal_class.signature: Collection<String> extractGraphiteKeys(String target)
focal_method.body: public static Collection<String> extractGraphiteKeys(String target) {
          Collection<String> collection = new ArrayList<>();
  
          LOGGER.debug("Extracting keys from target: " + target);
          Matcher matcher = GRAPHITE_KEY_PATTERN.matcher(target);
          while (matcher.find()) {
              collection.add(matcher.group());
          }
  
          LOGGER.debug("Found " + collection.size() + " key(s): " + collection);
          return collection;
      }
focal_method.class_method_signature: GraphiteKeyUtil.extractGraphiteKeys(String target)
focal_method.full_signature: public static Collection<String> extractGraphiteKeys(String target)
focal_method.identifier: extractGraphiteKeys
focal_method.invocations: debug matcher find add group debug size
focal_method.modifiers: public static
focal_method.parameters: (String target)
focal_method.return: Collection<String>
focal_method.signature: Collection<String> extractGraphiteKeys(String target)