id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
6944525_440 | {
"fields": [
{
"declarator": "URI_1",
"modifier": "private static",
"original_string": "private static URI URI_1;",
"type": "URI",
"var_name": "URI_1"
},
{
"declarator": "URI_2",
"modifier": "private static",
"original_string": "private static URI URI_2;",
... | {
"body": "@Test\n public void testRingAndHostInconsistency()\n {\n URI newUri = URI.create(\"new_uri\");\n TrackerClient newTrackerClient = Mockito.mock(TrackerClient.class);\n Mockito.when(newTrackerClient.getUri()).thenReturn(newUri);\n Map<URI, TrackerClient> newTrackerClientMap = new HashMap<>();\n... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ClientSelector.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ClientSelector.class.getName());",
"type": "Logger",
"var_name": "LOG"
... | {
"body": "@Nullable\n public TrackerClient getTrackerClient(Request request,\n RequestContext requestContext,\n Ring<URI> ring,\n Map<URI, TrackerClient> trackerClients)\n {\n TrackerClient track... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_155 | {
"fields": [],
"file": "restli-client/src/test/java/com/linkedin/restli/client/TestRequest.java",
"identifier": "TestRequest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"toRequestFieldsData\")\n public void testRequestMetadataFieldsEqual(List<PathSpec> pathSpecs1, List<PathSpec> pathSpecs2, Map<String,String> param1, Map<String,String> param2, boolean expect)\n {\n GetRequestBuilder<Long, TestRecord> builder1 = generateDummyRequestBuilder();\n ... | {
"fields": [
{
"declarator": "SLASH_PATTERN = Pattern.compile(\"/\")",
"modifier": "private static final",
"original_string": "private static final Pattern SLASH_PATTERN = Pattern.compile(\"/\");",
"type": "Pattern",
"var_name": "SLASH_PATTERN"
},
{
"declarator": "URI_... | {
"body": "@Override\n public boolean equals(Object obj)\n {\n if (this == obj)\n {\n return true;\n }\n\n if (obj == null || getClass() != obj.getClass())\n {\n return false;\n }\n\n return areNewFieldsEqual((Request<?>) obj);\n }",
"class_method_signature": "Request.equals(Object... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_505 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/methods/arguments/TestArgumentBuilder.java",
"identifier": "TestArgumentBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testPostParameterType()\n {\n String testParamKey = \"testParam\";\n String expectedTestParamValue = \"testParamValue\";\n\n ServerResourceContext mockResourceContext = EasyMock.createMock(ServerResourceContext.class);\n DataMap entityBody = new DataMap();\n entityBody.... | {
"fields": [],
"file": "restli-server/src/main/java/com/linkedin/restli/internal/server/methods/arguments/ArgumentBuilder.java",
"identifier": "ArgumentBuilder",
"interfaces": "",
"methods": [
{
"class_method_signature": "ArgumentBuilder.buildArgs(final Object[] positionalArguments,\n ... | {
"body": "@SuppressWarnings(\"deprecation\")\n static Object[] buildArgs(final Object[] positionalArguments,\n final ResourceMethodDescriptor resourceMethod,\n final ServerResourceContext context,\n final DynamicRe... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_61 | {
"fields": [
{
"declarator": "referenceList1 = new ArrayList<Object>()",
"modifier": "final static",
"original_string": "final static List<Object> referenceList1 = new ArrayList<Object>();",
"type": "List<Object>",
"var_name": "referenceList1"
},
{
"declarator": "RL1_B... | {
"body": "@Test\n public void testListClonesHaveDifferentHashValues() throws CloneNotSupportedException\n {\n DataList originalList = new DataList();\n originalList.add(\"value\");\n\n DataList copyList = originalList.copy();\n\n // The objects should be \"equal,\" but not identical.\n assertTrue(co... | {
"fields": [
{
"declarator": "NULL = Null.getInstance()",
"modifier": "public static final",
"original_string": "public static final Null NULL = Null.getInstance();",
"type": "Null",
"var_name": "NULL"
},
{
"declarator": "UTF_8_CHARSET = Charset.forName(\"UTF-8\")",
... | {
"body": "static <T> T copy(T object, DataComplexTable alreadyCopied) throws CloneNotSupportedException\n {\n if (object == null)\n {\n return null;\n }\n else if (isComplex(object))\n {\n DataComplex src = (DataComplex) object;\n\n @SuppressWarnings(\"unchecked\")\n T found = (T)... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_293 | {
"fields": [],
"file": "r2-core/src/test/java/com/linkedin/r2/util/TestConfigValueExtractor.java",
"identifier": "TestConfigValueExtractor",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testStringObject()\n {\n List<String> actualList = ConfigValueExtractor.buildList(\"foo, bar, baz\", \",\");\n List<String> expectedList = Arrays.asList(new String[]{\"foo\", \"bar\", \"baz\"});\n Assert.assertEquals(expectedList, actualList);\n }",
"class_method_signature... | {
"fields": [],
"file": "r2-core/src/main/java/com/linkedin/r2/util/ConfigValueExtractor.java",
"identifier": "ConfigValueExtractor",
"interfaces": "",
"methods": [
{
"class_method_signature": "ConfigValueExtractor.buildList(Object propertyValue, String listSeparator)",
"constructor": false,
... | {
"body": "public static List<String> buildList(Object propertyValue, String listSeparator)\n {\n List<String> valueList = new ArrayList<String>();\n if (propertyValue != null)\n {\n if (propertyValue instanceof List<?>)\n {\n @SuppressWarnings(\"unchecked\")\n List<String> list = (L... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_339 | {
"fields": [
{
"declarator": "_connectionLossRC = KeeperException.Code.CONNECTIONLOSS.intValue()",
"modifier": "private static final",
"original_string": "private static final int _connectionLossRC = KeeperException.Code.CONNECTIONLOSS.intValue();",
"type": "int",
"var_name": "_conn... | {
"body": "@Test\n public void testDelete() throws NoSuchMethodException\n {\n final RetryZooKeeper rzkPartialMock = createMockObject(\n RetryZooKeeper.class.getMethod(\"zkDelete\",\n String.class,\n int.class,\n ... | {
"fields": [
{
"declarator": "_log = LoggerFactory.getLogger( RetryZooKeeper.class)",
"modifier": "private static final",
"original_string": "private static final Logger _log = LoggerFactory.getLogger( RetryZooKeeper.class);",
"type": "Logger",
"var_name": "_log"
}... | {
"body": "@Override\n public void delete(final String path, final int version, final AsyncCallback.VoidCallback cb, final Object ctx)\n {\n final RetryCallback callback = new RetryCallback() {\n @Override\n protected void retry() {\n _log.info(\"Retry delete operation: path = \" + path + \" ver... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_417 | {
"fields": [
{
"declarator": "SERVICE_NAME = \"testService\"",
"modifier": "private static final",
"original_string": "private static final String SERVICE_NAME = \"testService\";",
"type": "String",
"var_name": "SERVICE_NAME"
},
{
"declarator": "CLUSTER_NAME = \"testCl... | {
"body": "@Test(dataProvider = \"isD2Async\")\n public void testStatsConsumerUpdateAndRemove(boolean isD2Async) throws Exception\n {\n AtomicReference<ServiceProperties> serviceProperties = new AtomicReference<>();\n TestBackupRequestsStrategyStatsConsumer statsConsumer = new TestBackupRequestsStrategyStatsC... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(BackupRequestsClient.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(BackupRequestsClient.class);",
"type": "Logger",
"var_name": "LOG"
},
{... | {
"body": "@Override\n public Future<RestResponse> restRequest(RestRequest request)\n {\n return restRequest(request, new RequestContext());\n }",
"class_method_signature": "BackupRequestsClient.restRequest(RestRequest request)",
"constructor": false,
"full_signature": "@Override public Future<RestRespons... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_552 | {
"fields": [
{
"declarator": "CODEC = new JacksonDataCodec()",
"modifier": "private static final",
"original_string": "private static final JacksonDataCodec CODEC = new JacksonDataCodec();",
"type": "JacksonDataCodec",
"var_name": "CODEC"
},
{
"declarator": "MAXIMUM_RE... | {
"body": "@Test(dataProvider = \"multiplexerConfigurations\")\n public void testIndividualRequestInheritHeadersAndCookiesFromEnvelopeRequest(MultiplexerRunMode multiplexerRunMode) throws Exception\n {\n // When some request headers/cookies are passed in the envelope, we need to ensure\n // they are properly ... | {
"fields": [
{
"declarator": "MUX_PLAN_CLASS = \"mux\"",
"modifier": "private static final",
"original_string": "private static final String MUX_PLAN_CLASS = \"mux\";",
"type": "String",
"var_name": "MUX_PLAN_CLASS"
},
{
"declarator": "MUX_URI_PATH = \"/mux\"",
"... | {
"body": "@Override\n public void handleRequest(RestRequest request, RequestContext requestContext, final Callback<RestResponse> callback)\n {\n if (HttpMethod.POST != HttpMethod.valueOf(request.getMethod()))\n {\n _log.error(\"POST is expected, but \" + request.getMethod() + \" received\");\n call... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_102 | {
"fields": [],
"file": "data/src/test/java/com/linkedin/util/TestFastByteArrayOutputStream.java",
"identifier": "TestFastByteArrayOutputStream",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testWrite() throws Exception\n {\n FastByteArrayOutputStream testStream1 = new FastByteArrayOutputStream();\n testStream1.write(1);\n Assert.assertEquals(testStream1.size(), 1);\n Assert.assertEquals(testStream1.toByteArray().length, 1);\n Assert.assertEquals(testStream... | {
"fields": [
{
"declarator": "DEFAULT_BUFFER_SIZE = 256",
"modifier": "private static final",
"original_string": "private static final int DEFAULT_BUFFER_SIZE = 256;",
"type": "int",
"var_name": "DEFAULT_BUFFER_SIZE"
},
{
"declarator": "_bufferList = new LinkedList<byt... | {
"body": "@Override\n public void write(int datum)\n {\n if (this._bufferList.peekLast() == null || this._bufferList.getLast().length == this._index)\n {\n // If there's no buffer or its capacity is full, add a new one to the list.\n addBuffer(1);\n }\n this._bufferList.getLast()[this._index+... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_381 | {
"fields": [
{
"declarator": "_executorService",
"modifier": "private",
"original_string": "private ScheduledExecutorService _executorService;",
"type": "ScheduledExecutorService",
"var_name": "_executorService"
},
{
"de... | {
"body": "@Test(groups = { \"small\", \"back-end\" })\n public void testListenToCluster() throws URISyntaxException,\n InterruptedException\n {\n reset();\n\n List<String> schemes = new ArrayList<String>();\n\n schemes.add(\"http\");\n\n assertFalse(_state.isListeningToCluster(\"cluster-1\"));\n ... | {
"fields": [
{
"declarator": "_log = LoggerFactory.getLogger(SimpleLoadBalancerState.class)",
"modifier": "private static final",
"original_string": "private static final Logger _log = LoggerFactory.getLogger(SimpleLoadBalancerState.cla... | {
"body": "@Override\n public void listenToCluster(final String clusterName,\n final LoadBalancerStateListenerCallback callback)\n {\n trace(_log, \"listenToCluster: \", clusterName);\n\n // wrap the callback since we need to wait for both uri and cluster listeners to\n // onIn... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_36 | {
"fields": [],
"file": "data/src/test/java/com/linkedin/data/collections/TestCowUtil.java",
"identifier": "TestCowUtil",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testEmptyMap()\n {\n final CowMap<String, String> map = CowUtil.emptyMap();\n Assert.assertTrue(map.isEmpty());\n Assert.assertTrue(map.isReadOnly());\n\n try\n {\n mutateMap(map);\n Assert.fail(\"Should have thrown UnsupportedOperationException\");\n }\n ... | {
"fields": [
{
"declarator": "EMPTY_MAP = new CowMap<Object, Object>()",
"modifier": "private static final",
"original_string": "private static final CowMap<?,?> EMPTY_MAP = new CowMap<Object, Object>();",
"type": "CowMap<?,?>",
"var_name": "EMPTY_MAP"
},
{
"declarator... | {
"body": "@SuppressWarnings(\"unchecked\")\n public static <K, V> CowMap<K, V> emptyMap()\n {\n return (CowMap<K,V>) EMPTY_MAP;\n }",
"class_method_signature": "CowUtil.emptyMap()",
"constructor": false,
"full_signature": "@SuppressWarnings(\"unchecked\") public static CowMap<K, V> emptyMap()",
"identi... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_401 | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ZookeeperConnectionManagerTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ZookeeperConnectionManagerTest.class);",
"type": "Logger",
"var_name"... | {
"body": "@Test\n public void testMarkDownDuringDisconnection()\n throws Exception\n {\n ZooKeeperAnnouncer announcer = getZooKeeperAnnouncer(_cluster, _uri, WEIGHT);\n\n ZooKeeperConnectionManager manager = createManager(true, announcer);\n\n ZooKeeperEphemeralStore<UriProperties> store = createAndSta... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ZooKeeperConnectionManager.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ZooKeeperConnectionManager.class);",
"type": "Logger",
"var_name": "LOG"
... | {
"body": "public void shutdown(final Callback<None> callback)\n {\n _managerStarted = false;\n for (ZooKeeperAnnouncer server : _servers)\n {\n server.shutdown();\n }\n Callback<None> zkCloseCallback = new CallbackAdapter<None,None>(callback)\n {\n @Override\n protected None convert... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_114 | {
"fields": [],
"file": "generator/src/test/java/com/linkedin/pegasus/generator/spec/TestClassTemplateSpec.java",
"identifier": "TestClassTemplateSpec",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"getSourceFileFormatData\")\n public void testGetSourceFileFormat(String[] locations, SchemaFormatType expected)\n {\n ClassTemplateSpec enclosingClassTemplateSpec = null;\n for (String location : locations)\n {\n ClassTemplateSpec classTemplateSpec = new ClassTemplate... | {
"fields": [
{
"declarator": "_schema",
"modifier": "private",
"original_string": "private DataSchema _schema;",
"type": "DataSchema",
"var_name": "_schema"
},
{
"declarator": "_originalTyperefSchema",
"modifier": "private",
"original_string": "private Type... | {
"body": "public SchemaFormatType getSourceFileFormat()\n {\n if (_enclosingClass != null)\n {\n return _enclosingClass.getSourceFileFormat();\n }\n return SchemaFormatType.fromFilename(_location);\n }",
"class_method_signature": "ClassTemplateSpec.getSourceFileFormat()",
"constructor": false,... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_544 | {
"fields": [
{
"declarator": "CODEC = new JacksonDataCodec()",
"modifier": "private static final",
"original_string": "private static final JacksonDataCodec CODEC = new JacksonDataCodec();",
"type": "JacksonDataCodec",
"var_name": "CODEC"
},
{
"declarator": "MAXIMUM_RE... | {
"body": "@Test(dataProvider = \"multiplexerConfigurations\")\n public void testIsNotMultiplexedRequest(MultiplexerRunMode multiplexerRunMode) throws Exception\n {\n MultiplexedRequestHandlerImpl multiplexer = createMultiplexer(null, multiplexerRunMode);\n RestRequest request = new RestRequestBuilder(new URI... | {
"fields": [
{
"declarator": "MUX_PLAN_CLASS = \"mux\"",
"modifier": "private static final",
"original_string": "private static final String MUX_PLAN_CLASS = \"mux\";",
"type": "String",
"var_name": "MUX_PLAN_CLASS"
},
{
"declarator": "MUX_URI_PATH = \"/mux\"",
"... | {
"body": "@Override\n public boolean shouldHandle(Request request)\n {\n // we don't check the method here because we want to return 405 if it is anything but POST\n return MUX_URI_PATH.equals(request.getURI().getPath());\n }",
"class_method_signature": "MultiplexedRequestHandlerImpl.shouldHandle(Request ... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_20 | {
"fields": [
{
"declarator": "DISRUPT_CONTEXT_KEY = \"R2_DISRUPT_CONTEXT\"",
"modifier": "private static final",
"original_string": "private static final String DISRUPT_CONTEXT_KEY = \"R2_DISRUPT_CONTEXT\";",
"type": "String",
"var_name": "DISRUPT_CONTEXT_KEY"
},
{
"de... | {
"body": "@Test\n public void testStreamTimeoutDisrupt() throws Exception\n {\n final RequestContext requestContext = new RequestContext();\n requestContext.putLocalAttr(DISRUPT_CONTEXT_KEY, DisruptContexts.timeout());\n\n final DisruptFilter filter = new DisruptFilter(_scheduler, _executor, REQUEST_TIMEO... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(DisruptFilter.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(DisruptFilter.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declar... | {
"body": "@Override\n public void onStreamRequest(StreamRequest req,\n RequestContext requestContext,\n Map<String, String> wireAttrs,\n NextFilter<StreamRequest, StreamResponse> nextFilter)\n {\n disruptRequest(req, requestContext, wireAttrs, nextFilter);\n }",
"class_method_signature": "Disr... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_397 | {
"fields": [],
"file": "d2/src/test/java/com/linkedin/d2/balancer/properties/ClientServiceConfigValidatorTest.java",
"identifier": "ClientServiceConfigValidatorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParseFailureHttpRequestTimeout()\n {\n Map<String, Object> serviceSuppliedProperties = new HashMap<String, Object>();\n serviceSuppliedProperties.put(PropertyKeys.HTTP_REQUEST_TIMEOUT, \"1000\");\n\n Map<String, Object> clientSuppliedProperties = new HashMap<String, Objec... | {
"fields": [
{
"declarator": "_log = LoggerFactory.getLogger(ClientServiceConfigValidator.class)",
"modifier": "private static final",
"original_string": "private static final Logger _log = LoggerFactory.getLogger(ClientServiceConfigValidator.class);",
"type": "Logger",
"var_name": ... | {
"body": "public static boolean isValidValue(Map<String, Object> serviceSuppliedConfig,\n Map<String, Object> clientSuppliedServiceConfig,\n String propertyName)\n {\n // prevent clients from violating SLAs as published by the service\n i... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_378 | {
"fields": [
{
"declarator": "_executorService",
"modifier": "private",
"original_string": "private ScheduledExecutorService _executorService;",
"type": "ScheduledExecutorService",
"var_name": "_executorService"
},
{
"de... | {
"body": "@Test(groups = { \"small\", \"back-end\" })\n public void testUnregister()\n {\n reset();\n\n TestListener listener = new TestListener();\n List<String> schemes = new ArrayList<String>();\n\n schemes.add(\"http\");\n _state.register(listener);\n\n assertNull(listener.scheme);\n asser... | {
"fields": [
{
"declarator": "_log = LoggerFactory.getLogger(SimpleLoadBalancerState.class)",
"modifier": "private static final",
"original_string": "private static final Logger _log = LoggerFactory.getLogger(SimpleLoadBalancerState.cla... | {
"body": "public void unregister(final SimpleLoadBalancerStateListener listener)\n {\n trace(_log, \"unregister listener: \", listener);\n\n _executor.execute(new PropertyEvent(\"remove listener for state\")\n {\n @Override\n public void innerRun()\n {\n _listeners.remove(listener);\n... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_682 | {
"fields": [
{
"declarator": "_res",
"modifier": "private",
"original_string": "private PhotoResource _res;",
"type": "PhotoResource",
"var_name": "_res"
}
],
"file": "restli-example-server/src/test/java/com/linkedin/restli/example/impl/TestPhotoResource.java",
"identifier... | {
"body": "@Test\n public void testBatchGet() {\n final String[] titles = {\"1\",\"2\",\"3\"};\n final long[] ids = new long[titles.length];\n for (int i = 0; i < titles.length; i++)\n ids[i] = createPhoto(titles[i]);\n\n // validate all data are correct\n Set<Long> batchIds = new HashSet<Long>()... | {
"fields": [
{
"declarator": "URN_ENTITY_TYPE = \"photo\"",
"modifier": "public final static",
"original_string": "public final static String URN_ENTITY_TYPE = \"photo\";",
"type": "String",
"var_name": "URN_ENTITY_TYPE"
},
{
"declarator": "_db",
"modifier": "@In... | {
"body": "@Override\n public BatchResult<Long, Photo> batchGet(Set<Long> ids)\n {\n Map<Long, Photo> result = new HashMap<Long, Photo>();\n Map<Long, RestLiServiceException> errors =\n new HashMap<Long, RestLiServiceException>();\n\n for (Long key : ids)\n {\n if (get(key) != null)\n {... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_456 | {
"fields": [
{
"declarator": "JSON_TYPE = \"application/json\"",
"modifier": "private static final",
"original_string": "private static final String JSON_TYPE = \"application/json\";",
"type": "String",
"var_name": "JSON_TYPE"
},
{
"declarator": "PSON_TYPE = \"applicat... | {
"body": "@Test(dataProvider = \"invalidHeaders\", expectedExceptions = InvalidMimeTypeException.class)\n public void testBestMatchForInvalidHeaders(List<String> supportedTypes, String header)\n {\n MIMEParse.bestMatch(supportedTypes, header);\n }",
"class_method_signature": "TestMIMEParse.testBestMatchForIn... | {
"fields": [],
"file": "restli-server/src/main/java/com/linkedin/restli/internal/server/util/MIMEParse.java",
"identifier": "MIMEParse",
"interfaces": "",
"methods": [
{
"class_method_signature": "MIMEParse.parseMimeType(String mimeType)",
"constructor": false,
"full_signature": "protec... | {
"body": "public static String bestMatch(Collection<String> supported, String header)\n {\n List<ParseResults> parseResults = new LinkedList<ParseResults>();\n List<FitnessAndQuality> weightedMatches = new LinkedList<FitnessAndQuality>();\n for (String r : StringUtils.split(header, ','))\n parseResult... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_513 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/response/TestBatchGetResponseBuilder.java",
"identifier": "TestBatchGetResponseBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"exceptionTestData\")\n public void testBuilderExceptions(Object results, String expectedErrorMessage)\n {\n // Protocol version doesn't matter here\n ServerResourceContext mockContext = getMockResourceContext(null, Collections.emptyMap(),\n null, null, null);\n Reso... | {
"fields": [
{
"declarator": "_errorResponseBuilder",
"modifier": "private final",
"original_string": "private final ErrorResponseBuilder _errorResponseBuilder;",
"type": "ErrorResponseBuilder",
"var_name": "_errorResponseBuilder"
}
],
"file": "restli-server/src/main/java/co... | {
"body": "@Override\n public RestLiResponseData<BatchGetResponseEnvelope> buildRestLiResponseData(Request request,\n RoutingResult routingResult,\n Object result,\n ... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_143 | {
"fields": [
{
"declarator": "TARGET_HOST_KEY_NAME = \"D2-KeyMapper-TargetHost\"",
"modifier": "private static final",
"original_string": "private static final String TARGET_HOST_KEY_NAME = \"D2-KeyMapper-TargetHost\";",
"type": "String",
"var_name": "TARGET_HOST_KEY_NAME"
},
... | {
"body": "@Test(dataProvider=\"illegalRequestMethodProvider\", expectedExceptions = {UnsupportedOperationException.class})\n public void testUnsupportedRequestOnCompletion(ResourceMethod requestMethod)\n {\n Request<?> request = mock(Request.class);\n when(request.getMethod()).thenReturn(requestMethod);\n ... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(DefaultScatterGatherStrategy.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(DefaultScatterGatherStrategy.class);",
"type": "Logger",
"var_name": "l... | {
"body": "@Override\n @SuppressWarnings(\"unchecked\")\n public <K, T> void onAllResponsesReceived(Request<T> request, ProtocolVersion protocolVersion,\n Map<RequestInfo, Response<T>> successResponses,\n Map<RequestInfo, Throwabl... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_77 | {
"fields": [],
"file": "data/src/test/java/com/linkedin/data/schema/grammar/TestPdlParseUtils.java",
"identifier": "TestPdlParseUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testExtractString()\n {\n String extracted = PdlParseUtils.extractString(\"\\\"A string with escape chars: \\\\n\\\\t\\\\f\\\"\");\n assertEquals(extracted, \"A string with escape chars: \\n\\t\\f\");\n }",
"class_method_signature": "TestPdlParseUtils.testExtractString()",
... | {
"fields": [
{
"declarator": "ESCAPE_CHAR_PATTERN = Pattern.compile(String.valueOf('`'))",
"modifier": "private static final",
"original_string": "private static final Pattern ESCAPE_CHAR_PATTERN = Pattern.compile(String.valueOf('`'));",
"type": "Pattern",
"var_name": "ESCAPE_CHAR_P... | {
"body": "public static String extractString(String stringLiteral)\n {\n return StringEscapeUtils.unescapeJson(stringLiteral.substring(1, stringLiteral.length() - 1));\n }",
"class_method_signature": "PdlParseUtils.extractString(String stringLiteral)",
"constructor": false,
"full_signature": "public stati... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_98 | {
"fields": [],
"file": "data/src/test/java/com/linkedin/data/template/TestDataObjectToObjectCache.java",
"identifier": "TestDataObjectToObjectCache",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testClone() throws CloneNotSupportedException\n {\n IdentityHashMap<Object, DataTemplate<?>> controlCache = new IdentityHashMap<Object, DataTemplate<?>>();\n DataObjectToObjectCache<DataTemplate<?>> testCache = new DataObjectToObjectCache<DataTemplate<?>>();\n\n populateTestD... | {
"fields": [
{
"declarator": "_cache",
"modifier": "private",
"original_string": "private HashMap<DataObjectKey, V> _cache;",
"type": "HashMap<DataObjectKey, V>",
"var_name": "_cache"
}
],
"file": "data/src/main/java/com/linkedin/data/template/DataObjectToObjectCache.java",
... | {
"body": "@SuppressWarnings(\"unchecked\")\n public DataObjectToObjectCache<V> clone() throws CloneNotSupportedException\n {\n DataObjectToObjectCache<V> cloned = (DataObjectToObjectCache<V>) super.clone();\n cloned._cache = (HashMap<DataObjectKey, V>) _cache.clone();\n return cloned;\n }",
"class_meth... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_285 | {
"fields": [
{
"declarator": "KEY = \"key\"",
"modifier": "private static final",
"original_string": "private static final String KEY = \"key\";",
"type": "String",
"var_name": "KEY"
},
{
"declarator": "VALUE = \"value\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void testGetObjectWithKeyMissing()\n {\n Assert.assertNull(RequestContextUtil.getObjectWithKey(KEY, _requestContext, String.class));\n }",
"class_method_signature": "TestRequestContextUtil.testGetObjectWithKeyMissing()",
"constructor": false,
"full_signature": "@Test public void ... | {
"fields": [],
"file": "r2-core/src/main/java/com/linkedin/r2/util/RequestContextUtil.java",
"identifier": "RequestContextUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "RequestContextUtil.RequestContextUtil()",
"constructor": true,
"full_signature": "private Request... | {
"body": "@SuppressWarnings(\"unchecked\")\n public static <T> T getObjectWithKey(String key, RequestContext requestContext, Class<T> clazz)\n {\n final Object object = requestContext.getLocalAttr(key);\n\n return (clazz.isInstance(object)) ? (T) object : null;\n }",
"class_method_signature": "RequestCont... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_568 | {
"fields": [
{
"declarator": "DEBUG_HANDLER_RESPONSE_A = \"Response A\"",
"modifier": "private static final",
"original_string": "private static final String DEBUG_HANDLER_RESPONSE_A = \"Response A\";",
"type": "String",
"var_name": "DEBUG_HANDLER_RESPONSE_A"
},
{
"dec... | {
"body": "@Test(dataProvider = \"validClientProtocolVersionDataStreamOnly\")\n public void testValidUnstructuredDataRequestMissingHeader(RestLiServer server,\n ProtocolVersion clientProtocolVersion,\n ... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(RestLiServer.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(RestLiServer.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
... | {
"body": "@Override\n public void handleRequest(RestRequest request, RequestContext requestContext, Callback<RestResponse> callback)\n {\n //This code path cannot accept content types or accept types that contain\n //multipart/related. This is because these types of requests will usually have very large payl... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_138 | {
"fields": [
{
"declarator": "BASE_URI_TEMPLATE",
"modifier": "private static final",
"original_string": "private static final String BASE_URI_TEMPLATE;",
"type": "String",
"var_name": "BASE_URI_TEMPLATE"
},
{
"declarator": "PATH_KEYS",
"modifier": "private stati... | {
"body": "@Test\n public void testDump()\n {\n final Request<?> request = Mockito.mock(Request.class);\n Mockito.when(request.getBaseUriTemplate()).thenReturn(BASE_URI_TEMPLATE);\n Mockito.when(request.getPathKeys()).thenReturn(PATH_KEYS);\n Mockito.when(request.getQueryParamsObjects()).thenReturn(QUER... | {
"fields": [
{
"declarator": "ALL_FIELDS =\n Collections.unmodifiableSet(new HashSet<SignatureField>(Arrays.asList(SignatureField.values())))",
"modifier": "public static final",
"original_string": "public static final Set<SignatureField> ALL_FIELDS =\n Collections.unmodifiableSet(new Has... | {
"body": "public String dump()\n {\n final ProtocolVersion protocolVersion = AllProtocolVersions.LATEST_PROTOCOL_VERSION;\n final DataMap pathKeysMap = new DataMap(URIParamUtils.encodePathKeysForUri(_pathKeys, protocolVersion));\n final DataMap queryParamsMap = QueryParamsUtil.convertToDataMap(_queryParams... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_587 | {
"fields": [
{
"declarator": "DEBUG_HANDLER_RESPONSE_A = \"Response A\"",
"modifier": "private static final",
"original_string": "private static final String DEBUG_HANDLER_RESPONSE_A = \"Response A\";",
"type": "String",
"var_name": "DEBUG_HANDLER_RESPONSE_A"
},
{
"dec... | {
"body": "@Test\n public void testMultipartRelatedNoAttachmentsAtAll() throws Exception\n {\n //This test verifies the server's ability to throw an exception if there are absolutely no attachments at all\n //in the request. The protocol allows no user attachments to be required, but there must always be at l... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(RestLiServer.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(RestLiServer.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
... | {
"body": "@Override\n public void handleRequest(RestRequest request, RequestContext requestContext, Callback<RestResponse> callback)\n {\n //This code path cannot accept content types or accept types that contain\n //multipart/related. This is because these types of requests will usually have very large payl... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_354 | {
"fields": [
{
"declarator": "TEST_SERVICE = URIMapperTestUtil.TEST_SERVICE",
"modifier": "private static final",
"original_string": "private static final String TEST_SERVICE = URIMapperTestUtil.TEST_SERVICE;",
"type": "String",
"var_name": "TEST_SERVICE"
},
{
"declara... | {
"body": "@Test\n public void testMapUrisPartitionedOnly() throws ServiceUnavailableException\n {\n int partitionCount = 10;\n int requestPerPartition = 100;\n int totalHostCount = 100;\n\n HashRingProvider ringProvider =\n createStaticHashRingProvider(totalHostCount, partitionCount, getHashFunc... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(RingBasedUriMapper.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(RingBasedUriMapper.class);",
"type": "Logger",
"var_name": "LOG"
},
{
... | {
"body": "@Override\n public <KEY> URIMappingResult<KEY> mapUris(List<URIKeyPair<KEY>> requestUriKeyPairs)\n throws ServiceUnavailableException\n {\n if (requestUriKeyPairs == null || requestUriKeyPairs.isEmpty())\n {\n return new URIMappingResult<>(Collections.emptyMap(), Collections.emptyMap(), C... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_211 | {
"fields": [],
"file": "restli-tools/src/test/java/com/linkedin/restli/tools/data/TestPredicateExpressionParser.java",
"identifier": "TestPredicateExpressionParser",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNotAndParenOr()\n {\n final Predicate parsed = PredicateExpressionParser.parse(\"!com.linkedin.data.it.AlwaysTruePredicate & !(com.linkedin.data.it.AlwaysTruePredicate | com.linkedin.data.it.AlwaysFalsePredicate)\");\n Assert.assertEquals(parsed.getClass(), AndPredicate.clas... | {
"fields": [
{
"declarator": "TRIMMER_PATTERN = Pattern.compile(\"\\\\s\")",
"modifier": "private static final",
"original_string": "private static final Pattern TRIMMER_PATTERN = Pattern.compile(\"\\\\s\");",
"type": "Pattern",
"var_name": "TRIMMER_PATTERN"
},
{
"decl... | {
"body": "public static Predicate parse(String expression)\n {\n final Stack<Predicate> predicateStack = new Stack<Predicate>();\n final Stack<Character> operatorStack = new Stack<Character>();\n\n final String trimmedExpression = TRIMMER_PATTERN.matcher(expression).replaceAll(\"\");\n final StringToken... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_641 | {
"fields": [
{
"declarator": "cookieA",
"modifier": "private",
"original_string": "private HttpCookie cookieA;",
"type": "HttpCookie",
"var_name": "cookieA"
},
{
"declarator": "cookieB",
"modifier": "private",
"original_string": "private HttpCookie cookieB;... | {
"body": "@Test\n public void testCookieAttributeEncoding()\n {\n String encodedCookie = CookieUtil.encodeSetCookie(cookieA);\n\n Assert.assertTrue(encodedCookie.contains(\"Domain=.android.com\"));\n Assert.assertTrue(encodedCookie.contains(\"Path=/source/\"));\n Assert.assertTrue(encodedCookie.contain... | {
"fields": [],
"file": "restli-common/src/main/java/com/linkedin/restli/internal/common/CookieUtil.java",
"identifier": "CookieUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "CookieUtil.encodeCookies(List<HttpCookie> cookies)",
"constructor": false,
"full_signature": ... | {
"body": "public static String encodeSetCookie(HttpCookie cookie)\n {\n if (cookie == null)\n {\n return null;\n }\n StringBuilder sb = new StringBuilder();\n\n sb.append(cookie.getName()).append(\"=\").append(cookie.getValue());\n\n if (cookie.getPath() != null)\n {\n sb.append(\";Pa... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_495 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/methods/arguments/TestArgumentBuilder.java",
"identifier": "TestArgumentBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testHeaderParamType()\n {\n String testParamKey = \"testParam\";\n String expectedTestParamValue = \"testParamValue\";\n\n ServerResourceContext mockResourceContext = EasyMock.createMock(ServerResourceContext.class);\n HeaderParam annotation = EasyMock.createMock(HeaderPar... | {
"fields": [],
"file": "restli-server/src/main/java/com/linkedin/restli/internal/server/methods/arguments/ArgumentBuilder.java",
"identifier": "ArgumentBuilder",
"interfaces": "",
"methods": [
{
"class_method_signature": "ArgumentBuilder.buildArgs(final Object[] positionalArguments,\n ... | {
"body": "@SuppressWarnings(\"deprecation\")\n static Object[] buildArgs(final Object[] positionalArguments,\n final ResourceMethodDescriptor resourceMethod,\n final ServerResourceContext context,\n final DynamicRe... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_180 | {
"fields": [
{
"declarator": "_subjectMap",
"modifier": "private",
"original_string": "private Map<String, Object> _subjectMap;",
"type": "Map<String, Object>",
"var_name": "_subjectMap"
},
{
"declarator": "_probeMap",
"modifier": "private",
"original_strin... | {
"body": "@Test(expectedExceptions = IllegalArgumentException.class)\n public void testNullArgument()\n {\n MapUtil.getWithDefault(_subjectMap, \"subMap\", null);\n MapUtil.getWithDefault(_subjectMap, \"subMap_default\", null);\n }",
"class_method_signature": "TestMapUtil.testNullArgument()",
"construct... | {
"fields": [],
"file": "pegasus-common/src/main/java/com/linkedin/common/util/MapUtil.java",
"identifier": "MapUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "MapUtil.getWithDefault(final Map<K, ? extends Object> map,\n final K key,\n ... | {
"body": "@SuppressWarnings(\"unchecked\")\n public static <K, V> V getWithDefault(final Map<K, ? extends Object> map,\n final K key,\n final V defaultValue,\n final Class<V> valueClass)\n {\n fi... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_303 | {
"fields": [],
"file": "r2-core/src/test/java/com/linkedin/r2/util/TestLinkedDeque.java",
"identifier": "TestLinkedDeque",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testEmptyPollFirst()\n {\n LinkedDeque<Object> q = new LinkedDeque<Object>();\n Assert.assertNull(q.pollFirst(), \"pollFirst on empty queue should return null\");\n }",
"class_method_signature": "TestLinkedDeque.testEmptyPollFirst()",
"constructor": false,
"full_signature... | {
"fields": [
{
"declarator": "_head",
"modifier": "private",
"original_string": "private Node<T> _head;",
"type": "Node<T>",
"var_name": "_head"
},
{
"declarator": "_tail",
"modifier": "private",
"original_string": "private Node<T> _tail;",
"type": "N... | {
"body": "@Override\n public T pollFirst()\n {\n if (_head == null)\n {\n return null;\n }\n return removeNode(_head);\n }",
"class_method_signature": "LinkedDeque.pollFirst()",
"constructor": false,
"full_signature": "@Override public T pollFirst()",
"identifier": "pollFirst",
"invocat... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_616 | {
"fields": [],
"file": "restli-common/src/test/java/com/linkedin/restli/common/TestIdEntityResponse.java",
"identifier": "TestIdEntityResponse",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testToString()\n {\n IdEntityResponse<Long, AnyRecord> longIdEntityResponse = new IdEntityResponse<Long, AnyRecord>(6L, new AnyRecord());\n Assert.assertEquals(longIdEntityResponse.toString(), \"id: 6, entity: {}\");\n\n IdEntityResponse<Long, AnyRecord> nullIdEntityResponse ... | {
"fields": [
{
"declarator": "_entity",
"modifier": "private",
"original_string": "private V _entity;",
"type": "V",
"var_name": "_entity"
}
],
"file": "restli-common/src/main/java/com/linkedin/restli/common/IdEntityResponse.java",
"identifier": "IdEntityResponse",
"inte... | {
"body": "@Override\n public String toString()\n {\n return \"id: \" + super.toString() + \", entity: \" + (_entity == null ? \"\" : _entity);\n }",
"class_method_signature": "IdEntityResponse.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toSt... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_246 | {
"fields": [
{
"declarator": "FS = File.separator",
"modifier": "private static final",
"original_string": "private static final String FS = File.separator;",
"type": "String",
"var_name": "FS"
},
{
"declarator": "RESOURCES_DIR = \"src\" + FS + \"test\" + FS + \"resour... | {
"body": "@Test(dataProvider = \"restliVersionsDataProvider\")\n public void testDeterministicMethodOrder(RestliVersion version) throws Exception\n {\n final String pegasusDir = moduleDir + FS + RESOURCES_DIR + FS + \"pegasus\";\n final String outPath = outdir.getPath();\n RestRequestBuilderGenerator.run(... | {
"fields": [
{
"declarator": "GENERATOR_REST_GENERATE_DATATEMPLATES = \"generator.rest.generate.datatemplates\"",
"modifier": "static final",
"original_string": "static final String GENERATOR_REST_GENERATE_DATATEMPLATES = \"generator.rest.generate.datatemplates\";",
"type": "String",
... | {
"body": "public static GeneratorResult run(String resolverPath,\n String defaultPackage,\n final boolean generateImported,\n final boolean generateDataTemplates,\n RestliVersio... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_529 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/response/TestCreateResponseBuilder.java",
"identifier": "TestCreateResponseBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testReturnEntityException() throws URISyntaxException\n {\n ServerResourceContext mockContext = EasyMock.createMock(ServerResourceContext.class);\n EasyMock.expect(mockContext.isReturnEntityRequested()).andReturn(true);\n EasyMock.expect(mockContext.getProjectionMask()).andRe... | {
"fields": [],
"file": "restli-server/src/main/java/com/linkedin/restli/internal/server/response/CreateResponseBuilder.java",
"identifier": "CreateResponseBuilder",
"interfaces": "implements RestLiResponseBuilder<RestLiResponseData<CreateResponseEnvelope>>",
"methods": [
{
"class_method_signature":... | {
"body": "@Override\n public RestLiResponseData<CreateResponseEnvelope> buildRestLiResponseData(Request request,\n RoutingResult routingResult,\n Object result,\n ... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_179 | {
"fields": [
{
"declarator": "_subjectMap",
"modifier": "private",
"original_string": "private Map<String, Object> _subjectMap;",
"type": "Map<String, Object>",
"var_name": "_subjectMap"
},
{
"declarator": "_probeMap",
"modifier": "private",
"original_strin... | {
"body": "@Test\n public void testGetWithDefault()\n {\n Assert.assertTrue(MapUtil.getWithDefault(_subjectMap, \"boolean\", false));\n Assert.assertFalse(MapUtil.getWithDefault(_subjectMap, \"boolean_default\", false));\n\n Assert.assertEquals(MapUtil.getWithDefault(_subjectMap, \"integer\", 11), (Integer... | {
"fields": [],
"file": "pegasus-common/src/main/java/com/linkedin/common/util/MapUtil.java",
"identifier": "MapUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "MapUtil.getWithDefault(final Map<K, ? extends Object> map,\n final K key,\n ... | {
"body": "@SuppressWarnings(\"unchecked\")\n public static <K, V> V getWithDefault(final Map<K, ? extends Object> map,\n final K key,\n final V defaultValue,\n final Class<V> valueClass)\n {\n fi... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_483 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/model/TestRestLiApiBuilder.java",
"identifier": "TestRestLiApiBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBadResource()\n {\n Set<Class<?>> set = new HashSet<>();\n set.add(ParentResource.class);\n set.add(BadResource.class);\n\n try\n {\n RestLiApiBuilder.buildResourceModels(set);\n Assert.fail(\"Building api with BadResource should throw \" + ResourceConfigE... | {
"fields": [
{
"declarator": "_log = LoggerFactory.getLogger(RestLiApiBuilder.class)",
"modifier": "private final static",
"original_string": "private final static Logger _log = LoggerFactory.getLogger(RestLiApiBuilder.class);",
"type": "Logger",
"var_name": "_log"
},
{
... | {
"body": "public static Map<String, ResourceModel> buildResourceModels(final Set<Class<?>> restliAnnotatedClasses)\n {\n Map<String, ResourceModel> rootResourceModels = new HashMap<String, ResourceModel>();\n Map<Class<?>, ResourceModel> resourceModels = new HashMap<Class<?>, ResourceModel>();\n\n for (Cla... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_196 | {
"fields": [],
"file": "restli-tools/src/test/java/com/linkedin/restli/tools/data/TestPredicateExpressionParser.java",
"identifier": "TestPredicateExpressionParser",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAndOrAnd()\n {\n final Predicate parsed = PredicateExpressionParser.parse(\"com.linkedin.data.it.AlwaysTruePredicate & com.linkedin.data.it.AlwaysFalsePredicate | com.linkedin.data.it.AlwaysFalsePredicate & com.linkedin.data.it.AlwaysTruePredicate\");\n Assert.assertEquals(p... | {
"fields": [
{
"declarator": "TRIMMER_PATTERN = Pattern.compile(\"\\\\s\")",
"modifier": "private static final",
"original_string": "private static final Pattern TRIMMER_PATTERN = Pattern.compile(\"\\\\s\");",
"type": "Pattern",
"var_name": "TRIMMER_PATTERN"
},
{
"decl... | {
"body": "public static Predicate parse(String expression)\n {\n final Stack<Predicate> predicateStack = new Stack<Predicate>();\n final Stack<Character> operatorStack = new Stack<Character>();\n\n final String trimmedExpression = TRIMMER_PATTERN.matcher(expression).replaceAll(\"\");\n final StringToken... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_315 | {
"fields": [
{
"declarator": "ACCEPT_COMPRESSIONS = \"gzip, deflate, bzip2, snappy\"",
"modifier": "private static final",
"original_string": "private static final String ACCEPT_COMPRESSIONS = \"gzip, deflate, bzip2, snappy\";",
"type": "String",
"var_name": "ACCEPT_COMPRESSIONS"
... | {
"body": "@Test(dataProvider = \"requestCompressionData\")\n public void testRequestCompressionRules(CompressionConfig requestCompressionConfig,\n CompressionOption requestCompressionOverride, boolean headerShouldBePresent)\n throws CompressionException, URISyntaxExcept... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ClientCompressionFilter.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ClientCompressionFilter.class);",
"type": "Logger",
"var_name": "LOG"
},... | {
"body": "@Override\n public void onRestRequest(RestRequest req, RequestContext requestContext,\n Map<String, String> wireAttrs,\n NextFilter<RestRequest, RestResponse> nextFilter)\n {\n try\n {\n if (_requestContentEncoding.hasCompressor())\n {... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_250 | {
"fields": [],
"file": "restli-tools/src/test/java/com/linkedin/restli/internal/tools/TestRestLiToolsUtils.java",
"identifier": "TestRestLiToolsUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"params\")\n public void testIsParameterOptional(ParameterSchema parameterSchema, boolean expected)\n {\n Assert.assertEquals(RestLiToolsUtils.isParameterOptional(parameterSchema), expected);\n }",
"class_method_signature": "TestRestLiToolsUtils.testIsParameterOptional(Paramet... | {
"fields": [],
"file": "restli-tools/src/main/java/com/linkedin/restli/internal/tools/RestLiToolsUtils.java",
"identifier": "RestLiToolsUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "RestLiToolsUtils.normalizeUnderscores(String name)",
"constructor": false,
"full_si... | {
"body": "public static boolean isParameterOptional(ParameterSchema param)\n {\n boolean optional = param.isOptional() == null ? false : param.isOptional();\n return optional || param.hasDefault();\n }",
"class_method_signature": "RestLiToolsUtils.isParameterOptional(ParameterSchema param)",
"constructor... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_600 | {
"fields": [
{
"declarator": "ANY_URI = \"http://localhost:8080/foo/bar?q=baz\"",
"modifier": "private static final",
"original_string": "private static final String ANY_URI = \"http://localhost:8080/foo/bar?q=baz\";",
"type": "String",
"var_name": "ANY_URI"
},
{
"decl... | {
"body": "@Test\n public void testStreamToHttp2HeadersBlacklist() throws Exception\n {\n StreamRequestBuilder streamRequestBuilder = new StreamRequestBuilder(new URI(ANY_URI));\n HEADER_BLACKLIST.forEach(header -> streamRequestBuilder.addHeaderValue(header, ANY_HEADER));\n StreamRequest request = streamRe... | {
"fields": [
{
"declarator": "HEADER_BLACKLIST = new HashSet<>()",
"modifier": "private static final",
"original_string": "private static final HashSet<String> HEADER_BLACKLIST = new HashSet<>();",
"type": "HashSet<String>",
"var_name": "HEADER_BLACKLIST"
}
],
"file": "r2-ne... | {
"body": "public static <R extends Request> Http2Headers toHttp2Headers(R request) throws Exception\n {\n URI uri = request.getURI();\n URL url = new URL(uri.toString());\n\n String method = request.getMethod();\n String authority = url.getAuthority();\n String path = url.getFile();\n String schem... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_9 | {
"fields": [],
"file": "data-transform/src/test/java/com/linkedin/data/transform/TestProjectionUtil.java",
"identifier": "TestProjectionUtil",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testPositiveWithWildcardMultiPaths()\n {\n final MaskTree filter = new MaskTree();\n filter.addOperation(new PathSpec(\"foo\", PathSpec.WILDCARD, \"baz\"), MaskOperation.POSITIVE_MASK_OP);\n\n final Collection<PathSpec> positivePaths = new HashSet<PathSpec>(Arrays.asList(\n ... | {
"fields": [],
"file": "data-transform/src/main/java/com/linkedin/data/transform/ProjectionUtil.java",
"identifier": "ProjectionUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "ProjectionUtil.isPathPresent(MaskTree filter, PathSpec path)",
"constructor": false,
"full_s... | {
"body": "public static Set<PathSpec> getPresentPaths(MaskTree filter, Set<PathSpec> paths)\n {\n // this emulates the behavior of Rest.li server\n // if client does not specify any mask, the server receives null when retrieving the MaskTree\n // in this case, all fields are returned\n if (filter == nul... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_591 | {
"fields": [
{
"declarator": "HTTP_1_1 = HttpProtocolVersion.HTTP_1_1.name()",
"modifier": "public static final",
"original_string": "public static final String HTTP_1_1 = HttpProtocolVersion.HTTP_1_1.name();",
"type": "String",
"var_name": "HTTP_1_1"
},
{
"declarator"... | {
"body": "@Test\n public void testSSLParams() throws Exception\n {\n HttpClientFactory factory = new HttpClientFactory.Builder().build();\n Map<String,Object> params = new HashMap<String, Object>();\n SSLParameters sslParameters = new SSLParameters();\n sslParameters.setProtocols(new String[]{ \"Unsupp... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(HttpClientFactory.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(HttpClientFactory.class);",
"type": "Logger",
"var_name": "LOG"
},
{
... | {
"body": "@Override\n public TransportClient getClient(Map<String, ? extends Object> properties)\n {\n SSLContext sslContext;\n SSLParameters sslParameters;\n\n // Copy the properties map since we don't want to mutate the passed-in map by removing keys\n properties = new HashMap<String,Object>(properti... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_342 | {
"fields": [],
"file": "d2/src/test/java/com/linkedin/d2/discovery/event/PropertyEventBusRequestsThrottlerTest.java",
"identifier": "PropertyEventBusRequestsThrottlerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(timeOut = 10000)\n public void testThrottling() throws InterruptedException, ExecutionException, TimeoutException\n {\n TestSubscriber testSubscriber = new TestSubscriber();\n TestEventBus testZkEventBus = new TestEventBus(testSubscriber, 50);\n\n final int nRequests = 100;\n\n Property... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(PropertyEventBusRequestsThrottler.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(PropertyEventBusRequestsThrottler.class);",
"type": "Logger",
"var... | {
"body": "public void sendRequests(Callback<None> callback)\n {\n LOG.info(\"Event Bus Requests throttler started for {} keys at a {} load rate\",\n _keysToFetch.size(), _maxConcurrentRequests);\n if (_keysToFetch.size() == 0)\n {\n callback.onSuccess(None.none());\n return;\n }\n _cal... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_657 | {
"fields": [
{
"declarator": "NO_ESCAPING = URLEscaper.Escaping.NO_ESCAPING",
"modifier": "private static final",
"original_string": "private static final URLEscaper.Escaping NO_ESCAPING = URLEscaper.Escaping.NO_ESCAPING;",
"type": "URLEscaper.Escaping",
"var_name": "NO_ESCAPING"
... | {
"body": "@Test\n public void testExtractionWithoutTemplateVariables()\n {\n final String[] components = URIParamUtils.extractPathComponentsFromUriTemplate(\"foo/bar\");\n Assert.assertEquals(components.length, 2);\n Assert.assertEquals(components[0], \"foo\");\n Assert.assertEquals(components[1], \"ba... | {
"fields": [
{
"declarator": "_EMPTY_STRING_ARRAY = new String[0]",
"modifier": "private static final",
"original_string": "private static final String[] _EMPTY_STRING_ARRAY = new String[0];",
"type": "String[]",
"var_name": "_EMPTY_STRING_ARRAY"
},
{
"declarator": "NO... | {
"body": "public static String[] extractPathComponentsFromUriTemplate(String uriTemplate)\n {\n final String normalizedUriTemplate = NORMALIZED_URI_PATTERN.matcher(uriTemplate).replaceAll(\"\");\n final UriTemplate template = new UriTemplate(normalizedUriTemplate);\n final String uri = template.createURI(_... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_207 | {
"fields": [],
"file": "restli-tools/src/test/java/com/linkedin/restli/tools/data/TestPredicateExpressionParser.java",
"identifier": "TestPredicateExpressionParser",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNotParenAnd()\n {\n final Predicate parsed = PredicateExpressionParser.parse(\"!(com.linkedin.data.it.AlwaysTruePredicate & com.linkedin.data.it.AlwaysFalsePredicate)\");\n Assert.assertEquals(parsed.getClass(), NotPredicate.class);\n\n final Predicate intermediate = ((No... | {
"fields": [
{
"declarator": "TRIMMER_PATTERN = Pattern.compile(\"\\\\s\")",
"modifier": "private static final",
"original_string": "private static final Pattern TRIMMER_PATTERN = Pattern.compile(\"\\\\s\");",
"type": "Pattern",
"var_name": "TRIMMER_PATTERN"
},
{
"decl... | {
"body": "public static Predicate parse(String expression)\n {\n final Stack<Predicate> predicateStack = new Stack<Predicate>();\n final Stack<Character> operatorStack = new Stack<Character>();\n\n final String trimmedExpression = TRIMMER_PATTERN.matcher(expression).replaceAll(\"\");\n final StringToken... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_270 | {
"fields": [],
"file": "data-avro/src/test/java/com/linkedin/data/avro/TestAvroOverrideFactory.java",
"identifier": "TestAvroOverrideFactory",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBad() throws IOException\n {\n final String[][] inputs =\n {\n {\n \"{\\n\" +\n \" \\\"type\\\" : \\\"record\\\",\\n\" +\n \" \\\"name\\\" : \\\"Foo\\\",\\n\" +\n \" \\\"fields\\\" : [],\\n\" +\n \" \\\"avro\\\" : 0\\... | {
"fields": [
{
"declarator": "_instantiateCustomDataTranslator",
"modifier": "private",
"original_string": "private boolean _instantiateCustomDataTranslator;",
"type": "boolean",
"var_name": "_instantiateCustomDataTranslator"
}
],
"file": "data-avro/src/main/java/com/linkedi... | {
"body": "AvroOverride createFromDataSchema(DataSchema schema)\n {\n AvroOverride avroOverride = null;\n Map<String, Object> properties = schema.getProperties();\n Object avro = properties.get(\"avro\");\n if (avro != null)\n {\n boolean ok = true;\n Object avroTranslator = null;\n Obj... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_620 | {
"fields": [],
"file": "restli-common/src/test/java/com/linkedin/restli/common/attachments/TestRestLiAttachmentReader.java",
"identifier": "TestRestLiAttachmentReader",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testRestLiAttachmentReader()\n {\n //Create a mock MultiPartMIMEReader and pass to the RestLiAttachmentReader. Verify that API calls are propagated accordingly.\n final MultiPartMIMEReader multiPartMIMEReader = mock(MultiPartMIMEReader.class);\n final RestLiAttachmentReader a... | {
"fields": [
{
"declarator": "_multiPartMIMEReader",
"modifier": "private final",
"original_string": "private final MultiPartMIMEReader _multiPartMIMEReader;",
"type": "MultiPartMIMEReader",
"var_name": "_multiPartMIMEReader"
}
],
"file": "restli-common/src/main/java/com/lin... | {
"body": "public RestLiAttachmentReader(final MultiPartMIMEReader multiPartMIMEReader)\n {\n _multiPartMIMEReader = multiPartMIMEReader;\n }",
"class_method_signature": "RestLiAttachmentReader.RestLiAttachmentReader(final MultiPartMIMEReader multiPartMIMEReader)",
"constructor": true,
"full_signature": "p... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_335 | {
"fields": [
{
"declarator": "_zkClient",
"modifier": "private",
"original_string": "private ZKConnection _zkClient;",
"type": "ZKConnection",
"var_name": "_zkClient"
},
{
"declarator": "_zkServer",
"modifier": "private",
"original_string": "private ZKServ... | {
"body": "@Test\n public void testSymlinkWithChildrenWatcher2() throws ExecutionException, InterruptedException\n {\n final CountDownLatch latch1 = new CountDownLatch(1);\n final CountDownLatch latch2 = new CountDownLatch(1);\n final AsyncCallback.ChildrenCallback callback2 = new AsyncCallback.ChildrenCal... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(SymlinkAwareZooKeeper.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(SymlinkAwareZooKeeper.class);",
"type": "Logger",
"var_name": "LOG"
},
... | {
"body": "@Override\n public void getChildren(final String path, final boolean watch, final AsyncCallback.ChildrenCallback cb, final Object ctx)\n {\n if (!SymlinkUtil.containsSymlink(path))\n {\n _zk.getChildren(path, watch, cb, ctx);\n }\n else\n {\n SymlinkChildrenCallback compositeCall... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_82 | {
"fields": [],
"file": "data/src/test/java/com/linkedin/data/schema/grammar/TestPdlSchemaParser.java",
"identifier": "TestPdlSchemaParser",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testUnionDataSchemaWithAliases()\n {\n List<String> membersInDeclaredOrder = new ArrayList<>(Arrays.asList(\"null\", \"member\", \"article\", \"school\",\n \"organization\", \"company\", \"jobs\", \"courses\", \"fingerprint\", \"audio\", \"video\"));\n Set<String> inlined... | {
"fields": [
{
"declarator": "FILETYPE = \"pdl\"",
"modifier": "public static final",
"original_string": "public static final String FILETYPE = \"pdl\";",
"type": "String",
"var_name": "FILETYPE"
},
{
"declarator": "FILE_EXTENSION = '.' + FILETYPE",
"modifier": "... | {
"body": "private boolean isDeclaredInline(TypeAssignmentContext assignment)\n {\n return assignment.typeReference() == null;\n }",
"class_method_signature": "PdlSchemaParser.isDeclaredInline(TypeAssignmentContext assignment)",
"constructor": false,
"full_signature": "private boolean isDeclaredInline(Type... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_509 | {
"fields": [
{
"declarator": "ERROR_MESSAGE_BATCH_KEYS_MISMATCH = \"Batch request mismatch\"",
"modifier": "private static final",
"original_string": "private static final String ERROR_MESSAGE_BATCH_KEYS_MISMATCH = \"Batch request mismatch\";",
"type": "String",
"var_name": "ERROR_M... | {
"body": "@Test(dataProvider = \"failureData\")\n public void testFailure(ProtocolVersion version, Key primaryKey, Key[] associationKeys, String requestEntity, Object[] keys, String errorMessage)\n throws Exception\n {\n Set<Object> batchKeys = new HashSet<>(Arrays.asList(keys));\n RestRequest request =... | {
"fields": [],
"file": "restli-server/src/main/java/com/linkedin/restli/internal/server/methods/arguments/BatchPatchArgumentBuilder.java",
"identifier": "BatchPatchArgumentBuilder",
"interfaces": "implements RestLiArgumentBuilder",
"methods": [
{
"class_method_signature": "BatchPatchArgumentBuilder... | {
"body": "@SuppressWarnings(\"unchecked\")\n @Override\n public RestLiRequestData extractRequestData(RoutingResult routingResult, DataMap dataMap)\n {\n final RestLiRequestDataImpl.Builder builder = new RestLiRequestDataImpl.Builder();\n Set<?> ids = routingResult.getContext().getPathKeys().getBatchIds();\n... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_159 | {
"fields": [
{
"declarator": "DISRUPT_SOURCE_KEY = \"R2_DISRUPT_SOURCE\"",
"modifier": "public static final",
"original_string": "public static final String DISRUPT_SOURCE_KEY = \"R2_DISRUPT_SOURCE\";",
"type": "String",
"var_name": "DISRUPT_SOURCE_KEY"
},
{
"declarato... | {
"body": "@Test\n public void testSendRequest1()\n {\n when(_controller.getDisruptContext(any(String.class), any(ResourceMethod.class))).thenReturn(_disrupt);\n _client.sendRequest(_request);\n verify(_underlying, times(1)).sendRequest(eq(_request), any(RequestContext.class));\n }",
"class_method_signa... | {
"fields": [
{
"declarator": "_client",
"modifier": "private final",
"original_string": "private final Client _client;",
"type": "Client",
"var_name": "_client"
},
{
"declarator": "_controller",
"modifier": "private final",
"original_string": "private final... | {
"body": "@Override\n public <T> ResponseFuture<T> sendRequest(Request<T> request, RequestContext requestContext)\n {\n doEvaluateDisruptContext(request, requestContext);\n return _client.sendRequest(request, requestContext);\n }",
"class_method_signature": "DisruptRestClient.sendRequest(Request<T> reques... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_677 | {
"fields": [],
"file": "restli-common/src/test/java/com/linkedin/restli/internal/common/TestAttachmentUtils.java",
"identifier": "TestAttachmentUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSingleAttachment()\n {\n final MultiPartMIMEWriter.Builder builder = new MultiPartMIMEWriter.Builder();\n final List<RestLiTestAttachmentDataSource> testAttachmentDataSources = generateTestDataSources();\n\n for (RestLiTestAttachmentDataSource dataSource : testAttachmentD... | {
"fields": [
{
"declarator": "RESTLI_MULTIPART_SUBTYPE = \"related\"",
"modifier": "public static final",
"original_string": "public static final String RESTLI_MULTIPART_SUBTYPE = \"related\";",
"type": "String",
"var_name": "RESTLI_MULTIPART_SUBTYPE"
}
],
"file": "restli-co... | {
"body": "public static void appendSingleAttachmentToBuilder(final MultiPartMIMEWriter.Builder builder,\n final RestLiAttachmentDataSourceWriter streamingAttachment)\n {\n builder.appendDataSource(new MultiPartMIMEDataSourceWriter()\n {\n @Override\n ... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_227 | {
"fields": [
{
"declarator": "_client",
"modifier": "private",
"original_string": "private Client _client;",
"type": "Client",
"var_name": "_client"
},
{
"declarator": "_provider",
"modifier": "private",
"original_string": "private RestLiSymbolTableProvider... | {
"body": "@Test\n public void testGetRemoteSymbolTableFetchSuccess() throws IOException\n {\n RestResponseBuilder builder = new RestResponseBuilder();\n builder.setStatus(200);\n SymbolTable symbolTable = new InMemorySymbolTable(\"https://OtherHost:100/service|Test--332004310\",\n Collections.unmod... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(RestLiSymbolTableProvider.class.getSimpleName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(RestLiSymbolTableProvider.class.getSimpleName());",
"type"... | {
"body": "@Override\n public SymbolTable getSymbolTable(String symbolTableName)\n {\n try\n {\n SymbolTableMetadata metadata = _symbolTableNameHandler.extractMetadata(symbolTableName);\n String serverNodeUri = metadata.getServerNodeUri();\n String tableName = metadata.getSymbolTableName();\n ... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_362 | {
"fields": [
{
"declarator": "TEST_SERVICE = URIMapperTestUtil.TEST_SERVICE",
"modifier": "private static final",
"original_string": "private static final String TEST_SERVICE = URIMapperTestUtil.TEST_SERVICE;",
"type": "String",
"var_name": "TEST_SERVICE"
},
{
"declara... | {
"body": "@Test(dataProvider = \"stickyPartitionPermutation\")\n public void testUnmappedKeys(boolean sticky, boolean partitioned) throws Exception\n {\n int partitionCount = partitioned ? 10 : 1;\n int requestPerPartition = 100;\n\n List<Ring<URI>> rings = new ArrayList<>();\n IntStream.range(0, parti... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(RingBasedUriMapper.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(RingBasedUriMapper.class);",
"type": "Logger",
"var_name": "LOG"
},
{
... | {
"body": "@Override\n public <KEY> URIMappingResult<KEY> mapUris(List<URIKeyPair<KEY>> requestUriKeyPairs)\n throws ServiceUnavailableException\n {\n if (requestUriKeyPairs == null || requestUriKeyPairs.isEmpty())\n {\n return new URIMappingResult<>(Collections.emptyMap(), Collections.emptyMap(), C... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_231 | {
"fields": [
{
"declarator": "SYMBOL_TABLE_NAME_HANDLER =\n new SymbolTableNameHandler(\"Prefix\", \"https://Host:100/service\")",
"modifier": "private static final",
"original_string": "private static final SymbolTableNameHandler SYMBOL_TABLE_NAME_HANDLER =\n new SymbolTableNameHandl... | {
"body": "@Test\n public void testReplaceServerNodeUri()\n {\n String name = \"https://SomeOldHostName:100/SomeOtherService|SomeOtherPrefix-1000\";\n String replacedName = SYMBOL_TABLE_NAME_HANDLER.replaceServerNodeUri(name);\n Assert.assertEquals(replacedName, \"https://Host:100/service|SomeOtherPrefix-1... | {
"fields": [
{
"declarator": "PREFIX_HASH_SEPARATOR = \"-\"",
"modifier": "private static",
"original_string": "private static String PREFIX_HASH_SEPARATOR = \"-\";",
"type": "String",
"var_name": "PREFIX_HASH_SEPARATOR"
},
{
"declarator": "_symbolTablePrefix",
"... | {
"body": "String replaceServerNodeUri(String existingTableName)\n {\n int index = existingTableName.indexOf(SERVER_NODE_URI_PREFIX_TABLENAME_SEPARATOR);\n\n if (index == -1 || index == 0 || index == existingTableName.length() - 1)\n {\n throw new RuntimeException(\"Unexpected name format for name: \" ... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_661 | {
"fields": [],
"file": "restli-common/src/test/java/com/linkedin/restli/internal/common/TestQueryParamsDataMap.java",
"identifier": "TestQueryParamsDataMap",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNestedCases() throws Exception\n {\n String testQS = \"ids[0].keys[0].part1=part001&ids[0].keys[0].part2=part002&\" +\n \"ids[0].keys[1].part1=part011&ids[0].keys[1].part2=part012&\" +\n \"ids[1].keys[0].part1=part101&ids[1].keys[0].part2=p... | {
"fields": [
{
"declarator": "SEGMENT_DELIMITER_PATTERN =\n Pattern.compile(Pattern.quote(PathSegment.PATH_SEPARATOR))",
"modifier": "private static final",
"original_string": "private static final Pattern SEGMENT_DELIMITER_PATTERN =\n... | {
"body": "private QueryParamsDataMap()\n {\n }",
"class_method_signature": "QueryParamsDataMap.QueryParamsDataMap()",
"constructor": true,
"full_signature": "private QueryParamsDataMap()",
"identifier": "QueryParamsDataMap",
"invocations": [],
"modifiers": "private",
"parameters": "()",
"return": ... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_374 | {
"fields": [
{
"declarator": "MY_SERVICES_FS = \"myServices\"",
"modifier": "public static final",
"original_string": "public static final String MY_SERVICES_FS = \"myServices\";",
"type": "String",
"var_name": "MY_SERVICES_FS"
},
{
"declarator": "UNVALID_FILES = Array... | {
"body": "@Test(timeOut = 10000)\n public void testHitTimeout() throws URISyntaxException, InterruptedException, ExecutionException, TimeoutException\n {\n int NRequests = 5000;\n int warmUpTimeout = 2;\n int concurrentRequests = 5;\n int requestTime = 100;\n\n float requestsPerSecond = 1000 / reque... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(WarmUpLoadBalancer.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(WarmUpLoadBalancer.class);",
"type": "Logger",
"var_name": "LOG"
},
{
... | {
"body": "@Override\n public void start(Callback<None> callback)\n {\n LOG.info(\"D2 WarmUp enabled\");\n _loadBalancer.start(new Callback<None>()\n {\n @Override\n public void onError(Throwable e)\n {\n callback.onError(e);\n }\n\n @Override\n public void onSuccess(No... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_548 | {
"fields": [
{
"declarator": "CODEC = new JacksonDataCodec()",
"modifier": "private static final",
"original_string": "private static final JacksonDataCodec CODEC = new JacksonDataCodec();",
"type": "JacksonDataCodec",
"var_name": "CODEC"
},
{
"declarator": "MAXIMUM_RE... | {
"body": "@Test(dataProvider = \"multiplexerConfigurations\")\n public void testHandleTooManyParallelRequests(MultiplexerRunMode multiplexerRunMode) throws Exception\n {\n // MultiplexedRequestHandlerImpl is created with the request limit set to 2\n MultiplexedRequestHandlerImpl multiplexer = createMultiplex... | {
"fields": [
{
"declarator": "MUX_PLAN_CLASS = \"mux\"",
"modifier": "private static final",
"original_string": "private static final String MUX_PLAN_CLASS = \"mux\";",
"type": "String",
"var_name": "MUX_PLAN_CLASS"
},
{
"declarator": "MUX_URI_PATH = \"/mux\"",
"... | {
"body": "@Override\n public void handleRequest(RestRequest request, RequestContext requestContext, final Callback<RestResponse> callback)\n {\n if (HttpMethod.POST != HttpMethod.valueOf(request.getMethod()))\n {\n _log.error(\"POST is expected, but \" + request.getMethod() + \" received\");\n call... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_118 | {
"fields": [
{
"declarator": "FS = File.separator",
"modifier": "private static final",
"original_string": "private static final String FS = File.separator;",
"type": "String",
"var_name": "FS"
},
{
"declarator": "testDir = System.getProperty(\"testDir\", new File(\"sr... | {
"body": "@Test(dataProvider = \"entityRelationshipInputFiles\")\n public void testSchemaFilesInExtensionPathInJar(String[] files, String[] expectedExtensions) throws Exception\n {\n String tempDirectoryPath = _tempDir.getAbsolutePath();\n String jarFile = tempDirectoryPath + FS + \"test.jar\";\n String s... | {
"fields": [
{
"declarator": "_resolverPath",
"modifier": "private final",
"original_string": "private final String _resolverPath;",
"type": "String",
"var_name": "_resolverPath"
},
{
"declarator": "_parserByFileExtension",
"modifier": "private final",
"ori... | {
"body": "public DataSchemaParser.ParseResult parseSources(String sources[]) throws IOException\n {\n Set<String> fileExtensions = _parserByFileExtension.keySet();\n Map<String, List<String>> byExtension = new HashMap<>(fileExtensions.size());\n for (String fileExtension : fileExtensions)\n {\n byE... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_636 | {
"fields": [
{
"declarator": "PSON_DATA_CODEC = new PsonDataCodec()",
"modifier": "private static final",
"original_string": "private static final PsonDataCodec PSON_DATA_CODEC = new PsonDataCodec();",
"type": "PsonDataCodec",
"var_name": "PSON_DATA_CODEC"
},
{
"declar... | {
"body": "@Test(expectedExceptions = MimeTypeParseException.class)\n public void testDataMapToByteStringWithNonParsableContentType() throws MimeTypeParseException, IOException\n {\n DataMap dataMap = createTestDataMap();\n DataMapConverter.dataMapToByteString(\n Collections.singletonMap(RestConstants.... | {
"fields": [],
"file": "restli-common/src/main/java/com/linkedin/restli/internal/common/DataMapConverter.java",
"identifier": "DataMapConverter",
"interfaces": "",
"methods": [
{
"class_method_signature": "DataMapConverter.dataMapToByteString(Map<String, String> headers, DataMap dataMap)",
"c... | {
"body": "public static ByteString dataMapToByteString(Map<String, String> headers, DataMap dataMap) throws MimeTypeParseException, IOException\n {\n return ByteString.unsafeWrap(getContentType(headers).getCodec().mapToBytes(dataMap));\n }",
"class_method_signature": "DataMapConverter.dataMapToByteString(Map<... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_266 | {
"fields": [
{
"declarator": "CHOOSER_PROPERTY = \"com.linkedin.data.avro.AvroAdapterChooser\"",
"modifier": "private final",
"original_string": "private final String CHOOSER_PROPERTY = \"com.linkedin.data.avro.AvroAdapterChooser\";",
"type": "String",
"var_name": "CHOOSER_PROPERTY"... | {
"body": "@Test\n public void testAdapterProperty()\n {\n System.setProperty(ADAPTER_PROPERTY, TestAvroAdapter.class.getName());\n AvroAdapter avroAdapter = AvroAdapterFinder.avroAdapter();\n assertEquals(avroAdapter.getClass(), TestAvroAdapter.class);\n }",
"class_method_signature": "TestAvroAdapterFi... | {
"fields": [
{
"declarator": "AVRO_ADAPTER_CHOOSER_PROPERTY = \"com.linkedin.data.avro.AvroAdapterChooser\"",
"modifier": "public static final",
"original_string": "public static final String AVRO_ADAPTER_CHOOSER_PROPERTY = \"com.linkedin.data.avro.AvroAdapterChooser\";",
"type": "String"... | {
"body": "static AvroAdapter avroAdapter()\n {\n AvroAdapter avroAdapter;\n String adapterClassName = System.getProperty(AVRO_ADAPTER_PROPERTY);\n if (adapterClassName != null)\n {\n avroAdapter = newInstance(adapterClassName);\n }\n else\n {\n String chooserClassName = System.getProp... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_289 | {
"fields": [
{
"declarator": "_index",
"modifier": "private",
"original_string": "private AtomicInteger _index;",
"type": "AtomicInteger",
"var_name": "_index"
},
{
"declarator": "_requestFinalizer",
"modifier": "private",
"original_string": "private TestRe... | {
"body": "@Test(dataProvider = \"throwTransportCallbackException\")\n public void testHandleRestRequestOrdering(boolean throwTransportCallbackException)\n {\n when(_restTransportResponse.getResponse())\n .thenReturn(_restResponse);\n\n final TestTransportCallback<RestResponse> transportCallback = new ... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(RequestFinalizerDispatcher.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(RequestFinalizerDispatcher.class);",
"type": "Logger",
"var_name": "LOG"
... | {
"body": "@Override\n public void handleRestRequest(RestRequest req, Map<String, String> wireAttrs, RequestContext requestContext,\n TransportCallback<RestResponse> callback)\n {\n _transportDispatcher.handleRestRequest(req, wireAttrs, requestContext,\n new RequestFinalizerTransportCallback<>(callba... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_94 | {
"fields": [],
"file": "data/src/test/java/com/linkedin/data/schema/TestPdlBuilder.java",
"identifier": "TestPdlBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"propertiesMapProvider\")\n public void testWriteProperties(Map<String, Object> properties,\n String indentPdlString,\n String compactPdlString) throws IOException\n {\n StringWriter indentWriter = new StringWriter... | {
"fields": [
{
"declarator": "KEYWORDS = new HashSet<>(Arrays.asList(\n \"array\", \"enum\", \"fixed\", \"import\", \"includes\", \"map\", \"namespace\", \"optional\", \"package\",\n \"record\", \"typeref\", \"union\", \"null\", \"true\", \"false\"\n ))",
"modifier": "private static final"... | {
"body": "PdlBuilder writeProperties(List<String> prefix, Map<String, Object> properties) throws IOException\n {\n List<Map.Entry<String, Object>> orderedProperties = properties.entrySet().stream()\n .sorted(Map.Entry.comparingByKey())\n .collect(Collectors.toList());\n for (Map.Entry<String, O... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_323 | {
"fields": [
{
"declarator": "_zkServer",
"modifier": "protected",
"original_string": "protected ZKServer _zkServer;",
"type": "ZKServer",
"var_name": "_zkServer"
},
{
"declarator": "_dataPath",
"modifier": "protected",
"original_string": "protected File ... | {
"body": "@Test(groups = { \"small\", \"back-end\" })\n public void testShutdown()\n throws InterruptedException, IOException, PropertyStoreException, ExecutionException\n {\n PropertyStore<String> store = getStore();\n\n final FutureCallback<None> callback = new FutureCallback<>();\n store.shutd... | {
"fields": [
{
"declarator": "_log =\n LoggerFactory.getLogger(ZooKeeperEphemeralStore.class)",
"modifier": "private static final",
"original_string": "private static final Logger _log =... | {
"body": "@Override\n public void get(final String listenTo, final Callback<T> callback)\n {\n String path = getPath(listenTo);\n // Note ChildrenCallback is compatible with a ZK 3.2 server; Children2Callback is\n // compatible only with ZK 3.3+ server.\n AsyncCallback.ChildrenCallback zkCallback = new... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_358 | {
"fields": [
{
"declarator": "TEST_SERVICE = URIMapperTestUtil.TEST_SERVICE",
"modifier": "private static final",
"original_string": "private static final String TEST_SERVICE = URIMapperTestUtil.TEST_SERVICE;",
"type": "String",
"var_name": "TEST_SERVICE"
},
{
"declara... | {
"body": "@Test\n public void testSameHostSupportingMultiplePartitions() throws ServiceUnavailableException\n {\n int partitionCount = 10;\n int requestPerPartition = 100;\n\n // one host supporting 10 partitions\n URI host = createHostURI(0, 0);\n List<Ring<URI>> rings = IntStream.range(0, partitio... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(RingBasedUriMapper.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(RingBasedUriMapper.class);",
"type": "Logger",
"var_name": "LOG"
},
{
... | {
"body": "@Override\n public <KEY> URIMappingResult<KEY> mapUris(List<URIKeyPair<KEY>> requestUriKeyPairs)\n throws ServiceUnavailableException\n {\n if (requestUriKeyPairs == null || requestUriKeyPairs.isEmpty())\n {\n return new URIMappingResult<>(Collections.emptyMap(), Collections.emptyMap(), C... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_134 | {
"fields": [],
"file": "restli-client/src/test/java/com/linkedin/restli/client/multiplexer/TestMultiplexedCallback.java",
"identifier": "TestMultiplexedCallback",
"interfaces": "",
"superclass": "extends MultiplexerTestBase"
} | {
"body": "@Test\n public void testError() throws Exception\n {\n FutureCallback<RestResponse> callback1 = new FutureCallback<RestResponse>();\n FutureCallback<RestResponse> callback2 = new FutureCallback<RestResponse>();\n\n ImmutableMap<Integer, Callback<RestResponse>> individualCallbacks = ImmutableMap.... | {
"fields": [
{
"declarator": "_decoder = new EntityResponseDecoder<MultiplexedResponseContent>(MultiplexedResponseContent.class)",
"modifier": "private final",
"original_string": "private final EntityResponseDecoder<MultiplexedResponseContent> _decoder = new EntityResponseDecoder<MultiplexedRes... | {
"body": "@Override\n public void onError(Throwable e)\n {\n // individual callbacks are notified first\n for (Callback<RestResponse> callback : _callbacks.values())\n {\n callback.onError(e);\n }\n // aggregated callback is guaranteed to be called after all individual callbacks\n _aggregate... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_564 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/server/mock/TestInjectMockResourceFactory.java",
"identifier": "TestInjectMockResourceFactory",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMockInjectionSubClass()\n {\n InjectMockResourceFactory factory =\n new InjectMockResourceFactory(new SimpleBeanProvider()\n .add(\"counterBean\", new CounterBean())\n .... | {
"fields": [
{
"declarator": "_containerAdaptor",
"modifier": "private",
"original_string": "private Jsr330Adapter _containerAdaptor;",
"type": "Jsr330Adapter",
"var_name": "_containerAdaptor"
},
{
"declarator": "_beanProvider",
"modifier": "private final",
... | {
"body": "@Override\n public <R> R create(final Class<R> resourceClass)\n {\n return _containerAdaptor.getBean(resourceClass);\n }",
"class_method_signature": "InjectMockResourceFactory.create(final Class<R> resourceClass)",
"constructor": false,
"full_signature": "@Override public R create(final Class<R... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_421 | {
"fields": [],
"file": "d2/src/test/java/com/linkedin/d2/balancer/zkfs/ZKFSUtilTest.java",
"identifier": "ZKFSUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test (dataProvider = \"clusterPaths\")\n public void testZKFSUtilClusterPath(String basePath, String clusterPath)\n {\n Assert.assertEquals(ZKFSUtil.clusterPath(basePath), clusterPath);\n }",
"class_method_signature": "ZKFSUtilTest.testZKFSUtilClusterPath(String basePath, String clusterPath)",
"... | {
"fields": [
{
"declarator": "SERVICE_PATH = \"services\"",
"modifier": "public static final",
"original_string": "public static final String SERVICE_PATH = \"services\";",
"type": "String",
"var_name": "SERVICE_PATH"
},
{
"declarator": "CLUSTER_PATH = \"clusters\"",
... | {
"body": "public static String clusterPath(String basePath)\n {\n return String.format(\"%s/%s\", normalizeBasePath(basePath), CLUSTER_PATH);\n }",
"class_method_signature": "ZKFSUtil.clusterPath(String basePath)",
"constructor": false,
"full_signature": "public static String clusterPath(String basePath)"... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_57 | {
"fields": [],
"file": "data/src/test/java/com/linkedin/data/it/TestValueAccumulator.java",
"identifier": "TestValueAccumulator",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAccumulateByPath() throws Exception\n {\n SimpleTestData data = IteratorTestData.createSimpleTestData();\n \n List<Object> ids = new LinkedList<Object>();\n \n Builder.create(data.getDataElement(), IterationOrder.PRE_ORDER)\n .filterBy(Predicates.and(Predicates... | {
"fields": [],
"file": "data/src/main/java/com/linkedin/data/it/ValueAccumulator.java",
"identifier": "ValueAccumulator",
"interfaces": "",
"methods": [
{
"class_method_signature": "ValueAccumulator.accumulateValues(DataIterator it, Collection<Object> accumulator)",
"constructor": false,
... | {
"body": "public static Collection<Object> accumulateValues(DataIterator it, Collection<Object> accumulator)\n {\n for(DataElement element = it.next(); element !=null; element = it.next())\n {\n accumulator.add(element.getValue());\n }\n return accumulator;\n }",
"class_method_signature": "Value... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_533 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/response/TestPartialUpdateResponseBuilder.java",
"identifier": "TestPartialUpdateResponseBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"responseExceptionData\")\n public void testBuilderException(UpdateResponse response)\n {\n Map<String, String> headers = ResponseBuilderUtil.getHeaders();\n PartialUpdateResponseBuilder partialUpdateResponseBuilder = new PartialUpdateResponseBuilder();\n\n RoutingResult ro... | {
"fields": [],
"file": "restli-server/src/main/java/com/linkedin/restli/internal/server/response/PartialUpdateResponseBuilder.java",
"identifier": "PartialUpdateResponseBuilder",
"interfaces": "implements RestLiResponseBuilder<RestLiResponseData<PartialUpdateResponseEnvelope>>",
"methods": [
{
"cla... | {
"body": "@Override\n @SuppressWarnings({\"unchecked\"})\n public RestLiResponseData<PartialUpdateResponseEnvelope> buildRestLiResponseData(Request request,\n RoutingResult routingResult,\n ... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_163 | {
"fields": [
{
"declarator": "DISRUPT_SOURCE_KEY = \"R2_DISRUPT_SOURCE\"",
"modifier": "public static final",
"original_string": "public static final String DISRUPT_SOURCE_KEY = \"R2_DISRUPT_SOURCE\";",
"type": "String",
"var_name": "DISRUPT_SOURCE_KEY"
},
{
"declarato... | {
"body": "@Test\n public void testSendRequest5()\n {\n when(_controller.getDisruptContext(any(String.class), any(ResourceMethod.class))).thenReturn(_disrupt);\n _client.sendRequest(_request, _callback);\n verify(_underlying, times(1)).sendRequest(eq(_request), any(RequestContext.class), eq(_callback));\n ... | {
"fields": [
{
"declarator": "_client",
"modifier": "private final",
"original_string": "private final Client _client;",
"type": "Client",
"var_name": "_client"
},
{
"declarator": "_controller",
"modifier": "private final",
"original_string": "private final... | {
"body": "@Override\n public <T> ResponseFuture<T> sendRequest(Request<T> request, RequestContext requestContext)\n {\n doEvaluateDisruptContext(request, requestContext);\n return _client.sendRequest(request, requestContext);\n }",
"class_method_signature": "DisruptRestClient.sendRequest(Request<T> reques... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_499 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/methods/arguments/TestArgumentBuilder.java",
"identifier": "TestArgumentBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testUnstructuredDataWriterParam()\n {\n ServerResourceContext mockResourceContext = EasyMock.createMock(ServerResourceContext.class);\n\n mockResourceContext.setResponseEntityStream(EasyMock.anyObject());\n EasyMock.expectLastCall().once();\n EasyMock.expect(mockResourceCo... | {
"fields": [],
"file": "restli-server/src/main/java/com/linkedin/restli/internal/server/methods/arguments/ArgumentBuilder.java",
"identifier": "ArgumentBuilder",
"interfaces": "",
"methods": [
{
"class_method_signature": "ArgumentBuilder.buildArgs(final Object[] positionalArguments,\n ... | {
"body": "@SuppressWarnings(\"deprecation\")\n static Object[] buildArgs(final Object[] positionalArguments,\n final ResourceMethodDescriptor resourceMethod,\n final ServerResourceContext context,\n final DynamicRe... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_476 | {
"fields": [
{
"declarator": "JSON_TYPE = \"application/json\"",
"modifier": "private static final",
"original_string": "private static final String JSON_TYPE = \"application/json\";",
"type": "String",
"var_name": "JSON_TYPE"
},
{
"declarator": "PSON_TYPE = \"applicat... | {
"body": "@Test\n public void testUnionDataMap() throws CloneNotSupportedException\n {\n UnionTest foo = new UnionTest();\n foo.setUnionEmpty(new UnionTest.UnionEmpty());\n\n UnionTest expected = foo.copy();\n ((DataMap) foo.getUnionEmpty().data()).put(\"foo\", \"bar\");\n\n RestUtils.trimRecordTemp... | {
"fields": [
{
"declarator": "EMPTY_DATAMAP = new DataMap()",
"modifier": "private static final",
"original_string": "private static final DataMap EMPTY_DATAMAP = new DataMap();",
"type": "DataMap",
"var_name": "EMPTY_DATAMAP"
}
],
"file": "restli-server/src/main/java/com/li... | {
"body": "public static void trimRecordTemplate(RecordTemplate recordTemplate, MaskTree override, final boolean failOnMismatch)\n {\n trimRecordTemplate(recordTemplate.data(), recordTemplate.schema(), override, failOnMismatch);\n }",
"class_method_signature": "RestUtils.trimRecordTemplate(RecordTemplate recor... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_319 | {
"fields": [
{
"declarator": "ACCEPT_COMPRESSIONS = \"gzip, deflate, bzip2, x-snappy-framed\"",
"modifier": "private static final",
"original_string": "private static final String ACCEPT_COMPRESSIONS = \"gzip, deflate, bzip2, x-snappy-framed\";",
"type": "String",
"var_name": "ACCEP... | {
"body": "@Test(dataProvider = \"operationsData\")\n public void testCompressionOperations(String compressionConfig, String[] operations, boolean headerShouldBePresent)\n throws URISyntaxException\n {\n StreamRequest streamRequest = new StreamRequestBuilder(new URI(URI)).build(EntityStreams.emptyStream());... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ClientStreamCompressionFilter.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ClientStreamCompressionFilter.class);",
"type": "Logger",
"var_name": ... | {
"body": "public void onStreamRequest(StreamRequest req, final RequestContext requestContext, final Map<String, String> wireAttrs,\n final NextFilter<StreamRequest, StreamResponse> nextFilter)\n {\n //Set accepted encoding for compressed response\n String operation = (String) requ... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_41 | {
"fields": [],
"file": "data/src/test/java/com/linkedin/data/collections/TestCheckedUtil.java",
"identifier": "TestCheckedUtil",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expectedExceptions = AssertionError.class)\n public void testPutAllCycleWithAssertChecking()\n {\n final DataMap map = new DataMap();\n final Map<String, Object> cycleMap = new HashMap<String, Object>();\n cycleMap.put(\"cycle\", map);\n\n CheckedUtil.putAllWithoutChecking(map, cycleMap... | {
"fields": [],
"file": "data/src/main/java/com/linkedin/data/collections/CheckedUtil.java",
"identifier": "CheckedUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "CheckedUtil.addWithoutChecking(CheckedList<E> list, E element)",
"constructor": false,
"full_signature": "... | {
"body": "public static <K, V> void putAllWithoutChecking(CheckedMap<K, V> dest, Map<K, V> src)\n {\n dest.putAllWithAssertedChecking(src);\n }",
"class_method_signature": "CheckedUtil.putAllWithoutChecking(CheckedMap<K, V> dest, Map<K, V> src)",
"constructor": false,
"full_signature": "public static void... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_175 | {
"fields": [
{
"declarator": "DEFAULT_REQUEST_CONTEXT = new RequestContext()",
"modifier": "private static final",
"original_string": "private static final RequestContext DEFAULT_REQUEST_CONTEXT = new RequestContext();",
"type": "RequestContext",
"var_name": "DEFAULT_REQUEST_CONTEXT... | {
"body": "@SuppressWarnings(\"deprecation\")\n @Test(dataProvider = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + \"sendRequestAndGetResponseOptions\")\n public void testRestLiResponseExceptionFuture(SendRequestOption sendRequestOption,\n GetResponseOption getResponseOpt... | {
"fields": [
{
"declarator": "DEFAULT_ACCEPT_TYPES = Collections.emptyList()",
"modifier": "private static final",
"original_string": "private static final List<ContentType> DEFAULT_ACCEPT_TYPES = Collections.emptyList();",
"type": "List<ContentType>",
"var_name": "DEFAULT_ACCEPT_T... | {
"body": "@Override\n public <T> ResponseFuture<T> sendRequest(Request<T> request, RequestContext requestContext)\n {\n FutureCallback<Response<T>> callback = new FutureCallback<>();\n sendRequest(request, requestContext, callback);\n return new ResponseFutureImpl<T>(callback);\n }",
"class_method_sign... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_525 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/response/TestRestLiResponseEnvelope.java",
"identifier": "TestRestLiResponseEnvelope",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"resourceMethodProvider\")\n @SuppressWarnings(\"Duplicates\")\n public void testEnvelopeSetDataNull(ResourceMethod resourceMethod)\n {\n // create an envelope and set all the data to null\n RestLiResponseEnvelope responseEnvelope = buildBlankResponseEnvelope(resourceMethod);... | {
"fields": [
{
"declarator": "_status",
"modifier": "private",
"original_string": "private HttpStatus _status;",
"type": "HttpStatus",
"var_name": "_status"
},
{
"declarator": "_exception",
"modifier": "private",
"original_string": "private RestLiServiceExc... | {
"body": "protected abstract void clearData();",
"class_method_signature": "RestLiResponseEnvelope.clearData()",
"constructor": false,
"full_signature": "protected abstract void clearData()",
"identifier": "clearData",
"invocations": [],
"modifiers": "protected abstract",
"parameters": "()",
"return"... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_460 | {
"fields": [
{
"declarator": "JSON_TYPE = \"application/json\"",
"modifier": "private static final",
"original_string": "private static final String JSON_TYPE = \"application/json\";",
"type": "String",
"var_name": "JSON_TYPE"
},
{
"declarator": "PSON_TYPE = \"applicat... | {
"body": "@Test(dataProvider = \"successfulMatch\")\n public void testPickBestEncodingWithValidMimeTypes(String header, String result)\n {\n Assert.assertEquals(RestUtils.pickBestEncoding(header, Collections.emptySet()), result);\n }",
"class_method_signature": "TestRestUtils.testPickBestEncodingWithValidMim... | {
"fields": [
{
"declarator": "EMPTY_DATAMAP = new DataMap()",
"modifier": "private static final",
"original_string": "private static final DataMap EMPTY_DATAMAP = new DataMap();",
"type": "DataMap",
"var_name": "EMPTY_DATAMAP"
}
],
"file": "restli-server/src/main/java/com/li... | {
"body": "public static String pickBestEncoding(String acceptHeader, Set<String> customMimeTypesSupported)\n {\n if (acceptHeader == null || acceptHeader.isEmpty())\n {\n return RestConstants.HEADER_VALUE_APPLICATION_JSON;\n }\n\n //For backward compatibility reasons, we have to assume that if ther... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_16 | {
"fields": [
{
"declarator": "debug = false",
"modifier": "private static",
"original_string": "private static boolean debug = false;",
"type": "boolean",
"var_name": "debug"
}
],
"file": "data-transform/src/test/java/com/linkedin/data/transform/patch/validator/TestPatchFilt... | {
"body": "@Test\n public void testPatchFilterValidator() throws IOException\n {\n String schemaText =\n \"{\\n\" +\n \" \\\"type\\\" : \\\"record\\\",\\n\" +\n \" \\\"name\\\" : \\\"Foo\\\",\\n\" +\n \" \\\"fields\\\" : [\\n\"+\n \" { \\\"name\\\" : \\\"fooInt\\\", \\\"type\\\" : ... | {
"fields": [
{
"declarator": "_nextValidator",
"modifier": "private final",
"original_string": "private final Validator _nextValidator;",
"type": "Validator",
"var_name": "_nextValidator"
},
{
"declarator": "_patchedPath",
"modifier": "private final",
"orig... | {
"body": "public PatchFilterValidator(Validator nextValidator, DataMap opMap, Mode mode)\n {\n this(nextValidator, opMap, mode, _emptyPath);\n }",
"class_method_signature": "PatchFilterValidator.PatchFilterValidator(Validator nextValidator, DataMap opMap, Mode mode)",
"constructor": true,
"full_signature"... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_572 | {
"fields": [
{
"declarator": "DEBUG_HANDLER_RESPONSE_A = \"Response A\"",
"modifier": "private static final",
"original_string": "private static final String DEBUG_HANDLER_RESPONSE_A = \"Response A\";",
"type": "String",
"var_name": "DEBUG_HANDLER_RESPONSE_A"
},
{
"dec... | {
"body": "@Test(dataProvider = \"restOrStream\")\n public void testHandleRequestWithRestLiResponseError(final RestOrStream restOrStream) throws Exception\n {\n final StatusCollectionResource statusResource = getMockResource(StatusCollectionResource.class);\n EasyMock.expect(statusResource.get(eq(1L))).andRet... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(RestLiServer.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(RestLiServer.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
... | {
"body": "@Override\n public void handleRequestWithRestLiResponse(RestRequest request, RequestContext requestContext, Callback<RestLiResponse> callback)\n {\n if (!isMultipart(request, callback))\n {\n _restRestLiServer.handleRequestWithRestLiResponse(request, requestContext, callback);\n }\n }",
... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_122 | {
"fields": [],
"file": "restli-client/src/test/java/com/linkedin/restli/internal/client/TestBatchUpdateResponseDecoder.java",
"identifier": "TestBatchUpdateResponseDecoder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + \"batchEntityResponseDataProvider\")\n public void testDecodingWithEmptyDataMap(ProtocolVersion protocolVersion)\n throws InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException, IOException\n {\n ... | {
"fields": [
{
"declarator": "_keyType",
"modifier": "private final",
"original_string": "private final TypeSpec<K> _keyType;",
"type": "TypeSpec<K>",
"var_name": "_keyType"
},
{
"declarator": "_keyParts",
"modifier": "private final",
"original_string": "pr... | {
"body": "@Override\n public BatchKVResponse<K, UpdateStatus> wrapResponse(DataMap dataMap, Map<String, String> headers, ProtocolVersion version)\n {\n if (dataMap == null)\n {\n return null;\n }\n\n DataMap responseData = ResponseDecoderUtil.mergeUpdateStatusResponseData(dataMap);\n\n return n... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_437 | {
"fields": [
{
"declarator": "URI_1",
"modifier": "private static",
"original_string": "private static URI URI_1;",
"type": "URI",
"var_name": "URI_1"
},
{
"declarator": "URI_2",
"modifier": "private static",
"original_string": "private static URI URI_2;",
... | {
"body": "@Test\n public void testGetHostFromRing()\n {\n TrackerClient trackerClient = _clientSelector.getTrackerClient(_request, _requestContext, DEFAULT_RING, DEFAULT_TRACKER_CLIENT_MAP);\n assertTrue(DEFAULT_TRACKER_CLIENT_MAP.containsKey(trackerClient.getUri()));\n }",
"class_method_signature": "Clie... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ClientSelector.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ClientSelector.class.getName());",
"type": "Logger",
"var_name": "LOG"
... | {
"body": "@Nullable\n public TrackerClient getTrackerClient(Request request,\n RequestContext requestContext,\n Ring<URI> ring,\n Map<URI, TrackerClient> trackerClients)\n {\n TrackerClient track... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_5 | {
"fields": [],
"file": "data-transform/src/test/java/com/linkedin/data/transform/TestProjectionUtil.java",
"identifier": "TestProjectionUtil",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testEmptyPath()\n {\n final MaskTree filter = new MaskTree();\n filter.addOperation(new PathSpec(\"foo\"), MaskOperation.POSITIVE_MASK_OP);\n\n Assert.assertTrue(ProjectionUtil.isPathPresent(filter, new PathSpec()));\n }",
"class_method_signature": "TestProjectionUtil.test... | {
"fields": [],
"file": "data-transform/src/main/java/com/linkedin/data/transform/ProjectionUtil.java",
"identifier": "ProjectionUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "ProjectionUtil.isPathPresent(MaskTree filter, PathSpec path)",
"constructor": false,
"full_s... | {
"body": "public static boolean isPathPresent(MaskTree filter, PathSpec path)\n {\n return !getPresentPaths(filter, Collections.singleton(path)).isEmpty();\n }",
"class_method_signature": "ProjectionUtil.isPathPresent(MaskTree filter, PathSpec path)",
"constructor": false,
"full_signature": "public static... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_345 | {
"fields": [],
"file": "d2/src/test/java/com/linkedin/d2/backuprequests/TestTrackingBackupRequestsStrategy.java",
"identifier": "TestTrackingBackupRequestsStrategy",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNoActivityStats()\n {\n TrackingBackupRequestsStrategy trackingStrategy =\n new TrackingBackupRequestsStrategy(new MockBackupRequestsStrategy(() -> Optional.of(10000000L), () -> true));\n BackupRequestsStrategyStats stats = trackingStrategy.getStats();\n assertNotN... | {
"fields": [
{
"declarator": "_delegate",
"modifier": "private final",
"original_string": "private final BackupRequestsStrategy _delegate;",
"type": "BackupRequestsStrategy",
"var_name": "_delegate"
},
{
"declarator": "_totalAllowedCount = new LongAdder()",
"modi... | {
"body": "@Override\n public BackupRequestsStrategyStats getStats()\n {\n return getStats(_lastDelayStats.get());\n }",
"class_method_signature": "TrackingBackupRequestsStrategy.getStats()",
"constructor": false,
"full_signature": "@Override public BackupRequestsStrategyStats getStats()",
"identifier":... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_650 | {
"fields": [
{
"declarator": "NO_ESCAPING = URLEscaper.Escaping.NO_ESCAPING",
"modifier": "private static final",
"original_string": "private static final URLEscaper.Escaping NO_ESCAPING = URLEscaper.Escaping.NO_ESCAPING;",
"type": "URLEscaper.Escaping",
"var_name": "NO_ESCAPING"
... | {
"body": "@Test(dataProvider = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + \"compoundKey\")\n public void testCompoundKeyToString(ProtocolVersion version, String expected)\n {\n CompoundKey compoundKey = new CompoundKey();\n compoundKey.append(\"key1\", \"stringVal\");\n compoundKey.append(\"key2\", 5);\n ... | {
"fields": [
{
"declarator": "_EMPTY_STRING_ARRAY = new String[0]",
"modifier": "private static final",
"original_string": "private static final String[] _EMPTY_STRING_ARRAY = new String[0];",
"type": "String[]",
"var_name": "_EMPTY_STRING_ARRAY"
},
{
"declarator": "NO... | {
"body": "public static String keyToString(Object key,\n URLEscaper.Escaping escaping,\n UriComponent.Type componentType,\n boolean full,\n ProtocolVersion version)\n {\n if (ve... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_200 | {
"fields": [],
"file": "restli-tools/src/test/java/com/linkedin/restli/tools/data/TestPredicateExpressionParser.java",
"identifier": "TestPredicateExpressionParser",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAndNot()\n {\n final Predicate parsed = PredicateExpressionParser.parse(\"com.linkedin.data.it.AlwaysTruePredicate & !com.linkedin.data.it.AlwaysFalsePredicate\");\n Assert.assertEquals(parsed.getClass(), AndPredicate.class);\n\n final List<Predicate> andChildren = ((AndP... | {
"fields": [
{
"declarator": "TRIMMER_PATTERN = Pattern.compile(\"\\\\s\")",
"modifier": "private static final",
"original_string": "private static final Pattern TRIMMER_PATTERN = Pattern.compile(\"\\\\s\");",
"type": "Pattern",
"var_name": "TRIMMER_PATTERN"
},
{
"decl... | {
"body": "public static Predicate parse(String expression)\n {\n final Stack<Predicate> predicateStack = new Stack<Predicate>();\n final Stack<Character> operatorStack = new Stack<Character>();\n\n final String trimmedExpression = TRIMMER_PATTERN.matcher(expression).replaceAll(\"\");\n final StringToken... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_129 | {
"fields": [],
"file": "restli-client/src/test/java/com/linkedin/restli/client/TestAbstractRequestBuilder.java",
"identifier": "TestAbstractRequestBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expectedExceptions = NullPointerException.class)\n public void testSetReqParamWithNullValue()\n {\n final AbstractRequestBuilder<?, ?, ?> builder = new DummyAbstractRequestBuilder();\n builder.setReqParam(\"a\", null);\n }",
"class_method_signature": "TestAbstractRequestBuilder.testSetReqP... | {
"fields": [
{
"declarator": "HEADER_DELIMITER = ','",
"modifier": "protected static final",
"original_string": "protected static final char HEADER_DELIMITER = ',';",
"type": "char",
"var_name": "HEADER_DELIMITER"
},
{
"declarator": "_resourceSpec",
"modi... | {
"body": "public AbstractRequestBuilder<K, V, R> setReqParam(String key, Object value)\n {\n ArgumentUtil.notNull(value, \"value\");\n return setParam(key, value);\n }",
"class_method_signature": "AbstractRequestBuilder.setReqParam(String key, Object value)",
"constructor": false,
"full_signature": "pu... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_579 | {
"fields": [
{
"declarator": "DEBUG_HANDLER_RESPONSE_A = \"Response A\"",
"modifier": "private static final",
"original_string": "private static final String DEBUG_HANDLER_RESPONSE_A = \"Response A\";",
"type": "String",
"var_name": "DEBUG_HANDLER_RESPONSE_A"
},
{
"dec... | {
"body": "@Test(dataProvider = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + \"protocolVersions\")\n public void testPostProcessingException(final ProtocolVersion protocolVersion, final String errorResponseHeaderName,\n final RestOrStream restOrStream) throws Exception\n {\n ... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(RestLiServer.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(RestLiServer.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
... | {
"body": "@Override\n public void handleRequest(RestRequest request, RequestContext requestContext, Callback<RestResponse> callback)\n {\n //This code path cannot accept content types or accept types that contain\n //multipart/related. This is because these types of requests will usually have very large payl... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_596 | {
"fields": [
{
"declarator": "ANY_URI = \"http://localhost:8080/foo/bar?q=baz\"",
"modifier": "private static final",
"original_string": "private static final String ANY_URI = \"http://localhost:8080/foo/bar?q=baz\";",
"type": "String",
"var_name": "ANY_URI"
},
{
"decl... | {
"body": "@Test\n public void testRestToNettyRequestWithMultipleCookies() throws Exception\n {\n RestRequestBuilder restRequestBuilder = new RestRequestBuilder(new URI(ANY_URI));\n\n restRequestBuilder.setCookies(ANY_COOKIES);\n\n RestRequest restRequest = restRequestBuilder.build();\n HttpRequest nett... | {
"fields": [
{
"declarator": "HEADER_BLACKLIST = new HashSet<>()",
"modifier": "private static final",
"original_string": "private static final HashSet<String> HEADER_BLACKLIST = new HashSet<>();",
"type": "HashSet<String>",
"var_name": "HEADER_BLACKLIST"
}
],
"file": "r2-ne... | {
"body": "public static HttpRequest toNettyRequest(RestRequest request) throws Exception\n {\n HttpMethod nettyMethod = HttpMethod.valueOf(request.getMethod());\n URL url = new URL(request.getURI().toString());\n String path = url.getFile();\n // RFC 2616, section 5.1.2:\n // Note that the absolute... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_312 | {
"fields": [
{
"declarator": "KEY_H = TimingKey.registerNewKey(\"test/h\", TimingImportance.HIGH)",
"modifier": "private static final",
"original_string": "private static final TimingKey KEY_H = TimingKey.registerNewKey(\"test/h\", TimingImportance.HIGH);",
"type": "TimingKey",
"var... | {
"body": "@Test(dataProvider = \"timingImportanceThreshold\")\n public void testBuilder(TimingImportance timingImportanceThreshold)\n {\n final RequestContext requestContext = new RequestContext();\n if (timingImportanceThreshold != null)\n {\n requestContext.putLocalAttr(TimingContextUtil.TIMING_IMP... | {
"fields": [
{
"declarator": "_callback",
"modifier": "private final",
"original_string": "private final Callback<T> _callback;",
"type": "Callback<T>",
"var_name": "_callback"
},
{
"declarator": "_requestContext",
"modifier": "private final",
"original_str... | {
"body": "@Override\n public void onSuccess(T result) {\n markTimings();\n _callback.onSuccess(result);\n }",
"class_method_signature": "TimingCallback.onSuccess(T result)",
"constructor": false,
"full_signature": "@Override public void onSuccess(T result)",
"identifier": "onSuccess",
"invocations"... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_257 | {
"fields": [
{
"declarator": "FS = File.separator",
"modifier": "private static final",
"original_string": "private static final String FS = File.separator;",
"type": "String",
"var_name": "FS"
}
],
"file": "data-avro/src/test/java/com/linkedin/data/avro/TestSchemaTranslator... | {
"body": "@Test(dataProvider = \"schemaWithNamespaceOverride\")\n public void testSchemaWithNamespaceOverride(String schemaText, String expected) throws IOException\n {\n DataToAvroSchemaTranslationOptions options = new DataToAvroSchemaTranslationOptions(JsonBuilder.Pretty.SPACES).setOverrideNamespace(true);\n ... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(SchemaTranslator.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(SchemaTranslator.class);",
"type": "Logger",
"var_name": "log"
},
{
"... | {
"body": "public static String dataToAvroSchemaJson(DataSchema dataSchema)\n {\n return dataToAvroSchemaJson(dataSchema, new DataToAvroSchemaTranslationOptions());\n }",
"class_method_signature": "SchemaTranslator.dataToAvroSchemaJson(DataSchema dataSchema)",
"constructor": false,
"full_signature": "publi... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_607 | {
"fields": [],
"file": "restli-common/src/test/java/com/linkedin/restli/common/util/TestProjectionMaskApplier.java",
"identifier": "TestProjectionMaskApplier",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBuildSchemaByProjectionNonexistentFields()\n {\n RecordDataSchema schema = (RecordDataSchema) DataTemplateUtil.getSchema(RecordTemplateWithPrimitiveKey.class);\n DataMap projectionMask = buildProjectionMaskDataMap(\"id\", \"nonexistentFieldFooBar\");\n\n try\n {\n ... | {
"fields": [
{
"declarator": "ARRAY_RANGE_PARAMS =\n new HashSet<>(Arrays.asList(FilterConstants.START, FilterConstants.COUNT))",
"modifier": "private static final",
"original_string": "private static final Set<String> ARRAY_RANGE_PARAMS =\n new HashSet<>(Arrays.asList(FilterConstants... | {
"body": "public static DataSchema buildSchemaByProjection(DataSchema schema, DataMap maskMap)\n {\n return buildSchemaByProjection(schema, maskMap, Collections.emptyList());\n }",
"class_method_signature": "ProjectionMaskApplier.buildSchemaByProjection(DataSchema schema, DataMap maskMap)",
"constructor": f... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_484 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/model/TestRestLiApiBuilder.java",
"identifier": "TestRestLiApiBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"misconfiguredServiceErrorData\")\n public void testMisconfiguredServiceErrors(Class<?> resourceClass, String expectedPartialMessage)\n {\n try\n {\n RestLiApiBuilder.buildResourceModels(Collections.singleton(resourceClass));\n Assert.fail(String.format(\"Expected %s... | {
"fields": [
{
"declarator": "_log = LoggerFactory.getLogger(RestLiApiBuilder.class)",
"modifier": "private final static",
"original_string": "private final static Logger _log = LoggerFactory.getLogger(RestLiApiBuilder.class);",
"type": "Logger",
"var_name": "_log"
},
{
... | {
"body": "public static Map<String, ResourceModel> buildResourceModels(final Set<Class<?>> restliAnnotatedClasses)\n {\n Map<String, ResourceModel> rootResourceModels = new HashMap<String, ResourceModel>();\n Map<Class<?>, ResourceModel> resourceModels = new HashMap<Class<?>, ResourceModel>();\n\n for (Cla... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_191 | {
"fields": [],
"file": "restli-tools/src/test/java/com/linkedin/restli/tools/data/TestPredicateExpressionParser.java",
"identifier": "TestPredicateExpressionParser",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testOr()\n {\n final Predicate parsed = PredicateExpressionParser.parse(\"com.linkedin.data.it.AlwaysTruePredicate | com.linkedin.data.it.AlwaysFalsePredicate\");\n Assert.assertEquals(parsed.getClass(), OrPredicate.class);\n\n final List<Predicate> children = ((OrPredicate) ... | {
"fields": [
{
"declarator": "TRIMMER_PATTERN = Pattern.compile(\"\\\\s\")",
"modifier": "private static final",
"original_string": "private static final Pattern TRIMMER_PATTERN = Pattern.compile(\"\\\\s\");",
"type": "Pattern",
"var_name": "TRIMMER_PATTERN"
},
{
"decl... | {
"body": "public static Predicate parse(String expression)\n {\n final Stack<Predicate> predicateStack = new Stack<Predicate>();\n final Stack<Character> operatorStack = new Stack<Character>();\n\n final String trimmedExpression = TRIMMER_PATTERN.matcher(expression).replaceAll(\"\");\n final StringToken... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_304 | {
"fields": [],
"file": "r2-core/src/test/java/com/linkedin/r2/util/TestLinkedDeque.java",
"identifier": "TestLinkedDeque",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testEmptyPollLast()\n {\n LinkedDeque<Object> q = new LinkedDeque<Object>();\n Assert.assertNull(q.pollLast(), \"pollLast on empty queue should return null\");\n }",
"class_method_signature": "TestLinkedDeque.testEmptyPollLast()",
"constructor": false,
"full_signature": "... | {
"fields": [
{
"declarator": "_head",
"modifier": "private",
"original_string": "private Node<T> _head;",
"type": "Node<T>",
"var_name": "_head"
},
{
"declarator": "_tail",
"modifier": "private",
"original_string": "private Node<T> _tail;",
"type": "N... | {
"body": "@Override\n public T pollLast()\n {\n if (_tail == null)\n {\n return null;\n }\n return removeNode(_tail);\n }",
"class_method_signature": "LinkedDeque.pollLast()",
"constructor": false,
"full_signature": "@Override public T pollLast()",
"identifier": "pollLast",
"invocations... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_611 | {
"fields": [],
"file": "restli-common/src/test/java/com/linkedin/restli/common/TestComplexResourceKey.java",
"identifier": "TestComplexResourceKey",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMakeReadOnly()\n {\n DataMap keyDataMap = new DataMap();\n keyDataMap.put(\"key\", \"key-value\");\n EmptyRecord key = new EmptyRecord(keyDataMap);\n\n DataMap paramsDataMap = new DataMap();\n paramsDataMap.put(\"params\", \"params-value\");\n EmptyRecord params ... | {
"fields": [
{
"declarator": "key",
"modifier": "protected final",
"original_string": "protected final K key;",
"type": "K",
"var_name": "key"
},
{
"declarator": "params",
"modifier": "protected final",
"original_string": "protected final P ... | {
"body": "public void makeReadOnly()\n {\n key.data().makeReadOnly();\n\n if (params != null)\n {\n params.data().makeReadOnly();\n }\n }",
"class_method_signature": "ComplexResourceKey.makeReadOnly()",
"constructor": false,
"full_signature": "public void makeReadOnly()",
"identifier": "ma... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_241 | {
"fields": [
{
"declarator": "FS = File.separator",
"modifier": "private final",
"original_string": "private final String FS = File.separator;",
"type": "String",
"var_name": "FS"
},
{
"declarator": "testDir = System.getProperty(\"testDir\", new File(\"src/test\").getA... | {
"body": "@Test(dataProvider = \"fileMapTestData\")\n public void testCreateMapFromFiles(String inputDir, Map<String, String> expectedFileMap)\n {\n PegasusSchemaSnapshotCompatibilityChecker checker = new PegasusSchemaSnapshotCompatibilityChecker();\n Map<String,String> actualResult = checker.createMapFromFi... | {
"fields": [
{
"declarator": "_options = new Options()",
"modifier": "private static final",
"original_string": "private static final Options _options = new Options();",
"type": "Options",
"var_name": "_options"
},
{
"declarator": "_logger = LoggerFactory.getLogger(\n ... | {
"body": "static Map<String, String> createMapFromFiles(String snapshotFileDir)\n {\n try (Stream<Path> paths = Files.walk(Paths.get(snapshotFileDir)))\n {\n return paths\n .filter(path -> path.toString().endsWith(PDL))\n .map(path -> path.toFile())\n .collect(Collectors.toMap(... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_168 | {
"fields": [
{
"declarator": "DISRUPT_SOURCE_KEY = \"R2_DISRUPT_SOURCE\"",
"modifier": "public static final",
"original_string": "public static final String DISRUPT_SOURCE_KEY = \"R2_DISRUPT_SOURCE\";",
"type": "String",
"var_name": "DISRUPT_SOURCE_KEY"
},
{
"declarato... | {
"body": "@Test\n public void testSendRequest10()\n {\n when(_builder.build()).thenReturn(_request);\n when(_controller.getDisruptContext(any(String.class), any(ResourceMethod.class))).thenReturn(_disrupt);\n _client.sendRequest(_builder, _behavior);\n verify(_underlying, times(1)).sendRequest(eq(_requ... | {
"fields": [
{
"declarator": "_client",
"modifier": "private final",
"original_string": "private final Client _client;",
"type": "Client",
"var_name": "_client"
},
{
"declarator": "_controller",
"modifier": "private final",
"original_string": "private final... | {
"body": "@Override\n public <T> ResponseFuture<T> sendRequest(Request<T> request, RequestContext requestContext)\n {\n doEvaluateDisruptContext(request, requestContext);\n return _client.sendRequest(request, requestContext);\n }",
"class_method_signature": "DisruptRestClient.sendRequest(Request<T> reques... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.