id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
6944525_634
{ "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 = IOException.class)\n public void testByteStringToDataMapWithInvalidContentType() throws MimeTypeParseException, IOException\n {\n DataMap dataMap = createTestDataMap();\n ByteString byteString = ByteString.copy(JACKSON_DATA_CODEC.mapToBytes(dataMap));\n bytesToDataMap(...
{ "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 DataMap bytesToDataMap(Map<String, String> headers, ByteString bytes) throws MimeTypeParseException, IOException\n {\n return getContentType(headers).getCodec().readMap(bytes);\n }", "class_method_signature": "DataMapConverter.bytesToDataMap(Map<String, String> headers, ByteString byte...
{ "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_264
{ "fields": [ { "declarator": "out = new PrintStream(new FileOutputStream(FileDescriptor.out))", "modifier": "public static final", "original_string": "public static final PrintStream out = new PrintStream(new FileOutputStream(FileDescriptor.out));", "type": "PrintStream", "var_name"...
{ "body": "@Test\n public void testMissingDefaultFieldsOnDataMap() throws IOException\n {\n final String SCHEMA =\n \"{\" +\n \" \\\"type\\\":\\\"record\\\",\" +\n \" \\\"name\\\":\\\"Foo\\\",\" +\n \" \\\"fields\\\":[\" +\n \" {\" +\n \" ...
{ "fields": [ { "declarator": "_dataTranslationOptions", "modifier": "protected", "original_string": "protected DataTranslationOptions _dataTranslationOptions;", "type": "DataTranslationOptions", "var_name": "_dataTranslationOptions" }, { "declarator": "_genericData = G...
{ "body": "public static GenericRecord dataMapToGenericRecord(DataMap map, RecordDataSchema dataSchema) throws DataTranslationException\n {\n Schema avroSchema = SchemaTranslator.dataToAvroSchema(dataSchema);\n return dataMapToGenericRecord(map, dataSchema, avroSchema, null);\n }", "class_method_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_376
{ "fields": [], "file": "d2/src/test/java/com/linkedin/d2/balancer/util/LoadBalancerUtilTest.java", "identifier": "LoadBalancerUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testFindOriginalThrowable()\n {\n ConnectException connectException = new ConnectException(\"Foo\");\n RemoteInvocationException e = new RemoteInvocationException(\"Failed to get connect to a server\", connectException);\n Throwable throwable = LoadBalancerUtil.findOriginalTh...
{ "fields": [ { "declarator": "DOT_PATTERN = Pattern.compile(Pattern.quote(\".\"))", "modifier": "private static final", "original_string": "private static final Pattern DOT_PATTERN = Pattern.compile(Pattern.quote(\".\"));", "type": "Pattern", "var_name": "DOT_PATTERN" } ], "...
{ "body": "public static Throwable findOriginalThrowable(Throwable throwable)\n {\n //just to make sure we don't go to infinite loop. Most exception is less than 100 level deep.\n int depth = 0;\n Throwable original = throwable;\n while (original.getCause() != null && depth < 100)\n {\n original ...
{ "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_233
{ "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\n public void testExportSnapshot() throws Exception\n {\n String[] expectedFiles = new String[]\n {\n \"BirthInfo.pdl\",\n \"FullName.pdl\",\n \"Date.pdl\"\n };\n String inputDir = pegasusDir + \"com/linkedin/restli/tools/pegasusSchemaSnapshotTe...
{ "fields": [ { "declarator": "PDL = \".pdl\"", "modifier": "private static final", "original_string": "private static final String PDL = \".pdl\";", "type": "String", "var_name": "PDL" }, { "declarator": "PDSC = \".pdsc\"", "modifier": "private static final", ...
{ "body": "public void export(String resolverPath, String inputPath, File outputDir) throws IOException\n {\n List<DataSchema> dataSchemas = parseDataSchema(resolverPath, inputPath);\n for (DataSchema dataSchema : dataSchemas)\n {\n writeSnapshotFile(outputDir, ((NamedDataSchema) dataSchema).getFullNam...
{ "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_663
{ "fields": [], "file": "restli-common/src/test/java/com/linkedin/restli/internal/common/TestQueryParamsDataMap.java", "identifier": "TestQueryParamsDataMap", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testNumericKeyNames() throws Exception {\n String testQS = \"ids.1=1&ids.2=2&ids.3=3\";\n\n DataMap queryParamDataMap = queryParamsDataMap(testQS);\n Object idsObj = queryParamDataMap.get(\"ids\");\n Assert.assertTrue(idsObj instanceof DataMap);\n DataMap ids = (DataMap)...
{ "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_399
{ "fields": [], "file": "d2/src/test/java/com/linkedin/d2/balancer/properties/UriPropertiesTest.java", "identifier": "UriPropertiesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testUriProperties()\n {\n URI uri1 = URI.create(\"http://google.com\");\n URI uri2 = URI.create(\"http://linkedin.com\");\n URI uri3 = URI.create(\"https://linkedin.com\");\n\n Map<Integer, PartitionData> map1 = new HashMap<Integer, PartitionData>();\n map1.put(0, new P...
{ "fields": [ { "declarator": "_clusterName", "modifier": "private final", "original_string": "private final String _clusterName;", "type": "String", "var_name": "_clusterName" }, { "declarator": "_urisBySchemeAndPartition", "modifier"...
{ "body": "public UriProperties(String clusterName, Map<URI, Map<Integer, PartitionData>> partitionDescriptions)\n {\n this(clusterName, partitionDescriptions, Collections.<URI, Map<String, Object>>emptyMap());\n }", "class_method_signature": "UriProperties.UriProperties(String clusterName, Map<URI, Map<Intege...
{ "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_419
{ "fields": [], "file": "d2/src/test/java/com/linkedin/d2/balancer/clients/RequestTimeoutClientTest.java", "identifier": "RequestTimeoutClientTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(groups = {\"small\"}, dataProvider = \"allCombinations3x\")\n @SuppressWarnings(\"deprecation\")\n public void testRequestTimeoutAllowed(boolean isHigherThanDefault, boolean ignoreTimeoutIfHigher, int expectedTimeout) throws Exception\n {\n LoadBalancerSimulator.ClockedExecutor clockedExecutor ...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(RequestTimeoutClient.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(RequestTimeoutClient.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": "RequestTimeoutClient.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_360
{ "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 testUniversalStickiness() throws ServiceUnavailableException, URISyntaxException\n {\n int partitionCount = 4;\n int totalHostCount = 200;\n\n HashRingProvider ringProvider = createStaticHashRingProvider(totalHostCount, partitionCount, getHashFunction(true));\n HashFunctio...
{ "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_38
{ "fields": [], "file": "data/src/test/java/com/linkedin/data/collections/TestCowUtil.java", "identifier": "TestCowUtil", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEmptyList()\n {\n final CowList<String> list = CowUtil.emptyList();\n Assert.assertTrue(list.isEmpty());\n Assert.assertTrue(list.isReadOnly());\n\n try\n {\n mutateCollection(list);\n Assert.fail(\"Should have thrown UnsupportedOperationException\");\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 <V> CowList<V> emptyList()\n {\n return (CowList<V>) EMPTY_LIST;\n }", "class_method_signature": "CowUtil.emptyList()", "constructor": false, "full_signature": "@SuppressWarnings(\"unchecked\") public static CowList<V> emptyList()", "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_675
{ "fields": [], "file": "restli-common/src/test/java/com/linkedin/restli/internal/common/TestURIDecoderUtils.java", "identifier": "TestURIDecoderUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test(dataProvider = \"validConsecutiveOctetData\")\n public void testDecodeValidConsecutiveOctets(String encoded, int startIndex, String expected, int expectedCharsConsumed)\n {\n StringBuilder result = new StringBuilder();\n int numCharsConsumed = URIDecoderUtils.decodeConsecutiveOctets(result, e...
{ "fields": [ { "declarator": "HEX_TABLE = createHexTable()", "modifier": "private static final", "original_string": "private static final byte[] HEX_TABLE = createHexTable();", "type": "byte[]", "var_name": "HEX_TABLE" } ], "file": "restli-common/src/main/java/com/linkedin/r...
{ "body": "public static int decodeConsecutiveOctets(StringBuilder dest, String s, int start)\n {\n final int n = s.length();\n\n if (start >= n)\n {\n throw new IllegalArgumentException(\"Cannot decode from index \" + start + \" of a length-\" + n + \" string\");\n }\n\n if (s.charAt(start) != '...
{ "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_225
{ "fields": [], "file": "restli-tools/src/test/java/com/linkedin/restli/tools/data/TestPredicateExpressionParser.java", "identifier": "TestPredicateExpressionParser", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = RuntimeException.class)\n public void testTwoLeftInStack()\n {\n PredicateExpressionParser.parse(\"(com.linkedin.data.it.AlwaysTruePredicate & com.linkedin.data.it.AlwaysFalsePredicate)(com.linkedin.data.it.AlwaysFalsePredicate & com.linkedin.data.it.AlwaysTruePredicate)\");...
{ "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_80
{ "fields": [], "file": "data/src/test/java/com/linkedin/data/schema/grammar/TestPdlParseUtils.java", "identifier": "TestPdlParseUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testJoin()\n {\n PdlParser.IdentifierContext a = new PdlParser.IdentifierContext(null, 0);\n a.value = \"a\";\n PdlParser.IdentifierContext b = new PdlParser.IdentifierContext(null, 0);\n b.value = \"b\";\n\n assertEquals(PdlParseUtils.join(Arrays.asList(a, b)), \"a.b...
{ "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 join(List<PdlParser.IdentifierContext> identifiers)\n {\n StringBuilder stringBuilder = new StringBuilder();\n Iterator<PdlParser.IdentifierContext> iter = identifiers.iterator();\n while (iter.hasNext())\n {\n stringBuilder.append(iter.next().value);\n if (iter....
{ "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_337
{ "fields": [ { "declarator": "_provider", "modifier": "private", "original_string": "private SharedZkConnectionProvider _provider;", "type": "SharedZkConnectionProvider", "var_name": "_provider" }, { "declarator": "_zkServer", "modifier": "private", "origin...
{ "body": "@Test(groups = \"needZk\")\n public void testAnnouncerNoStartup() throws Exception {\n List<URI> hosts = prepareHostNames(5, \"testAnnouncerNoStartup\");\n List<ZooKeeperConnectionManager> connectionManagers = prepareConnectionManagers(hosts);\n List<ZooKeeperConnectionManager> managersToStart = ...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(SharedZkConnectionProvider.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(SharedZkConnectionProvider.class);", "type": "Logger", "var_name": "LOG" ...
{ "body": "public int getZkConnectionCount() {\n synchronized (_sharedConnections) {\n return _sharedConnections.size();\n }\n }", "class_method_signature": "SharedZkConnectionProvider.getZkConnectionCount()", "constructor": false, "full_signature": "public int getZkConnectionCount()", "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_272
{ "fields": [], "file": "gradle-plugins/src/test/java/com/linkedin/pegasus/gradle/TestIOUtil.java", "identifier": "TestIOUtil", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void writesTextOnNonExistentFile() throws IOException\n {\n Path tempDirectory = Files.createTempDirectory(getClass().getSimpleName());\n File f = tempDirectory.resolve(\"foo/bar/baz.txt\").toFile();\n\n f.delete();\n f.getParentFile().delete();\n\n assertFalse(f.exists());\...
{ "fields": [], "file": "gradle-plugins/src/main/java/com/linkedin/pegasus/gradle/IOUtil.java", "identifier": "IOUtil", "interfaces": "", "methods": [ { "class_method_signature": "IOUtil.writeText(File target, String text)", "constructor": false, "full_signature": "public static void wri...
{ "body": "public static void writeText(File target, String text) {\n target.getParentFile().mkdirs();\n GFileUtils.writeFile(text, target);\n }", "class_method_signature": "IOUtil.writeText(File target, String text)", "constructor": false, "full_signature": "public static void writeText(File target, Str...
{ "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_622
{ "fields": [], "file": "restli-common/src/test/java/com/linkedin/restli/internal/common/TestHeaderUtil.java", "identifier": "TestHeaderUtil", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRemoveHeaders()\n {\n Map<String, String> headers = new HashMap<String, String>();\n headers.put(\"X-header1\", \"header1Value\");\n headers.put(\"X-header2\", \"header2Value\");\n headers.put(\"X-header3\", \"header3Value\");\n List<String> headersToRemove = Arrays...
{ "fields": [ { "declarator": "NONINHERITABLE_REQUEST_HEADERS = Arrays.asList(\"content-length\")", "modifier": "public final static", "original_string": "public final static List<String> NONINHERITABLE_REQUEST_HEADERS = Arrays.asList(\"content-length\");", "type": "List<String>", "v...
{ "body": "public static Map<String, String> removeHeaders(Map<String, String> headers, Collection<String> headerNames)\n {\n if (headers == null || headerNames == null || headerNames.isEmpty())\n {\n return headers;\n }\n Set<String> headersToRemove = new TreeSet<String>(String.CASE_INSENSITIVE_OR...
{ "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_573
{ "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 testSyncNullObject404(final RestOrStream restOrStream) throws Exception\n {\n final StatusCollectionResource statusResource = getMockResource(StatusCollectionResource.class);\n EasyMock.expect(statusResource.get(eq(1L))).andReturn(null).once();\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_123
{ "fields": [], "file": "restli-client/src/test/java/com/linkedin/restli/internal/client/TestQueryParamsUtil.java", "identifier": "TestQueryParamsUtil", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testConvertToDataMap()\n {\n Map<String, Object> queryParams = new HashMap<>();\n\n Map<String, Object> hashMapParam = new HashMap<>();\n hashMapParam.put(\"someField\", \"someValue\");\n hashMapParam.put(\"foo\", \"bar\");\n hashMapParam.put(\"notifications\", Immutabl...
{ "fields": [], "file": "restli-client/src/main/java/com/linkedin/restli/internal/client/QueryParamsUtil.java", "identifier": "QueryParamsUtil", "interfaces": "", "methods": [ { "class_method_signature": "QueryParamsUtil.convertToDataMap(Map<String, Object> queryParams)", "constructor": false,...
{ "body": "public static DataMap convertToDataMap(Map<String, Object> queryParams)\n {\n return convertToDataMap(queryParams, Collections.<String, Class<?>>emptyMap(),\n AllProtocolVersions.RESTLI_PROTOCOL_1_0_0.getProtocolVersion(),\n RestLiProjectionDataMapSerializer.DEFAULT_SERIALIZER);\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_436
{ "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 testGetTargetHostNotFound()\n {\n URI newUri = URI.create(\"new_uri\");\n KeyMapper.TargetHostHints.setRequestContextTargetHost(_requestContext, newUri);\n\n TrackerClient trackerClient = _clientSelector.getTrackerClient(_request, _requestContext, DEFAULT_RING, DEFAULT_TRACKE...
{ "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_4
{ "fields": [], "file": "data-transform/src/test/java/com/linkedin/data/transform/TestProjectionUtil.java", "identifier": "TestProjectionUtil", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEmptyFilter()\n {\n final MaskTree filter = new MaskTree();\n\n Assert.assertFalse(ProjectionUtil.isPathPresent(filter, new PathSpec(\"foo\")));\n }", "class_method_signature": "TestProjectionUtil.testEmptyFilter()", "constructor": false, "full_signature": "@Test publ...
{ "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_17
{ "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 testRestLatencyDisrupt() throws Exception\n {\n final RequestContext requestContext = new RequestContext();\n requestContext.putLocalAttr(DISRUPT_CONTEXT_KEY, DisruptContexts.delay(REQUEST_LATENCY));\n\n final DisruptFilter filter = new DisruptFilter(_scheduler, _executor, RE...
{ "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 onRestRequest(RestRequest req,\n RequestContext requestContext,\n Map<String, String> wireAttrs,\n NextFilter<RestRequest, RestResponse> nextFilter)\n {\n disruptRequest(req, requestContext, wireAttrs, nextFilter);\n }", "class_method_signature": "DisruptFilte...
{ "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_174
{ "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 testRestLiResponseFuture(SendRequestOption sendRequestOption,\n GetResponseOption getResponseOption,\n ...
{ "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_524
{ "fields": [], "file": "restli-server/src/test/java/com/linkedin/restli/internal/server/response/TestRestLiResponseEnvelope.java", "identifier": "TestRestLiResponseEnvelope", "interfaces": "", "superclass": "" }
{ "body": "@Test(dataProvider = \"provideDynamicallyDeterminedResponseTypeData\")\n public void testEnvelopeDynamicallyDeterminedResponseType(RestLiResponseEnvelope responseEnvelope, ResponseType expectedResponseType)\n {\n Assert.assertEquals(responseEnvelope.getResponseType(), expectedResponseType);\n }", "...
{ "fields": [ { "declarator": "_status", "modifier": "private", "original_string": "private HttpStatus _status;", "type": "HttpStatus", "var_name": "_status" }, { "declarator": "_exception", "modifier": "private", "original_string": "private RestLiServiceExc...
{ "body": "public abstract ResponseType getResponseType();", "class_method_signature": "RestLiResponseEnvelope.getResponseType()", "constructor": false, "full_signature": "public abstract ResponseType getResponseType()", "identifier": "getResponseType", "invocations": [], "modifiers": "public abstract", ...
{ "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_461
{ "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 testPickBestEncodingWithNoMimeTypes()\n {\n Assert.assertNotEquals(RestUtils.pickBestEncoding(null, Collections.emptySet()), EMPTY_TYPE);\n }", "class_method_signature": "TestRestUtils.testPickBestEncodingWithNoMimeTypes()", "constructor": false, "full_signature": "@Test pub...
{ "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_318
{ "fields": [ { "declarator": "ACCEPT_COMPRESSIONS = \"gzip, deflate, bzip2, snappy, x-snappy-framed\"", "modifier": "private static final", "original_string": "private static final String ACCEPT_COMPRESSIONS = \"gzip, deflate, bzip2, snappy, x-snappy-framed\";", "type": "String", "v...
{ "body": "@Test(dataProvider = \"headersData\")\n public void testResponseCompressionRules(String acceptEncoding, int compressionThreshold, EncodingType expectedContentEncoding)\n throws CompressionException, URISyntaxException\n {\n ServerCompressionFilter serverCompressionFilter = new ServerCompressionFi...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ServerCompressionFilter.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(ServerCompressionFilter.class);", "type": "Logger", "var_name": "LOG" },...
{ "body": "@Override\n public void onRestResponse(RestResponse res, RequestContext requestContext,\n Map<String, String> wireAttrs,\n NextFilter<RestRequest, RestResponse> nextFilter)\n {\n try\n {\n if (res.getEntity().length() > 0)\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_40
{ "fields": [], "file": "data/src/test/java/com/linkedin/data/collections/TestCheckedUtil.java", "identifier": "TestCheckedUtil", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = AssertionError.class)\n public void testPutCycleWithAssertChecking()\n {\n final DataMap map = new DataMap();\n CheckedUtil.putWithoutChecking(map, \"cycle\", map);\n }", "class_method_signature": "TestCheckedUtil.testPutCycleWithAssertChecking()", "constructor": fal...
{ "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> V putWithoutChecking(CheckedMap<K, V> map, K key, V value)\n {\n return map.putWithAssertedChecking(key, value);\n }", "class_method_signature": "CheckedUtil.putWithoutChecking(CheckedMap<K, V> map, K key, V value)", "constructor": false, "full_signature": "public static V 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_532
{ "fields": [ { "declarator": "BUILDERS = new HashMap<>()", "modifier": "private static final", "original_string": "private static final Map<ResourceMethod, CollectionResponseBuilder<?>> BUILDERS = new HashMap<>();", "type": "Map<ResourceMethod, CollectionResponseBuilder<?>>", "var_n...
{ "body": "@Test\n @SuppressWarnings(\"unchecked\")\n public <D extends RestLiResponseData<? extends CollectionResponseEnvelope>> void testProjectionInBuildRestliResponseData() throws URISyntaxException {\n\n for (Map.Entry<ResourceMethod, CollectionResponseBuilder<?>> entry: BUILDERS.entrySet())\n {\n R...
{ "fields": [], "file": "restli-server/src/main/java/com/linkedin/restli/internal/server/response/CollectionResponseBuilder.java", "identifier": "CollectionResponseBuilder", "interfaces": "implements RestLiResponseBuilder<D>", "methods": [ { "class_method_signature": "CollectionResponseBuilder.build...
{ "body": "@Override\n public D buildRestLiResponseData(Request request,\n RoutingResult routingResult,\n Object object,\n Map<String, String> headers,\n List<HttpCookie> cookies)\n {\n if (object instanceof List)\n {\n @SuppressWarnings({\"unchecked\"})\n /** constrained by {@li...
{ "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_162
{ "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 testSendRequest4()\n {\n when(_controller.getDisruptContext(any(String.class), any(ResourceMethod.class))).thenReturn(_disrupt);\n _client.sendRequest(_request, _behavior);\n verify(_underlying, times(1)).sendRequest(eq(_request), any(RequestContext.class), eq(_behavior));\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_498
{ "fields": [], "file": "restli-server/src/test/java/com/linkedin/restli/internal/server/methods/arguments/TestArgumentBuilder.java", "identifier": "TestArgumentBuilder", "interfaces": "", "superclass": "" }
{ "body": "@Test\n @SuppressWarnings(\"deprecation\")\n public void testPagingContextParamType()\n {\n String testParamKey = \"testParam\";\n\n ServerResourceContext mockResourceContext = EasyMock.createMock(ServerResourceContext.class);\n PagingContext pagingContext = new PagingContext(RestConstants.DEFA...
{ "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_477
{ "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(expectedExceptions = IllegalArgumentException.class)\n public void testFailFast()\n {\n RecordBar bar = new RecordBar();\n bar.setLocation(\"mountain view\");\n bar.data().put(\"SF\", \"CA\");\n\n RestUtils.trimRecordTemplate(bar, true);\n }", "class_method_signature": "TestRestUtils...
{ "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_56
{ "fields": [], "file": "data/src/test/java/com/linkedin/data/it/TestRemover.java", "identifier": "TestRemover", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRemoveByPredicateWithPostOrder() throws Exception\n {\n SimpleTestData data = IteratorTestData.createSimpleTestData();\n \n SimpleDataElement el = data.getDataElement();\n Builder.create(el.getValue(), el.getSchema(), IterationOrder.POST_ORDER)\n .filterBy(Predicate...
{ "fields": [], "file": "data/src/main/java/com/linkedin/data/it/Remover.java", "identifier": "Remover", "interfaces": "", "methods": [ { "class_method_signature": "Remover.remove(Object root, DataIterator it)", "constructor": false, "full_signature": "public static Object remove(Object ...
{ "body": "public static Object remove(Object root, DataIterator it)\n {\n DataElement element;\n\n // construct the list of Data objects to remove\n // don't remove in place because iterator behavior with removals while iterating is undefined\n ArrayList<ToRemove> removeList = new ArrayList<ToRemove>();...
{ "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_135
{ "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 testMixed() 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 onSuccess(RestResponse restResponse)\n {\n Response<MultiplexedResponseContent> response;\n try\n {\n response = _decoder.decodeResponse(restResponse);\n }\n catch (RestLiDecodingException e)\n {\n onError(e);\n return;\n }\n // individual ca...
{ "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_565
{ "fields": [], "file": "restli-server/src/test/java/com/linkedin/restli/server/TestRestLiServiceException.java", "identifier": "TestRestLiServiceException", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testNullStatus()\n {\n final RestLiServiceException restLiServiceException = new RestLiServiceException((HttpStatus) null);\n Assert.assertTrue(restLiServiceException.toString().contains(\"[HTTP Status:null]\"));\n }", "class_method_signature": "TestRestLiServiceException.tes...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "_status", "modifier": "private fina...
{ "body": "@Override\n public String toString()\n {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getName());\n sb.append(\" [HTTP Status:\").append(_status == null ? \"null\" : _status.getCode());\n\n if (_serviceErrorCode != null)\n {\n sb.append(\", serviceErrorCode:\").app...
{ "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_420
{ "fields": [ { "declarator": "DARK_CLUSTER_KEY = \"foobar1dark\"", "modifier": "private static", "original_string": "private static String DARK_CLUSTER_KEY = \"foobar1dark\";", "type": "String", "var_name": "DARK_CLUSTER_KEY" } ], "file": "d2/src/test/java/com/linkedin/d2/ba...
{ "body": "@Test\n public void testBadStrategies()\n {\n Map<String, Object> props = new HashMap<>();\n List<String> myStrategyList = new ArrayList<>();\n myStrategyList.add(\"RELATIVE_TRAFFIC\");\n myStrategyList.add(\"BLAH_BLAH\");\n\n Map<String, Object> darkClusterMap = new HashMap<>();\n dark...
{ "fields": [], "file": "d2/src/main/java/com/linkedin/d2/balancer/config/DarkClustersConverter.java", "identifier": "DarkClustersConverter", "interfaces": "", "methods": [ { "class_method_signature": "DarkClustersConverter.toProperties(DarkClusterConfigMap config)", "constructor": false, ...
{ "body": "public static DarkClusterConfigMap toConfig(Map<String, Object> properties)\n {\n DarkClusterConfigMap configMap = new DarkClusterConfigMap();\n for (Map.Entry<String, Object> entry : properties.entrySet())\n {\n String darkClusterName = entry.getKey();\n DarkClusterConfig darkClusterCo...
{ "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_359
{ "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 testErrorHandling() throws ServiceUnavailableException, URISyntaxException\n {\n int partitionCount = 10;\n int totalHostCount = 100;\n\n HashRingProvider ringProvider = createStaticHashRingProvider(totalHostCount, partitionCount, getHashFunction(true));\n PartitionInfoPro...
{ "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_637
{ "fields": [], "file": "restli-common/src/test/java/com/linkedin/restli/internal/common/TestURIElementParser.java", "identifier": "TestURIElementParser", "interfaces": "", "superclass": "" }
{ "body": "@Test(dataProvider = \"basicDecodable\")\n public void testBasicDecoding(String decodable, Object expectedObj) throws PathSegment.PathSegmentSyntaxException\n {\n Object actualObj = URIElementParser.parse(decodable);\n Assert.assertEquals(actualObj, expectedObj);\n }", "class_method_signature": ...
{ "fields": [], "file": "restli-common/src/main/java/com/linkedin/restli/internal/common/URIElementParser.java", "identifier": "URIElementParser", "interfaces": "", "methods": [ { "class_method_signature": "URIElementParser.parse(String element)", "constructor": false, "full_signature": ...
{ "body": "public static Object parse(String element) throws PathSegment.PathSegmentSyntaxException\n {\n Queue<Token> tokens = tokenizeElement(element);\n Object result = parseElement(tokens);\n\n if (!tokens.isEmpty())\n {\n throw new PathSegment.PathSegmentSyntaxException(\"tokens left over after...
{ "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_267
{ "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 testAdapterHigherPriorityThanChooserProperty()\n {\n System.setProperty(ADAPTER_PROPERTY, TestAvroAdapter.class.getName());\n System.setProperty(CHOOSER_PROPERTY, \"xx\");\n AvroAdapter avroAdapter = AvroAdapterFinder.avroAdapter();\n assertEquals(avroAdapter.getClass(), T...
{ "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_288
{ "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 testGetClientRequestFinalizerManager()\n {\n Assert.assertNull(RequestContextUtil.getClientRequestFinalizerManager(_requestContext));\n\n _requestContext.putLocalAttr(R2Constants.CLIENT_REQUEST_FINALIZER_MANAGER_REQUEST_CONTEXT_KEY,\n new RequestFinalizerManagerImpl(null,...
{ "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": "public static RequestFinalizerManager getClientRequestFinalizerManager(RequestContext requestContext)\n {\n return getObjectWithKey(R2Constants.CLIENT_REQUEST_FINALIZER_MANAGER_REQUEST_CONTEXT_KEY,\n requestContext, RequestFinalizerManager.class);\n }", "class_method_signature": "RequestConte...
{ "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_322
{ "fields": [ { "declarator": "_log = LoggerFactory.getLogger(TestD2Config.class)", "modifier": "private static final", "original_string": "private static final Logger _log = LoggerFactory.getLogger(TestD2Config.class);", "type": "Logger", "var_name": "_log" }, { "decla...
{ "body": "@Test\n public static void testClusterNameWithRouting() throws Exception\n {\n String clusterNameWithRouting;\n\n clusterNameWithRouting = D2Config.clusterNameWithRouting(\"clusterName\",\n \"destinationColo\",\n ...
{ "fields": [ { "declarator": "_log = LoggerFactory.getLogger(D2Config.class)", "modifier": "private static final", "original_string": "private static final Logger _log = LoggerFactory.getLogger(D2Config.class);", "type": "Logger", "var_name": "_log" }, { "declarator": ...
{ "body": "protected static String clusterNameWithRouting(final String clusterName,\n final String destinationColo,\n final String defaultColo,\n final String masterColo,\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_95
{ "fields": [], "file": "data/src/test/java/com/linkedin/data/schema/TestSchemaToJsonEncoder.java", "identifier": "TestSchemaToJsonEncoder", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEncodeWithPreserve() throws IOException {\n SchemaParser parser = new SchemaParser();\n String commonSchemaJson =\n \"{ \\\"type\\\": \\\"record\\\", \\\"name\\\": \\\"ReferencedFieldType\\\", \\\"namespace\\\": \\\"com.linkedin.common\\\", \\\"fields\\\" : []}\";\n ...
{ "fields": [ { "declarator": "_builder", "modifier": "protected final", "original_string": "protected final JsonBuilder _builder;", "type": "JsonBuilder", "var_name": "_builder" }, { "declarator": "_currentNamespace = \"\"", "modifier": "protected", "origin...
{ "body": "public void encode(DataSchema schema) throws IOException\n {\n encode(schema, true);\n }", "class_method_signature": "SchemaToJsonEncoder.encode(DataSchema schema)", "constructor": false, "full_signature": "public void encode(DataSchema schema)", "identifier": "encode", "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_549
{ "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 testHandleTooManySequentialRequests(MultiplexerRunMode multiplexerRunMode) throws Exception\n {\n // MultiplexedRequestHandlerImpl is created with the request limit set to 2\n MultiplexedRequestHandlerImpl multiplexer = createMultipl...
{ "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_119
{ "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 testSchemaFilesInExtensionPathInFolder(String[] files, String[] expectedExtensions) throws Exception\n {\n String pegasusWithFS = pegasusDir + FS;\n String resolverPath = pegasusWithFS + \"extensionSchemas/extensions:\"\n +...
{ "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_230
{ "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 testGenerateName()\n {\n List<String> symbols = Collections.unmodifiableList(Arrays.asList(\"Haha\", \"Hehe\"));\n String name = SYMBOL_TABLE_NAME_HANDLER.generateName(symbols);\n Assert.assertEquals(name, \"https://Host:100/service|Prefix-\" + symbols.hashCode());\n }", "...
{ "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 generateName(List<String> symbols)\n {\n return _serverNodeUri + SERVER_NODE_URI_PREFIX_TABLENAME_SEPARATOR + _symbolTablePrefix\n + PREFIX_HASH_SEPARATOR + symbols.hashCode();\n }", "class_method_signature": "SymbolTableNameHandler.generateName(List<String> symbols)", "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_660
{ "fields": [], "file": "restli-common/src/test/java/com/linkedin/restli/internal/common/TestQueryParamsDataMap.java", "identifier": "TestQueryParamsDataMap", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testParseDataMapKeys() throws Exception {\n String testQS = \"ids[0].params.versionTag=tag1&ids[0].params.authToken=tok1&ids[0].memberID=1&ids[0].groupID=2&\" +\n \"ids[1].params.versionTag=tag2&ids[1].params.authToken=tok2&ids[1].memberID=2&ids[1].groupID=2&\" +\...
{ "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": "public static DataMap parseDataMapKeys(Map<String, List<String>> queryParameters) throws PathSegmentSyntaxException\n {\n // The parameters are parsed into an intermediary structure comprised of\n // HashMap<String,Object> and HashMap<Integer,Object>, defined respectively\n // as MapMap and ListM...
{ "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_375
{ "fields": [], "file": "d2/src/test/java/com/linkedin/d2/balancer/util/TestD2URIRewriter.java", "identifier": "TestD2URIRewriter", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSimpleD2Rewrite() throws URISyntaxException\n {\n final URI httpURI = new URIBuilder(\"http://www.linkedin.com:1234/test\").build();\n final URI d2URI = new URIBuilder(\"d2://serviceName/request/query?q=5678\").build();\n final String expectURL = \"http://www.linkedin.com...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(D2URIRewriter.class)", "modifier": "final private static", "original_string": "final private static Logger LOGGER = LoggerFactory.getLogger(D2URIRewriter.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "@Override\n public URI rewriteURI(URI d2Uri)\n {\n String path = d2Uri.getRawPath();\n\n UriBuilder builder = UriBuilder.fromUri(_httpURI);\n if (path != null)\n {\n builder.path(path);\n }\n builder.replaceQuery(d2Uri.getRawQuery());\n builder.fragment(d2Uri.getRawFragment());\...
{ "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_676
{ "fields": [], "file": "restli-common/src/test/java/com/linkedin/restli/internal/common/TestURIDecoderUtils.java", "identifier": "TestURIDecoderUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test(dataProvider = \"invalidConsecutiveOctetData\")\n public void testDecodeInvalidConsecutiveOctets(String encoded, int startIndex, String expectedErrorMessage)\n {\n IllegalArgumentException exception = null;\n\n try\n {\n URIDecoderUtils.decodeConsecutiveOctets(new StringBuilder(), enc...
{ "fields": [ { "declarator": "HEX_TABLE = createHexTable()", "modifier": "private static final", "original_string": "private static final byte[] HEX_TABLE = createHexTable();", "type": "byte[]", "var_name": "HEX_TABLE" } ], "file": "restli-common/src/main/java/com/linkedin/r...
{ "body": "public static int decodeConsecutiveOctets(StringBuilder dest, String s, int start)\n {\n final int n = s.length();\n\n if (start >= n)\n {\n throw new IllegalArgumentException(\"Cannot decode from index \" + start + \" of a length-\" + n + \" string\");\n }\n\n if (s.charAt(start) != '...
{ "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_226
{ "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 testGetResponseSymbolTableBeforeInit()\n {\n Assert.assertNull(_provider.getResponseSymbolTable(URI.create(\"https://Host:100/service/symbolTable\"), Collections.emptyMap()));\n }", "class_method_signature": "TestRestLiSymbolTableProvider.testGetResponseSymbolTableBeforeInit()",...
{ "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 getResponseSymbolTable(URI requestUri, Map<String, String> requestHeaders)\n {\n return _defaultResponseSymbolTable;\n }", "class_method_signature": "RestLiSymbolTableProvider.getResponseSymbolTable(URI requestUri, Map<String, String> requestHeaders)", "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_363
{ "fields": [], "file": "d2/src/test/java/com/linkedin/d2/balancer/util/hashing/DistributionNonDiscreteRingTest.java", "identifier": "DistributionNonDiscreteRingTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testLoadBalancingCapacity() throws Exception {\n Map<URI, Integer> pointsMap = new HashMap<>();\n Map<URI, Integer> countsMap = new HashMap<>();\n\n List<URI> goodHosts = addHostsToPointMap(10, 100, pointsMap);\n List<URI> averageHosts = addHostsToPointMap(10, 80, pointsMap...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(DistributionNonDiscreteRing.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(DistributionNonDiscreteRing.class);", "type": "Logger", "var_name": "LOG...
{ "body": "@Override\n public T get(int unused)\n {\n if (_cumulativePointsMap.isEmpty())\n {\n LOG.warn(\"Calling get on an empty ring, null value will be returned\");\n return null;\n }\n int rand = ThreadLocalRandom.current().nextInt(_totalPoints);\n return _cumulativePointsMap.higherEnt...
{ "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_508
{ "fields": [], "file": "restli-server/src/test/java/com/linkedin/restli/internal/server/methods/arguments/TestArgumentBuilder.java", "identifier": "TestArgumentBuilder", "interfaces": "", "superclass": "" }
{ "body": "@Test(dataProvider = \"validateQueryParameter\")\n public void testQueryParameterValidation(String paramKey, Class<?> dataType,\n Object paramValue,\n boolean isValid,\n String err...
{ "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_158
{ "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 testShutdown()\n {\n _client.shutdown(Callbacks.empty());\n verify(_underlying, times(1)).shutdown(any(Callback.class));\n }", "class_method_signature": "TestDisruptRestClient.testShutdown()", "constructor": false, "full_signature": "@Test public void testShutdown()", "...
{ "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 void shutdown(Callback<None> callback)\n {\n _client.shutdown(callback);\n }", "class_method_signature": "DisruptRestClient.shutdown(Callback<None> callback)", "constructor": false, "full_signature": "@Override public void shutdown(Callback<None> callback)", "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_271
{ "fields": [], "file": "gradle-plugins/src/test/java/com/linkedin/pegasus/gradle/TestClasspathManifest.java", "identifier": "TestClasspathManifest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCreatesClasspath()\n {\n //setup\n File dir = new File(\"/tmp/foo\");\n File subdir = new File(dir, \"sub\");\n subdir.mkdirs();\n File f1 = new File(dir, \"foo.jar\"); //different directory\n File f2 = new File(subdir, \"bar.jar\");\n File f3 = new File(su...
{ "fields": [], "file": "gradle-plugins/src/main/java/com/linkedin/pegasus/gradle/ClasspathManifest.java", "identifier": "ClasspathManifest", "interfaces": "", "methods": [ { "class_method_signature": "ClasspathManifest.relativeClasspathManifest(File relativePathRoot, Iterable<File> files)", "...
{ "body": "static String relativeClasspathManifest(File relativePathRoot, Iterable<File> files) {\n StringBuilder sb = new StringBuilder();\n files.forEach(f -> sb.append(relativePathRoot.toPath().relativize(f.toPath())).append(\" \"));\n return sb.toString().trim();\n }", "class_method_signature": "Class...
{ "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_621
{ "fields": [], "file": "restli-common/src/test/java/com/linkedin/restli/internal/common/TestHeaderUtil.java", "identifier": "TestHeaderUtil", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testMergeHeader()\n {\n Map<String, String> headers1 = new HashMap<String, String>();\n Map<String, String> headers2 = new HashMap<String, String>();\n headers1.put(\"X-header1\", \"header1Value\");\n headers1.put(\"X-commonheader\", \"commonHeader1Value\");\n headers2....
{ "fields": [ { "declarator": "NONINHERITABLE_REQUEST_HEADERS = Arrays.asList(\"content-length\")", "modifier": "public final static", "original_string": "public final static List<String> NONINHERITABLE_REQUEST_HEADERS = Arrays.asList(\"content-length\");", "type": "List<String>", "v...
{ "body": "public static Map<String, String> mergeHeaders(Map<String, String> headers1, Map<String, String> headers2)\n {\n TreeMap<String, String> combinedHeaders = new TreeMap<String, String>(String.CASE_INSENSITIVE_ORDER);\n if (headers2 != null)\n {\n combinedHeaders.putAll(headers2);\n }\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_83
{ "fields": [], "file": "data/src/test/java/com/linkedin/data/schema/grammar/TestPdlSchemaParser.java", "identifier": "TestPdlSchemaParser", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testUnionDataSchemaWithoutAliases()\n {\n List<String> membersInDeclaredOrder = new ArrayList<>(Arrays.asList(\"null\", \"int\",\n \"com.linkedin.data.schema.grammar.AuxRecord\", \"com.linkedin.data.schema.grammar.Organization\", \"array\", \"map\",\n \"com.linkedin.d...
{ "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_334
{ "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 testSymlinkWithChildrenWatch() throws InterruptedException\n {\n final CountDownLatch latch = new CountDownLatch(1);\n final CountDownLatch latch2 = new CountDownLatch(1);\n final AsyncCallback.ChildrenCallback childrenCallback = new AsyncCallback.ChildrenCallback()\n {\n ...
{ "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_343
{ "fields": [], "file": "d2/src/test/java/com/linkedin/d2/discovery/event/PropertyEventBusRequestsThrottlerTest.java", "identifier": "PropertyEventBusRequestsThrottlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(timeOut = 10000)\n public void testThrottlingUnlimitedRequests() throws InterruptedException, ExecutionException, TimeoutException\n {\n TestSubscriber testSubscriber = new TestSubscriber();\n TestEventBus testZkEventBus = new TestEventBus(testSubscriber, 50);\n\n final int nRequests = 100...
{ "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_656
{ "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 testExtractionWithTemplateVariables()\n {\n final String[] components1 = URIParamUtils.extractPathComponentsFromUriTemplate(\"foo\");\n Assert.assertEquals(components1.length, 1);\n Assert.assertEquals(components1[0], \"foo\");\n\n final String[] components2 = URIParamUtil...
{ "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_206
{ "fields": [], "file": "restli-tools/src/test/java/com/linkedin/restli/tools/data/TestPredicateExpressionParser.java", "identifier": "TestPredicateExpressionParser", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDoubleNotParen()\n {\n final Predicate parsed = PredicateExpressionParser.parse(\"(!(!(com.linkedin.data.it.AlwaysTruePredicate)))\");\n Assert.assertEquals(parsed.getClass(), NotPredicate.class);\n\n final Predicate intermediate1 = ((NotPredicate) parsed).getChildPredica...
{ "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_8
{ "fields": [], "file": "data-transform/src/test/java/com/linkedin/data/transform/TestProjectionUtil.java", "identifier": "TestProjectionUtil", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testPositiveMultiPaths()\n {\n final MaskTree filter = new MaskTree();\n filter.addOperation(new PathSpec(\"foo\", \"bar\", \"baz\"), MaskOperation.POSITIVE_MASK_OP);\n\n final Collection<PathSpec> positivePaths = new HashSet<PathSpec>(Arrays.asList(\n new PathSpec(\"foo...
{ "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_590
{ "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 testNewSSLProperties() 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[]{ \...
{ "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_314
{ "fields": [ { "declarator": "WRITABLE_STACKTRACE_DISABLED = false", "modifier": "private static final", "original_string": "private static final boolean WRITABLE_STACKTRACE_DISABLED = false;", "type": "boolean", "var_name": "WRITABLE_STACKTRACE_DISABLED" } ], "file": "r2-co...
{ "body": "@Test\n public void testWritableStacktraceDisabled()\n {\n Throwable throwable = new Exception(\"Inner exception message\");\n StreamResponse resposne = new StreamResponseBuilder().build(EntityStreams.emptyStream());\n StreamException exception = new StreamException(resposne, \"Outer exception m...
{ "fields": [ { "declarator": "serialVersionUID = 1", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "_response", "modifier": "private fina...
{ "body": "public StreamResponse getResponse()\n {\n return _response;\n }", "class_method_signature": "StreamException.getResponse()", "constructor": false, "full_signature": "public StreamResponse getResponse()", "identifier": "getResponse", "invocations": [], "modifiers": "public", "parameters":...
{ "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_251
{ "fields": [ { "declarator": "_debug = false", "modifier": "private", "original_string": "private boolean _debug = false;", "type": "boolean", "var_name": "_debug" }, { "declarator": "_testDir", "modifier": "private", "original_string": "private File _testD...
{ "body": "@Test(dataProvider = \"toAvroSchemaData\")\n public void testFileNameAsArgs(Map<String, String> testSchemas, Map<String, String> expectedAvroSchemas, List<String> paths, boolean override) throws IOException\n {\n Map<File, Map.Entry<String,String>> files = TestUtil.createSchemaFiles(_testDir, testSch...
{ "fields": [ { "declarator": "GENERATOR_AVRO_TRANSLATE_OPTIONAL_DEFAULT = \"generator.avro.optional.default\"", "modifier": "public static final", "original_string": "public static final String GENERATOR_AVRO_TRANSLATE_OPTIONAL_DEFAULT = \"generator.avro.optional.default\";", "type": "Str...
{ "body": "public static void run(String resolverPath,\n String optionalDefault,\n String typeRefPropertiesExcludeList,\n boolean overrideNamespace,\n String targetDirectoryPath,\n String[] sources)...
{ "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_601
{ "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 testStreamToHttp2HeadersPseudoHeaders() throws Exception\n {\n StreamRequestBuilder streamRequestBuilder = new StreamRequestBuilder(new URI(ANY_URI));\n StreamRequest request = streamRequestBuilder.build(\n EntityStreams.newEntityStream(new ByteStringWriter(ByteString.cop...
{ "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_528
{ "fields": [], "file": "restli-server/src/test/java/com/linkedin/restli/internal/server/response/TestCreateResponseBuilder.java", "identifier": "TestCreateResponseBuilder", "interfaces": "", "superclass": "" }
{ "body": "@Test(dataProvider = \"returnEntityData\")\n public void testReturnEntityInBuildRestLiResponseData(CreateResponse createResponse, boolean isReturnEntityRequested, boolean expectEntityReturned) throws URISyntaxException\n {\n ServerResourceContext mockContext = EasyMock.createMock(ServerResourceContext...
{ "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_178
{ "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": "@Test(dataProvider = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + \"sendRequestOptions\")\n public void testRestLiRemoteInvocationException(SendRequestOption option,\n TimeoutOption timeoutOption,\n ProtocolVer...
{ "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_482
{ "fields": [], "file": "restli-server/src/test/java/com/linkedin/restli/internal/server/model/TestRestLiApiBuilder.java", "identifier": "TestRestLiApiBuilder", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testProcessResource()\n {\n Set<Class<?>> set = new HashSet<>();\n set.add(ParentResource.class);\n set.add(TestResource.class);\n Map<String, ResourceModel> models = RestLiApiBuilder.buildResourceModels(set);\n\n ResourceModel parentResource = models.get(\"/ParentResou...
{ "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_197
{ "fields": [], "file": "restli-tools/src/test/java/com/linkedin/restli/tools/data/TestPredicateExpressionParser.java", "identifier": "TestPredicateExpressionParser", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testOrAndOr()\n {\n final Predicate parsed = PredicateExpressionParser.parse(\"com.linkedin.data.it.AlwaysTruePredicate | com.linkedin.data.it.AlwaysFalsePredicate & com.linkedin.data.it.AlwaysTruePredicate | com.linkedin.data.it.AlwaysFalsePredicate\");\n Assert.assertEquals(pa...
{ "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_302
{ "fields": [], "file": "r2-core/src/test/java/com/linkedin/r2/util/TestLinkedDeque.java", "identifier": "TestLinkedDeque", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testPeekLast()\n {\n List<Integer> control = new ArrayList<Integer>(Arrays.asList(1, 2, 3));\n LinkedDeque<Integer> q = new LinkedDeque<Integer>(control);\n\n Assert.assertEquals(q.peekLast(), control.get(control.size() - 1));\n Assert.assertEquals(q, control);\n }", "c...
{ "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 peekLast()\n {\n if (_tail == null)\n {\n return null;\n }\n return _tail._value;\n }", "class_method_signature": "LinkedDeque.peekLast()", "constructor": false, "full_signature": "@Override public T peekLast()", "identifier": "peekLast", "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_617
{ "fields": [], "file": "restli-common/src/test/java/com/linkedin/restli/common/TestIdEntityResponse.java", "identifier": "TestIdEntityResponse", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEquals()\n {\n IdEntityResponse<Long, AnyRecord> longIdEntityResponse1 = new IdEntityResponse<Long, AnyRecord>(1L, new AnyRecord());\n IdEntityResponse<Long, AnyRecord> longIdEntityResponse2 = new IdEntityResponse<Long, AnyRecord>(1L, new AnyRecord());\n IdEntityResponse<...
{ "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 boolean equals(Object obj)\n {\n if (obj instanceof IdEntityResponse)\n {\n IdEntityResponse<?, ?> that = (IdEntityResponse<?, ?>) obj;\n return super.equals(that) &&\n (this._entity == null ? that._entity == null : this._entity.equals(that._entity));\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_247
{ "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 = \"arrayDuplicateDataProvider\")\n public void testGeneration(RestliVersion version, String ABuildersName, String BBuildersName) throws Exception\n {\n final String pegasusDir = moduleDir + FS + RESOURCES_DIR + FS + \"pegasus\";\n final String outPath = outdir.getPath();\n Re...
{ "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_494
{ "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 testBuildArgsHappyPath()\n {\n //test integer association key integer\n String param1Key = \"param1\";\n Parameter<Integer> param1 = new Parameter<>(param1Key, Integer.class, DataTemplateUtil.getSchema(Integer.class),\n false, null, Pa...
{ "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_181
{ "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 testSiblingCastException()\n {\n MapUtil.getWithDefault(_subjectMap, \"siblingMap\", _probeMap);\n }", "class_method_signature": "TestMapUtil.testSiblingCastException()", "constructor": false, "full_signature": "@Test(expe...
{ "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_355
{ "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 testMapUrisStickyRoutingOnly() throws ServiceUnavailableException, PartitionAccessException\n {\n int partitionCount = 1;\n int requestPerPartition = 1000;\n int totalHostCount = 100;\n\n HashRingProvider ringProvider = createStaticHashRingProvider(totalHostCount, 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_210
{ "fields": [], "file": "restli-tools/src/test/java/com/linkedin/restli/tools/data/TestPredicateExpressionParser.java", "identifier": "TestPredicateExpressionParser", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testOrParenAnd()\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.class);\n...
{ "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_640
{ "fields": [], "file": "restli-common/src/test/java/com/linkedin/restli/internal/common/TestURIElementParser.java", "identifier": "TestURIElementParser", "interfaces": "", "superclass": "" }
{ "body": "@Test(dataProvider = \"undecodables\")\n public void testUndecodable(String undecoable, String expectedErrorMessage)\n {\n try\n {\n URIElementParser.parse(undecoable);\n Assert.fail();\n }\n catch (PathSegment.PathSegmentSyntaxException e)\n {\n Assert.assertEquals(e.getMes...
{ "fields": [], "file": "restli-common/src/main/java/com/linkedin/restli/internal/common/URIElementParser.java", "identifier": "URIElementParser", "interfaces": "", "methods": [ { "class_method_signature": "URIElementParser.parse(String element)", "constructor": false, "full_signature": ...
{ "body": "public static Object parse(String element) throws PathSegment.PathSegmentSyntaxException\n {\n Queue<Token> tokens = tokenizeElement(element);\n Object result = parseElement(tokens);\n\n if (!tokens.isEmpty())\n {\n throw new PathSegment.PathSegmentSyntaxException(\"tokens left over after...
{ "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_569
{ "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": "@SuppressWarnings({\"unchecked\"})\n @Test(dataProvider = \"restOrStream\")\n public void testAsyncServer(final RestOrStream restOrStream) throws Exception\n {\n final AsyncStatusCollectionResource statusResource = getMockResource(AsyncStatusCollectionResource.class);\n\n statusResource.get(eq(1L)...
{ "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_139
{ "fields": [], "file": "restli-client/src/test/java/com/linkedin/restli/client/TestRestLiResponseException.java", "identifier": "TestRestLiResponseException", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetErrorDetailsRecord()\n {\n RestLiResponseException restLiResponseException;\n\n // No error detail data\n restLiResponseException = new RestLiResponseException(new ErrorResponse()\n .setStatus(500));\n Assert.assertNull(restLiResponseException.getErrorDetails...
{ "fields": [ { "declarator": "serialVersionUID = 1", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "_status", "modifier": "private final"...
{ "body": "@SuppressWarnings({\"unchecked\", \"ConstantConditions\"})\n public <T extends RecordTemplate> T getErrorDetailsRecord()\n {\n if (_errorResponse.hasErrorDetails() && _errorResponse.hasErrorDetailType())\n {\n String type = _errorResponse.getErrorDetailType();\n try\n {\n Clas...
{ "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_586
{ "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 testMultipartRelatedRequestNoUserAttachments() throws Exception\n {\n //This test verifies the server's ability to handle a multipart related request that has only one part which is\n //the rest.li payload; meaning there are no user defined attachments. Technically the client bu...
{ "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_76
{ "fields": [], "file": "data/src/test/java/com/linkedin/data/schema/grammar/TestPdlParseUtils.java", "identifier": "TestPdlParseUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testUnescapeDocstring()\n {\n String extracted = PdlParseUtils.extractMarkdown(\n \" /**\\n\" +\n \" * &lt;div&gt;Some html&lt;/div&gt;\\n\" +\n \" * &#47;&#42; A comment &#42;&#47;\\n\" +\n \" */\\n\");\n assertEquals(extracted,\n \"<di...
{ "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": "private static String unescapeDocstring(String escaped)\n {\n // unescape \"/*\" and \"*/\"\n String commentUnescaped = escaped.replace(\"&#47;&#42;\", \"/*\").replace(\"&#42;&#47;\", \"*/\");\n return StringEscapeUtils.unescapeHtml4(commentUnescaped);\n }", "class_method_signature": "PdlParse...
{ "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_99
{ "fields": [], "file": "data/src/test/java/com/linkedin/data/template/TestDataObjectToObjectCache.java", "identifier": "TestDataObjectToObjectCache", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testKeyNotFound()\n {\n DataObjectToObjectCache<DataTemplate<?>> testCache = new DataObjectToObjectCache<DataTemplate<?>>();\n\n Assert.assertNull(testCache.get(new Object()));\n Assert.assertNull(testCache.get(new DataMap()));\n Assert.assertNull(testCache.get(new DataLis...
{ "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": "V get(Object dataObject)\n {\n return _cache.get(new DataObjectKey(dataObject));\n }", "class_method_signature": "DataObjectToObjectCache.get(Object dataObject)", "constructor": false, "full_signature": " V get(Object dataObject)", "identifier": "get", "invocations": [ "get" ], "modi...
{ "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_284
{ "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 testGetObjectWithKeySuperclass()\n {\n final ArrayList<String> value = new ArrayList<>();\n _requestContext.putLocalAttr(KEY, value);\n\n Assert.assertEquals(RequestContextUtil.getObjectWithKey(KEY, _requestContext, List.class), value);\n }", "class_method_signature": "Tes...
{ "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_457
{ "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 = \"sampleValidAcceptHeaders\")\n public void testParseAcceptTypes(String header, List<String> supportedTypes)\n {\n Assert.assertEquals(MIMEParse.parseAcceptType(header), supportedTypes);\n }", "class_method_signature": "TestMIMEParse.testParseAcceptTypes(String header, List<Str...
{ "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 List<String> parseAcceptType(final String header)\n {\n List<String> acceptTypes = new LinkedList<String>();\n for (String acceptType : StringUtils.split(header, ','))\n {\n final ParseResults parseResults = parseMimeType(acceptType);\n acceptTypes.add(parseResults.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_512
{ "fields": [], "file": "restli-server/src/test/java/com/linkedin/restli/internal/server/response/TestBatchGetResponseBuilder.java", "identifier": "TestBatchGetResponseBuilder", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testContextErrors()\n {\n BatchGetResponseBuilder builder = new BatchGetResponseBuilder(new ErrorResponseBuilder());\n ServerResourceContext context = EasyMock.createMock(ServerResourceContext.class);\n Map<Object, RestLiServiceException> errors = new HashMap<>();\n RestLi...
{ "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_142
{ "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(expectedExceptions = {IllegalArgumentException.class})\n public void testUnsupportedRequestScatter()\n {\n Request<?> request = mock(Request.class);\n when(request.getMethod()).thenReturn(ResourceMethod.BATCH_CREATE);\n _sgStrategy.scatterRequest(request, new RequestContext(), new URIMappi...
{ "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": "@Deprecated\n @Override\n public <K, T> List<RequestInfo> scatterRequest(Request<T> request, RequestContext requestContext,\n Map<URI, Set<K>> mappedKeys)\n {\n return defaultScatterRequestImpl(request, requestContext, mappedKeys);\n }", "class_metho...
{ "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_396
{ "fields": [], "file": "d2/src/test/java/com/linkedin/d2/balancer/properties/ClientServiceConfigValidatorTest.java", "identifier": "ClientServiceConfigValidatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testInvalidHttpRequestTimeout()\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, Object>();...
{ "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_21
{ "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 testRestErrorDisrupt() throws Exception\n {\n final RequestContext requestContext = new RequestContext();\n requestContext.putLocalAttr(DISRUPT_CONTEXT_KEY, DisruptContexts.error(REQUEST_LATENCY));\n\n final DisruptFilter filter = new DisruptFilter(_scheduler, _executor, REQU...
{ "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 onRestRequest(RestRequest req,\n RequestContext requestContext,\n Map<String, String> wireAttrs,\n NextFilter<RestRequest, RestResponse> nextFilter)\n {\n disruptRequest(req, requestContext, wireAttrs, nextFilter);\n }", "class_method_signature": "DisruptFilte...
{ "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_379
{ "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 testShutdown() throws URISyntaxException,\n InterruptedException\n {\n reset();\n\n URI uri = URI.create(\"http://cluster-1/test\");\n TestListener listener = new TestListener();\n List<String> schemes = new ArrayList<String>();\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 shutdown(final PropertyEventShutdownCallback shutdown)\n {\n trace(_log, \"shutdown\");\n\n // shutdown all three registries, all tracker clients, and the event thread\n _executor.execute(new PropertyEvent(\"shutdown load balancer state\")\n {\n @Override\n 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_683
{ "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 testResourceDelete()\n {\n final Long id = createPhoto();\n\n // validate response status code\n final UpdateResponse uResp = _res.delete(id);\n Assert.assertEquals(uResp.getStatus(), HttpStatus.S_204_NO_CONTENT);\n }", "class_method_signature": "TestPhotoResource.testR...
{ "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 UpdateResponse delete(Long key)\n {\n final boolean isRemoved = (_db.getData().remove(key) != null);\n\n // Remove this photo from all albums to maintain referential integrity.\n AlbumEntryResource.purge(_entryDb, null, key);\n\n return new UpdateResponse(isRemoved ? HttpSt...
{ "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_400
{ "fields": [], "file": "d2/src/test/java/com/linkedin/d2/balancer/servers/AnnouncerHostPrefixGeneratorTest.java", "identifier": "AnnouncerHostPrefixGeneratorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(dataProvider = \"prefixGeneratorDataProvider\")\n public void testAnnouncerHostPrefixGenerator(String hostName, String expectedPrefix)\n {\n AnnouncerHostPrefixGenerator prefixGenerator = new AnnouncerHostPrefixGenerator(hostName);\n String actualPrefix = prefixGenerator.generatePrefix();\n ...
{ "fields": [ { "declarator": "_hostName", "modifier": "private final", "original_string": "private final String _hostName;", "type": "String", "var_name": "_hostName" } ], "file": "d2/src/main/java/com/linkedin/d2/balancer/servers/AnnouncerHostPrefixGenerator.java", "ident...
{ "body": "public AnnouncerHostPrefixGenerator(String hostName)\n {\n if (hostName == null)\n {\n _hostName = null;\n }\n else\n {\n // Since just want to use the machine name for pre-fix and not the entire FQDN to reduce the size of name\n int machineNameEndIndex = hostName.indexOf('.'...
{ "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_115
{ "fields": [ { "declarator": "INPUT_SCHEMA_NAME = \"testSchema\"", "modifier": "private static final", "original_string": "private static final String INPUT_SCHEMA_NAME = \"testSchema\";", "type": "String", "var_name": "INPUT_SCHEMA_NAME" }, { "declarator": "CUSTOM_TYP...
{ "body": "@Test(dataProvider = \"customTypeDataForRecord\")\n public void testCustomInfoForRecordFields(final List<DataSchema> customTypedSchemas)\n {\n final List<RecordDataSchema.Field> fields = customTypedSchemas.stream()\n .map(RecordDataSchema.Field::new)\n .peek(field -> field.setName(\"fiel...
{ "fields": [ { "declarator": "_log = LoggerFactory.getLogger(TemplateSpecGenerator.class)", "modifier": "private static final", "original_string": "private static final Logger _log = LoggerFactory.getLogger(TemplateSpecGenerator.class);", "type": "Logger", "var_name": "_log" }, ...
{ "body": "public ClassTemplateSpec generate(DataSchema schema, DataSchemaLocation location)\n {\n pushCurrentLocation(location);\n final ClassTemplateSpec result = processSchema(schema, null, null);\n popCurrentLocation();\n return result;\n }", "class_method_signature": "TemplateSpecGenerator.genera...
{ "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_545
{ "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 testHandleWrongMethod(MultiplexerRunMode multiplexerRunMode) throws Exception\n {\n MultiplexedRequestHandlerImpl multiplexer = createMultiplexer(null, multiplexerRunMode);\n RestRequest request = muxRequestBuilder().setMethod(HttpMe...
{ "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_37
{ "fields": [], "file": "data/src/test/java/com/linkedin/data/collections/TestCowUtil.java", "identifier": "TestCowUtil", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEmptySet()\n {\n final CowSet<String> set = CowUtil.emptySet();\n Assert.assertTrue(set.isEmpty());\n Assert.assertTrue(set.isReadOnly());\n\n try\n {\n mutateCollection(set);\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> CowSet<K> emptySet()\n {\n return (CowSet<K>) EMPTY_SET;\n }", "class_method_signature": "CowUtil.emptySet()", "constructor": false, "full_signature": "@SuppressWarnings(\"unchecked\") public static CowSet<K> emptySet()", "identifier": "emp...
{ "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_380
{ "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 testListenToService() throws InterruptedException\n {\n reset();\n\n assertFalse(_state.isListeningToService(\"service-1\"));\n assertNull(_state.getServiceProperties(\"service-1\"));\n\n final CountDownLatch latch = new CountDownLatch...
{ "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 listenToService(final String serviceName,\n final LoadBalancerStateListenerCallback callback)\n {\n trace(_log, \"listenToService: \", serviceName);\n\n _serviceSubscriber.ensureListening(serviceName, callback);\n }", "class_method_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_416
{ "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 testStatsConsumerRemoveOne(boolean isD2Async) throws Exception\n {\n AtomicReference<ServiceProperties> serviceProperties = new AtomicReference<>();\n TestBackupRequestsStrategyStatsConsumer statsConsumer = new TestBackupRequestsStrategyStatsConsume...
{ "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_553
{ "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 testRequestHeaderWhiteListing(MultiplexerRunMode multiplexerRunMode) throws Exception\n {\n // Validating request header white listing logic\n\n // Create a mockHandler. Make it return different cookies based on the request\n Syn...
{ "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_103
{ "fields": [], "file": "data/src/test/java/com/linkedin/util/TestFastByteArrayOutputStream.java", "identifier": "TestFastByteArrayOutputStream", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testToByteArray()\n {\n FastByteArrayOutputStream testStream = new FastByteArrayOutputStream();\n byte[] inputArray = new byte[] {0b1, 0b1, 0b1, 0b1, 0b1, 0b1, 0b1, 0b1};\n testStream.write(inputArray, 0, inputArray.length);\n\n byte[] safeArray1 = testStream.toByteArray()...
{ "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": "public byte[] toByteArray()\n {\n if (this._bufferList.peekFirst() == null)\n {\n // Return an empty array if the output stream is empty\n return new byte[0];\n }\n else\n {\n int totalSize = size();\n byte[] targetBuffer = new byte[totalSize];\n int pos = 0;\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_60
{ "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 mapClonesHaveDifferentHashValues() throws CloneNotSupportedException\n {\n DataMap originalMap = new DataMap();\n originalMap.put(\"key\", \"value\");\n\n DataMap copyMap = originalMap.copy();\n\n // The objects should be \"equal,\" but not identical.\n assertTrue(copyM...
{ "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_292
{ "fields": [], "file": "r2-core/src/test/java/com/linkedin/r2/util/TestConfigValueExtractor.java", "identifier": "TestConfigValueExtractor", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testNullObject()\n {\n List<String> emptyList = ConfigValueExtractor.buildList(null, \",\");\n Assert.assertTrue(emptyList.isEmpty());\n }", "class_method_signature": "TestConfigValueExtractor.testNullObject()", "constructor": false, "full_signature": "@Test public void t...
{ "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_338
{ "fields": [ { "declarator": "_zkServer", "modifier": "protected", "original_string": "protected ZKServer _zkServer;", "type": "ZKServer", "var_name": "_zkServer" }, { "declarator": "PORT = 11721", "modifier": "protected static final", "original_string": "p...
{ "body": "@Test(timeOut = 10000, enabled = false)\n public void testLastSeenLifeCycle()\n throws InterruptedException, ExecutionException, TimeoutException, IOException, PropertyStoreException\n {\n createZKServer();\n // Fill the store with data\n File dataPath = ZKTestUtil.createTempDir(\"randomFil...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(LastSeenZKStore.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(LastSeenZKStore.class);", "type": "Logger", "var_name": "LOG" }, { "de...
{ "body": "@Override\n public void shutdown(Callback<None> shutdown)\n {\n MultiCallback multiCallback = new MultiCallback(shutdown, 2);\n _fsStore.shutdown(multiCallback);\n _zkAwareStore.shutdown(multiCallback);\n }", "class_method_signature": "LastSeenZKStore.shutdown(Callback<None> shutdown)", "co...
{ "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_441
{ "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 testSubstituteClientFromRing()\n {\n URI newUri = URI.create(\"new_uri\");\n @SuppressWarnings(\"unchecked\")\n Ring<URI> ring = Mockito.mock(Ring.class);\n Mockito.when(ring.get(anyInt())).thenReturn(newUri);\n List<URI> ringIteratierList = Arrays.asList(newUri, URI_1,...
{ "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_154
{ "fields": [], "file": "restli-client/src/test/java/com/linkedin/restli/client/TestRequest.java", "identifier": "TestRequest", "interfaces": "", "superclass": "" }
{ "body": "@Test(dataProvider = \"toRequestFieldsData\")\n public void testRequestFieldsEqual(List<PathSpec> pathSpecs1, List<PathSpec> pathSpecs2, Map<String,String> param1, Map<String,String> param2, boolean expect) {\n GetRequestBuilder<Long, TestRecord> builder1 = generateDummyRequestBuilder();\n GetReque...
{ "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_504
{ "fields": [], "file": "restli-server/src/test/java/com/linkedin/restli/internal/server/methods/arguments/TestArgumentBuilder.java", "identifier": "TestArgumentBuilder", "interfaces": "", "superclass": "" }
{ "body": "@Test\n @SuppressWarnings(\"deprecation\")\n public void testResourceContextParameterType()\n {\n String testParamKey = \"testParam\";\n\n ServerResourceContext mockResourceContext = EasyMock.createMock(ServerResourceContext.class);\n\n List<Parameter<?>> parameters = new ArrayList<>();\n Pa...
{ "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...