id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
6944525_492 | {
"fields": [
{
"declarator": "context",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private ServerResourceContext context;",
"type": "ServerResourceContext",
"var_name": "context"
},
{
"declarator": "resourceMethod",
"modifier": "@Mock\n private... | {
"body": "@Test\n public void testFilterScratchpad()\n {\n FilterRequestContext filterContext = new FilterRequestContextInternalImpl(context, resourceMethod, null);\n Object spValue = new Object();\n String spKey = UUID.randomUUID().toString();\n filterContext.getFilterScratchpad().put(spKey, spValue);... | {
"fields": [
{
"declarator": "_requestData",
"modifier": "private",
"original_string": "private RestLiRequestData _requestData;",
"type": "RestLiRequestData",
"var_name": "_requestData"
},
{
"declarator": "_context",
"modifier": "private final",
"original_s... | {
"body": "@Override\n public Map<String, Object> getFilterScratchpad()\n {\n return _scratchPad;\n }",
"class_method_signature": "FilterRequestContextInternalImpl.getFilterScratchpad()",
"constructor": false,
"full_signature": "@Override public Map<String, Object> getFilterScratchpad()",
"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_538 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/response/TestGetResponseBuilder.java",
"identifier": "TestGetResponseBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testProjectionInBuildRestliResponseData()\n {\n MaskTree maskTree = new MaskTree();\n maskTree.addOperation(new PathSpec(\"fruitsField\"), MaskOperation.POSITIVE_MASK_OP);\n\n ServerResourceContext mockContext = getMockResourceContext(maskTree, ProjectionMode.AUTOMATIC);\n ... | {
"fields": [],
"file": "restli-server/src/main/java/com/linkedin/restli/internal/server/response/GetResponseBuilder.java",
"identifier": "GetResponseBuilder",
"interfaces": "implements RestLiResponseBuilder<RestLiResponseData<GetResponseEnvelope>>",
"methods": [
{
"class_method_signature": "GetResp... | {
"body": "@Override\n public RestLiResponseData<GetResponseEnvelope> 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_187 | {
"fields": [],
"file": "restli-tools/src/test/java/com/linkedin/restli/tools/data/TestPredicateExpressionParser.java",
"identifier": "TestPredicateExpressionParser",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testPredicate()\n {\n final Predicate parsed = PredicateExpressionParser.parse(\"com.linkedin.data.it.AlwaysTruePredicate\");\n Assert.assertEquals(parsed.getClass(), AlwaysTruePredicate.class);\n }",
"class_method_signature": "TestPredicateExpressionParser.testPredicate()",
... | {
"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_353 | {
"fields": [
{
"declarator": "TEST_SERVICE = URIMapperTestUtil.TEST_SERVICE",
"modifier": "private static final",
"original_string": "private static final String TEST_SERVICE = URIMapperTestUtil.TEST_SERVICE;",
"type": "String",
"var_name": "TEST_SERVICE"
},
{
"declara... | {
"body": "@Test\n public void testNeedScatterGather() throws ServiceUnavailableException\n {\n // Both sticky and partitioned\n HashRingProvider ringProvider = createStaticHashRingProvider(100, 10, getHashFunction(true));\n PartitionInfoProvider infoProvider = createRangeBasedPartitionInfoProvider(10);\n ... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(RingBasedUriMapper.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(RingBasedUriMapper.class);",
"type": "Logger",
"var_name": "LOG"
},
{
... | {
"body": "@Override\n public boolean needScatterGather(String serviceName) throws ServiceUnavailableException\n {\n return isPartitioningEnabled(serviceName) || isStickyEnabled(serviceName);\n }",
"class_method_signature": "RingBasedUriMapper.needScatterGather(String serviceName)",
"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_216 | {
"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 testTooManyPredicates()\n {\n PredicateExpressionParser.parse(\"com.linkedin.data.it.AlwaysTruePredicate com.linkedin.data.it.AlwaysFalsePredicate\");\n }",
"class_method_signature": "TestPredicateExpressionParser.testTooManyPredicate... | {
"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_646 | {
"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 = \"maps\")\n public void testStringMapElement(DataMap map, String expectedElement)\n {\n String stringSimpleMap = URIParamUtils.encodeElement(map, NO_ESCAPING, null);\n Assert.assertEquals(stringSimpleMap, expectedElement);\n }",
"class_method_signature": "TestUriParamUtils.t... | {
"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_580 | {
"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 testDebugRequestHandlers(final RestOrStream restOrStream) throws URISyntaxException\n {\n //Without a resource\n final Callback<RestResponse> noResourceRestResponseCallback = new Callback<RestResponse>()\n {\n @Override\n public voi... | {
"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_70 | {
"fields": [],
"file": "data/src/test/java/com/linkedin/data/schema/TestDataSchema.java",
"identifier": "TestDataSchema",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testPretty() throws UnsupportedEncodingException, IOException\n {\n String schemaText =\n \"{ \" +\n \" \\\"type\\\": \\\"record\\\",\" +\n \" \\\"name\\\": \\\"LongList\\\",\" +\n \" \\\"fields\\\" : [\" +\n \" {\\\"name\\\": \\\"value\\\", \\\"type\... | {
"fields": [
{
"declarator": "_type",
"modifier": "private final",
"original_string": "private final Type _type;",
"type": "Type",
"var_name": "_type"
},
{
"declarator": "_resolvedProperties = new HashMap<>()",
"modifier": "",
"original_string": "Map<String... | {
"body": "public abstract boolean hasError();",
"class_method_signature": "DataSchema.hasError()",
"constructor": false,
"full_signature": "public abstract boolean hasError()",
"identifier": "hasError",
"invocations": [],
"modifiers": "public abstract",
"parameters": "()",
"return": "boolean",
"sig... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_328 | {
"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 testSymlinkGetChildren() throws InterruptedException, ExecutionException, IOException\n {\n final CountDownLatch latch = new CountDownLatch(1);\n AsyncCallback.ChildrenCallback callback = new AsyncCallback.ChildrenCallback()\n {\n @Override\n public void processResu... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(SymlinkAwareZooKeeper.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(SymlinkAwareZooKeeper.class);",
"type": "Logger",
"var_name": "LOG"
},
... | {
"body": "@Override\n public void getChildren(final String path, final boolean watch, final AsyncCallback.ChildrenCallback cb, final Object ctx)\n {\n if (!SymlinkUtil.containsSymlink(path))\n {\n _zk.getChildren(path, watch, cb, ctx);\n }\n else\n {\n SymlinkChildrenCallback compositeCall... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_282 | {
"fields": [
{
"declarator": "THROWABLE = new Throwable()",
"modifier": "private static final",
"original_string": "private static final Throwable THROWABLE = new Throwable();",
"type": "Throwable",
"var_name": "THROWABLE"
},
{
"declarator": "CASE_SENSITIVE_WIRE_ATTRIB... | {
"body": "@Test\n public void testErrorResponse()\n {\n doTestErrorResponse(TransportResponseImpl.error(THROWABLE));\n doTestErrorResponse(TransportResponseImpl.error(THROWABLE, CASE_SENSITIVE_WIRE_ATTRIBUTES));\n }",
"class_method_signature": "TestTransportResponseImpl.testErrorResponse()",
"constructo... | {
"fields": [
{
"declarator": "_response",
"modifier": "private final",
"original_string": "private final T _response;",
"type": "T",
"var_name": "_response"
},
{
"declarator": "_error",
"modifier": "private final",
"original_string": "private final Throwabl... | {
"body": "public static <T> TransportResponse<T> error(Throwable error, Map<String, String> wireAttrs)\n {\n Map<String, String> caseInsensitiveWireAttrs = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);\n caseInsensitiveWireAttrs.putAll(wireAttrs);\n return new TransportResponseImpl<T>(null, error, caseInse... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_451 | {
"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 testUnmodifiablePathKeysMap() throws RestLiSyntaxException\n {\n final ResourceContextImpl context = new ResourceContextImpl();\n context.getPathKeys().getKeyMap().put(\"should\", \"puke\");\n }",
"class_method_signatu... | {
"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 MutablePathKeys getPathKeys()\n {\n return _pathKeys;\n }",
"class_method_signature": "ResourceContextImpl.getPathKeys()",
"constructor": false,
"full_signature": "@Override public MutablePathKeys getPathKeys()",
"identifier": "getPathKeys",
"invocations": [],
"modifier... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_514 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/response/TestBatchGetResponseBuilder.java",
"identifier": "TestBatchGetResponseBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testProjectionInBuildRestliResponseData()\n {\n MaskTree maskTree = new MaskTree();\n maskTree.addOperation(new PathSpec(\"fruitsField\"), MaskOperation.POSITIVE_MASK_OP);\n\n ServerResourceContext mockContext = EasyMock.createMock(ServerResourceContext.class);\n EasyMock.... | {
"fields": [
{
"declarator": "_errorResponseBuilder",
"modifier": "private final",
"original_string": "private final ErrorResponseBuilder _errorResponseBuilder;",
"type": "ErrorResponseBuilder",
"var_name": "_errorResponseBuilder"
}
],
"file": "restli-server/src/main/java/co... | {
"body": "@Override\n public RestLiResponseData<BatchGetResponseEnvelope> buildRestLiResponseData(Request request,\n RoutingResult routingResult,\n Object result,\n ... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_144 | {
"fields": [
{
"declarator": "TARGET_HOST_KEY_NAME = \"D2-KeyMapper-TargetHost\"",
"modifier": "private static final",
"original_string": "private static final String TARGET_HOST_KEY_NAME = \"D2-KeyMapper-TargetHost\";",
"type": "String",
"var_name": "TARGET_HOST_KEY_NAME"
},
... | {
"body": "@Test(dataProvider = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + \"requestUris\")\n @SuppressWarnings(\"unchecked\")\n public void testGetUris(Request<?> request, ProtocolVersion version, List<URIKeyPair<Long>> expectedUris)\n {\n List<URIKeyPair<Long>> uris = _sgStrategy.getUris(request, version);\n ... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(DefaultScatterGatherStrategy.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(DefaultScatterGatherStrategy.class);",
"type": "Logger",
"var_name": "l... | {
"body": "@Override\n @SuppressWarnings(\"rawtypes\")\n public <K, T> List<URIKeyPair<K>> getUris(Request<T> request, ProtocolVersion version) {\n BatchRequest<T> batchRequest = safeCastRequest(request);\n @SuppressWarnings(\"unchecked\")\n Set<K> keys = (Set<K>) batchRequest.getObjectIds();\n return k... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_390 | {
"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 testClusterInfoProviderGetDarkClustersNoCluster()\n throws InterruptedException, ExecutionException, ServiceUnavailableException\n {\n MockStore<ServiceProperties> serviceRegistry = new MockStore<>();\n MockStore<ClusterProperties> clusterRegistry = new MockStore<>();\n Mo... | {
"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_27 | {
"fields": [],
"file": "r2-disruptor/src/test/java/com/linkedin/r2/disruptor/TestDisruptContexts.java",
"identifier": "TestDisruptContexts",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMinimumDelay()\n {\n final long latency = 4200;\n DisruptContexts.MinimumDelayDisruptContext context =\n (DisruptContexts.MinimumDelayDisruptContext) DisruptContexts.minimumDelay(latency);\n Assert.assertEquals(context.mode(), DisruptMode.MINIMUM_DELAY);\n Asser... | {
"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 minimumDelay(long delay)\n {\n if (delay < 0)\n {\n throw new IllegalArgumentException(\"Delay cannot be smaller than 0\");\n }\n return new MinimumDelayDisruptContext(delay);\n }",
"class_method_signature": "DisruptContexts.minimumDelay(long delay)",
"co... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_685 | {
"fields": [
{
"declarator": "_photoRes",
"modifier": "private",
"original_string": "private PhotoResource _photoRes;",
"type": "PhotoResource",
"var_name": "_photoRes"
},
{
"declarator": "_albumRes",
"modifier": "private",
"original_s... | {
"body": "@Test\n public void testUpdateGet()\n {\n // validate data is set to correct value\n for (int i = 0; i < _entries.length; i++)\n {\n Assert.assertEquals(_entryRes.get(_keys[i]), _entries[i]);\n }\n }",
"class_method_signature": "TestAlbumEntryResource.testUpdateGet()",
"constructor"... | {
"fields": [
{
"declarator": "_db",
"modifier": "@Inject\n @Named(\"albumEntryDb\")\n private",
"original_string": "@Inject\n @Named(\"albumEntryDb\")\n private AlbumEntryDatabase _db;",
"type": "AlbumEntryDatabase",
"var_name": "_db"
},
{
"declarator": "_photoDb",... | {
"body": "@Override\n @SuccessResponse(statuses = { HttpStatus.S_200_OK })\n @ServiceErrors(ILLEGAL_ALBUM)\n @ParamError(code = INVALID_ID, parameterNames = { \"albumEntryId\" })\n public AlbumEntry get(CompoundKey key)\n {\n return _db.getData().get(key);\n }",
"class_method_signature": "AlbumEntryResour... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_406 | {
"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 testRestException() throws Exception\n {\n SimpleLoadBalancer balancer = prepareLoadBalancer(Arrays.asList(\"http://test.linkedin.com/retry1\", \"http://test.linkedin.com/bad\"));\n\n DynamicClient dynamicClient = new DynamicClient(balancer, null);\n RetryClient client = new ... | {
"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_113 | {
"fields": [],
"file": "restli-client-util-recorder/src/test/java/com/linkedin/restli/client/util/TestPatchTreeRecorder.java",
"identifier": "TestPatchTreeRecorder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expectedExceptions = UnsupportedOperationException.class)\n public void testUnsupportedMethod()\n {\n makeOne().getRecordingProxy().schema();\n }",
"class_method_signature": "TestPatchTreeRecorder.testUnsupportedMethod()",
"constructor": false,
"full_signature": "@Test(expectedExceptions ... | {
"fields": [
{
"declarator": "_templateProxy",
"modifier": "private final",
"original_string": "private final T _templateProxy;",
"type": "T",
"var_name": "_templateProxy"
},
{
"declarator": "_patchTree",
"modifier": "private final",
"original_string": "pri... | {
"body": "public T getRecordingProxy()\n {\n return _templateProxy;\n }",
"class_method_signature": "PatchTreeRecorder.getRecordingProxy()",
"constructor": false,
"full_signature": "public T getRecordingProxy()",
"identifier": "getRecordingProxy",
"invocations": [],
"modifiers": "public",
"paramet... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_543 | {
"fields": [
{
"declarator": "CODEC = new JacksonDataCodec()",
"modifier": "private static final",
"original_string": "private static final JacksonDataCodec CODEC = new JacksonDataCodec();",
"type": "JacksonDataCodec",
"var_name": "CODEC"
},
{
"declarator": "MAXIMUM_RE... | {
"body": "@Test(dataProvider = \"multiplexerConfigurations\")\n public void testIsMultiplexedRequest(MultiplexerRunMode multiplexerRunMode) throws Exception\n {\n MultiplexedRequestHandlerImpl multiplexer = createMultiplexer(null, multiplexerRunMode);\n RestRequest request = fakeMuxRestRequest();\n assert... | {
"fields": [
{
"declarator": "MUX_PLAN_CLASS = \"mux\"",
"modifier": "private static final",
"original_string": "private static final String MUX_PLAN_CLASS = \"mux\";",
"type": "String",
"var_name": "MUX_PLAN_CLASS"
},
{
"declarator": "MUX_URI_PATH = \"/mux\"",
"... | {
"body": "@Override\n public boolean shouldHandle(Request request)\n {\n // we don't check the method here because we want to return 405 if it is anything but POST\n return MUX_URI_PATH.equals(request.getURI().getPath());\n }",
"class_method_signature": "MultiplexedRequestHandlerImpl.shouldHandle(Request ... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_31 | {
"fields": [
{
"declarator": "_strings = new LinkedHashMap<String, String>()",
"modifier": "private final",
"original_string": "private final Map<String, String> _strings = new LinkedHashMap<String, String>();",
"type": "Map<String, String>",
"var_name": "_strings"
},
{
... | {
"body": "@Test\n public void testGetUTF8CString() throws Exception\n {\n for (Map.Entry<String, String> entry : _strings.entrySet())\n {\n String key = entry.getKey();\n String value = entry.getValue();\n for (int bufferSize : _bufferSizes)\n {\n // out.println(\"testing \" + key ... | {
"fields": [
{
"declarator": "out = new PrintStream(new FileOutputStream(FileDescriptor.out))",
"modifier": "static final",
"original_string": "static final PrintStream out = new PrintStream(new FileOutputStream(FileDescriptor.out));",
"type": "PrintStream",
"var_name": "out"
},... | {
"body": "public String getUtf8CString() throws IOException\n {\n ArrayList<ByteBuffer> bufferList = null;\n boolean foundZeroByte = false;\n int numBytes = 0;\n\n while (foundZeroByte == false && advanceBufferIfCurrentBufferHasNoRemaining())\n {\n int position = _currentBuffer.position();\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_386 | {
"fields": [
{
"declarator": "_executorService",
"modifier": "private",
"original_string": "private ScheduledExecutorService _executorService;",
"type": "ScheduledExecutorService",
"var_name": "_executorService"
},
{
"de... | {
"body": "@Test\n public void testUnregisterClusterListener()\n {\n reset();\n\n MockClusterListener clusterListener = new MockClusterListener();\n _state.registerClusterListener(clusterListener);\n assertEquals(clusterListener.getClusterAddedCount(CLUSTER1_CLUSTER_NAME), 0, \"expected zero count\");\n... | {
"fields": [
{
"declarator": "_log = LoggerFactory.getLogger(SimpleLoadBalancerState.class)",
"modifier": "private static final",
"original_string": "private static final Logger _log = LoggerFactory.getLogger(SimpleLoadBalancerState.cla... | {
"body": "@Override\n public void unregisterClusterListener(final LoadBalancerClusterListener listener)\n {\n trace(_log, \"unregister listener: \", listener);\n\n _executor.execute(new PropertyEvent(\"remove cluster listener for state\")\n {\n @Override\n public void innerRun()\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_369 | {
"fields": [
{
"declarator": "MY_SERVICES_FS = \"myServices\"",
"modifier": "public static final",
"original_string": "public static final String MY_SERVICES_FS = \"myServices\";",
"type": "String",
"var_name": "MY_SERVICES_FS"
},
{
"declarator": "UNVALID_FILES = Array... | {
"body": "@Test(timeOut = 10000)\n public void testMakingWarmUpRequests() throws URISyntaxException, InterruptedException, ExecutionException, TimeoutException\n {\n createDefaultServicesIniFiles();\n\n TestLoadBalancer balancer = new TestLoadBalancer();\n AtomicInteger requestCount = balancer.getRequestC... | {
"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_410 | {
"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 testRestRetryNoAvailableHosts() 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 RetryClien... | {
"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_555 | {
"fields": [
{
"declarator": "CODEC = new JacksonDataCodec()",
"modifier": "private static final",
"original_string": "private static final JacksonDataCodec CODEC = new JacksonDataCodec();",
"type": "JacksonDataCodec",
"var_name": "CODEC"
},
{
"declarator": "MAXIMUM_RE... | {
"body": "@Test(dataProvider = \"multiplexerConfigurations\")\n public void testMultiplexedSingletonFilterFailures(MultiplexerRunMode multiplexerRunMode) throws Exception\n {\n // This test validates when a failure occurred in MultiplexedSingletonFilter for an individual request, only the individual\n // req... | {
"fields": [
{
"declarator": "MUX_PLAN_CLASS = \"mux\"",
"modifier": "private static final",
"original_string": "private static final String MUX_PLAN_CLASS = \"mux\";",
"type": "String",
"var_name": "MUX_PLAN_CLASS"
},
{
"declarator": "MUX_URI_PATH = \"/mux\"",
"... | {
"body": "@Override\n public void handleRequest(RestRequest request, RequestContext requestContext, final Callback<RestResponse> callback)\n {\n if (HttpMethod.POST != HttpMethod.valueOf(request.getMethod()))\n {\n _log.error(\"POST is expected, but \" + request.getMethod() + \" received\");\n call... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_105 | {
"fields": [],
"file": "restli-client-util-recorder/src/test/java/com/linkedin/restli/client/util/TestPatchRequestRecorder.java",
"identifier": "TestPatchRequestRecorder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testPatchGenerateAndPatchRequestRecorderGenerateIdenticalPatches()\n throws CloneNotSupportedException\n {\n TestRecord t1 = new TestRecord();\n TestRecord t2 = new TestRecord(t1.data().copy());\n t2.setId(1L);\n t2.setMessage(\"Foo Bar Baz\");\n PatchRequest<TestR... | {
"fields": [],
"file": "restli-client-util-recorder/src/main/java/com/linkedin/restli/client/util/PatchRequestRecorder.java",
"identifier": "PatchRequestRecorder",
"interfaces": "",
"methods": [
{
"class_method_signature": "PatchRequestRecorder.PatchRequestRecorder(Class<T> clazz)",
"construc... | {
"body": "public PatchRequest<T> generatePatchRequest()\n {\n return PatchRequest.createFromPatchDocument(generatePatchTree().getDataMap());\n }",
"class_method_signature": "PatchRequestRecorder.generatePatchRequest()",
"constructor": false,
"full_signature": "public PatchRequest<T> generatePatchRequest()... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_66 | {
"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 testDataMapNoCyclesOnPut()\n {\n // test with DataMap\n\n DataMap a = new DataMap();\n DataMap b = new DataMap();\n DataMap c = new DataMap();\n\n a.put(\"b\", b);\n a.put(\"c\", c);\n\n assertTrue(Data.objectIsAcyclic(a));\n\n DataMap d = new DataMap();\n b... | {
"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_294 | {
"fields": [],
"file": "r2-core/src/test/java/com/linkedin/r2/util/TestConfigValueExtractor.java",
"identifier": "TestConfigValueExtractor",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testListObject()\n {\n List<String> inputList = new ArrayList<String>();\n inputList.add(\"foo\");\n inputList.add(\"bar\");\n inputList.add(\"baz\");\n\n List<String> actualList = ConfigValueExtractor.buildList(inputList, \",\");\n Assert.assertEquals(inputList, act... | {
"fields": [],
"file": "r2-core/src/main/java/com/linkedin/r2/util/ConfigValueExtractor.java",
"identifier": "ConfigValueExtractor",
"interfaces": "",
"methods": [
{
"class_method_signature": "ConfigValueExtractor.buildList(Object propertyValue, String listSeparator)",
"constructor": false,
... | {
"body": "public static List<String> buildList(Object propertyValue, String listSeparator)\n {\n List<String> valueList = new ArrayList<String>();\n if (propertyValue != null)\n {\n if (propertyValue instanceof List<?>)\n {\n @SuppressWarnings(\"unchecked\")\n List<String> list = (L... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_89 | {
"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 testCopyUnionMember() throws Exception\n {\n RecordDataSchema fooSchema = (RecordDataSchema) TestUtil.dataSchemaFromString(fooSchemaText);\n UnionDataSchema unionDataSchema = (UnionDataSchema) fooSchema.getField(\"unionField\").getType();\n UnionDataSchema.Member firstMember ... | {
"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 UnionDataSchema.Member copyUnionMember(UnionDataSchema.Member member, DataSchema newSkeletonSchema)\n {\n UnionDataSchema.Member newMember = new UnionDataSchema.Member(newSkeletonSchema);\n if (member.hasAlias())\n {\n newMember.setAlias(member.getAlias(), new StringBuilder());... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_447 | {
"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 testSetIdHeader() throws RestLiSyntaxException\n {\n final ResourceContextImpl context = new ResourceContextImpl();\n context.setResponseHeader(RestConstants.HEADER_ID, \"foobar\");\n }",
"class_method_signature": "TestReso... | {
"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_152 | {
"fields": [],
"file": "restli-client/src/test/java/com/linkedin/restli/client/TestRequest.java",
"identifier": "TestRequest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testHeadersCaseInsensitiveSet()\n {\n final long id = 42l;\n GetRequestBuilder<Long, TestRecord> builder = generateDummyRequestBuilder();\n Request<TestRecord> request = builder\n .id(id)\n .setHeader(\"header\", \"value1\")\n .setHeader(\"HEADER\", \"val... | {
"fields": [
{
"declarator": "SLASH_PATTERN = Pattern.compile(\"/\")",
"modifier": "private static final",
"original_string": "private static final Pattern SLASH_PATTERN = Pattern.compile(\"/\");",
"type": "Pattern",
"var_name": "SLASH_PATTERN"
},
{
"declarator": "URI_... | {
"body": "public Map<String, String> getHeaders()\n {\n return _headers;\n }",
"class_method_signature": "Request.getHeaders()",
"constructor": false,
"full_signature": "public Map<String, String> getHeaders()",
"identifier": "getHeaders",
"invocations": [],
"modifiers": "public",
"parameters": "(... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_502 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/methods/arguments/TestArgumentBuilder.java",
"identifier": "TestArgumentBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testRestLiAttachmentsParamResourceNotExpect()\n {\n //This test makes sure that if the resource method did not expect attachments but there were attachments present\n //in the request, that an exception is thrown.\n ServerResourceContext mockResourceContext = EasyMock.createM... | {
"fields": [],
"file": "restli-server/src/main/java/com/linkedin/restli/internal/server/methods/arguments/ArgumentBuilder.java",
"identifier": "ArgumentBuilder",
"interfaces": "",
"methods": [
{
"class_method_signature": "ArgumentBuilder.buildArgs(final Object[] positionalArguments,\n ... | {
"body": "@SuppressWarnings(\"deprecation\")\n static Object[] buildArgs(final Object[] positionalArguments,\n final ResourceMethodDescriptor resourceMethod,\n final ServerResourceContext context,\n final DynamicRe... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_575 | {
"fields": [
{
"declarator": "DEBUG_HANDLER_RESPONSE_A = \"Response A\"",
"modifier": "private static final",
"original_string": "private static final String DEBUG_HANDLER_RESPONSE_A = \"Response A\";",
"type": "String",
"var_name": "DEBUG_HANDLER_RESPONSE_A"
},
{
"dec... | {
"body": "@Test(dataProvider = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + \"protocolVersions\")\n public void testApplicationException(final ProtocolVersion protocolVersion, final String errorResponseHeaderName,\n final RestOrStream restOrStream) throws Exception\n {\n fina... | {
"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_125 | {
"fields": [],
"file": "restli-client/src/test/java/com/linkedin/restli/internal/client/TestQueryParamsUtil.java",
"identifier": "TestQueryParamsUtil",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCustomProjectionDataMapSerializer()\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(RestConstants.P... | {
"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_2 | {
"fields": [],
"file": "d2-contrib/src/test/java/com/linkedin/d2/contrib/TestRouteLookupClient.java",
"identifier": "TestRouteLookupClient",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBadRequest()\n {\n RouteLookup routeLookup = new SimpleTestRouteLookup();\n\n final D2Client d2Client = new D2ClientBuilder().setZkHosts(\"localhost:2121\").build();\n d2Client.start(new FutureCallback<None>());\n RouteLookupClient routeLookupClient = new RouteLookupCl... | {
"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_430 | {
"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 testFactoryWithMultiProbe() {\n RingFactory<String> factory = new DelegatingRingFactory<>(configBuilder(\"multiProbe\", null));\n Ring<String> ring = factory.createRing(buildPointsMap(10));\n\n assertTrue(ring instanceof MPConsistentHashRi... | {
"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_349 | {
"fields": [],
"file": "d2/src/test/java/com/linkedin/d2/backuprequests/TestLatencyMetric.java",
"identifier": "TestLatencyMetric",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNoRecording()\n {\n LatencyMetric metric = new LatencyMetric();\n final AtomicLong totalCount = new AtomicLong();\n metric.harvest(h -> totalCount.set(h.getTotalCount()));\n assertEquals(totalCount.get(), 0L);\n metric.harvest(h -> totalCount.set(h.getTotalCount()))... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(LatencyMetric.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(LatencyMetric.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declar... | {
"body": "public void harvest(Consumer<AbstractHistogram> consumer) {\n AbstractHistogram current = claim(_current);\n _current.set(claim(_inactive)); //unblock other writers\n try {\n consumer.accept(current);\n } catch (Throwable t) {\n LOG.error(\"failed to consume histogram for latencies me... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_11 | {
"fields": [],
"file": "data-transform/src/test/java/com/linkedin/data/transform/TestEscaper.java",
"identifier": "TestEscaper",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testUnescaping()\n {\n assertEquals(Escaper.replaceAll(\"\", \"$$\", \"$\"), \"\");\n assertEquals(Escaper.replaceAll(\"$$\", \"$$\", \"$\"), \"$\");\n assertEquals(Escaper.replaceAll(\" $$\", \"$$\", \"$\"), \" $\");\n assertEquals(Escaper.replaceAll(\" $$ \", \"$$\", \"$... | {
"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 replaceAll(String s, final String what, final String withWhat)\n {\n StringBuilder sb = null;\n int fromIndex = 0; //index of last found '$' char + 1\n boolean found = false;\n int length = s.length();\n do\n {\n final int index = s.indexOf(what, fromIndex);... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_172 | {
"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 testDisruptSourceAlreadySet()\n {\n when(_context.getLocalAttr(eq(DISRUPT_SOURCE_KEY))).thenReturn(any(String.class));\n _client.sendRequest(_request, _context);\n verify(_context, never()).putLocalAttr(eq(DISRUPT_CONTEXT_KEY), any(String.class));\n }",
"class_method_signa... | {
"fields": [
{
"declarator": "_client",
"modifier": "private final",
"original_string": "private final Client _client;",
"type": "Client",
"var_name": "_client"
},
{
"declarator": "_controller",
"modifier": "private final",
"original_string": "private final... | {
"body": "@Override\n public <T> ResponseFuture<T> sendRequest(Request<T> request, RequestContext requestContext)\n {\n doEvaluateDisruptContext(request, requestContext);\n return _client.sendRequest(request, requestContext);\n }",
"class_method_signature": "DisruptRestClient.sendRequest(Request<T> reques... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_488 | {
"fields": [
{
"declarator": "_mockRestLiRequestData",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private RestLiRequestData _mockRestLiRequestData;",
"type": "RestLiRequestData",
"var_name": "_mockRestLiRequestData"
},
{
"declarator": "_mockFilterChai... | {
"body": "@SuppressWarnings(\"unchecked\")\n @Test\n public void testFilterInvocationRequestOnError() throws Exception\n {\n _restLiFilterChain = new RestLiFilterChain(Arrays.asList(_filters),\n _mockFilterChainDispatcher, _mockFilterChainCallback);\n _filters[1] = new CountFilterRequestOnError();\n ... | {
"fields": [
{
"declarator": "_filterChainIterator",
"modifier": "private final",
"original_string": "private final RestLiFilterChainIterator _filterChainIterator;",
"type": "RestLiFilterChainIterator",
"var_name": "_filterChainIterator"
}
],
"file": "restli-server/src/main/... | {
"body": "public void onRequest(FilterRequestContext requestContext,\n RestLiFilterResponseContextFactory filterResponseContextFactory)\n {\n // Initiate the filter chain iterator. The RestLiCallback will be passed to the method invoker at the end of the\n // filter chain.\n _filterC... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_522 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/response/TestRestLiResponseEnvelope.java",
"identifier": "TestRestLiResponseEnvelope",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"envelopeResourceMethodDataProvider\")\n public void testEnvelopeResourceMethodType(RestLiResponseEnvelope responseEnvelope, ResourceMethod resourceMethod)\n {\n Assert.assertEquals(responseEnvelope.getResourceMethod(), resourceMethod);\n }",
"class_method_signature": "TestRes... | {
"fields": [
{
"declarator": "_status",
"modifier": "private",
"original_string": "private HttpStatus _status;",
"type": "HttpStatus",
"var_name": "_status"
},
{
"declarator": "_exception",
"modifier": "private",
"original_string": "private RestLiServiceExc... | {
"body": "public abstract ResourceMethod getResourceMethod();",
"class_method_signature": "RestLiResponseEnvelope.getResourceMethod()",
"constructor": false,
"full_signature": "public abstract ResourceMethod getResourceMethod()",
"identifier": "getResourceMethod",
"invocations": [],
"modifiers": "public ... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_467 | {
"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 testRefTrim() throws CloneNotSupportedException\n {\n TyperefTest test = new TyperefTest();\n test.setImportRef(1.0);\n test.setImportRef2(2.0);\n\n RecordTemplate expected = test.copy();\n\n // Introduce bad elements\n test.data().put(\"troublemaker\", \"boo\");\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_46 | {
"fields": [],
"file": "data/src/test/java/com/linkedin/data/it/TestCounter.java",
"identifier": "TestCounter",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCountByPredicateAtPathWithFilter() throws Exception\n {\n SimpleTestData data = IteratorTestData.createSimpleTestData();\n \n int count = Builder.create(data.getDataElement(), IterationOrder.PRE_ORDER)\n .filterBy(Predicates.and(Predicates.pathMatchesPathSpec(Itera... | {
"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_534 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/response/TestPartialUpdateResponseBuilder.java",
"identifier": "TestPartialUpdateResponseBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testProjectionInBuildRestLiResponseData()\n {\n TestRecord record = new TestRecord().setIntField(2147).setDoubleField(21.47).setFloatField(123F).setLongField(456L);\n UpdateEntityResponse<TestRecord> response = new UpdateEntityResponse<>(HttpStatus.S_200_OK, record);\n\n Mask... | {
"fields": [],
"file": "restli-server/src/main/java/com/linkedin/restli/internal/server/response/PartialUpdateResponseBuilder.java",
"identifier": "PartialUpdateResponseBuilder",
"interfaces": "implements RestLiResponseBuilder<RestLiResponseData<PartialUpdateResponseEnvelope>>",
"methods": [
{
"cla... | {
"body": "@Override\n @SuppressWarnings({\"unchecked\"})\n public RestLiResponseData<PartialUpdateResponseEnvelope> buildRestLiResponseData(Request request,\n RoutingResult routingResult,\n ... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_164 | {
"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 testSendRequest6()\n {\n when(_builder.build()).thenReturn(_request);\n when(_controller.getDisruptContext(any(String.class), any(ResourceMethod.class))).thenReturn(_disrupt);\n _client.sendRequest(_builder, _context);\n verify(_underlying, times(1)).sendRequest(eq(_reques... | {
"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_471 | {
"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 testNestedArrayRefRecord() throws CloneNotSupportedException\n {\n TyperefTest test = new TyperefTest();\n\n NestedArrayRefRecord nestedArrayRefRecord = new NestedArrayRefRecord();\n\n RecordBarArray recordBarArray = new RecordBarArray();\n RecordBar recordBar = new Record... | {
"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_308 | {
"fields": [],
"file": "r2-core/src/test/java/com/linkedin/r2/util/TestLinkedDeque.java",
"identifier": "TestLinkedDeque",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testOfferLastNull()\n {\n LinkedDeque<Object> q = new LinkedDeque<Object>();\n try\n {\n q.offerLast(null);\n Assert.fail(\"offerLast null should have failed\");\n }\n catch (NullPointerException e)\n {\n // expected\n }\n }",
"class_method_signa... | {
"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 boolean offerLast(T t)\n {\n addLastNode(t);\n return true;\n }",
"class_method_signature": "LinkedDeque.offerLast(T t)",
"constructor": false,
"full_signature": "@Override public boolean offerLast(T t)",
"identifier": "offerLast",
"invocations": [
"addLastNode"
... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_50 | {
"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 testReplaceAtPathNested() throws Exception\n {\n SimpleTestData data = IteratorTestData.createSimpleTestData();\n\n Builder.create(data.getDataElement(), IterationOrder.PRE_ORDER)\n .filterBy(Predicates.pathMatchesPathSpec(new PathSpec(\"nested\", \"nested\")))\n .replace(... | {
"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_133 | {
"fields": [],
"file": "restli-client/src/test/java/com/linkedin/restli/client/multiplexer/TestMultiplexedCallback.java",
"identifier": "TestMultiplexedCallback",
"interfaces": "",
"superclass": "extends MultiplexerTestBase"
} | {
"body": "@Test\n public void testSuccess() throws Exception\n {\n FutureCallback<RestResponse> callback1 = new FutureCallback<RestResponse>();\n FutureCallback<RestResponse> callback2 = new FutureCallback<RestResponse>();\n\n ImmutableMap<Integer, Callback<RestResponse>> individualCallbacks = ImmutableMa... | {
"fields": [
{
"declarator": "_decoder = new EntityResponseDecoder<MultiplexedResponseContent>(MultiplexedResponseContent.class)",
"modifier": "private final",
"original_string": "private final EntityResponseDecoder<MultiplexedResponseContent> _decoder = new EntityResponseDecoder<MultiplexedRes... | {
"body": "@Override\n public void onSuccess(RestResponse restResponse)\n {\n Response<MultiplexedResponseContent> response;\n try\n {\n response = _decoder.decodeResponse(restResponse);\n }\n catch (RestLiDecodingException e)\n {\n onError(e);\n return;\n }\n // individual ca... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_563 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/server/mock/TestInjectMockResourceFactory.java",
"identifier": "TestInjectMockResourceFactory",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMockInjection()\n {\n InjectMockResourceFactory factory =\n new InjectMockResourceFactory(new SimpleBeanProvider()\n .add(\"counterBean\", new CounterBean())\n .add(\"my... | {
"fields": [
{
"declarator": "_containerAdaptor",
"modifier": "private",
"original_string": "private Jsr330Adapter _containerAdaptor;",
"type": "Jsr330Adapter",
"var_name": "_containerAdaptor"
},
{
"declarator": "_beanProvider",
"modifier": "private final",
... | {
"body": "@Override\n public <R> R create(final Class<R> resourceClass)\n {\n return _containerAdaptor.getBean(resourceClass);\n }",
"class_method_signature": "InjectMockResourceFactory.create(final Class<R> resourceClass)",
"constructor": false,
"full_signature": "@Override public R create(final Class<R... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_426 | {
"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 testPointsCleanUpLarge()\n throws URISyntaxException\n {\n Map<String, Integer> pointsMp = buildPointsMap(19);\n\n PointBasedConsistentHashRingFactory<String> ringFactory = new PointBasedConsistentHashRingFactory<>(new DegraderLoadBalan... | {
"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_148 | {
"fields": [
{
"declarator": "TARGET_HOST_KEY_NAME = \"D2-KeyMapper-TargetHost\"",
"modifier": "private static final",
"original_string": "private static final String TARGET_HOST_KEY_NAME = \"D2-KeyMapper-TargetHost\";",
"type": "String",
"var_name": "TARGET_HOST_KEY_NAME"
},
... | {
"body": "@Test(dataProvider = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + \"gatherBatchResponseProvider\")\n @SuppressWarnings({\"rawtypes\", \"unchecked\"})\n public void testGatherBatchKVResponse(Request request,\n ProtocolVersion version,\n ... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(DefaultScatterGatherStrategy.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(DefaultScatterGatherStrategy.class);",
"type": "Logger",
"var_name": "l... | {
"body": "@Override\n @SuppressWarnings(\"unchecked\")\n public <K, T> void onAllResponsesReceived(Request<T> request, ProtocolVersion protocolVersion,\n Map<RequestInfo, Response<T>> successResponses,\n Map<RequestInfo, Throwabl... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_518 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/response/TestErrorResponseBuilder.java",
"identifier": "TestErrorResponseBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testErrorDetailsFromDataMap()\n {\n RestLiServiceException exception = new RestLiServiceException(HttpStatus.S_200_OK, \"Some message\", new IllegalStateException(\"Some other message\"));\n exception.setCode(\"INVALID_SOMETHING\");\n exception.setDocUrl(\"www.documentation.c... | {
"fields": [
{
"declarator": "DEFAULT_INTERNAL_ERROR_MESSAGE = \"INTERNAL SERVER ERROR\"",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_INTERNAL_ERROR_MESSAGE = \"INTERNAL SERVER ERROR\";",
"type": "String",
"var_name": "DEFAULT_INTERNAL_... | {
"body": "public ErrorResponse buildErrorResponse(RestLiServiceException result)\n {\n return buildErrorResponse(result, result.hasOverridingErrorResponseFormat() ? result.getOverridingFormat() : _errorResponseFormat);\n }",
"class_method_signature": "ErrorResponseBuilder.buildErrorResponse(RestLiServiceExcep... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_631 | {
"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 testInvalidPSONByteStringToDataMap() throws MimeTypeParseException, IOException\n {\n bytesToDataMap(\"application/x-pson\", ByteString.copy(\"helloWorld\".getBytes()));\n }",
"class_method_signature": "TestDataMapConverter.testInvalidPSON... | {
"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_261 | {
"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\n public void testAvroUnionModeChaining() throws IOException\n {\n String expectedSchema = \"{ \" +\n \" \\\"type\\\" : \\\"record\\\", \" +\n \" \\\"name\\\" : \\\"A\\\", \" +\n \" \\\"namespace\\\" : \\\"com.linkedin.pegasus.test\\\", \" +\n \" \\\"fields\\\" : ... | {
"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_324 | {
"fields": [
{
"declarator": "TEST_ZK_PROP_NAME = \"testProp\"",
"modifier": "private static final",
"original_string": "private static final String TEST_ZK_PROP_NAME = \"testProp\";",
"type": "String",
"var_name": "TEST_ZK_PROP_NAME"
},
{
"declarator": "_zkServer",
... | {
"body": "@Test\n public void testShutdown()\n throws InterruptedException, IOException, PropertyStoreException, ExecutionException, TimeoutException\n {\n ZooKeeperConnectionAwareStore<String, ZooKeeperEphemeralStore<String>> store = ZkStoreTestOnlyUtil.getZKAwareStore(PORT);\n\n final FutureCallback<N... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ZooKeeperConnectionAwareStore.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ZooKeeperConnectionAwareStore.class);",
"type": "Logger",
"var_name": ... | {
"body": "@Override\n public void shutdown(Callback<None> callback)\n {\n _afterStartupCallbacks.add(() -> _wrappedZkStore.shutdown(callback));\n fireAfterStartupCallbacks();\n }",
"class_method_signature": "ZooKeeperConnectionAwareStore.shutdown(Callback<None> callback)",
"constructor": false,
"full_... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_93 | {
"fields": [
{
"declarator": "DATA_SCHEMA_PATH = \"pegasus/com/linkedin/data/schema/ValidationDemo.pdsc\"",
"modifier": "private static final",
"original_string": "private static final String DATA_SCHEMA_PATH = \"pegasus/com/linkedin/data/schema/ValidationDemo.pdsc\";",
"type": "String",
... | {
"body": "@Test(dataProvider = \"pathData\")\n public void testContainsPath(String path, boolean expected) throws IOException\n {\n DataSchema validationDemoSchema = pdscToDataSchema(DATA_SCHEMA_PATH);\n Assert.assertEquals(DataSchemaUtil.containsPath(validationDemoSchema, path), expected);\n }",
"class_m... | {
"fields": [
{
"declarator": "_TYPE_STRING_TO_PRIMITIVE_DATA_SCHEMA_MAP",
"modifier": "static final",
"original_string": "static final Map<String, PrimitiveDataSchema> _TYPE_STRING_TO_PRIMITIVE_DATA_SCHEMA_MAP;",
"type": "Map<String, PrimitiveDataSchema>",
"var_name": "_TYPE_STRING_... | {
"body": "public static boolean containsPath(DataSchema schema, String path)\n {\n return getField(schema, path) != null;\n }",
"class_method_signature": "DataSchemaUtil.containsPath(DataSchema schema, String path)",
"constructor": false,
"full_signature": "public static boolean containsPath(DataSchema sc... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_236 | {
"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 testCompatibleRestLiDataAnnotations()\n {\n final RestLiSnapshotCompatibilityChecker checker = new RestLiSnapshotCompatibilityChecker();\n final CompatibilityInfoMap infoMap = checker.check(RESOURCES_DIR + FS + \"snapshots\" + FS + \"prev-validationdemos.snapshot.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 check(String prevSnapshotPath, String currSnapshotPath, CompatibilityLevel compatLevel)\n {\n return checkCompatibility(prevSnapshotPath, currSnapshotPath, compatLevel, false);\n }",
"class_method_signature": "RestLiSnapshotCompatibilityChecker.check(String prevSnapshotPa... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_666 | {
"fields": [],
"file": "restli-common/src/test/java/com/linkedin/restli/internal/common/TestQueryParamsDataMap.java",
"identifier": "TestQueryParamsDataMap",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testPathSegmentEncoded() throws Exception\n {\n String paramString =\n new StringBuilder(PathSegment.CODEC.encode(\"a[.]\")).append('[')\n .append(12)\n .appen... | {
"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_373 | {
"fields": [
{
"declarator": "MY_SERVICES_FS = \"myServices\"",
"modifier": "public static final",
"original_string": "public static final String MY_SERVICES_FS = \"myServices\";",
"type": "String",
"var_name": "MY_SERVICES_FS"
},
{
"declarator": "UNVALID_FILES = Array... | {
"body": "@Test(timeOut = 10000)\n public void testThrottlingUnlimitedRequests() throws URISyntaxException, InterruptedException, ExecutionException, TimeoutException\n {\n int NRequests = 500;\n createNServicesIniFiles(NRequests);\n\n int concurrentRequestsHugeNumber = 999999999;\n int concurrentReque... | {
"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_689 | {
"fields": [
{
"declarator": "_photoRes",
"modifier": "private",
"original_string": "private PhotoResource _photoRes;",
"type": "PhotoResource",
"var_name": "_photoRes"
},
{
"declarator": "_albumRes",
"modifier": "private",
"original_s... | {
"body": "@Test\n public void testBatchGet()\n {\n // get keys 1-3\n Set<CompoundKey> batchIds = new HashSet<CompoundKey>();\n for (int i = 1; i <= 3; i++)\n {\n batchIds.add(_keys[i]);\n }\n Map<CompoundKey, AlbumEntry> batchEntries = _entryRes.batchGet(batchIds);\n\n Assert.assertEquals... | {
"fields": [
{
"declarator": "_db",
"modifier": "@Inject\n @Named(\"albumEntryDb\")\n private",
"original_string": "@Inject\n @Named(\"albumEntryDb\")\n private AlbumEntryDatabase _db;",
"type": "AlbumEntryDatabase",
"var_name": "_db"
},
{
"declarator": "_photoDb",... | {
"body": "@Override\n public Map<CompoundKey, AlbumEntry> batchGet(Set<CompoundKey> ids)\n {\n Map<CompoundKey, AlbumEntry> result = new HashMap<CompoundKey, AlbumEntry>();\n for (CompoundKey key : ids)\n result.put(key, get(key));\n return result;\n }",
"class_method_signature": "AlbumEntryResour... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_109 | {
"fields": [],
"file": "restli-client-util-recorder/src/test/java/com/linkedin/restli/client/util/TestPatchTreeRecorder.java",
"identifier": "TestPatchTreeRecorder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expectedExceptions = NullPointerException.class)\n public void testSimpleSetDisallowNull()\n {\n makeOne().getRecordingProxy().setFooRequired(null, SetMode.DISALLOW_NULL);\n }",
"class_method_signature": "TestPatchTreeRecorder.testSimpleSetDisallowNull()",
"constructor": false,
"full_sign... | {
"fields": [
{
"declarator": "_templateProxy",
"modifier": "private final",
"original_string": "private final T _templateProxy;",
"type": "T",
"var_name": "_templateProxy"
},
{
"declarator": "_patchTree",
"modifier": "private final",
"original_string": "pri... | {
"body": "public T getRecordingProxy()\n {\n return _templateProxy;\n }",
"class_method_signature": "PatchTreeRecorder.getRecordingProxy()",
"constructor": false,
"full_signature": "public T getRecordingProxy()",
"identifier": "getRecordingProxy",
"invocations": [],
"modifiers": "public",
"paramet... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_559 | {
"fields": [
{
"declarator": "CODEC = new JacksonDataCodec()",
"modifier": "private static final",
"original_string": "private static final JacksonDataCodec CODEC = new JacksonDataCodec();",
"type": "JacksonDataCodec",
"var_name": "CODEC"
},
{
"declarator": "MAXIMUM_RE... | {
"body": "@Test(dataProvider = \"multiplexerConfigurations\")\n public void testHandleError(MultiplexerRunMode multiplexerRunMode) throws Exception\n {\n SynchronousRequestHandler mockHandler = createMockHandler();\n MultiplexedRequestHandlerImpl multiplexer = createMultiplexer(mockHandler, multiplexerRunMod... | {
"fields": [
{
"declarator": "MUX_PLAN_CLASS = \"mux\"",
"modifier": "private static final",
"original_string": "private static final String MUX_PLAN_CLASS = \"mux\";",
"type": "String",
"var_name": "MUX_PLAN_CLASS"
},
{
"declarator": "MUX_URI_PATH = \"/mux\"",
"... | {
"body": "@Override\n public void handleRequest(RestRequest request, RequestContext requestContext, final Callback<RestResponse> callback)\n {\n if (HttpMethod.POST != HttpMethod.valueOf(request.getMethod()))\n {\n _log.error(\"POST is expected, but \" + request.getMethod() + \" received\");\n call... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_670 | {
"fields": [
{
"declarator": "TEST_ENCODING_1 = new AsciiHexEncoding('~', new char[] {'.','[', ']', '\\017', '\\020', '\\000', '\\177'})",
"modifier": "public static final",
"original_string": "public static final AsciiHexEncoding TEST_ENCODING_1 = new AsciiHexEncoding('~', new char[] {'.','[',... | {
"body": "@Test\n public void testSingleCharDecode() throws Exception\n {\n Assert.assertEquals(TEST_ENCODING_1.decode(\"~2E\"), \".\");\n Assert.assertEquals(TEST_ENCODING_1.decode(\"~5B\"), \"[\");\n Assert.assertEquals(TEST_ENCODING_1.decode(\"~5D\"), \"]\");\n Assert.assertEquals(TEST_ENCODING_1.de... | {
"fields": [
{
"declarator": "_encodingChar",
"modifier": "private final",
"original_string": "private final char _encodingChar;",
"type": "char",
"var_name": "_encodingChar"
},
{
"declarator": "_reservedChars",
"modifier": "private final",
"original_string... | {
"body": "public String decode(String s) throws CannotDecodeException\n {\n if (s == null)\n {\n return null;\n }\n StringBuilder sb = new StringBuilder();\n int len = s.length();\n for (int i = 0; i < len; i++)\n {\n char c = s.charAt(i);\n\n if (c == _encodingChar)\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_220 | {
"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 testMissingOperand1Or()\n {\n PredicateExpressionParser.parse(\"| com.linkedin.data.it.AlwaysFalsePredicate\");\n }",
"class_method_signature": "TestPredicateExpressionParser.testMissingOperand1Or()",
"constructor": false,
"ful... | {
"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_365 | {
"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 testMapKeysV3(RingFactory<URI> ringFactory) throws URISyntaxException, ServiceUnavailableException\n {\n URI serviceURI = new URI(\"d2://articles\");\n ConsistentHashKeyMapper mapper = getConsistentHashKeyMapper(ringFactory);\n\n List<Integer... | {
"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_277 | {
"fields": [],
"file": "restli-disruptor/src/test/java/com/linkedin/restli/disruptor/TestDisruptRestControllerContainer.java",
"identifier": "TestDisruptRestControllerContainer",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public static void testSetInstance()\n {\n DisruptRestController controller = EasyMock.createMock(DisruptRestController.class);\n DisruptRestControllerContainer.resetInstance();\n DisruptRestControllerContainer.setInstance(controller);\n Assert.assertSame(DisruptRestControllerContaine... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(DisruptRestControllerContainer.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(DisruptRestControllerContainer.class);",
"type": "Logger",
"var_name"... | {
"body": "public static void setInstance(DisruptRestController instance)\n {\n if (!INSTANCE.compareAndSet(null, instance))\n {\n LOG.warn(\"Ignored because instance has already been set. Invoke resetInstance before setInstance again.\");\n }\n }",
"class_method_signature": "DisruptRestControllerCo... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_627 | {
"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 testJSONByteStringToDataMap() throws MimeTypeParseException, IOException\n {\n DataMap expectedDataMap = createTestDataMap();\n ByteString byteString = ByteString.copy(JACKSON_DATA_CODEC.mapToBytes(expectedDataMap));\n\n Map<String, String> headers = Collections.singletonMap(... | {
"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_85 | {
"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 testHandlerResolveException() throws Exception\n {\n String failureMessage = \"Intentional failure\";\n SchemaAnnotationHandler testHandler = new SchemaAnnotationHandler()\n {\n @Override\n public ResolutionResult resolve(List<Pair<String, Object>> propertiesOverrid... | {
"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_332 | {
"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 testSymlinkWithExistWatch2() 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_298 | {
"fields": [],
"file": "r2-core/src/test/java/com/linkedin/r2/util/TestLinkedDeque.java",
"identifier": "TestLinkedDeque",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testRemoveLast()\n {\n List<Integer> control = new ArrayList<Integer>(Arrays.asList(1, 2, 3));\n LinkedDeque<Integer> q = new LinkedDeque<Integer>(control);\n\n Assert.assertEquals(q.removeLast(), control.remove(control.size() - 1));\n Assert.assertEquals(q, control);\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 int size()\n {\n return _size;\n }",
"class_method_signature": "LinkedDeque.size()",
"constructor": false,
"full_signature": "@Override public int size()",
"identifier": "size",
"invocations": [],
"modifiers": "@Override public",
"parameters": "()",
"return": "int",... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_276 | {
"fields": [],
"file": "gradle-plugins/src/test/java/com/linkedin/pegasus/gradle/TestPegasusPlugin.java",
"identifier": "TestPegasusPlugin",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testTaskTypes() {\n // Given/When: Pegasus Plugin is applied to a project.\n Project project = ProjectBuilder.builder().build();\n project.getPlugins().apply(PegasusPlugin.class);\n\n // Then: Validate the Copy/Sync Schema tasks are of the correct type.\n assertTrue(proj... | {
"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_626 | {
"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 testDataMapToPSONByteString() throws MimeTypeParseException, IOException\n {\n DataMap testDataMap = createTestDataMap();\n byte[] expectedBytes = PSON_DATA_CODEC.mapToBytes(testDataMap);\n\n Map<String, String> headers = Collections.singletonMap(RestConstants.HEADER_CONTENT_... | {
"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_333 | {
"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 testSymlinkWithExistWatch3() 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_84 | {
"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(dataProvider = \"denormalizedSchemaTestCases_invalid\")\n public void testDenormalizedSchemaProcessing_invalid(String filePath, String errorMsg) throws Exception\n {\n DataSchema dataSchema = TestUtil.dataSchemaFromPdlInputStream(getClass().getResourceAsStream(filePath));\n\n PegasusSchemaAnn... | {
"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_299 | {
"fields": [],
"file": "r2-core/src/test/java/com/linkedin/r2/util/TestLinkedDeque.java",
"identifier": "TestLinkedDeque",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testPollFirst()\n {\n List<Integer> control = new ArrayList<Integer>(Arrays.asList(1, 2, 3));\n LinkedDeque<Integer> q = new LinkedDeque<Integer>(control);\n\n Assert.assertEquals(q.pollFirst(), control.remove(0));\n Assert.assertEquals(q, control);\n }",
"class_method_... | {
"fields": [
{
"declarator": "_head",
"modifier": "private",
"original_string": "private Node<T> _head;",
"type": "Node<T>",
"var_name": "_head"
},
{
"declarator": "_tail",
"modifier": "private",
"original_string": "private Node<T> _tail;",
"type": "N... | {
"body": "@Override\n public T pollFirst()\n {\n if (_head == null)\n {\n return null;\n }\n return removeNode(_head);\n }",
"class_method_signature": "LinkedDeque.pollFirst()",
"constructor": false,
"full_signature": "@Override public T pollFirst()",
"identifier": "pollFirst",
"invocat... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_671 | {
"fields": [
{
"declarator": "TEST_ENCODING_1 = new AsciiHexEncoding('~', new char[] {'.','[', ']', '\\017', '\\020', '\\000', '\\177'})",
"modifier": "public static final",
"original_string": "public static final AsciiHexEncoding TEST_ENCODING_1 = new AsciiHexEncoding('~', new char[] {'.','[',... | {
"body": "@Test\n public void testMultiCharEncode()\n {\n Assert.assertEquals(TEST_ENCODING_1.encode(\"a.b.c[d]~\"), \"a~2Eb~2Ec~5Bd~5D~7E\");\n }",
"class_method_signature": "TestAsciiHexEncoding.testMultiCharEncode()",
"constructor": false,
"full_signature": "@Test public void testMultiCharEncode()",
... | {
"fields": [
{
"declarator": "_encodingChar",
"modifier": "private final",
"original_string": "private final char _encodingChar;",
"type": "char",
"var_name": "_encodingChar"
},
{
"declarator": "_reservedChars",
"modifier": "private final",
"original_string... | {
"body": "public String encode(String s)\n {\n if (s == null)\n {\n return null;\n }\n StringBuilder sb = new StringBuilder();\n int len = s.length();\n for (int i = 0; i < len; i++)\n {\n char c = s.charAt(i);\n if (c == _encodingChar || _reservedChars.contains(c))\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_221 | {
"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 testNotMissingOperandAnd()\n {\n PredicateExpressionParser.parse(\"! & com.linkedin.data.it.AlwaysFalsePredicate\");\n }",
"class_method_signature": "TestPredicateExpressionParser.testNotMissingOperandAnd()",
"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_364 | {
"fields": [],
"file": "d2/src/test/java/com/linkedin/d2/balancer/util/hashing/DistributionNonDiscreteRingTest.java",
"identifier": "DistributionNonDiscreteRingTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testLowProbabilityHost() throws Exception {\n Map<URI, Integer> pointsMap = new HashMap<>();\n Map<URI, Integer> countsMap = new HashMap<>();\n\n List<URI> goodHosts = addHostsToPointMap(9, 100, pointsMap);\n List<URI> slowStartHost = addHostsToPointMap(1, 1, pointsMap);\n ... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(DistributionNonDiscreteRing.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(DistributionNonDiscreteRing.class);",
"type": "Logger",
"var_name": "LOG... | {
"body": "@Nonnull\n @Override\n public Iterator<T> getIterator(int unused)\n {\n List<T> hosts = new ArrayList<>(_cumulativePointsMap.values());\n if (!hosts.isEmpty())\n {\n Collections.shuffle(hosts);\n //we try to put host with higher probability as the first by calling get. This avoids the... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_108 | {
"fields": [],
"file": "restli-client-util-recorder/src/test/java/com/linkedin/restli/client/util/TestPatchTreeRecorder.java",
"identifier": "TestPatchTreeRecorder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expectedExceptions = IllegalArgumentException.class)\n public void testSimpleSetRemoveOptionalIfNullOnRequiredFieldFail()\n {\n makeOne().getRecordingProxy().setFooRequired(null, SetMode.REMOVE_OPTIONAL_IF_NULL);\n }",
"class_method_signature": "TestPatchTreeRecorder.testSimpleSetRemoveOption... | {
"fields": [
{
"declarator": "_templateProxy",
"modifier": "private final",
"original_string": "private final T _templateProxy;",
"type": "T",
"var_name": "_templateProxy"
},
{
"declarator": "_patchTree",
"modifier": "private final",
"original_string": "pri... | {
"body": "public T getRecordingProxy()\n {\n return _templateProxy;\n }",
"class_method_signature": "PatchTreeRecorder.getRecordingProxy()",
"constructor": false,
"full_signature": "public T getRecordingProxy()",
"identifier": "getRecordingProxy",
"invocations": [],
"modifiers": "public",
"paramet... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_558 | {
"fields": [
{
"declarator": "CODEC = new JacksonDataCodec()",
"modifier": "private static final",
"original_string": "private static final JacksonDataCodec CODEC = new JacksonDataCodec();",
"type": "JacksonDataCodec",
"var_name": "CODEC"
},
{
"declarator": "MAXIMUM_RE... | {
"body": "@Test(dataProvider = \"multiplexerConfigurations\")\n public void testHandleSequentialRequests(MultiplexerRunMode multiplexerRunMode) throws Exception\n {\n SynchronousRequestHandler mockHandler = createMockHandler();\n MultiplexedRequestHandlerImpl multiplexer = createMultiplexer(mockHandler, mult... | {
"fields": [
{
"declarator": "MUX_PLAN_CLASS = \"mux\"",
"modifier": "private static final",
"original_string": "private static final String MUX_PLAN_CLASS = \"mux\";",
"type": "String",
"var_name": "MUX_PLAN_CLASS"
},
{
"declarator": "MUX_URI_PATH = \"/mux\"",
"... | {
"body": "@Override\n public void handleRequest(RestRequest request, RequestContext requestContext, final Callback<RestResponse> callback)\n {\n if (HttpMethod.POST != HttpMethod.valueOf(request.getMethod()))\n {\n _log.error(\"POST is expected, but \" + request.getMethod() + \" received\");\n call... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_237 | {
"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 testIncompatibleRestLiDataAnnotations()\n {\n final Collection<CompatibilityInfo> errors = new HashSet<CompatibilityInfo>();\n errors.add(new CompatibilityInfo(Arrays.<Object>asList(\"\", \"annotations\", \"intB\"),\n CompatibilityInfo.Type.AN... | {
"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 check(String prevSnapshotPath, String currSnapshotPath, CompatibilityLevel compatLevel)\n {\n return checkCompatibility(prevSnapshotPath, currSnapshotPath, compatLevel, false);\n }",
"class_method_signature": "RestLiSnapshotCompatibilityChecker.check(String prevSnapshotPa... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_667 | {
"fields": [],
"file": "restli-common/src/test/java/com/linkedin/restli/internal/common/TestQueryParamsDataMap.java",
"identifier": "TestQueryParamsDataMap",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n /**\n * Test query string representation of a DataMap representing a compound key\n */\n public void testCompoundKeyDataMapQueryString() throws Exception\n {\n DataMap dataMap = new DataMap();\n dataMap.put(\"memberID\", 2);\n dataMap.put(\"groupID\", 1);\n\n Map<String, List<Str... | {
"fields": [
{
"declarator": "SEGMENT_DELIMITER_PATTERN =\n Pattern.compile(Pattern.quote(PathSegment.PATH_SEPARATOR))",
"modifier": "private static final",
"original_string": "private static final Pattern SEGMENT_DELIMITER_PATTERN =\n... | {
"body": "public static Map<String, List<String>> queryString(DataMap dataMap){\n Map<String, List<String>> result = new HashMap<String, List<String>>();\n DataMap processedDataMap = processProjections(dataMap, result);\n iterate(\"\", processedDataMap, result);\n return result;\n }",
"class_method_si... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_372 | {
"fields": [
{
"declarator": "MY_SERVICES_FS = \"myServices\"",
"modifier": "public static final",
"original_string": "public static final String MY_SERVICES_FS = \"myServices\";",
"type": "String",
"var_name": "MY_SERVICES_FS"
},
{
"declarator": "UNVALID_FILES = Array... | {
"body": "@Test(timeOut = 10000)\n public void testThrottling() throws InterruptedException\n {\n int NRequests = 100;\n createNServicesIniFiles(NRequests);\n\n TestLoadBalancer balancer = new TestLoadBalancer(50);\n AtomicInteger requestCount = balancer.getRequestCount();\n LoadBalancer warmUpLoadB... | {
"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_688 | {
"fields": [
{
"declarator": "_photoRes",
"modifier": "private",
"original_string": "private PhotoResource _photoRes;",
"type": "PhotoResource",
"var_name": "_photoRes"
},
{
"declarator": "_albumRes",
"modifier": "private",
"original_s... | {
"body": "@Test(expectedExceptions = RestLiServiceException.class)\n public void testBadUpdateIdsInEntry()\n {\n // shouldn't be able to put IDs in update entry\n CompoundKey key = new CompoundKey().append(\"photoId\", 1L).append(\"albumId\", 1L);\n AlbumEntry entry = new AlbumEntry().setAddTime(4).setPho... | {
"fields": [
{
"declarator": "_db",
"modifier": "@Inject\n @Named(\"albumEntryDb\")\n private",
"original_string": "@Inject\n @Named(\"albumEntryDb\")\n private AlbumEntryDatabase _db;",
"type": "AlbumEntryDatabase",
"var_name": "_db"
},
{
"declarator": "_photoDb",... | {
"body": "@Override\n @SuccessResponse(statuses = { HttpStatus.S_204_NO_CONTENT })\n @ServiceErrors(INVALID_PERMISSIONS)\n @ParamError(code = INVALID_ID, parameterNames = { \"albumEntryId\" })\n public UpdateResponse update(CompoundKey key, AlbumEntry entity)\n {\n long photoId = (Long) key.getPart(\"photoId... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_630 | {
"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 testInvalidJSONByteStringToDataMap() throws MimeTypeParseException, IOException\n {\n bytesToDataMap(\"application/json\", ByteString.copy(\"helloWorld\".getBytes()));\n }",
"class_method_signature": "TestDataMapConverter.testInvalidJSONBy... | {
"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_260 | {
"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 = \"avroToDataSchemaTranslationModeErrorData\")\n public void testAvroToDataSchemaTranslationModeError(AvroToDataSchemaTranslationMode translationMode, String avroSchemaText, Class<? extends Exception> expectedException)\n {\n AvroToDataSchemaTranslationOptions options = new AvroToD... | {
"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_92 | {
"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 testConvertDataMapToDataSchema() throws IOException\n {\n for (String good : goodInputs)\n {\n NamedDataSchema dataSchema = (NamedDataSchema) TestUtil.dataSchemaFromString(good);\n\n DataMap mapFromString = TestUtil.dataMapFromString(good);\n PegasusSchemaParser p... | {
"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 DataSchema dataMapToDataSchema(DataMap map, PegasusSchemaParser parser)\n {\n // Convert DataMap into DataSchema\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n JacksonDataCodec codec = new JacksonDataCodec();\n try\n {\n codec.writeMap(map, outputSt... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_325 | {
"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 testContainsSymlink()\n {\n Assert.assertTrue(SymlinkUtil.containsSymlink(path1));\n Assert.assertTrue(SymlinkUtil.containsSymlink(path2));\n Assert.assertTrue(SymlinkUtil.containsSymlink(path3));\n Assert.assertFalse(SymlinkUtil.containsSymlink(path4));\n Assert.assert... | {
"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 boolean containsSymlink(String path)\n {\n return (firstSymlinkIndex(path) < 0) ? false : true;\n }",
"class_method_signature": "SymlinkUtil.containsSymlink(String path)",
"constructor": false,
"full_signature": "public static boolean containsSymlink(String path)",
"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_149 | {
"fields": [],
"file": "restli-client/src/test/java/com/linkedin/restli/client/TestRequest.java",
"identifier": "TestRequest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testToSecureString()\n {\n GetRequestBuilder<Long, TestRecord> builder = generateDummyRequestBuilder();\n Request<TestRecord> request = builder.id(5L).build();\n Assert.assertEquals(\n request.toSecureString(),\n \"com.linkedin.restli.client.GetRequest{_method=g... | {
"fields": [
{
"declarator": "SLASH_PATTERN = Pattern.compile(\"/\")",
"modifier": "private static final",
"original_string": "private static final Pattern SLASH_PATTERN = Pattern.compile(\"/\");",
"type": "Pattern",
"var_name": "SLASH_PATTERN"
},
{
"declarator": "URI_... | {
"body": "public String toSecureString()\n {\n final StringBuilder sb = new StringBuilder();\n sb.append(getClass().getName());\n sb.append(\"{_method=\").append(_method);\n sb.append(\", _baseUriTemplate=\").append(_baseUriTemplate);\n sb.append(\", _methodName=\").append(_methodName);\n sb.appen... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_519 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/response/TestErrorResponseBuilder.java",
"identifier": "TestErrorResponseBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNullStatus()\n {\n RestLiServiceException exception = new RestLiServiceException((HttpStatus) null);\n ErrorResponseBuilder builder = new ErrorResponseBuilder(ErrorResponseFormat.FULL);\n\n ErrorResponse errorResponse = builder.buildErrorResponse(exception);\n Assert.a... | {
"fields": [
{
"declarator": "DEFAULT_INTERNAL_ERROR_MESSAGE = \"INTERNAL SERVER ERROR\"",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_INTERNAL_ERROR_MESSAGE = \"INTERNAL SERVER ERROR\";",
"type": "String",
"var_name": "DEFAULT_INTERNAL_... | {
"body": "public ErrorResponse buildErrorResponse(RestLiServiceException result)\n {\n return buildErrorResponse(result, result.hasOverridingErrorResponseFormat() ? result.getOverridingFormat() : _errorResponseFormat);\n }",
"class_method_signature": "ErrorResponseBuilder.buildErrorResponse(RestLiServiceExcep... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_132 | {
"fields": [],
"file": "restli-client/src/test/java/com/linkedin/restli/client/TestAbstractRequestBuilder.java",
"identifier": "TestAbstractRequestBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testQueryParameterCopyPreservesSetOrder()\n {\n // Experimentally, this order of inputs into LinkedHashSet will be different\n // when copied into a HashSet and iterated over. This _is_ subject to change\n // as the JDK changes, so this is a best effort test only.\n Linked... | {
"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": "static protected Map<String, Object> getReadOnlyQueryParameters(Map<String, Object> queryParams)\n {\n try\n {\n Map<String, Object> readOnlyCopy = new HashMap<String, Object>\n (CollectionUtils.getMapInitialCapacity(queryParams.size(), 0.75f), 0.75f);\n for (Map.Entry<String, Obj... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_562 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/server/config/TestResourceMethodConfigElement.java",
"identifier": "TestResourceMethodConfigElement",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"invalidConfigs\", expectedExceptions = {ResourceMethodConfigParsingException.class})\n public void testInvalidTimeoutConfigParsing(RestLiMethodConfig.ConfigType configType,\n String configKey,\n ... | {
"fields": [
{
"declarator": "_key",
"modifier": "private final",
"original_string": "private final String _key;",
"type": "String",
"var_name": "_key"
},
{
"declarator": "_value",
"modifier": "private final",
"original_string": "private final Object _value... | {
"body": "static ResourceMethodConfigElement parse(RestLiMethodConfig.ConfigType configType, String key, Object value)\n throws ResourceMethodConfigParsingException\n {\n ParsingErrorListener errorListener = new ParsingErrorListener();\n ANTLRInputStream input = new ANTLRInputStream(key);\n Resour... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_427 | {
"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 testRandomChangePoints()\n throws URISyntaxException\n {\n int pointNum = 5;\n int loopNum = 100;\n Map<String, Integer> pointsMp = buildPointsMap(pointNum);\n Map<String, Integer> maxPoints = new HashMap<>(pointNum);\n Random ... | {
"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_309 | {
"fields": [],
"file": "r2-core/src/test/java/com/linkedin/r2/util/TestLinkedDeque.java",
"identifier": "TestLinkedDeque",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testEarlyRemoveFails()\n {\n LinkedDeque<Integer> q = new LinkedDeque<Integer>(Arrays.asList(1,2,3));\n try\n {\n q.iterator().remove();\n }\n catch (IllegalStateException e)\n {\n // Expected\n }\n }",
"class_method_signature": "TestLinkedDeque.testE... | {
"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_51 | {
"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 testReplaceByNameNested() throws Exception\n {\n SimpleTestData data = IteratorTestData.createSimpleTestData();\n \n Builder.create(data.getDataElement(), IterationOrder.PRE_ORDER)\n .filterBy(Predicates.nameEquals(\"foo\"))\n .replace(new DataList());\n \n assert... | {
"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_535 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/response/TestBatchCreateResponseBuilder.java",
"identifier": "TestBatchCreateResponseBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"exceptionTestData\")\n public void testBuilderExceptions(Object result, String expectedErrorMessage) throws URISyntaxException\n {\n Map<String, String> headers = ResponseBuilderUtil.getHeaders();\n ResourceMethodDescriptor mockDescriptor = getMockResourceMethodDescriptor(nul... | {
"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_165 | {
"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 testSendRequest7()\n {\n when(_builder.build()).thenReturn(_request);\n when(_controller.getDisruptContext(any(String.class), any(ResourceMethod.class))).thenReturn(_disrupt);\n _client.sendRequest(_builder, _context, _behavior);\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_470 | {
"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 testRecordRefArrayTrim() throws CloneNotSupportedException\n {\n TyperefTest test = new TyperefTest();\n\n RecordBarArrayArray recordBarArrayArray = new RecordBarArrayArray();\n\n RecordBarArray recordBarArray = new RecordBarArray();\n RecordBar recordBar = new RecordBar()... | {
"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_47 | {
"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 testTransformByPredicateAtPath() throws Exception\n {\n SimpleTestData data = IteratorTestData.createSimpleTestData();\n \n Builder.create(data.getDataElement(), IterationOrder.PRE_ORDER)\n .filterBy(Predicates.pathMatchesPattern(\"foo\", Wildcard.ANY_ONE, \"id\"))\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 transform(Object root, DataIterator it, Transform<Object,Object> transform)\n {\n DataElement element;\n \n // don't transform in place because iterator behavior with replacements (which behave like a remove and an add) while iterating is undefined\n ArrayList<ToTransform>... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_173 | {
"fields": [
{
"declarator": "DEFAULT_REQUEST_CONTEXT = new RequestContext()",
"modifier": "private static final",
"original_string": "private static final RequestContext DEFAULT_REQUEST_CONTEXT = new RequestContext();",
"type": "RequestContext",
"var_name": "DEFAULT_REQUEST_CONTEXT... | {
"body": "@Test\n public void testShutdown()\n {\n Client client = EasyMock.createMock(Client.class);\n\n @SuppressWarnings(\"unchecked\")\n Callback<None> callback = EasyMock.createMock(Callback.class);\n Capture<Callback<None>> callbackCapture = EasyMock.newCapture();\n\n // Underlying client's sh... | {
"fields": [
{
"declarator": "DEFAULT_ACCEPT_TYPES = Collections.emptyList()",
"modifier": "private static final",
"original_string": "private static final List<ContentType> DEFAULT_ACCEPT_TYPES = Collections.emptyList();",
"type": "List<ContentType>",
"var_name": "DEFAULT_ACCEPT_T... | {
"body": "@Override\n public void shutdown(Callback<None> callback)\n {\n _client.shutdown(callback);\n }",
"class_method_signature": "RestClient.shutdown(Callback<None> callback)",
"constructor": false,
"full_signature": "@Override public void shutdown(Callback<None> callback)",
"identifier": "shutdow... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.