id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
33053133_1 | {
"fields": [
{
"declarator": "handler",
"modifier": "",
"original_string": "MapperInfoHandler handler;",
"type": "MapperInfoHandler",
"var_name": "handler"
},
{
"declarator": "job",
"modifier": "",
"original_string": "Job job;",
"type": "Job",
"... | {
"body": "@Test\n\tpublic void testConfigureMapperIntText_MapOnly() {\n\t\thandler.configureOutputKeyValue(job, TestMapperIntText.class, null, true);\n\t\tverify(job).setOutputKeyClass(IntWritable.class);\n\t\tverify(job).setOutputValueClass(Text.class);\n\t}",
"class_method_signature": "MapperInfoHandlerTest.test... | {
"fields": [],
"file": "core/src/main/java/com/conversantmedia/mapreduce/tool/annotation/handler/MapperInfoHandler.java",
"identifier": "MapperInfoHandler",
"interfaces": "",
"methods": [
{
"class_method_signature": "MapperInfoHandler.accept(Annotation annotation)",
"constructor": false,
... | {
"body": "@SuppressWarnings(\"rawtypes\")\n\tpublic void configureOutputKeyValue(Job job, Class<? extends Mapper> mapperClass, \n\t\t\tMapperInfo map, boolean isMapOnly) {\n\t\tMaraAnnotationUtil util = MaraAnnotationUtil.INSTANCE;\n\t\t// Try and work it out from the generics\n\t\tType[] params = util.getGenericTyp... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 33053133,
"size": 3662,
"stargazer_count": 7,
"stars": null,
"updates": null,
"url": "https://github.com/conversant/mara"
} |
33053133_17 | {
"fields": [
{
"declarator": "TEST_INPUT = \"INPUT_TABLE\"",
"modifier": "private static final",
"original_string": "private static final String TEST_INPUT = \"INPUT_TABLE\";",
"type": "String",
"var_name": "TEST_INPUT"
},
{
"declarator": "handler",
"modifier": "... | {
"body": "@Test\n\tpublic void testProcessExplicitTable() {\n\n\t\ttry {\n\t\t\tAnnotation annotation = setupDriver(new TableDriverExplicitTable());\n\t\t\thandler.process(annotation, job, null);\n\n\t\t\tverify(job, times(1)).setInputFormatClass(TableInputFormat.class);\n\t\t\tassertThat(conf.get(TableInputFormat.I... | {
"fields": [],
"file": "core/src/main/java/com/conversantmedia/mapreduce/tool/annotation/handler/TableInputAnnotationHandler.java",
"identifier": "TableInputAnnotationHandler",
"interfaces": "",
"methods": [
{
"class_method_signature": "TableInputAnnotationHandler.accept(Annotation annotation)",
... | {
"body": "@Override\n\tpublic void process(Annotation annotation, Job job, Object target)\n\t\t\tthrows ToolException {\n\n\t\tTableInput tableInput = (TableInput)annotation;\n\n\t\t// Base setup of the table mapper job\n\t\tConfiguration conf = job.getConfiguration();\n\t\tHBaseConfiguration.merge(conf, HBaseConfig... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 33053133,
"size": 3662,
"stargazer_count": 7,
"stars": null,
"updates": null,
"url": "https://github.com/conversant/mara"
} |
33053133_21 | {
"fields": [
{
"declarator": "runJob",
"modifier": "",
"original_string": "RunJob runJob;",
"type": "RunJob",
"var_name": "runJob"
}
],
"file": "core/src/test/java/com/conversantmedia/mapreduce/tool/RunJobTest.java",
"identifier": "RunJobTest",
"interfaces": "",
"super... | {
"body": "@Test\n\tpublic void testScanPackages_Resource() {\n\t\tString packages = \"package1,package2,package3\";\t\n\t\ttry {\n\t\t\tString[] result = RunJob.getBasePackagesToScanForDrivers();\n\t\t\t\n\t\t\tassertNotNull(result);\n\t\t\tassertThat(result.length, equalTo(3));\n\t\t\tassertThat(StringUtils.join(re... | {
"fields": [
{
"declarator": "SYSPROP_DRIVER_SCAN_PACKAGES = \"mara.drivers.packages\"",
"modifier": "public static final",
"original_string": "public static final String SYSPROP_DRIVER_SCAN_PACKAGES = \"mara.drivers.packages\";",
"type": "String",
"var_name": "SYSPROP_DRIVER_SCAN_P... | {
"body": "protected static String[] getBasePackagesToScanForDrivers() throws IOException {\n\t\treturn MaraAnnotationUtil.INSTANCE.getBasePackagesToScan(SYSPROP_DRIVER_SCAN_PACKAGES, RESOURCE_DRIVER_SCAN_PACKAGES);\n\t}",
"class_method_signature": "RunJob.getBasePackagesToScanForDrivers()",
"constructor": false,... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 33053133,
"size": 3662,
"stargazer_count": 7,
"stars": null,
"updates": null,
"url": "https://github.com/conversant/mara"
} |
33053133_10 | {
"fields": [
{
"declarator": "handler",
"modifier": "",
"original_string": "MapperInfoHandler handler;",
"type": "MapperInfoHandler",
"var_name": "handler"
},
{
"declarator": "job",
"modifier": "",
"original_string": "Job job;",
"type": "Job",
"... | {
"body": "@Test\n\tpublic void testConfigureMapperTableMapper_MapOnly() {\n\t\thandler.configureOutputKeyValue(job, TestTableMapper.class, null, true);\n\n\t\tverify(job, times(1)).setMapOutputKeyClass(Text.class);\n\t\tverify(job, times(1)).setMapOutputValueClass(NullWritable.class);\n\t\t\n\t\tverify(job).setOutpu... | {
"fields": [],
"file": "core/src/main/java/com/conversantmedia/mapreduce/tool/annotation/handler/MapperInfoHandler.java",
"identifier": "MapperInfoHandler",
"interfaces": "",
"methods": [
{
"class_method_signature": "MapperInfoHandler.accept(Annotation annotation)",
"constructor": false,
... | {
"body": "@SuppressWarnings(\"rawtypes\")\n\tpublic void configureOutputKeyValue(Job job, Class<? extends Mapper> mapperClass, \n\t\t\tMapperInfo map, boolean isMapOnly) {\n\t\tMaraAnnotationUtil util = MaraAnnotationUtil.INSTANCE;\n\t\t// Try and work it out from the generics\n\t\tType[] params = util.getGenericTyp... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 33053133,
"size": 3662,
"stargazer_count": 7,
"stars": null,
"updates": null,
"url": "https://github.com/conversant/mara"
} |
33053133_6 | {
"fields": [
{
"declarator": "handler",
"modifier": "",
"original_string": "MapperInfoHandler handler;",
"type": "MapperInfoHandler",
"var_name": "handler"
},
{
"declarator": "job",
"modifier": "",
"original_string": "Job job;",
"type": "Job",
"... | {
"body": "@Test\n\tpublic void testConfigureMapperSubclassing() {\n\t\thandler.configureOutputKeyValue(job, TestMapperSubclassTest.class, null, false);\n\t\tverify(job).setMapOutputKeyClass(Text.class);\n\t\tverify(job).setMapOutputValueClass(NullWritable.class);\n\t\tverify(job, never()).setOutputKeyClass(Text.clas... | {
"fields": [],
"file": "core/src/main/java/com/conversantmedia/mapreduce/tool/annotation/handler/MapperInfoHandler.java",
"identifier": "MapperInfoHandler",
"interfaces": "",
"methods": [
{
"class_method_signature": "MapperInfoHandler.accept(Annotation annotation)",
"constructor": false,
... | {
"body": "@SuppressWarnings(\"rawtypes\")\n\tpublic void configureOutputKeyValue(Job job, Class<? extends Mapper> mapperClass, \n\t\t\tMapperInfo map, boolean isMapOnly) {\n\t\tMaraAnnotationUtil util = MaraAnnotationUtil.INSTANCE;\n\t\t// Try and work it out from the generics\n\t\tType[] params = util.getGenericTyp... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 33053133,
"size": 3662,
"stargazer_count": 7,
"stars": null,
"updates": null,
"url": "https://github.com/conversant/mara"
} |
33053133_7 | {
"fields": [
{
"declarator": "handler",
"modifier": "",
"original_string": "MapperInfoHandler handler;",
"type": "MapperInfoHandler",
"var_name": "handler"
},
{
"declarator": "job",
"modifier": "",
"original_string": "Job job;",
"type": "Job",
"... | {
"body": "@Test\n\tpublic void testConfigureMapperSubclassing_MapOnly() {\n\t\thandler.configureOutputKeyValue(job, TestMapperSubclassTest.class, null, true);\n\t\tverify(job).setMapOutputKeyClass(Text.class);\n\t\tverify(job).setMapOutputValueClass(NullWritable.class);\n\t\tverify(job).setOutputKeyClass(Text.class)... | {
"fields": [],
"file": "core/src/main/java/com/conversantmedia/mapreduce/tool/annotation/handler/MapperInfoHandler.java",
"identifier": "MapperInfoHandler",
"interfaces": "",
"methods": [
{
"class_method_signature": "MapperInfoHandler.accept(Annotation annotation)",
"constructor": false,
... | {
"body": "@SuppressWarnings(\"rawtypes\")\n\tpublic void configureOutputKeyValue(Job job, Class<? extends Mapper> mapperClass, \n\t\t\tMapperInfo map, boolean isMapOnly) {\n\t\tMaraAnnotationUtil util = MaraAnnotationUtil.INSTANCE;\n\t\t// Try and work it out from the generics\n\t\tType[] params = util.getGenericTyp... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 33053133,
"size": 3662,
"stargazer_count": 7,
"stars": null,
"updates": null,
"url": "https://github.com/conversant/mara"
} |
33053133_11 | {
"fields": [
{
"declarator": "handler",
"modifier": "",
"original_string": "ReducerInfoHandler handler;",
"type": "ReducerInfoHandler",
"var_name": "handler"
},
{
"declarator": "job",
"modifier": "",
"original_string": "Job job;",
"type": "Job",
... | {
"body": "@Test\n\tpublic void testConfigureReducerIntText() {\n\t\thandler.configureOutputKeyValue(job, TestReducerIntText.class, null);\n\t\tverify(job).setOutputKeyClass(IntWritable.class);\n\t\tverify(job).setOutputValueClass(Text.class);\n\t}",
"class_method_signature": "ReducerInfoHandlerTest.testConfigureRe... | {
"fields": [],
"file": "core/src/main/java/com/conversantmedia/mapreduce/tool/annotation/handler/ReducerInfoHandler.java",
"identifier": "ReducerInfoHandler",
"interfaces": "",
"methods": [
{
"class_method_signature": "ReducerInfoHandler.accept(Annotation annotation)",
"constructor": false,
... | {
"body": "@SuppressWarnings(\"rawtypes\")\n\tprotected void configureOutputKeyValue(Job job, Class<? extends Reducer> reducerClass, ReducerInfo reducer) {\n\t\tMaraAnnotationUtil util = MaraAnnotationUtil.INSTANCE;\n\t\t// Try and work it out from the generics\n\t\tType[] params = util.getGenericTypeParams(reducerCl... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 33053133,
"size": 3662,
"stargazer_count": 7,
"stars": null,
"updates": null,
"url": "https://github.com/conversant/mara"
} |
1772795_16 | {
"fields": [
{
"declarator": "consumerName = \"ConsumerName1\"",
"modifier": "private final",
"original_string": "private final String consumerName = \"ConsumerName1\";",
"type": "String",
"var_name": "consumerName"
},
{
"declarator": "errorsToStore = null",
"mod... | {
"body": "@Test\n public void testFindMetricValuesByOperation() throws ServiceException {\n\n Collection<MetricValueAggregator> snapshotCollection = createMetricValueAggregatorsForOneConsumerWithTotalMetric(\n srvcAdminName, opName, consumerName);\n metricsStorageProvider.saveMetricSnapshot... | {
"fields": [
{
"declarator": "errorListNames = new ArrayList<String>()",
"modifier": "public static final",
"original_string": "public static final List<String> errorListNames = new ArrayList<String>();",
"type": "List<String>",
"var_name": "errorListNames"
}
],
"file": "tur... | {
"body": "@Override\n public Map<String, List<MetricValue<?>>> findMetricValuesByOperation(List<String> ipAddressList, String metricName,\n long begin, long end, boolean serverSide, int aggregationPeriod, Map<String, List<String>> filters) {\n Map<String, List<MetricValue<?>>> result = new HashMap<... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_3 | {
"fields": [
{
"declarator": "metricsStorageProvider",
"modifier": "private",
"original_string": "private MetricsStorageProvider metricsStorageProvider;",
"type": "MetricsStorageProvider",
"var_name": "metricsStorageProvider"
}
],
"file": "monitoring-metrics-jpa/src/test/jav... | {
"body": "@Test\n public void testZeroValuesAreNotSaved() throws Exception {\n long timeStamp1 = System.currentTimeMillis();\n\n MetricId metricId1 = new MetricId(\"test_count\", \"service1\", \"operation1\");\n MetricValue metricValue1 = new LongSumMetricValue(metricId1);\n MetricValu... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private volatile",
"original_string": "private volatile MetricsStorageProvider delegate;",
"type": "MetricsStorageProvider",
"var_name": "delegate"
},
{
"declarator": "entityManagerFactory",
"modifier": "priva... | {
"body": "@Override\n public void saveMetricSnapshot(long timeSnapshot, Collection<MetricValueAggregator> snapshotCollection) throws ServiceException {\n delegate.saveMetricSnapshot(timeSnapshot, snapshotCollection);\n }",
"class_method_signature": "DAOMetricsStorageProvider.saveMetricSnapshot(long ti... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_41 | {
"fields": [
{
"declarator": "entityManagerFactory",
"modifier": "private",
"original_string": "private EntityManagerFactory entityManagerFactory;",
"type": "EntityManagerFactory",
"var_name": "entityManagerFactory"
},
{
"declarator": "provider",
"modifier": "pri... | {
"body": "@Test\n public void testGetMetricValueByOperationAllServicesAllOperationsAllConsumers() {\n long now = System.currentTimeMillis();\n long oneHourAgo = now - TimeUnit.SECONDS.toMillis(3600);\n long twoHoursAgo = oneHourAgo - TimeUnit.SECONDS.toMillis(3600);\n\n CriteriaInfo cr... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final SOAMetricsQueryServiceProvider delegate;",
"type": "SOAMetricsQueryServiceProvider",
"var_name": "delegate"
}
],
"file": "turmeric-monitoring-dao-provider/src/main/java/or... | {
"body": "@Override\n public List<MetricGraphData> getMetricValue(CriteriaInfo criteriaInfo, long startTime, long duration, int step,\n String autoDelay) {\n return delegate.getMetricValue(criteriaInfo, startTime, duration, step, autoDelay);\n }",
"class_method_signature": "DAOSOAMe... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_57 | {
"fields": [
{
"declarator": "entityManagerFactory",
"modifier": "private",
"original_string": "private EntityManagerFactory entityManagerFactory;",
"type": "EntityManagerFactory",
"var_name": "entityManagerFactory"
},
{
"declarator": "provider",
"modifier": "pri... | {
"body": "@Test\n public void testGetErrorGraphForEmptyCategory() {\n long duration = 3600;// in secs\n int aggregationPeriod = 60;// in secs\n MetricCriteria metricCriteria = new MetricCriteria();\n metricCriteria.setFirstStartTime(twoMinutesAgo);\n metricCriteria.setDuration(d... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final SOAMetricsQueryServiceProvider delegate;",
"type": "SOAMetricsQueryServiceProvider",
"var_name": "delegate"
}
],
"file": "turmeric-monitoring-dao-provider/src/main/java/or... | {
"body": "@Override\n public List<MetricGraphData> getErrorGraph(String serviceName, String operationName, String consumerName,\n String errorId, String errorCategory, String errorSeverity, MetricCriteria metricCriteria) {\n return delegate.getErrorGraph(serviceName, operationName, consu... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_20 | {
"fields": [],
"file": "offline-aggregator/src/test/java/org/ebayopensource/turmeric/monitoring/aggregation/CassandraConnectionInfoTest.java",
"identifier": "CassandraConnectionInfoTest",
"interfaces": "",
"superclass": "extends BaseTest"
} | {
"body": "@Test\n public void testGetCluster() {\n assertNotNull(connectionInfo.getCluster());\n assertEquals(\"TestCluster\", connectionInfo.getCluster().describeClusterName());\n }",
"class_method_signature": "CassandraConnectionInfoTest.testGetCluster()",
"constructor": false,
"full_signature"... | {
"fields": [
{
"declarator": "keyspace = null",
"modifier": "private",
"original_string": "private Keyspace keyspace = null;",
"type": "Keyspace",
"var_name": "keyspace"
},
{
"declarator": "cluster = null",
"modifier": "private",
"original_string": "private... | {
"body": "public Cluster getCluster() {\n return cluster;\n }",
"class_method_signature": "CassandraConnectionInfo.getCluster()",
"constructor": false,
"full_signature": "public Cluster getCluster()",
"identifier": "getCluster",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"re... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_36 | {
"fields": [
{
"declarator": "entityManagerFactory",
"modifier": "private",
"original_string": "private EntityManagerFactory entityManagerFactory;",
"type": "EntityManagerFactory",
"var_name": "entityManagerFactory"
},
{
"declarator": "provider",
"modifier": "pri... | {
"body": "@Test\n public void testGetMetricsDataByOperationOneServiceOneOperationOneConsumer() {\n long now = System.currentTimeMillis();\n long twoHoursAgo = now - TimeUnit.SECONDS.toMillis(2 * 3600);\n long twoMinuteAgo = now - TimeUnit.SECONDS.toMillis(2 * 60);\n\n MetricCriteria me... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final SOAMetricsQueryServiceProvider delegate;",
"type": "SOAMetricsQueryServiceProvider",
"var_name": "delegate"
}
],
"file": "turmeric-monitoring-dao-provider/src/main/java/or... | {
"body": "@Override\n public List<MetricGroupData> getMetricsData(MetricCriteria metricCriteria,\n MetricResourceCriteria metricResourceCriteria) {\n return delegate.getMetricsData(metricCriteria, metricResourceCriteria);\n }",
"class_method_signature": "DAOSOAMetricsQueryServicePro... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_37 | {
"fields": [
{
"declarator": "entityManagerFactory",
"modifier": "private",
"original_string": "private EntityManagerFactory entityManagerFactory;",
"type": "EntityManagerFactory",
"var_name": "entityManagerFactory"
},
{
"declarator": "provider",
"modifier": "pri... | {
"body": "@Test\n public void testGetMetricsDataByConsumerAllServicesAllOperationsAllConsumers() {\n long now = System.currentTimeMillis();\n long oneHourAgo = now - TimeUnit.SECONDS.toMillis(3600);\n long twoHoursAgo = oneHourAgo - TimeUnit.SECONDS.toMillis(3600);\n\n MetricCriteria m... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final SOAMetricsQueryServiceProvider delegate;",
"type": "SOAMetricsQueryServiceProvider",
"var_name": "delegate"
}
],
"file": "turmeric-monitoring-dao-provider/src/main/java/or... | {
"body": "@Override\n public List<MetricGroupData> getMetricsData(MetricCriteria metricCriteria,\n MetricResourceCriteria metricResourceCriteria) {\n return delegate.getMetricsData(metricCriteria, metricResourceCriteria);\n }",
"class_method_signature": "DAOSOAMetricsQueryServicePro... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_21 | {
"fields": [],
"file": "offline-aggregator/src/test/java/org/ebayopensource/turmeric/monitoring/aggregation/CassandraConnectionInfoTest.java",
"identifier": "CassandraConnectionInfoTest",
"interfaces": "",
"superclass": "extends BaseTest"
} | {
"body": "@Test\n public void testGetKeyspace() {\n assertNotNull(connectionInfo.getKeyspace());\n assertEquals(\"TurmericMonitoring\", connectionInfo.getKeyspace().getKeyspaceName());\n }",
"class_method_signature": "CassandraConnectionInfoTest.testGetKeyspace()",
"constructor": false,
"full_sig... | {
"fields": [
{
"declarator": "keyspace = null",
"modifier": "private",
"original_string": "private Keyspace keyspace = null;",
"type": "Keyspace",
"var_name": "keyspace"
},
{
"declarator": "cluster = null",
"modifier": "private",
"original_string": "private... | {
"body": "public Keyspace getKeyspace() {\n return keyspace;\n }",
"class_method_signature": "CassandraConnectionInfo.getKeyspace()",
"constructor": false,
"full_signature": "public Keyspace getKeyspace()",
"identifier": "getKeyspace",
"invocations": [],
"modifiers": "public",
"parameters": "()"... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_56 | {
"fields": [
{
"declarator": "entityManagerFactory",
"modifier": "private",
"original_string": "private EntityManagerFactory entityManagerFactory;",
"type": "EntityManagerFactory",
"var_name": "entityManagerFactory"
},
{
"declarator": "provider",
"modifier": "pri... | {
"body": "@Test\n public void testGetErrorGraphForNonExistantService() {\n long duration = 3600;// in secs\n int aggregationPeriod = 60;// in secs\n MetricCriteria metricCriteria = new MetricCriteria();\n metricCriteria.setFirstStartTime(twoMinutesAgo);\n metricCriteria.setDurat... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final SOAMetricsQueryServiceProvider delegate;",
"type": "SOAMetricsQueryServiceProvider",
"var_name": "delegate"
}
],
"file": "turmeric-monitoring-dao-provider/src/main/java/or... | {
"body": "@Override\n public List<MetricGraphData> getErrorGraph(String serviceName, String operationName, String consumerName,\n String errorId, String errorCategory, String errorSeverity, MetricCriteria metricCriteria) {\n return delegate.getErrorGraph(serviceName, operationName, consu... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_40 | {
"fields": [
{
"declarator": "entityManagerFactory",
"modifier": "private",
"original_string": "private EntityManagerFactory entityManagerFactory;",
"type": "EntityManagerFactory",
"var_name": "entityManagerFactory"
},
{
"declarator": "provider",
"modifier": "pri... | {
"body": "@Test\n public void testGetMetricsDataByMetricOneServiceOneOperationOneConsumer() {\n long now = System.currentTimeMillis();\n long oneHourAgo = now - TimeUnit.SECONDS.toMillis(3600);\n long twoHoursAgo = oneHourAgo - TimeUnit.SECONDS.toMillis(3600);\n\n MetricCriteria metric... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final SOAMetricsQueryServiceProvider delegate;",
"type": "SOAMetricsQueryServiceProvider",
"var_name": "delegate"
}
],
"file": "turmeric-monitoring-dao-provider/src/main/java/or... | {
"body": "@Override\n public List<MetricGroupData> getMetricsData(MetricCriteria metricCriteria,\n MetricResourceCriteria metricResourceCriteria) {\n return delegate.getMetricsData(metricCriteria, metricResourceCriteria);\n }",
"class_method_signature": "DAOSOAMetricsQueryServicePro... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_17 | {
"fields": [
{
"declarator": "consumerName = \"ConsumerName1\"",
"modifier": "private final",
"original_string": "private final String consumerName = \"ConsumerName1\";",
"type": "String",
"var_name": "consumerName"
},
{
"declarator": "errorsToStore = null",
"mod... | {
"body": "@Test\n public void testFindMetricValuesByOperationFromThreeMinutesToNow() throws ServiceException {\n Collection<MetricValueAggregator> snapshotCollection = createMetricValueAggregatorsForOneConsumerWithTotalMetric(\n srvcAdminName, opName, consumerName);\n metricsStorageProvider... | {
"fields": [
{
"declarator": "errorListNames = new ArrayList<String>()",
"modifier": "public static final",
"original_string": "public static final List<String> errorListNames = new ArrayList<String>();",
"type": "List<String>",
"var_name": "errorListNames"
}
],
"file": "tur... | {
"body": "@Override\n public Map<String, List<MetricValue<?>>> findMetricValuesByOperation(List<String> ipAddressList, String metricName,\n long begin, long end, boolean serverSide, int aggregationPeriod, Map<String, List<String>> filters) {\n Map<String, List<MetricValue<?>>> result = new HashMap<... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_2 | {
"fields": [
{
"declarator": "metricsStorageProvider",
"modifier": "private",
"original_string": "private MetricsStorageProvider metricsStorageProvider;",
"type": "MetricsStorageProvider",
"var_name": "metricsStorageProvider"
}
],
"file": "monitoring-metrics-jpa/src/test/jav... | {
"body": "@Test\n public void testSnapshotsAreAggregated() throws Exception {\n long timeStamp = System.currentTimeMillis();\n\n MetricId metricId1 = new MetricId(\"test_count\", \"service1\", \"operation1\");\n MetricValue metricValue1 = new LongSumMetricValue(metricId1);\n MetricValu... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private volatile",
"original_string": "private volatile MetricsStorageProvider delegate;",
"type": "MetricsStorageProvider",
"var_name": "delegate"
},
{
"declarator": "entityManagerFactory",
"modifier": "priva... | {
"body": "@Override\n public void saveMetricSnapshot(long timeSnapshot, Collection<MetricValueAggregator> snapshotCollection) throws ServiceException {\n delegate.saveMetricSnapshot(timeSnapshot, snapshotCollection);\n }",
"class_method_signature": "DAOMetricsStorageProvider.saveMetricSnapshot(long ti... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_26 | {
"fields": [
{
"declarator": "aggregator = null",
"modifier": "",
"original_string": "DataAggregator aggregator = null;",
"type": "DataAggregator",
"var_name": "aggregator"
},
{
"declarator": "oldMetricTimeSeriesData",
"modifier": "private",
"original_strin... | {
"body": "@Test\n public void testGetAllMetricValues() {\n fail(\"Not yet implemented\");\n }",
"class_method_signature": "DataAggregatorTest.testGetAllMetricValues()",
"constructor": false,
"full_signature": "@Test public void testGetAllMetricValues()",
"identifier": "testGetAllMetricValues",
"in... | {
"fields": [
{
"declarator": "oldMetricTimeSeriesData",
"modifier": "private final",
"original_string": "private final Map<String, AggregationData<String>> oldMetricTimeSeriesData;",
"type": "Map<String, AggregationData<String>>",
"var_name": "oldMetricTimeSeriesData"
},
{
... | {
"body": "public Set<AggregationData<String>> getAllMetricValues(Set<String> oldMetricValuesKeys) {\n Set<AggregationData<String>> result = new HashSet();\n for (String metricValueKey : oldMetricValuesKeys) {\n result.add(oldMetricValuesData.get(metricValueKey));\n }\n return result;\n ... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_30 | {
"fields": [
{
"declarator": "aggregator = null",
"modifier": "",
"original_string": "DataAggregator aggregator = null;",
"type": "DataAggregator",
"var_name": "aggregator"
},
{
"declarator": "oldMetricTimeSeriesData",
"modifier": "private",
"original_strin... | {
"body": "@Test\n public void testaAgregateDoubleColumnValues() {\n Object oldColumnValue = new Double(11.4);\n Object aggregatedValue = new Double(22.78);\n Object theResult = aggregator.aggregateColumnValues(aggregatedValue, oldColumnValue);\n assertNotNull(theResult);\n assertEquals(new... | {
"fields": [
{
"declarator": "oldMetricTimeSeriesData",
"modifier": "private final",
"original_string": "private final Map<String, AggregationData<String>> oldMetricTimeSeriesData;",
"type": "Map<String, AggregationData<String>>",
"var_name": "oldMetricTimeSeriesData"
},
{
... | {
"body": "public Object aggregateColumnValues(Object aggregatedValue, Object oldColumnValue) {\n if (oldColumnValue instanceof Long) {\n return (Long) aggregatedValue + (Long) oldColumnValue;\n } else if (oldColumnValue instanceof Double) {\n return (Double) aggregatedValue + (Double) oldCo... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_9 | {
"fields": [
{
"declarator": "filters",
"modifier": "",
"original_string": "Map<String, List<String>> filters;",
"type": "Map<String, List<String>>",
"var_name": "filters"
},
{
"declarator": "serverSide = false",
"modifier": "",
"original_string": "boolean ... | {
"body": "@Test\n\tpublic void testErrorValuesKeyValuesServer() {\n\t\tfilters.get(\"Server\").add(\"Server1\");\n\t\tList<String> keys = KeyGeneratorUtil.generateErrorValuesKeys(serverSide, filters, param1);\n\t\tassertEquals(\"Server1|All|All|All|APPLICATION|false\", keys.get(0));\n\n\t\tfilters.get(\"Server\").ad... | {
"fields": [
{
"declarator": "KEY_TOKEN = \"|\"",
"modifier": "private static final",
"original_string": "private static final String KEY_TOKEN = \"|\";",
"type": "String",
"var_name": "KEY_TOKEN"
},
{
"declarator": "KEY_ALL = \"All\"",
"modifier": "private stati... | {
"body": "public static List<String> generateErrorValuesKeys(final boolean serverSide,\n\t\t\tfinal Map<String, List<String>> filters, final String param1) {\n\t\tfinal List<String> errorKeys = new ArrayList<String>();\n\n\t\tfinal List<String> serverNames = (filters.get(\"Server\")!= null ? new ArrayList<String>(fi... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_5 | {
"fields": [
{
"declarator": "filters",
"modifier": "",
"original_string": "Map<String, List<String>> filters;",
"type": "Map<String, List<String>>",
"var_name": "filters"
},
{
"declarator": "serverSide = false",
"modifier": "",
"original_string": "boolean ... | {
"body": "@Test\n\tpublic void testErrorValuesNotEmpty() {\n\t\tList<String> keys = KeyGeneratorUtil.generateErrorValuesKeys(serverSide, filters, param1);\n\t\tassertFalse(keys.isEmpty());\n\t}",
"class_method_signature": "KeyGeneratorUtilTest.testErrorValuesNotEmpty()",
"constructor": false,
"full_signature":... | {
"fields": [
{
"declarator": "KEY_TOKEN = \"|\"",
"modifier": "private static final",
"original_string": "private static final String KEY_TOKEN = \"|\";",
"type": "String",
"var_name": "KEY_TOKEN"
},
{
"declarator": "KEY_ALL = \"All\"",
"modifier": "private stati... | {
"body": "public static List<String> generateErrorValuesKeys(final boolean serverSide,\n\t\t\tfinal Map<String, List<String>> filters, final String param1) {\n\t\tfinal List<String> errorKeys = new ArrayList<String>();\n\n\t\tfinal List<String> serverNames = (filters.get(\"Server\")!= null ? new ArrayList<String>(fi... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_10 | {
"fields": [
{
"declarator": "filters",
"modifier": "",
"original_string": "Map<String, List<String>> filters;",
"type": "Map<String, List<String>>",
"var_name": "filters"
},
{
"declarator": "serverSide = false",
"modifier": "",
"original_string": "boolean ... | {
"body": "@Test\n\tpublic void testErrorValuesKeyValuesService() {\n\t\tfilters.get(\"Service\").add(\"Service1\");\n\t\tList<String> keys = KeyGeneratorUtil.generateErrorValuesKeys(serverSide, filters, param1);\n\t\tassertEquals(\"All|Service1|All|All|APPLICATION|false\", keys.get(0));\n\n\t\tfilters.get(\"Service\... | {
"fields": [
{
"declarator": "KEY_TOKEN = \"|\"",
"modifier": "private static final",
"original_string": "private static final String KEY_TOKEN = \"|\";",
"type": "String",
"var_name": "KEY_TOKEN"
},
{
"declarator": "KEY_ALL = \"All\"",
"modifier": "private stati... | {
"body": "public static List<String> generateErrorValuesKeys(final boolean serverSide,\n\t\t\tfinal Map<String, List<String>> filters, final String param1) {\n\t\tfinal List<String> errorKeys = new ArrayList<String>();\n\n\t\tfinal List<String> serverNames = (filters.get(\"Server\")!= null ? new ArrayList<String>(fi... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_47 | {
"fields": [
{
"declarator": "entityManagerFactory",
"modifier": "private",
"original_string": "private EntityManagerFactory entityManagerFactory;",
"type": "EntityManagerFactory",
"var_name": "entityManagerFactory"
},
{
"declarator": "provider",
"modifier": "pri... | {
"body": "@Test\n public void testGetMetricsMetadataByOperation() {\n List<String> operationNames = provider.getMetricsMetadata(ResourceEntity.SERVICE.value(),\n Arrays.asList(\"service_1\", \"service_2\"), ResourceEntity.OPERATION.value());\n assertEquals(4, operationNames.si... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final SOAMetricsQueryServiceProvider delegate;",
"type": "SOAMetricsQueryServiceProvider",
"var_name": "delegate"
}
],
"file": "turmeric-monitoring-dao-provider/src/main/java/or... | {
"body": "@Override\n public List<String> getMetricsMetadata(String resourceEntityType, List<String> resourceEntityName,\n String resourceEntityResponseType) {\n return delegate.getMetricsMetadata(resourceEntityType, resourceEntityName, resourceEntityResponseType);\n }",
"class_meth... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_51 | {
"fields": [
{
"declarator": "entityManagerFactory",
"modifier": "private",
"original_string": "private EntityManagerFactory entityManagerFactory;",
"type": "EntityManagerFactory",
"var_name": "entityManagerFactory"
},
{
"declarator": "provider",
"modifier": "pri... | {
"body": "@Test\n public void testGetErrorMetricsDataNoDiffInProvider() {\n MetricCriteria metricCriteria = new MetricCriteria();\n metricCriteria.setFirstStartTime(twoMinutesAgo);\n metricCriteria.setSecondStartTime(oneMinuteAgo);\n metricCriteria.setDuration(3600);\n\n List<Er... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final SOAMetricsQueryServiceProvider delegate;",
"type": "SOAMetricsQueryServiceProvider",
"var_name": "delegate"
}
],
"file": "turmeric-monitoring-dao-provider/src/main/java/or... | {
"body": "@Override\n public List<ErrorViewData> getErrorMetricsData(String errorType, List<String> serviceName,\n List<String> operationName, List<String> consumerName, String errorId, String errorCategory,\n String errorSeverity, String errorName, MetricCriteria metricCrite... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_50 | {
"fields": [
{
"declarator": "entityManagerFactory",
"modifier": "private",
"original_string": "private EntityManagerFactory entityManagerFactory;",
"type": "EntityManagerFactory",
"var_name": "entityManagerFactory"
},
{
"declarator": "provider",
"modifier": "pri... | {
"body": "@Test\n public void testGetErrorMetricsDataBySeverity() {\n MetricCriteria metricCriteria = new MetricCriteria();\n metricCriteria.setFirstStartTime(twoMinutesAgo);\n metricCriteria.setSecondStartTime(oneMinuteAgo);\n metricCriteria.setDuration(3600);\n\n List<ErrorVie... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final SOAMetricsQueryServiceProvider delegate;",
"type": "SOAMetricsQueryServiceProvider",
"var_name": "delegate"
}
],
"file": "turmeric-monitoring-dao-provider/src/main/java/or... | {
"body": "@Override\n public List<ErrorViewData> getErrorMetricsData(String errorType, List<String> serviceName,\n List<String> operationName, List<String> consumerName, String errorId, String errorCategory,\n String errorSeverity, String errorName, MetricCriteria metricCrite... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_46 | {
"fields": [
{
"declarator": "entityManagerFactory",
"modifier": "private",
"original_string": "private EntityManagerFactory entityManagerFactory;",
"type": "EntityManagerFactory",
"var_name": "entityManagerFactory"
},
{
"declarator": "provider",
"modifier": "pri... | {
"body": "@Test\n public void testGetMetricsMetadataByService() {\n List<String> serviceNames = provider.getMetricsMetadata(ResourceEntity.SERVICE.value(),\n Collections.<String> emptyList(), ResourceEntity.SERVICE.value());\n assertEquals(3, serviceNames.size());\n Col... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final SOAMetricsQueryServiceProvider delegate;",
"type": "SOAMetricsQueryServiceProvider",
"var_name": "delegate"
}
],
"file": "turmeric-monitoring-dao-provider/src/main/java/or... | {
"body": "@Override\n public List<String> getMetricsMetadata(String resourceEntityType, List<String> resourceEntityName,\n String resourceEntityResponseType) {\n return delegate.getMetricsMetadata(resourceEntityType, resourceEntityName, resourceEntityResponseType);\n }",
"class_meth... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_4 | {
"fields": [
{
"declarator": "filters",
"modifier": "",
"original_string": "Map<String, List<String>> filters;",
"type": "Map<String, List<String>>",
"var_name": "filters"
},
{
"declarator": "serverSide = false",
"modifier": "",
"original_string": "boolean ... | {
"body": "@Test\n\tpublic void testErrorValuesNotNull() {\n\t\tList<String> keys = KeyGeneratorUtil.generateErrorValuesKeys(serverSide, filters, param1);\n\t\tassertNotNull(keys);\n\t}",
"class_method_signature": "KeyGeneratorUtilTest.testErrorValuesNotNull()",
"constructor": false,
"full_signature": "@Test pu... | {
"fields": [
{
"declarator": "KEY_TOKEN = \"|\"",
"modifier": "private static final",
"original_string": "private static final String KEY_TOKEN = \"|\";",
"type": "String",
"var_name": "KEY_TOKEN"
},
{
"declarator": "KEY_ALL = \"All\"",
"modifier": "private stati... | {
"body": "public static List<String> generateErrorValuesKeys(final boolean serverSide,\n\t\t\tfinal Map<String, List<String>> filters, final String param1) {\n\t\tfinal List<String> errorKeys = new ArrayList<String>();\n\n\t\tfinal List<String> serverNames = (filters.get(\"Server\")!= null ? new ArrayList<String>(fi... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_11 | {
"fields": [
{
"declarator": "filters",
"modifier": "",
"original_string": "Map<String, List<String>> filters;",
"type": "Map<String, List<String>>",
"var_name": "filters"
},
{
"declarator": "serverSide = false",
"modifier": "",
"original_string": "boolean ... | {
"body": "@Test\n\tpublic void testErrorValuesKeyValuesConsumer() {\n\t\tfilters.get(\"Consumer\").add(\"Consumer1\");\n\t\tList<String> keys = KeyGeneratorUtil.generateErrorValuesKeys(serverSide, filters, param1);\n\t\tassertEquals(\"All|All|Consumer1|All|APPLICATION|false\", keys.get(0));\n\n\t\tfilters.get(\"Cons... | {
"fields": [
{
"declarator": "KEY_TOKEN = \"|\"",
"modifier": "private static final",
"original_string": "private static final String KEY_TOKEN = \"|\";",
"type": "String",
"var_name": "KEY_TOKEN"
},
{
"declarator": "KEY_ALL = \"All\"",
"modifier": "private stati... | {
"body": "public static List<String> generateErrorValuesKeys(final boolean serverSide,\n\t\t\tfinal Map<String, List<String>> filters, final String param1) {\n\t\tfinal List<String> errorKeys = new ArrayList<String>();\n\n\t\tfinal List<String> serverNames = (filters.get(\"Server\")!= null ? new ArrayList<String>(fi... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_8 | {
"fields": [
{
"declarator": "filters",
"modifier": "",
"original_string": "Map<String, List<String>> filters;",
"type": "Map<String, List<String>>",
"var_name": "filters"
},
{
"declarator": "serverSide = false",
"modifier": "",
"original_string": "boolean ... | {
"body": "@Test\n\tpublic void testErrorValuesKeyValuesParam1() {\n\t\tparam1 = \"SYSTEM\";\n\t\tList<String> keys = KeyGeneratorUtil.generateErrorValuesKeys(serverSide, filters, param1);\n\t\tassertEquals(1, keys.size());\n\t\tassertEquals(\"All|All|All|All|SYSTEM|false\", keys.get(0));\n\t}",
"class_method_signa... | {
"fields": [
{
"declarator": "KEY_TOKEN = \"|\"",
"modifier": "private static final",
"original_string": "private static final String KEY_TOKEN = \"|\";",
"type": "String",
"var_name": "KEY_TOKEN"
},
{
"declarator": "KEY_ALL = \"All\"",
"modifier": "private stati... | {
"body": "public static List<String> generateErrorValuesKeys(final boolean serverSide,\n\t\t\tfinal Map<String, List<String>> filters, final String param1) {\n\t\tfinal List<String> errorKeys = new ArrayList<String>();\n\n\t\tfinal List<String> serverNames = (filters.get(\"Server\")!= null ? new ArrayList<String>(fi... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_31 | {
"fields": [
{
"declarator": "aggregator = null",
"modifier": "",
"original_string": "DataAggregator aggregator = null;",
"type": "DataAggregator",
"var_name": "aggregator"
},
{
"declarator": "oldMetricTimeSeriesData",
"modifier": "private",
"original_strin... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testaAgregateInvalidObjectColumnValues() {\n Object oldColumnValue = new Integer(1);\n Object aggregatedValue = new Integer(2);\n Object theResult = aggregator.aggregateColumnValues(aggregatedValue, oldColumnValue);\n fail... | {
"fields": [
{
"declarator": "oldMetricTimeSeriesData",
"modifier": "private final",
"original_string": "private final Map<String, AggregationData<String>> oldMetricTimeSeriesData;",
"type": "Map<String, AggregationData<String>>",
"var_name": "oldMetricTimeSeriesData"
},
{
... | {
"body": "public Object aggregateColumnValues(Object aggregatedValue, Object oldColumnValue) {\n if (oldColumnValue instanceof Long) {\n return (Long) aggregatedValue + (Long) oldColumnValue;\n } else if (oldColumnValue instanceof Double) {\n return (Double) aggregatedValue + (Double) oldCo... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_27 | {
"fields": [
{
"declarator": "aggregator = null",
"modifier": "",
"original_string": "DataAggregator aggregator = null;",
"type": "DataAggregator",
"var_name": "aggregator"
},
{
"declarator": "oldMetricTimeSeriesData",
"modifier": "private",
"original_strin... | {
"body": "@Test\n public void testCreateMetricTimeSeriesKey() {\n String oldMetricTimeSeriesKey = serverName + \"|\" + srvcAdminName + \"|\" + opName + \"|\" + consumerName + \"|\"\n + oldAggregationPeriod + \"|true\";\n String expectedMetricTimeSeriesKey = serverName + \"|\" + srvcAdminNam... | {
"fields": [
{
"declarator": "oldMetricTimeSeriesData",
"modifier": "private final",
"original_string": "private final Map<String, AggregationData<String>> oldMetricTimeSeriesData;",
"type": "Map<String, AggregationData<String>>",
"var_name": "oldMetricTimeSeriesData"
},
{
... | {
"body": "public String createMetricTimeSeriesKey(String oldMetricTimeSeriesRowKey) {\n String oldAggregationPeriodStr = String.valueOf(oldAggregationPeriod);\n int index = oldMetricTimeSeriesRowKey.indexOf(oldAggregationPeriodStr + \"|\");\n if (index == -1) {\n throw new IllegalArgumentExcep... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_49 | {
"fields": [
{
"declarator": "entityManagerFactory",
"modifier": "private",
"original_string": "private EntityManagerFactory entityManagerFactory;",
"type": "EntityManagerFactory",
"var_name": "entityManagerFactory"
},
{
"declarator": "provider",
"modifier": "pri... | {
"body": "@Test\n public void testGetErrorMetricsDataByCategory() {\n long oneMinuteAgo = System.currentTimeMillis() - TimeUnit.SECONDS.toMillis(60);\n long twoMinutesAgo = oneMinuteAgo - TimeUnit.SECONDS.toMillis(60);\n MetricCriteria metricCriteria = new MetricCriteria();\n metricCri... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final SOAMetricsQueryServiceProvider delegate;",
"type": "SOAMetricsQueryServiceProvider",
"var_name": "delegate"
}
],
"file": "turmeric-monitoring-dao-provider/src/main/java/or... | {
"body": "@Override\n public List<ErrorViewData> getErrorMetricsData(String errorType, List<String> serviceName,\n List<String> operationName, List<String> consumerName, String errorId, String errorCategory,\n String errorSeverity, String errorName, MetricCriteria metricCrite... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_32 | {
"fields": [
{
"declarator": "entityManagerFactory",
"modifier": "private",
"original_string": "private EntityManagerFactory entityManagerFactory;",
"type": "EntityManagerFactory",
"var_name": "entityManagerFactory"
},
{
"declarator": "provider",
"modifier": "pri... | {
"body": "@Test\n public void testGetMetricsDataByOperationAllServicesAllOperationsAllConsumers() {\n long now = System.currentTimeMillis();\n long oneHourAgo = now - TimeUnit.SECONDS.toMillis(3600);\n long twoHoursAgo = oneHourAgo - TimeUnit.SECONDS.toMillis(3600);\n\n MetricCriteria ... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final SOAMetricsQueryServiceProvider delegate;",
"type": "SOAMetricsQueryServiceProvider",
"var_name": "delegate"
}
],
"file": "turmeric-monitoring-dao-provider/src/main/java/or... | {
"body": "@Override\n public List<MetricGroupData> getMetricsData(MetricCriteria metricCriteria,\n MetricResourceCriteria metricResourceCriteria) {\n return delegate.getMetricsData(metricCriteria, metricResourceCriteria);\n }",
"class_method_signature": "DAOSOAMetricsQueryServicePro... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_24 | {
"fields": [
{
"declarator": "aggregator = null",
"modifier": "",
"original_string": "DataAggregator aggregator = null;",
"type": "DataAggregator",
"var_name": "aggregator"
},
{
"declarator": "oldMetricTimeSeriesData",
"modifier": "private",
"original_strin... | {
"body": "@Test\n public void testGetAggregatedMetricValuesData() {\n fail(\"Not yet implemented\");\n }",
"class_method_signature": "DataAggregatorTest.testGetAggregatedMetricValuesData()",
"constructor": false,
"full_signature": "@Test public void testGetAggregatedMetricValuesData()",
"identifier"... | {
"fields": [
{
"declarator": "oldMetricTimeSeriesData",
"modifier": "private final",
"original_string": "private final Map<String, AggregationData<String>> oldMetricTimeSeriesData;",
"type": "Map<String, AggregationData<String>>",
"var_name": "oldMetricTimeSeriesData"
},
{
... | {
"body": "public Map<String, AggregationData<String>> getAggregatedMetricValuesData() {\n return aggregatedMetricValuesData;\n }",
"class_method_signature": "DataAggregator.getAggregatedMetricValuesData()",
"constructor": false,
"full_signature": "public Map<String, AggregationData<String>> getAggregate... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_53 | {
"fields": [
{
"declarator": "entityManagerFactory",
"modifier": "private",
"original_string": "private EntityManagerFactory entityManagerFactory;",
"type": "EntityManagerFactory",
"var_name": "entityManagerFactory"
},
{
"declarator": "provider",
"modifier": "pri... | {
"body": "@Test\n public void testGetSystemErrorGraphForServiceTwoMinutesAgo() {\n long duration = 180;// in secs\n int aggregationPeriod = 60;// in secs\n MetricCriteria metricCriteria = new MetricCriteria();\n metricCriteria.setFirstStartTime(twoMinutesAgo);\n metricCriteria.s... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final SOAMetricsQueryServiceProvider delegate;",
"type": "SOAMetricsQueryServiceProvider",
"var_name": "delegate"
}
],
"file": "turmeric-monitoring-dao-provider/src/main/java/or... | {
"body": "@Override\n public List<MetricGraphData> getErrorGraph(String serviceName, String operationName, String consumerName,\n String errorId, String errorCategory, String errorSeverity, MetricCriteria metricCriteria) {\n return delegate.getErrorGraph(serviceName, operationName, consu... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_45 | {
"fields": [
{
"declarator": "entityManagerFactory",
"modifier": "private",
"original_string": "private EntityManagerFactory entityManagerFactory;",
"type": "EntityManagerFactory",
"var_name": "entityManagerFactory"
},
{
"declarator": "provider",
"modifier": "pri... | {
"body": "@Test\n public void testGetMetricValueByOperationAllServicesAllOperationsOneConsumer() {\n long now = System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(1);\n long oneHourAgo = now - TimeUnit.SECONDS.toMillis(3600);\n\n CriteriaInfo criteriaInfo = new CriteriaInfo();\n cr... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final SOAMetricsQueryServiceProvider delegate;",
"type": "SOAMetricsQueryServiceProvider",
"var_name": "delegate"
}
],
"file": "turmeric-monitoring-dao-provider/src/main/java/or... | {
"body": "@Override\n public List<MetricGraphData> getMetricValue(CriteriaInfo criteriaInfo, long startTime, long duration, int step,\n String autoDelay) {\n return delegate.getMetricValue(criteriaInfo, startTime, duration, step, autoDelay);\n }",
"class_method_signature": "DAOSOAMe... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_12 | {
"fields": [
{
"declarator": "filters",
"modifier": "",
"original_string": "Map<String, List<String>> filters;",
"type": "Map<String, List<String>>",
"var_name": "filters"
},
{
"declarator": "serverSide = false",
"modifier": "",
"original_string": "boolean ... | {
"body": "@Test\n\tpublic void testErrorValuesKeyValuesOperation() {\n\t\tfilters.get(\"Operation\").add(\"Operation1\");\n\t\tList<String> keys = KeyGeneratorUtil.generateErrorValuesKeys(serverSide, filters, param1);\n\t\tassertEquals(\"All|All|All|Operation1|APPLICATION|false\", keys.get(0));\n\n\t\tfilters.get(\"... | {
"fields": [
{
"declarator": "KEY_TOKEN = \"|\"",
"modifier": "private static final",
"original_string": "private static final String KEY_TOKEN = \"|\";",
"type": "String",
"var_name": "KEY_TOKEN"
},
{
"declarator": "KEY_ALL = \"All\"",
"modifier": "private stati... | {
"body": "public static List<String> generateErrorValuesKeys(final boolean serverSide,\n\t\t\tfinal Map<String, List<String>> filters, final String param1) {\n\t\tfinal List<String> errorKeys = new ArrayList<String>();\n\n\t\tfinal List<String> serverNames = (filters.get(\"Server\")!= null ? new ArrayList<String>(fi... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_7 | {
"fields": [
{
"declarator": "filters",
"modifier": "",
"original_string": "Map<String, List<String>> filters;",
"type": "Map<String, List<String>>",
"var_name": "filters"
},
{
"declarator": "serverSide = false",
"modifier": "",
"original_string": "boolean ... | {
"body": "@Test\n\tpublic void testErrorValuesKeyValuesServerSide() {\n\t\tserverSide = true;\n\t\tList<String> keys = KeyGeneratorUtil.generateErrorValuesKeys(serverSide, filters, param1);\n\t\tassertEquals(1, keys.size());\n\t\tassertEquals(\"All|All|All|All|APPLICATION|true\", keys.get(0));\n\t}",
"class_method... | {
"fields": [
{
"declarator": "KEY_TOKEN = \"|\"",
"modifier": "private static final",
"original_string": "private static final String KEY_TOKEN = \"|\";",
"type": "String",
"var_name": "KEY_TOKEN"
},
{
"declarator": "KEY_ALL = \"All\"",
"modifier": "private stati... | {
"body": "public static List<String> generateErrorValuesKeys(final boolean serverSide,\n\t\t\tfinal Map<String, List<String>> filters, final String param1) {\n\t\tfinal List<String> errorKeys = new ArrayList<String>();\n\n\t\tfinal List<String> serverNames = (filters.get(\"Server\")!= null ? new ArrayList<String>(fi... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_28 | {
"fields": [
{
"declarator": "aggregator = null",
"modifier": "",
"original_string": "DataAggregator aggregator = null;",
"type": "DataAggregator",
"var_name": "aggregator"
},
{
"declarator": "oldMetricTimeSeriesData",
"modifier": "private",
"original_strin... | {
"body": "@Test\n public void testCreateMetricValueKey() {\n Date someDate = new Date();\n Date someOtherDate = new Date(someDate.getTime() + 1000);\n String metricValueKey = serverName + \"|\" + srvcAdminName + \"|\" + opName + \"|\" + consumerName + \"|\"\n + \"someMetricName|\" + so... | {
"fields": [
{
"declarator": "oldMetricTimeSeriesData",
"modifier": "private final",
"original_string": "private final Map<String, AggregationData<String>> oldMetricTimeSeriesData;",
"type": "Map<String, AggregationData<String>>",
"var_name": "oldMetricTimeSeriesData"
},
{
... | {
"body": "public String createMetricValueKey(String oldMetricTimeSeriesKey, Date date) {\n int index = oldMetricTimeSeriesKey.lastIndexOf(\"|\");\n if (index == -1) {\n throw new IllegalArgumentException(\"| not found in \" + oldMetricTimeSeriesKey);\n }\n String result = oldMetricTimeSer... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_29 | {
"fields": [
{
"declarator": "aggregator = null",
"modifier": "",
"original_string": "DataAggregator aggregator = null;",
"type": "DataAggregator",
"var_name": "aggregator"
},
{
"declarator": "oldMetricTimeSeriesData",
"modifier": "private",
"original_strin... | {
"body": "@Test\n public void testaAgregateLongColumnValues() {\n Object oldColumnValue = new Long(1);\n Object aggregatedValue = new Long(2);\n Object theResult = aggregator.aggregateColumnValues(aggregatedValue, oldColumnValue);\n assertNotNull(theResult);\n assertEquals(new Long(3), the... | {
"fields": [
{
"declarator": "oldMetricTimeSeriesData",
"modifier": "private final",
"original_string": "private final Map<String, AggregationData<String>> oldMetricTimeSeriesData;",
"type": "Map<String, AggregationData<String>>",
"var_name": "oldMetricTimeSeriesData"
},
{
... | {
"body": "public Object aggregateColumnValues(Object aggregatedValue, Object oldColumnValue) {\n if (oldColumnValue instanceof Long) {\n return (Long) aggregatedValue + (Long) oldColumnValue;\n } else if (oldColumnValue instanceof Double) {\n return (Double) aggregatedValue + (Double) oldCo... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_13 | {
"fields": [
{
"declarator": "filters",
"modifier": "",
"original_string": "Map<String, List<String>> filters;",
"type": "Map<String, List<String>>",
"var_name": "filters"
},
{
"declarator": "serverSide = false",
"modifier": "",
"original_string": "boolean ... | {
"body": "@Test\n\tpublic void testErrorValuesKeyValuesMix1() {\n\t\tfilters.get(\"Service\").add(\"Service1\");\n\t\tfilters.get(\"Service\").add(\"Service2\");\n\n\t\tfilters.get(\"Consumer\").add(\"Consumer1\");\n\t\tfilters.get(\"Consumer\").add(\"Consumer2\");\n\n\t\tfilters.get(\"Operation\").add(\"Operation1\... | {
"fields": [
{
"declarator": "KEY_TOKEN = \"|\"",
"modifier": "private static final",
"original_string": "private static final String KEY_TOKEN = \"|\";",
"type": "String",
"var_name": "KEY_TOKEN"
},
{
"declarator": "KEY_ALL = \"All\"",
"modifier": "private stati... | {
"body": "public static List<String> generateErrorValuesKeys(final boolean serverSide,\n\t\t\tfinal Map<String, List<String>> filters, final String param1) {\n\t\tfinal List<String> errorKeys = new ArrayList<String>();\n\n\t\tfinal List<String> serverNames = (filters.get(\"Server\")!= null ? new ArrayList<String>(fi... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_6 | {
"fields": [
{
"declarator": "filters",
"modifier": "",
"original_string": "Map<String, List<String>> filters;",
"type": "Map<String, List<String>>",
"var_name": "filters"
},
{
"declarator": "serverSide = false",
"modifier": "",
"original_string": "boolean ... | {
"body": "@Test\n\tpublic void testErrorValuesKeyValuesAll() {\n\t\tList<String> keys = KeyGeneratorUtil.generateErrorValuesKeys(serverSide, filters, param1);\n\t\tassertEquals(1, keys.size());\n\t\tassertEquals(\"All|All|All|All|APPLICATION|false\", keys.get(0));\n\t}",
"class_method_signature": "KeyGeneratorUtil... | {
"fields": [
{
"declarator": "KEY_TOKEN = \"|\"",
"modifier": "private static final",
"original_string": "private static final String KEY_TOKEN = \"|\";",
"type": "String",
"var_name": "KEY_TOKEN"
},
{
"declarator": "KEY_ALL = \"All\"",
"modifier": "private stati... | {
"body": "public static List<String> generateErrorValuesKeys(final boolean serverSide,\n\t\t\tfinal Map<String, List<String>> filters, final String param1) {\n\t\tfinal List<String> errorKeys = new ArrayList<String>();\n\n\t\tfinal List<String> serverNames = (filters.get(\"Server\")!= null ? new ArrayList<String>(fi... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_44 | {
"fields": [
{
"declarator": "entityManagerFactory",
"modifier": "private",
"original_string": "private EntityManagerFactory entityManagerFactory;",
"type": "EntityManagerFactory",
"var_name": "entityManagerFactory"
},
{
"declarator": "provider",
"modifier": "pri... | {
"body": "@Test\n public void testGetMetricValueForOneServiceAllOperations() {\n CriteriaInfo criteriaInfo = new CriteriaInfo();\n criteriaInfo.setMetricName(\"ResponseTime\");\n criteriaInfo.setRoleType(MonitoringSystem.COLLECTION_LOCATION_SERVER);\n criteriaInfo.setServiceName(\"serv... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final SOAMetricsQueryServiceProvider delegate;",
"type": "SOAMetricsQueryServiceProvider",
"var_name": "delegate"
}
],
"file": "turmeric-monitoring-dao-provider/src/main/java/or... | {
"body": "@Override\n public List<MetricGraphData> getMetricValue(CriteriaInfo criteriaInfo, long startTime, long duration, int step,\n String autoDelay) {\n return delegate.getMetricValue(criteriaInfo, startTime, duration, step, autoDelay);\n }",
"class_method_signature": "DAOSOAMe... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_52 | {
"fields": [
{
"declarator": "entityManagerFactory",
"modifier": "private",
"original_string": "private EntityManagerFactory entityManagerFactory;",
"type": "EntityManagerFactory",
"var_name": "entityManagerFactory"
},
{
"declarator": "provider",
"modifier": "pri... | {
"body": "@Test\n public void testGetSystemErrorGraphForServiceOneMinuteAgo() {\n long duration = 120;// in secs\n int aggregationPeriod = 60;// in secs\n MetricCriteria metricCriteria = new MetricCriteria();\n metricCriteria.setFirstStartTime(oneMinuteAgo);\n metricCriteria.set... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final SOAMetricsQueryServiceProvider delegate;",
"type": "SOAMetricsQueryServiceProvider",
"var_name": "delegate"
}
],
"file": "turmeric-monitoring-dao-provider/src/main/java/or... | {
"body": "@Override\n public List<MetricGraphData> getErrorGraph(String serviceName, String operationName, String consumerName,\n String errorId, String errorCategory, String errorSeverity, MetricCriteria metricCriteria) {\n return delegate.getErrorGraph(serviceName, operationName, consu... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_25 | {
"fields": [
{
"declarator": "aggregator = null",
"modifier": "",
"original_string": "DataAggregator aggregator = null;",
"type": "DataAggregator",
"var_name": "aggregator"
},
{
"declarator": "oldMetricTimeSeriesData",
"modifier": "private",
"original_strin... | {
"body": "@Test\n public void testAggregateColumnValues() {\n fail(\"Not yet implemented\");\n }",
"class_method_signature": "DataAggregatorTest.testAggregateColumnValues()",
"constructor": false,
"full_signature": "@Test public void testAggregateColumnValues()",
"identifier": "testAggregateColumnVa... | {
"fields": [
{
"declarator": "oldMetricTimeSeriesData",
"modifier": "private final",
"original_string": "private final Map<String, AggregationData<String>> oldMetricTimeSeriesData;",
"type": "Map<String, AggregationData<String>>",
"var_name": "oldMetricTimeSeriesData"
},
{
... | {
"body": "public Object aggregateColumnValues(Object aggregatedValue, Object oldColumnValue) {\n if (oldColumnValue instanceof Long) {\n return (Long) aggregatedValue + (Long) oldColumnValue;\n } else if (oldColumnValue instanceof Double) {\n return (Double) aggregatedValue + (Double) oldCo... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_33 | {
"fields": [
{
"declarator": "entityManagerFactory",
"modifier": "private",
"original_string": "private EntityManagerFactory entityManagerFactory;",
"type": "EntityManagerFactory",
"var_name": "entityManagerFactory"
},
{
"declarator": "provider",
"modifier": "pri... | {
"body": "@Test\n public void testGetMetricsDataNoDiffInProvider() {\n long now = System.currentTimeMillis();\n long oneHourAgo = now - TimeUnit.SECONDS.toMillis(3600);\n long twoHoursAgo = oneHourAgo - TimeUnit.SECONDS.toMillis(3600);\n\n MetricCriteria metricCriteria = new MetricCrit... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final SOAMetricsQueryServiceProvider delegate;",
"type": "SOAMetricsQueryServiceProvider",
"var_name": "delegate"
}
],
"file": "turmeric-monitoring-dao-provider/src/main/java/or... | {
"body": "@Override\n public List<MetricGroupData> getMetricsData(MetricCriteria metricCriteria,\n MetricResourceCriteria metricResourceCriteria) {\n return delegate.getMetricsData(metricCriteria, metricResourceCriteria);\n }",
"class_method_signature": "DAOSOAMetricsQueryServicePro... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_48 | {
"fields": [
{
"declarator": "entityManagerFactory",
"modifier": "private",
"original_string": "private EntityManagerFactory entityManagerFactory;",
"type": "EntityManagerFactory",
"var_name": "entityManagerFactory"
},
{
"declarator": "provider",
"modifier": "pri... | {
"body": "@Test\n public void testGetErrorMetricsMetadata() {\n String errorId = String.valueOf(1L);\n ErrorInfos error = provider.getErrorMetricsMetadata(errorId, null, null);\n assertEquals(errorId, error.getId());\n assertEquals(\"error_1\", error.getName());\n assertEquals(E... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final SOAMetricsQueryServiceProvider delegate;",
"type": "SOAMetricsQueryServiceProvider",
"var_name": "delegate"
}
],
"file": "turmeric-monitoring-dao-provider/src/main/java/or... | {
"body": "@Override\n public ErrorInfos getErrorMetricsMetadata(String errorId, String errorName, String serviceName) {\n return delegate.getErrorMetricsMetadata(errorId, errorName, serviceName);\n }",
"class_method_signature": "DAOSOAMetricsQueryServiceProvider.getErrorMetricsMetadata(String errorId,... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_55 | {
"fields": [
{
"declarator": "entityManagerFactory",
"modifier": "private",
"original_string": "private EntityManagerFactory entityManagerFactory;",
"type": "EntityManagerFactory",
"var_name": "entityManagerFactory"
},
{
"declarator": "provider",
"modifier": "pri... | {
"body": "@Test\n public void testGetApplicationErrorGraphForServiceTwoMinutesAgo() {\n long duration = 180;// in secs\n int aggregationPeriod = 60;// in secs\n MetricCriteria metricCriteria = new MetricCriteria();\n metricCriteria.setFirstStartTime(twoMinutesAgo);\n metricCrite... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final SOAMetricsQueryServiceProvider delegate;",
"type": "SOAMetricsQueryServiceProvider",
"var_name": "delegate"
}
],
"file": "turmeric-monitoring-dao-provider/src/main/java/or... | {
"body": "@Override\n public List<MetricGraphData> getErrorGraph(String serviceName, String operationName, String consumerName,\n String errorId, String errorCategory, String errorSeverity, MetricCriteria metricCriteria) {\n return delegate.getErrorGraph(serviceName, operationName, consu... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_43 | {
"fields": [
{
"declarator": "entityManagerFactory",
"modifier": "private",
"original_string": "private EntityManagerFactory entityManagerFactory;",
"type": "EntityManagerFactory",
"var_name": "entityManagerFactory"
},
{
"declarator": "provider",
"modifier": "pri... | {
"body": "@Test\n public void testGetMetricValueForOneServiceOneOperation() {\n CriteriaInfo criteriaInfo = new CriteriaInfo();\n criteriaInfo.setMetricName(\"ResponseTime\");\n criteriaInfo.setRoleType(MonitoringSystem.COLLECTION_LOCATION_SERVER);\n criteriaInfo.setServiceName(\"servi... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final SOAMetricsQueryServiceProvider delegate;",
"type": "SOAMetricsQueryServiceProvider",
"var_name": "delegate"
}
],
"file": "turmeric-monitoring-dao-provider/src/main/java/or... | {
"body": "@Override\n public List<MetricGraphData> getMetricValue(CriteriaInfo criteriaInfo, long startTime, long duration, int step,\n String autoDelay) {\n return delegate.getMetricValue(criteriaInfo, startTime, duration, step, autoDelay);\n }",
"class_method_signature": "DAOSOAMe... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_1 | {
"fields": [
{
"declarator": "metricsStorageProvider",
"modifier": "private",
"original_string": "private MetricsStorageProvider metricsStorageProvider;",
"type": "MetricsStorageProvider",
"var_name": "metricsStorageProvider"
}
],
"file": "monitoring-metrics-jpa/src/test/jav... | {
"body": "@Test\n public void testSnapshotsAreSubtracted() throws Exception {\n long timeStamp = System.currentTimeMillis();\n\n MetricId metricId1 = new MetricId(\"test_count\", \"service1\", \"operation1\");\n MetricValue metricValue1 = new LongSumMetricValue(metricId1);\n MetricValu... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private volatile",
"original_string": "private volatile MetricsStorageProvider delegate;",
"type": "MetricsStorageProvider",
"var_name": "delegate"
},
{
"declarator": "entityManagerFactory",
"modifier": "priva... | {
"body": "@Override\n public void saveMetricSnapshot(long timeSnapshot, Collection<MetricValueAggregator> snapshotCollection) throws ServiceException {\n delegate.saveMetricSnapshot(timeSnapshot, snapshotCollection);\n }",
"class_method_signature": "DAOMetricsStorageProvider.saveMetricSnapshot(long ti... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_14 | {
"fields": [
{
"declarator": "now = 0",
"modifier": "private",
"original_string": "private long now = 0;",
"type": "long",
"var_name": "now"
},
{
"declarator": "consumerName = null",
"modifier": "private",
"original_string": "private String consumerName = n... | {
"body": "@Test\n public void testByDateAndServiceNameNow() throws ServiceException {// validated\n List<String> result = ipPerDayAndServiceNameDAO.findByDateAndServiceName(now, srvcAdminName);\n assertNotNull(result);\n assertEquals(\"There should be 1 ip address in the result. \", 1, result.size()... | {
"fields": [],
"file": "turmeric-monitoring-cassandra-provider/src/main/java/org/ebayopensource/turmeric/monitoring/provider/dao/impl/IpPerDayAndServiceNameDAOImpl.java",
"identifier": "IpPerDayAndServiceNameDAOImpl",
"interfaces": "implements IpPerDayAndServiceNameDAO<SK, K>",
"methods": [
{
"clas... | {
"body": "@Override\n public List<String> findByDateAndServiceName(long currentTimeMillis, String serviceName) {\n List<String> result = new ArrayList<String>();\n String superKey = new SimpleDateFormat(\"ddMMyyyy\").format(new Date(currentTimeMillis));\n\n SuperColumnQuery<String, String, String, S... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_38 | {
"fields": [
{
"declarator": "entityManagerFactory",
"modifier": "private",
"original_string": "private EntityManagerFactory entityManagerFactory;",
"type": "EntityManagerFactory",
"var_name": "entityManagerFactory"
},
{
"declarator": "provider",
"modifier": "pri... | {
"body": "@Test\n public void testGetMetricsDataByConsumerOneServiceAllOperationsAllConsumers() {\n long now = System.currentTimeMillis();\n long oneHourAgo = now - TimeUnit.SECONDS.toMillis(3600);\n long twoHoursAgo = oneHourAgo - TimeUnit.SECONDS.toMillis(3600);\n\n MetricCriteria me... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final SOAMetricsQueryServiceProvider delegate;",
"type": "SOAMetricsQueryServiceProvider",
"var_name": "delegate"
}
],
"file": "turmeric-monitoring-dao-provider/src/main/java/or... | {
"body": "@Override\n public List<MetricGroupData> getMetricsData(MetricCriteria metricCriteria,\n MetricResourceCriteria metricResourceCriteria) {\n return delegate.getMetricsData(metricCriteria, metricResourceCriteria);\n }",
"class_method_signature": "DAOSOAMetricsQueryServicePro... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_59 | {
"fields": [
{
"declarator": "entityManagerFactory",
"modifier": "private",
"original_string": "private EntityManagerFactory entityManagerFactory;",
"type": "EntityManagerFactory",
"var_name": "entityManagerFactory"
},
{
"declarator": "provider",
"modifier": "pri... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testGetErrorGraphForNonExistantSeverity() {\n long duration = 3600;// in secs\n int aggregationPeriod = 60;// in secs\n MetricCriteria metricCriteria = new MetricCriteria();\n metricCriteria.setFirstStartTime(twoM... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final SOAMetricsQueryServiceProvider delegate;",
"type": "SOAMetricsQueryServiceProvider",
"var_name": "delegate"
}
],
"file": "turmeric-monitoring-dao-provider/src/main/java/or... | {
"body": "@Override\n public List<MetricGraphData> getErrorGraph(String serviceName, String operationName, String consumerName,\n String errorId, String errorCategory, String errorSeverity, MetricCriteria metricCriteria) {\n return delegate.getErrorGraph(serviceName, operationName, consu... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_18 | {
"fields": [
{
"declarator": "consumerName = \"ConsumerName1\"",
"modifier": "private final",
"original_string": "private final String consumerName = \"ConsumerName1\";",
"type": "String",
"var_name": "consumerName"
},
{
"declarator": "errorsToStore = null",
"mod... | {
"body": "@Test\n public void testFindMetricValuesByOperationFromThreeMinutesToOneHourLater() throws ServiceException {\n Collection<MetricValueAggregator> snapshotCollection = createMetricValueAggregatorsForOneConsumerWithTotalMetric(\n srvcAdminName, opName, consumerName);\n metricsStorag... | {
"fields": [
{
"declarator": "errorListNames = new ArrayList<String>()",
"modifier": "public static final",
"original_string": "public static final List<String> errorListNames = new ArrayList<String>();",
"type": "List<String>",
"var_name": "errorListNames"
}
],
"file": "tur... | {
"body": "@Override\n public Map<String, List<MetricValue<?>>> findMetricValuesByOperation(List<String> ipAddressList, String metricName,\n long begin, long end, boolean serverSide, int aggregationPeriod, Map<String, List<String>> filters) {\n Map<String, List<MetricValue<?>>> result = new HashMap<... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_34 | {
"fields": [
{
"declarator": "entityManagerFactory",
"modifier": "private",
"original_string": "private EntityManagerFactory entityManagerFactory;",
"type": "EntityManagerFactory",
"var_name": "entityManagerFactory"
},
{
"declarator": "provider",
"modifier": "pri... | {
"body": "@Test\n public void testGetMetricsDataByOperationOneServiceAllOperationsAllConsumers() {\n long now = System.currentTimeMillis();\n long oneHourAgo = now - TimeUnit.SECONDS.toMillis(3600);\n long twoHoursAgo = oneHourAgo - TimeUnit.SECONDS.toMillis(3600);\n\n MetricCriteria m... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final SOAMetricsQueryServiceProvider delegate;",
"type": "SOAMetricsQueryServiceProvider",
"var_name": "delegate"
}
],
"file": "turmeric-monitoring-dao-provider/src/main/java/or... | {
"body": "@Override\n public List<MetricGroupData> getMetricsData(MetricCriteria metricCriteria,\n MetricResourceCriteria metricResourceCriteria) {\n return delegate.getMetricsData(metricCriteria, metricResourceCriteria);\n }",
"class_method_signature": "DAOSOAMetricsQueryServicePro... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_22 | {
"fields": [
{
"declarator": "aggregator = null",
"modifier": "",
"original_string": "DataAggregator aggregator = null;",
"type": "DataAggregator",
"var_name": "aggregator"
},
{
"declarator": "oldMetricTimeSeriesData",
"modifier": "private",
"original_strin... | {
"body": "@Test\n public void testAggregate() {\n aggregator.aggregate();\n Map<String, AggregationData<String>> aggregatedMetricTimeSeriesData = aggregator\n .getAggregatedMetricTimeSeriesData();\n assertNotNull(aggregatedMetricTimeSeriesData);\n\n Map<String, AggregationData<Str... | {
"fields": [
{
"declarator": "oldMetricTimeSeriesData",
"modifier": "private final",
"original_string": "private final Map<String, AggregationData<String>> oldMetricTimeSeriesData;",
"type": "Map<String, AggregationData<String>>",
"var_name": "oldMetricTimeSeriesData"
},
{
... | {
"body": "public void aggregate() {\n Date[] dateRange = dateRangeHelper.getDateRange(getAggregationDiff());\n\n for (int i = 0; i < dateRange.length - 1; i++) {\n for (Entry<String, AggregationData<String>> oldMetricTimeSeriesEntry : oldMetricTimeSeriesData.entrySet()) {\n Set<Aggregati... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_23 | {
"fields": [
{
"declarator": "aggregator = null",
"modifier": "",
"original_string": "DataAggregator aggregator = null;",
"type": "DataAggregator",
"var_name": "aggregator"
},
{
"declarator": "oldMetricTimeSeriesData",
"modifier": "private",
"original_strin... | {
"body": "@Test\n public void testGetAggregatedMetricTimeSeriesData() {\n fail(\"Not yet implemented\");\n }",
"class_method_signature": "DataAggregatorTest.testGetAggregatedMetricTimeSeriesData()",
"constructor": false,
"full_signature": "@Test public void testGetAggregatedMetricTimeSeriesData()",
... | {
"fields": [
{
"declarator": "oldMetricTimeSeriesData",
"modifier": "private final",
"original_string": "private final Map<String, AggregationData<String>> oldMetricTimeSeriesData;",
"type": "Map<String, AggregationData<String>>",
"var_name": "oldMetricTimeSeriesData"
},
{
... | {
"body": "public Map<String, AggregationData<String>> getAggregatedMetricTimeSeriesData() {\n return aggregatedMetricTimeSeriesData;\n }",
"class_method_signature": "DataAggregator.getAggregatedMetricTimeSeriesData()",
"constructor": false,
"full_signature": "public Map<String, AggregationData<String>> ... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_35 | {
"fields": [
{
"declarator": "entityManagerFactory",
"modifier": "private",
"original_string": "private EntityManagerFactory entityManagerFactory;",
"type": "EntityManagerFactory",
"var_name": "entityManagerFactory"
},
{
"declarator": "provider",
"modifier": "pri... | {
"body": "@Test\n public void testGetMetricsDataByOperationOneServiceOneOperationAllConsumers() {\n long now = System.currentTimeMillis();\n long oneHourAgo = now - TimeUnit.SECONDS.toMillis(3600);\n long twoHoursAgo = oneHourAgo - TimeUnit.SECONDS.toMillis(3600);\n\n MetricCriteria me... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final SOAMetricsQueryServiceProvider delegate;",
"type": "SOAMetricsQueryServiceProvider",
"var_name": "delegate"
}
],
"file": "turmeric-monitoring-dao-provider/src/main/java/or... | {
"body": "@Override\n public List<MetricGroupData> getMetricsData(MetricCriteria metricCriteria,\n MetricResourceCriteria metricResourceCriteria) {\n return delegate.getMetricsData(metricCriteria, metricResourceCriteria);\n }",
"class_method_signature": "DAOSOAMetricsQueryServicePro... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_19 | {
"fields": [
{
"declarator": "consumerName = \"ConsumerName1\"",
"modifier": "private final",
"original_string": "private final String consumerName = \"ConsumerName1\";",
"type": "String",
"var_name": "consumerName"
},
{
"declarator": "errorsToStore = null",
"mod... | {
"body": "@Test\n public void testFindMetricValuesByOperationFromOneMinuteToNow() throws ServiceException {\n Collection<MetricValueAggregator> snapshotCollection = createMetricValueAggregatorsForOneConsumerWithTotalMetric(\n srvcAdminName, opName, consumerName);\n Collection<MetricValueAgg... | {
"fields": [
{
"declarator": "errorListNames = new ArrayList<String>()",
"modifier": "public static final",
"original_string": "public static final List<String> errorListNames = new ArrayList<String>();",
"type": "List<String>",
"var_name": "errorListNames"
}
],
"file": "tur... | {
"body": "@Override\n public Map<String, List<MetricValue<?>>> findMetricValuesByOperation(List<String> ipAddressList, String metricName,\n long begin, long end, boolean serverSide, int aggregationPeriod, Map<String, List<String>> filters) {\n Map<String, List<MetricValue<?>>> result = new HashMap<... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_58 | {
"fields": [
{
"declarator": "entityManagerFactory",
"modifier": "private",
"original_string": "private EntityManagerFactory entityManagerFactory;",
"type": "EntityManagerFactory",
"var_name": "entityManagerFactory"
},
{
"declarator": "provider",
"modifier": "pri... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testGetErrorGraphForNonExistantCategory() {\n long duration = 3600;// in secs\n int aggregationPeriod = 60;// in secs\n MetricCriteria metricCriteria = new MetricCriteria();\n metricCriteria.setFirstStartTime(twoM... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final SOAMetricsQueryServiceProvider delegate;",
"type": "SOAMetricsQueryServiceProvider",
"var_name": "delegate"
}
],
"file": "turmeric-monitoring-dao-provider/src/main/java/or... | {
"body": "@Override\n public List<MetricGraphData> getErrorGraph(String serviceName, String operationName, String consumerName,\n String errorId, String errorCategory, String errorSeverity, MetricCriteria metricCriteria) {\n return delegate.getErrorGraph(serviceName, operationName, consu... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_39 | {
"fields": [
{
"declarator": "entityManagerFactory",
"modifier": "private",
"original_string": "private EntityManagerFactory entityManagerFactory;",
"type": "EntityManagerFactory",
"var_name": "entityManagerFactory"
},
{
"declarator": "provider",
"modifier": "pri... | {
"body": "@Test\n public void testGetMetricsDataByConsumerOneServiceAllOperationsOneConsumer() {\n long now = System.currentTimeMillis();\n long oneHourAgo = now - TimeUnit.SECONDS.toMillis(3600);\n long twoHoursAgo = oneHourAgo - TimeUnit.SECONDS.toMillis(3600);\n\n MetricCriteria met... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final SOAMetricsQueryServiceProvider delegate;",
"type": "SOAMetricsQueryServiceProvider",
"var_name": "delegate"
}
],
"file": "turmeric-monitoring-dao-provider/src/main/java/or... | {
"body": "@Override\n public List<MetricGroupData> getMetricsData(MetricCriteria metricCriteria,\n MetricResourceCriteria metricResourceCriteria) {\n return delegate.getMetricsData(metricCriteria, metricResourceCriteria);\n }",
"class_method_signature": "DAOSOAMetricsQueryServicePro... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_0 | {
"fields": [
{
"declarator": "metricsStorageProvider",
"modifier": "private",
"original_string": "private MetricsStorageProvider metricsStorageProvider;",
"type": "MetricsStorageProvider",
"var_name": "metricsStorageProvider"
}
],
"file": "monitoring-metrics-jpa/src/test/jav... | {
"body": "@Test\n public void testSaveFirstSnapshot() throws Exception {\n long timeStamp = System.currentTimeMillis();\n\n MetricId metricId1 = new MetricId(\"test_count\", \"service1\", \"operation1\");\n MetricValue metricValue1 = new LongSumMetricValue(metricId1);\n MetricValueAggr... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private volatile",
"original_string": "private volatile MetricsStorageProvider delegate;",
"type": "MetricsStorageProvider",
"var_name": "delegate"
},
{
"declarator": "entityManagerFactory",
"modifier": "priva... | {
"body": "@Override\n public void saveMetricSnapshot(long timeSnapshot, Collection<MetricValueAggregator> snapshotCollection) throws ServiceException {\n delegate.saveMetricSnapshot(timeSnapshot, snapshotCollection);\n }",
"class_method_signature": "DAOMetricsStorageProvider.saveMetricSnapshot(long ti... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_15 | {
"fields": [
{
"declarator": "now = 0",
"modifier": "private",
"original_string": "private long now = 0;",
"type": "long",
"var_name": "now"
},
{
"declarator": "consumerName = null",
"modifier": "private",
"original_string": "private String consumerName = n... | {
"body": "@Test\n public void testByDateAndServiceNameOneDayAgo() throws ServiceException {// validated\n long theDayBefore = now - 86400000;\n List<String> result = ipPerDayAndServiceNameDAO.findByDateAndServiceName(theDayBefore, srvcAdminName);\n assertNotNull(result);\n assertEquals(\"There ... | {
"fields": [],
"file": "turmeric-monitoring-cassandra-provider/src/main/java/org/ebayopensource/turmeric/monitoring/provider/dao/impl/IpPerDayAndServiceNameDAOImpl.java",
"identifier": "IpPerDayAndServiceNameDAOImpl",
"interfaces": "implements IpPerDayAndServiceNameDAO<SK, K>",
"methods": [
{
"clas... | {
"body": "@Override\n public List<String> findByDateAndServiceName(long currentTimeMillis, String serviceName) {\n List<String> result = new ArrayList<String>();\n String superKey = new SimpleDateFormat(\"ddMMyyyy\").format(new Date(currentTimeMillis));\n\n SuperColumnQuery<String, String, String, S... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_42 | {
"fields": [
{
"declarator": "entityManagerFactory",
"modifier": "private",
"original_string": "private EntityManagerFactory entityManagerFactory;",
"type": "EntityManagerFactory",
"var_name": "entityManagerFactory"
},
{
"declarator": "provider",
"modifier": "pri... | {
"body": "@Test\n public void testGetMetricValueByOperationOneServiceAllOperationsAllConsumers() {\n long now = System.currentTimeMillis();\n long oneHourAgo = now - TimeUnit.SECONDS.toMillis(3600);\n long twoHoursAgo = oneHourAgo - TimeUnit.SECONDS.toMillis(3600);\n\n CriteriaInfo cri... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final SOAMetricsQueryServiceProvider delegate;",
"type": "SOAMetricsQueryServiceProvider",
"var_name": "delegate"
}
],
"file": "turmeric-monitoring-dao-provider/src/main/java/or... | {
"body": "@Override\n public List<MetricGraphData> getMetricValue(CriteriaInfo criteriaInfo, long startTime, long duration, int step,\n String autoDelay) {\n return delegate.getMetricValue(criteriaInfo, startTime, duration, step, autoDelay);\n }",
"class_method_signature": "DAOSOAMe... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
1772795_54 | {
"fields": [
{
"declarator": "entityManagerFactory",
"modifier": "private",
"original_string": "private EntityManagerFactory entityManagerFactory;",
"type": "EntityManagerFactory",
"var_name": "entityManagerFactory"
},
{
"declarator": "provider",
"modifier": "pri... | {
"body": "@Test\n public void testGetApplicationErrorGraphForServiceOneMinuteAgo() {\n long duration = 120;// in secs\n int aggregationPeriod = 60;// in secs\n MetricCriteria metricCriteria = new MetricCriteria();\n metricCriteria.setFirstStartTime(oneMinuteAgo);\n metricCriteri... | {
"fields": [
{
"declarator": "delegate",
"modifier": "private final",
"original_string": "private final SOAMetricsQueryServiceProvider delegate;",
"type": "SOAMetricsQueryServiceProvider",
"var_name": "delegate"
}
],
"file": "turmeric-monitoring-dao-provider/src/main/java/or... | {
"body": "@Override\n public List<MetricGraphData> getErrorGraph(String serviceName, String operationName, String consumerName,\n String errorId, String errorCategory, String errorSeverity, MetricCriteria metricCriteria) {\n return delegate.getErrorGraph(serviceName, operationName, consu... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1772795,
"size": 4476,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/ebayopensource/turmeric-monitoring"
} |
122583771_0 | {
"fields": [
{
"declarator": "system",
"modifier": "private static",
"original_string": "private static ActorSystem system;",
"type": "ActorSystem",
"var_name": "system"
}
],
"file": "chirp-impl/src/test/java/sample/chirper/chirp/impl/ChirpTimelineEntityTest.java",
"identi... | {
"body": "@Test\n public void testAddChirp() {\n ChirpTopicStub topic = new ChirpTopicStub();\n PersistentEntityTestDriver<ChirpTimelineCommand, ChirpTimelineEvent, NotUsed> driver =\n new PersistentEntityTestDriver<>(system, new ChirpTimelineEntity(topic), \"user-1\");\n\n Chi... | {
"fields": [
{
"declarator": "topic",
"modifier": "private final",
"original_string": "private final ChirpTopic topic;",
"type": "ChirpTopic",
"var_name": "topic"
}
],
"file": "chirp-impl/src/main/java/sample/chirper/chirp/impl/ChirpTimelineEntity.java",
"identifier": "Chi... | {
"body": "private Persist addChirp(AddChirp cmd, CommandContext<Done> ctx) {\n return ctx.thenPersist(new ChirpAdded(cmd.chirp), evt -> {\n ctx.reply(Done.getInstance());\n topic.publish(cmd.chirp);\n });\n }",
"class_method_signature": "ChirpTimelineEntity.addChirp(AddChirp ... | {
"created": null,
"fork": null,
"fork_count": 31,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 122583771,
"size": 222,
"stargazer_count": 16,
"stars": null,
"updates": null,
"url": "https://github.com/lagom/lagom-java-sbt-chirper-example"
} |
6275822_25 | {
"fields": [
{
"declarator": "DEFAULT_CERTIFICATE = certificate(pathResource(\"cert.jks\"), \"mocohttps\", \"mocohttps\")",
"modifier": "private static final",
"original_string": "private static final HttpsCertificate DEFAULT_CERTIFICATE = certificate(pathResource(\"cert.jks\"), \"mocohttps\", ... | {
"body": "@Test\n public void should_verify_expected_request_for_at_most() throws Exception {\n final HttpServer server = httpServer(port(), hit);\n server.get(by(uri(\"/foo\"))).response(\"bar\");\n\n running(server, () -> {\n assertThat(helper.get(remoteUrl(\"/foo\")), is(\"bar\"... | {
"fields": [],
"file": "moco-core/src/main/java/com/github/dreamhead/moco/MocoRequestHit.java",
"identifier": "MocoRequestHit",
"interfaces": "",
"methods": [
{
"class_method_signature": "MocoRequestHit.requestHit()",
"constructor": false,
"full_signature": "public static RequestHit req... | {
"body": "public static VerificationMode atMost(final int count) {\n checkArgument(count > 0, \"Times count must be greater than zero\");\n return new AtMostVerification(count);\n }",
"class_method_signature": "MocoRequestHit.atMost(final int count)",
"constructor": false,
"full_signature": "p... | {
"created": null,
"fork": null,
"fork_count": 839,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6275822,
"size": 4874,
"stargazer_count": 3213,
"stars": null,
"updates": null,
"url": "https://github.com/dreamhead/moco"
} |
6275822_72 | {
"fields": [
{
"declarator": "folder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder folder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "folder"
}
],
"file": "moco-core/src/test/java/com/g... | {
"body": "@Test\n public void should_work_with_other_http_configuration() throws Exception {\n Plain resource1 = new Plain();\n resource1.code = 1;\n resource1.message = \"hello\";\n\n Plain resource2 = new Plain();\n resource2.code = 2;\n resource2.message = \"world\";\n... | {
"fields": [],
"file": "moco-core/src/main/java/com/github/dreamhead/moco/MocoRest.java",
"identifier": "MocoRest",
"interfaces": "",
"methods": [
{
"class_method_signature": "MocoRest.restServer(final int port, final MocoConfig... configs)",
"constructor": false,
"full_signature": "pub... | {
"body": "public static RestSettingBuilder get(final String id) {\n return get(eq(checkId(id)));\n }",
"class_method_signature": "MocoRest.get(final String id)",
"constructor": false,
"full_signature": "public static RestSettingBuilder get(final String id)",
"identifier": "get",
"invocations": [
... | {
"created": null,
"fork": null,
"fork_count": 839,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6275822,
"size": 4874,
"stargazer_count": 3213,
"stars": null,
"updates": null,
"url": "https://github.com/dreamhead/moco"
} |
6275822_64 | {
"fields": [
{
"declarator": "folder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder folder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "folder"
}
],
"file": "moco-core/src/test/java/com/g... | {
"body": "@Test\n public void should_head() throws Exception {\n server.resource(\"targets\",\n head(\"1\").response(header(\"ETag\", \"Moco\"))\n );\n\n running(server, new Runnable() {\n @Override\n public void run() throws Exception {\n H... | {
"fields": [],
"file": "moco-core/src/main/java/com/github/dreamhead/moco/MocoRest.java",
"identifier": "MocoRest",
"interfaces": "",
"methods": [
{
"class_method_signature": "MocoRest.restServer(final int port, final MocoConfig... configs)",
"constructor": false,
"full_signature": "pub... | {
"body": "public static RestSettingBuilder head() {\n return all(HttpMethod.HEAD);\n }",
"class_method_signature": "MocoRest.head()",
"constructor": false,
"full_signature": "public static RestSettingBuilder head()",
"identifier": "head",
"invocations": [
"all"
],
"modifiers": "public sta... | {
"created": null,
"fork": null,
"fork_count": 839,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6275822,
"size": 4874,
"stargazer_count": 3213,
"stars": null,
"updates": null,
"url": "https://github.com/dreamhead/moco"
} |
6275822_33 | {
"fields": [
{
"declarator": "DEFAULT_CERTIFICATE = certificate(pathResource(\"cert.jks\"), \"mocohttps\", \"mocohttps\")",
"modifier": "private static final",
"original_string": "private static final HttpsCertificate DEFAULT_CERTIFICATE = certificate(pathResource(\"cert.jks\"), \"mocohttps\", ... | {
"body": "@Test\n public void should_verify_expected_request_and_log_at_same_time_for_https() throws Exception {\n final HttpServer server = httpsServer(port(), DEFAULT_CERTIFICATE, hit, log());\n server.get(by(uri(\"/foo\"))).response(\"bar\");\n\n running(server, () -> assertThat(helper.get... | {
"fields": [],
"file": "moco-core/src/main/java/com/github/dreamhead/moco/MocoRequestHit.java",
"identifier": "MocoRequestHit",
"interfaces": "",
"methods": [
{
"class_method_signature": "MocoRequestHit.requestHit()",
"constructor": false,
"full_signature": "public static RequestHit req... | {
"body": "public static VerificationMode times(final int count) {\n checkArgument(count >= 0, \"Times count must not be less than zero\");\n return new TimesVerification(count);\n }",
"class_method_signature": "MocoRequestHit.times(final int count)",
"constructor": false,
"full_signature": "pu... | {
"created": null,
"fork": null,
"fork_count": 839,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6275822,
"size": 4874,
"stargazer_count": 3213,
"stars": null,
"updates": null,
"url": "https://github.com/dreamhead/moco"
} |
6275822_48 | {
"fields": [
{
"declarator": "MOUNT_DIR = \"src/test/resources/test\"",
"modifier": "private static final",
"original_string": "private static final String MOUNT_DIR = \"src/test/resources/test\";",
"type": "String",
"var_name": "MOUNT_DIR"
}
],
"file": "moco-core/src/test/j... | {
"body": "@Test(expected = HttpResponseException.class)\n public void should_return_bad_request_for_nonexistence_file() throws Exception {\n server.mount(MOUNT_DIR, to(\"/dir\"));\n\n running(server, new Runnable() {\n @Override\n public void run() throws IOException {\n ... | {
"fields": [],
"file": "moco-core/src/main/java/com/github/dreamhead/moco/MocoMount.java",
"identifier": "MocoMount",
"interfaces": "",
"methods": [
{
"class_method_signature": "MocoMount.to(final String target)",
"constructor": false,
"full_signature": "public static MountTo to(final S... | {
"body": "public static MountTo to(final String target) {\n return new MountTo(checkNotNullOrEmpty(target, \"Target should not be null\"));\n }",
"class_method_signature": "MocoMount.to(final String target)",
"constructor": false,
"full_signature": "public static MountTo to(final String target)",
"... | {
"created": null,
"fork": null,
"fork_count": 839,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6275822,
"size": 4874,
"stargazer_count": 3213,
"stars": null,
"updates": null,
"url": "https://github.com/dreamhead/moco"
} |
6275822_29 | {
"fields": [
{
"declarator": "DEFAULT_CERTIFICATE = certificate(pathResource(\"cert.jks\"), \"mocohttps\", \"mocohttps\")",
"modifier": "private static final",
"original_string": "private static final HttpsCertificate DEFAULT_CERTIFICATE = certificate(pathResource(\"cert.jks\"), \"mocohttps\", ... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void should_throw_exception_for_negative_number_for_times() {\n times(-1);\n }",
"class_method_signature": "MocoRequestHitTest.should_throw_exception_for_negative_number_for_times()",
"constructor": false,
"full_signature": "@Test... | {
"fields": [],
"file": "moco-core/src/main/java/com/github/dreamhead/moco/MocoRequestHit.java",
"identifier": "MocoRequestHit",
"interfaces": "",
"methods": [
{
"class_method_signature": "MocoRequestHit.requestHit()",
"constructor": false,
"full_signature": "public static RequestHit req... | {
"body": "public static VerificationMode times(final int count) {\n checkArgument(count >= 0, \"Times count must not be less than zero\");\n return new TimesVerification(count);\n }",
"class_method_signature": "MocoRequestHit.times(final int count)",
"constructor": false,
"full_signature": "pu... | {
"created": null,
"fork": null,
"fork_count": 839,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6275822,
"size": 4874,
"stargazer_count": 3213,
"stars": null,
"updates": null,
"url": "https://github.com/dreamhead/moco"
} |
6275822_68 | {
"fields": [
{
"declarator": "folder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder folder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "folder"
}
],
"file": "moco-core/src/test/java/com/g... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void should_throw_exception_for_get_id_with_slash() throws Exception {\n get(\"1/1\").response(status(200));\n }",
"class_method_signature": "MocoRestTest.should_throw_exception_for_get_id_with_slash()",
"constructor": false,
"ful... | {
"fields": [],
"file": "moco-core/src/main/java/com/github/dreamhead/moco/MocoRest.java",
"identifier": "MocoRest",
"interfaces": "",
"methods": [
{
"class_method_signature": "MocoRest.restServer(final int port, final MocoConfig... configs)",
"constructor": false,
"full_signature": "pub... | {
"body": "public static RestSettingBuilder get(final String id) {\n return get(eq(checkId(id)));\n }",
"class_method_signature": "MocoRest.get(final String id)",
"constructor": false,
"full_signature": "public static RestSettingBuilder get(final String id)",
"identifier": "get",
"invocations": [
... | {
"created": null,
"fork": null,
"fork_count": 839,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6275822,
"size": 4874,
"stargazer_count": 3213,
"stars": null,
"updates": null,
"url": "https://github.com/dreamhead/moco"
} |
6275822_44 | {
"fields": [],
"file": "moco-core/src/test/java/com/github/dreamhead/moco/util/FileContentTypeTest.java",
"identifier": "FileContentTypeTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void should_get_default_type_from_unknown_name() {\n\t\tFileContentType contentType = new FileContentType(\"UNKNOWN_FILE\");\n\t\tassertThat(contentType.getContentType(), is(MediaType.PLAIN_TEXT_UTF_8));\n\t}",
"class_method_signature": "FileContentTypeTest.should_get_default_type_from_un... | {
"fields": [
{
"declarator": "DEFAULT_CONTENT_TYPE_WITH_CHARSET = MediaType.PLAIN_TEXT_UTF_8",
"modifier": "public static final",
"original_string": "public static final MediaType DEFAULT_CONTENT_TYPE_WITH_CHARSET = MediaType.PLAIN_TEXT_UTF_8;",
"type": "MediaType",
"var_name": "DEF... | {
"body": "public MediaType getContentType() {\n Optional<MediaType> optionalType = toContentType(Files.getFileExtension(filename));\n Optional<Charset> targetCharset = toCharset(optionalType.orElse(null));\n\n MediaType type = optionalType.orElse(DEFAULT_CONTENT_TYPE_WITH_CHARSET);\n if (... | {
"created": null,
"fork": null,
"fork_count": 839,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6275822,
"size": 4874,
"stargazer_count": 3213,
"stars": null,
"updates": null,
"url": "https://github.com/dreamhead/moco"
} |
6275822_2 | {
"fields": [],
"file": "moco-runner/src/test/java/com/github/dreamhead/moco/bootstrap/ShutdownArgsTest.java",
"identifier": "ShutdownArgsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = ParseArgException.class)\n public void should_set_shutdown_port() {\n parse(new String[]{\"shutdown\", \"-s\"});\n }",
"class_method_signature": "ShutdownArgsTest.should_set_shutdown_port()",
"constructor": false,
"full_signature": "@Test(expected = ParseArgException.cla... | {
"fields": [],
"file": "moco-runner/src/main/java/com/github/dreamhead/moco/bootstrap/ShutdownArgs.java",
"identifier": "ShutdownArgs",
"interfaces": "",
"methods": [
{
"class_method_signature": "ShutdownArgs.ShutdownArgs(final Integer shutdownPort)",
"constructor": true,
"full_signatur... | {
"body": "public static ShutdownArgs parse(final String[] args) {\n try {\n CommandLineParser parser = new DefaultParser();\n CommandLine cmd = parser.parse(createShutdownOptions(), args);\n return new ShutdownArgs(StartArgsParser.getPort(cmd.getOptionValue(\"s\")));\n ... | {
"created": null,
"fork": null,
"fork_count": 839,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6275822,
"size": 4874,
"stargazer_count": 3213,
"stars": null,
"updates": null,
"url": "https://github.com/dreamhead/moco"
} |
6275822_13 | {
"fields": [
{
"declarator": "helper = new MocoTestHelper()",
"modifier": "private final",
"original_string": "private final MocoTestHelper helper = new MocoTestHelper();",
"type": "MocoTestHelper",
"var_name": "helper"
},
{
"declarator": "runner",
"modifier": "p... | {
"body": "@Test\n public void should_run_with_global_response_settings() throws IOException {\n stream = getResourceAsStream(\"settings/response-settings.json\");\n runner = new SettingRunner(stream, createStartArgs(12306));\n runner.run();\n\n Header header = helper.getResponse(remote... | {
"fields": [
{
"declarator": "parser = new GlobalSettingParser()",
"modifier": "private final",
"original_string": "private final GlobalSettingParser parser = new GlobalSettingParser();",
"type": "GlobalSettingParser",
"var_name": "parser"
},
{
"declarator": "globalSet... | {
"body": "public void run() {\n runner = newJsonRunnerWithSetting(\n globalSettings.stream()\n .filter(byEnv(this.env))\n .map(toRunnerSetting())\n .collect(toList()), startArgs);\n runner.run();\n }",
"class_metho... | {
"created": null,
"fork": null,
"fork_count": 839,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6275822,
"size": 4874,
"stargazer_count": 3213,
"stars": null,
"updates": null,
"url": "https://github.com/dreamhead/moco"
} |
6275822_52 | {
"fields": [],
"file": "moco-core/src/test/java/com/github/dreamhead/moco/internal/InternalApisTest.java",
"identifier": "InternalApisTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void should_not_match_mismatch_uri() {\n RequestMatcher matcher = InternalApis.context(\"targets\");\n assertThat(matcher.match(requestByUri(\"something\")), is(false));\n assertThat(matcher.match(requestByUri(\"targetshello\")), is(false));\n }",
"class_method_s... | {
"fields": [],
"file": "moco-core/src/main/java/com/github/dreamhead/moco/internal/InternalApis.java",
"identifier": "InternalApis",
"interfaces": "",
"methods": [
{
"class_method_signature": "InternalApis.context(final String context)",
"constructor": false,
"full_signature": "public s... | {
"body": "public static RequestMatcher context(final String context) {\n return or(by(uri(context)), match(uri(URLs.join(context, \".*\"))));\n }",
"class_method_signature": "InternalApis.context(final String context)",
"constructor": false,
"full_signature": "public static RequestMatcher context(fin... | {
"created": null,
"fork": null,
"fork_count": 839,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6275822,
"size": 4874,
"stargazer_count": 3213,
"stars": null,
"updates": null,
"url": "https://github.com/dreamhead/moco"
} |
6275822_53 | {
"fields": [],
"file": "moco-core/src/test/java/com/github/dreamhead/moco/matcher/XmlRequestMatcherTest.java",
"identifier": "XmlRequestMatcherTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void should_return_false_for_empty_content() {\n XmlRequestMatcher unitUnderTest = new XmlRequestMatcher(text(\"<request><parameters><id>1</id></parameters></request>\"));\n HttpRequest request = DefaultHttpRequest.builder().withStringContent(\"\").build();\n assertTh... | {
"fields": [
{
"declarator": "helper = new XmlExtractorHelper()",
"modifier": "private final",
"original_string": "private final XmlExtractorHelper helper = new XmlExtractorHelper();",
"type": "XmlExtractorHelper",
"var_name": "helper"
},
{
"declarator": "extractor",
... | {
"body": "@Override\n public boolean match(final Request request) {\n try {\n Optional<Document> requestDocument = extractDocument(request, extractor);\n return requestDocument.isPresent() && tryToMatch(request, requestDocument.get());\n } catch (SAXException e) {\n ... | {
"created": null,
"fork": null,
"fork_count": 839,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6275822,
"size": 4874,
"stargazer_count": 3213,
"stars": null,
"updates": null,
"url": "https://github.com/dreamhead/moco"
} |
6275822_12 | {
"fields": [
{
"declarator": "helper = new MocoTestHelper()",
"modifier": "private final",
"original_string": "private final MocoTestHelper helper = new MocoTestHelper();",
"type": "MocoTestHelper",
"var_name": "helper"
},
{
"declarator": "runner",
"modifier": "p... | {
"body": "@Test(expected = HttpResponseException.class)\n public void should_not_run_without_env() throws IOException {\n stream = getResourceAsStream(\"settings/env-settings.json\");\n runner = new SettingRunner(stream, createStartArgs(12306, \"bar\"));\n runner.run();\n\n helper.get(... | {
"fields": [
{
"declarator": "parser = new GlobalSettingParser()",
"modifier": "private final",
"original_string": "private final GlobalSettingParser parser = new GlobalSettingParser();",
"type": "GlobalSettingParser",
"var_name": "parser"
},
{
"declarator": "globalSet... | {
"body": "public void run() {\n runner = newJsonRunnerWithSetting(\n globalSettings.stream()\n .filter(byEnv(this.env))\n .map(toRunnerSetting())\n .collect(toList()), startArgs);\n runner.run();\n }",
"class_metho... | {
"created": null,
"fork": null,
"fork_count": 839,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6275822,
"size": 4874,
"stargazer_count": 3213,
"stars": null,
"updates": null,
"url": "https://github.com/dreamhead/moco"
} |
6275822_45 | {
"fields": [],
"file": "moco-core/src/test/java/com/github/dreamhead/moco/util/FileContentTypeTest.java",
"identifier": "FileContentTypeTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void should_have_charset_for_file() {\n\t\tCharset gbk = Charset.forName(\"gbk\");\n\t\tFileContentType contentType = new FileContentType(\"result.response\", gbk);\n\t\tassertThat(contentType.getContentType(), is(MediaType.create(\"text\", \"plain\").withCharset(gbk)));\n\t}",
"class_met... | {
"fields": [
{
"declarator": "DEFAULT_CONTENT_TYPE_WITH_CHARSET = MediaType.PLAIN_TEXT_UTF_8",
"modifier": "public static final",
"original_string": "public static final MediaType DEFAULT_CONTENT_TYPE_WITH_CHARSET = MediaType.PLAIN_TEXT_UTF_8;",
"type": "MediaType",
"var_name": "DEF... | {
"body": "public MediaType getContentType() {\n Optional<MediaType> optionalType = toContentType(Files.getFileExtension(filename));\n Optional<Charset> targetCharset = toCharset(optionalType.orElse(null));\n\n MediaType type = optionalType.orElse(DEFAULT_CONTENT_TYPE_WITH_CHARSET);\n if (... | {
"created": null,
"fork": null,
"fork_count": 839,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6275822,
"size": 4874,
"stargazer_count": 3213,
"stars": null,
"updates": null,
"url": "https://github.com/dreamhead/moco"
} |
6275822_3 | {
"fields": [
{
"declarator": "parser",
"modifier": "private",
"original_string": "private GlobalSettingParser parser;",
"type": "GlobalSettingParser",
"var_name": "parser"
}
],
"file": "moco-runner/src/test/java/com/github/dreamhead/moco/parser/GlobalSettingParserTest.java",... | {
"body": "@Test\n public void should_parse_settings_file() {\n InputStream stream = getResourceAsStream(\"settings/settings.json\");\n ImmutableList<GlobalSetting> globalSettings = parser.parse(stream);\n\n assertThat(globalSettings.get(0).includes().get(0), is(join(\"src\", \"test\", \"resou... | {
"fields": [],
"file": "moco-runner/src/main/java/com/github/dreamhead/moco/parser/GlobalSettingParser.java",
"identifier": "GlobalSettingParser",
"interfaces": "",
"methods": [
{
"class_method_signature": "GlobalSettingParser.parse(final InputStream is)",
"constructor": false,
"full_si... | {
"body": "public ImmutableList<GlobalSetting> parse(final InputStream is) {\n return Jsons.toObjects(is, GlobalSetting.class);\n }",
"class_method_signature": "GlobalSettingParser.parse(final InputStream is)",
"constructor": false,
"full_signature": "public ImmutableList<GlobalSetting> parse(final In... | {
"created": null,
"fork": null,
"fork_count": 839,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6275822,
"size": 4874,
"stargazer_count": 3213,
"stars": null,
"updates": null,
"url": "https://github.com/dreamhead/moco"
} |
6275822_69 | {
"fields": [
{
"declarator": "folder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder folder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "folder"
}
],
"file": "moco-core/src/test/java/com/g... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void should_throw_exception_for_get_id_with_space() {\n get(\"1 1\").response(status(200));\n }",
"class_method_signature": "MocoRestTest.should_throw_exception_for_get_id_with_space()",
"constructor": false,
"full_signature": "@T... | {
"fields": [],
"file": "moco-core/src/main/java/com/github/dreamhead/moco/MocoRest.java",
"identifier": "MocoRest",
"interfaces": "",
"methods": [
{
"class_method_signature": "MocoRest.restServer(final int port, final MocoConfig... configs)",
"constructor": false,
"full_signature": "pub... | {
"body": "public static RestSettingBuilder get(final String id) {\n return get(eq(checkId(id)));\n }",
"class_method_signature": "MocoRest.get(final String id)",
"constructor": false,
"full_signature": "public static RestSettingBuilder get(final String id)",
"identifier": "get",
"invocations": [
... | {
"created": null,
"fork": null,
"fork_count": 839,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6275822,
"size": 4874,
"stargazer_count": 3213,
"stars": null,
"updates": null,
"url": "https://github.com/dreamhead/moco"
} |
6275822_28 | {
"fields": [
{
"declarator": "DEFAULT_CERTIFICATE = certificate(pathResource(\"cert.jks\"), \"mocohttps\", \"mocohttps\")",
"modifier": "private static final",
"original_string": "private static final HttpsCertificate DEFAULT_CERTIFICATE = certificate(pathResource(\"cert.jks\"), \"mocohttps\", ... | {
"body": "@Test(expected = VerificationException.class)\n public void should_fail_to_verify_while_once_expectation_can_not_be_met() throws Exception {\n httpServer(port(), hit);\n hit.verify(by(uri(\"/foo\")), times(1));\n }",
"class_method_signature": "MocoRequestHitTest.should_fail_to_verify_... | {
"fields": [],
"file": "moco-core/src/main/java/com/github/dreamhead/moco/MocoRequestHit.java",
"identifier": "MocoRequestHit",
"interfaces": "",
"methods": [
{
"class_method_signature": "MocoRequestHit.requestHit()",
"constructor": false,
"full_signature": "public static RequestHit req... | {
"body": "public static VerificationMode times(final int count) {\n checkArgument(count >= 0, \"Times count must not be less than zero\");\n return new TimesVerification(count);\n }",
"class_method_signature": "MocoRequestHit.times(final int count)",
"constructor": false,
"full_signature": "pu... | {
"created": null,
"fork": null,
"fork_count": 839,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6275822,
"size": 4874,
"stargazer_count": 3213,
"stars": null,
"updates": null,
"url": "https://github.com/dreamhead/moco"
} |
6275822_49 | {
"fields": [
{
"declarator": "MOUNT_DIR = \"src/test/resources/test\"",
"modifier": "private static final",
"original_string": "private static final String MOUNT_DIR = \"src/test/resources/test\";",
"type": "String",
"var_name": "MOUNT_DIR"
}
],
"file": "moco-core/src/test/j... | {
"body": "@Test\n public void should_mount_with_other_handler() throws Exception {\n server.mount(MOUNT_DIR, to(\"/dir\")).response(header(HttpHeaders.CONTENT_TYPE, \"text/plain\"));\n\n running(server, new Runnable() {\n @Override\n public void run() throws IOException {\n ... | {
"fields": [],
"file": "moco-core/src/main/java/com/github/dreamhead/moco/MocoMount.java",
"identifier": "MocoMount",
"interfaces": "",
"methods": [
{
"class_method_signature": "MocoMount.to(final String target)",
"constructor": false,
"full_signature": "public static MountTo to(final S... | {
"body": "public static MountTo to(final String target) {\n return new MountTo(checkNotNullOrEmpty(target, \"Target should not be null\"));\n }",
"class_method_signature": "MocoMount.to(final String target)",
"constructor": false,
"full_signature": "public static MountTo to(final String target)",
"... | {
"created": null,
"fork": null,
"fork_count": 839,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6275822,
"size": 4874,
"stargazer_count": 3213,
"stars": null,
"updates": null,
"url": "https://github.com/dreamhead/moco"
} |
6275822_32 | {
"fields": [
{
"declarator": "DEFAULT_CERTIFICATE = certificate(pathResource(\"cert.jks\"), \"mocohttps\", \"mocohttps\")",
"modifier": "private static final",
"original_string": "private static final HttpsCertificate DEFAULT_CERTIFICATE = certificate(pathResource(\"cert.jks\"), \"mocohttps\", ... | {
"body": "@Test\n public void should_verify_expected_request_and_log_at_same_time() throws Exception {\n final HttpServer server = httpServer(port(), hit, log());\n server.get(by(uri(\"/foo\"))).response(\"bar\");\n\n running(server, () -> assertThat(helper.get(remoteUrl(\"/foo\")), is(\"bar\... | {
"fields": [],
"file": "moco-core/src/main/java/com/github/dreamhead/moco/MocoRequestHit.java",
"identifier": "MocoRequestHit",
"interfaces": "",
"methods": [
{
"class_method_signature": "MocoRequestHit.requestHit()",
"constructor": false,
"full_signature": "public static RequestHit req... | {
"body": "public static VerificationMode times(final int count) {\n checkArgument(count >= 0, \"Times count must not be less than zero\");\n return new TimesVerification(count);\n }",
"class_method_signature": "MocoRequestHit.times(final int count)",
"constructor": false,
"full_signature": "pu... | {
"created": null,
"fork": null,
"fork_count": 839,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6275822,
"size": 4874,
"stargazer_count": 3213,
"stars": null,
"updates": null,
"url": "https://github.com/dreamhead/moco"
} |
6275822_65 | {
"fields": [
{
"declarator": "folder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder folder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "folder"
}
],
"file": "moco-core/src/test/java/com/g... | {
"body": "@Test\n public void should_not_head_with_unknown_id() throws Exception {\n server.resource(\"targets\",\n head(\"1\").response(header(\"ETag\", \"Moco\"))\n );\n\n running(server, new Runnable() {\n @Override\n public void run() throws Exception ... | {
"fields": [],
"file": "moco-core/src/main/java/com/github/dreamhead/moco/MocoRest.java",
"identifier": "MocoRest",
"interfaces": "",
"methods": [
{
"class_method_signature": "MocoRest.restServer(final int port, final MocoConfig... configs)",
"constructor": false,
"full_signature": "pub... | {
"body": "public static RestSettingBuilder head() {\n return all(HttpMethod.HEAD);\n }",
"class_method_signature": "MocoRest.head()",
"constructor": false,
"full_signature": "public static RestSettingBuilder head()",
"identifier": "head",
"invocations": [
"all"
],
"modifiers": "public sta... | {
"created": null,
"fork": null,
"fork_count": 839,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6275822,
"size": 4874,
"stargazer_count": 3213,
"stars": null,
"updates": null,
"url": "https://github.com/dreamhead/moco"
} |
6275822_73 | {
"fields": [],
"file": "moco-core/src/test/java/com/github/dreamhead/moco/mount/MountToTest.java",
"identifier": "MountToTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void should_get_relative_path_from_uri() {\n MountTo to = new MountTo(\"/dir\");\n assertThat(to.extract(\"/dir/filename\").get(), is(\"filename\"));\n }",
"class_method_signature": "MountToTest.should_get_relative_path_from_uri()",
"constructor": false,
"full_signa... | {
"fields": [
{
"declarator": "target",
"modifier": "private final",
"original_string": "private final String target;",
"type": "String",
"var_name": "target"
}
],
"file": "moco-core/src/main/java/com/github/dreamhead/moco/mount/MountTo.java",
"identifier": "MountTo",
"in... | {
"body": "public Optional<String> extract(final String uri) {\n if (uri.startsWith(this.target) && uri.length() != this.target.length()) {\n return Optional.of(uri.replaceFirst(this.target, \"\"));\n }\n\n return empty();\n }",
"class_method_signature": "MountTo.extract(final Str... | {
"created": null,
"fork": null,
"fork_count": 839,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6275822,
"size": 4874,
"stargazer_count": 3213,
"stars": null,
"updates": null,
"url": "https://github.com/dreamhead/moco"
} |
6275822_24 | {
"fields": [
{
"declarator": "DEFAULT_CERTIFICATE = certificate(pathResource(\"cert.jks\"), \"mocohttps\", \"mocohttps\")",
"modifier": "private static final",
"original_string": "private static final HttpsCertificate DEFAULT_CERTIFICATE = certificate(pathResource(\"cert.jks\"), \"mocohttps\", ... | {
"body": "@Test(expected = VerificationException.class)\n public void should_fail_to_verify_at_least_expected_request_while_expectation_can_not_be_met() throws Exception {\n httpServer(port(), hit);\n hit.verify(by(uri(\"/foo\")), atLeast(1));\n }",
"class_method_signature": "MocoRequestHitTest... | {
"fields": [],
"file": "moco-core/src/main/java/com/github/dreamhead/moco/MocoRequestHit.java",
"identifier": "MocoRequestHit",
"interfaces": "",
"methods": [
{
"class_method_signature": "MocoRequestHit.requestHit()",
"constructor": false,
"full_signature": "public static RequestHit req... | {
"body": "public static VerificationMode atLeast(final int count) {\n checkArgument(count > 0, \"Times count must be greater than zero\");\n return new AtLeastVerification(count);\n }",
"class_method_signature": "MocoRequestHit.atLeast(final int count)",
"constructor": false,
"full_signature":... | {
"created": null,
"fork": null,
"fork_count": 839,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6275822,
"size": 4874,
"stargazer_count": 3213,
"stars": null,
"updates": null,
"url": "https://github.com/dreamhead/moco"
} |
6275822_39 | {
"fields": [
{
"declarator": "folder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder folder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "folder"
}
],
"file": "moco-core/src/test/java/com/g... | {
"body": "@Test\n public void should_glob_files() {\n ImmutableList<String> glob = Globs.glob(\"*.json\");\n assertThat(glob.isEmpty(), is(true));\n }",
"class_method_signature": "GlobsTest.should_glob_files()",
"constructor": false,
"full_signature": "@Test public void should_glob_files()"... | {
"fields": [
{
"declarator": "GLOB_META_CHARS = \"\\\\*?[{\"",
"modifier": "private static final",
"original_string": "private static final String GLOB_META_CHARS = \"\\\\*?[{\";",
"type": "String",
"var_name": "GLOB_META_CHARS"
}
],
"file": "moco-core/src/main/java/com/gith... | {
"body": "public static ImmutableList<String> glob(final String glob) {\n Path path = getGlobPath(glob);\n\n int globIndex = getGlobIndex(path);\n if (globIndex < 0) {\n return of(glob);\n }\n\n return doGlob(path, searchPath(path, globIndex));\n }",
"class_method_s... | {
"created": null,
"fork": null,
"fork_count": 839,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6275822,
"size": 4874,
"stargazer_count": 3213,
"stars": null,
"updates": null,
"url": "https://github.com/dreamhead/moco"
} |
6275822_42 | {
"fields": [],
"file": "moco-core/src/test/java/com/github/dreamhead/moco/util/URLsTest.java",
"identifier": "URLsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void should_know_valid_url_character() {\n assertThat(URLs.isValidUrl(\"base\"), is(true));\n assertThat(URLs.isValidUrl(\"base path\"), is(false));\n }",
"class_method_signature": "URLsTest.should_know_valid_url_character()",
"constructor": false,
"full_signature":... | {
"fields": [
{
"declarator": "SEPARATOR = \"/\"",
"modifier": "public static final",
"original_string": "public static final String SEPARATOR = \"/\";",
"type": "String",
"var_name": "SEPARATOR"
}
],
"file": "moco-core/src/main/java/com/github/dreamhead/moco/util/URLs.java",... | {
"body": "public static boolean isValidUrl(final String url) {\n try {\n String encodedURL = URLEncoder.encode(url, Charset.defaultCharset().name());\n return url.equals(encodedURL);\n } catch (UnsupportedEncodingException e) {\n return false;\n }\n }",
"cla... | {
"created": null,
"fork": null,
"fork_count": 839,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6275822,
"size": 4874,
"stargazer_count": 3213,
"stars": null,
"updates": null,
"url": "https://github.com/dreamhead/moco"
} |
6275822_4 | {
"fields": [
{
"declarator": "parser",
"modifier": "private",
"original_string": "private GlobalSettingParser parser;",
"type": "GlobalSettingParser",
"var_name": "parser"
}
],
"file": "moco-runner/src/test/java/com/github/dreamhead/moco/parser/GlobalSettingParserTest.java",... | {
"body": "@Test\n public void should_parse_settings_file_with_context() {\n InputStream stream = getResourceAsStream(\"settings/context-settings.json\");\n ImmutableList<GlobalSetting> globalSettings = parser.parse(stream);\n\n assertThat(globalSettings.get(0).includes().get(0), is(join(\"src... | {
"fields": [],
"file": "moco-runner/src/main/java/com/github/dreamhead/moco/parser/GlobalSettingParser.java",
"identifier": "GlobalSettingParser",
"interfaces": "",
"methods": [
{
"class_method_signature": "GlobalSettingParser.parse(final InputStream is)",
"constructor": false,
"full_si... | {
"body": "public ImmutableList<GlobalSetting> parse(final InputStream is) {\n return Jsons.toObjects(is, GlobalSetting.class);\n }",
"class_method_signature": "GlobalSettingParser.parse(final InputStream is)",
"constructor": false,
"full_signature": "public ImmutableList<GlobalSetting> parse(final In... | {
"created": null,
"fork": null,
"fork_count": 839,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6275822,
"size": 4874,
"stargazer_count": 3213,
"stars": null,
"updates": null,
"url": "https://github.com/dreamhead/moco"
} |
6275822_15 | {
"fields": [
{
"declarator": "helper = new MocoTestHelper()",
"modifier": "private final",
"original_string": "private final MocoTestHelper helper = new MocoTestHelper();",
"type": "MocoTestHelper",
"var_name": "helper"
},
{
"declarator": "runner",
"modifier": "p... | {
"body": "@Test(expected = HttpResponseException.class)\n public void should_throw_exception_without_global_request_settings() throws IOException {\n stream = getResourceAsStream(\"settings/request-settings.json\");\n runner = new SettingRunner(stream, createStartArgs(12306));\n runner.run();... | {
"fields": [
{
"declarator": "parser = new GlobalSettingParser()",
"modifier": "private final",
"original_string": "private final GlobalSettingParser parser = new GlobalSettingParser();",
"type": "GlobalSettingParser",
"var_name": "parser"
},
{
"declarator": "globalSet... | {
"body": "public void run() {\n runner = newJsonRunnerWithSetting(\n globalSettings.stream()\n .filter(byEnv(this.env))\n .map(toRunnerSetting())\n .collect(toList()), startArgs);\n runner.run();\n }",
"class_metho... | {
"created": null,
"fork": null,
"fork_count": 839,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6275822,
"size": 4874,
"stargazer_count": 3213,
"stars": null,
"updates": null,
"url": "https://github.com/dreamhead/moco"
} |
6275822_54 | {
"fields": [
{
"declarator": "folder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder folder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "folder"
}
],
"file": "moco-core/src/test/java/com/g... | {
"body": "@Test\n public void should_get_resource_by_id() throws Exception {\n Plain resource1 = new Plain();\n resource1.code = 1;\n resource1.message = \"hello\";\n\n Plain resource2 = new Plain();\n resource2.code = 2;\n resource2.message = \"world\";\n\n server... | {
"fields": [],
"file": "moco-core/src/main/java/com/github/dreamhead/moco/MocoRest.java",
"identifier": "MocoRest",
"interfaces": "",
"methods": [
{
"class_method_signature": "MocoRest.restServer(final int port, final MocoConfig... configs)",
"constructor": false,
"full_signature": "pub... | {
"body": "public static RestSettingBuilder get(final String id) {\n return get(eq(checkId(id)));\n }",
"class_method_signature": "MocoRest.get(final String id)",
"constructor": false,
"full_signature": "public static RestSettingBuilder get(final String id)",
"identifier": "get",
"invocations": [
... | {
"created": null,
"fork": null,
"fork_count": 839,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6275822,
"size": 4874,
"stargazer_count": 3213,
"stars": null,
"updates": null,
"url": "https://github.com/dreamhead/moco"
} |
6275822_23 | {
"fields": [
{
"declarator": "DEFAULT_CERTIFICATE = certificate(pathResource(\"cert.jks\"), \"mocohttps\", \"mocohttps\")",
"modifier": "private static final",
"original_string": "private static final HttpsCertificate DEFAULT_CERTIFICATE = certificate(pathResource(\"cert.jks\"), \"mocohttps\", ... | {
"body": "@Test\n public void should_verify_expected_request_for_between() throws Exception {\n final HttpServer server = httpServer(port(), hit);\n server.get(by(uri(\"/foo\"))).response(\"bar\");\n\n running(server, () -> {\n assertThat(helper.get(remoteUrl(\"/foo\")), is(\"bar\"... | {
"fields": [],
"file": "moco-core/src/main/java/com/github/dreamhead/moco/MocoRequestHit.java",
"identifier": "MocoRequestHit",
"interfaces": "",
"methods": [
{
"class_method_signature": "MocoRequestHit.requestHit()",
"constructor": false,
"full_signature": "public static RequestHit req... | {
"body": "public static VerificationMode between(final int min, final int max) {\n checkArgument(min >= 0, \"Min should be greater than or equal to 0\");\n checkArgument(max > min, \"Max should be greater than min\");\n return new BetweenVerification(min, max);\n }",
"class_method_signature... | {
"created": null,
"fork": null,
"fork_count": 839,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6275822,
"size": 4874,
"stargazer_count": 3213,
"stars": null,
"updates": null,
"url": "https://github.com/dreamhead/moco"
} |
6275822_74 | {
"fields": [],
"file": "moco-core/src/test/java/com/github/dreamhead/moco/mount/MountToTest.java",
"identifier": "MountToTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void should_return_null_if_uri_does_not_match() {\n MountTo to = new MountTo(\"/dir\");\n assertThat(to.extract(\"/target/filename\").isPresent(), is(false));\n }",
"class_method_signature": "MountToTest.should_return_null_if_uri_does_not_match()",
"constructor": fals... | {
"fields": [
{
"declarator": "target",
"modifier": "private final",
"original_string": "private final String target;",
"type": "String",
"var_name": "target"
}
],
"file": "moco-core/src/main/java/com/github/dreamhead/moco/mount/MountTo.java",
"identifier": "MountTo",
"in... | {
"body": "public Optional<String> extract(final String uri) {\n if (uri.startsWith(this.target) && uri.length() != this.target.length()) {\n return Optional.of(uri.replaceFirst(this.target, \"\"));\n }\n\n return empty();\n }",
"class_method_signature": "MountTo.extract(final Str... | {
"created": null,
"fork": null,
"fork_count": 839,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6275822,
"size": 4874,
"stargazer_count": 3213,
"stars": null,
"updates": null,
"url": "https://github.com/dreamhead/moco"
} |
6275822_62 | {
"fields": [
{
"declarator": "folder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder folder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "folder"
}
],
"file": "moco-core/src/test/java/com/g... | {
"body": "@Test\n public void should_delete_with_response() throws Exception {\n server.resource(\"targets\",\n delete(\"1\").response(status(409))\n );\n\n running(server, new Runnable() {\n @Override\n public void run() throws Exception {\n ... | {
"fields": [],
"file": "moco-core/src/main/java/com/github/dreamhead/moco/MocoRest.java",
"identifier": "MocoRest",
"interfaces": "",
"methods": [
{
"class_method_signature": "MocoRest.restServer(final int port, final MocoConfig... configs)",
"constructor": false,
"full_signature": "pub... | {
"body": "public static RestSettingBuilder delete(final RestIdMatcher idMatcher) {\n return single(HttpMethod.DELETE, checkNotNull(idMatcher, \"ID Matcher should not be null\"));\n }",
"class_method_signature": "MocoRest.delete(final RestIdMatcher idMatcher)",
"constructor": false,
"full_signature": ... | {
"created": null,
"fork": null,
"fork_count": 839,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6275822,
"size": 4874,
"stargazer_count": 3213,
"stars": null,
"updates": null,
"url": "https://github.com/dreamhead/moco"
} |
6275822_35 | {
"fields": [
{
"declarator": "folder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder folder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "folder"
}
],
"file": "moco-core/src/test/java/com/g... | {
"body": "@Test\n public void should_glob_direct_files() {\n ImmutableList<String> files = Globs.glob(\"src/test/resources/details/foo.json\");\n assertThat(files.contains(\"src/test/resources/details/foo.json\"), is(true));\n }",
"class_method_signature": "GlobsTest.should_glob_direct_files()"... | {
"fields": [
{
"declarator": "GLOB_META_CHARS = \"\\\\*?[{\"",
"modifier": "private static final",
"original_string": "private static final String GLOB_META_CHARS = \"\\\\*?[{\";",
"type": "String",
"var_name": "GLOB_META_CHARS"
}
],
"file": "moco-core/src/main/java/com/gith... | {
"body": "public static ImmutableList<String> glob(final String glob) {\n Path path = getGlobPath(glob);\n\n int globIndex = getGlobIndex(path);\n if (globIndex < 0) {\n return of(glob);\n }\n\n return doGlob(path, searchPath(path, globIndex));\n }",
"class_method_s... | {
"created": null,
"fork": null,
"fork_count": 839,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6275822,
"size": 4874,
"stargazer_count": 3213,
"stars": null,
"updates": null,
"url": "https://github.com/dreamhead/moco"
} |
6275822_8 | {
"fields": [
{
"declarator": "helper = new MocoTestHelper()",
"modifier": "private final",
"original_string": "private final MocoTestHelper helper = new MocoTestHelper();",
"type": "MocoTestHelper",
"var_name": "helper"
},
{
"declarator": "runner",
"modifier": "p... | {
"body": "@Test\n public void should_run_with_setting() throws IOException {\n stream = getResourceAsStream(\"settings/settings.json\");\n runner = new SettingRunner(stream, createStartArgs(12306));\n runner.run();\n\n assertThat(helper.get(remoteUrl(\"/foo\")), is(\"foo\"));\n ... | {
"fields": [
{
"declarator": "parser = new GlobalSettingParser()",
"modifier": "private final",
"original_string": "private final GlobalSettingParser parser = new GlobalSettingParser();",
"type": "GlobalSettingParser",
"var_name": "parser"
},
{
"declarator": "globalSet... | {
"body": "public void run() {\n runner = newJsonRunnerWithSetting(\n globalSettings.stream()\n .filter(byEnv(this.env))\n .map(toRunnerSetting())\n .collect(toList()), startArgs);\n runner.run();\n }",
"class_metho... | {
"created": null,
"fork": null,
"fork_count": 839,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 6275822,
"size": 4874,
"stargazer_count": 3213,
"stars": null,
"updates": null,
"url": "https://github.com/dreamhead/moco"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.