id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
6944525_468 | {
"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 testMapTrim() throws CloneNotSupportedException\n {\n TyperefTest test = new TyperefTest();\n\n RecordBarMap map = new RecordBarMap();\n RecordBar recordBar = new RecordBar();\n recordBar.setLocation(\"foo\");\n map.put(\"map\", recordBar);\n test.setBarRefMap(map);\... | {
"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_192 | {
"fields": [],
"file": "restli-tools/src/test/java/com/linkedin/restli/tools/data/TestPredicateExpressionParser.java",
"identifier": "TestPredicateExpressionParser",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAndAnd()\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\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_487 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/model/TestRestLiApiBuilder.java",
"identifier": "TestRestLiApiBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"finderSupportedResourceTypeData\")\n public void testFinderSupportedResourceType(Class<?> resourceClass)\n {\n try\n {\n RestLiApiBuilder.buildResourceModels(Collections.singleton(resourceClass));\n }\n catch (Exception exception)\n {\n Assert.fail(String.f... | {
"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_612 | {
"fields": [],
"file": "restli-common/src/test/java/com/linkedin/restli/common/TestComplexResourceKey.java",
"identifier": "TestComplexResourceKey",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testReadOnlyWithNullParams()\n {\n DataMap keyDataMap = new DataMap();\n keyDataMap.put(\"key\", \"key-value\");\n EmptyRecord key = new EmptyRecord(keyDataMap);\n\n ComplexResourceKey<EmptyRecord, EmptyRecord> complexResourceKey =\n new ComplexResourceKey<EmptyReco... | {
"fields": [
{
"declarator": "key",
"modifier": "protected final",
"original_string": "protected final K key;",
"type": "K",
"var_name": "key"
},
{
"declarator": "params",
"modifier": "protected final",
"original_string": "protected final P ... | {
"body": "public void makeReadOnly()\n {\n key.data().makeReadOnly();\n\n if (params != null)\n {\n params.data().makeReadOnly();\n }\n }",
"class_method_signature": "ComplexResourceKey.makeReadOnly()",
"constructor": false,
"full_signature": "public void makeReadOnly()",
"identifier": "ma... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_242 | {
"fields": [
{
"declarator": "FS = File.separator",
"modifier": "private final",
"original_string": "private final String FS = File.separator;",
"type": "String",
"var_name": "FS"
},
{
"declarator": "testDir = System.getProperty(\"testDir\", new File(\"src/test\").getA... | {
"body": "@Test(dataProvider = \"matchingFilePairTestData\")\n public void testGetMatchingPrevAndCurrSnapshotPairs(String preSnapshotDir, String currSnapshotDir, List<String> expectedFilePairList)\n {\n PegasusSchemaSnapshotCompatibilityChecker checker = new PegasusSchemaSnapshotCompatibilityChecker();\n Lis... | {
"fields": [
{
"declarator": "_options = new Options()",
"modifier": "private static final",
"original_string": "private static final Options _options = new Options();",
"type": "Options",
"var_name": "_options"
},
{
"declarator": "_logger = LoggerFactory.getLogger(\n ... | {
"body": "static List<String> getMatchingPrevAndCurrSnapshotPairs(String prevSnapshotDir, String currSnapshotDir)\n {\n Map<String, String> prevFilesMap = createMapFromFiles(prevSnapshotDir);\n Map<String, String> currFilesMap = createMapFromFiles(currSnapshotDir);\n List<String> filePairs = new ArrayList<... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_307 | {
"fields": [],
"file": "r2-core/src/test/java/com/linkedin/r2/util/TestLinkedDeque.java",
"identifier": "TestLinkedDeque",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testOfferFirstNull()\n {\n LinkedDeque<Object> q = new LinkedDeque<Object>();\n try\n {\n q.offerFirst(null);\n Assert.fail(\"offerFirst null should have failed\");\n }\n catch (NullPointerException e)\n {\n // expected\n }\n }",
"class_method_si... | {
"fields": [
{
"declarator": "_head",
"modifier": "private",
"original_string": "private Node<T> _head;",
"type": "Node<T>",
"var_name": "_head"
},
{
"declarator": "_tail",
"modifier": "private",
"original_string": "private Node<T> _tail;",
"type": "N... | {
"body": "@Override\n public boolean offerFirst(T t)\n {\n addFirstNode(t);\n return true;\n }",
"class_method_signature": "LinkedDeque.offerFirst(T t)",
"constructor": false,
"full_signature": "@Override public boolean offerFirst(T t)",
"identifier": "offerFirst",
"invocations": [
"addFirstNo... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_184 | {
"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 testTranslatorWorksWithArgFile(String packageName, String className) throws Exception\n {\n File tempDir = Files.createTempDirectory(\"restli\").toFile();\n File argFile = new File(tempDir, \"resolverPath\");\n Files.write(argFile.toPath(), C... | {
"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_491 | {
"fields": [
{
"declarator": "_mockRestLiRequestData",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private RestLiRequestData _mockRestLiRequestData;",
"type": "RestLiRequestData",
"var_name": "_mockRestLiRequestData"
},
{
"declarator": "_mockFilterChai... | {
"body": "@SuppressWarnings(\"unchecked\")\n @Test\n public void testFilterInvocationRequestErrorThrowsError() throws Exception\n {\n _restLiFilterChain = new RestLiFilterChain(Arrays.asList(_filters),\n _mockFilterChainDispatcher, _mockFilterChainCallback);\n _filters[1] = new CountFilterRequestErro... | {
"fields": [
{
"declarator": "_filterChainIterator",
"modifier": "private final",
"original_string": "private final RestLiFilterChainIterator _filterChainIterator;",
"type": "RestLiFilterChainIterator",
"var_name": "_filterChainIterator"
}
],
"file": "restli-server/src/main/... | {
"body": "public void onRequest(FilterRequestContext requestContext,\n RestLiFilterResponseContextFactory filterResponseContextFactory)\n {\n // Initiate the filter chain iterator. The RestLiCallback will be passed to the method invoker at the end of the\n // filter chain.\n _filterC... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_215 | {
"fields": [],
"file": "restli-tools/src/test/java/com/linkedin/restli/tools/data/TestPredicateExpressionParser.java",
"identifier": "TestPredicateExpressionParser",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expectedExceptions = RuntimeException.class)\n public void testNotPredicate()\n {\n PredicateExpressionParser.parse(\"com.linkedin.restli.tools.data.PredicateExpressionParser\");\n }",
"class_method_signature": "TestPredicateExpressionParser.testNotPredicate()",
"constructor": false,
"ful... | {
"fields": [
{
"declarator": "TRIMMER_PATTERN = Pattern.compile(\"\\\\s\")",
"modifier": "private static final",
"original_string": "private static final Pattern TRIMMER_PATTERN = Pattern.compile(\"\\\\s\");",
"type": "Pattern",
"var_name": "TRIMMER_PATTERN"
},
{
"decl... | {
"body": "public static Predicate parse(String expression)\n {\n final Stack<Predicate> predicateStack = new Stack<Predicate>();\n final Stack<Character> operatorStack = new Stack<Character>();\n\n final String trimmedExpression = TRIMMER_PATTERN.matcher(expression).replaceAll(\"\");\n final StringToken... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_645 | {
"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 testDifferentCookieStringsCombination()\n {\n List<HttpCookie> cookies = Arrays.asList(cookieC, cookieD, cookieA, cookieB);\n String combinedHeader = cookieC.toString() + \";\" + cookieD.toString() + \";\" + cookieA.toString();\n String cookieBStr = cookieB.toString();\n A... | {
"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_350 | {
"fields": [],
"file": "d2/src/test/java/com/linkedin/d2/backuprequests/TestLatencyMetric.java",
"identifier": "TestLatencyMetric",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testOverflowRecording()\n {\n LatencyMetric metric = new LatencyMetric();\n for (int j = 0; j < 3; j++)\n {\n GaussianResponseTimeDistribution distribution =\n new GaussianResponseTimeDistribution(0, j * 100, 10, TimeUnit.MILLISECONDS);\n AtomicReference<Ab... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(LatencyMetric.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(LatencyMetric.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declar... | {
"body": "public void record(long latencyNano, Consumer<AbstractHistogram> overflownConsumer) {\n recordSafeValue(narrow(latencyNano), overflownConsumer);\n }",
"class_method_signature": "LatencyMetric.record(long latencyNano, Consumer<AbstractHistogram> overflownConsumer)",
"constructor": false,
"full_sig... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_429 | {
"fields": [
{
"declarator": "DEFAULT_PARTITION_ID = DefaultPartitionAccessor.DEFAULT_PARTITION_ID",
"modifier": "private static final",
"original_string": "private static final int DEFAULT_PARTITION_ID = DefaultPartitionAccessor.DEFAULT_PARTITION_ID;",
"type": "int",
"var_name": "D... | {
"body": "@Test(groups = { \"small\", \"back-end\" })\n public void testFactoryWithHashMethod() {\n RingFactory<String> factory = new DelegatingRingFactory<>(configBuilder(null, \"uriRegex\"));\n Ring<String> ring = factory.createRing(buildPointsMap(10));\n\n assertTrue(ring instanceof MPConsistentHashRing... | {
"fields": [
{
"declarator": "POINT_BASED_CONSISTENT_HASH = \"pointBased\"",
"modifier": "public static final",
"original_string": "public static final String POINT_BASED_CONSISTENT_HASH = \"pointBased\";",
"type": "String",
"var_name": "POINT_BASED_CONSISTENT_HASH"
},
{
... | {
"body": "@Override\n public Ring<T> createRing(Map<T, Integer> pointsMap) {\n return _ringFactory.createRing(pointsMap);\n }",
"class_method_signature": "DelegatingRingFactory.createRing(Map<T, Integer> pointsMap)",
"constructor": false,
"full_signature": "@Override public Ring<T> createRing(Map<T, Integ... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_583 | {
"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 testRestRequestAttemptVerifyParseFailed() throws Exception\n {\n //This test verifies that a RestRequest sent to the RestLiServer throws an exception if the content type or accept types\n //fail to parse properly. This occurs when we try to verify that the request's content type... | {
"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_281 | {
"fields": [
{
"declarator": "THROWABLE = new Throwable()",
"modifier": "private static final",
"original_string": "private static final Throwable THROWABLE = new Throwable();",
"type": "Throwable",
"var_name": "THROWABLE"
},
{
"declarator": "CASE_SENSITIVE_WIRE_ATTRIB... | {
"body": "@Test\n public void testSuccessResponse()\n {\n doTestSuccessResponse(TransportResponseImpl.success(RESPONSE));\n doTestSuccessResponse(TransportResponseImpl.success(RESPONSE, CASE_SENSITIVE_WIRE_ATTRIBUTES));\n }",
"class_method_signature": "TestTransportResponseImpl.testSuccessResponse()",
"... | {
"fields": [
{
"declarator": "_response",
"modifier": "private final",
"original_string": "private final T _response;",
"type": "T",
"var_name": "_response"
},
{
"declarator": "_error",
"modifier": "private final",
"original_string": "private final Throwabl... | {
"body": "public static <T> TransportResponse<T> success(T response)\n {\n return new TransportResponseImpl<T>(response, null, new TreeMap<>(String.CASE_INSENSITIVE_ORDER));\n }",
"class_method_signature": "TransportResponseImpl.success(T response)",
"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_73 | {
"fields": [],
"file": "data/src/test/java/com/linkedin/data/schema/TestDataSchema.java",
"identifier": "TestDataSchema",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNameLookup() throws IOException\n {\n String[][] inputs = {\n {\n // refer to Ref within Record\n \"{ \\\"type\\\" : \\\"typeref\\\", \\\"name\\\" : \\\"Ref\\\", \\\"ref\\\" : \\\"string\\\" }\\n\" +\n \"{ \\\"type\\\" : \\\"record\\\", \\\"name\\\" : ... | {
"fields": [
{
"declarator": "_type",
"modifier": "private final",
"original_string": "private final Type _type;",
"type": "Type",
"var_name": "_type"
},
{
"declarator": "_resolvedProperties = new HashMap<>()",
"modifier": "",
"original_string": "Map<String... | {
"body": "public abstract boolean hasError();",
"class_method_signature": "DataSchema.hasError()",
"constructor": false,
"full_signature": "public abstract boolean hasError()",
"identifier": "hasError",
"invocations": [],
"modifiers": "public abstract",
"parameters": "()",
"return": "boolean",
"sig... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_517 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/response/TestErrorResponseBuilder.java",
"identifier": "TestErrorResponseBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@SuppressWarnings(\"deprecation\")\n @Test\n public void testOverride()\n {\n RestLiServiceException exception = new RestLiServiceException(HttpStatus.S_200_OK, \"Some message\", new IllegalStateException(\"Some other message\"));\n exception.setServiceErrorCode(123);\n exception.setCode(\"INVA... | {
"fields": [
{
"declarator": "DEFAULT_INTERNAL_ERROR_MESSAGE = \"INTERNAL SERVER ERROR\"",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_INTERNAL_ERROR_MESSAGE = \"INTERNAL SERVER ERROR\";",
"type": "String",
"var_name": "DEFAULT_INTERNAL_... | {
"body": "public ErrorResponse buildErrorResponse(RestLiServiceException result)\n {\n return buildErrorResponse(result, result.hasOverridingErrorResponseFormat() ? result.getOverridingFormat() : _errorResponseFormat);\n }",
"class_method_signature": "ErrorResponseBuilder.buildErrorResponse(RestLiServiceExcep... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_147 | {
"fields": [
{
"declarator": "TARGET_HOST_KEY_NAME = \"D2-KeyMapper-TargetHost\"",
"modifier": "private static final",
"original_string": "private static final String TARGET_HOST_KEY_NAME = \"D2-KeyMapper-TargetHost\";",
"type": "String",
"var_name": "TARGET_HOST_KEY_NAME"
},
... | {
"body": "@Test(dataProvider = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + \"protocol\")\n public void testGatherBatchResponse(ProtocolVersion version)\n {\n Map<RequestInfo, Response<BatchResponse<TestRecord>>> successResponses = new HashMap<>();\n successResponses.put(\n new RequestInfo(createBat... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(DefaultScatterGatherStrategy.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(DefaultScatterGatherStrategy.class);",
"type": "Logger",
"var_name": "l... | {
"body": "@Override\n @SuppressWarnings(\"unchecked\")\n public <K, T> void onAllResponsesReceived(Request<T> request, ProtocolVersion protocolVersion,\n Map<RequestInfo, Response<T>> successResponses,\n Map<RequestInfo, Throwabl... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_452 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/TestResourceContextImpl.java",
"identifier": "TestResourceContextImpl",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"returnEntityParameterData\")\n public void testReturnEntityParameter(String uri, boolean expectReturnEntity, boolean expectException) throws RestLiSyntaxException\n {\n final ResourceContextImpl context = new ResourceContextImpl(new PathKeysImpl(),\n new RestRequestBuilde... | {
"fields": [
{
"declarator": "INITIAL_CUSTOM_REQUEST_CONTEXT_CAPACITY = 1",
"modifier": "private static final",
"original_string": "private static final int INITIAL_CUSTOM_REQUEST_CONTEXT_CAPACITY = 1;",
"type": "int",
"var_name": "INITIAL_CUSTOM_REQUEST_CONTEXT_CAPACITY"
},
... | {
"body": "@Override\n public boolean isReturnEntityRequested()\n {\n String returnEntityValue = getParameter(RestConstants.RETURN_ENTITY_PARAM);\n if (returnEntityValue == null)\n {\n // Default to true for backward compatibility so that existing clients can receive entity without using parameter\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_686 | {
"fields": [
{
"declarator": "_photoRes",
"modifier": "private",
"original_string": "private PhotoResource _photoRes;",
"type": "PhotoResource",
"var_name": "_photoRes"
},
{
"declarator": "_albumRes",
"modifier": "private",
"original_s... | {
"body": "@Test(expectedExceptions = RestLiServiceException.class)\n public void testBadUpdatePhotoId()\n {\n // photo 100 doesn't exist\n CompoundKey key = new CompoundKey().append(\"photoId\", 100L).append(\"albumId\", 1L);\n AlbumEntry entry = new AlbumEntry().setAddTime(4);\n _entryRes.update(key, ... | {
"fields": [
{
"declarator": "_db",
"modifier": "@Inject\n @Named(\"albumEntryDb\")\n private",
"original_string": "@Inject\n @Named(\"albumEntryDb\")\n private AlbumEntryDatabase _db;",
"type": "AlbumEntryDatabase",
"var_name": "_db"
},
{
"declarator": "_photoDb",... | {
"body": "@Override\n @SuccessResponse(statuses = { HttpStatus.S_204_NO_CONTENT })\n @ServiceErrors(INVALID_PERMISSIONS)\n @ParamError(code = INVALID_ID, parameterNames = { \"albumEntryId\" })\n public UpdateResponse update(CompoundKey key, AlbumEntry entity)\n {\n long photoId = (Long) key.getPart(\"photoId... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_669 | {
"fields": [
{
"declarator": "TEST_ENCODING_1 = new AsciiHexEncoding('~', new char[] {'.','[', ']', '\\017', '\\020', '\\000', '\\177'})",
"modifier": "public static final",
"original_string": "public static final AsciiHexEncoding TEST_ENCODING_1 = new AsciiHexEncoding('~', new char[] {'.','[',... | {
"body": "@Test\n public void testSingleCharEncode()\n {\n // test chars we care about plus the corner cases\n Assert.assertEquals(TEST_ENCODING_1.encode(\".\"), \"~2E\");\n Assert.assertEquals(TEST_ENCODING_1.encode(\"[\"), \"~5B\");\n Assert.assertEquals(TEST_ENCODING_1.encode(\"]\"), \"~5D\");\n ... | {
"fields": [
{
"declarator": "_encodingChar",
"modifier": "private final",
"original_string": "private final char _encodingChar;",
"type": "char",
"var_name": "_encodingChar"
},
{
"declarator": "_reservedChars",
"modifier": "private final",
"original_string... | {
"body": "public String encode(String s)\n {\n if (s == null)\n {\n return null;\n }\n StringBuilder sb = new StringBuilder();\n int len = s.length();\n for (int i = 0; i < len; i++)\n {\n char c = s.charAt(i);\n if (c == _encodingChar || _reservedChars.contains(c))\n {\n ... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_393 | {
"fields": [
{
"declarator": "HOST_OVERRIDE_LIST = \"HOST_OVERRIDE_LIST\"",
"modifier": "private static final",
"original_string": "private static final String HOST_OVERRIDE_LIST = \"HOST_OVERRIDE_LIST\";",
"type": "String",
"var_name": "HOST_OVERRIDE_LIST"
},
{
"decla... | {
"body": "@Test\n public void testGetAllPartitionMultipleHostsOrdering()\n throws Exception\n {\n String serviceName = \"articles\";\n String clusterName = \"cluster\";\n String path = \"path\";\n String strategyName = \"degrader\";\n\n //setup partition\n Map<URI,Map<Integer, PartitionData>... | {
"fields": [
{
"declarator": "HOST_OVERRIDE_LIST = \"HOST_OVERRIDE_LIST\"",
"modifier": "private static final",
"original_string": "private static final String HOST_OVERRIDE_LIST = \"HOST_OVERRIDE_LIST\";",
"type": "String",
"var_name": "HOST_OVERRIDE_LIST"
},
{
"decla... | {
"body": "@Override\n public <K> HostToKeyMapper<K> getPartitionInformation(URI serviceUri, Collection<K> keys,\n int limitHostPerPartition,\n int hash)\n throws ServiceUnavailableException\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_24 | {
"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 testExecutorRejectExecution() throws Exception\n {\n final AtomicBoolean success = new AtomicBoolean(false);\n final CountDownLatch latch = new CountDownLatch(1);\n\n ExecutorService rejectedExecutor = EasyMock.createStrictMock(ExecutorService.class);\n rejectedExecutor.ex... | {
"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_239 | {
"fields": [
{
"declarator": "FS = File.separator",
"modifier": "private final",
"original_string": "private final String FS = File.separator;",
"type": "String",
"var_name": "FS"
},
{
"declarator": "testDir = System.getProperty(\"testDir\", new File(\"src/test\").getA... | {
"body": "@Test(dataProvider = \"compatibleInputFiles\")\n public void testCompatiblePegasusSchemaSnapshot(String prevSchema, String currSchema)\n {\n PegasusSchemaSnapshotCompatibilityChecker checker = new PegasusSchemaSnapshotCompatibilityChecker();\n CompatibilityInfoMap infoMap = checker.checkPegasusSche... | {
"fields": [
{
"declarator": "_options = new Options()",
"modifier": "private static final",
"original_string": "private static final Options _options = new Options();",
"type": "Options",
"var_name": "_options"
},
{
"declarator": "_logger = LoggerFactory.getLogger(\n ... | {
"body": "public CompatibilityInfoMap checkPegasusSchemaCompatibility(String prevPegasusSchemaPath, String currentPegasusSchemaPath,\n CompatibilityOptions.Mode compatMode)\n {\n boolean newSchemaCreated = false;\n boolean preSchemaRemoved = false;\n\n DataSchema preSchema = null;\n try\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_110 | {
"fields": [],
"file": "restli-client-util-recorder/src/test/java/com/linkedin/restli/client/util/TestPatchTreeRecorder.java",
"identifier": "TestPatchTreeRecorder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expectedExceptions = NullPointerException.class)\n public void testSimpleSetDisallowNullDefault()\n {\n makeOne().getRecordingProxy().setFooRequired(null);\n }",
"class_method_signature": "TestPatchTreeRecorder.testSimpleSetDisallowNullDefault()",
"constructor": false,
"full_signature": "... | {
"fields": [
{
"declarator": "_templateProxy",
"modifier": "private final",
"original_string": "private final T _templateProxy;",
"type": "T",
"var_name": "_templateProxy"
},
{
"declarator": "_patchTree",
"modifier": "private final",
"original_string": "pri... | {
"body": "public T getRecordingProxy()\n {\n return _templateProxy;\n }",
"class_method_signature": "PatchTreeRecorder.getRecordingProxy()",
"constructor": false,
"full_signature": "public T getRecordingProxy()",
"identifier": "getRecordingProxy",
"invocations": [],
"modifiers": "public",
"paramet... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_540 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/server/resources/TestInjectResourceFactory.java",
"identifier": "TestInjectResourceFactory",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMissingNamedDependency()\n {\n Map<String, ResourceModel> pathRootResourceMap =\n buildResourceModels(SomeResource1.class);\n\n BeanProvider ctx = EasyMock.createMock(BeanProvider.class);\n EasyMock.expect(ctx.getBean(EasyMock.eq(\"dep1\"))).andReturn(null).anyTime... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(InjectResourceFactory.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(InjectResourceFactory.class);",
"type": "Logger",
"var_name": "log"
},
... | {
"body": "@Override\n public void setRootResources(final Map<String, ResourceModel> rootResources)\n {\n log.debug(\"Setting root resources\");\n\n _rootResources = rootResources;\n\n Collection<Class<?>> allResourceClasses = new HashSet<Class<?>>();\n for (ResourceModel resourceModel : _rootResources.... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_405 | {
"fields": [
{
"declarator": "CONTENT = ByteString.copy(new byte[8092])",
"modifier": "private static final",
"original_string": "private static final ByteString CONTENT = ByteString.copy(new byte[8092]);",
"type": "ByteString",
"var_name": "CONTENT"
},
{
"declarator":... | {
"body": "@Test\n public void testStreamRetry() throws Exception\n {\n SimpleLoadBalancer balancer = prepareLoadBalancer(Arrays.asList(\"http://test.linkedin.com/retry1\", \"http://test.linkedin.com/good\"));\n\n DynamicClient dynamicClient = new DynamicClient(balancer, null);\n RetryClient client = new R... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(RetryClient.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(RetryClient.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator... | {
"body": "@Override\n public void streamRequest(StreamRequest request, Callback<StreamResponse> callback)\n {\n streamRequest(request, new RequestContext(), callback);\n }",
"class_method_signature": "RetryClient.streamRequest(StreamRequest request, Callback<StreamResponse> callback)",
"constructor": false... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_690 | {
"fields": [
{
"declarator": "_photoRes",
"modifier": "private",
"original_string": "private PhotoResource _photoRes;",
"type": "PhotoResource",
"var_name": "_photoRes"
},
{
"declarator": "_albumRes",
"modifier": "private",
"original_s... | {
"body": "@Test\n public void testSearch()\n {\n // we previously put the first 3 entries in album 1\n Set<AlbumEntry> result = new HashSet<AlbumEntry>(_entryRes.search(Long.valueOf(1), null));\n Set<AlbumEntry> expected = new HashSet<AlbumEntry>();\n for (int i = 0; i < 3; i++)\n {\n expected.... | {
"fields": [
{
"declarator": "_db",
"modifier": "@Inject\n @Named(\"albumEntryDb\")\n private",
"original_string": "@Inject\n @Named(\"albumEntryDb\")\n private AlbumEntryDatabase _db;",
"type": "AlbumEntryDatabase",
"var_name": "_db"
},
{
"declarator": "_photoDb",... | {
"body": "@Finder(\"search\")\n @SuccessResponse(statuses = { HttpStatus.S_200_OK })\n @ParamError(code = INVALID_ID, parameterNames = { \"albumId\", \"photoId\" })\n @ParamError(code = UNSEARCHABLE_ALBUM_ID, parameterNames = { \"albumId\" })\n public List<AlbumEntry> search(@Optional @QueryParam(\"albumId\") Lo... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_32 | {
"fields": [
{
"declarator": "_symbolTableName = \"https://someservice:100|tableName\"",
"modifier": "private final",
"original_string": "private final String _symbolTableName = \"https://someservice:100|tableName\";",
"type": "String",
"var_name": "_symbolTableName"
},
{
... | {
"body": "@Test(expectedExceptions = IllegalStateException.class)\n public void testRemoteSymbolTableMalformedUrl()\n {\n String symbolTableName = \"https\\\\someservice:100|tableName\";\n new DefaultSymbolTableProvider().getSymbolTable(symbolTableName);\n }",
"class_method_signature": "TestDefaultSymbolT... | {
"fields": [
{
"declarator": "METADATA_EXTRACTOR = new SymbolTableMetadataExtractor()",
"modifier": "private static final",
"original_string": "private static final SymbolTableMetadataExtractor METADATA_EXTRACTOR = new SymbolTableMetadataExtractor();",
"type": "SymbolTableMetadataExtracto... | {
"body": "@Override\n public SymbolTable getSymbolTable(String symbolTableName)\n {\n try\n {\n SymbolTableMetadata metadata = METADATA_EXTRACTOR.extractMetadata(symbolTableName);\n String serverNodeUri = metadata.getServerNodeUri();\n String tableName = metadata.getSymbolTableName();\n b... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_385 | {
"fields": [
{
"declarator": "_executorService",
"modifier": "private",
"original_string": "private ScheduledExecutorService _executorService;",
"type": "ScheduledExecutorService",
"var_name": "_executorService"
},
{
"de... | {
"body": "@Test\n public void testRegisterClusterListener()\n {\n reset();\n\n MockClusterListener clusterListener = new MockClusterListener();\n _state.registerClusterListener(clusterListener);\n assertEquals(clusterListener.getClusterAddedCount(CLUSTER1_CLUSTER_NAME), 0, \"expected zero count since n... | {
"fields": [
{
"declarator": "_log = LoggerFactory.getLogger(SimpleLoadBalancerState.class)",
"modifier": "private static final",
"original_string": "private static final Logger _log = LoggerFactory.getLogger(SimpleLoadBalancerState.cla... | {
"body": "@Override\n public void registerClusterListener(final LoadBalancerClusterListener listener)\n {\n trace(_log, \"register listener: \", listener);\n\n _executor.execute(new PropertyEvent(\"add cluster listener for state\")\n {\n @Override\n public void innerRun()\n {\n if (!... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_556 | {
"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 testHandleSingleRequest(MultiplexerRunMode multiplexerRunMode) throws Exception\n {\n SynchronousRequestHandler mockHandler = createMockHandler();\n MultiplexedRequestHandlerImpl multiplexer = createMultiplexer(mockHandler, multiplex... | {
"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_106 | {
"fields": [],
"file": "restli-client-util-recorder/src/test/java/com/linkedin/restli/client/util/TestPatchTreeRecorder.java",
"identifier": "TestPatchTreeRecorder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testEmptyPatch()\n {\n PatchTreeRecorder<PatchTreeTestModel> pc = makeOne();\n Assert.assertEquals(pc.generatePatchTree().getDataMap(), new DataMap());\n }",
"class_method_signature": "TestPatchTreeRecorder.testEmptyPatch()",
"constructor": false,
"full_signature": "@Test... | {
"fields": [
{
"declarator": "_templateProxy",
"modifier": "private final",
"original_string": "private final T _templateProxy;",
"type": "T",
"var_name": "_templateProxy"
},
{
"declarator": "_patchTree",
"modifier": "private final",
"original_string": "pri... | {
"body": "public PatchTree generatePatchTree()\n {\n try\n {\n return new PatchTree( _patchTree.getDataMap().copy());\n }\n catch (CloneNotSupportedException e)\n {\n throw new IllegalStateException(\"Error copying data map: \" + _patchTree.getDataMap(), e);\n }\n }",
"class_method_si... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_413 | {
"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 testRequest(boolean isD2Async) throws Exception\n {\n AtomicReference<ServiceProperties> serviceProperties = new AtomicReference<>();\n serviceProperties.set(createServiceProperties(null));\n BackupRequestsClient client = createClient(serviceProp... | {
"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_297 | {
"fields": [],
"file": "r2-core/src/test/java/com/linkedin/r2/util/TestLinkedDeque.java",
"identifier": "TestLinkedDeque",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testOfferFirst()\n {\n List<Integer> control = new ArrayList<Integer>(Arrays.asList(1, 2, 3));\n LinkedDeque<Integer> q = new LinkedDeque<Integer>(control);\n\n control.add(0, 99);\n Assert.assertTrue(q.offerFirst(99));\n\n Assert.assertEquals(q, control);\n }",
"cla... | {
"fields": [
{
"declarator": "_head",
"modifier": "private",
"original_string": "private Node<T> _head;",
"type": "Node<T>",
"var_name": "_head"
},
{
"declarator": "_tail",
"modifier": "private",
"original_string": "private Node<T> _tail;",
"type": "N... | {
"body": "@Override\n public boolean offerFirst(T t)\n {\n addFirstNode(t);\n return true;\n }",
"class_method_signature": "LinkedDeque.offerFirst(T t)",
"constructor": false,
"full_signature": "@Override public boolean offerFirst(T t)",
"identifier": "offerFirst",
"invocations": [
"addFirstNo... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_628 | {
"fields": [
{
"declarator": "PSON_DATA_CODEC = new PsonDataCodec()",
"modifier": "private static final",
"original_string": "private static final PsonDataCodec PSON_DATA_CODEC = new PsonDataCodec();",
"type": "PsonDataCodec",
"var_name": "PSON_DATA_CODEC"
},
{
"declar... | {
"body": "@Test\n public void testJSONByteStringToDataMapWithUnsupportedContentType() throws MimeTypeParseException, IOException\n {\n // unsupport content type should fallback to JSON\n DataMap expectedDataMap = createTestDataMap();\n ByteString byteString = ByteString.copy(JACKSON_DATA_CODEC.mapToBytes(... | {
"fields": [],
"file": "restli-common/src/main/java/com/linkedin/restli/internal/common/DataMapConverter.java",
"identifier": "DataMapConverter",
"interfaces": "",
"methods": [
{
"class_method_signature": "DataMapConverter.dataMapToByteString(Map<String, String> headers, DataMap dataMap)",
"c... | {
"body": "public static DataMap bytesToDataMap(Map<String, String> headers, ByteString bytes) throws MimeTypeParseException, IOException\n {\n return getContentType(headers).getCodec().readMap(bytes);\n }",
"class_method_signature": "DataMapConverter.bytesToDataMap(Map<String, String> headers, ByteString byte... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_65 | {
"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 testObjectIsAcyclic()\n {\n assertTrue(Data.objectIsAcyclic(true));\n assertTrue(Data.objectIsAcyclic(1));\n assertTrue(Data.objectIsAcyclic(1L));\n assertTrue(Data.objectIsAcyclic(1.0f));\n assertTrue(Data.objectIsAcyclic(1.0));\n assertTrue(Data.objectIsAcyclic(\"s... | {
"fields": [
{
"declarator": "NULL = Null.getInstance()",
"modifier": "public static final",
"original_string": "public static final Null NULL = Null.getInstance();",
"type": "Null",
"var_name": "NULL"
},
{
"declarator": "UTF_8_CHARSET = Charset.forName(\"UTF-8\")",
... | {
"body": "static boolean objectIsAcyclic(Object object)\n {\n if (object == null)\n {\n return true;\n }\n\n Class<?> klass = object.getClass();\n if (isPrimitiveClass(klass))\n {\n return true;\n }\n else if (isComplexClass(klass))\n {\n DataComplex complex = (DataComplex)... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_278 | {
"fields": [
{
"declarator": "TEST_TRACE =\n \"{\" +\n \"\\\"planId\\\":0,\" +\n \"\\\"planClass\\\":\\\"pclass\\\",\" +\n \"\\\"traces\\\":\" +\n \"[\" +\n \"{\" +\n \"\\\"id\\\":0,\" +\n \"\\\"name\\\":\\\"com.linkedin.... | {
"body": "@Test\n public void testStaticContent() throws IOException\n {\n ClassLoader classLoader = ParseqTraceDebugRequestHandler.class.getClassLoader();\n\n //Collect all files under tracevis folder in the jar containing the parseq trace debug request handler.\n Enumeration<URL> resources = classLoader... | {
"fields": [
{
"declarator": "PATH_SEP = '/'",
"modifier": "private static final",
"original_string": "private static final char PATH_SEP = '/';",
"type": "char",
"var_name": "PATH_SEP"
},
{
"declarator": "HANDLER_ID = \"parseqtrace\"",
"modifier": "private stati... | {
"body": "private static String determineMediaType(String path)\n {\n int extensionIndex = path.lastIndexOf('.');\n\n if (extensionIndex != -1)\n {\n String extension = path.substring(extensionIndex);\n\n if (extension.equals(\".html\"))\n {\n return HEADER_VALUE_TEXT_HTML;\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_151 | {
"fields": [],
"file": "restli-client/src/test/java/com/linkedin/restli/client/TestRequest.java",
"identifier": "TestRequest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testHeadersCaseInsensitiveAdd()\n {\n final long id = 42l;\n GetRequestBuilder<Long, TestRecord> builder = generateDummyRequestBuilder();\n Request<TestRecord> request = builder\n .id(id)\n .addHeader(\"header\", \"value1\")\n .addHeader(\"HEADER\", \"val... | {
"fields": [
{
"declarator": "SLASH_PATTERN = Pattern.compile(\"/\")",
"modifier": "private static final",
"original_string": "private static final Pattern SLASH_PATTERN = Pattern.compile(\"/\");",
"type": "Pattern",
"var_name": "SLASH_PATTERN"
},
{
"declarator": "URI_... | {
"body": "public Map<String, String> getHeaders()\n {\n return _headers;\n }",
"class_method_signature": "Request.getHeaders()",
"constructor": false,
"full_signature": "public Map<String, String> getHeaders()",
"identifier": "getHeaders",
"invocations": [],
"modifiers": "public",
"parameters": "(... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_501 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/methods/arguments/TestArgumentBuilder.java",
"identifier": "TestArgumentBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testRestLiAttachmentsParamResourceExpectNotPresent()\n {\n //This test makes sure that a resource method that expects attachments, but none are present in the request,\n //is given a null for the RestLiAttachmentReader.\n ServerResourceContext mockResourceContext = EasyMock.c... | {
"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_444 | {
"fields": [
{
"declarator": "SERVICE_NAME = \"dummyService\"",
"modifier": "private static final",
"original_string": "private static final String SERVICE_NAME = \"dummyService\";",
"type": "String",
"var_name": "SERVICE_NAME"
},
{
"declarator": "SERVICE_PATH = \"dumm... | {
"body": "@Test\n public void testQuarantineNotEnabledInConfig()\n {\n setup(RelativeLoadBalancerStrategyFactory.DEFAULT_QUARANTINE_MAX_PERCENT, false, false);\n\n PartitionState state = new PartitionStateTestDataBuilder()\n .setTrackerClientStateMap(TrackerClientMockHelper.mockTrackerClients(2),\n ... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(QuarantineManager.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(QuarantineManager.class);",
"type": "Logger",
"var_name": "LOG"
},
{
... | {
"body": "public void updateQuarantineState(PartitionState newPartitionState,\n PartitionState oldPartitionState, long clusterAvgLatency)\n {\n long quarantineLatency = Math.max((long) (clusterAvgLatency * _relativeLatencyLowThresholdFactor),\n MIN_QUANRANTINE_LATENCY_MS);\n long currentTime = _cl... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_336 | {
"fields": [
{
"declarator": "_zkClient",
"modifier": "private",
"original_string": "private ZKConnection _zkClient;",
"type": "ZKConnection",
"var_name": "_zkClient"
},
{
"declarator": "_zkServer",
"modifier": "private",
"original_string": "private ZKServ... | {
"body": "@Test\n public void testInvalidSymlinkWithExists() throws ExecutionException, InterruptedException\n {\n final CountDownLatch latch1 = new CountDownLatch(1);\n final CountDownLatch latch2 = new CountDownLatch(1);\n final AsyncCallback.StatCallback callback = new AsyncCallback.StatCallback()\n ... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(SymlinkAwareZooKeeper.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(SymlinkAwareZooKeeper.class);",
"type": "Logger",
"var_name": "LOG"
},
... | {
"body": "@Override\n public void exists(final String path, final boolean watch, final AsyncCallback.StatCallback cb, final Object ctx)\n {\n if (!SymlinkUtil.containsSymlink(path))\n {\n _zk.exists(path, watch, cb, ctx);\n }\n else\n {\n SymlinkStatCallback compositeCallback = new Symlink... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_81 | {
"fields": [],
"file": "data/src/test/java/com/linkedin/data/schema/grammar/TestPdlParseUtils.java",
"identifier": "TestPdlParseUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testToNumber()\n {\n Number n1 = PdlParseUtils.toNumber(\"1\");\n assertEquals(n1.getClass(), Integer.class);\n assertEquals(n1.intValue(), 1);\n\n Number n10000000000 = PdlParseUtils.toNumber(\"10000000000\");\n assertEquals(n10000000000.getClass(), Long.class);\n a... | {
"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 Number toNumber(String string)\n {\n BigDecimal bigDecimal = new BigDecimal(string);\n if (StringUtils.containsAny(string, '.', 'e', 'E'))\n {\n double d = bigDecimal.doubleValue();\n if (Double.isFinite(d))\n {\n return d;\n }\n else\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_273 | {
"fields": [
{
"declarator": "temp",
"modifier": "private",
"original_string": "private File temp;",
"type": "File",
"var_name": "temp"
}
],
"file": "gradle-plugins/src/test/java/com/linkedin/pegasus/gradle/TestPathingJarUtil.java",
"identifier": "TestPathingJarUtil",
"i... | {
"body": "@Test\n public void testCreatesGeneratesPathingJar() throws IOException\n {\n //setup\n createTempDir();\n Project project = ProjectBuilder.builder().withProjectDir(temp).build();\n String taskName = \"myTaskName\";\n project.getBuildDir().mkdir();\n System.out.println(project.getBuildD... | {
"fields": [
{
"declarator": "LOG = Logging.getLogger(PathingJarUtil.class)",
"modifier": "private final static",
"original_string": "private final static Logger LOG = Logging.getLogger(PathingJarUtil.class);",
"type": "Logger",
"var_name": "LOG"
}
],
"file": "gradle-plugins... | {
"body": "public static FileCollection generatePathingJar(final Project project, final String taskName, final FileCollection classpath,\n boolean alwaysUsePathingJar) throws IOException {\n //There is a bug in the Scala nsc compiler that does not parse the dependencies of JARs in the JAR manifest\n //As suc... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_623 | {
"fields": [],
"file": "restli-common/src/test/java/com/linkedin/restli/internal/common/TestResponseUtils.java",
"identifier": "TestResponseUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testConvertTyperefKey()\n {\n Long longKey = (Long) ResponseUtils.convertKey(\"1\",\n TypeSpec.forClassMaybeNull(MyLongRef.class),\n null,\n ... | {
"fields": [],
"file": "restli-common/src/main/java/com/linkedin/restli/internal/common/ResponseUtils.java",
"identifier": "ResponseUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "ResponseUtils.convertKey(String rawKey,\n TypeSpec<?> keyType,\n ... | {
"body": "public static Object convertKey(String rawKey,\n TypeSpec<?> keyType,\n Map<String, CompoundKey.TypeInfo> keyParts,\n ComplexKeySpec<?, ?> complexKeyType,\n ProtocolVersion versio... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_361 | {
"fields": [
{
"declarator": "TEST_SERVICE = URIMapperTestUtil.TEST_SERVICE",
"modifier": "private static final",
"original_string": "private static final String TEST_SERVICE = URIMapperTestUtil.TEST_SERVICE;",
"type": "String",
"var_name": "TEST_SERVICE"
},
{
"declara... | {
"body": "@Test(dataProvider = \"stickyPartitionPermutation\")\n public void testPartitionIdOverride(boolean sticky, boolean partitioned) throws Exception\n {\n int partitionCount = partitioned ? 10 : 1;\n int totalHostCount = 100;\n\n HashRingProvider ringProvider = createStaticHashRingProvider(totalHost... | {
"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_39 | {
"fields": [],
"file": "data/src/test/java/com/linkedin/data/collections/TestCheckedUtil.java",
"identifier": "TestCheckedUtil",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expectedExceptions = AssertionError.class)\n public void testAddCycleWithAssertChecking()\n {\n final DataList list = new DataList();\n CheckedUtil.addWithoutChecking(list, list);\n }",
"class_method_signature": "TestCheckedUtil.testAddCycleWithAssertChecking()",
"constructor": false,
... | {
"fields": [],
"file": "data/src/main/java/com/linkedin/data/collections/CheckedUtil.java",
"identifier": "CheckedUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "CheckedUtil.addWithoutChecking(CheckedList<E> list, E element)",
"constructor": false,
"full_signature": "... | {
"body": "public static <E> boolean addWithoutChecking(CheckedList<E> list, E element)\n {\n return list.addWithAssertChecking(element);\n }",
"class_method_signature": "CheckedUtil.addWithoutChecking(CheckedList<E> list, E element)",
"constructor": false,
"full_signature": "public static boolean addWitho... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_674 | {
"fields": [],
"file": "restli-common/src/test/java/com/linkedin/restli/internal/common/TestURIDecoderUtils.java",
"identifier": "TestURIDecoderUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"invalidEncodedText\")\n public void testDecodeInvalidStrings(String encoded, String expectedErrorMessage)\n {\n IllegalArgumentException exception = null;\n\n try\n {\n URIDecoderUtils.decode(encoded);\n }\n catch (IllegalArgumentException e)\n {\n excep... | {
"fields": [
{
"declarator": "HEX_TABLE = createHexTable()",
"modifier": "private static final",
"original_string": "private static final byte[] HEX_TABLE = createHexTable();",
"type": "byte[]",
"var_name": "HEX_TABLE"
}
],
"file": "restli-common/src/main/java/com/linkedin/r... | {
"body": "public static String decode(String s)\n {\n final int n = s.length();\n StringBuilder result = new StringBuilder(n);\n for (int i = 0; i < n; i++)\n {\n char c = s.charAt(i);\n if (c == '%')\n {\n int numCharsConsumed = decodeConsecutiveOctets(result, s, i);\n i +=... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_224 | {
"fields": [],
"file": "restli-tools/src/test/java/com/linkedin/restli/tools/data/TestPredicateExpressionParser.java",
"identifier": "TestPredicateExpressionParser",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expectedExceptions = RuntimeException.class)\n public void testMissingOpenParen()\n {\n PredicateExpressionParser.parse(\"com.linkedin.data.it.AlwaysFalsePredicate)\");\n }",
"class_method_signature": "TestPredicateExpressionParser.testMissingOpenParen()",
"constructor": false,
"full_sign... | {
"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_418 | {
"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 testD2ServiceUnavailable(boolean isD2Async) throws Exception\n {\n LoadBalancer loadBalancer = new TestLoadBalancer(new ConstantResponseTimeDistribution(1, TimeUnit.NANOSECONDS),\n null, new ServiceUnavailableException(\"\", \"\"));\n TestBac... | {
"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_377 | {
"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 testRegister()\n {\n reset();\n\n TestListener listener = new TestListener();\n List<String> schemes = new ArrayList<String>();\n\n schemes.add(\"http\");\n _state.register(listener);\n\n assertNull(listener.scheme);\n assertN... | {
"fields": [
{
"declarator": "_log = LoggerFactory.getLogger(SimpleLoadBalancerState.class)",
"modifier": "private static final",
"original_string": "private static final Logger _log = LoggerFactory.getLogger(SimpleLoadBalancerState.cla... | {
"body": "public void register(final SimpleLoadBalancerStateListener listener)\n {\n trace(_log, \"register listener: \", listener);\n\n _executor.execute(new PropertyEvent(\"add listener for state\")\n {\n @Override\n public void innerRun()\n {\n _listeners.add(listener);\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_232 | {
"fields": [],
"file": "restli-tools/src/test/java/com/linkedin/restli/tools/symbol/TestRuntimeSymbolTableGenerator.java",
"identifier": "TestRuntimeSymbolTableGenerator",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSymbolTableGenerator()\n {\n DataSchema schema = DataTemplateUtil.getSchema(SimpleGreeting.class);\n SymbolTableNameHandler handler = new SymbolTableNameHandler(\"Haha\", \"https://localhost:1000/service\");\n InMemorySymbolTable symbolTable = RuntimeSymbolTableGenerator.... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(RuntimeSymbolTableGenerator.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(RuntimeSymbolTableGenerator.class);",
"type": "Logger",
"var_name"... | {
"body": "static InMemorySymbolTable generate(SymbolTableNameHandler symbolTableNameHandler, Set<DataSchema> resourceSchemas)\n {\n Set<String> symbols = new HashSet<>();\n addFrameworkSymbols(symbols);\n Set<DataSchema> frameworkSchemas = new HashSet<>();\n collectFrameworkSchemas(frameworkSchemas);\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_662 | {
"fields": [],
"file": "restli-common/src/test/java/com/linkedin/restli/internal/common/TestQueryParamsDataMap.java",
"identifier": "TestQueryParamsDataMap",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMultipleSimpleKeys() throws Exception {\n String testQS = \"ids=1&ids=2&ids=bla&q=someFinder\";\n\n DataMap queryParamDataMap = queryParamsDataMap(testQS);\n Assert.assertEquals(\"someFinder\", queryParamDataMap.get(\"q\"));\n\n Object idsObj = queryParamDataMap.get(\"i... | {
"fields": [
{
"declarator": "SEGMENT_DELIMITER_PATTERN =\n Pattern.compile(Pattern.quote(PathSegment.PATH_SEPARATOR))",
"modifier": "private static final",
"original_string": "private static final Pattern SEGMENT_DELIMITER_PATTERN =\n... | {
"body": "private QueryParamsDataMap()\n {\n }",
"class_method_signature": "QueryParamsDataMap.QueryParamsDataMap()",
"constructor": true,
"full_signature": "private QueryParamsDataMap()",
"identifier": "QueryParamsDataMap",
"invocations": [],
"modifiers": "private",
"parameters": "()",
"return": ... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_398 | {
"fields": [],
"file": "d2/src/test/java/com/linkedin/d2/balancer/properties/ClientServiceConfigValidatorTest.java",
"identifier": "ClientServiceConfigValidatorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMaxResponse()\n {\n Map<String, Object> serviceSuppliedProperties = new HashMap<String, Object>();\n serviceSuppliedProperties.put(PropertyKeys.HTTP_MAX_RESPONSE_SIZE, \"1000\");\n\n Map<String, Object> clientSuppliedProperties = new HashMap<String, Object>();\n client... | {
"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_97 | {
"fields": [],
"file": "data/src/test/java/com/linkedin/data/template/TestFixedTemplate.java",
"identifier": "TestFixedTemplate",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testWrapping()\n throws InstantiationException, IllegalAccessException\n {\n String input = \"12345\";\n\n ByteString input1 = ByteString.copyAvroString(input, false);\n Fixed5 fixed1 = DataTemplateUtil.wrap(input1, Fixed5.class);\n assertSame(input1, fixed1.data());\... | {
"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": "@Override\n public ByteString data()\n {\n return _data;\n }",
"class_method_signature": "FixedTemplate.data()",
"constructor": false,
"full_signature": "@Override public ByteString data()",
"identifier": "data",
"invocations": [],
"modifiers": "@Override public",
"parameters": "()",
... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_320 | {
"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 testRequestCompressionRules(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_78 | {
"fields": [],
"file": "data/src/test/java/com/linkedin/data/schema/grammar/TestPdlParseUtils.java",
"identifier": "TestPdlParseUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testStripMargin()\n {\n String docString = PdlParseUtils.stripMargin(\n \" * The quick\\n\" +\n \" * brown fox\\n\");\n assertEquals(docString,\n \"The quick\\n\" +\n \"brown fox\");\n }",
"class_method_signature": "TestPdlParseUtils.testStripM... | {
"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 stripMargin(String schemadoc)\n {\n char marginChar = '*';\n StringBuilder buf = new StringBuilder();\n String[] schemadocByLine = schemadoc.split(System.lineSeparator());\n for (int i = 0; i < schemadocByLine.length; i++)\n {\n String lineWithoutSeparator = schema... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_635 | {
"fields": [
{
"declarator": "PSON_DATA_CODEC = new PsonDataCodec()",
"modifier": "private static final",
"original_string": "private static final PsonDataCodec PSON_DATA_CODEC = new PsonDataCodec();",
"type": "PsonDataCodec",
"var_name": "PSON_DATA_CODEC"
},
{
"declar... | {
"body": "@Test(expectedExceptions = MimeTypeParseException.class)\n public void testByteStringToDataMapWithNonParsableContentType() throws MimeTypeParseException, IOException\n {\n DataMap dataMap = createTestDataMap();\n ByteString byteString = ByteString.copy(JACKSON_DATA_CODEC.mapToBytes(dataMap));\n ... | {
"fields": [],
"file": "restli-common/src/main/java/com/linkedin/restli/internal/common/DataMapConverter.java",
"identifier": "DataMapConverter",
"interfaces": "",
"methods": [
{
"class_method_signature": "DataMapConverter.dataMapToByteString(Map<String, String> headers, DataMap dataMap)",
"c... | {
"body": "public static DataMap bytesToDataMap(Map<String, String> headers, ByteString bytes) throws MimeTypeParseException, IOException\n {\n return getContentType(headers).getCodec().readMap(bytes);\n }",
"class_method_signature": "DataMapConverter.bytesToDataMap(Map<String, String> headers, ByteString byte... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_265 | {
"fields": [
{
"declarator": "CHOOSER_PROPERTY = \"com.linkedin.data.avro.AvroAdapterChooser\"",
"modifier": "private final",
"original_string": "private final String CHOOSER_PROPERTY = \"com.linkedin.data.avro.AvroAdapterChooser\";",
"type": "String",
"var_name": "CHOOSER_PROPERTY"... | {
"body": "@Test\n public void testChooserProperty()\n {\n System.setProperty(CHOOSER_PROPERTY, TestAvroAdapterChooser.class.getName());\n AvroAdapter avroAdapter = AvroAdapterFinder.avroAdapter();\n assertEquals(avroAdapter.getClass(), TestAvroAdapterChooser.MyAvroAdapter.class);\n }",
"class_method_si... | {
"fields": [
{
"declarator": "AVRO_ADAPTER_CHOOSER_PROPERTY = \"com.linkedin.data.avro.AvroAdapterChooser\"",
"modifier": "public static final",
"original_string": "public static final String AVRO_ADAPTER_CHOOSER_PROPERTY = \"com.linkedin.data.avro.AvroAdapterChooser\";",
"type": "String"... | {
"body": "static AvroAdapter avroAdapter()\n {\n AvroAdapter avroAdapter;\n String adapterClassName = System.getProperty(AVRO_ADAPTER_PROPERTY);\n if (adapterClassName != null)\n {\n avroAdapter = newInstance(adapterClassName);\n }\n else\n {\n String chooserClassName = System.getProp... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_459 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/util/TestDataMapUtils.java",
"identifier": "TestDataMapUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void dataMapCleanUp()\n {\n DataMap originalDataMap = new DataMap(ImmutableMap.<String, Object>builder()\n .put(\"float\", 0F)\n .put(\"string\", \"str\")\n .put(\"integer\", 1)\n .put(\"long\", 2L)\n .put(\"double\", Data.NULL)\n .put(\"boolean... | {
"fields": [
{
"declarator": "CODEC = new JacksonDataCodec()",
"modifier": "private static final",
"original_string": "private static final JacksonDataCodec CODEC = new JacksonDataCodec();",
"type": "JacksonDataCodec",
"var_name": "CODEC"
},
{
"declarator": "PSON_DATA_... | {
"body": "public static void removeNulls(DataMap dataMap) {\n try\n {\n Data.traverse(dataMap, new NullRemover());\n }\n catch (IOException ioe)\n {\n throw new RuntimeException(ioe);\n }\n }",
"class_method_signature": "DataMapUtils.removeNulls(DataMap dataMap)",
"constructor": fals... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_588 | {
"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 testRequestAttachmentsResponseAttachmentsException() throws Exception\n {\n //This test verifies the server's behavior in the face of an exception. In this case the resource method\n //threw an exception AFTER setting response attachments. Additionally the resource method failed... | {
"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_422 | {
"fields": [],
"file": "d2/src/test/java/com/linkedin/d2/balancer/zkfs/ZKFSUtilTest.java",
"identifier": "ZKFSUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"servicePaths\")\n public void testZKFSUtilServicePath(String basePath, String servicePath, String resultServicePath) {\n Assert.assertEquals(ZKFSUtil.servicePath(basePath, servicePath), resultServicePath);\n }",
"class_method_signature": "ZKFSUtilTest.testZKFSUtilServicePath(S... | {
"fields": [
{
"declarator": "SERVICE_PATH = \"services\"",
"modifier": "public static final",
"original_string": "public static final String SERVICE_PATH = \"services\";",
"type": "String",
"var_name": "SERVICE_PATH"
},
{
"declarator": "CLUSTER_PATH = \"clusters\"",
... | {
"body": "public static String servicePath(String basePath)\n {\n return servicePath(basePath, SERVICE_PATH);\n }",
"class_method_signature": "ZKFSUtil.servicePath(String basePath)",
"constructor": false,
"full_signature": "public static String servicePath(String basePath)",
"identifier": "servicePath",... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_137 | {
"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 testEquality()\n {\n final GetRequest<?> equalRequest1 = Mockito.mock(GetRequest.class);\n Mockito.when(equalRequest1.getBaseUriTemplate()).thenReturn(BASE_URI_TEMPLATE);\n Mockito.when(equalRequest1.getPathKeys()).thenReturn(PATH_KEYS);\n Mockito.when(equalRequest1.getObj... | {
"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 int hashCode()\n {\n return new HashCodeBuilder()\n .append(_baseUriTemplate)\n .append(_pathKeys)\n .append(_id)\n .append(_queryParams)\n .toHashCode();\n }",
"class_method_signature": "RestliRequestUriSignature.hashCode()",
"constructor": false,
"f... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_567 | {
"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 testValidUnstructuredDataRequest(RestLiServer server,\n ProtocolVersion clientProtocolVersion,\n String headerConstant)\n throws U... | {
"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_249 | {
"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 = \"oldNewStyleDataProvider\")\n public void testOldStylePathIDL(RestliVersion version, String AssocKeysPathBuildersName, String SubBuildersName, String SubGetBuilderName) throws Exception\n {\n final String pegasusDir = moduleDir + FS + RESOURCES_DIR + FS + \"pegasus\";\n final ... | {
"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_619 | {
"fields": [],
"file": "restli-common/src/test/java/com/linkedin/restli/common/TestBatchCreateIdResponse.java",
"identifier": "TestBatchCreateIdResponse",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"provideKeys\")\n public <K> void testCreate(K[] keys)\n {\n ProtocolVersion version = AllProtocolVersions.BASELINE_PROTOCOL_VERSION;\n\n List<CreateIdStatus<K>> elements = new ArrayList<CreateIdStatus<K>>();\n elements.add(new CreateIdStatus<K>(HttpStatus.S_201_CREATED.get... | {
"fields": [
{
"declarator": "_collection",
"modifier": "private final",
"original_string": "private final List<CreateIdStatus<K>> _collection;",
"type": "List<CreateIdStatus<K>>",
"var_name": "_collection"
}
],
"file": "restli-common/src/main/java/com/linkedin/restli/common... | {
"body": "public List<CreateIdStatus<K>> getElements()\n {\n return _collection;\n }",
"class_method_signature": "BatchCreateIdResponse.getElements()",
"constructor": false,
"full_signature": "public List<CreateIdStatus<K>> getElements()",
"identifier": "getElements",
"invocations": [],
"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_54 | {
"fields": [],
"file": "data/src/test/java/com/linkedin/data/it/TestRemover.java",
"identifier": "TestRemover",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testRemoveByPredicateAtPath() 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.an... | {
"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_475 | {
"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 testRecursiveBasic() throws CloneNotSupportedException\n {\n LinkedListNode node1 = new LinkedListNode();\n node1.setIntField(1);\n\n LinkedListNode node2 = new LinkedListNode();\n node2.setIntField(2);\n node1.setNext(node2);\n\n RecordTemplate expected = node1.copy... | {
"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_530 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/response/TestCreateResponseBuilder.java",
"identifier": "TestCreateResponseBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testProjectionInBuildRestLiResponseData() throws URISyntaxException\n {\n MaskTree maskTree = new MaskTree();\n maskTree.addOperation(new PathSpec(\"fruitsField\"), MaskOperation.POSITIVE_MASK_OP);\n\n ServerResourceContext mockContext = EasyMock.createMock(ServerResourceCont... | {
"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_160 | {
"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 testSendRequest2()\n {\n when(_controller.getDisruptContext(any(String.class), any(ResourceMethod.class))).thenReturn(_disrupt);\n _client.sendRequest(_request, _context);\n verify(_underlying, times(1)).sendRequest(eq(_request), eq(_context));\n verify(_context, times(1))... | {
"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_42 | {
"fields": [],
"file": "data/src/test/java/com/linkedin/data/collections/TestCowSet.java",
"identifier": "TestCowSet",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAdd()\n {\n final CowSet<String> set = new CowSet<String>();\n\n Assert.assertEquals(set.size(), 0);\n Assert.assertFalse(set.contains(\"test\"));\n\n Assert.assertTrue(set.add(\"test\"));\n Assert.assertTrue(set.contains(\"test\"));\n Assert.assertEquals(set.siz... | {
"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 add(K k)\n {\n return _map.put(k, PRESENT) == null;\n }",
"class_method_signature": "CowSet.add(K k)",
"constructor": false,
"full_signature": "@Override public boolean add(K k)",
"identifier": "add",
"invocations": [
"put"
],
"modifiers": "@Override publi... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_463 | {
"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 testValidateRequestHeadersWithValidAcceptHeaderAndNoMatch() throws Exception\n {\n Map<String, String> headers = new HashMap<String, String>();\n headers.put(\"Accept\", \"text/html\");\n ServerResourceContext resourceContext = new ResourceContextImpl();\n try\n {\n ... | {
"fields": [
{
"declarator": "EMPTY_DATAMAP = new DataMap()",
"modifier": "private static final",
"original_string": "private static final DataMap EMPTY_DATAMAP = new DataMap();",
"type": "DataMap",
"var_name": "EMPTY_DATAMAP"
}
],
"file": "restli-server/src/main/java/com/li... | {
"body": "public static void validateRequestHeadersAndUpdateResourceContext(final Map<String, String> headers,\n final Set<String> customMimeTypesSupported,\n ServerResourceContext re... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_199 | {
"fields": [],
"file": "restli-tools/src/test/java/com/linkedin/restli/tools/data/TestPredicateExpressionParser.java",
"identifier": "TestPredicateExpressionParser",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNotNotAnd()\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 = ((... | {
"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_176 | {
"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 + \"sendRequestAndNoThrowGetResponseOptions\")\n public void testRestLiResponseExceptionFutureNoThrow(SendRequestOption sendRequestOption,\n GetResponse... | {
"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_526 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/response/TestCreateResponseBuilder.java",
"identifier": "TestCreateResponseBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCreateResponseException() throws URISyntaxException\n {\n CreateResponse createResponse = new CreateResponse(new RestLiServiceException(HttpStatus.S_400_BAD_REQUEST));\n RestRequest restRequest = new RestRequestBuilder(new URI(\"/foo\")).build();\n RestLiResponseData<?> e... | {
"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_208 | {
"fields": [],
"file": "restli-tools/src/test/java/com/linkedin/restli/tools/data/TestPredicateExpressionParser.java",
"identifier": "TestPredicateExpressionParser",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNotParenOr()\n {\n final Predicate parsed = PredicateExpressionParser.parse(\"!(com.linkedin.data.it.AlwaysTruePredicate | com.linkedin.data.it.AlwaysFalsePredicate)\");\n Assert.assertEquals(parsed.getClass(), NotPredicate.class);\n\n final Predicate intermediate = ((Not... | {
"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_658 | {
"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 testExtractionWithSlashes()\n {\n final String[] components1 = URIParamUtils.extractPathComponentsFromUriTemplate(\"/foo\");\n Assert.assertEquals(components1.length, 1);\n Assert.assertEquals(components1[0], \"foo\");\n\n final String[] components2 = URIParamUtils.extract... | {
"fields": [
{
"declarator": "_EMPTY_STRING_ARRAY = new String[0]",
"modifier": "private static final",
"original_string": "private static final String[] _EMPTY_STRING_ARRAY = new String[0];",
"type": "String[]",
"var_name": "_EMPTY_STRING_ARRAY"
},
{
"declarator": "NO... | {
"body": "public static String[] extractPathComponentsFromUriTemplate(String uriTemplate)\n {\n final String normalizedUriTemplate = NORMALIZED_URI_PATTERN.matcher(uriTemplate).replaceAll(\"\");\n final UriTemplate template = new UriTemplate(normalizedUriTemplate);\n final String uri = template.createURI(_... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_15 | {
"fields": [],
"file": "data-transform/src/test/java/com/linkedin/data/transform/TestImmutableList.java",
"identifier": "TestImmutableList",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAppend()\n {\n\n ImmutableList<String> empty = ImmutableList.empty();\n ImmutableList<String> a = empty.append(\"a\");\n ImmutableList<String> ab = a.append(\"b\");\n ImmutableList<String> abc = ab.append(\"c\");\n\n assertEquals(a.size(), 1);\n assertEquals(ab.s... | {
"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": "public ImmutableList<T> append(T element)\n {\n ArgumentUtil.notNull(element, \"element\");\n return new ImmutableList<T>(element, this);\n }",
"class_method_signature": "ImmutableList.append(T element)",
"constructor": false,
"full_signature": "public ImmutableList<T> append(T element)",
"... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_6 | {
"fields": [],
"file": "data-transform/src/test/java/com/linkedin/data/transform/TestProjectionUtil.java",
"identifier": "TestProjectionUtil",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testPositiveSinglePath()\n {\n final MaskTree filter = new MaskTree();\n filter.addOperation(new PathSpec(\"foo\", \"bar\", \"baz\"), MaskOperation.POSITIVE_MASK_OP);\n\n // ancestor nodes are considered present if matched in path\n Assert.assertTrue(ProjectionUtil.isPathP... | {
"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_434 | {
"fields": [
{
"declarator": "DEFAULT_PARTITION_ID = DefaultPartitionAccessor.DEFAULT_PARTITION_ID",
"modifier": "private static final",
"original_string": "private static final int DEFAULT_PARTITION_ID = DefaultPartitionAccessor.DEFAULT_PARTITION_ID;",
"type": "int",
"var_name": "D... | {
"body": "@Test(groups = { \"small\", \"back-end\" })\n public void testFactoryWithDistributionBased() {\n RingFactory<String> factory = new DelegatingRingFactory<>(configBuilder(\"distributionBased\", null));\n Ring<String> ring = factory.createRing(buildPointsMap(10));\n\n assertTrue(ring instanceof Dist... | {
"fields": [
{
"declarator": "POINT_BASED_CONSISTENT_HASH = \"pointBased\"",
"modifier": "public static final",
"original_string": "public static final String POINT_BASED_CONSISTENT_HASH = \"pointBased\";",
"type": "String",
"var_name": "POINT_BASED_CONSISTENT_HASH"
},
{
... | {
"body": "@Override\n public Ring<T> createRing(Map<T, Integer> pointsMap) {\n return _ringFactory.createRing(pointsMap);\n }",
"class_method_signature": "DelegatingRingFactory.createRing(Map<T, Integer> pointsMap)",
"constructor": false,
"full_signature": "@Override public Ring<T> createRing(Map<T, Integ... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_571 | {
"fields": [
{
"declarator": "DEBUG_HANDLER_RESPONSE_A = \"Response A\"",
"modifier": "private static final",
"original_string": "private static final String DEBUG_HANDLER_RESPONSE_A = \"Response A\";",
"type": "String",
"var_name": "DEBUG_HANDLER_RESPONSE_A"
},
{
"dec... | {
"body": "@Test(dataProvider = \"restOrStream\")\n public void testHandleRequestWithRestLiResponseSuccess(final RestOrStream restOrStream) throws Exception\n {\n Status status = new Status();\n status.data().put(\"test\", \"this is a test\");\n\n final StatusCollectionResource statusResource = getMockReso... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(RestLiServer.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(RestLiServer.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
... | {
"body": "@Override\n public void handleRequestWithRestLiResponse(RestRequest request, RequestContext requestContext, Callback<RestLiResponse> callback)\n {\n if (!isMultipart(request, callback))\n {\n _restRestLiServer.handleRequestWithRestLiResponse(request, requestContext, callback);\n }\n }",
... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_121 | {
"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\n public void testParseFromJarFileWithTranslatedSchemas() throws Exception\n {\n String tempDirectoryPath = _tempDir.getAbsolutePath();\n String jarFile = tempDirectoryPath + \"/testWithTranslatedSchemas.jar\";\n\n Map<String, String> jarFiles = new HashMap<>();\n\n // Add the source PD... | {
"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_156 | {
"fields": [],
"file": "restli-client/src/test/java/com/linkedin/restli/client/TestRequest.java",
"identifier": "TestRequest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"toRequestFieldsData\")\n public void testRequestPagingFieldsEqual(List<PathSpec> pathSpecs1, List<PathSpec> pathSpecs2, Map<String,String> param1, Map<String,String> param2, boolean expect)\n {\n GetRequestBuilder<Long, TestRecord> builder1 = generateDummyRequestBuilder();\n ... | {
"fields": [
{
"declarator": "SLASH_PATTERN = Pattern.compile(\"/\")",
"modifier": "private static final",
"original_string": "private static final Pattern SLASH_PATTERN = Pattern.compile(\"/\");",
"type": "Pattern",
"var_name": "SLASH_PATTERN"
},
{
"declarator": "URI_... | {
"body": "@Override\n public boolean equals(Object obj)\n {\n if (this == obj)\n {\n return true;\n }\n\n if (obj == null || getClass() != obj.getClass())\n {\n return false;\n }\n\n return areNewFieldsEqual((Request<?>) obj);\n }",
"class_method_signature": "Request.equals(Object... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_506 | {
"fields": [],
"file": "restli-server/src/test/java/com/linkedin/restli/internal/server/methods/arguments/TestArgumentBuilder.java",
"identifier": "TestArgumentBuilder",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testQueryParameterType()\n {\n String testParamKey = \"testParam\";\n String expectedTestParamValue = \"testParamValue\";\n\n ServerResourceContext mockResourceContext = EasyMock.createMock(ServerResourceContext.class);\n EasyMock.expect(mockResourceContext.hasParameter(te... | {
"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_443 | {
"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 testExecutorSchedule() throws InterruptedException {\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... | {
"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": "Map<URI, Integer> getPointsMap(int partitionId)\n {\n return _partitionLoadBalancerStateMap.get(partitionId) == null\n ? new HashMap<>()\n : _partitionLoadBalancerStateMap.get(partitionId).getPointsMap();\n }",
"class_method_signature": "StateUpdater.getPointsMap(int partitionId)",
"... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_290 | {
"fields": [
{
"declarator": "_index",
"modifier": "private",
"original_string": "private AtomicInteger _index;",
"type": "AtomicInteger",
"var_name": "_index"
},
{
"declarator": "_requestFinalizer",
"modifier": "private",
"original_string": "private TestRe... | {
"body": "@Test(dataProvider = \"throwTransportCallbackException\")\n public void testHandleStreamRequestOrdering(boolean throwTransportCallbackException)\n {\n when(_streamTransportResponse.getResponse())\n .thenReturn(_streamResponse);\n when(_streamResponse.getEntityStream())\n .thenReturn(_... | {
"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 handleStreamRequest(StreamRequest req, Map<String, String> wireAttrs,\n RequestContext requestContext, TransportCallback<StreamResponse> callback)\n {\n _transportDispatcher.handleStreamRequest(req, wireAttrs, requestContext,\n new RequestFinalizerTransportCallback<... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_62 | {
"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 testDeepCopy() throws CloneNotSupportedException\n {\n DataMap root = new DataMap();\n\n DataMap a = new DataMap();\n a.put(\"key\", \"a\");\n\n DataMap b = a.copy();\n b.put(\"key\", \"b\");\n\n root.put(\"a\", a);\n root.put(\"b\", b);\n\n DataMap copy = root... | {
"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_551 | {
"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 testCustomFilterFailsForAllRequest(MultiplexerRunMode multiplexerRunMode) throws Exception\n {\n SynchronousRequestHandler mockHandler = createMockHandler();\n MultiplexerSingletonFilter mockMuxFilter = EasyMock.createMock(Multiplexe... | {
"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_101 | {
"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 testCoerceOutputNonNumericNumberCases()\n {\n // Convert Specific Floating point string - NaN to Double\n Object object1 = DataTemplateUtil.coerceOutput(NAN, Double.class);\n assertEquals(object1, Double.NaN);\n\n // Convert Specific Floating point string - POSITIVE... | {
"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_414 | {
"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(invocationCount = 3, dataProvider = \"isD2Async\")\n public void testRequestWithHint(boolean isD2Async) throws Exception\n {\n int responseDelayNano = 100000000; //1s till response comes back\n int backupDelayNano = 50000000; // make backup request after 0.5 second\n Deque<URI> hostsReceiv... | {
"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_228 | {
"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(expectedExceptions = IllegalStateException.class)\n public void testGetRemoteSymbolTableFetchError()\n {\n RestResponseBuilder builder = new RestResponseBuilder();\n builder.setStatus(404);\n when(_client.restRequest(eq(new RestRequestBuilder(URI.create(\"https://OtherHost:100/service/symb... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(RestLiSymbolTableProvider.class.getSimpleName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(RestLiSymbolTableProvider.class.getSimpleName());",
"type"... | {
"body": "@Override\n public SymbolTable getSymbolTable(String symbolTableName)\n {\n try\n {\n SymbolTableMetadata metadata = _symbolTableNameHandler.extractMetadata(symbolTableName);\n String serverNodeUri = metadata.getServerNodeUri();\n String tableName = metadata.getSymbolTableName();\n ... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_678 | {
"fields": [],
"file": "restli-common/src/test/java/com/linkedin/restli/internal/common/TestAttachmentUtils.java",
"identifier": "TestAttachmentUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMultipleAttachments()\n {\n final MultiPartMIMEWriter.Builder builder = new MultiPartMIMEWriter.Builder();\n final List<RestLiTestAttachmentDataSource> testAttachmentDataSources = generateTestDataSources();\n\n final RestLiTestAttachmentDataSourceIterator dataSourceIterat... | {
"fields": [
{
"declarator": "RESTLI_MULTIPART_SUBTYPE = \"related\"",
"modifier": "public static final",
"original_string": "public static final String RESTLI_MULTIPART_SUBTYPE = \"related\";",
"type": "String",
"var_name": "RESTLI_MULTIPART_SUBTYPE"
}
],
"file": "restli-co... | {
"body": "public static void appendMultipleAttachmentsToBuilder(final MultiPartMIMEWriter.Builder builder,\n final RestLiDataSourceIterator restLiDataSourceIterator)\n {\n builder.appendDataSourceIterator(new MultiPartMIMEDataSourceIterator()\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_382 | {
"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 testGetClient() throws URISyntaxException\n {\n reset();\n\n URI uri = URI.create(\"http://cluster-1/test\");\n List<String> schemes = new ArrayList<String>();\n Map<Integer, PartitionData> partitionData = new HashMap<Integer, Partitio... | {
"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 TrackerClient getClient(String serviceName, URI uri)\n {\n Map<URI, TrackerClient> trackerClients = _trackerClients.get(serviceName);\n TrackerClient trackerClient = null;\n\n if (trackerClients != null)\n {\n trackerClient = trackerClients.get(uri);\n }\n else\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_35 | {
"fields": [],
"file": "data/src/test/java/com/linkedin/data/codec/symbol/TestSymbolTableMetadataExtractor.java",
"identifier": "TestSymbolTableMetadataExtractor",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testExtractTableInfoLocalTable()\n {\n SymbolTableMetadata metadata =\n new SymbolTableMetadataExtractor().extractMetadata(\"Prefix-1000\");\n Assert.assertNull(metadata.getServerNodeUri());\n Assert.assertEquals(metadata.getSymbolTableName(), \"Prefix-1000\");\n As... | {
"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_117 | {
"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 = \"inputFiles\")\n public void testParseFromJarFile(String pegasusFilename, String[] expectedSchemas) throws Exception\n {\n String tempDirectoryPath = _tempDir.getAbsolutePath();\n String jarFile = tempDirectoryPath + FS + \"test.jar\";\n\n String pegasusFile = pegasusDir + ... | {
"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_547 | {
"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 testHandleEmptyRequest(MultiplexerRunMode multiplexerRunMode) throws Exception\n {\n MultiplexedRequestHandlerImpl multiplexer = createMultiplexer(null, multiplexerRunMode);\n RestRequest request = fakeMuxRestRequest();\n FutureCa... | {
"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_402 | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ZookeeperConnectionManagerTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ZookeeperConnectionManagerTest.class);",
"type": "Logger",
"var_name"... | {
"body": "@Test\n public void testMarkDownAndUpDuringDisconnection()\n throws Exception\n {\n ZooKeeperAnnouncer announcer = getZooKeeperAnnouncer(_cluster, _uri, WEIGHT);\n\n ZooKeeperConnectionManager manager = createManager(true, announcer);\n\n ZooKeeperEphemeralStore<UriProperties> store = createA... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ZooKeeperConnectionManager.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ZooKeeperConnectionManager.class);",
"type": "Logger",
"var_name": "LOG"
... | {
"body": "public void shutdown(final Callback<None> callback)\n {\n _managerStarted = false;\n for (ZooKeeperAnnouncer server : _servers)\n {\n server.shutdown();\n }\n Callback<None> zkCloseCallback = new CallbackAdapter<None,None>(callback)\n {\n @Override\n protected None convert... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_681 | {
"fields": [
{
"declarator": "_res",
"modifier": "private",
"original_string": "private PhotoResource _res;",
"type": "PhotoResource",
"var_name": "_res"
}
],
"file": "restli-example-server/src/test/java/com/linkedin/restli/example/impl/TestPhotoResource.java",
"identifier... | {
"body": "@Test\n public void testResourceGet()\n {\n // because the test function will take arbitrary order\n // always create a photo and operate on that photo for a test function\n final Long id = createPhoto();\n\n // validate all data are correct\n final Photo p = _res.get(id);\n Assert.asse... | {
"fields": [
{
"declarator": "URN_ENTITY_TYPE = \"photo\"",
"modifier": "public final static",
"original_string": "public final static String URN_ENTITY_TYPE = \"photo\";",
"type": "String",
"var_name": "URN_ENTITY_TYPE"
},
{
"declarator": "_db",
"modifier": "@In... | {
"body": "@Override\n public Photo get(Long key)\n {\n return _db.getData().get(key);\n }",
"class_method_signature": "PhotoResource.get(Long key)",
"constructor": false,
"full_signature": "@Override public Photo get(Long key)",
"identifier": "get",
"invocations": [
"get",
"getData"
],
"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_23 | {
"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 testSchedulerRejectExecution() throws Exception\n {\n ScheduledExecutorService rejectedScheduler = EasyMock.createStrictMock(ScheduledExecutorService.class);\n EasyMock.expect(rejectedScheduler.schedule(\n EasyMock.anyObject(Runnable.class),\n EasyMock.anyLong(),\n... | {
"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_394 | {
"fields": [
{
"declarator": "HOST_OVERRIDE_LIST = \"HOST_OVERRIDE_LIST\"",
"modifier": "private static final",
"original_string": "private static final String HOST_OVERRIDE_LIST = \"HOST_OVERRIDE_LIST\";",
"type": "String",
"var_name": "HOST_OVERRIDE_LIST"
},
{
"decla... | {
"body": "@Test(groups = { \"small\", \"back-end\" })\n public void testLoadBalancerWithWait() throws URISyntaxException,\n ServiceUnavailableException,\n InterruptedException\n {\n URIRequest uriRequest = new URIRequest(\"d2://NonExistentService\");\n LoadBalancerTestState state = new LoadBalancer... | {
"fields": [
{
"declarator": "HOST_OVERRIDE_LIST = \"HOST_OVERRIDE_LIST\"",
"modifier": "private static final",
"original_string": "private static final String HOST_OVERRIDE_LIST = \"HOST_OVERRIDE_LIST\";",
"type": "String",
"var_name": "HOST_OVERRIDE_LIST"
},
{
"decla... | {
"body": "@Override\n public void getClient(Request request, RequestContext requestContext, Callback<TransportClient> clientCallback)\n {\n URI uri = request.getURI();\n debug(_log, \"get client for uri: \", uri);\n\n if (!D2_SCHEME_NAME.equalsIgnoreCase(uri.getScheme()))\n {\n throw new IllegalAr... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_510 | {
"fields": [
{
"declarator": "ERROR_MESSAGE_BATCH_KEYS_MISMATCH = \"Batch request mismatch\"",
"modifier": "private static final",
"original_string": "private static final String ERROR_MESSAGE_BATCH_KEYS_MISMATCH = \"Batch request mismatch\";",
"type": "String",
"var_name": "ERROR_M... | {
"body": "@Test(dataProvider = \"failureData\")\n public void testFailure(ProtocolVersion version, Key primaryKey, Key[] associationKeys, String requestEntity, Object[] keys, String errorMessage)\n throws Exception\n {\n Set<Object> batchKeys = new HashSet<>(Arrays.asList(keys));\n RestRequest request =... | {
"fields": [],
"file": "restli-server/src/main/java/com/linkedin/restli/internal/server/methods/arguments/BatchUpdateArgumentBuilder.java",
"identifier": "BatchUpdateArgumentBuilder",
"interfaces": "implements RestLiArgumentBuilder",
"methods": [
{
"class_method_signature": "BatchUpdateArgumentBuil... | {
"body": "@SuppressWarnings(\"unchecked\")\n @Override\n public RestLiRequestData extractRequestData(RoutingResult routingResult, DataMap dataMap)\n {\n final RestLiRequestDataImpl.Builder builder = new RestLiRequestDataImpl.Builder();\n Set<?> ids = routingResult.getContext().getPathKeys().getBatchIds();\n... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
6944525_140 | {
"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 = \"requestMethodProvider\")\n public void testIsScatterGatherNeeded(ResourceMethod requestMethod, boolean sgNeeded) throws ServiceUnavailableException\n {\n Request<?> request = mock(Request.class);\n when(request.getServiceName()).thenReturn(TEST_SERVICE);\n // service is no... | {
"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 public <T> boolean needScatterGather(Request<T> request)\n {\n if (!isSupportedScatterGatherRequest(request))\n {\n return false;\n }\n final String serviceName = request.getServiceName();\n try\n {\n return _uriMapper.needScatterGather(serviceName);\n }\n ca... | {
"created": "11/30/2012 7:37:51 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 6944525,
"size": null,
"stargazer_count": null,
"stars": 2005,
"updates": "2020-01-26T06:06:48+00:00",
"url": "https://github.com/linkedin/rest.l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.