id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
6944525_455 | {
"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 testBestMatchForForNonNullMatch()\n {\n Assert.assertNotEquals(MIMEParse.bestMatch(Arrays.asList(new String[] { JSON_TYPE, PSON_TYPE }),\n JSON_PSON_HTML_HEADER), EMPTY_TYPE);\n }",
"class_method_signature": "TestMIMEParse.testBestMa... | {
"fields": [],
"file": "restli-server/src/main/java/com/linkedin/restli/internal/server/util/MIMEParse.java",
"identifier": "MIMEParse",
"interfaces": "",
"methods": [
{
"class_method_signature": "MIMEParse.parseMimeType(String mimeType)",
"constructor": false,
"full_signature": "protec... | {
"body": "public static String bestMatch(Collection<String> supported, String header)\n {\n List<ParseResults> parseResults = new LinkedList<ParseResults>();\n List<FitnessAndQuality> weightedMatches = new LinkedList<FitnessAndQuality>();\n for (String r : StringUtils.split(header, ','))\n parseResult... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_286 | {
"fields": [
{
"declarator": "KEY = \"key\"",
"modifier": "private static final",
"original_string": "private static final String KEY = \"key\";",
"type": "String",
"var_name": "KEY"
},
{
"declarator": "VALUE = \"value\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void testGetObjectWithKeyNotInstanceOf()\n {\n _requestContext.putLocalAttr(KEY, VALUE);\n\n Assert.assertNull(RequestContextUtil.getObjectWithKey(KEY, _requestContext, Integer.class));\n }",
"class_method_signature": "TestRequestContextUtil.testGetObjectWithKeyNotInstanceOf()",
... | {
"fields": [],
"file": "r2-core/src/main/java/com/linkedin/r2/util/RequestContextUtil.java",
"identifier": "RequestContextUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "RequestContextUtil.RequestContextUtil()",
"constructor": true,
"full_signature": "private Request... | {
"body": "@SuppressWarnings(\"unchecked\")\n public static <T> T getObjectWithKey(String key, RequestContext requestContext, Class<T> clazz)\n {\n final Object object = requestContext.getLocalAttr(key);\n\n return (clazz.isInstance(object)) ? (T) object : null;\n }",
"class_method_signature": "RequestCont... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_269 | {
"fields": [],
"file": "data-avro/src/test/java/com/linkedin/data/avro/TestAvroOverrideFactory.java",
"identifier": "TestAvroOverrideFactory",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSchemaNames() throws IOException\n {\n String schemaTemplate =\n \"{\\n\" +\n \" \\\"type\\\" : \\\"record\\\",\\n\" +\n \" \\\"name\\\" : \\\"Foo\\\",\\n\" +\n \" \\\"fields\\\" : [],\\n\" +\n \" \\\"avro\\\" : {\\n\" +\n \" \\\"schema\\\" ... | {
"fields": [
{
"declarator": "_instantiateCustomDataTranslator",
"modifier": "private",
"original_string": "private boolean _instantiateCustomDataTranslator;",
"type": "boolean",
"var_name": "_instantiateCustomDataTranslator"
}
],
"file": "data-avro/src/main/java/com/linkedi... | {
"body": "AvroOverride createFromDataSchema(DataSchema schema)\n {\n AvroOverride avroOverride = null;\n Map<String, Object> properties = schema.getProperties();\n Object avro = properties.get(\"avro\");\n if (avro != null)\n {\n boolean ok = true;\n Object avroTranslator = null;\n Obj... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_639 | {
"fields": [],
"file": "restli-common/src/test/java/com/linkedin/restli/internal/common/TestURIElementParser.java",
"identifier": "TestURIElementParser",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"unicode\")\n public void testUnicode(String decodable, Object expectedObj) throws PathSegment.PathSegmentSyntaxException\n {\n Object actualObj = URIElementParser.parse(decodable);\n Assert.assertEquals(actualObj, expectedObj);\n }",
"class_method_signature": "TestURIEleme... | {
"fields": [],
"file": "restli-common/src/main/java/com/linkedin/restli/internal/common/URIElementParser.java",
"identifier": "URIElementParser",
"interfaces": "",
"methods": [
{
"class_method_signature": "URIElementParser.parse(String element)",
"constructor": false,
"full_signature": ... | {
"body": "public static Object parse(String element) throws PathSegment.PathSegmentSyntaxException\n {\n Queue<Token> tokens = tokenizeElement(element);\n Object result = parseElement(tokens);\n\n if (!tokens.isEmpty())\n {\n throw new PathSegment.PathSegmentSyntaxException(\"tokens left over after... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_74 | {
"fields": [],
"file": "data/src/test/java/com/linkedin/data/schema/TestSchemaToPdlEncoder.java",
"identifier": "TestSchemaToPdlEncoder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testEncodeRecordWithEmptyDataMapInProperty() throws IOException\n {\n RecordDataSchema source =\n new RecordDataSchema(new Name(\"com.linkedin.test.RecordDataSchema\"), RecordDataSchema.RecordType.RECORD);\n Map<String, Object> properties = new HashMap<>();\n propertie... | {
"fields": [
{
"declarator": "UNION_MULTILINE_THRESHOLD = 5",
"modifier": "private static final",
"original_string": "private static final int UNION_MULTILINE_THRESHOLD = 5;",
"type": "int",
"var_name": "UNION_MULTILINE_THRESHOLD"
},
{
"declarator": "_writer",
"m... | {
"body": "@Override\n public void encode(DataSchema schema) throws IOException\n {\n // Initialize a new builder for the preferred encoding style\n _builder = _encodingStyle.newBuilderInstance(_writer);\n\n // Set and write root namespace/package\n if (schema instanceof NamedDataSchema)\n {\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_584 | {
"fields": [
{
"declarator": "DEBUG_HANDLER_RESPONSE_A = \"Response A\"",
"modifier": "private static final",
"original_string": "private static final String DEBUG_HANDLER_RESPONSE_A = \"Response A\";",
"type": "String",
"var_name": "DEBUG_HANDLER_RESPONSE_A"
},
{
"dec... | {
"body": "@Test\n public void testStreamRequestMultiplexedRequestMultiPartAcceptType() throws Exception\n {\n //This test verifies that a StreamRequest sent to the RestLiServer throws an exception if the accept type contains\n //multipart/related.\n StreamRequest streamRequestMux = new StreamRequestBuilde... | {
"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_212 | {
"fields": [],
"file": "restli-tools/src/test/java/com/linkedin/restli/tools/data/TestPredicateExpressionParser.java",
"identifier": "TestPredicateExpressionParser",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNotOrParenAnd()\n {\n final Predicate parsed = PredicateExpressionParser.parse(\"!(com.linkedin.data.it.AlwaysTruePredicate | com.linkedin.data.it.AlwaysTruePredicate) & !com.linkedin.data.it.AlwaysFalsePredicate\");\n Assert.assertEquals(parsed.getClass(), AndPredicate.clas... | {
"fields": [
{
"declarator": "TRIMMER_PATTERN = Pattern.compile(\"\\\\s\")",
"modifier": "private static final",
"original_string": "private static final Pattern TRIMMER_PATTERN = Pattern.compile(\"\\\\s\");",
"type": "Pattern",
"var_name": "TRIMMER_PATTERN"
},
{
"decl... | {
"body": "public static Predicate parse(String expression)\n {\n final Stack<Predicate> predicateStack = new Stack<Predicate>();\n final Stack<Character> operatorStack = new Stack<Character>();\n\n final String trimmedExpression = TRIMMER_PATTERN.matcher(expression).replaceAll(\"\");\n final StringToken... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_642 | {
"fields": [
{
"declarator": "cookieA",
"modifier": "private",
"original_string": "private HttpCookie cookieA;",
"type": "HttpCookie",
"var_name": "cookieA"
},
{
"declarator": "cookieB",
"modifier": "private",
"original_string": "private HttpCookie cookieB;... | {
"body": "@Test\n public void testInvalidCookieFromClient()\n {\n cookieA.setComment(\"nothing important\");\n List<String> encodeStrs = Collections.singletonList(\"$Domain=.linkedin.com; $Port=80; $Path=/; $Version=0;\");\n List<HttpCookie> cookieList = CookieUtil.decodeCookies(encodeStrs);\n\n Asser... | {
"fields": [],
"file": "restli-common/src/main/java/com/linkedin/restli/internal/common/CookieUtil.java",
"identifier": "CookieUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "CookieUtil.encodeCookies(List<HttpCookie> cookies)",
"constructor": false,
"full_signature": ... | {
"body": "public static List<HttpCookie> decodeCookies(List<String> cookieStrs)\n {\n List<HttpCookie> cookies = new ArrayList<HttpCookie>();\n if (cookieStrs == null)\n {\n return cookies;\n }\n\n for (String cookieStr : cookieStrs)\n {\n if (cookieStr == null)\n {\n continu... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_357 | {
"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 testNonStickyAndNonPartitioning() throws ServiceUnavailableException\n {\n int partitionCount = 1;\n int requestPerPartition = 1000;\n int totalHostCount = 100;\n\n HashRingProvider ringProvider =\n createStaticHashRingProvider(totalHostCount, partitionCount, getHas... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(RingBasedUriMapper.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(RingBasedUriMapper.class);",
"type": "Logger",
"var_name": "LOG"
},
{
... | {
"body": "@Override\n public <KEY> URIMappingResult<KEY> mapUris(List<URIKeyPair<KEY>> requestUriKeyPairs)\n throws ServiceUnavailableException\n {\n if (requestUriKeyPairs == null || requestUriKeyPairs.isEmpty())\n {\n return new URIMappingResult<>(Collections.emptyMap(), Collections.emptyMap(), C... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_479 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/model/TestResourceModel.java",
"identifier": "TestResourceModel",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"isAnyServiceErrorListDefinedData\")\n public void testIsAnyServiceErrorListDefined(ServiceError[] resourceLevelServiceErrors,\n ResourceMethodDescriptor[] resourceMethodDescriptors, boolean expected) {\n // Create dummy resource model\n final ResourceModel resourceModel =... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(ResourceModel.class.getSimpleName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ResourceModel.class.getSimpleName());",
"type": "Logger",
"var_n... | {
"body": "public boolean isAnyServiceErrorListDefined()\n {\n return _serviceErrors != null || _resourceMethodDescriptors.stream()\n .map(ResourceMethodDescriptor::getServiceErrors)\n .anyMatch(Objects::nonNull);\n }",
"class_method_signature": "ResourceModel.isAnyServiceErrorListDefined()",
"... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_183 | {
"fields": [
{
"declarator": "FS = File.separator",
"modifier": "private static final",
"original_string": "private static final String FS = File.separator;",
"type": "String",
"var_name": "FS"
},
{
"declarator": "SOURCE_ROOT = String.join(FS, \"src\", \"test\", \"reso... | {
"body": "@Test(dataProvider = \"fullClassName\")\n public void testTranslatePdscToPdl(String packageName, String className) throws Exception\n {\n String temp = Files.createTempDirectory(\"restli\").toFile().getAbsolutePath();\n SchemaFormatTranslator.main(new String[]{\"-o\", RESOLVER_DIR, SOURCE_ROOT, tem... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(SchemaFormatTranslator.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SchemaFormatTranslator.class);",
"type": "Logger",
"var_name": "LOGGER"... | {
"body": "public static void main(String[] args) throws Exception\n {\n try\n {\n final CommandLineParser parser = new GnuParser();\n CommandLine cl = parser.parse(OPTIONS, args);\n\n if (cl.hasOption('h'))\n {\n help();\n System.exit(0);\n }\n\n String sourceFormat... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_496 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/methods/arguments/TestArgumentBuilder.java",
"identifier": "TestArgumentBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"noOpParameterData\")\n public void testNoOpParamType(Class<?> dataType, Parameter.ParamType paramType)\n {\n String paramKey = \"testParam\";\n\n ServerResourceContext mockResourceContext = EasyMock.createMock(ServerResourceContext.class);\n\n @SuppressWarnings({\"unchecke... | {
"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_58 | {
"fields": [],
"file": "data/src/test/java/com/linkedin/data/it/TestValueAccumulator.java",
"identifier": "TestValueAccumulator",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAccumulateByPathAndFilter() throws Exception\n {\n SimpleTestData data = IteratorTestData.createSimpleTestData();\n \n List<Object> ids = new ArrayList<Object>(\n Builder.create(data.getDataElement(), IterationOrder.PRE_ORDER)\n .filterBy(Predicates.and(Pred... | {
"fields": [],
"file": "data/src/main/java/com/linkedin/data/it/ValueAccumulator.java",
"identifier": "ValueAccumulator",
"interfaces": "",
"methods": [
{
"class_method_signature": "ValueAccumulator.accumulateValues(DataIterator it, Collection<Object> accumulator)",
"constructor": false,
... | {
"body": "public static Collection<Object> accumulateValues(DataIterator it, Collection<Object> accumulator)\n {\n for(DataElement element = it.next(); element !=null; element = it.next())\n {\n accumulator.add(element.getValue());\n }\n return accumulator;\n }",
"class_method_signature": "Value... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_615 | {
"fields": [],
"file": "restli-common/src/test/java/com/linkedin/restli/common/TestIdResponse.java",
"identifier": "TestIdResponse",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testHashCode()\n {\n IdResponse<Long> longResponse1 = new IdResponse<Long>(1L);\n IdResponse<Long> longResponse2 = new IdResponse<Long>(1L);\n IdResponse<Long> nullLongResponse = new IdResponse<Long>(null);\n IdResponse<String> nullStringResponse = new IdResponse<String>(n... | {
"fields": [
{
"declarator": "_key",
"modifier": "private",
"original_string": "private K _key;",
"type": "K",
"var_name": "_key"
}
],
"file": "restli-common/src/main/java/com/linkedin/restli/common/IdResponse.java",
"identifier": "IdResponse",
"interfaces": "",
"metho... | {
"body": "@Override\n public int hashCode()\n {\n return _key == null? 0 : _key.hashCode();\n }",
"class_method_signature": "IdResponse.hashCode()",
"constructor": false,
"full_signature": "@Override public int hashCode()",
"identifier": "hashCode",
"invocations": [
"hashCode"
],
"modifiers":... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_245 | {
"fields": [
{
"declarator": "FS = File.separator",
"modifier": "private static final",
"original_string": "private static final String FS = File.separator;",
"type": "String",
"var_name": "FS"
},
{
"declarator": "IDLS_DIR = \"src\" + FS + \"test\" + FS + \"resources\"... | {
"body": "@Test\n public void testActionResource() throws Exception\n {\n String idl = moduleDir + FS + IDLS_DIR + FS + \"testAction.restspec.json\";\n Set<BuilderSpec> builderSpecs = generateBuilderSpec(new String[] {idl});\n Assert.assertNotNull(builderSpecs);\n Assert.assertEquals(builderSpecs.size(... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(RequestBuilderSpecGenerator.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(RequestBuilderSpecGenerator.class);",
"type": "Logger",
"var_name": "log... | {
"body": "private static String getResourcePath(String rawPath)\n {\n if (rawPath.charAt(0) == '/')\n {\n return rawPath.substring(1);\n }\n return rawPath;\n }",
"class_method_signature": "RequestBuilderSpecGenerator.getResourcePath(String rawPath)",
"constructor": false,
"full_signature": ... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_300 | {
"fields": [],
"file": "r2-core/src/test/java/com/linkedin/r2/util/TestLinkedDeque.java",
"identifier": "TestLinkedDeque",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testPollLast()\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.pollLast(), 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 T pollLast()\n {\n if (_tail == null)\n {\n return null;\n }\n return removeNode(_tail);\n }",
"class_method_signature": "LinkedDeque.pollLast()",
"constructor": false,
"full_signature": "@Override public T pollLast()",
"identifier": "pollLast",
"invocations... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_195 | {
"fields": [],
"file": "restli-tools/src/test/java/com/linkedin/restli/tools/data/TestPredicateExpressionParser.java",
"identifier": "TestPredicateExpressionParser",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testOrAnd()\n {\n final Predicate parsed = PredicateExpressionParser.parse(\"com.linkedin.data.it.AlwaysTruePredicate | com.linkedin.data.it.AlwaysFalsePredicate & com.linkedin.data.it.AlwaysTruePredicate\");\n Assert.assertEquals(parsed.getClass(), OrPredicate.class);\n\n fi... | {
"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_480 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/model/TestRestLiApiBuilder.java",
"identifier": "TestRestLiApiBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"resourcesWithClashingNamesDataProvider\")\n public void testResourceNameClash(Class<?>[] classes)\n {\n Set<Class<?>> resourceClasses = new HashSet<Class<?>>(Arrays.<Class<?>>asList(classes));\n try\n {\n RestLiApiBuilder.buildResourceModels(resourceClasses);\n A... | {
"fields": [
{
"declarator": "_log = LoggerFactory.getLogger(RestLiApiBuilder.class)",
"modifier": "private final static",
"original_string": "private final static Logger _log = LoggerFactory.getLogger(RestLiApiBuilder.class);",
"type": "Logger",
"var_name": "_log"
},
{
... | {
"body": "public static Map<String, ResourceModel> buildResourceModels(final Set<Class<?>> restliAnnotatedClasses)\n {\n Map<String, ResourceModel> rootResourceModels = new HashMap<String, ResourceModel>();\n Map<Class<?>, ResourceModel> resourceModels = new HashMap<Class<?>, ResourceModel>();\n\n for (Cla... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_253 | {
"fields": [
{
"declarator": "_debug = false",
"modifier": "private",
"original_string": "private boolean _debug = false;",
"type": "boolean",
"var_name": "_debug"
},
{
"declarator": "_testDir",
"modifier": "private",
"original_string": "private File _testD... | {
"body": "@Test(dataProvider = \"toAvroSchemaDataBeforeReferree\")\n public void testReferrerBeforeReferreeInArgs(Map<String, String> testSchemas, String testPath, boolean override) throws IOException\n {\n Map<File, Map.Entry<String,String>> files = TestUtil.createSchemaFiles(_testDir, testSchemas, _debug);\n ... | {
"fields": [
{
"declarator": "GENERATOR_AVRO_TRANSLATE_OPTIONAL_DEFAULT = \"generator.avro.optional.default\"",
"modifier": "public static final",
"original_string": "public static final String GENERATOR_AVRO_TRANSLATE_OPTIONAL_DEFAULT = \"generator.avro.optional.default\";",
"type": "Str... | {
"body": "public static void main(String[] args) throws IOException\n {\n if (args.length < 2)\n {\n _log.error(\"Usage: AvroSchemaGenerator targetDirectoryPath [sourceFile or sourceDirectory or schemaName]+\");\n System.exit(1);\n }\n\n String resolverPath = System.getProperty(AbstractGenerat... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_603 | {
"fields": [
{
"declarator": "ANY_URI = \"http://localhost:8080/foo/bar?q=baz\"",
"modifier": "private static final",
"original_string": "private static final String ANY_URI = \"http://localhost:8080/foo/bar?q=baz\";",
"type": "String",
"var_name": "ANY_URI"
},
{
"decl... | {
"body": "@Test\n public void testStreamToHttp2HeadersCookies() throws Exception\n {\n StreamRequestBuilder streamRequestBuilder = new StreamRequestBuilder(new URI(ANY_URI));\n IntStream.range(0, 10).forEach(i -> streamRequestBuilder.addCookie(ANY_COOKIE));\n StreamRequest request = streamRequestBuilder.b... | {
"fields": [
{
"declarator": "HEADER_BLACKLIST = new HashSet<>()",
"modifier": "private static final",
"original_string": "private static final HashSet<String> HEADER_BLACKLIST = new HashSet<>();",
"type": "HashSet<String>",
"var_name": "HEADER_BLACKLIST"
}
],
"file": "r2-ne... | {
"body": "public static <R extends Request> Http2Headers toHttp2Headers(R request) throws Exception\n {\n URI uri = request.getURI();\n URL url = new URL(uri.toString());\n\n String method = request.getMethod();\n String authority = url.getAuthority();\n String path = url.getFile();\n String schem... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_316 | {
"fields": [
{
"declarator": "ACCEPT_COMPRESSIONS = \"gzip, deflate, bzip2, snappy\"",
"modifier": "private static final",
"original_string": "private static final String ACCEPT_COMPRESSIONS = \"gzip, deflate, bzip2, snappy\";",
"type": "String",
"var_name": "ACCEPT_COMPRESSIONS"
... | {
"body": "@Test(dataProvider = \"responseCompressionData\")\n public void testResponseCompressionRules(CompressionConfig responseCompressionConfig,\n CompressionOption responseCompressionOverride,\n String expectedAcceptEncoding,\n ... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ClientCompressionFilter.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ClientCompressionFilter.class);",
"type": "Logger",
"var_name": "LOG"
},... | {
"body": "@Override\n public void onRestRequest(RestRequest req, RequestContext requestContext,\n Map<String, String> wireAttrs,\n NextFilter<RestRequest, RestResponse> nextFilter)\n {\n try\n {\n if (_requestContentEncoding.hasCompressor())\n {... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_592 | {
"fields": [
{
"declarator": "HTTP_1_1 = HttpProtocolVersion.HTTP_1_1.name()",
"modifier": "public static final",
"original_string": "public static final String HTTP_1_1 = HttpProtocolVersion.HTTP_1_1.name();",
"type": "String",
"var_name": "HTTP_1_1"
},
{
"declarator"... | {
"body": "@Test\n public void testShutdownTimeoutDoesNotOccupyExecutors()\n throws InterruptedException, ExecutionException, TimeoutException\n {\n EventLoopGroup eventLoop = new NioEventLoopGroup();\n ScheduledExecutorService scheduler = Executors.newSingleThreadScheduledExecutor();\n HttpClient... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(HttpClientFactory.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(HttpClientFactory.class);",
"type": "Logger",
"var_name": "LOG"
},
{
... | {
"body": "@Override\n public void shutdown(final Callback<None> callback)\n {\n final int count;\n synchronized (_mutex)\n {\n _running = false;\n count = _clientsOutstanding;\n _factoryShutdownCallback = callback;\n }\n\n if (count == 0)\n {\n finishShutdown();\n }\n el... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_438 | {
"fields": [
{
"declarator": "URI_1",
"modifier": "private static",
"original_string": "private static URI URI_1;",
"type": "URI",
"var_name": "URI_1"
},
{
"declarator": "URI_2",
"modifier": "private static",
"original_string": "private static URI URI_2;",
... | {
"body": "@Test\n public void testAllClientsExcluded()\n {\n LoadBalancerStrategy.ExcludedHostHints.addRequestContextExcludedHost(_requestContext, URI_1);\n LoadBalancerStrategy.ExcludedHostHints.addRequestContextExcludedHost(_requestContext, URI_2);\n LoadBalancerStrategy.ExcludedHostHints.addRequestCont... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ClientSelector.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ClientSelector.class.getName());",
"type": "Logger",
"var_name": "LOG"
... | {
"body": "@Nullable\n public TrackerClient getTrackerClient(Request request,\n RequestContext requestContext,\n Ring<URI> ring,\n Map<URI, TrackerClient> trackerClients)\n {\n TrackerClient track... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_19 | {
"fields": [
{
"declarator": "DISRUPT_CONTEXT_KEY = \"R2_DISRUPT_CONTEXT\"",
"modifier": "private static final",
"original_string": "private static final String DISRUPT_CONTEXT_KEY = \"R2_DISRUPT_CONTEXT\";",
"type": "String",
"var_name": "DISRUPT_CONTEXT_KEY"
},
{
"de... | {
"body": "@Test\n public void testRestTimeoutDisrupt() throws Exception\n {\n final RequestContext requestContext = new RequestContext();\n requestContext.putLocalAttr(DISRUPT_CONTEXT_KEY, DisruptContexts.timeout());\n\n final DisruptFilter filter = new DisruptFilter(_scheduler, _executor, REQUEST_TIMEOUT... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(DisruptFilter.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(DisruptFilter.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declar... | {
"body": "@Override\n public void onRestRequest(RestRequest req,\n RequestContext requestContext,\n Map<String, String> wireAttrs,\n NextFilter<RestRequest, RestResponse> nextFilter)\n {\n disruptRequest(req, requestContext, wireAttrs, nextFilter);\n }",
"class_method_signature": "DisruptFilte... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_654 | {
"fields": [
{
"declarator": "NO_ESCAPING = URLEscaper.Escaping.NO_ESCAPING",
"modifier": "private static final",
"original_string": "private static final URLEscaper.Escaping NO_ESCAPING = URLEscaper.Escaping.NO_ESCAPING;",
"type": "URLEscaper.Escaping",
"var_name": "NO_ESCAPING"
... | {
"body": "@Test\n public void replaceQueryParam()\n {\n DataMap queryParams = new DataMap();\n queryParams.put(\"bq\", \"batch_finder\");\n queryParams.put(\"page\", \"1\");\n queryParams.put(\"count\", \"10\");\n\n\n\n DataMap criteria1 = new DataMap();\n criteria1.put(\"criteria1_fieldA\", \"va... | {
"fields": [
{
"declarator": "_EMPTY_STRING_ARRAY = new String[0]",
"modifier": "private static final",
"original_string": "private static final String[] _EMPTY_STRING_ARRAY = new String[0];",
"type": "String[]",
"var_name": "_EMPTY_STRING_ARRAY"
},
{
"declarator": "NO... | {
"body": "public static URI replaceQueryParam(URI uri, String queryParam, DataComplex values, DataMap parameters, ProtocolVersion version)\n {\n UriBuilder builder = UriBuilder.fromPath(uri.getPath());\n DataMap newQueryParams = new DataMap();\n newQueryParams.putAll(parameters);\n newQueryParams.put(qu... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_204 | {
"fields": [],
"file": "restli-tools/src/test/java/com/linkedin/restli/tools/data/TestPredicateExpressionParser.java",
"identifier": "TestPredicateExpressionParser",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDoubleParen()\n {\n final Predicate parsed = PredicateExpressionParser.parse(\"((com.linkedin.data.it.AlwaysTruePredicate))\");\n Assert.assertEquals(parsed.getClass(), AlwaysTruePredicate.class);\n }",
"class_method_signature": "TestPredicateExpressionParser.testDoublePa... | {
"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_341 | {
"fields": [],
"file": "d2/src/test/java/com/linkedin/d2/discovery/event/PropertyEventBusRequestsThrottlerTest.java",
"identifier": "PropertyEventBusRequestsThrottlerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(timeOut = 10000)\n public void testAllowZeroRequests() throws InterruptedException, ExecutionException, TimeoutException\n {\n TestSubscriber testSubscriber = new TestSubscriber();\n TestEventBus testEventBus = new TestEventBus(testSubscriber);\n PropertyEventBusRequestsThrottler<String> p... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(PropertyEventBusRequestsThrottler.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(PropertyEventBusRequestsThrottler.class);",
"type": "Logger",
"var... | {
"body": "public void sendRequests(Callback<None> callback)\n {\n LOG.info(\"Event Bus Requests throttler started for {} keys at a {} load rate\",\n _keysToFetch.size(), _maxConcurrentRequests);\n if (_keysToFetch.size() == 0)\n {\n callback.onSuccess(None.none());\n return;\n }\n _cal... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_18 | {
"fields": [
{
"declarator": "DISRUPT_CONTEXT_KEY = \"R2_DISRUPT_CONTEXT\"",
"modifier": "private static final",
"original_string": "private static final String DISRUPT_CONTEXT_KEY = \"R2_DISRUPT_CONTEXT\";",
"type": "String",
"var_name": "DISRUPT_CONTEXT_KEY"
},
{
"de... | {
"body": "@Test\n public void testStreamLatencyDisrupt() throws Exception\n {\n final RequestContext requestContext = new RequestContext();\n requestContext.putLocalAttr(DISRUPT_CONTEXT_KEY, DisruptContexts.delay(REQUEST_LATENCY));\n\n final DisruptFilter filter = new DisruptFilter(_scheduler, _executor, ... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(DisruptFilter.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(DisruptFilter.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declar... | {
"body": "@Override\n public void onStreamRequest(StreamRequest req,\n RequestContext requestContext,\n Map<String, String> wireAttrs,\n NextFilter<StreamRequest, StreamResponse> nextFilter)\n {\n disruptRequest(req, requestContext, wireAttrs, nextFilter);\n }",
"class_method_signature": "Disr... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_655 | {
"fields": [
{
"declarator": "NO_ESCAPING = URLEscaper.Escaping.NO_ESCAPING",
"modifier": "private static final",
"original_string": "private static final URLEscaper.Escaping NO_ESCAPING = URLEscaper.Escaping.NO_ESCAPING;",
"type": "URLEscaper.Escaping",
"var_name": "NO_ESCAPING"
... | {
"body": "@Test\n public void testProjectionMask()\n {\n DataMap queryParams = new DataMap();\n\n DataMap fields = new DataMap();\n fields.put(\"name\", 1);\n\n DataMap friends = new DataMap();\n friends.put(\"$start\", 1);\n friends.put(\"$count\", 2);\n fields.put(\"friends\", friends);\n\n ... | {
"fields": [
{
"declarator": "_EMPTY_STRING_ARRAY = new String[0]",
"modifier": "private static final",
"original_string": "private static final String[] _EMPTY_STRING_ARRAY = new String[0];",
"type": "String[]",
"var_name": "_EMPTY_STRING_ARRAY"
},
{
"declarator": "NO... | {
"body": "public static void addSortedParams(UriBuilder uriBuilder, DataMap params, ProtocolVersion version)\n {\n if(version.compareTo(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion()) >= 0)\n {\n addSortedParams(uriBuilder, params);\n }\n else\n {\n QueryParamsDataMap.addSor... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_205 | {
"fields": [],
"file": "restli-tools/src/test/java/com/linkedin/restli/tools/data/TestPredicateExpressionParser.java",
"identifier": "TestPredicateExpressionParser",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNotParen()\n {\n final Predicate parsed = PredicateExpressionParser.parse(\"!(com.linkedin.data.it.AlwaysTruePredicate)\");\n Assert.assertEquals(parsed.getClass(), NotPredicate.class);\n Assert.assertEquals(((NotPredicate) parsed).getChildPredicate().getClass(), AlwaysTr... | {
"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_340 | {
"fields": [
{
"declarator": "_connectionLossRC = KeeperException.Code.CONNECTIONLOSS.intValue()",
"modifier": "private static final",
"original_string": "private static final int _connectionLossRC = KeeperException.Code.CONNECTIONLOSS.intValue();",
"type": "int",
"var_name": "_conn... | {
"body": "@Test\n public void testCreate() throws NoSuchMethodException\n {\n testCreateHelper(_dummyData);\n }",
"class_method_signature": "RetryZooKeeperTest.testCreate()",
"constructor": false,
"full_signature": "@Test public void testCreate()",
"identifier": "testCreate",
"invocations": [
"te... | {
"fields": [
{
"declarator": "_log = LoggerFactory.getLogger( RetryZooKeeper.class)",
"modifier": "private static final",
"original_string": "private static final Logger _log = LoggerFactory.getLogger( RetryZooKeeper.class);",
"type": "Logger",
"var_name": "_log"
}... | {
"body": "@Override\n public void create(final String path, final byte[] data, final List<ACL> acl, final CreateMode createMode,\n final AsyncCallback.StringCallback cb, final Object ctx)\n {\n final RetryCallback callback = new RetryCallback() {\n @Override\n protected void retry(... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_593 | {
"fields": [
{
"declarator": "HTTP_1_1 = HttpProtocolVersion.HTTP_1_1.name()",
"modifier": "public static final",
"original_string": "public static final String HTTP_1_1 = HttpProtocolVersion.HTTP_1_1.name();",
"type": "String",
"var_name": "HTTP_1_1"
},
{
"declarator"... | {
"body": "@Test(dataProvider = \"compressionConfigsData\")\n public void testGetRequestCompressionConfig(String serviceName, int requestCompressionThresholdDefault, CompressionConfig expectedConfig)\n {\n Map<String, CompressionConfig> requestCompressionConfigs = new HashMap<String, CompressionConfig>();\n r... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(HttpClientFactory.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(HttpClientFactory.class);",
"type": "Logger",
"var_name": "LOG"
},
{
... | {
"body": "CompressionConfig getStreamRequestCompressionConfig(String httpServiceName, StreamEncodingType requestContentEncoding)\n {\n if (_requestCompressionConfigs.containsKey(httpServiceName))\n {\n if (requestContentEncoding == StreamEncodingType.IDENTITY)\n {\n // This will likely happe... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_439 | {
"fields": [
{
"declarator": "URI_1",
"modifier": "private static",
"original_string": "private static URI URI_1;",
"type": "URI",
"var_name": "URI_1"
},
{
"declarator": "URI_2",
"modifier": "private static",
"original_string": "private static URI URI_2;",
... | {
"body": "@Test\n public void testClientsPartiallyExcluded()\n {\n LoadBalancerStrategy.ExcludedHostHints.addRequestContextExcludedHost(_requestContext, URI_1);\n LoadBalancerStrategy.ExcludedHostHints.addRequestContextExcludedHost(_requestContext, URI_2);\n\n TrackerClient trackerClient = _clientSelector... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ClientSelector.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ClientSelector.class.getName());",
"type": "Logger",
"var_name": "LOG"
... | {
"body": "@Nullable\n public TrackerClient getTrackerClient(Request request,\n RequestContext requestContext,\n Ring<URI> ring,\n Map<URI, TrackerClient> trackerClients)\n {\n TrackerClient track... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_252 | {
"fields": [
{
"declarator": "_debug = false",
"modifier": "private",
"original_string": "private boolean _debug = false;",
"type": "boolean",
"var_name": "_debug"
},
{
"declarator": "_testDir",
"modifier": "private",
"original_string": "private File _testD... | {
"body": "@Test(dataProvider = \"toAvroSchemaData\")\n public void testFullNameAsArgsWithJarInPath(Map<String, String> testSchemas, Map<String, String> expectedAvroSchemas, List<String> paths, boolean override) throws IOException\n {\n Map<File, Map.Entry<String,String>> files = TestUtil.createSchemaFiles(_tes... | {
"fields": [
{
"declarator": "GENERATOR_AVRO_TRANSLATE_OPTIONAL_DEFAULT = \"generator.avro.optional.default\"",
"modifier": "public static final",
"original_string": "public static final String GENERATOR_AVRO_TRANSLATE_OPTIONAL_DEFAULT = \"generator.avro.optional.default\";",
"type": "Str... | {
"body": "public static void run(String resolverPath,\n String optionalDefault,\n String typeRefPropertiesExcludeList,\n boolean overrideNamespace,\n String targetDirectoryPath,\n String[] sources)... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_602 | {
"fields": [
{
"declarator": "ANY_URI = \"http://localhost:8080/foo/bar?q=baz\"",
"modifier": "private static final",
"original_string": "private static final String ANY_URI = \"http://localhost:8080/foo/bar?q=baz\";",
"type": "String",
"var_name": "ANY_URI"
},
{
"decl... | {
"body": "@Test\n public void testStreamToHttp2HeadersRegularHeaders() throws Exception\n {\n StreamRequestBuilder streamRequestBuilder = new StreamRequestBuilder(new URI(ANY_URI));\n streamRequestBuilder.setHeader(\"header1\", \"value1\");\n streamRequestBuilder.setHeader(\"header2\", \"value2\");\n S... | {
"fields": [
{
"declarator": "HEADER_BLACKLIST = new HashSet<>()",
"modifier": "private static final",
"original_string": "private static final HashSet<String> HEADER_BLACKLIST = new HashSet<>();",
"type": "HashSet<String>",
"var_name": "HEADER_BLACKLIST"
}
],
"file": "r2-ne... | {
"body": "public static <R extends Request> Http2Headers toHttp2Headers(R request) throws Exception\n {\n URI uri = request.getURI();\n URL url = new URL(uri.toString());\n\n String method = request.getMethod();\n String authority = url.getAuthority();\n String path = url.getFile();\n String schem... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_317 | {
"fields": [
{
"declarator": "ACCEPT_COMPRESSIONS = \"gzip, deflate, bzip2, snappy\"",
"modifier": "private static final",
"original_string": "private static final String ACCEPT_COMPRESSIONS = \"gzip, deflate, bzip2, snappy\";",
"type": "String",
"var_name": "ACCEPT_COMPRESSIONS"
... | {
"body": "@Test(dataProvider = \"contentEncodingGeneratorDataProvider\")\n public void testEncodingGeneration(EncodingType[] encoding, String acceptEncoding)\n {\n Assert.assertEquals(ClientCompressionFilter.buildAcceptEncodingHeader(encoding), acceptEncoding);\n }",
"class_method_signature": "TestClientComp... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ClientCompressionFilter.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ClientCompressionFilter.class);",
"type": "Logger",
"var_name": "LOG"
},... | {
"body": "static String buildAcceptEncodingHeader(EncodingType[] acceptedEncodings)\n {\n //Essentially, we want to assign nonzero quality values to all those specified;\n float delta = 1.0f/(acceptedEncodings.length+1);\n float currentQuality = 1.0f;\n\n //Special case so we don't end with an unnecessa... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_194 | {
"fields": [],
"file": "restli-tools/src/test/java/com/linkedin/restli/tools/data/TestPredicateExpressionParser.java",
"identifier": "TestPredicateExpressionParser",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAndOr()\n {\n final Predicate parsed = PredicateExpressionParser.parse(\"com.linkedin.data.it.AlwaysTruePredicate & com.linkedin.data.it.AlwaysTruePredicate | com.linkedin.data.it.AlwaysFalsePredicate\");\n Assert.assertEquals(parsed.getClass(), OrPredicate.class);\n\n fi... | {
"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_481 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/model/TestRestLiApiBuilder.java",
"identifier": "TestRestLiApiBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"resourcesWithNoClashingNamesDataProvider\")\n public void testResourceNameNoClash(Class<?>[] classes)\n {\n Set<Class<?>> resourceClasses = new HashSet<>(Arrays.asList(classes));\n Map<String, ResourceModel> resourceModels = RestLiApiBuilder.buildResourceModels(resourceClasse... | {
"fields": [
{
"declarator": "_log = LoggerFactory.getLogger(RestLiApiBuilder.class)",
"modifier": "private final static",
"original_string": "private final static Logger _log = LoggerFactory.getLogger(RestLiApiBuilder.class);",
"type": "Logger",
"var_name": "_log"
},
{
... | {
"body": "public static Map<String, ResourceModel> buildResourceModels(final Set<Class<?>> restliAnnotatedClasses)\n {\n Map<String, ResourceModel> rootResourceModels = new HashMap<String, ResourceModel>();\n Map<Class<?>, ResourceModel> resourceModels = new HashMap<Class<?>, ResourceModel>();\n\n for (Cla... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_59 | {
"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 testCopy() throws CloneNotSupportedException\n {\n boolean copyOnWrite = ! CheckedMap.class.isAssignableFrom(DataMap.class);\n\n /* DataMap with only immutable types */\n\n DataMap map1 = new DataMap(referenceMap1);\n DataMap map2 = map1.copy();\n DataMap map3 = map2.co... | {
"fields": [
{
"declarator": "NULL = Null.getInstance()",
"modifier": "public static final",
"original_string": "public static final Null NULL = Null.getInstance();",
"type": "Null",
"var_name": "NULL"
},
{
"declarator": "UTF_8_CHARSET = Charset.forName(\"UTF-8\")",
... | {
"body": "static <T> T copy(T object, DataComplexTable alreadyCopied) throws CloneNotSupportedException\n {\n if (object == null)\n {\n return null;\n }\n else if (isComplex(object))\n {\n DataComplex src = (DataComplex) object;\n\n @SuppressWarnings(\"unchecked\")\n T found = (T)... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_614 | {
"fields": [],
"file": "restli-common/src/test/java/com/linkedin/restli/common/TestIdResponse.java",
"identifier": "TestIdResponse",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testEquals()\n {\n IdResponse<Long> longResponse1 = new IdResponse<Long>(1L);\n IdResponse<Long> longResponse2 = new IdResponse<Long>(1L);\n IdResponse<Long> nullLongResponse = new IdResponse<Long>(null);\n IdResponse<String> stringResponse = new IdResponse<String>(\"hello... | {
"fields": [
{
"declarator": "_key",
"modifier": "private",
"original_string": "private K _key;",
"type": "K",
"var_name": "_key"
}
],
"file": "restli-common/src/main/java/com/linkedin/restli/common/IdResponse.java",
"identifier": "IdResponse",
"interfaces": "",
"metho... | {
"body": "@Override\n public boolean equals(Object that)\n {\n if (that instanceof IdResponse)\n {\n IdResponse<?> thatIdResponse = (IdResponse<?>) that;\n return (this._key == null)? thatIdResponse._key == null : this._key.equals(thatIdResponse._key);\n }\n else\n {\n return false;\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_244 | {
"fields": [
{
"declarator": "FS = File.separator",
"modifier": "private static final",
"original_string": "private static final String FS = File.separator;",
"type": "String",
"var_name": "FS"
},
{
"declarator": "IDLS_DIR = \"src\" + FS + \"test\" + FS + \"resources\"... | {
"body": "@Test\n public void testCollectionResource() throws Exception\n {\n String idl = moduleDir + FS + IDLS_DIR + FS + \"testCollection.restspec.json\";\n Set<BuilderSpec> builderSpecs = generateBuilderSpec(new String[] {idl});\n Assert.assertNotNull(builderSpecs);\n Assert.assertTrue(builderSpecs... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(RequestBuilderSpecGenerator.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(RequestBuilderSpecGenerator.class);",
"type": "Logger",
"var_name": "log... | {
"body": "private static String getResourcePath(String rawPath)\n {\n if (rawPath.charAt(0) == '/')\n {\n return rawPath.substring(1);\n }\n return rawPath;\n }",
"class_method_signature": "RequestBuilderSpecGenerator.getResourcePath(String rawPath)",
"constructor": false,
"full_signature": ... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_301 | {
"fields": [],
"file": "r2-core/src/test/java/com/linkedin/r2/util/TestLinkedDeque.java",
"identifier": "TestLinkedDeque",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testPeekFirst()\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.peekFirst(), control.get(0));\n Assert.assertEquals(q, control);\n }",
"class_method_sig... | {
"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 peekFirst()\n {\n if (_head == null)\n {\n return null;\n }\n return _head._value;\n }",
"class_method_signature": "LinkedDeque.peekFirst()",
"constructor": false,
"full_signature": "@Override public T peekFirst()",
"identifier": "peekFirst",
"invocations"... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_478 | {
"fields": [
{
"declarator": "JSON_TYPE = \"application/json\"",
"modifier": "private static final",
"original_string": "private static final String JSON_TYPE = \"application/json\";",
"type": "String",
"var_name": "JSON_TYPE"
},
{
"declarator": "PSON_TYPE = \"applicat... | {
"body": "@Test (expectedExceptions = UnsupportedOperationException.class)\n public void testReadOnly()\n {\n RecordBar bar = new RecordBar();\n bar.setLocation(\"mountain view\");\n bar.data().put(\"SF\", \"CA\");\n bar.data().makeReadOnly();\n\n RestUtils.trimRecordTemplate(bar, false);\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_182 | {
"fields": [
{
"declarator": "FS = File.separator",
"modifier": "private static final",
"original_string": "private static final String FS = File.separator;",
"type": "String",
"var_name": "FS"
},
{
"declarator": "TEST_DIR = \"src\" + FS + \"test\" + FS + \"java\"",
... | {
"body": "@Test(dataProvider = \"resourceModelData\")\n @SuppressWarnings(\"Duplicates\")\n public void testExportResourceModel(String apiName, String[] resourcePackages, String idlPath, String[] expectedFiles) throws Exception\n {\n RestLiResourceModelExporter exporter = new RestLiResourceModelExporter();\n\n... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(RestLiResourceModelExporter.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(RestLiResourceModelExporter.class);",
"type": "Logger",
"var_name": "log... | {
"body": "public GeneratorResult export(String apiName,\n String[] classpath,\n String[] sourcePaths,\n String[] resourcePackages,\n String outdir)\n throws IOException\n {\n return expo... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_497 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/methods/arguments/TestArgumentBuilder.java",
"identifier": "TestArgumentBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"projectionParameterData\")\n @SuppressWarnings(\"deprecation\")\n public void testProjectionParamType(Parameter.ParamType paramType)\n {\n String testParamKey = \"testParam\";\n\n ServerResourceContext mockResourceContext = EasyMock.createMock(ServerResourceContext.class);\n... | {
"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_213 | {
"fields": [],
"file": "restli-tools/src/test/java/com/linkedin/restli/tools/data/TestPredicateExpressionParser.java",
"identifier": "TestPredicateExpressionParser",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testOperandNotMissingOperandAnd()\n {\n PredicateExpressionParser.parse(\"com.linkedin.data.it.AlwaysTruePredicate ! & com.linkedin.data.it.AlwaysFalsePredicate\");\n }",
"class_method_signature": "TestPredicateExpressionParser.testOperandNotMissingOperandAnd()",
"constructor"... | {
"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_643 | {
"fields": [
{
"declarator": "cookieA",
"modifier": "private",
"original_string": "private HttpCookie cookieA;",
"type": "HttpCookie",
"var_name": "cookieA"
},
{
"declarator": "cookieB",
"modifier": "private",
"original_string": "private HttpCookie cookieB;... | {
"body": "@Test\n public void testDecodeSingleCookieWithAttr()\n {\n String cookieStr = cookieA.toString();\n Assert.assertEquals(CookieUtil.decodeCookies(Collections.singletonList(cookieStr)), Collections.singletonList(cookieA));\n }",
"class_method_signature": "TestCookieUtil.testDecodeSingleCookieWithA... | {
"fields": [],
"file": "restli-common/src/main/java/com/linkedin/restli/internal/common/CookieUtil.java",
"identifier": "CookieUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "CookieUtil.encodeCookies(List<HttpCookie> cookies)",
"constructor": false,
"full_signature": ... | {
"body": "public static List<HttpCookie> decodeCookies(List<String> cookieStrs)\n {\n List<HttpCookie> cookies = new ArrayList<HttpCookie>();\n if (cookieStrs == null)\n {\n return cookies;\n }\n\n for (String cookieStr : cookieStrs)\n {\n if (cookieStr == null)\n {\n continu... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_356 | {
"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 testStickyAndPartitioning() throws ServiceUnavailableException\n {\n int partitionCount = 10;\n int requestPerPartition = 100;\n int totalHostCount = 100;\n\n HashRingProvider ringProvider = createStaticHashRingProvider(totalHostCount, partitionCount, getHashFunction(true)... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(RingBasedUriMapper.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(RingBasedUriMapper.class);",
"type": "Logger",
"var_name": "LOG"
},
{
... | {
"body": "@Override\n public <KEY> URIMappingResult<KEY> mapUris(List<URIKeyPair<KEY>> requestUriKeyPairs)\n throws ServiceUnavailableException\n {\n if (requestUriKeyPairs == null || requestUriKeyPairs.isEmpty())\n {\n return new URIMappingResult<>(Collections.emptyMap(), Collections.emptyMap(), C... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_585 | {
"fields": [
{
"declarator": "DEBUG_HANDLER_RESPONSE_A = \"Response A\"",
"modifier": "private static final",
"original_string": "private static final String DEBUG_HANDLER_RESPONSE_A = \"Response A\";",
"type": "String",
"var_name": "DEBUG_HANDLER_RESPONSE_A"
},
{
"dec... | {
"body": "@Test\n public void testRequestAttachmentsAndResponseAttachments() throws Exception\n {\n //This test verifies the server's ability to accept request attachments and send back response attachments. This is the\n //main test to verify the wire protocol for streaming. We send a payload that contains ... | {
"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_287 | {
"fields": [
{
"declarator": "KEY = \"key\"",
"modifier": "private static final",
"original_string": "private static final String KEY = \"key\";",
"type": "String",
"var_name": "KEY"
},
{
"declarator": "VALUE = \"value\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void testGetServerRequestFinalizerManager()\n {\n Assert.assertNull(RequestContextUtil.getServerRequestFinalizerManager(_requestContext));\n\n _requestContext.putLocalAttr(R2Constants.SERVER_REQUEST_FINALIZER_MANAGER_REQUEST_CONTEXT_KEY,\n new RequestFinalizerManagerImpl(null,... | {
"fields": [],
"file": "r2-core/src/main/java/com/linkedin/r2/util/RequestContextUtil.java",
"identifier": "RequestContextUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "RequestContextUtil.RequestContextUtil()",
"constructor": true,
"full_signature": "private Request... | {
"body": "public static RequestFinalizerManager getServerRequestFinalizerManager(RequestContext requestContext)\n {\n return getObjectWithKey(R2Constants.SERVER_REQUEST_FINALIZER_MANAGER_REQUEST_CONTEXT_KEY,\n requestContext, RequestFinalizerManager.class);\n }",
"class_method_signature": "RequestConte... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_268 | {
"fields": [],
"file": "data-avro/src/test/java/com/linkedin/data/avro/TestAvroOverrideFactory.java",
"identifier": "TestAvroOverrideFactory",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGood() throws IOException\n {\n String schemaText =\n \"{\\n\" +\n \" \\\"type\\\" : \\\"record\\\",\\n\" +\n \" \\\"name\\\" : \\\"Foo\\\",\\n\" +\n \" \\\"fields\\\" : [],\\n\" +\n \" \\\"avro\\\" : {\\n\" +\n \" \\\"schema\\\" : {\\n\" +\... | {
"fields": [
{
"declarator": "_instantiateCustomDataTranslator",
"modifier": "private",
"original_string": "private boolean _instantiateCustomDataTranslator;",
"type": "boolean",
"var_name": "_instantiateCustomDataTranslator"
}
],
"file": "data-avro/src/main/java/com/linkedi... | {
"body": "AvroOverride createFromDataSchema(DataSchema schema)\n {\n AvroOverride avroOverride = null;\n Map<String, Object> properties = schema.getProperties();\n Object avro = properties.get(\"avro\");\n if (avro != null)\n {\n boolean ok = true;\n Object avroTranslator = null;\n Obj... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_638 | {
"fields": [],
"file": "restli-common/src/test/java/com/linkedin/restli/internal/common/TestURIElementParser.java",
"identifier": "TestURIElementParser",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"encoded\")\n public void testEncodedDecoding(String encodedString, Object expectedObj) throws PathSegment.PathSegmentSyntaxException\n {\n Object actualObj = URIElementParser.parse(encodedString);\n Assert.assertEquals(actualObj, expectedObj);\n }",
"class_method_signature... | {
"fields": [],
"file": "restli-common/src/main/java/com/linkedin/restli/internal/common/URIElementParser.java",
"identifier": "URIElementParser",
"interfaces": "",
"methods": [
{
"class_method_signature": "URIElementParser.parse(String element)",
"constructor": false,
"full_signature": ... | {
"body": "public static Object parse(String element) throws PathSegment.PathSegmentSyntaxException\n {\n Queue<Token> tokens = tokenizeElement(element);\n Object result = parseElement(tokens);\n\n if (!tokens.isEmpty())\n {\n throw new PathSegment.PathSegmentSyntaxException(\"tokens left over after... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_75 | {
"fields": [],
"file": "data/src/test/java/com/linkedin/data/schema/grammar/TestPdlParseUtils.java",
"identifier": "TestPdlParseUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"schemaDoc\")\n public void testExtractMarkdown(String schemaDoc, String expectedDoc)\n {\n String extracted = PdlParseUtils.extractMarkdown(schemaDoc);\n\n assertEquals(extracted, expectedDoc);\n }",
"class_method_signature": "TestPdlParseUtils.testExtractMarkdown(String s... | {
"fields": [
{
"declarator": "ESCAPE_CHAR_PATTERN = Pattern.compile(String.valueOf('`'))",
"modifier": "private static final",
"original_string": "private static final Pattern ESCAPE_CHAR_PATTERN = Pattern.compile(String.valueOf('`'));",
"type": "Pattern",
"var_name": "ESCAPE_CHAR_P... | {
"body": "public static String extractMarkdown(String schemaDoc)\n {\n String trimmed = schemaDoc.trim();\n String withoutMargin = stripMargin(trimmed.substring(3, trimmed.length() - 2));\n return unescapeDocstring(withoutMargin);\n }",
"class_method_signature": "PdlParseUtils.extractMarkdown(String sch... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_511 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/methods/arguments/TestActionArgumentBuilder.java",
"identifier": "TestActionArgumentBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"failureData\")\n public void testExtractRequestDataFailure(String entity, List<Parameter<?>> params, String errorRegEx)\n throws IOException\n {\n RecordDataSchema dataSchema = DynamicRecordMetadata.buildSchema(\"testAction\", params);\n RestRequest request = RestLiArgum... | {
"fields": [],
"file": "restli-server/src/main/java/com/linkedin/restli/internal/server/methods/arguments/ActionArgumentBuilder.java",
"identifier": "ActionArgumentBuilder",
"interfaces": "implements RestLiArgumentBuilder",
"methods": [
{
"class_method_signature": "ActionArgumentBuilder.buildArgume... | {
"body": "@Override\n public RestLiRequestData extractRequestData(RoutingResult routingResult, DataMap data)\n {\n ResourceMethodDescriptor resourceMethodDescriptor = routingResult.getResourceMethod();\n if (data == null)\n {\n data = new DataMap();\n }\n DynamicRecordTemplate template = new Dy... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_141 | {
"fields": [
{
"declarator": "TARGET_HOST_KEY_NAME = \"D2-KeyMapper-TargetHost\"",
"modifier": "private static final",
"original_string": "private static final String TARGET_HOST_KEY_NAME = \"D2-KeyMapper-TargetHost\";",
"type": "String",
"var_name": "TARGET_HOST_KEY_NAME"
},
... | {
"body": "@Test(dataProvider=\"illegalRequestMethodProvider\", expectedExceptions = {UnsupportedOperationException.class})\n public void testUnsupportedRequestGetUris(ResourceMethod requestMethod)\n {\n Request<?> request = mock(Request.class);\n when(request.getMethod()).thenReturn(requestMethod);\n _sgS... | {
"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_454 | {
"fields": [
{
"declarator": "JSON_TYPE = \"application/json\"",
"modifier": "private static final",
"original_string": "private static final String JSON_TYPE = \"application/json\";",
"type": "String",
"var_name": "JSON_TYPE"
},
{
"declarator": "PSON_TYPE = \"applicat... | {
"body": "@Test(dataProvider = \"successfulMatch\")\n public void testBestMatchForSuccessfullMatch(List<String> supportedTypes, String header, String result)\n {\n Assert.assertEquals(MIMEParse.bestMatch(supportedTypes, header), result);\n }",
"class_method_signature": "TestMIMEParse.testBestMatchForSuccessf... | {
"fields": [],
"file": "restli-server/src/main/java/com/linkedin/restli/internal/server/util/MIMEParse.java",
"identifier": "MIMEParse",
"interfaces": "",
"methods": [
{
"class_method_signature": "MIMEParse.parseMimeType(String mimeType)",
"constructor": false,
"full_signature": "protec... | {
"body": "public static String bestMatch(Collection<String> supported, String header)\n {\n List<ParseResults> parseResults = new LinkedList<ParseResults>();\n List<FitnessAndQuality> weightedMatches = new LinkedList<FitnessAndQuality>();\n for (String r : StringUtils.split(header, ','))\n parseResult... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_680 | {
"fields": [],
"file": "restli-common/src/test/java/com/linkedin/restli/internal/common/TestURIMaskUtil.java",
"identifier": "TestURIMaskUtil",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void uriDecodeWithWhitespaces() throws IllegalMaskException, IOException {\n MaskTree tree = URIMaskUtil.decodeMaskUriFormat(\"a ,\\tb:($*:(c), $start:2,$count :4)\");\n DataMap dataMap = tree.getDataMap();\n assertEquals(dataMap, dataMapFromString(\n \"{'a': 1, 'b': { '... | {
"fields": [],
"file": "restli-common/src/main/java/com/linkedin/restli/internal/common/URIMaskUtil.java",
"identifier": "URIMaskUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "URIMaskUtil.encodeMaskForURI(MaskTree maskTree)",
"constructor": false,
"full_signature": "... | {
"body": "@Deprecated\n public static MaskTree decodeMaskUriFormat(StringBuilder toparse) throws IllegalMaskException\n {\n return decodeMaskUriFormat(toparse.toString());\n }",
"class_method_signature": "URIMaskUtil.decodeMaskUriFormat(StringBuilder toparse)",
"constructor": false,
"full_signature": "@D... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_395 | {
"fields": [],
"file": "d2/src/test/java/com/linkedin/d2/balancer/properties/ClientServiceConfigValidatorTest.java",
"identifier": "ClientServiceConfigValidatorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testValidHttpRequestTimeout()\n {\n Map<String, Object> serviceSuppliedProperties = new HashMap<String, Object>();\n serviceSuppliedProperties.put(PropertyKeys.HTTP_REQUEST_TIMEOUT, \"1000\");\n\n Map<String, Object> clientSuppliedProperties = new HashMap<String, Object>();\n... | {
"fields": [
{
"declarator": "_log = LoggerFactory.getLogger(ClientServiceConfigValidator.class)",
"modifier": "private static final",
"original_string": "private static final Logger _log = LoggerFactory.getLogger(ClientServiceConfigValidator.class);",
"type": "Logger",
"var_name": ... | {
"body": "public static boolean isValidValue(Map<String, Object> serviceSuppliedConfig,\n Map<String, Object> clientSuppliedServiceConfig,\n String propertyName)\n {\n // prevent clients from violating SLAs as published by the service\n i... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_22 | {
"fields": [
{
"declarator": "DISRUPT_CONTEXT_KEY = \"R2_DISRUPT_CONTEXT\"",
"modifier": "private static final",
"original_string": "private static final String DISRUPT_CONTEXT_KEY = \"R2_DISRUPT_CONTEXT\";",
"type": "String",
"var_name": "DISRUPT_CONTEXT_KEY"
},
{
"de... | {
"body": "@Test\n public void testStreamErrorDisrupt() throws Exception\n {\n final RequestContext requestContext = new RequestContext();\n requestContext.putLocalAttr(DISRUPT_CONTEXT_KEY, DisruptContexts.error(REQUEST_LATENCY));\n\n final DisruptFilter filter = new DisruptFilter(_scheduler, _executor, RE... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(DisruptFilter.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(DisruptFilter.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declar... | {
"body": "@Override\n public void onStreamRequest(StreamRequest req,\n RequestContext requestContext,\n Map<String, String> wireAttrs,\n NextFilter<StreamRequest, StreamResponse> nextFilter)\n {\n disruptRequest(req, requestContext, wireAttrs, nextFilter);\n }",
"class_method_signature": "Disr... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_116 | {
"fields": [
{
"declarator": "INPUT_SCHEMA_NAME = \"testSchema\"",
"modifier": "private static final",
"original_string": "private static final String INPUT_SCHEMA_NAME = \"testSchema\";",
"type": "String",
"var_name": "INPUT_SCHEMA_NAME"
},
{
"declarator": "CUSTOM_TYP... | {
"body": "@Test(dataProvider = \"customTypeDataForUnion\")\n public void testCustomInfoForUnionMembers(final List<DataSchema> customTypedSchemas)\n {\n final UnionDataSchema union = new UnionDataSchema();\n List<UnionDataSchema.Member> members = customTypedSchemas.stream()\n .map(UnionDataSchema.Membe... | {
"fields": [
{
"declarator": "_log = LoggerFactory.getLogger(TemplateSpecGenerator.class)",
"modifier": "private static final",
"original_string": "private static final Logger _log = LoggerFactory.getLogger(TemplateSpecGenerator.class);",
"type": "Logger",
"var_name": "_log"
},
... | {
"body": "public ClassTemplateSpec generate(DataSchema schema, DataSchemaLocation location)\n {\n pushCurrentLocation(location);\n final ClassTemplateSpec result = processSchema(schema, null, null);\n popCurrentLocation();\n return result;\n }",
"class_method_signature": "TemplateSpecGenerator.genera... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_546 | {
"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\", enabled=false)\n public void testHandleWrongContentType(MultiplexerRunMode multiplexerRunMode) throws Exception\n {\n MultiplexedRequestHandlerImpl multiplexer = createMultiplexer(null, multiplexerRunMode);\n RestRequest request = muxRequestBuilde... | {
"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_403 | {
"fields": [],
"file": "d2/src/test/java/com/linkedin/d2/balancer/servers/ZookeeperPrefixChildFilterTest.java",
"identifier": "ZookeeperPrefixChildFilterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"prefixFilterDataProvider\")\n public void testZookeeperPrefixChildFilter(String hostName, List<String> children, List<String> expectedFilteredChildren)\n {\n ZookeeperPrefixChildFilter filter = new ZookeeperPrefixChildFilter(new AnnouncerHostPrefixGenerator(hostName));\n List... | {
"fields": [
{
"declarator": "_prefixGenerator",
"modifier": "private final",
"original_string": "private final ZookeeperEphemeralPrefixGenerator _prefixGenerator;",
"type": "ZookeeperEphemeralPrefixGenerator",
"var_name": "_prefixGenerator"
}
],
"file": "d2/src/main/java/co... | {
"body": "public ZookeeperPrefixChildFilter(ZookeeperEphemeralPrefixGenerator prefixGenerator)\n {\n _prefixGenerator = prefixGenerator;\n }",
"class_method_signature": "ZookeeperPrefixChildFilter.ZookeeperPrefixChildFilter(ZookeeperEphemeralPrefixGenerator prefixGenerator)",
"constructor": true,
"full_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_229 | {
"fields": [
{
"declarator": "_client",
"modifier": "private",
"original_string": "private Client _client;",
"type": "Client",
"var_name": "_client"
},
{
"declarator": "_provider",
"modifier": "private",
"original_string": "private RestLiSymbolTableProvider... | {
"body": "@Test\n public void testGetRemoteRequestSymbolTableFetchError()\n {\n RestResponseBuilder builder = new RestResponseBuilder();\n builder.setStatus(404);\n when(_client.restRequest(eq(new RestRequestBuilder(URI.create(\"d2://someservice/symbolTable/Test--332004310\")).build())))\n .thenRet... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(RestLiSymbolTableProvider.class.getSimpleName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(RestLiSymbolTableProvider.class.getSimpleName());",
"type"... | {
"body": "@Override\n public SymbolTable getRequestSymbolTable(URI requestUri)\n {\n String serviceName = LoadBalancerUtil.getServiceNameFromUri(requestUri);\n\n // First check the cache.\n SymbolTable symbolTable = _serviceNameToSymbolTableCache.getIfPresent(serviceName);\n if (symbolTable != null)\n ... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_679 | {
"fields": [],
"file": "restli-common/src/test/java/com/linkedin/restli/internal/common/TestURIMaskUtil.java",
"identifier": "TestURIMaskUtil",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"invalidArrayRangeProvider\")\n public void invalidArrayRange(String uriMask, String errorMessage)\n {\n try\n {\n URIMaskUtil.decodeMaskUriFormat(uriMask);\n fail(\"Excepted to throw an exception with a message: \" + errorMessage);\n }\n catch (IllegalMaskExce... | {
"fields": [],
"file": "restli-common/src/main/java/com/linkedin/restli/internal/common/URIMaskUtil.java",
"identifier": "URIMaskUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "URIMaskUtil.encodeMaskForURI(MaskTree maskTree)",
"constructor": false,
"full_signature": "... | {
"body": "@Deprecated\n public static MaskTree decodeMaskUriFormat(StringBuilder toparse) throws IllegalMaskException\n {\n return decodeMaskUriFormat(toparse.toString());\n }",
"class_method_signature": "URIMaskUtil.decodeMaskUriFormat(StringBuilder toparse)",
"constructor": false,
"full_signature": "@D... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_34 | {
"fields": [],
"file": "data/src/test/java/com/linkedin/data/codec/symbol/TestSymbolTableMetadataExtractor.java",
"identifier": "TestSymbolTableMetadataExtractor",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testExtractTableInfoRemoteTable()\n {\n SymbolTableMetadata metadata =\n new SymbolTableMetadataExtractor().extractMetadata(\"https://Host:100/service|Prefix-1000\");\n Assert.assertEquals(metadata.getServerNodeUri(), \"https://Host:100/service\");\n Assert.assertEqual... | {
"fields": [
{
"declarator": "SERVER_NODE_URI_PREFIX_TABLENAME_SEPARATOR = '|'",
"modifier": "protected static",
"original_string": "protected static char SERVER_NODE_URI_PREFIX_TABLENAME_SEPARATOR = '|';",
"type": "char",
"var_name": "SERVER_NODE_URI_PREFIX_TABLENAME_SEPARATOR"
... | {
"body": "public SymbolTableMetadata extractMetadata(String fullName)\n {\n int index = fullName.indexOf(SERVER_NODE_URI_PREFIX_TABLENAME_SEPARATOR);\n\n // If no separator char was found, we assume it's a local table.\n if (index == -1)\n {\n return new SymbolTableMetadata(null, fullName, 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_383 | {
"fields": [
{
"declarator": "_executorService",
"modifier": "private",
"original_string": "private ScheduledExecutorService _executorService;",
"type": "ScheduledExecutorService",
"var_name": "_executorService"
},
{
"de... | {
"body": "@Test(groups = { \"small\", \"back-end\" })\n public void testGetStrategy() throws URISyntaxException\n {\n reset();\n\n URI uri = URI.create(\"http://cluster-1/test\");\n List<String> schemes = new ArrayList<String>();\n Map<URI, Double> weights = new HashMap<URI, Double>();\n\n weights.p... | {
"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 LoadBalancerStrategy getStrategy(String serviceName, String scheme)\n {\n Map<String, LoadBalancerStrategy> strategies = _serviceStrategies.get(serviceName);\n LoadBalancerStrategy strategy = null;\n\n if (strategies != null)\n {\n strategy = strategies.get(scheme);\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_550 | {
"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 testCustomMultiplexedSingletonFilter(MultiplexerRunMode multiplexerRunMode) throws Exception\n {\n SynchronousRequestHandler mockHandler = createMockHandler();\n MultiplexerSingletonFilter mockMuxFilter = EasyMock.createMock(Multiple... | {
"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_100 | {
"fields": [
{
"declarator": "NAN = \"NaN\"",
"modifier": "private static final",
"original_string": "private static final String NAN = \"NaN\";",
"type": "String",
"var_name": "NAN"
},
{
"declarator": "POSITIVE_INFINITY = \"Infinity\"",
"modifier": "private stat... | {
"body": "@Test\n public static void testCoerceOutputNumericNumberCases()\n {\n // Double case\n Object object1 = DataTemplateUtil.coerceOutput(1.2, Double.class);\n assertEquals(object1, 1.2);\n\n // Float case\n Object object2 = DataTemplateUtil.coerceOutput(1.2f, Float.class);\n assertEquals(o... | {
"fields": [
{
"declarator": "SCHEMA_FIELD_NAME = \"SCHEMA\"",
"modifier": "public static final",
"original_string": "public static final String SCHEMA_FIELD_NAME = \"SCHEMA\";",
"type": "String",
"var_name": "SCHEMA_FIELD_NAME"
},
{
"declarator": "TYPEREFINFO_FIELD_NA... | {
"body": "@SuppressWarnings(\"unchecked\")\n public static <T> T coerceOutput(Object object, Class<T> targetClass)\n throws TemplateOutputCastException\n {\n Class<?> objectClass = object.getClass();\n if (objectClass == targetClass)\n {\n return (T) object;\n }\n if (targetClass.isEnum())... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_415 | {
"fields": [
{
"declarator": "SERVICE_NAME = \"testService\"",
"modifier": "private static final",
"original_string": "private static final String SERVICE_NAME = \"testService\";",
"type": "String",
"var_name": "SERVICE_NAME"
},
{
"declarator": "CLUSTER_NAME = \"testCl... | {
"body": "@Test(dataProvider = \"isD2Async\")\n public void testStatsConsumerAddRemove(boolean isD2Async) throws Exception\n {\n AtomicReference<ServiceProperties> serviceProperties = new AtomicReference<>();\n TestBackupRequestsStrategyStatsConsumer statsConsumer = new TestBackupRequestsStrategyStatsConsume... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(BackupRequestsClient.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(BackupRequestsClient.class);",
"type": "Logger",
"var_name": "LOG"
},
{... | {
"body": "@Override\n public Future<RestResponse> restRequest(RestRequest request)\n {\n return restRequest(request, new RequestContext());\n }",
"class_method_signature": "BackupRequestsClient.restRequest(RestRequest request)",
"constructor": false,
"full_signature": "@Override public Future<RestRespons... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_291 | {
"fields": [
{
"declarator": "_index",
"modifier": "private",
"original_string": "private AtomicInteger _index;",
"type": "AtomicInteger",
"var_name": "_index"
},
{
"declarator": "_requestFinalizer",
"modifier": "private",
"original_string": "private TestRe... | {
"body": "@Test\n public void testExistingRequestFinalizerManager()\n {\n when(_restTransportResponse.getResponse())\n .thenReturn(_restResponse);\n\n final RequestContext requestContext = new RequestContext();\n final RequestFinalizerManagerImpl manager = new RequestFinalizerManagerImpl(null, requ... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(RequestFinalizerDispatcher.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(RequestFinalizerDispatcher.class);",
"type": "Logger",
"var_name": "LOG"
... | {
"body": "@Override\n public void handleRestRequest(RestRequest req, Map<String, String> wireAttrs, RequestContext requestContext,\n TransportCallback<RestResponse> callback)\n {\n _transportDispatcher.handleRestRequest(req, wireAttrs, requestContext,\n new RequestFinalizerTransportCallback<>(callba... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_63 | {
"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 testMakeReadOnly() throws CloneNotSupportedException\n {\n DataMap map1 = referenceDataMap1;\n assertTrue(map1.isReadOnly());\n assertTrue(map1.getDataMap(\"map1_1\").isReadOnly());\n assertTrue(map1.getDataList(\"list1_1\").isReadOnly());\n\n DataMap map2 = map1.copy()... | {
"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 void makeReadOnly(Object o)\n {\n if (isComplex(o))\n {\n ((DataComplex) o).makeReadOnly();\n }\n }",
"class_method_signature": "Data.makeReadOnly(Object o)",
"constructor": false,
"full_signature": "static void makeReadOnly(Object o)",
"identifier": "makeReadOnly",
"invoca... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_157 | {
"fields": [],
"file": "restli-client/src/test/java/com/linkedin/restli/client/TestRequest.java",
"identifier": "TestRequest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSetProjectionDataMapSerializer()\n {\n ProjectionDataMapSerializer customSerializer = (paramName, pathSpecs) -> new DataMap();\n GetRequest<TestRecord> getRequest = generateDummyRequestBuilder().build();\n getRequest.setProjectionDataMapSerializer(customSerializer);\n ... | {
"fields": [
{
"declarator": "SLASH_PATTERN = Pattern.compile(\"/\")",
"modifier": "private static final",
"original_string": "private static final Pattern SLASH_PATTERN = Pattern.compile(\"/\");",
"type": "Pattern",
"var_name": "SLASH_PATTERN"
},
{
"declarator": "URI_... | {
"body": "public void setProjectionDataMapSerializer(ProjectionDataMapSerializer projectionDataMapSerializer)\n {\n RestliRequestOptions existingRequestOptions =\n (_requestOptions == null) ? RestliRequestOptions.DEFAULT_OPTIONS : _requestOptions;\n\n // If the desired value is same as existing, this i... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_507 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/methods/arguments/TestArgumentBuilder.java",
"identifier": "TestArgumentBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expectedExceptions = RoutingException.class, dataProvider = \"positionalParameterData\")\n public void testPositionalParameterType(Class<?> dataType, Parameter.ParamType paramType)\n {\n String paramKey = \"testParam\";\n\n ServerResourceContext mockResourceContext = EasyMock.createMock(Serve... | {
"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_442 | {
"fields": [
{
"declarator": "DEFAULT_PARTITION_ID = 0",
"modifier": "private static final",
"original_string": "private static final int DEFAULT_PARTITION_ID = 0;",
"type": "int",
"var_name": "DEFAULT_PARTITION_ID"
},
{
"declarator": "DEFAULT_CLUSTER_GENERATION_ID = 0... | {
"body": "@Test\n public void testInitializePartition()\n {\n setup(new D2RelativeStrategyProperties(), new ConcurrentHashMap<>());\n\n List<TrackerClient> trackerClients = TrackerClientMockHelper.mockTrackerClients(2,\n Arrays.asList(20, 20), Arrays.asList(10, 10), Arrays.asList(200L, 500L), Arrays.a... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(StateUpdater.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(StateUpdater.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarat... | {
"body": "private void initializePartition(Set<TrackerClient> trackerClients, int partitionId, long clusterGenerationId)\n {\n if (!_partitionLoadBalancerStateMap.containsKey(partitionId))\n {\n PartitionState partitionState = new PartitionState(partitionId,\n new DelegatingRingFactory<>(_relati... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_7 | {
"fields": [],
"file": "data-transform/src/test/java/com/linkedin/data/transform/TestProjectionUtil.java",
"identifier": "TestProjectionUtil",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testPositiveWithWildcardSinglePath()\n {\n final MaskTree filter = new MaskTree();\n filter.addOperation(new PathSpec(\"foo\", PathSpec.WILDCARD, \"baz\"), MaskOperation.POSITIVE_MASK_OP);\n\n Assert.assertTrue(ProjectionUtil.isPathPresent(filter, new PathSpec(\"foo\")));\n ... | {
"fields": [],
"file": "data-transform/src/main/java/com/linkedin/data/transform/ProjectionUtil.java",
"identifier": "ProjectionUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "ProjectionUtil.isPathPresent(MaskTree filter, PathSpec path)",
"constructor": false,
"full_s... | {
"body": "public static boolean isPathPresent(MaskTree filter, PathSpec path)\n {\n return !getPresentPaths(filter, Collections.singleton(path)).isEmpty();\n }",
"class_method_signature": "ProjectionUtil.isPathPresent(MaskTree filter, PathSpec path)",
"constructor": false,
"full_signature": "public static... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_435 | {
"fields": [
{
"declarator": "URI_1",
"modifier": "private static",
"original_string": "private static URI URI_1;",
"type": "URI",
"var_name": "URI_1"
},
{
"declarator": "URI_2",
"modifier": "private static",
"original_string": "private static URI URI_2;",
... | {
"body": "@Test\n public void testGetTargetHost()\n {\n KeyMapper.TargetHostHints.setRequestContextTargetHost(_requestContext, URI_1);\n\n TrackerClient trackerClient = _clientSelector.getTrackerClient(_request, _requestContext, DEFAULT_RING, DEFAULT_TRACKER_CLIENT_MAP);\n assertEquals(trackerClient.getUr... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ClientSelector.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ClientSelector.class.getName());",
"type": "Logger",
"var_name": "LOG"
... | {
"body": "@Nullable\n public TrackerClient getTrackerClient(Request request,\n RequestContext requestContext,\n Ring<URI> ring,\n Map<URI, TrackerClient> trackerClients)\n {\n TrackerClient track... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_570 | {
"fields": [
{
"declarator": "DEBUG_HANDLER_RESPONSE_A = \"Response A\"",
"modifier": "private static final",
"original_string": "private static final String DEBUG_HANDLER_RESPONSE_A = \"Response A\";",
"type": "String",
"var_name": "DEBUG_HANDLER_RESPONSE_A"
},
{
"dec... | {
"body": "@Test\n public void testUnstructuredDataGetWithBody() throws Exception\n {\n EntityStream streams = EntityStreams.newEntityStream(new ByteStringWriter(ByteString.copy(new byte[] {1,2,3,4})));\n Observer observer = new TestObserver();\n streams.addObserver(observer);\n\n final StreamRequest st... | {
"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_120 | {
"fields": [
{
"declarator": "FS = File.separator",
"modifier": "private static final",
"original_string": "private static final String FS = File.separator;",
"type": "String",
"var_name": "FS"
},
{
"declarator": "testDir = System.getProperty(\"testDir\", new File(\"sr... | {
"body": "@Test(dataProvider = \"ERFilesForBaseSchema\")\n public void testParseResultToGetBaseSchemas(String[] files, String[] expectedSchemaNames) throws Exception\n {\n String pegasusWithFS = pegasusDir + FS;\n String resolverPath = pegasusWithFS + \"extensionSchemas/extensions:\"\n + pegasusWithFS... | {
"fields": [
{
"declarator": "_resolverPath",
"modifier": "private final",
"original_string": "private final String _resolverPath;",
"type": "String",
"var_name": "_resolverPath"
},
{
"declarator": "_parserByFileExtension",
"modifier": "private final",
"ori... | {
"body": "public DataSchemaParser.ParseResult parseSources(String sources[]) throws IOException\n {\n Set<String> fileExtensions = _parserByFileExtension.keySet();\n Map<String, List<String>> byExtension = new HashMap<>(fileExtensions.size());\n for (String fileExtension : fileExtensions)\n {\n byE... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_209 | {
"fields": [],
"file": "restli-tools/src/test/java/com/linkedin/restli/tools/data/TestPredicateExpressionParser.java",
"identifier": "TestPredicateExpressionParser",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAndParenOr()\n {\n final Predicate parsed = PredicateExpressionParser.parse(\"com.linkedin.data.it.AlwaysTruePredicate & (com.linkedin.data.it.AlwaysTruePredicate | com.linkedin.data.it.AlwaysFalsePredicate)\");\n Assert.assertEquals(parsed.getClass(), AndPredicate.class);\n... | {
"fields": [
{
"declarator": "TRIMMER_PATTERN = Pattern.compile(\"\\\\s\")",
"modifier": "private static final",
"original_string": "private static final Pattern TRIMMER_PATTERN = Pattern.compile(\"\\\\s\");",
"type": "Pattern",
"var_name": "TRIMMER_PATTERN"
},
{
"decl... | {
"body": "public static Predicate parse(String expression)\n {\n final Stack<Predicate> predicateStack = new Stack<Predicate>();\n final Stack<Character> operatorStack = new Stack<Character>();\n\n final String trimmedExpression = TRIMMER_PATTERN.matcher(expression).replaceAll(\"\");\n final StringToken... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_659 | {
"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 = \"unicode\")\n public void testUnicode(Object obj, String expectedNoEsc, String expectedPathSegEsc, String expectedQueryParamEsc)\n {\n String actualNoEsc = URIParamUtils.encodeElement(obj, NO_ESCAPING, null);\n Assert.assertEquals(actualNoEsc, expectedNoEsc);\n String actua... | {
"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_14 | {
"fields": [],
"file": "data-transform/src/test/java/com/linkedin/data/transform/TestImmutableList.java",
"identifier": "TestImmutableList",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testEmpty()\n {\n assertEquals(ImmutableList.empty(), ImmutableList.empty());\n\n assertTrue(ImmutableList.empty() == ImmutableList.empty());\n\n assertEquals(ImmutableList.empty().size(), 0);\n\n assertEquals(ImmutableList.empty().toArray().length, 0);\n }",
"class_met... | {
"fields": [
{
"declarator": "EMPTY = new ImmutableList(null, null)",
"modifier": "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n private static final",
"original_string": "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n private static final ImmutableList EMPTY = new ImmutableList(... | {
"body": "@SuppressWarnings(\"unchecked\")\n public static final <T> ImmutableList<T> empty()\n {\n return (ImmutableList<T>) EMPTY;\n }",
"class_method_signature": "ImmutableList.empty()",
"constructor": false,
"full_signature": "@SuppressWarnings(\"unchecked\") public static final ImmutableList<T> empt... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_462 | {
"fields": [
{
"declarator": "JSON_TYPE = \"application/json\"",
"modifier": "private static final",
"original_string": "private static final String JSON_TYPE = \"application/json\";",
"type": "String",
"var_name": "JSON_TYPE"
},
{
"declarator": "PSON_TYPE = \"applicat... | {
"body": "@Test(dataProvider = \"invalidHeaders\")\n public void testPickBestEncodingWithInvalidHeaders(String header)\n {\n try\n {\n RestUtils.pickBestEncoding(header, Collections.emptySet());\n Assert.fail();\n }\n catch (RestLiServiceException e)\n {\n Assert.assertEquals(e.getSta... | {
"fields": [
{
"declarator": "EMPTY_DATAMAP = new DataMap()",
"modifier": "private static final",
"original_string": "private static final DataMap EMPTY_DATAMAP = new DataMap();",
"type": "DataMap",
"var_name": "EMPTY_DATAMAP"
}
],
"file": "restli-server/src/main/java/com/li... | {
"body": "public static String pickBestEncoding(String acceptHeader, Set<String> customMimeTypesSupported)\n {\n if (acceptHeader == null || acceptHeader.isEmpty())\n {\n return RestConstants.HEADER_VALUE_APPLICATION_JSON;\n }\n\n //For backward compatibility reasons, we have to assume that if ther... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_198 | {
"fields": [],
"file": "restli-tools/src/test/java/com/linkedin/restli/tools/data/TestPredicateExpressionParser.java",
"identifier": "TestPredicateExpressionParser",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNotAnd()\n {\n final Predicate parsed = PredicateExpressionParser.parse(\"!com.linkedin.data.it.AlwaysTruePredicate & com.linkedin.data.it.AlwaysFalsePredicate\");\n Assert.assertEquals(parsed.getClass(), AndPredicate.class);\n\n final List<Predicate> andChildren = ((AndP... | {
"fields": [
{
"declarator": "TRIMMER_PATTERN = Pattern.compile(\"\\\\s\")",
"modifier": "private static final",
"original_string": "private static final Pattern TRIMMER_PATTERN = Pattern.compile(\"\\\\s\");",
"type": "Pattern",
"var_name": "TRIMMER_PATTERN"
},
{
"decl... | {
"body": "public static Predicate parse(String expression)\n {\n final Stack<Predicate> predicateStack = new Stack<Predicate>();\n final Stack<Character> operatorStack = new Stack<Character>();\n\n final String trimmedExpression = TRIMMER_PATTERN.matcher(expression).replaceAll(\"\");\n final StringToken... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_177 | {
"fields": [
{
"declarator": "DEFAULT_REQUEST_CONTEXT = new RequestContext()",
"modifier": "private static final",
"original_string": "private static final RequestContext DEFAULT_REQUEST_CONTEXT = new RequestContext();",
"type": "RequestContext",
"var_name": "DEFAULT_REQUEST_CONTEXT... | {
"body": "@SuppressWarnings(\"deprecation\")\n @Test(dataProvider = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + \"sendRequestOptions\")\n public void testRestLiResponseExceptionCallback(SendRequestOption option,\n TimeoutOption timeoutOption,\n ... | {
"fields": [
{
"declarator": "DEFAULT_ACCEPT_TYPES = Collections.emptyList()",
"modifier": "private static final",
"original_string": "private static final List<ContentType> DEFAULT_ACCEPT_TYPES = Collections.emptyList();",
"type": "List<ContentType>",
"var_name": "DEFAULT_ACCEPT_T... | {
"body": "@Override\n public <T> ResponseFuture<T> sendRequest(Request<T> request, RequestContext requestContext)\n {\n FutureCallback<Response<T>> callback = new FutureCallback<>();\n sendRequest(request, requestContext, callback);\n return new ResponseFutureImpl<T>(callback);\n }",
"class_method_sign... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_527 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/response/TestCreateResponseBuilder.java",
"identifier": "TestCreateResponseBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBuilderException()\n throws URISyntaxException\n {\n CompoundKey compoundKey = new CompoundKey().append(\"a\", \"a\").append(\"b\", 1);\n CreateResponse createResponse = new CreateResponse(compoundKey, null);\n RestRequest restRequest = new RestRequestBuilder(new URI... | {
"fields": [],
"file": "restli-server/src/main/java/com/linkedin/restli/internal/server/response/CreateResponseBuilder.java",
"identifier": "CreateResponseBuilder",
"interfaces": "implements RestLiResponseBuilder<RestLiResponseData<CreateResponseEnvelope>>",
"methods": [
{
"class_method_signature":... | {
"body": "@Override\n public RestLiResponseData<CreateResponseEnvelope> buildRestLiResponseData(Request request,\n RoutingResult routingResult,\n Object result,\n ... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_43 | {
"fields": [],
"file": "data/src/test/java/com/linkedin/data/collections/TestCowSet.java",
"identifier": "TestCowSet",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testRemove()\n {\n final CowSet<String> set = new CowSet<String>();\n set.add(\"test\");\n\n Assert.assertTrue(set.remove(\"test\"));\n Assert.assertFalse(set.contains(\"test\"));\n Assert.assertEquals(set.size(), 0);\n\n Assert.assertFalse(set.remove(\"test\"));\n ... | {
"fields": [
{
"declarator": "PRESENT = new Object()",
"modifier": "private static final",
"original_string": "private static final Object PRESENT = new Object();",
"type": "Object",
"var_name": "PRESENT"
},
{
"declarator": "_map",
"modifier": "private final",
... | {
"body": "@Override\n public boolean remove(Object o)\n {\n return _map.remove(o) == PRESENT;\n }",
"class_method_signature": "CowSet.remove(Object o)",
"constructor": false,
"full_signature": "@Override public boolean remove(Object o)",
"identifier": "remove",
"invocations": [
"remove"
],
"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_474 | {
"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 testOverrideMaskNestedWithMap() throws CloneNotSupportedException\n {\n TyperefTest test = new TyperefTest();\n RecordBar bar = new RecordBar();\n bar.setLocation(\"foo\");\n bar.data().put(\"bar\", \"keep me\");\n RecordBar expected = bar.clone();\n\n test.setBarRef... | {
"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_531 | {
"fields": [
{
"declarator": "BUILDERS = new HashMap<>()",
"modifier": "private static final",
"original_string": "private static final Map<ResourceMethod, CollectionResponseBuilder<?>> BUILDERS = new HashMap<>();",
"type": "Map<ResourceMethod, CollectionResponseBuilder<?>>",
"var_n... | {
"body": "@Test(dataProvider = \"exceptionTestData\")\n public void testBuilderExceptions(Object results, String expectedErrorMessage)\n throws URISyntaxException\n {\n Map<String, String> headers = ResponseBuilderUtil.getHeaders();\n ServerResourceContext mockContext = getMockResourceContext(null, null... | {
"fields": [],
"file": "restli-server/src/main/java/com/linkedin/restli/internal/server/response/CollectionResponseBuilder.java",
"identifier": "CollectionResponseBuilder",
"interfaces": "implements RestLiResponseBuilder<D>",
"methods": [
{
"class_method_signature": "CollectionResponseBuilder.build... | {
"body": "@Override\n public D buildRestLiResponseData(Request request,\n RoutingResult routingResult,\n Object object,\n Map<String, String> headers,\n List<HttpCookie> cookies)\n {\n if (object instanceof List)\n {\n @SuppressWarnings({\"unchecked\"})\n /** constrained by {@li... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_161 | {
"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 testSendRequest3()\n {\n when(_controller.getDisruptContext(any(String.class), any(ResourceMethod.class))).thenReturn(_disrupt);\n _client.sendRequest(_request, _context, _behavior);\n verify(_underlying, times(1)).sendRequest(eq(_request), eq(_context), eq(_behavior));\n ... | {
"fields": [
{
"declarator": "_client",
"modifier": "private final",
"original_string": "private final Client _client;",
"type": "Client",
"var_name": "_client"
},
{
"declarator": "_controller",
"modifier": "private final",
"original_string": "private final... | {
"body": "@Override\n public <T> ResponseFuture<T> sendRequest(Request<T> request, RequestContext requestContext)\n {\n doEvaluateDisruptContext(request, requestContext);\n return _client.sendRequest(request, requestContext);\n }",
"class_method_signature": "DisruptRestClient.sendRequest(Request<T> reques... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_248 | {
"fields": [
{
"declarator": "FS = File.separator",
"modifier": "private static final",
"original_string": "private static final String FS = File.separator;",
"type": "String",
"var_name": "FS"
},
{
"declarator": "RESOURCES_DIR = \"src\" + FS + \"test\" + FS + \"resour... | {
"body": "@Test(dataProvider = \"deprecatedByVersionDataProvider\")\n public void testDeprecatedByVersion(String idlName, String buildersName, String substituteClassName) throws Exception\n {\n final String pegasusDir = moduleDir + FS + RESOURCES_DIR + FS + \"pegasus\";\n final String outPath = outdir.getPat... | {
"fields": [
{
"declarator": "GENERATOR_REST_GENERATE_DATATEMPLATES = \"generator.rest.generate.datatemplates\"",
"modifier": "static final",
"original_string": "static final String GENERATOR_REST_GENERATE_DATATEMPLATES = \"generator.rest.generate.datatemplates\";",
"type": "String",
... | {
"body": "public static GeneratorResult run(String resolverPath,\n String defaultPackage,\n final boolean generateImported,\n final boolean generateDataTemplates,\n RestliVersio... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_618 | {
"fields": [],
"file": "restli-common/src/test/java/com/linkedin/restli/common/TestIdEntityResponse.java",
"identifier": "TestIdEntityResponse",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testHashCode()\n {\n IdEntityResponse<Long, AnyRecord> longIdEntityResponse1 = new IdEntityResponse<Long, AnyRecord>(1L, new AnyRecord());\n IdEntityResponse<Long, AnyRecord> longIdEntityResponse2 = new IdEntityResponse<Long, AnyRecord>(1L, new AnyRecord());\n IdEntityRespons... | {
"fields": [
{
"declarator": "_entity",
"modifier": "private",
"original_string": "private V _entity;",
"type": "V",
"var_name": "_entity"
}
],
"file": "restli-common/src/main/java/com/linkedin/restli/common/IdEntityResponse.java",
"identifier": "IdEntityResponse",
"inte... | {
"body": "@Override\n public int hashCode()\n {\n return super.hashCode() * 31 + (_entity == null ? 0 : _entity.hashCode());\n }",
"class_method_signature": "IdEntityResponse.hashCode()",
"constructor": false,
"full_signature": "@Override public int hashCode()",
"identifier": "hashCode",
"invocations... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_55 | {
"fields": [],
"file": "data/src/test/java/com/linkedin/data/it/TestRemover.java",
"identifier": "TestRemover",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testRemoveByPredicate() throws Exception\n {\n SimpleTestData data = IteratorTestData.createSimpleTestData();\n \n SimpleDataElement el = data.getDataElement();\n Builder.create(el.getValue(), el.getSchema(), IterationOrder.PRE_ORDER)\n .filterBy(Predicates.pathMatchesP... | {
"fields": [],
"file": "data/src/main/java/com/linkedin/data/it/Remover.java",
"identifier": "Remover",
"interfaces": "",
"methods": [
{
"class_method_signature": "Remover.remove(Object root, DataIterator it)",
"constructor": false,
"full_signature": "public static Object remove(Object ... | {
"body": "public static Object remove(Object root, DataIterator it)\n {\n DataElement element;\n\n // construct the list of Data objects to remove\n // don't remove in place because iterator behavior with removals while iterating is undefined\n ArrayList<ToRemove> removeList = new ArrayList<ToRemove>();... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_589 | {
"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 = \"requestHandlersData\")\n public void testRequestHandlers(URI uri, String expectedResponse)\n {\n RestLiConfig config = new RestLiConfig();\n config.addResourcePackageNames(\"com.linkedin.restli.server.twitter\");\n config.setDocumentationRequestHandler(new DefaultDocumenta... | {
"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_423 | {
"fields": [],
"file": "d2/src/test/java/com/linkedin/d2/balancer/strategies/degrader/DegraderLoadBalancerStrategyConfigTest.java",
"identifier": "DegraderLoadBalancerStrategyConfigTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCreateHttpConfigFromMap()\n {\n Map<String,Object> properties = new HashMap<String, Object>();\n\n long httpUpdateIntervalMs = 5231;\n boolean updateOnlyAtInterval = false;\n double httpMaxClusterLatencyWithoutDegrading = 139.6;\n double httpDefaultSuccessfulTransmi... | {
"fields": [
{
"declarator": "_updateIntervalMs",
"modifier": "private final",
"original_string": "private final long _updateIntervalMs;",
"type": "long",
"var_name": "_updateIntervalMs"
},
{
"declarator": "_updateOnlyAtInterval",
"modifier": "private final",
... | {
"body": "static DegraderLoadBalancerStrategyConfig createHttpConfigFromMap(Map<String,Object> map)\n {\n return createHttpConfigFromMap(map, null, null, null, null);\n }",
"class_method_signature": "DegraderLoadBalancerStrategyConfig.createHttpConfigFromMap(Map<String,Object> map)",
"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_136 | {
"fields": [
{
"declarator": "BASE_URI_TEMPLATE",
"modifier": "private static final",
"original_string": "private static final String BASE_URI_TEMPLATE;",
"type": "String",
"var_name": "BASE_URI_TEMPLATE"
},
{
"declarator": "PATH_KEYS",
"modifier": "private stati... | {
"body": "@Test\n public void testID()\n {\n final GetRequest<?> getRequest = Mockito.mock(GetRequest.class);\n Mockito.when(getRequest.getBaseUriTemplate()).thenReturn(BASE_URI_TEMPLATE);\n Mockito.when(getRequest.getPathKeys()).thenReturn(PATH_KEYS);\n Mockito.when(getRequest.getObjectId()).thenRetur... | {
"fields": [
{
"declarator": "ALL_FIELDS =\n Collections.unmodifiableSet(new HashSet<SignatureField>(Arrays.asList(SignatureField.values())))",
"modifier": "public static final",
"original_string": "public static final Set<SignatureField> ALL_FIELDS =\n Collections.unmodifiableSet(new Has... | {
"body": "@Override\n public String toString()\n {\n final ToStringBuilder builder = new ToStringBuilder(null, ToStringStyle.SHORT_PREFIX_STYLE)\n .append(\"baseUriTemplate\", _baseUriTemplate)\n .append(\"pathKeys\", _pathKeys)\n .append(\"id\", _id)\n .append(\"queryParams\", _queryParams)... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_566 | {
"fields": [
{
"declarator": "DEBUG_HANDLER_RESPONSE_A = \"Response A\"",
"modifier": "private static final",
"original_string": "private static final String DEBUG_HANDLER_RESPONSE_A = \"Response A\";",
"type": "String",
"var_name": "DEBUG_HANDLER_RESPONSE_A"
},
{
"dec... | {
"body": "@Test(dataProvider = \"validClientProtocolVersionDataStreamOnly\")\n public void testValidReactiveUnstructuredDataRequest(RestLiServer server,\n ProtocolVersion clientProtocolVersion,\n String heade... | {
"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_458 | {
"fields": [
{
"declarator": "JSON_TYPE = \"application/json\"",
"modifier": "private static final",
"original_string": "private static final String JSON_TYPE = \"application/json\";",
"type": "String",
"var_name": "JSON_TYPE"
},
{
"declarator": "PSON_TYPE = \"applicat... | {
"body": "@Test(dataProvider = \"sampleInvalidAcceptHeaders\", expectedExceptions = InvalidMimeTypeException.class)\n public void testParseAcceptInvalidTypes(String header)\n {\n MIMEParse.parseAcceptType(header);\n }",
"class_method_signature": "TestMIMEParse.testParseAcceptInvalidTypes(String header)",
"... | {
"fields": [],
"file": "restli-server/src/main/java/com/linkedin/restli/internal/server/util/MIMEParse.java",
"identifier": "MIMEParse",
"interfaces": "",
"methods": [
{
"class_method_signature": "MIMEParse.parseMimeType(String mimeType)",
"constructor": false,
"full_signature": "protec... | {
"body": "public static List<String> parseAcceptType(final String header)\n {\n List<String> acceptTypes = new LinkedList<String>();\n for (String acceptType : StringUtils.split(header, ','))\n {\n final ParseResults parseResults = parseMimeType(acceptType);\n acceptTypes.add(parseResults.type + ... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_321 | {
"fields": [
{
"declarator": "ACCEPT_COMPRESSIONS = \"gzip, deflate, bzip2, x-snappy-framed\"",
"modifier": "private static final",
"original_string": "private static final String ACCEPT_COMPRESSIONS = \"gzip, deflate, bzip2, x-snappy-framed\";",
"type": "String",
"var_name": "ACCEP... | {
"body": "@Test(dataProvider = \"requestData\")\n public void testAcceptEncodingHeader(CompressionConfig requestCompressionConfig,\n CompressionOption requestCompressionOverride,\n boolean headerShouldBePresent,\n ... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ClientStreamCompressionFilter.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ClientStreamCompressionFilter.class);",
"type": "Logger",
"var_name": ... | {
"body": "public void onStreamRequest(StreamRequest req, final RequestContext requestContext, final Map<String, String> wireAttrs,\n final NextFilter<StreamRequest, StreamResponse> nextFilter)\n {\n //Set accepted encoding for compressed response\n String operation = (String) requ... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_96 | {
"fields": [],
"file": "data/src/test/java/com/linkedin/data/template/TestFixedTemplate.java",
"identifier": "TestFixedTemplate",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testFixedTemplate()\n {\n String goodObjects[] = {\n \"12345\",\n \"ABCDF\"\n };\n\n ByteString goodByteStrings[] = {\n ByteString.copyAvroString(\"qwert\", false)\n };\n\n Object badObjects[] = {\n \"\", \"1\", \"12\", \"123\", \"1234\", \"1... | {
"fields": [
{
"declarator": "_schema",
"modifier": "protected final",
"original_string": "protected final FixedDataSchema _schema;",
"type": "FixedDataSchema",
"var_name": "_schema"
},
{
"declarator": "_data",
"modifier": "protected final",
"original_strin... | {
"body": "protected FixedTemplate(Object object, FixedDataSchema schema) throws TemplateOutputCastException\n {\n Class<?> objectClass = object.getClass();\n if (objectClass == String.class)\n {\n String data = (String) object;\n if (data.length() != schema.getSize())\n {\n throw new T... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_79 | {
"fields": [],
"file": "data/src/test/java/com/linkedin/data/schema/grammar/TestPdlParseUtils.java",
"identifier": "TestPdlParseUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testUnescapeIdentifier()\n {\n assertEquals(PdlParseUtils.unescapeIdentifier(\"`record`\"), \"record\");\n assertEquals(PdlParseUtils.unescapeIdentifier(\"notEscaped\"), \"notEscaped\");\n }",
"class_method_signature": "TestPdlParseUtils.testUnescapeIdentifier()",
"construc... | {
"fields": [
{
"declarator": "ESCAPE_CHAR_PATTERN = Pattern.compile(String.valueOf('`'))",
"modifier": "private static final",
"original_string": "private static final Pattern ESCAPE_CHAR_PATTERN = Pattern.compile(String.valueOf('`'));",
"type": "Pattern",
"var_name": "ESCAPE_CHAR_P... | {
"body": "public static String unescapeIdentifier(String identifier)\n {\n return ESCAPE_CHAR_PATTERN.matcher(identifier).replaceAll(\"\");\n }",
"class_method_signature": "PdlParseUtils.unescapeIdentifier(String identifier)",
"constructor": false,
"full_signature": "public static String unescapeIdentifie... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_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.