id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
6944525_193
{ "fields": [], "file": "restli-tools/src/test/java/com/linkedin/restli/tools/data/TestPredicateExpressionParser.java", "identifier": "TestPredicateExpressionParser", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testOrOr()\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(), OrPredicate.class);\n\n fin...
{ "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_486
{ "fields": [], "file": "restli-server/src/test/java/com/linkedin/restli/internal/server/model/TestRestLiApiBuilder.java", "identifier": "TestRestLiApiBuilder", "interfaces": "", "superclass": "" }
{ "body": "@Test(dataProvider = \"unsupportedFinderResourceTypeData\",\n expectedExceptions = ResourceConfigException.class,\n expectedExceptionsMessageRegExp = \"Class '.*' does not support @Finder methods, because it's an unstructured data resource\")\n public void testFinderUnsupportedResourceType(Class...
{ "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_255
{ "fields": [ { "declarator": "FS = File.separator", "modifier": "private static final", "original_string": "private static final String FS = File.separator;", "type": "String", "var_name": "FS" } ], "file": "data-avro/src/test/java/com/linkedin/data/avro/TestSchemaTranslator...
{ "body": "@Test(dataProvider = \"pegasusDefaultToAvroOptionalSchemaTranslationProvider\",\n description = \"Test schemaTranslator for default fields to optional fields translation, in different schema translation modes\")\n public void testPegasusDefaultToAvroOptionalSchemaTranslation(String... testSchemaTex...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(SchemaTranslator.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(SchemaTranslator.class);", "type": "Logger", "var_name": "log" }, { "...
{ "body": "public static String dataToAvroSchemaJson(DataSchema dataSchema)\n {\n return dataToAvroSchemaJson(dataSchema, new DataToAvroSchemaTranslationOptions());\n }", "class_method_signature": "SchemaTranslator.dataToAvroSchemaJson(DataSchema dataSchema)", "constructor": false, "full_signature": "publi...
{ "created": "11/30/2012 7:37:51 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 6944525, "size": null, "stargazer_count": null, "stars": 2005, "updates": "2020-01-26T06:06:48+00:00", "url": "https://github.com/linkedin/rest.l...
6944525_48
{ "fields": [ { "declarator": "plusTenTransform = new Transform<Object, Object>()\n {\n @Override\n public Object apply(Object element)\n {\n Integer val = (Integer)element;\n return val + 10;\n }\n }", "modifier": "private static", "origin...
{ "body": "@Test\n public void testReplaceByPredicateAtPath() throws Exception\n {\n SimpleTestData data = IteratorTestData.createSimpleTestData();\n \n Builder.create(data.getDataElement(), IterationOrder.PRE_ORDER)\n .filterBy(Predicates.and(Predicates.pathMatchesPathSpec(IteratorTestData.PATH_TO_ID),...
{ "fields": [], "file": "data/src/main/java/com/linkedin/data/it/Transformer.java", "identifier": "Transformer", "interfaces": "", "methods": [ { "class_method_signature": "Transformer.transform(Object root, DataIterator it, Transform<Object,Object> transform)", "constructor": false, "fu...
{ "body": "public static Object replace(Object root, DataIterator it, Object value)\n {\n return transform(root, it, Transforms.constantValue(value));\n }", "class_method_signature": "Transformer.replace(Object root, DataIterator it, Object value)", "constructor": false, "full_signature": "public static Ob...
{ "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_605
{ "fields": [], "file": "restli-common/src/test/java/com/linkedin/restli/common/TestCompoundKey.java", "identifier": "TestCompoundKey", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testToDataMap()\n {\n CompoundKey compoundKey = new CompoundKey();\n compoundKey.append(\"foo\", \"foo-value\");\n compoundKey.append(\"bar\", 1);\n compoundKey.append(\"baz\", 7L);\n\n DataMap dataMap = compoundKey.toDataMap();\n Assert.assertEquals(dataMap.get(\"fo...
{ "fields": [ { "declarator": "_keys", "modifier": "private final", "original_string": "private final Map<String, ValueAndTypeInfoPair> _keys;", "type": "Map<String, ValueAndTypeInfoPair>", "var_name": "_keys" }, { "declarator": "_isReadOnly", "modifier": "private...
{ "body": "public DataMap toDataMap()\n {\n DataMap dataMap = new DataMap(_keys.size());\n for (Map.Entry<String, ValueAndTypeInfoPair> keyParts : _keys.entrySet())\n {\n String key = keyParts.getKey();\n ValueAndTypeInfoPair valueAndTypeInfoPair = keyParts.getValue();\n Object value = valueA...
{ "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_310
{ "fields": [], "file": "r2-core/src/test/java/com/linkedin/r2/util/TestLinkedDeque.java", "identifier": "TestLinkedDeque", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDoubleRemoveFails()\n {\n LinkedDeque<Integer> q = new LinkedDeque<Integer>(Arrays.asList(1,2,3));\n Iterator<Integer> i = q.iterator();\n i.next();\n i.remove();\n try\n {\n i.remove();\n }\n catch (IllegalStateException e)\n {\n // Expected\n...
{ "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 Iterator<T> iterator()\n {\n return new LinkedQueueIterator(Direction.ASCENDING);\n }", "class_method_signature": "LinkedDeque.iterator()", "constructor": false, "full_signature": "@Override public Iterator<T> iterator()", "identifier": "iterator", "invocations": [], "m...
{ "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_594
{ "fields": [ { "declarator": "CIPHER_SUITE_WHITELIST = {\n \"TLS_RSA_WITH_AES_128_CBC_SHA256\",\n \"TLS_RSA_WITH_AES_128_GCM_SHA256\",\n \"TLS_RSA_WITH_AES_128_CBC_SHA\",\n \"SSL_RSA_WITH_NULL_MD5\",\n \"SSL_RSA_WITH_NULL_SHA\"\n }", "modifier": "private static final", ...
{ "body": "@Test\n public void testGetSslHandler() throws Exception\n {\n final SSLContext sslContext = SSLContext.getDefault();\n final SSLParameters sslParameters = sslContext.getDefaultSSLParameters();\n\n sslParameters.setCipherSuites(CIPHER_SUITE_WHITELIST);\n sslParameters.setEndpointIdentificatio...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(SslHandlerUtil.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(SslHandlerUtil.class);", "type": "Logger", "var_name": "LOG" }, { "decl...
{ "body": "public static SslHandler getSslHandler(SSLContext sslContext, SSLParameters sslParameters, boolean clientMode)\n {\n return getSslHandler(sslContext, sslParameters, clientMode, null, -1);\n }", "class_method_signature": "SslHandlerUtil.getSslHandler(SSLContext sslContext, SSLParameters sslParameters...
{ "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_652
{ "fields": [ { "declarator": "NO_ESCAPING = URLEscaper.Escaping.NO_ESCAPING", "modifier": "private static final", "original_string": "private static final URLEscaper.Escaping NO_ESCAPING = URLEscaper.Escaping.NO_ESCAPING;", "type": "URLEscaper.Escaping", "var_name": "NO_ESCAPING" ...
{ "body": "@Test(dataProvider = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + \"stringKey\")\n public void testStringKeyToString(ProtocolVersion version, String expected)\n {\n String stringKey = \"key\";\n String stringKeyString = URIParamUtils.keyToString(stringKey, NO_ESCAPING, null, true, version);\n Asse...
{ "fields": [ { "declarator": "_EMPTY_STRING_ARRAY = new String[0]", "modifier": "private static final", "original_string": "private static final String[] _EMPTY_STRING_ARRAY = new String[0];", "type": "String[]", "var_name": "_EMPTY_STRING_ARRAY" }, { "declarator": "NO...
{ "body": "public static String keyToString(Object key,\n URLEscaper.Escaping escaping,\n UriComponent.Type componentType,\n boolean full,\n ProtocolVersion version)\n {\n if (ve...
{ "created": "11/30/2012 7:37:51 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 6944525, "size": null, "stargazer_count": null, "stars": 2005, "updates": "2020-01-26T06:06:48+00:00", "url": "https://github.com/linkedin/rest.l...
6944525_202
{ "fields": [], "file": "restli-tools/src/test/java/com/linkedin/restli/tools/data/TestPredicateExpressionParser.java", "identifier": "TestPredicateExpressionParser", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testOrNot()\n {\n final Predicate parsed = PredicateExpressionParser.parse(\"com.linkedin.data.it.AlwaysTruePredicate | !com.linkedin.data.it.AlwaysFalsePredicate\");\n Assert.assertEquals(parsed.getClass(), OrPredicate.class);\n\n final List<Predicate> orChildren = ((OrPredi...
{ "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_347
{ "fields": [], "file": "d2/src/test/java/com/linkedin/d2/backuprequests/TestTrackingBackupRequestsStrategy.java", "identifier": "TestTrackingBackupRequestsStrategy", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetStats()\n {\n\n Distribution distribution = new Distribution();\n\n TrackingBackupRequestsStrategy trackingStrategy =\n new TrackingBackupRequestsStrategy(new MockBackupRequestsStrategy(() -> Optional.of(distribution.next()),\n () -> ThreadLocalRandom.cu...
{ "fields": [ { "declarator": "_delegate", "modifier": "private final", "original_string": "private final BackupRequestsStrategy _delegate;", "type": "BackupRequestsStrategy", "var_name": "_delegate" }, { "declarator": "_totalAllowedCount = new LongAdder()", "modi...
{ "body": "@Override\n public BackupRequestsStrategyStats getStats()\n {\n return getStats(_lastDelayStats.get());\n }", "class_method_signature": "TrackingBackupRequestsStrategy.getStats()", "constructor": false, "full_signature": "@Override public BackupRequestsStrategyStats getStats()", "identifier":...
{ "created": "11/30/2012 7:37:51 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 6944525, "size": null, "stargazer_count": null, "stars": 2005, "updates": "2020-01-26T06:06:48+00:00", "url": "https://github.com/linkedin/rest.l...
6944525_330
{ "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 testSymlinkGetData() throws InterruptedException\n {\n final CountDownLatch latch = new CountDownLatch(1);\n AsyncCallback.DataCallback callback = new AsyncCallback.DataCallback()\n {\n @Override\n public void processResult(int rc, String path, Object ctx, byte[] da...
{ "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 getData(final String path, final boolean watch, final AsyncCallback.DataCallback cb, final Object ctx)\n {\n if (!SymlinkUtil.containsSymlink(path))\n {\n _zk.getData(path, watch, cb, ctx);\n }\n else\n {\n SymlinkDataCallback compositeCallback = new Symli...
{ "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_87
{ "fields": [ { "declarator": "simpleTestSchema =\n \"record Test {\" +\n \" @customAnnotation = {\" +\n \" \\\"/f1/f2\\\": \\\"sth\\\"\" +\n \" }\" +\n \" f0: record A {\" +\n \" f1: A\" +\n \" f2: string\" +\n \" }\" +\n \" f1: union[int, array[st...
{ "body": "@Test\n public void testGetResolvedPropertiesByPath() throws Exception\n {\n RecordDataSchema testSchema = (RecordDataSchema) TestUtil.dataSchemaFromPdlString(simpleTestSchema);\n try\n {\n SchemaAnnotationProcessor.getResolvedPropertiesByPath(\"/f0/f3\", testSchema);\n }\n catch (Ill...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(SchemaAnnotationProcessor.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(SchemaAnnotationProcessor.class);", "type": "Logger", "var_name": "LOG" ...
{ "body": "public static Map<String, Object> getResolvedPropertiesByPath(String pathSpec, DataSchema dataSchema)\n {\n if (dataSchema == null)\n {\n throw new IllegalArgumentException(\"Invalid data schema input\");\n }\n\n if (pathSpec == null || (!pathSpec.isEmpty() && !PathSpec.validatePathSpecSt...
{ "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_275
{ "fields": [], "file": "gradle-plugins/src/test/java/com/linkedin/pegasus/gradle/TestPegasusPlugin.java", "identifier": "TestPegasusPlugin", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void test()\n {\n Project project = ProjectBuilder.builder().build();\n project.getPlugins().apply(PegasusPlugin.class);\n\n assertTrue(project.getPlugins().hasPlugin(JavaPlugin.class));\n\n // if any configuration is resolved in configuration phase, user script that tries to e...
{ "fields": [ { "declarator": "debug = false", "modifier": "public static", "original_string": "public static boolean debug = false;", "type": "boolean", "var_name": "debug" }, { "declarator": "DATA_TEMPLATE_GEN_TYPE = \"DataTemplate\"", "modifier": "private stati...
{ "body": "@Override\n public void apply(Project project)\n {\n project.getPlugins().apply(JavaPlugin.class);\n project.getPlugins().apply(IdeaPlugin.class);\n project.getPlugins().apply(EclipsePlugin.class);\n\n // this HashMap will have a PegasusOptions per sourceSet\n project.getExtensions().getEx...
{ "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_68
{ "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 testNoCyclesOnAddAndPut()\n {\n assertTrue(Data.objectIsAcyclic(true));\n assertTrue(Data.objectIsAcyclic(1));\n assertTrue(Data.objectIsAcyclic(1L));\n assertTrue(Data.objectIsAcyclic(1.0f));\n assertTrue(Data.objectIsAcyclic(1.0));\n assertTrue(Data.objectIsAcyclic...
{ "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 boolean objectIsAcyclic(Object object)\n {\n if (object == null)\n {\n return true;\n }\n\n Class<?> klass = object.getClass();\n if (isPrimitiveClass(klass))\n {\n return true;\n }\n else if (isComplexClass(klass))\n {\n DataComplex complex = (DataComplex)...
{ "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_625
{ "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\n public void testDataMapToJSONByteStringWithUnsupportedContentType() throws MimeTypeParseException, IOException\n {\n // unsupport content type should fallback to JSON\n DataMap testDataMap = createTestDataMap();\n byte[] expectedBytes = JACKSON_DATA_CODEC.mapToBytes(testDataMap);\n\n ...
{ "fields": [], "file": "restli-common/src/main/java/com/linkedin/restli/internal/common/DataMapConverter.java", "identifier": "DataMapConverter", "interfaces": "", "methods": [ { "class_method_signature": "DataMapConverter.dataMapToByteString(Map<String, String> headers, DataMap dataMap)", "c...
{ "body": "public static ByteString dataMapToByteString(Map<String, String> headers, DataMap dataMap) throws MimeTypeParseException, IOException\n {\n return ByteString.unsafeWrap(getContentType(headers).getCodec().mapToBytes(dataMap));\n }", "class_method_signature": "DataMapConverter.dataMapToByteString(Map<...
{ "created": "11/30/2012 7:37:51 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 6944525, "size": null, "stargazer_count": null, "stars": 2005, "updates": "2020-01-26T06:06:48+00:00", "url": "https://github.com/linkedin/rest.l...
6944525_449
{ "fields": [], "file": "restli-server/src/test/java/com/linkedin/restli/internal/server/TestResourceContextImpl.java", "identifier": "TestResourceContextImpl", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = UnsupportedOperationException.class)\n public void testUnmodifiableHeaders() throws RestLiSyntaxException\n {\n final ResourceContextImpl context = new ResourceContextImpl();\n context.getResponseHeaders().put(RestConstants.HEADER_ID, \"foobar\");\n }", "class_method_s...
{ "fields": [ { "declarator": "INITIAL_CUSTOM_REQUEST_CONTEXT_CAPACITY = 1", "modifier": "private static final", "original_string": "private static final int INITIAL_CUSTOM_REQUEST_CONTEXT_CAPACITY = 1;", "type": "int", "var_name": "INITIAL_CUSTOM_REQUEST_CONTEXT_CAPACITY" }, ...
{ "body": "@Override\n public Map<String, String> getResponseHeaders()\n {\n return Collections.unmodifiableSortedMap(_responseHeaders);\n }", "class_method_signature": "ResourceContextImpl.getResponseHeaders()", "constructor": false, "full_signature": "@Override public Map<String, String> getResponseHead...
{ "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_367
{ "fields": [ { "declarator": "TOLERANCE = 0.05d", "modifier": "private static final", "original_string": "private static final double TOLERANCE = 0.05d;", "type": "double", "var_name": "TOLERANCE" }, { "declarator": "RANDOM_SEED = 42", "modifier": "private static...
{ "body": "@Test(dataProvider = \"ringFactories\")\n public void testAllPartitionMultipleHosts(RingFactory<URI> ringFactory)\n throws URISyntaxException, ServiceUnavailableException\n {\n URI serviceURI = new URI(\"d2://articles\");\n ConsistentHashKeyMapper mapper = getConsistentHashKeyMapper(ringFactor...
{ "fields": [ { "declarator": "_hashFunction", "modifier": "private final", "original_string": "private final HashFunction<String[]> _hashFunction;", "type": "HashFunction<String[]>", "var_name": "_hashFunction" }, { "declarator": "_ringProvider", "modifier": "pri...
{ "body": "@Override\n public HostToKeyMapper<Integer> getAllPartitionsMultipleHosts(URI serviceUri, int numHostPerPartition)\n throws ServiceUnavailableException\n {\n return getHostToKeyMapper(serviceUri, null, numHostPerPartition, null);\n }", "class_method_signature": "ConsistentHashKeyMapper.getAllP...
{ "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_672
{ "fields": [ { "declarator": "_bytes16 = \"\\u0001\\u0002\\u0003\\u0004\" +\n \"\\u0005\\u0006\\u0007\\u0008\" +\n \"\\u0009\\n\\u000B\\u000C\" +\n \"\\r\\u000E\\u000F\\u0010\"", "modifier": "private final", "original_string": "private final String _bytes16 = \"\\u0001\\u0002\\u0...
{ "body": "@Test\n public void test()\n {\n Assert.assertSame(ValueConverter.coerceString(null, Object.class), null);\n\n Assert.assertEquals(ValueConverter.coerceString(\"Test String\", String.class), \"Test String\");\n\n Assert.assertSame(ValueConverter.coerceString(\"true\", boolean.class), true);\n ...
{ "fields": [], "file": "restli-common/src/main/java/com/linkedin/restli/internal/common/ValueConverter.java", "identifier": "ValueConverter", "interfaces": "", "methods": [ { "class_method_signature": "ValueConverter.coerceString(String value, Class<?> clazz)", "constructor": false, "fu...
{ "body": "public static Object coerceString(String value, Class<?> clazz)\n {\n if (value == null)\n {\n return null;\n }\n else if (String.class.equals(clazz))\n {\n return value;\n }\n else if (Short.TYPE.equals(clazz) || Short.class.equals(clazz))\n {\n return Short.valueOf...
{ "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_388
{ "fields": [ { "declarator": "HOST_OVERRIDE_LIST = \"HOST_OVERRIDE_LIST\"", "modifier": "private static final", "original_string": "private static final String HOST_OVERRIDE_LIST = \"HOST_OVERRIDE_LIST\";", "type": "String", "var_name": "HOST_OVERRIDE_LIST" }, { "decla...
{ "body": "@Test\n public void testClusterInfoProviderGetDarkClusters()\n throws InterruptedException, ExecutionException, ServiceUnavailableException\n {\n int numHttp = 3;\n int numHttps = 4;\n int partitionIdForAdd = 0;\n MockStore<ServiceProperties> serviceRegistry = new MockStore<>();\n Moc...
{ "fields": [ { "declarator": "HOST_OVERRIDE_LIST = \"HOST_OVERRIDE_LIST\"", "modifier": "private static final", "original_string": "private static final String HOST_OVERRIDE_LIST = \"HOST_OVERRIDE_LIST\";", "type": "String", "var_name": "HOST_OVERRIDE_LIST" }, { "decla...
{ "body": "@Override\n public DarkClusterConfigMap getDarkClusterConfigMap(String clusterName) throws ServiceUnavailableException\n {\n FutureCallback<DarkClusterConfigMap> darkClusterConfigMapFutureCallback = new FutureCallback<>();\n getDarkClusterConfigMap(clusterName, darkClusterConfigMapFutureCallback);\...
{ "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_222
{ "fields": [], "file": "restli-tools/src/test/java/com/linkedin/restli/tools/data/TestPredicateExpressionParser.java", "identifier": "TestPredicateExpressionParser", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = EmptyStackException.class)\n public void testNotMissingOperandOr()\n {\n PredicateExpressionParser.parse(\"! | com.linkedin.data.it.AlwaysFalsePredicate)\");\n }", "class_method_signature": "TestPredicateExpressionParser.testNotMissingOperandOr()", "constructor": false,...
{ "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_371
{ "fields": [ { "declarator": "MY_SERVICES_FS = \"myServices\"", "modifier": "public static final", "original_string": "public static final String MY_SERVICES_FS = \"myServices\";", "type": "String", "var_name": "MY_SERVICES_FS" }, { "declarator": "UNVALID_FILES = Array...
{ "body": "@Test\n public void testNoMakingWarmUpRequestsWithoutWarmUp() throws URISyntaxException, InterruptedException, ExecutionException, TimeoutException\n {\n createDefaultServicesIniFiles();\n\n TestLoadBalancer balancer = new TestLoadBalancer();\n AtomicInteger requestCount = balancer.getRequestCou...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(WarmUpLoadBalancer.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(WarmUpLoadBalancer.class);", "type": "Logger", "var_name": "LOG" }, { ...
{ "body": "@Override\n public void start(Callback<None> callback)\n {\n LOG.info(\"D2 WarmUp enabled\");\n _loadBalancer.start(new Callback<None>()\n {\n @Override\n public void onError(Throwable e)\n {\n callback.onError(e);\n }\n\n @Override\n public void onSuccess(No...
{ "created": "11/30/2012 7:37:51 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 6944525, "size": null, "stargazer_count": null, "stars": 2005, "updates": "2020-01-26T06:06:48+00:00", "url": "https://github.com/linkedin/rest.l...
6944525_234
{ "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\n public void testCompatibleRestSpecVsSnapshot()\n {\n final RestLiSnapshotCompatibilityChecker checker = new RestLiSnapshotCompatibilityChecker();\n final CompatibilityInfoMap infoMap = checker.checkRestSpecVsSnapshot(RESOURCES_DIR + FS + \"idls\" + FS + \"twitter-statuses.restspec.json\",\n...
{ "fields": [ { "declarator": "_resolverPath", "modifier": "private", "original_string": "private String _resolverPath;", "type": "String", "var_name": "_resolverPath" }, { "declarator": "_infoMap = new CompatibilityInfoMap()", "modifier": "private final", "...
{ "body": "public CompatibilityInfoMap checkRestSpecVsSnapshot(String prevRestSpecPath, String currSnapshotPath, CompatibilityLevel compatLevel)\n {\n return checkCompatibility(prevRestSpecPath, currSnapshotPath, compatLevel, true);\n }", "class_method_signature": "RestLiSnapshotCompatibilityChecker.checkRestS...
{ "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_29
{ "fields": [], "file": "r2-disruptor/src/test/java/com/linkedin/r2/disruptor/TestDisruptContexts.java", "identifier": "TestDisruptContexts", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testError()\n {\n final long latency = 4200;\n DisruptContexts.ErrorDisruptContext context =\n (DisruptContexts.ErrorDisruptContext) DisruptContexts.error(latency);\n\n Assert.assertEquals(context.mode(), DisruptMode.ERROR);\n Assert.assertEquals(context.latency(), ...
{ "fields": [], "file": "r2-disruptor/src/main/java/com/linkedin/r2/disruptor/DisruptContexts.java", "identifier": "DisruptContexts", "interfaces": "", "methods": [ { "class_method_signature": "DisruptContexts.delay(long delay)", "constructor": false, "full_signature": "public static Dis...
{ "body": "public static DisruptContext error(long latency)\n {\n if (latency < 0)\n {\n throw new IllegalArgumentException(\"Latency cannot be smaller than 0\");\n }\n return new ErrorDisruptContext(latency);\n }", "class_method_signature": "DisruptContexts.error(long latency)", "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_664
{ "fields": [], "file": "restli-common/src/test/java/com/linkedin/restli/internal/common/TestQueryParamsDataMap.java", "identifier": "TestQueryParamsDataMap", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testNumericKeyIndices() throws Exception {\n String testQS = \"ids[0]=0&ids[1]=1&ids[2]=2\";\n\n DataMap queryParamDataMap = queryParamsDataMap(testQS);\n Object idsObj = queryParamDataMap.get(\"ids\");\n Assert.assertTrue(idsObj instanceof DataList);\n DataList ids = (D...
{ "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_408
{ "fields": [ { "declarator": "CONTENT = ByteString.copy(new byte[8092])", "modifier": "private static final", "original_string": "private static final ByteString CONTENT = ByteString.copy(new byte[8092]);", "type": "ByteString", "var_name": "CONTENT" }, { "declarator":...
{ "body": "@Test\n public void testRestRetryOverLimit() throws Exception\n {\n SimpleLoadBalancer balancer = prepareLoadBalancer(Arrays.asList(\"http://test.linkedin.com/retry1\", \"http://test.linkedin.com/retry2\"));\n\n DynamicClient dynamicClient = new DynamicClient(balancer, null);\n RetryClient clien...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(RetryClient.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(RetryClient.class);", "type": "Logger", "var_name": "LOG" }, { "declarator...
{ "body": "@Override\n public Future<RestResponse> restRequest(RestRequest request)\n {\n return restRequest(request, new RequestContext());\n }", "class_method_signature": "RetryClient.restRequest(RestRequest request)", "constructor": false, "full_signature": "@Override public Future<RestResponse> restRe...
{ "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_91
{ "fields": [ { "declarator": "goodInputs[] =\n {\n \"{ \\\"type\\\" : \\\"record\\\", \\\"name\\\" : \\\"Foo\\\", \\\"fields\\\" : [ ] }\",\n \"{ \\\"type\\\" : \\\"typeref\\\", \\\"name\\\" : \\\"Foo\\\", \\\"ref\\\" : \\\"int\\\" }\"\n }", "modifier": "private static", "origin...
{ "body": "@Test\n public void testConvertDataSchemaToDataMap() throws IOException\n {\n for (String good : goodInputs)\n {\n NamedDataSchema dataSchema = (NamedDataSchema) TestUtil.dataSchemaFromString(good);\n\n DataMap mapFromSchema = Conversions.dataSchemaToDataMap(dataSchema);\n DataMap ma...
{ "fields": [ { "declarator": "UNEXPECTED_IOEXCEPTION = \"Unexpected IOException\\n\"", "modifier": "static final", "original_string": "static final String UNEXPECTED_IOEXCEPTION = \"Unexpected IOException\\n\";", "type": "String", "var_name": "UNEXPECTED_IOEXCEPTION" }, { ...
{ "body": "public static DataMap dataSchemaToDataMap(NamedDataSchema schema)\n {\n String inputSchemaAsString = schema.toString();\n try\n {\n JacksonDataCodec codec = new JacksonDataCodec();\n DataMap schemaAsDataMap = codec.stringToMap(inputSchemaAsString);\n return schemaAsDataMap;\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_326
{ "fields": [ { "declarator": "path1 = \"/$symlink\"", "modifier": "private final", "original_string": "private final String path1 = \"/$symlink\";", "type": "String", "var_name": "path1" }, { "declarator": "path2 = \"/foo/bar/$symlink\"", "modifier": "private fin...
{ "body": "@Test\n public void testFirstSymlinkIndex()\n {\n Assert.assertEquals(SymlinkUtil.firstSymlinkIndex(path1), path1.length());\n Assert.assertEquals(SymlinkUtil.firstSymlinkIndex(path2), path2.length());\n Assert.assertEquals(SymlinkUtil.firstSymlinkIndex(path3), path1.length());\n Assert.asser...
{ "fields": [ { "declarator": "SYMLINK_PREFIX = '$'", "modifier": "public static final", "original_string": "public static final char SYMLINK_PREFIX = '$';", "type": "char", "var_name": "SYMLINK_PREFIX" } ], "file": "d2/src/main/java/com/linkedin/d2/discovery/stores/zk/Symlin...
{ "body": "public static int firstSymlinkIndex(String path)\n {\n int fromIndex = 0;\n int index;\n\n while ((index = path.indexOf('/', fromIndex)) >= 0)\n {\n fromIndex = index + 1;\n if (fromIndex < path.length() && path.charAt(fromIndex) == SYMLINK_PREFIX)\n {\n if (path.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_633
{ "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 testEmptyPSONByteStringToDataMap() throws MimeTypeParseException, IOException\n {\n bytesToDataMap(\"application/x-pson\", ByteString.copy(new byte[0]));\n }", "class_method_signature": "TestDataMapConverter.testEmptyPSONByteStringToDataMa...
{ "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_263
{ "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 testAvroSchemaMissingFields() throws IOException\n {\n final String P_SCHEMA =\n \"{\" +\n \" \\\"type\\\" : \\\"record\\\",\\n\" +\n \" \\\"name\\\" : \\\"Foo\\\",\\n\" +\n \" \\\"fields\\\" : [\\n\" +\n \"{ \\\"nam...
{ "fields": [ { "declarator": "_dataTranslationOptions", "modifier": "protected", "original_string": "protected DataTranslationOptions _dataTranslationOptions;", "type": "DataTranslationOptions", "var_name": "_dataTranslationOptions" }, { "declarator": "_genericData = G...
{ "body": "public static DataMap genericRecordToDataMap(GenericRecord record, RecordDataSchema dataSchema, Schema avroSchema) throws DataTranslationException\n {\n return genericRecordToDataMap(record, dataSchema, avroSchema,null);\n }", "class_method_signature": "DataTranslator.genericRecordToDataMap(GenericR...
{ "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_648
{ "fields": [ { "declarator": "NO_ESCAPING = URLEscaper.Escaping.NO_ESCAPING", "modifier": "private static final", "original_string": "private static final URLEscaper.Escaping NO_ESCAPING = URLEscaper.Escaping.NO_ESCAPING;", "type": "URLEscaper.Escaping", "var_name": "NO_ESCAPING" ...
{ "body": "@Test(dataProvider = \"encoding\")\n public void testEncoding(Object obj, String expectedNoEsc, String expectedPathSegEsc, String expectedQueryParamEsc)\n {\n String actualNoEsc = URIParamUtils.encodeElement(obj, NO_ESCAPING, null);\n Assert.assertEquals(actualNoEsc, expectedNoEsc);\n String act...
{ "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": "static String encodeElement(Object obj, URLEscaper.Escaping escaping, UriComponent.Type componentType)\n {\n StringBuilder builder = new StringBuilder();\n encodeDataObject(obj, escaping, componentType, builder);\n return builder.toString();\n }", "class_method_signature": "URIParamUtils.encod...
{ "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_218
{ "fields": [], "file": "restli-tools/src/test/java/com/linkedin/restli/tools/data/TestPredicateExpressionParser.java", "identifier": "TestPredicateExpressionParser", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = EmptyStackException.class)\n public void testOrMissingOperand2()\n {\n PredicateExpressionParser.parse(\"com.linkedin.data.it.AlwaysFalsePredicate | \");\n }", "class_method_signature": "TestPredicateExpressionParser.testOrMissingOperand2()", "constructor": false, "fu...
{ "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_424
{ "fields": [], "file": "d2/src/test/java/com/linkedin/d2/balancer/strategies/degrader/DegraderConfigFactoryTest.java", "identifier": "DegraderConfigFactoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testToDegraderConfig()\n {\n Map<String,String> properties = new HashMap<String, String>();;\n Boolean logEnabled = false;\n DegraderImpl.LatencyToUse latencyToUse = DegraderImpl.LatencyToUse.PCT95;\n Double maxDropRate = 0.33;\n Long maxDropDuration = 23190l;\n Doub...
{ "fields": [ { "declarator": "_log = LoggerFactory.getLogger(DegraderConfigFactory.class)", "modifier": "private static final", "original_string": "private static final Logger _log = LoggerFactory.getLogger(DegraderConfigFactory.class);", "type": "Logger", "var_name": "_log" } ...
{ "body": "public static DegraderImpl.Config toDegraderConfig(Map<String, String> properties)\n {\n DegraderImpl.Config config = new DegraderImpl.Config();\n if (properties == null || properties.isEmpty())\n {\n return config;\n }\n else\n {\n // we are not modifying config's callTracker,...
{ "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_131
{ "fields": [], "file": "restli-client/src/test/java/com/linkedin/restli/client/TestAbstractRequestBuilder.java", "identifier": "TestAbstractRequestBuilder", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAddReqParamWithNullValue()\n {\n final AbstractRequestBuilder<?, ?, ?> builder = new DummyAbstractRequestBuilder();\n\n try\n {\n builder.addReqParam(\"a\", null);\n Assert.fail(\"addReqParam should not allow null values\");\n }\n catch (NullPointerExcepti...
{ "fields": [ { "declarator": "HEADER_DELIMITER = ','", "modifier": "protected static final", "original_string": "protected static final char HEADER_DELIMITER = ',';", "type": "char", "var_name": "HEADER_DELIMITER" }, { "declarator": "_resourceSpec", "modi...
{ "body": "public AbstractRequestBuilder<K, V, R> addReqParam(String key, Object value)\n {\n ArgumentUtil.notNull(value, \"value\");\n return addParam(key, value);\n }", "class_method_signature": "AbstractRequestBuilder.addReqParam(String key, Object value)", "constructor": false, "full_signature": "pu...
{ "created": "11/30/2012 7:37:51 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 6944525, "size": null, "stargazer_count": null, "stars": 2005, "updates": "2020-01-26T06:06:48+00:00", "url": "https://github.com/linkedin/rest.l...
6944525_561
{ "fields": [], "file": "restli-server/src/test/java/com/linkedin/restli/server/TestRestLiResponseAttachments.java", "identifier": "TestRestLiResponseAttachments", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRestLiResponseAttachments()\n {\n //In this test we simply add a few attachments and verify the size of the resulting MultiPartMIMEWriter.\n //More detailed tests can be found in TestAttachmentUtils.\n\n final RestLiResponseAttachments emptyAttachments = new RestLiRespons...
{ "fields": [ { "declarator": "_multiPartMimeWriterBuilder", "modifier": "private final", "original_string": "private final MultiPartMIMEWriter.Builder _multiPartMimeWriterBuilder;", "type": "MultiPartMIMEWriter.Builder", "var_name": "_multiPartMimeWriterBuilder" } ], "file":...
{ "body": "private RestLiResponseAttachments(final RestLiResponseAttachments.Builder builder)\n {\n _multiPartMimeWriterBuilder = builder._multiPartMimeWriterBuilder;\n }", "class_method_signature": "RestLiResponseAttachments.RestLiResponseAttachments(final RestLiResponseAttachments.Builder builder)", "const...
{ "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_52
{ "fields": [ { "declarator": "plusTenTransform = new Transform<Object, Object>()\n {\n @Override\n public Object apply(Object element)\n {\n Integer val = (Integer)element;\n return val + 10;\n }\n }", "modifier": "private static", "origin...
{ "body": "@Test\n public void testReplaceBySchemaNameNested() throws Exception\n {\n SimpleTestData data = IteratorTestData.createSimpleTestData();\n \n Builder.create(data.getDataElement(), IterationOrder.PRE_ORDER)\n .filterBy(Predicates.dataSchemaNameEquals(\"Bar\"))\n .replace(500);\n ...
{ "fields": [], "file": "data/src/main/java/com/linkedin/data/it/Transformer.java", "identifier": "Transformer", "interfaces": "", "methods": [ { "class_method_signature": "Transformer.transform(Object root, DataIterator it, Transform<Object,Object> transform)", "constructor": false, "fu...
{ "body": "public static Object replace(Object root, DataIterator it, Object value)\n {\n return transform(root, it, Transforms.constantValue(value));\n }", "class_method_signature": "Transformer.replace(Object root, DataIterator it, Object value)", "constructor": false, "full_signature": "public static Ob...
{ "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_473
{ "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 testOverrideMaskNestedRecord() throws CloneNotSupportedException\n {\n LinkedListNode node1 = new LinkedListNode();\n node1.setIntField(1);\n\n LinkedListNode node2 = new LinkedListNode();\n node2.setIntField(2);\n node1.setNext(node2);\n node2.data().put(\"keep me\"...
{ "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_189
{ "fields": [], "file": "restli-tools/src/test/java/com/linkedin/restli/tools/data/TestPredicateExpressionParser.java", "identifier": "TestPredicateExpressionParser", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDoubleNot()\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).getChildPredicate();\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_536
{ "fields": [], "file": "restli-server/src/test/java/com/linkedin/restli/internal/server/response/TestBatchCreateResponseBuilder.java", "identifier": "TestBatchCreateResponseBuilder", "interfaces": "", "superclass": "" }
{ "body": "@Test(dataProvider = \"returnEntityData\")\n @SuppressWarnings({\"Duplicates\", \"unchecked\"})\n public void testReturnEntityInBuildRestLiResponseData(Object batchCreateResult, List<CreateResponse> createResponses, boolean isReturnEntityRequested, boolean expectEntityReturned) throws URISyntaxException\...
{ "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<BatchCreateResponseEnvelope> 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_166
{ "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 testSendRequest8()\n {\n when(_builder.build()).thenReturn(_request);\n when(_controller.getDisruptContext(any(String.class), any(ResourceMethod.class))).thenReturn(_disrupt);\n _client.sendRequest(_builder, _callback);\n verify(_underlying, times(1)).sendRequest(eq(_reque...
{ "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_609
{ "fields": [], "file": "restli-common/src/test/java/com/linkedin/restli/common/util/TestProjectionMaskApplier.java", "identifier": "TestProjectionMaskApplier", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testBuildSchemaByEmptyProjection()\n {\n DataSchema schema = DataTemplateUtil.getSchema(RecordTemplateWithPrimitiveKey.class);\n DataMap projectionMask = buildProjectionMaskDataMap();\n\n try\n {\n buildSchemaByProjection(schema, projectionMask);\n }\n catch (Il...
{ "fields": [ { "declarator": "ARRAY_RANGE_PARAMS =\n new HashSet<>(Arrays.asList(FilterConstants.START, FilterConstants.COUNT))", "modifier": "private static final", "original_string": "private static final Set<String> ARRAY_RANGE_PARAMS =\n new HashSet<>(Arrays.asList(FilterConstants...
{ "body": "public static DataSchema buildSchemaByProjection(DataSchema schema, DataMap maskMap)\n {\n return buildSchemaByProjection(schema, maskMap, Collections.emptyList());\n }", "class_method_signature": "ProjectionMaskApplier.buildSchemaByProjection(DataSchema schema, DataMap maskMap)", "constructor": f...
{ "created": "11/30/2012 7:37:51 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 6944525, "size": null, "stargazer_count": null, "stars": 2005, "updates": "2020-01-26T06:06:48+00:00", "url": "https://github.com/linkedin/rest.l...
6944525_44
{ "fields": [], "file": "data/src/test/java/com/linkedin/data/collections/TestCowSet.java", "identifier": "TestCowSet", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testClone() throws CloneNotSupportedException\n {\n final CowSet<String> set1 = new CowSet<String>();\n set1.add(\"test\");\n\n @SuppressWarnings(\"unchecked\")\n final CowSet<String> set2 = (CowSet<String>)set1.clone();\n @SuppressWarnings(\"unchecked\")\n final Cow...
{ "fields": [ { "declarator": "PRESENT = new Object()", "modifier": "private static final", "original_string": "private static final Object PRESENT = new Object();", "type": "Object", "var_name": "PRESENT" }, { "declarator": "_map", "modifier": "private final", ...
{ "body": "@Override\n public Object clone() throws CloneNotSupportedException\n {\n return new CowSet<K>(_map.clone());\n }", "class_method_signature": "CowSet.clone()", "constructor": false, "full_signature": "@Override public Object clone()", "identifier": "clone", "invocations": [ "clone" ],...
{ "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_259
{ "fields": [ { "declarator": "FS = File.separator", "modifier": "private static final", "original_string": "private static final String FS = File.separator;", "type": "String", "var_name": "FS" } ], "file": "data-avro/src/test/java/com/linkedin/data/avro/TestSchemaTranslator...
{ "body": "@Test(dataProvider = \"avroToDataSchemaTranslationModeData\")\n public void testAvroToDataSchemaTranslationMode(AvroToDataSchemaTranslationMode translationMode, String avroSchemaText, String expected)\n throws IOException\n {\n AvroToDataSchemaTranslationOptions options = new AvroToDataSchemaTran...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(SchemaTranslator.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(SchemaTranslator.class);", "type": "Logger", "var_name": "log" }, { "...
{ "body": "public static DataSchema avroToDataSchema(String avroSchemaInJson, AvroToDataSchemaTranslationOptions options)\n throws IllegalArgumentException\n {\n ValidationOptions validationOptions = SchemaParser.getDefaultSchemaParserValidationOptions();\n validationOptions.setAvroUnionMode(true);\n\n S...
{ "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_465
{ "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 testTrimmerWithPrimitivesRecordsUnionsMix() throws CloneNotSupportedException\n {\n TyperefTest recordTemplate = new TyperefTest();\n recordTemplate.setBoolean(true);\n\n RecordBar foo = new RecordBar();\n foo.setLocation(\"foo\");\n recordTemplate.setBar1(foo);\n\n ...
{ "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_170
{ "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 testSendRequest12()\n {\n when(_controller.getDisruptContext(any(String.class))).thenReturn(_disrupt);\n _client.sendRequest(_multiplexed, _multiplexedCallback);\n verify(_underlying, times(1)).sendRequest(eq(_multiplexed), any(RequestContext.class), eq(_multiplexedCallback))...
{ "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_520
{ "fields": [], "file": "restli-server/src/test/java/com/linkedin/restli/internal/server/response/TestRestLiResponse.java", "identifier": "TestRestLiResponse", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testHttpStatus()\n {\n RestLiResponse response = new RestLiResponse.Builder().status(HttpStatus.S_200_OK).build();\n assertEquals(response.getStatus(), HttpStatus.S_200_OK);\n }", "class_method_signature": "TestRestLiResponse.testHttpStatus()", "constructor": false, "full...
{ "fields": [ { "declarator": "_status", "modifier": "private final", "original_string": "private final HttpStatus _status;", "type": "HttpStatus", "var_name": "_status" }, { "declarator": "_record", "modifier": "private final", "original_string": "private f...
{ "body": "public HttpStatus getStatus()\n {\n return _status;\n }", "class_method_signature": "RestLiResponse.getStatus()", "constructor": false, "full_signature": "public HttpStatus getStatus()", "identifier": "getStatus", "invocations": [], "modifiers": "public", "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_13
{ "fields": [], "file": "data-transform/src/test/java/com/linkedin/data/transform/TestEscaper.java", "identifier": "TestEscaper", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testUnescapePathSegment()\n {\n assertEquals(Escaper.unescapePathSegment(\"*\"), \"*\");\n assertEquals(Escaper.unescapePathSegment(\"$$*\"), \"$*\");\n assertTrue(Escaper.unescapePathSegment(\"$*\") == PathSpec.WILDCARD);\n assertFalse(Escaper.unescapePathSegment(\"*\") =...
{ "fields": [], "file": "data-transform/src/main/java/com/linkedin/data/transform/Escaper.java", "identifier": "Escaper", "interfaces": "", "methods": [ { "class_method_signature": "Escaper.escapePathSegment(String segment)", "constructor": false, "full_signature": "public static String ...
{ "body": "public static String unescapePathSegment(String segment)\n {\n if (segment.equals(\"$*\"))\n {\n return PathSpec.WILDCARD;\n }\n\n return unescape(segment);\n }", "class_method_signature": "Escaper.unescapePathSegment(String segment)", "constructor": false, "full_signature": "publi...
{ "created": "11/30/2012 7:37:51 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 6944525, "size": null, "stargazer_count": null, "stars": 2005, "updates": "2020-01-26T06:06:48+00:00", "url": "https://github.com/linkedin/rest.l...
6944525_432
{ "fields": [ { "declarator": "DEFAULT_PARTITION_ID = DefaultPartitionAccessor.DEFAULT_PARTITION_ID", "modifier": "private static final", "original_string": "private static final int DEFAULT_PARTITION_ID = DefaultPartitionAccessor.DEFAULT_PARTITION_ID;", "type": "int", "var_name": "D...
{ "body": "@Test(groups = { \"small\", \"back-end\" })\n public void testFactoryWithPointBased() {\n RingFactory<String> factory = new DelegatingRingFactory<>(configBuilder(\"pointBased\", \"uriRegex\"));\n Ring<String> ring = factory.createRing(buildPointsMap(10));\n\n assertTrue(ring instanceof Consistent...
{ "fields": [ { "declarator": "POINT_BASED_CONSISTENT_HASH = \"pointBased\"", "modifier": "public static final", "original_string": "public static final String POINT_BASED_CONSISTENT_HASH = \"pointBased\";", "type": "String", "var_name": "POINT_BASED_CONSISTENT_HASH" }, { ...
{ "body": "@Override\n public Ring<T> createRing(Map<T, Integer> pointsMap) {\n return _ringFactory.createRing(pointsMap);\n }", "class_method_signature": "DelegatingRingFactory.createRing(Map<T, Integer> pointsMap)", "constructor": false, "full_signature": "@Override public Ring<T> createRing(Map<T, Integ...
{ "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_598
{ "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 testStreamToNettyRequestWithMultipleCookies() throws Exception\n {\n StreamRequestBuilder streamRequestBuilder = new StreamRequestBuilder(new URI(ANY_URI));\n\n streamRequestBuilder.setCookies(ANY_COOKIES);\n\n StreamRequest streamRequest = streamRequestBuilder.build(\n ...
{ "fields": [ { "declarator": "HEADER_BLACKLIST = new HashSet<>()", "modifier": "private static final", "original_string": "private static final HashSet<String> HEADER_BLACKLIST = new HashSet<>();", "type": "HashSet<String>", "var_name": "HEADER_BLACKLIST" } ], "file": "r2-ne...
{ "body": "public static HttpRequest toNettyRequest(RestRequest request) throws Exception\n {\n HttpMethod nettyMethod = HttpMethod.valueOf(request.getMethod());\n URL url = new URL(request.getURI().toString());\n String path = url.getFile();\n // RFC 2616, section 5.1.2:\n // Note that the absolute...
{ "created": "11/30/2012 7:37:51 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 6944525, "size": null, "stargazer_count": null, "stars": 2005, "updates": "2020-01-26T06:06:48+00:00", "url": "https://github.com/linkedin/rest.l...
6944525_0
{ "fields": [], "file": "d2-contrib/src/test/java/com/linkedin/d2/contrib/TestRouteLookupClient.java", "identifier": "TestRouteLookupClient", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRouteLookupClientFuture() throws ExecutionException, InterruptedException\n {\n RouteLookup routeLookup = new SimpleTestRouteLookup();\n\n final D2Client d2Client = new D2ClientBuilder().setZkHosts(\"localhost:2121\").build();\n d2Client.start(new FutureCallback<None>());...
{ "fields": [ { "declarator": "_client", "modifier": "private final", "original_string": "private final Client _client;", "type": "Client", "var_name": "_client" }, { "declarator": "_routeLookup", "modifier": "private final", "original_string": "private fina...
{ "body": "@Override\n public void restRequest(RestRequest request, Callback<RestResponse> callback, String routeKey)\n {\n this.restRequest(request, new RequestContext(), callback, routeKey);\n }", "class_method_signature": "RouteLookupClient.restRequest(RestRequest request, Callback<RestResponse> callback, ...
{ "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_577
{ "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 testCustomizedInternalErrorMessage(final RestOrStream restOrStream) throws Exception\n {\n final StatusCollectionResource statusResource = getMockResource(StatusCollectionResource.class);\n EasyMock.expect(statusResource.get(eq(1L))).andThrow(new...
{ "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_127
{ "fields": [ { "declarator": "_keys", "modifier": "private static final", "original_string": "private static final List<String> _keys;", "type": "List<String>", "var_name": "_keys" }, { "declarator": "_record", "modifier": "private static final", "original_...
{ "body": "@Test(dataProvider = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + \"batchEntityResponseDataProvider\")\n public void testDecoding(List<String> keys, ProtocolVersion protocolVersion)\n throws InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException, IOException\n {...
{ "fields": [ { "declarator": "_entityType", "modifier": "private final", "original_string": "private final TypeSpec<V> _entityType;", "type": "TypeSpec<V>", "var_name": "_entityType" }, { "declarator": "_keyType", "modifier": "private final", "original_stri...
{ "body": "@Override\n public BatchKVResponse<K, EntityResponse<V>> wrapResponse(DataMap dataMap, Map<String, String> headers, ProtocolVersion version)\n throws InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException, IOException\n {\n if (dataMap == null)\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_433
{ "fields": [ { "declarator": "DEFAULT_PARTITION_ID = DefaultPartitionAccessor.DEFAULT_PARTITION_ID", "modifier": "private static final", "original_string": "private static final int DEFAULT_PARTITION_ID = DefaultPartitionAccessor.DEFAULT_PARTITION_ID;", "type": "int", "var_name": "D...
{ "body": "@Test(groups = { \"small\", \"back-end\" })\n public void testFactoryWithDistributionBasedAndRegix() {\n RingFactory<String> factory = new DelegatingRingFactory<>(configBuilder(\"distributionBased\", \"uriRegex\"));\n Ring<String> ring = factory.createRing(buildPointsMap(10));\n\n assertTrue(ring...
{ "fields": [ { "declarator": "POINT_BASED_CONSISTENT_HASH = \"pointBased\"", "modifier": "public static final", "original_string": "public static final String POINT_BASED_CONSISTENT_HASH = \"pointBased\";", "type": "String", "var_name": "POINT_BASED_CONSISTENT_HASH" }, { ...
{ "body": "@Override\n public Ring<T> createRing(Map<T, Integer> pointsMap) {\n return _ringFactory.createRing(pointsMap);\n }", "class_method_signature": "DelegatingRingFactory.createRing(Map<T, Integer> pointsMap)", "constructor": false, "full_signature": "@Override public Ring<T> createRing(Map<T, Integ...
{ "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_599
{ "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 testStreamToNettyRequestContentLengthIgnoreCase() throws Exception\n {\n StreamRequestBuilder streamRequestBuilder = new StreamRequestBuilder(new URI(ANY_URI));\n streamRequestBuilder.setHeader(\"CONTENT-LENGTH\", Integer.toString(ANY_ENTITY.length()));\n StreamRequest stream...
{ "fields": [ { "declarator": "HEADER_BLACKLIST = new HashSet<>()", "modifier": "private static final", "original_string": "private static final HashSet<String> HEADER_BLACKLIST = new HashSet<>();", "type": "HashSet<String>", "var_name": "HEADER_BLACKLIST" } ], "file": "r2-ne...
{ "body": "public static HttpRequest toNettyRequest(RestRequest request) throws Exception\n {\n HttpMethod nettyMethod = HttpMethod.valueOf(request.getMethod());\n URL url = new URL(request.getURI().toString());\n String path = url.getFile();\n // RFC 2616, section 5.1.2:\n // Note that the absolute...
{ "created": "11/30/2012 7:37:51 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 6944525, "size": null, "stargazer_count": null, "stars": 2005, "updates": "2020-01-26T06:06:48+00:00", "url": "https://github.com/linkedin/rest.l...
6944525_1
{ "fields": [], "file": "d2-contrib/src/test/java/com/linkedin/d2/contrib/TestRouteLookupClient.java", "identifier": "TestRouteLookupClient", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRouteLookupClientCallback()\n throws InterruptedException, ExecutionException, TimeoutException\n {\n RouteLookup routeLookup = new SimpleTestRouteLookup();\n\n final D2Client d2Client = new D2ClientBuilder().setZkHosts(\"localhost:2121\").build();\n d2Client.start(new...
{ "fields": [ { "declarator": "_client", "modifier": "private final", "original_string": "private final Client _client;", "type": "Client", "var_name": "_client" }, { "declarator": "_routeLookup", "modifier": "private final", "original_string": "private fina...
{ "body": "@Override\n public void restRequest(RestRequest request, Callback<RestResponse> callback, String routeKey)\n {\n this.restRequest(request, new RequestContext(), callback, routeKey);\n }", "class_method_signature": "RouteLookupClient.restRequest(RestRequest request, Callback<RestResponse> callback, ...
{ "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_576
{ "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 testInternalErrorMessage(final RestOrStream restOrStream) throws Exception\n {\n final StatusCollectionResource statusResource = getMockResource(StatusCollectionResource.class);\n EasyMock.expect(statusResource.get(eq(1L))).andThrow(new IllegalAr...
{ "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_126
{ "fields": [], "file": "restli-client/src/test/java/com/linkedin/restli/internal/client/TestQueryParamsUtil.java", "identifier": "TestQueryParamsUtil", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCustomProjectionDataMapSerializerReturningNull()\n {\n Map<String, Object> queryParams = new HashMap<>();\n Set<PathSpec> specSet = new HashSet<>();\n specSet.add(new PathSpec(\"random\"));\n queryParams.put(RestConstants.FIELDS_PARAM, specSet);\n queryParams.put(Re...
{ "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_12
{ "fields": [], "file": "data-transform/src/test/java/com/linkedin/data/transform/TestEscaper.java", "identifier": "TestEscaper", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEscapePathSegment()\n {\n assertEquals(Escaper.escapePathSegment(\"*\"), \"*\");\n assertEquals(Escaper.escapePathSegment(\"$*\"), \"$$*\");\n assertEquals(Escaper.escapePathSegment(PathSpec.WILDCARD), \"$*\");\n }", "class_method_signature": "TestEscaper.testEscapePat...
{ "fields": [], "file": "data-transform/src/main/java/com/linkedin/data/transform/Escaper.java", "identifier": "Escaper", "interfaces": "", "methods": [ { "class_method_signature": "Escaper.escapePathSegment(String segment)", "constructor": false, "full_signature": "public static String ...
{ "body": "public static String escapePathSegment(String segment)\n {\n //identity comparison - wildcard must be specific instance in PathSpec\n if (segment == PathSpec.WILDCARD)\n {\n return \"$*\";\n }\n\n return escape(segment);\n }", "class_method_signature": "Escaper.escapePathSegment(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_464
{ "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 testValidateRequestHeadersWithValidAcceptHeaderAndMatch() throws Exception\n {\n Map<String, String> headers = new HashMap<String, String>();\n headers.put(\"Accept\", \"application/json\");\n ServerResourceContext resourceContext = new ResourceContextImpl();\n RestUtils...
{ "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 validateRequestHeadersAndUpdateResourceContext(final Map<String, String> headers,\n final Set<String> customMimeTypesSupported,\n ServerResourceContext re...
{ "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_171
{ "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 testSendRequest13()\n {\n when(_controller.getDisruptContext(any(String.class))).thenReturn(_disrupt);\n _client.sendRequest(_multiplexed, _context, _multiplexedCallback);\n verify(_underlying, times(1)).sendRequest(eq(_multiplexed), eq(_context), eq(_multiplexedCallback));\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_521
{ "fields": [ { "declarator": "BATCH_PARAM = \"batch_param\"", "modifier": "private static final", "original_string": "private static final String BATCH_PARAM = \"batch_param\";", "type": "String", "var_name": "BATCH_PARAM" }, { "declarator": "PAGE_COUNT = 1", "mo...
{ "body": "@Test(dataProvider = \"build_uri_test_cases\")\n public void testBuildCriteriaURI(ResourceContextImpl resourceContext,\n RecordTemplate criteria,\n String batchParameterName,\n URI uri,\n ...
{ "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": "static URI buildCriteriaURI(ResourceContextImpl resourceContext, RecordTemplate criteria, String batchParameterName, URI uri)\n {\n DataList criteriaList = new DataList(1);\n criteriaList.add(criteria.data());\n return URIParamUtils.replaceQueryParam(uri,\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_608
{ "fields": [], "file": "restli-common/src/test/java/com/linkedin/restli/common/util/TestProjectionMaskApplier.java", "identifier": "TestProjectionMaskApplier", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testBuildSchemaByProjectionAllowWhitelistedFields()\n {\n final String whiteListedFieldName = \"$URN\";\n RecordDataSchema schema = (RecordDataSchema) DataTemplateUtil.getSchema(RecordTemplateWithComplexKey.class);\n DataMap projectionMask = buildProjectionMaskDataMap(\"body\...
{ "fields": [ { "declarator": "ARRAY_RANGE_PARAMS =\n new HashSet<>(Arrays.asList(FilterConstants.START, FilterConstants.COUNT))", "modifier": "private static final", "original_string": "private static final Set<String> ARRAY_RANGE_PARAMS =\n new HashSet<>(Arrays.asList(FilterConstants...
{ "body": "public static DataSchema buildSchemaByProjection(DataSchema schema, DataMap maskMap)\n {\n return buildSchemaByProjection(schema, maskMap, Collections.emptyList());\n }", "class_method_signature": "ProjectionMaskApplier.buildSchemaByProjection(DataSchema schema, DataMap maskMap)", "constructor": f...
{ "created": "11/30/2012 7:37:51 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 6944525, "size": null, "stargazer_count": null, "stars": 2005, "updates": "2020-01-26T06:06:48+00:00", "url": "https://github.com/linkedin/rest.l...
6944525_45
{ "fields": [], "file": "data/src/test/java/com/linkedin/data/it/TestCounter.java", "identifier": "TestCounter", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCountByPredicateAtPath() throws Exception\n {\n SimpleTestData data = IteratorTestData.createSimpleTestData();\n \n int count = Builder.create(data.getDataElement(), IterationOrder.PRE_ORDER)\n .filterBy(Predicates.pathMatchesPathSpec(IteratorTestData.PATH_TO_ID))\...
{ "fields": [], "file": "data/src/main/java/com/linkedin/data/it/Counter.java", "identifier": "Counter", "interfaces": "", "methods": [ { "class_method_signature": "Counter.count(DataIterator it)", "constructor": false, "full_signature": "public static int count(DataIterator it)", ...
{ "body": "public static int count(DataIterator it)\n {\n @SuppressWarnings(\"unused\") // used in while loop\n int count = 0;\n for(DataElement element = it.next(); element !=null; element = it.next())\n {\n count++;\n }\n return count;\n }", "class_method_signature": "Counter.count(DataIt...
{ "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_258
{ "fields": [ { "declarator": "FS = File.separator", "modifier": "private static final", "original_string": "private static final String FS = File.separator;", "type": "String", "var_name": "FS" } ], "file": "data-avro/src/test/java/com/linkedin/data/avro/TestSchemaTranslator...
{ "body": "@Test(dataProvider = \"fromAvroSchemaData\")\n public void testFromAvroSchema(String avroText, String schemaText) throws Exception\n {\n AvroToDataSchemaTranslationOptions options[] =\n {\n new AvroToDataSchemaTranslationOptions(AvroToDataSchemaTranslationMode.TRANSLATE),\n new AvroToData...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(SchemaTranslator.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(SchemaTranslator.class);", "type": "Logger", "var_name": "log" }, { "...
{ "body": "public static DataSchema avroToDataSchema(String avroSchemaInJson, AvroToDataSchemaTranslationOptions options)\n throws IllegalArgumentException\n {\n ValidationOptions validationOptions = SchemaParser.getDefaultSchemaParserValidationOptions();\n validationOptions.setAvroUnionMode(true);\n\n S...
{ "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_472
{ "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 testOverrideMask() throws CloneNotSupportedException\n {\n RecordBar bar = new RecordBar();\n bar.setLocation(\"mountain view\");\n bar.data().put(\"SF\", \"CA\");\n RecordBar expected = bar.clone();\n\n MaskTree maskTree = new MaskTree();\n maskTree.addOperation(new...
{ "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_188
{ "fields": [], "file": "restli-tools/src/test/java/com/linkedin/restli/tools/data/TestPredicateExpressionParser.java", "identifier": "TestPredicateExpressionParser", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testNot()\n {\n final Predicate parsed = PredicateExpressionParser.parse(\"!com.linkedin.data.it.AlwaysTruePredicate\");\n Assert.assertEquals(parsed.getClass(), NotPredicate.class);\n Assert.assertEquals(((NotPredicate) parsed).getChildPredicate().getClass(), AlwaysTruePredi...
{ "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_537
{ "fields": [], "file": "restli-server/src/test/java/com/linkedin/restli/internal/server/response/TestBatchCreateResponseBuilder.java", "identifier": "TestBatchCreateResponseBuilder", "interfaces": "", "superclass": "" }
{ "body": "@Test\n @SuppressWarnings(\"unchecked\")\n public void testProjectionInBuildRestLiResponseData() throws URISyntaxException\n {\n MaskTree maskTree = new MaskTree();\n maskTree.addOperation(new PathSpec(\"fruitsField\"), MaskOperation.POSITIVE_MASK_OP);\n\n ServerResourceContext mockContext = Ea...
{ "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<BatchCreateResponseEnvelope> 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_167
{ "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 testSendRequest9()\n {\n when(_builder.build()).thenReturn(_request);\n when(_controller.getDisruptContext(any(String.class), any(ResourceMethod.class))).thenReturn(_disrupt);\n _client.sendRequest(_builder, _context, _callback);\n verify(_underlying, times(1)).sendRequest...
{ "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_53
{ "fields": [ { "declarator": "plusTenTransform = new Transform<Object, Object>()\n {\n @Override\n public Object apply(Object element)\n {\n Integer val = (Integer)element;\n return val + 10;\n }\n }", "modifier": "private static", "origin...
{ "body": "@Test\n public void testReplaceRoot() throws Exception\n {\n SimpleTestData data = IteratorTestData.createSimpleTestData();\n \n Object result = Builder.create(data.getDataElement(), IterationOrder.PRE_ORDER)\n .filterBy(Predicates.dataSchemaNameEquals(\"Foo\"))\n .replace(new Data...
{ "fields": [], "file": "data/src/main/java/com/linkedin/data/it/Transformer.java", "identifier": "Transformer", "interfaces": "", "methods": [ { "class_method_signature": "Transformer.transform(Object root, DataIterator it, Transform<Object,Object> transform)", "constructor": false, "fu...
{ "body": "public static Object replace(Object root, DataIterator it, Object value)\n {\n return transform(root, it, Transforms.constantValue(value));\n }", "class_method_signature": "Transformer.replace(Object root, DataIterator it, Object value)", "constructor": false, "full_signature": "public static Ob...
{ "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_425
{ "fields": [ { "declarator": "DEFAULT_PARTITION_ID = DefaultPartitionAccessor.DEFAULT_PARTITION_ID", "modifier": "private static final", "original_string": "private static final int DEFAULT_PARTITION_ID = DefaultPartitionAccessor.DEFAULT_PARTITION_ID;", "type": "int", "var_name": "D...
{ "body": "@Test(groups = { \"small\", \"back-end\" })\n public void testPointsCleanUp()\n throws URISyntaxException\n {\n Map<String, Integer> pointsMp = buildPointsMap(6);\n\n PointBasedConsistentHashRingFactory<String> ringFactory = new PointBasedConsistentHashRingFactory<>(new DegraderLoadBalance...
{ "fields": [ { "declarator": "POINT_BASED_CONSISTENT_HASH = \"pointBased\"", "modifier": "public static final", "original_string": "public static final String POINT_BASED_CONSISTENT_HASH = \"pointBased\";", "type": "String", "var_name": "POINT_BASED_CONSISTENT_HASH" }, { ...
{ "body": "@Override\n public Ring<T> createRing(Map<T, Integer> pointsMap) {\n return _ringFactory.createRing(pointsMap);\n }", "class_method_signature": "DelegatingRingFactory.createRing(Map<T, Integer> pointsMap)", "constructor": false, "full_signature": "@Override public Ring<T> createRing(Map<T, Integ...
{ "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_130
{ "fields": [], "file": "restli-client/src/test/java/com/linkedin/restli/client/TestAbstractRequestBuilder.java", "identifier": "TestAbstractRequestBuilder", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRemoveParam()\n {\n final AbstractRequestBuilder<?, ?, ?> builder = new DummyAbstractRequestBuilder();\n\n builder.addParam(\"a\", \"b\");\n Assert.assertEquals(builder.getParam(\"a\"), Arrays.asList(\"b\"));\n\n builder.removeParam(\"a\");\n Assert.assertFalse(buil...
{ "fields": [ { "declarator": "HEADER_DELIMITER = ','", "modifier": "protected static final", "original_string": "protected static final char HEADER_DELIMITER = ',';", "type": "char", "var_name": "HEADER_DELIMITER" }, { "declarator": "_resourceSpec", "modi...
{ "body": "public AbstractRequestBuilder<K, V, R> removeParam(String key)\n {\n _queryParams.remove(key);\n _queryParamClasses.remove(key);\n return this;\n }", "class_method_signature": "AbstractRequestBuilder.removeParam(String key)", "constructor": false, "full_signature": "public AbstractRequestB...
{ "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_560
{ "fields": [ { "declarator": "codec = new JacksonDataCodec()", "modifier": "private static final", "original_string": "private static final JacksonDataCodec codec = new JacksonDataCodec();", "type": "JacksonDataCodec", "var_name": "codec" } ], "file": "restli-server/src/test...
{ "body": "@Test(dataProvider = \"data\")\n public void testProjectionOnPatch(String[] patchAndProjection, String expectedResult) throws IOException\n {\n DataMap patch = dataMapFromString(patchAndProjection[0].replace('\\'', '\"'));\n DataMap projection = dataMapFromString(patchAndProjection[1].replace('\\''...
{ "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 <T extends RecordTemplate> PatchRequest<T> applyProjection(PatchRequest<T> patch, MaskTree projection)\n {\n try\n {\n /**\n * Implementation consists of 3 steps:\n * 1) move data conveyed by patch out of meta-commands (expose method)\n * 2) apply projection on 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_649
{ "fields": [ { "declarator": "NO_ESCAPING = URLEscaper.Escaping.NO_ESCAPING", "modifier": "private static final", "original_string": "private static final URLEscaper.Escaping NO_ESCAPING = URLEscaper.Escaping.NO_ESCAPING;", "type": "URLEscaper.Escaping", "var_name": "NO_ESCAPING" ...
{ "body": "@Test(dataProvider = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + \"complexKey\")\n public void testComplexKeyToString(ProtocolVersion version, String full, String notFull)\n {\n MyComplexKey myComplexKey1 = new MyComplexKey();\n myComplexKey1.setA(\"stringVal\");\n myComplexKey1.setB(3);\n MyC...
{ "fields": [ { "declarator": "_EMPTY_STRING_ARRAY = new String[0]", "modifier": "private static final", "original_string": "private static final String[] _EMPTY_STRING_ARRAY = new String[0];", "type": "String[]", "var_name": "_EMPTY_STRING_ARRAY" }, { "declarator": "NO...
{ "body": "public static String keyToString(Object key,\n URLEscaper.Escaping escaping,\n UriComponent.Type componentType,\n boolean full,\n ProtocolVersion version)\n {\n if (ve...
{ "created": "11/30/2012 7:37:51 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 6944525, "size": null, "stargazer_count": null, "stars": 2005, "updates": "2020-01-26T06:06:48+00:00", "url": "https://github.com/linkedin/rest.l...
6944525_219
{ "fields": [], "file": "restli-tools/src/test/java/com/linkedin/restli/tools/data/TestPredicateExpressionParser.java", "identifier": "TestPredicateExpressionParser", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = EmptyStackException.class)\n public void testMissingOperand1And()\n {\n PredicateExpressionParser.parse(\"& com.linkedin.data.it.AlwaysFalsePredicate\");\n }", "class_method_signature": "TestPredicateExpressionParser.testMissingOperand1And()", "constructor": false, "f...
{ "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_327
{ "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 testSymlinkExists() throws InterruptedException\n {\n final CountDownLatch latch = new CountDownLatch(1);\n AsyncCallback.StatCallback callback = new AsyncCallback.StatCallback()\n {\n @Override\n public void processResult(int rc, String path, Object ctx, Stat stat)...
{ "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 exists(final String path, final boolean watch, final AsyncCallback.StatCallback cb, final Object ctx)\n {\n if (!SymlinkUtil.containsSymlink(path))\n {\n _zk.exists(path, watch, cb, ctx);\n }\n else\n {\n SymlinkStatCallback compositeCallback = new Symlink...
{ "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_90
{ "fields": [ { "declarator": "fooSchemaText =\n \"{\" +\n \" \\\"name\\\" : \\\"Foo\\\",\" +\n \" \\\"type\\\" : \\\"record\\\",\" +\n \" \\\"fields\\\" : [\" +\n \" { \\\"name\\\" : \\\"intField\\\", \\\"type\\\" : \\\"int\\\", \\\"optional\\\" : true },\" +\n \" { \...
{ "body": "@Test\n public void testBuildSkeletonSchema() throws Exception\n {\n DataSchema oldSchema = null;\n RecordDataSchema fooSchema = (RecordDataSchema) TestUtil.dataSchemaFromString(fooSchemaText);\n // Test Record\n RecordDataSchema newRecordSchema = (RecordDataSchema) CopySchemaUtil.buildSkelet...
{ "fields": [], "file": "data/src/main/java/com/linkedin/data/schema/util/CopySchemaUtil.java", "identifier": "CopySchemaUtil", "interfaces": "", "methods": [ { "class_method_signature": "CopySchemaUtil.buildSkeletonSchema(DataSchema schema)", "constructor": false, "full_signature": "pub...
{ "body": "public static DataSchema buildSkeletonSchema(DataSchema schema) throws CloneNotSupportedException\n {\n switch (schema.getType())\n {\n case RECORD:\n RecordDataSchema newRecordSchema = new RecordDataSchema(new Name(((RecordDataSchema) schema).getFullName()),\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_632
{ "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 testEmptyJSONByteStringToDataMap() throws MimeTypeParseException, IOException\n {\n bytesToDataMap(\"application/json\", ByteString.copy(new byte[0]));\n }", "class_method_signature": "TestDataMapConverter.testEmptyJSONByteStringToDataMap(...
{ "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_262
{ "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 testDataTranslator() throws IOException\n {\n boolean debug = false;\n\n String[][][] inputs =\n {\n // {\n // {\n // 1 string holding the Pegasus schema in JSON.\n // The string may be marked with ##T_START and ##T_END markers. The markers are...
{ "fields": [ { "declarator": "_dataTranslationOptions", "modifier": "protected", "original_string": "protected DataTranslationOptions _dataTranslationOptions;", "type": "DataTranslationOptions", "var_name": "_dataTranslationOptions" }, { "declarator": "_genericData = G...
{ "body": "protected DataTranslator()\n {\n }", "class_method_signature": "DataTranslator.DataTranslator()", "constructor": true, "full_signature": "protected DataTranslator()", "identifier": "DataTranslator", "invocations": [], "modifiers": "protected", "parameters": "()", "return": "", "signatu...
{ "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_409
{ "fields": [ { "declarator": "CONTENT = ByteString.copy(new byte[8092])", "modifier": "private static final", "original_string": "private static final ByteString CONTENT = ByteString.copy(new byte[8092]);", "type": "ByteString", "var_name": "CONTENT" }, { "declarator":...
{ "body": "@Test\n public void testStreamRetryOverLimit() throws Exception\n {\n SimpleLoadBalancer balancer = prepareLoadBalancer(Arrays.asList(\"http://test.linkedin.com/retry1\", \"http://test.linkedin.com/retry2\"));\n\n DynamicClient dynamicClient = new DynamicClient(balancer, null);\n RetryClient cli...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(RetryClient.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(RetryClient.class);", "type": "Logger", "var_name": "LOG" }, { "declarator...
{ "body": "@Override\n public void streamRequest(StreamRequest request, Callback<StreamResponse> callback)\n {\n streamRequest(request, new RequestContext(), callback);\n }", "class_method_signature": "RetryClient.streamRequest(StreamRequest request, Callback<StreamResponse> callback)", "constructor": false...
{ "created": "11/30/2012 7:37:51 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 6944525, "size": null, "stargazer_count": null, "stars": 2005, "updates": "2020-01-26T06:06:48+00:00", "url": "https://github.com/linkedin/rest.l...
6944525_370
{ "fields": [ { "declarator": "MY_SERVICES_FS = \"myServices\"", "modifier": "public static final", "original_string": "public static final String MY_SERVICES_FS = \"myServices\";", "type": "String", "var_name": "MY_SERVICES_FS" }, { "declarator": "UNVALID_FILES = Array...
{ "body": "@Test\n public void testNoMakingWarmUpRequestsWithoutValidFiles() throws URISyntaxException, InterruptedException, ExecutionException, TimeoutException\n {\n createServicesIniFiles(UNVALID_FILES);\n\n TestLoadBalancer balancer = new TestLoadBalancer();\n AtomicInteger requestCount = balancer.get...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(WarmUpLoadBalancer.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(WarmUpLoadBalancer.class);", "type": "Logger", "var_name": "LOG" }, { ...
{ "body": "@Override\n public void start(Callback<None> callback)\n {\n LOG.info(\"D2 WarmUp enabled\");\n _loadBalancer.start(new Callback<None>()\n {\n @Override\n public void onError(Throwable e)\n {\n callback.onError(e);\n }\n\n @Override\n public void onSuccess(No...
{ "created": "11/30/2012 7:37:51 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 6944525, "size": null, "stargazer_count": null, "stars": 2005, "updates": "2020-01-26T06:06:48+00:00", "url": "https://github.com/linkedin/rest.l...
6944525_235
{ "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\n public void testIncompatibleRestSpecVsSnapshot()\n {\n final Collection<CompatibilityInfo> restSpecErrors = new HashSet<CompatibilityInfo>();\n final Collection<CompatibilityInfo> restSpecDiffs = new HashSet<CompatibilityInfo>();\n restSpecErrors.add(new CompatibilityInfo(Arrays.<Object>...
{ "fields": [ { "declarator": "_resolverPath", "modifier": "private", "original_string": "private String _resolverPath;", "type": "String", "var_name": "_resolverPath" }, { "declarator": "_infoMap = new CompatibilityInfoMap()", "modifier": "private final", "...
{ "body": "public CompatibilityInfoMap checkRestSpecVsSnapshot(String prevRestSpecPath, String currSnapshotPath, CompatibilityLevel compatLevel)\n {\n return checkCompatibility(prevRestSpecPath, currSnapshotPath, compatLevel, true);\n }", "class_method_signature": "RestLiSnapshotCompatibilityChecker.checkRestS...
{ "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_28
{ "fields": [], "file": "r2-disruptor/src/test/java/com/linkedin/r2/disruptor/TestDisruptContexts.java", "identifier": "TestDisruptContexts", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testTimeout()\n {\n DisruptContexts.TimeoutDisruptContext context =\n (DisruptContexts.TimeoutDisruptContext) DisruptContexts.timeout();\n Assert.assertEquals(context.mode(), DisruptMode.TIMEOUT);\n }", "class_method_signature": "TestDisruptContexts.testTimeout()", "...
{ "fields": [], "file": "r2-disruptor/src/main/java/com/linkedin/r2/disruptor/DisruptContexts.java", "identifier": "DisruptContexts", "interfaces": "", "methods": [ { "class_method_signature": "DisruptContexts.delay(long delay)", "constructor": false, "full_signature": "public static Dis...
{ "body": "public static DisruptContext timeout()\n {\n return new TimeoutDisruptContext();\n }", "class_method_signature": "DisruptContexts.timeout()", "constructor": false, "full_signature": "public static DisruptContext timeout()", "identifier": "timeout", "invocations": [], "modifiers": "public s...
{ "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_665
{ "fields": [], "file": "restli-common/src/test/java/com/linkedin/restli/internal/common/TestQueryParamsDataMap.java", "identifier": "TestQueryParamsDataMap", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testNumericKeyIndicesWithHoles() throws Exception\n {\n DataMap queryParamDataMap = queryParamsDataMap(\"ids[4]=1&ids[1]=0&ids[8]=2\");\n Object idsObj = queryParamDataMap.get(\"ids\");\n Assert.assertTrue(idsObj instanceof DataList);\n DataList ids = (DataList) idsObj;\n ...
{ "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_366
{ "fields": [ { "declarator": "TOLERANCE = 0.05d", "modifier": "private static final", "original_string": "private static final double TOLERANCE = 0.05d;", "type": "double", "var_name": "TOLERANCE" }, { "declarator": "RANDOM_SEED = 42", "modifier": "private static...
{ "body": "@Test(dataProvider = \"ringFactories\")\n public void testMapKeysV3StickKey(RingFactory<URI> ringFactory) throws URISyntaxException, ServiceUnavailableException\n {\n int numHost = 2;\n URI serviceURI = new URI(\"d2://articles\");\n ConsistentHashKeyMapper mapper = getConsistentHashKeyMapper(rin...
{ "fields": [ { "declarator": "_hashFunction", "modifier": "private final", "original_string": "private final HashFunction<String[]> _hashFunction;", "type": "HashFunction<String[]>", "var_name": "_hashFunction" }, { "declarator": "_ringProvider", "modifier": "pri...
{ "body": "@Override\n public <K> HostToKeyMapper<K> mapKeysV3(URI serviceUri, Collection<K> keys, int limitNumHostsPerPartition)\n throws ServiceUnavailableException\n {\n return getHostToKeyMapper(serviceUri, keys, limitNumHostsPerPartition, null);\n }", "class_method_signature": "ConsistentHashKey...
{ "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_673
{ "fields": [], "file": "restli-common/src/test/java/com/linkedin/restli/internal/common/TestURIDecoderUtils.java", "identifier": "TestURIDecoderUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test(dataProvider = \"validEncodedText\")\n public void testDecodeValidStrings(String encoded, String expected)\n {\n String actual = URIDecoderUtils.decode(encoded);\n\n Assert.assertEquals(actual, expected, \"Encoded string was incorrectly decoded.\");\n }", "class_method_signature": "TestURI...
{ "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 String decode(String s)\n {\n final int n = s.length();\n StringBuilder result = new StringBuilder(n);\n for (int i = 0; i < n; i++)\n {\n char c = s.charAt(i);\n if (c == '%')\n {\n int numCharsConsumed = decodeConsecutiveOctets(result, s, i);\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_389
{ "fields": [ { "declarator": "HOST_OVERRIDE_LIST = \"HOST_OVERRIDE_LIST\"", "modifier": "private static final", "original_string": "private static final String HOST_OVERRIDE_LIST = \"HOST_OVERRIDE_LIST\";", "type": "String", "var_name": "HOST_OVERRIDE_LIST" }, { "decla...
{ "body": "@Test\n public void testClusterInfoProviderGetDarkClustersNoUris()\n throws InterruptedException, ExecutionException, ServiceUnavailableException\n {\n MockStore<ServiceProperties> serviceRegistry = new MockStore<>();\n MockStore<ClusterProperties> clusterRegistry = new MockStore<>();\n Moc...
{ "fields": [ { "declarator": "HOST_OVERRIDE_LIST = \"HOST_OVERRIDE_LIST\"", "modifier": "private static final", "original_string": "private static final String HOST_OVERRIDE_LIST = \"HOST_OVERRIDE_LIST\";", "type": "String", "var_name": "HOST_OVERRIDE_LIST" }, { "decla...
{ "body": "@Override\n public DarkClusterConfigMap getDarkClusterConfigMap(String clusterName) throws ServiceUnavailableException\n {\n FutureCallback<DarkClusterConfigMap> darkClusterConfigMapFutureCallback = new FutureCallback<>();\n getDarkClusterConfigMap(clusterName, darkClusterConfigMapFutureCallback);\...
{ "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_223
{ "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 testMissingCloseParen()\n {\n PredicateExpressionParser.parse(\"(com.linkedin.data.it.AlwaysFalsePredicate\");\n }", "class_method_signature": "TestPredicateExpressionParser.testMissingCloseParen()", "constructor": false, "full_si...
{ "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_448
{ "fields": [], "file": "restli-server/src/test/java/com/linkedin/restli/internal/server/TestResourceContextImpl.java", "identifier": "TestResourceContextImpl", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = IllegalArgumentException.class)\n public void testSetRestLiIdHeader() throws RestLiSyntaxException\n {\n final ResourceContextImpl context = new ResourceContextImpl();\n context.setResponseHeader(RestConstants.HEADER_RESTLI_ID, \"foobar\");\n }", "class_method_signatur...
{ "fields": [ { "declarator": "INITIAL_CUSTOM_REQUEST_CONTEXT_CAPACITY = 1", "modifier": "private static final", "original_string": "private static final int INITIAL_CUSTOM_REQUEST_CONTEXT_CAPACITY = 1;", "type": "int", "var_name": "INITIAL_CUSTOM_REQUEST_CONTEXT_CAPACITY" }, ...
{ "body": "@Override\n public void setResponseHeader(final String name, final String value)\n {\n final String headerName;\n if (RestConstants.HEADER_ID.equals(name))\n {\n headerName = RestConstants.HEADER_ID;\n }\n else if (RestConstants.HEADER_RESTLI_ID.equals(name))\n {\n headerName ...
{ "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_86
{ "fields": [ { "declarator": "simpleTestSchema =\n \"record Test {\" +\n \" @customAnnotation = {\" +\n \" \\\"/f1/f2\\\": \\\"sth\\\"\" +\n \" }\" +\n \" f0: record A {\" +\n \" f1: A\" +\n \" f2: string\" +\n \" }\" +\n \" f1: union[int, array[st...
{ "body": "@Test\n public void testHandlerValidationFailure() throws Exception\n {\n RecordDataSchema testSchema = (RecordDataSchema) TestUtil.dataSchemaFromPdlString(simpleTestSchema);\n\n SchemaAnnotationHandler testHandlerWithFailure = new PegasusSchemaAnnotationHandlerImpl(TEST_ANNOTATION_LABEL)\n {\n ...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(SchemaAnnotationProcessor.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(SchemaAnnotationProcessor.class);", "type": "Logger", "var_name": "LOG" ...
{ "body": "public static SchemaAnnotationProcessResult process(List<SchemaAnnotationHandler> handlers,\n DataSchema dataSchema, AnnotationProcessOption options)\n {\n\n SchemaAnnotationProcessResult processResult = new SchemaAnnotationProcessResult();\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_331
{ "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 testSymlinkWithExistWatch() throws InterruptedException, ExecutionException\n {\n final CountDownLatch latch = new CountDownLatch(1);\n final CountDownLatch latch2 = new CountDownLatch(1);\n final AsyncCallback.StatCallback existCallback = new AsyncCallback.StatCallback()\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 exists(final String path, final boolean watch, final AsyncCallback.StatCallback cb, final Object ctx)\n {\n if (!SymlinkUtil.containsSymlink(path))\n {\n _zk.exists(path, watch, cb, ctx);\n }\n else\n {\n SymlinkStatCallback compositeCallback = new Symlink...
{ "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_274
{ "fields": [ { "declarator": "temp", "modifier": "private", "original_string": "private File temp;", "type": "File", "var_name": "temp" } ], "file": "gradle-plugins/src/test/java/com/linkedin/pegasus/gradle/TestPathingJarUtil.java", "identifier": "TestPathingJarUtil", "i...
{ "body": "@Test\n public void testDoesNotCreatePathingJar() throws IOException\n {\n //setup\n createTempDir();\n Project project = ProjectBuilder.builder().withProjectDir(temp).build();\n String taskName = \"myTaskName\";\n\n project.getBuildDir().mkdir();\n File tempFile = new File(project.getB...
{ "fields": [ { "declarator": "LOG = Logging.getLogger(PathingJarUtil.class)", "modifier": "private final static", "original_string": "private final static Logger LOG = Logging.getLogger(PathingJarUtil.class);", "type": "Logger", "var_name": "LOG" } ], "file": "gradle-plugins...
{ "body": "public static FileCollection generatePathingJar(final Project project, final String taskName, final FileCollection classpath,\n boolean alwaysUsePathingJar) throws IOException {\n //There is a bug in the Scala nsc compiler that does not parse the dependencies of JARs in the JAR manifest\n //As suc...
{ "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_69
{ "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 testAppendNames()\n {\n Object inputs[][] =\n {\n {\n asCollection(\"a\", 1, \"b\"),\n \"a[1].b\"\n },\n {\n asCollection(2, \"b\"),\n \"[2].b\"\n },\n {\n asCollection(3, 4, \"b\"),\n \"[3]...
{ "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 public void appendNames(StringBuilder builder, Collection<Object> names)\n {\n boolean first = true;\n for (Object name : names)\n {\n if (name instanceof Integer)\n {\n builder.append('[').append(name).append(']');\n }\n else\n {\n if (first == false...
{ "created": "11/30/2012 7:37:51 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 6944525, "size": null, "stargazer_count": null, "stars": 2005, "updates": "2020-01-26T06:06:48+00:00", "url": "https://github.com/linkedin/rest.l...
6944525_624
{ "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\n public void testDataMapToJSONByteString() throws MimeTypeParseException, IOException\n {\n DataMap testDataMap = createTestDataMap();\n byte[] expectedBytes = JACKSON_DATA_CODEC.mapToBytes(testDataMap);\n\n Map<String, String> headers = Collections.singletonMap(RestConstants.HEADER_CONTE...
{ "fields": [], "file": "restli-common/src/main/java/com/linkedin/restli/internal/common/DataMapConverter.java", "identifier": "DataMapConverter", "interfaces": "", "methods": [ { "class_method_signature": "DataMapConverter.dataMapToByteString(Map<String, String> headers, DataMap dataMap)", "c...
{ "body": "public static ByteString dataMapToByteString(Map<String, String> headers, DataMap dataMap) throws MimeTypeParseException, IOException\n {\n return ByteString.unsafeWrap(getContentType(headers).getCodec().mapToBytes(dataMap));\n }", "class_method_signature": "DataMapConverter.dataMapToByteString(Map<...
{ "created": "11/30/2012 7:37:51 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 6944525, "size": null, "stargazer_count": null, "stars": 2005, "updates": "2020-01-26T06:06:48+00:00", "url": "https://github.com/linkedin/rest.l...
6944525_653
{ "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 addSortedParams()\n {\n DataMap queryParams = new DataMap();\n DataMap aParamMap = new DataMap();\n aParamMap.put(\"someField\", \"someValue\");\n aParamMap.put(\"foo\", \"bar\");\n aParamMap.put(\"empty\", new DataMap());\n DataList bParamList = new DataList();\n ...
{ "fields": [ { "declarator": "_EMPTY_STRING_ARRAY = new String[0]", "modifier": "private static final", "original_string": "private static final String[] _EMPTY_STRING_ARRAY = new String[0];", "type": "String[]", "var_name": "_EMPTY_STRING_ARRAY" }, { "declarator": "NO...
{ "body": "public static void addSortedParams(UriBuilder uriBuilder, DataMap params, ProtocolVersion version)\n {\n if(version.compareTo(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion()) >= 0)\n {\n addSortedParams(uriBuilder, params);\n }\n else\n {\n QueryParamsDataMap.addSor...
{ "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_203
{ "fields": [], "file": "restli-tools/src/test/java/com/linkedin/restli/tools/data/TestPredicateExpressionParser.java", "identifier": "TestPredicateExpressionParser", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testParen()\n {\n final Predicate parsed = PredicateExpressionParser.parse(\"(com.linkedin.data.it.AlwaysTruePredicate)\");\n Assert.assertEquals(parsed.getClass(), AlwaysTruePredicate.class);\n }", "class_method_signature": "TestPredicateExpressionParser.testParen()", "con...
{ "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_346
{ "fields": [], "file": "d2/src/test/java/com/linkedin/d2/backuprequests/TestTrackingBackupRequestsStrategy.java", "identifier": "TestTrackingBackupRequestsStrategy", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testNoActivityDiffStats()\n {\n TrackingBackupRequestsStrategy trackingStrategy =\n new TrackingBackupRequestsStrategy(new MockBackupRequestsStrategy(() -> Optional.of(10000000L), () -> true));\n BackupRequestsStrategyStats stats = trackingStrategy.getDiffStats();\n as...
{ "fields": [ { "declarator": "_delegate", "modifier": "private final", "original_string": "private final BackupRequestsStrategy _delegate;", "type": "BackupRequestsStrategy", "var_name": "_delegate" }, { "declarator": "_totalAllowedCount = new LongAdder()", "modi...
{ "body": "@Override\n public BackupRequestsStrategyStats getDiffStats()\n {\n BackupRequestsStrategyStats stats = doGetDiffStats();\n while (stats == null)\n {\n stats = doGetDiffStats();\n }\n return stats;\n }", "class_method_signature": "TrackingBackupRequestsStrategy.getDiffStats()", "...
{ "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_595
{ "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 testRestToNettyRequest() throws Exception\n {\n RestRequestBuilder restRequestBuilder = new RestRequestBuilder(new URI(ANY_URI));\n restRequestBuilder.setMethod(\"POST\");\n restRequestBuilder.setEntity(ByteString.copyString(ANY_ENTITY, Charset.defaultCharset()));\n restRe...
{ "fields": [ { "declarator": "HEADER_BLACKLIST = new HashSet<>()", "modifier": "private static final", "original_string": "private static final HashSet<String> HEADER_BLACKLIST = new HashSet<>();", "type": "HashSet<String>", "var_name": "HEADER_BLACKLIST" } ], "file": "r2-ne...
{ "body": "public static HttpRequest toNettyRequest(RestRequest request) throws Exception\n {\n HttpMethod nettyMethod = HttpMethod.valueOf(request.getMethod());\n URL url = new URL(request.getURI().toString());\n String path = url.getFile();\n // RFC 2616, section 5.1.2:\n // Note that the absolute...
{ "created": "11/30/2012 7:37:51 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 6944525, "size": null, "stargazer_count": null, "stars": 2005, "updates": "2020-01-26T06:06:48+00:00", "url": "https://github.com/linkedin/rest.l...
6944525_254
{ "fields": [ { "declarator": "FS = File.separator", "modifier": "private static final", "original_string": "private static final String FS = File.separator;", "type": "String", "var_name": "FS" } ], "file": "data-avro/src/test/java/com/linkedin/data/avro/TestSchemaTranslator...
{ "body": "@Test(dataProvider = \"toAvroSchemaData_testTypeRefAnnotationPropagation\")\n public void testToAvroSchema_testTypeRefAnnotationPropagation(String schemaBeforeTranslation,\n String expectedAvroSchemaAsString) throws Exception\n {\n DataSchema ...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(SchemaTranslator.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(SchemaTranslator.class);", "type": "Logger", "var_name": "log" }, { "...
{ "body": "public static String dataToAvroSchemaJson(DataSchema dataSchema)\n {\n return dataToAvroSchemaJson(dataSchema, new DataToAvroSchemaTranslationOptions());\n }", "class_method_signature": "SchemaTranslator.dataToAvroSchemaJson(DataSchema dataSchema)", "constructor": false, "full_signature": "publi...
{ "created": "11/30/2012 7:37:51 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 6944525, "size": null, "stargazer_count": null, "stars": 2005, "updates": "2020-01-26T06:06:48+00:00", "url": "https://github.com/linkedin/rest.l...
6944525_49
{ "fields": [ { "declarator": "plusTenTransform = new Transform<Object, Object>()\n {\n @Override\n public Object apply(Object element)\n {\n Integer val = (Integer)element;\n return val + 10;\n }\n }", "modifier": "private static", "origin...
{ "body": "@Test\n public void testReplaceByPredicate() throws Exception\n {\n SimpleTestData data = IteratorTestData.createSimpleTestData();\n \n Builder.create(data.getDataElement(), IterationOrder.PRE_ORDER)\n .filterBy(Predicates.pathMatchesPathSpec(IteratorTestData.PATH_TO_ID))\n .replace(100);\...
{ "fields": [], "file": "data/src/main/java/com/linkedin/data/it/Transformer.java", "identifier": "Transformer", "interfaces": "", "methods": [ { "class_method_signature": "Transformer.transform(Object root, DataIterator it, Transform<Object,Object> transform)", "constructor": false, "fu...
{ "body": "public static Object replace(Object root, DataIterator it, Object value)\n {\n return transform(root, it, Transforms.constantValue(value));\n }", "class_method_signature": "Transformer.replace(Object root, DataIterator it, Object value)", "constructor": false, "full_signature": "public static Ob...
{ "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_604
{ "fields": [], "file": "restli-common/src/test/java/com/linkedin/restli/common/TestCompoundKey.java", "identifier": "TestCompoundKey", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = UnsupportedOperationException.class)\n public void testMakeReadOnly()\n {\n CompoundKey compoundKey = new CompoundKey();\n compoundKey.append(\"foo\", \"foo-value\");\n compoundKey.append(\"bar\", 1);\n compoundKey.append(\"baz\", 7L);\n\n compoundKey.makeReadOnl...
{ "fields": [ { "declarator": "_keys", "modifier": "private final", "original_string": "private final Map<String, ValueAndTypeInfoPair> _keys;", "type": "Map<String, ValueAndTypeInfoPair>", "var_name": "_keys" }, { "declarator": "_isReadOnly", "modifier": "private...
{ "body": "public void makeReadOnly()\n {\n _isReadOnly = true;\n }", "class_method_signature": "CompoundKey.makeReadOnly()", "constructor": false, "full_signature": "public void makeReadOnly()", "identifier": "makeReadOnly", "invocations": [], "modifiers": "public", "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_311
{ "fields": [ { "declarator": "KEY_H = TimingKey.registerNewKey(\"test/h\", TimingImportance.HIGH)", "modifier": "private static final", "original_string": "private static final TimingKey KEY_H = TimingKey.registerNewKey(\"test/h\", TimingImportance.HIGH);", "type": "TimingKey", "var...
{ "body": "@Test\n public void testOrdering()\n {\n final RequestContext requestContext = new RequestContext();\n final Callback<Long> callback = new Callback<Long>()\n {\n @Override\n public void onSuccess(Long result)\n {\n Map<TimingKey, TimingContextUtil.TimingContext> timings = T...
{ "fields": [ { "declarator": "_callback", "modifier": "private final", "original_string": "private final Callback<T> _callback;", "type": "Callback<T>", "var_name": "_callback" }, { "declarator": "_requestContext", "modifier": "private final", "original_str...
{ "body": "@Override\n public void onSuccess(T result) {\n markTimings();\n _callback.onSuccess(result);\n }", "class_method_signature": "TimingCallback.onSuccess(T result)", "constructor": false, "full_signature": "@Override public void onSuccess(T result)", "identifier": "onSuccess", "invocations"...
{ "created": "11/30/2012 7:37:51 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 6944525, "size": null, "stargazer_count": null, "stars": 2005, "updates": "2020-01-26T06:06:48+00:00", "url": "https://github.com/linkedin/rest.l...