id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
20171642_116 | {
"fields": [
{
"declarator": "GROUP_NAME = \"my_group\"",
"modifier": "private static final",
"original_string": "private static final String GROUP_NAME = \"my_group\";",
"type": "String",
"var_name": "GROUP_NAME"
},
{
"declarator": "JOB_ID = new JobId(\"foo\", \"2\", ... | {
"body": "@Test\n public void testRollingUpdateMigrateJson() throws Exception {\n when(client.rollingUpdate(anyString(), any(JobId.class), any(RolloutOptions.class)))\n .thenReturn(immediateFuture(new RollingUpdateResponse(RollingUpdateResponse.Status.OK)));\n\n when(client.deploymentGroupStatus(GROUP_... | {
"fields": [
{
"declarator": "POLL_INTERVAL_MILLIS = 1000",
"modifier": "private static final",
"original_string": "private static final long POLL_INTERVAL_MILLIS = 1000;",
"type": "long",
"var_name": "POLL_INTERVAL_MILLIS"
},
{
"declarator": "sleepFunction",
"mo... | {
"body": "@Override\n protected int runWithJob(final Namespace options, final HeliosClient client,\n final PrintStream out, final boolean json, final Job job,\n final BufferedReader stdin)\n throws ExecutionException, InterruptedException, IOException {\n ... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_59 | {
"fields": [],
"file": "helios-client/src/test/java/com/spotify/helios/common/descriptors/HealthCheckTest.java",
"identifier": "HealthCheckTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testExecHealthCheckBuilder() {\n final ExecHealthCheck healthCheck = HealthCheck.newExecHealthCheck()\n .setCommand(Collections.singletonList(\"whoami\")).build();\n assertEquals(\"cmd\", healthCheck.getCommand(), ImmutableList.of(\"whoami\"));\n }",
"class_method_signa... | {
"fields": [
{
"declarator": "EXEC = \"exec\"",
"modifier": "public static final",
"original_string": "public static final String EXEC = \"exec\";",
"type": "String",
"var_name": "EXEC"
},
{
"declarator": "HTTP = \"http\"",
"modifier": "public static final",
... | {
"body": "public static ExecHealthCheck.Builder newExecHealthCheck() {\n return ExecHealthCheck.newBuilder();\n }",
"class_method_signature": "HealthCheck.newExecHealthCheck()",
"constructor": false,
"full_signature": "public static ExecHealthCheck.Builder newExecHealthCheck()",
"identifier": "newExecHea... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_141 | {
"fields": [
{
"declarator": "NAME = \"foo-group\"",
"modifier": "private static final",
"original_string": "private static final String NAME = \"foo-group\";",
"type": "String",
"var_name": "NAME"
},
{
"declarator": "NON_EXISTENT_NAME = \"bar-group\"",
"modifier... | {
"body": "@Test\n public void testDeploymentGroupInspectCommand() throws Exception {\n when(options.getString(\"name\")).thenReturn(NAME);\n final int ret = command.run(options, client, out, false, null);\n\n assertEquals(0, ret);\n final String output = baos.toString();\n assertThat(output, contains... | {
"fields": [
{
"declarator": "nameArg",
"modifier": "private final",
"original_string": "private final Argument nameArg;",
"type": "Argument",
"var_name": "nameArg"
}
],
"file": "helios-tools/src/main/java/com/spotify/helios/cli/command/DeploymentGroupInspectCommand.java",
... | {
"body": "public DeploymentGroupInspectCommand(final Subparser parser) {\n super(parser);\n\n parser.help(\"inspect a deployment group\");\n\n nameArg = parser.addArgument(\"name\")\n .required(true)\n .help(\"Deployment group name\");\n }",
"class_method_signature": "DeploymentGroupInspect... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_140 | {
"fields": [
{
"declarator": "GROUP_NAME = \"foo-group\"",
"modifier": "private static final",
"original_string": "private static final String GROUP_NAME = \"foo-group\";",
"type": "String",
"var_name": "GROUP_NAME"
},
{
"declarator": "HOST_SELECTORS_ARG = ImmutableLis... | {
"body": "@Test\n public void testCreateConflictingDeploymentGroup() throws Exception {\n mockCreateResponse(CreateDeploymentGroupResponse.Status.CREATED);\n assertEquals(0, command.run(options, client, out, false, null));\n\n mockCreateResponse(CreateDeploymentGroupResponse.Status.CONFLICT);\n assertEq... | {
"fields": [
{
"declarator": "nameArg",
"modifier": "private final",
"original_string": "private final Argument nameArg;",
"type": "Argument",
"var_name": "nameArg"
},
{
"declarator": "hostSelectorsArg",
"modifier": "private final",
"original_string": "priv... | {
"body": "@Override\n int run(final Namespace options, final HeliosClient client, final PrintStream out,\n final boolean json, final BufferedReader stdin)\n throws ExecutionException, InterruptedException, IOException {\n final String name = options.getString(nameArg.getDest());\n final List<Hos... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_58 | {
"fields": [],
"file": "helios-client/src/test/java/com/spotify/helios/common/descriptors/HealthCheckTest.java",
"identifier": "HealthCheckTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testTcpWithoutPort() {\n HealthCheck.newTcpHealthCheck().build();\n }",
"class_method_signature": "HealthCheckTest.testTcpWithoutPort()",
"constructor": false,
"full_signature": "@Test(expected = IllegalArgumentException.class) publi... | {
"fields": [
{
"declarator": "EXEC = \"exec\"",
"modifier": "public static final",
"original_string": "public static final String EXEC = \"exec\";",
"type": "String",
"var_name": "EXEC"
},
{
"declarator": "HTTP = \"http\"",
"modifier": "public static final",
... | {
"body": "public static TcpHealthCheck.Builder newTcpHealthCheck() {\n return TcpHealthCheck.newBuilder();\n }",
"class_method_signature": "HealthCheck.newTcpHealthCheck()",
"constructor": false,
"full_signature": "public static TcpHealthCheck.Builder newTcpHealthCheck()",
"identifier": "newTcpHealthChec... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_117 | {
"fields": [
{
"declarator": "GROUP_NAME = \"my_group\"",
"modifier": "private static final",
"original_string": "private static final String GROUP_NAME = \"my_group\";",
"type": "String",
"var_name": "GROUP_NAME"
},
{
"declarator": "JOB_ID = new JobId(\"foo\", \"2\", ... | {
"body": "@Test\n public void testRollingUpdateOverlapJson() throws Exception {\n when(client.rollingUpdate(anyString(), any(JobId.class), any(RolloutOptions.class)))\n .thenReturn(immediateFuture(new RollingUpdateResponse(RollingUpdateResponse.Status.OK)));\n\n when(client.deploymentGroupStatus(GROUP_... | {
"fields": [
{
"declarator": "POLL_INTERVAL_MILLIS = 1000",
"modifier": "private static final",
"original_string": "private static final long POLL_INTERVAL_MILLIS = 1000;",
"type": "long",
"var_name": "POLL_INTERVAL_MILLIS"
},
{
"declarator": "sleepFunction",
"mo... | {
"body": "@Override\n protected int runWithJob(final Namespace options, final HeliosClient client,\n final PrintStream out, final boolean json, final Job job,\n final BufferedReader stdin)\n throws ExecutionException, InterruptedException, IOException {\n ... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_101 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
{... | {
"body": "@Test\n public void testParsePortMappingGoodSpecs() throws Exception {\n for (final TestData d : GOOD_SPECS) {\n final PortMappingWithName mappingWithName = PortMappingParser.parsePortMapping(d.getSpec());\n final PortMapping portMapping = mappingWithName.portMapping();\n assertThat(mapp... | {
"fields": [
{
"declarator": "PATTERN =\n compile(\"(?<n>[_\\\\-\\\\w]+)=((?<ip>([0-9]{1,3}.){3}[0-9]{1,3}):)\"\n + \"?(?<i>\\\\d+)(:(?<e>\\\\d+))?(/(?<p>\\\\w+))?\")",
"modifier": "private static final",
"original_string": "private static final Pattern PATTERN =\n compil... | {
"body": "static PortMappingWithName parsePortMapping(final String portSpec) {\n final Matcher matcher = PATTERN.matcher(portSpec);\n if (!matcher.matches()) {\n throw new IllegalArgumentException(\"Bad port mapping: \" + portSpec);\n }\n\n final String name = matcher.group(\"n\");\n final String... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_228 | {
"fields": [
{
"declarator": "masterModel",
"modifier": "@Mock private",
"original_string": "@Mock private MasterModel masterModel;",
"type": "MasterModel",
"var_name": "masterModel"
},
{
"declarator": "mockClock",
"modifier": "@Mock private",
"original_str... | {
"body": "@Test\n public void testExpiredJobReaper() throws Exception {\n when(mockClock.now()).thenReturn(new Instant(CURRENT_TS));\n when(masterModel.getJobs()).thenReturn(JOBS);\n\n when(masterModel.getJobStatus(any(JobId.class)))\n .then(new Answer<JobStatus>() {\n @Override\n ... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(ExpiredJobReaper.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(ExpiredJobReaper.class);",
"type": "Logger",
"var_name": "log"
},
{
"... | {
"body": "private ExpiredJobReaper(final Builder builder) {\n this.masterModel = builder.masterModel;\n this.interval = builder.interval;\n this.timeUnit = checkNotNull(builder.timeUnit);\n this.clock = checkNotNull(builder.clock);\n }",
"class_method_signature": "ExpiredJobReaper.ExpiredJobReaper(fin... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_19 | {
"fields": [
{
"declarator": "HEALTH_CHECK =\n HealthCheck.newHttpHealthCheck().setPath(\"/\").setPort(\"1\").build()",
"modifier": "private static final",
"original_string": "private static final HealthCheck HEALTH_CHECK =\n HealthCheck.newHttpHealthCheck().setPath(\"/\").setPort(\"1... | {
"body": "@Test\n public void testInvalidVolumesFail() {\n final Job j = Job.newBuilder().setName(\"foo\").setVersion(\"1\").setImage(\"foobar\").build();\n assertEquals(newHashSet(\"Invalid volume path: /\"),\n validator.validate(j.toBuilder().addVolume(\"/\").build()));\n\n assertEquals(newHashSet... | {
"fields": [
{
"declarator": "NAME_VERSION_PATTERN = Pattern.compile(\"[0-9a-zA-Z-_.]+\")",
"modifier": "private static final",
"original_string": "private static final Pattern NAME_VERSION_PATTERN = Pattern.compile(\"[0-9a-zA-Z-_.]+\");",
"type": "Pattern",
"var_name": "NAME_VERSIO... | {
"body": "public Set<String> validate(final Job job) {\n final Set<String> errors = Sets.newHashSet();\n\n errors.addAll(validateJobId(job));\n errors.addAll(validateJobImage(job.getImage()));\n errors.addAll(validateJobHostName(job.getHostname()));\n\n // Check that there's not external port collisio... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_156 | {
"fields": [
{
"declarator": "client = mock(ZooKeeperClient.class)",
"modifier": "private final",
"original_string": "private final ZooKeeperClient client = mock(ZooKeeperClient.class);",
"type": "ZooKeeperClient",
"var_name": "client"
},
{
"declarator": "agentName = \... | {
"body": "@Test\n public void newRegistration() throws Exception {\n // stat = null means path does not exist\n when(client.exists(idPath)).thenReturn(null);\n when(client.stat(hostPath)).thenReturn(null);\n\n final boolean success = registrar.tryToRegister(client);\n assertTrue(success);\n\n // v... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(AgentZooKeeperRegistrar.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(AgentZooKeeperRegistrar.class);",
"type": "Logger",
"var_name": "log"
},... | {
"body": "@Override\n public boolean tryToRegister(ZooKeeperClient client)\n throws KeeperException, HostNotFoundException {\n final String idPath = Paths.configHostId(name);\n final String hostInfoPath = Paths.statusHostInfo(name);\n\n final Stat stat = client.exists(idPath);\n if (stat == null) {... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_35 | {
"fields": [],
"file": "helios-client/src/test/java/com/spotify/helios/common/descriptors/JobTest.java",
"identifier": "JobTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void verifyCanParseJobWithMissingEnv() throws Exception {\n final Job job = Job.newBuilder()\n .setCommand(asList(\"foo\", \"bar\"))\n .setImage(\"foobar:4711\")\n .setName(\"foozbarz\")\n .setVersion(\"17\")\n .build();\n\n removeFieldAndParse(job, ... | {
"fields": [
{
"declarator": "EMPTY_ENV = emptyMap()",
"modifier": "public static final",
"original_string": "public static final Map<String, String> EMPTY_ENV = emptyMap();",
"type": "Map<String, String>",
"var_name": "EMPTY_ENV"
},
{
"declarator": "EMPTY_RESOURCES = ... | {
"body": "public static Builder newBuilder() {\n return new Builder();\n }",
"class_method_signature": "Job.newBuilder()",
"constructor": false,
"full_signature": "public static Builder newBuilder()",
"identifier": "newBuilder",
"invocations": [],
"modifiers": "public static",
"parameters": "()",
... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_204 | {
"fields": [
{
"declarator": "ffwd = mock(FastForward.class)",
"modifier": "private final",
"original_string": "private final FastForward ffwd = mock(FastForward.class);",
"type": "FastForward",
"var_name": "ffwd"
},
{
"declarator": "metricRegistry = new MetricRegistry... | {
"body": "@Test\n public void testTimer() throws Exception {\n metricRegistry.timer(\"blah-timer\");\n\n reporter.reportOnce();\n\n verifyHistogramStats(\"blah-timer\", \"timer\");\n verifyMeterStats(\"blah-timer\", \"timer\");\n }",
"class_method_signature": "FastForwardReporterTest.testTimer()",
... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(FastForwardReporter.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(FastForwardReporter.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "@VisibleForTesting\n void reportOnce() {\n\n // resolve the additional attributes once per report\n additionalAttributes = additionalAttributesSupplier.get();\n if (additionalAttributes == null) {\n additionalAttributes = Collections.emptyMap();\n }\n\n metricRegistry.getGauges().forEa... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_195 | {
"fields": [
{
"declarator": "zkClient",
"modifier": "@Mock private",
"original_string": "@Mock private ZooKeeperClient zkClient;",
"type": "ZooKeeperClient",
"var_name": "zkClient"
},
{
"declarator": "connectionStateListenerListenable",
"modifier": "@Mock privat... | {
"body": "@Test\n public void testShutdown() throws Exception {\n final ZooKeeperRegistrar zooKeeperRegistrar = createStubRegistrar(true);\n\n final ZooKeeperRegistrarService init = ZooKeeperRegistrarService.newBuilder()\n .setZooKeeperClient(zkClient)\n .setZooKeeperRegistrar(zooKeeperRegistrar... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(ZooKeeperRegistrarService.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(ZooKeeperRegistrarService.class);",
"type": "Logger",
"var_name": "log"
... | {
"body": "@Override\n protected void shutDown() throws Exception {\n reactor.stopAsync().awaitTerminated();\n zooKeeperRegistrar.shutDown();\n }",
"class_method_signature": "ZooKeeperRegistrarService.shutDown()",
"constructor": false,
"full_signature": "@Override protected void shutDown()",
"identifi... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_62 | {
"fields": [],
"file": "helios-client/src/test/java/com/spotify/helios/common/descriptors/JobIdTest.java",
"identifier": "JobIdTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testJsonSerialization() throws IOException {\n final String expectedJson = \"\\\"foo:17:deadbeef\\\"\";\n\n final JobId jobId = JobId.newBuilder()\n .setName(\"foo\")\n .setVersion(\"17\")\n .setHash(\"deadbeef\")\n .build();\n\n final String json =... | {
"fields": [
{
"declarator": "name",
"modifier": "private final",
"original_string": "private final String name;",
"type": "String",
"var_name": "name"
},
{
"declarator": "version",
"modifier": "private final",
"original_string": "private final String versi... | {
"body": "public static Builder newBuilder() {\n return new Builder();\n }",
"class_method_signature": "JobId.newBuilder()",
"constructor": false,
"full_signature": "public static Builder newBuilder()",
"identifier": "newBuilder",
"invocations": [],
"modifiers": "public static",
"parameters": "()",... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_183 | {
"fields": [
{
"declarator": "MANUAL_DEPLOYMENT_GROUP = DeploymentGroup.newBuilder()\n .setName(\"my_group\")\n .setRolloutOptions(RolloutOptions.getDefault())\n .setRollingUpdateReason(MANUAL)\n .build()",
"modifier": "private static final",
"original_string": "private stat... | {
"body": "@Test\n public void testStartHostsChanged() throws Exception {\n // Create a DeploymentGroupTasks object with some rolloutTasks.\n final ArrayList<RolloutTask> rolloutTasks = Lists.newArrayList(\n RolloutTask.of(RolloutTask.Action.UNDEPLOY_OLD_JOBS, \"host1\"),\n RolloutTask.of(Rollout... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(RollingUpdateOpFactory.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(RollingUpdateOpFactory.class);",
"type": "Logger",
"var_name": "log"
},
... | {
"body": "public RollingUpdateOp start(final DeploymentGroup deploymentGroup,\n final ZooKeeperClient client) throws KeeperException {\n client.ensurePath(Paths.statusDeploymentGroupTasks());\n\n final List<ZooKeeperOperation> ops = Lists.newArrayList();\n final List<Map<String... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_74 | {
"fields": [
{
"declarator": "delegate = mock(HostnameVerifier.class)",
"modifier": "private final",
"original_string": "private final HostnameVerifier delegate = mock(HostnameVerifier.class);",
"type": "HostnameVerifier",
"var_name": "delegate"
},
{
"declarator": "ssl... | {
"body": "@Test\n public void testHostnameVerificationEnabled() {\n final String hostname = \"example.com\";\n\n final HostnameVerifierProvider provider = new HostnameVerifierProvider(true, delegate);\n final HostnameVerifier verifier = provider.verifierFor(hostname);\n\n // verify that the returned pro... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(HostnameVerifierProvider.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(HostnameVerifierProvider.class);",
"type": "Logger",
"var_name": "log"
... | {
"body": "public HostnameVerifier verifierFor(String hostname) {\n // java 8 will make all these lines for the anon classes go poof\n\n if (!hostnameVerificationEnabled) {\n log.debug(\"hostname verification disabled\");\n return new HostnameVerifier() {\n @Override\n public boolean ver... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_23 | {
"fields": [
{
"declarator": "HEALTH_CHECK =\n HealthCheck.newHttpHealthCheck().setPath(\"/\").setPort(\"1\").build()",
"modifier": "private static final",
"original_string": "private static final HealthCheck HEALTH_CHECK =\n HealthCheck.newHttpHealthCheck().setPath(\"/\").setPort(\"1... | {
"body": "@Test\n public void testValidNetworkModesPass() {\n Job job = Job.newBuilder()\n .setName(\"foo\")\n .setVersion(\"1\")\n .setImage(\"foobar\")\n .setNetworkMode(\"bridge\")\n .build();\n\n assertEquals(0, validator.validate(job).size());\n\n job = Job.newBuilde... | {
"fields": [
{
"declarator": "NAME_VERSION_PATTERN = Pattern.compile(\"[0-9a-zA-Z-_.]+\")",
"modifier": "private static final",
"original_string": "private static final Pattern NAME_VERSION_PATTERN = Pattern.compile(\"[0-9a-zA-Z-_.]+\");",
"type": "Pattern",
"var_name": "NAME_VERSIO... | {
"body": "public Set<String> validate(final Job job) {\n final Set<String> errors = Sets.newHashSet();\n\n errors.addAll(validateJobId(job));\n errors.addAll(validateJobImage(job.getImage()));\n errors.addAll(validateJobHostName(job.getHostname()));\n\n // Check that there's not external port collisio... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_212 | {
"fields": [
{
"declarator": "ROLE_SELECTOR = HostSelector.parse(\"role=my_role\")",
"modifier": "private static final",
"original_string": "private static final HostSelector ROLE_SELECTOR = HostSelector.parse(\"role=my_role\");",
"type": "HostSelector",
"var_name": "ROLE_SELECTOR"
... | {
"body": "@Test\n public void testRemoveDeploymentGroup() throws Exception {\n final Response response = resource.removeDeploymentGroup(\"foo\");\n assertEquals(Response.Status.OK.getStatusCode(), response.getStatus());\n assertEquals(new RemoveDeploymentGroupResponse(\n RemoveDeploymentGroupRespons... | {
"fields": [
{
"declarator": "model",
"modifier": "private final",
"original_string": "private final MasterModel model;",
"type": "MasterModel",
"var_name": "model"
},
{
"declarator": "CREATED_RESPONSE =\n new CreateDeploymentGroupResponse(CreateDeploymentGroupRes... | {
"body": "@DELETE\n @Path(\"/{name}\")\n @Produces(APPLICATION_JSON)\n @Timed\n @ExceptionMetered\n public Response removeDeploymentGroup(@PathParam(\"name\") @Valid final String name) {\n try {\n model.removeDeploymentGroup(name);\n return Response.ok(new RemoveDeploymentGroupResponse(\n ... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_6 | {
"fields": [
{
"declarator": "HEALTH_CHECK =\n HealthCheck.newHttpHealthCheck().setPath(\"/\").setPort(\"1\").build()",
"modifier": "private static final",
"original_string": "private static final HealthCheck HEALTH_CHECK =\n HealthCheck.newHttpHealthCheck().setPath(\"/\").setPort(\"1... | {
"body": "@Test\n public void testValidJobPasses() {\n assertThat(validator.validate(VALID_JOB), is(empty()));\n }",
"class_method_signature": "JobValidatorTest.testValidJobPasses()",
"constructor": false,
"full_signature": "@Test public void testValidJobPasses()",
"identifier": "testValidJobPasses",
... | {
"fields": [
{
"declarator": "NAME_VERSION_PATTERN = Pattern.compile(\"[0-9a-zA-Z-_.]+\")",
"modifier": "private static final",
"original_string": "private static final Pattern NAME_VERSION_PATTERN = Pattern.compile(\"[0-9a-zA-Z-_.]+\");",
"type": "Pattern",
"var_name": "NAME_VERSIO... | {
"body": "public Set<String> validate(final Job job) {\n final Set<String> errors = Sets.newHashSet();\n\n errors.addAll(validateJobId(job));\n errors.addAll(validateJobImage(job.getImage()));\n errors.addAll(validateJobHostName(job.getHostname()));\n\n // Check that there's not external port collisio... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_54 | {
"fields": [],
"file": "helios-client/src/test/java/com/spotify/helios/common/descriptors/HealthCheckTest.java",
"identifier": "HealthCheckTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testHttpHealthCheckBuilder() {\n final HttpHealthCheck.Builder builder = HealthCheck.newHttpHealthCheck();\n\n // Input to setXXX\n final String setPort = \"http-admin\";\n final String setPath = \"/healthcheck\";\n\n // Check setXXX methods\n builder.setPort(setPort)... | {
"fields": [
{
"declarator": "EXEC = \"exec\"",
"modifier": "public static final",
"original_string": "public static final String EXEC = \"exec\";",
"type": "String",
"var_name": "EXEC"
},
{
"declarator": "HTTP = \"http\"",
"modifier": "public static final",
... | {
"body": "public static HttpHealthCheck.Builder newHttpHealthCheck() {\n return HttpHealthCheck.newBuilder();\n }",
"class_method_signature": "HealthCheck.newHttpHealthCheck()",
"constructor": false,
"full_signature": "public static HttpHealthCheck.Builder newHttpHealthCheck()",
"identifier": "newHttpHea... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_232 | {
"fields": [
{
"declarator": "registry",
"modifier": "@Mock",
"original_string": "@Mock\n HealthCheckRegistry registry;",
"type": "HealthCheckRegistry",
"var_name": "registry"
}
],
"file": "helios-services/src/test/java/com/spotify/helios/master/metrics/HealthCheckGaugeTest... | {
"body": "@Test\n public void testUnhealthy() throws Exception {\n when(registry.runHealthCheck(anyString())).thenReturn(HealthCheck.Result.unhealthy(\"meh\"));\n final HealthCheckGauge gauge = new HealthCheckGauge(registry, \"foo\");\n assertThat(gauge.getValue(), equalTo(0));\n }",
"class_method_signa... | {
"fields": [
{
"declarator": "registry",
"modifier": "private final",
"original_string": "private final HealthCheckRegistry registry;",
"type": "HealthCheckRegistry",
"var_name": "registry"
},
{
"declarator": "name",
"modifier": "private final",
"original_s... | {
"body": "@Override\n public Integer getValue() {\n final HealthCheck.Result result = registry.runHealthCheck(name);\n return result.isHealthy() ? 1 : 0;\n }",
"class_method_signature": "HealthCheckGauge.getValue()",
"constructor": false,
"full_signature": "@Override public Integer getValue()",
"iden... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_224 | {
"fields": [
{
"declarator": "NO_SELECTOR_ARG = Collections.emptyList()",
"modifier": "private static final",
"original_string": "private static final List<String> NO_SELECTOR_ARG = Collections.emptyList();",
"type": "List<String>",
"var_name": "NO_SELECTOR_ARG"
},
{
"... | {
"body": "@Test\n public void listHostsSelectorFilter() {\n assertThat(resource.list(null, ImmutableList.of(\"site=foo\")), equalTo(hosts));\n\n assertThat(resource.list(null, ImmutableList.of(\"site=bar\")), empty());\n assertThat(resource.list(null, ImmutableList.of(\"site!=foo\")), empty());\n\n asse... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(HostsResource.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(HostsResource.class);",
"type": "Logger",
"var_name": "log"
},
{
"declar... | {
"body": "@GET\n @Produces(APPLICATION_JSON)\n @Timed\n @ExceptionMetered\n public List<String> list(@QueryParam(\"namePattern\") final String namePattern,\n @QueryParam(\"selector\") final List<String> hostSelectors) {\n\n List<String> hosts = namePattern == null ? model.listHosts()... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_15 | {
"fields": [
{
"declarator": "HEALTH_CHECK =\n HealthCheck.newHttpHealthCheck().setPath(\"/\").setPort(\"1\").build()",
"modifier": "private static final",
"original_string": "private static final HealthCheck HEALTH_CHECK =\n HealthCheck.newHttpHealthCheck().setPath(\"/\").setPort(\"1... | {
"body": "@Test\n public void testInvalidNamesFail() throws Exception {\n final Job.Builder b = Job.newBuilder().setVersion(\"1\").setImage(\"foo\");\n assertEquals(newHashSet(\"Job name was not specified.\",\n \"Job hash was not specified in job id [null:1].\"),\n validator.validate(b.build()))... | {
"fields": [
{
"declarator": "NAME_VERSION_PATTERN = Pattern.compile(\"[0-9a-zA-Z-_.]+\")",
"modifier": "private static final",
"original_string": "private static final Pattern NAME_VERSION_PATTERN = Pattern.compile(\"[0-9a-zA-Z-_.]+\");",
"type": "Pattern",
"var_name": "NAME_VERSIO... | {
"body": "public Set<String> validate(final Job job) {\n final Set<String> errors = Sets.newHashSet();\n\n errors.addAll(validateJobId(job));\n errors.addAll(validateJobImage(job.getImage()));\n errors.addAll(validateJobHostName(job.getHostname()));\n\n // Check that there's not external port collisio... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_42 | {
"fields": [],
"file": "helios-client/src/test/java/com/spotify/helios/common/descriptors/HostSelectorTest.java",
"identifier": "HostSelectorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testInOperatorEquality() {\n assertEquals(\n HostSelector.parse(\"a in (foo,bar)\"),\n HostSelector.parse(\"a in (foo, bar)\")\n );\n\n assertEquals(\n HostSelector.parse(\"a in (foo,bar)\"),\n HostSelector.parse(\"a in (bar,foo)\")\n );\n\n a... | {
"fields": [
{
"declarator": "IN_BIPREDICATE =\n new BiPredicate<String, Object>() {\n @Override\n public boolean test(final String a, final Object b) {\n @SuppressWarnings(\"unchecked\") final Iterable<String> iterable = (Iterable<String>) b;\n return Iterables.contain... | {
"body": "public static HostSelector parse(final String str) {\n checkNotNull(str);\n\n final Matcher matcher = PATTERN.matcher(str);\n if (matcher.matches()) {\n final String label = matcher.group(1);\n final String opStr = matcher.group(2);\n final String value = matcher.group(3);\n\n ... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_39 | {
"fields": [],
"file": "helios-client/src/test/java/com/spotify/helios/common/descriptors/HostSelectorTest.java",
"identifier": "HostSelectorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParseNotEquals() {\n assertEquals(new HostSelector(\"A\", HostSelector.Operator.NOT_EQUALS, \"B\"),\n HostSelector.parse(\"A!=B\"));\n assertEquals(new HostSelector(\"A\", HostSelector.Operator.NOT_EQUALS, \"B\"),\n HostSelector.parse(\"A != B\"));\n assertEq... | {
"fields": [
{
"declarator": "IN_BIPREDICATE =\n new BiPredicate<String, Object>() {\n @Override\n public boolean test(final String a, final Object b) {\n @SuppressWarnings(\"unchecked\") final Iterable<String> iterable = (Iterable<String>) b;\n return Iterables.contain... | {
"body": "public static HostSelector parse(final String str) {\n checkNotNull(str);\n\n final Matcher matcher = PATTERN.matcher(str);\n if (matcher.matches()) {\n final String label = matcher.group(1);\n final String opStr = matcher.group(2);\n final String value = matcher.group(3);\n\n ... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_208 | {
"fields": [],
"file": "helios-services/src/test/java/com/spotify/helios/servicescommon/KafkaClientProviderTest.java",
"identifier": "KafkaClientProviderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testReturnsProvider() {\n // the actual host:port used in the test does not need to be an actual Kafka server\n final ImmutableList<String> hosts = ImmutableList.of(\"localhost:2181\");\n final KafkaClientProvider provider = new KafkaClientProvider(hosts);\n\n assertTrue(\"... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(KafkaClientProvider.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(KafkaClientProvider.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "public Optional<KafkaProducer<String, byte[]>> getDefaultProducer() {\n return getProducer(new StringSerializer(), new ByteArraySerializer());\n }",
"class_method_signature": "KafkaClientProvider.getDefaultProducer()",
"constructor": false,
"full_signature": "public Optional<KafkaProducer<String,... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_121 | {
"fields": [
{
"declarator": "GROUP_NAME = \"my_group\"",
"modifier": "private static final",
"original_string": "private static final String GROUP_NAME = \"my_group\";",
"type": "String",
"var_name": "GROUP_NAME"
},
{
"declarator": "JOB_ID = new JobId(\"foo\", \"2\", ... | {
"body": "@Test\n public void testRollingUpdateSuccessOutput() throws Exception {\n when(client.rollingUpdate(anyString(), any(JobId.class), any(RolloutOptions.class)))\n .thenReturn(immediateFuture(new RollingUpdateResponse(RollingUpdateResponse.Status.OK)));\n\n when(client.deploymentGroupStatus(GROU... | {
"fields": [
{
"declarator": "POLL_INTERVAL_MILLIS = 1000",
"modifier": "private static final",
"original_string": "private static final long POLL_INTERVAL_MILLIS = 1000;",
"type": "long",
"var_name": "POLL_INTERVAL_MILLIS"
},
{
"declarator": "sleepFunction",
"mo... | {
"body": "@Override\n protected int runWithJob(final Namespace options, final HeliosClient client,\n final PrintStream out, final boolean json, final Job job,\n final BufferedReader stdin)\n throws ExecutionException, InterruptedException, IOException {\n ... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_81 | {
"fields": [
{
"declarator": "USER = \"user\"",
"modifier": "private static final",
"original_string": "private static final String USER = \"user\";",
"type": "String",
"var_name": "USER"
},
{
"declarator": "CERTIFICATE_PATH = Paths.get(getResource(\"UIDCACert.pem\").g... | {
"body": "@Test\n public void testTwoIdentities_ResponseIsUnauthorized() throws Exception {\n\n final AgentProxy proxy = mock(AgentProxy.class);\n final Identity id1 = mockIdentity();\n final Identity id2 = mockIdentity();\n\n final AuthenticatingHttpConnector authConnector =\n createAuthenticati... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(AuthenticatingHttpConnector.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(AuthenticatingHttpConnector.class);",
"type": "Logger",
"var_name": "log... | {
"body": "@Override\n public HttpURLConnection connect(final URI uri, final String method, final byte[] entity,\n final Map<String, List<String>> headers) throws HeliosException {\n final Endpoint endpoint = endpointIterator.next();\n\n // convert the URI whose hostname porti... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_176 | {
"fields": [
{
"declarator": "TIMESTAMP = 8675309L",
"modifier": "private static final",
"original_string": "private static final long TIMESTAMP = 8675309L;",
"type": "long",
"var_name": "TIMESTAMP"
},
{
"declarator": "HOSTNAME = \"hostname\"",
"modifier": "priva... | {
"body": "@Test\n public void testSimpleWorkage() throws Exception {\n writer.saveHistoryItem(TASK_STATUS, TIMESTAMP);\n\n final TaskStatusEvent historyItem = Iterables.getOnlyElement(awaitHistoryItems());\n assertEquals(JOB_ID, historyItem.getStatus().getJob().getId());\n }",
"class_method_signature": ... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(TaskHistoryWriter.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(TaskHistoryWriter.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "public void saveHistoryItem(final TaskStatus status) throws InterruptedException {\n saveHistoryItem(status, System.currentTimeMillis());\n }",
"class_method_signature": "TaskHistoryWriter.saveHistoryItem(final TaskStatus status)",
"constructor": false,
"full_signature": "public void saveHistoryI... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_199 | {
"fields": [
{
"declarator": "temporaryFolder = new TemporaryFolder()",
"modifier": "@Rule public final",
"original_string": "@Rule public final TemporaryFolder temporaryFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "temporaryFolder"
}
],
"file": "... | {
"body": "@Test\n public void testFileNotFound() throws Exception {\n assertEquals(\"\", ResolverConfReader.getDomainFromResolverConf(\n \"/this_file_really-ShoUldnt=exist\"));\n }",
"class_method_signature": "ResolverConfReaderTest.testFileNotFound()",
"constructor": false,
"full_signature": "@Tes... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(ResolverConfReader.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(ResolverConfReader.class);",
"type": "Logger",
"var_name": "log"
}
],
"fi... | {
"body": "public static String getDomainFromResolverConf(final String file) {\n try (final InputStream in = new FileInputStream(file)) {\n final InputStreamReader isr = new InputStreamReader(in);\n try (final BufferedReader br = new BufferedReader(isr)) {\n String line;\n while ((line = br... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_78 | {
"fields": [
{
"declarator": "USER = \"user\"",
"modifier": "private static final",
"original_string": "private static final String USER = \"user\";",
"type": "String",
"var_name": "USER"
},
{
"declarator": "CERTIFICATE_PATH = Paths.get(getResource(\"UIDCACert.pem\").g... | {
"body": "@Test\n public void testCertFile_ResponseIsOk() throws Exception {\n final AuthenticatingHttpConnector authConnector = createAuthenticatingConnectorWithCertFile();\n\n final String path = \"/foo/bar\";\n\n final HttpsURLConnection connection = mock(HttpsURLConnection.class);\n when(connector.c... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(AuthenticatingHttpConnector.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(AuthenticatingHttpConnector.class);",
"type": "Logger",
"var_name": "log... | {
"body": "@Override\n public HttpURLConnection connect(final URI uri, final String method, final byte[] entity,\n final Map<String, List<String>> headers) throws HeliosException {\n final Endpoint endpoint = endpointIterator.next();\n\n // convert the URI whose hostname porti... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_97 | {
"fields": [
{
"declarator": "temporaryFolder = new TemporaryFolder()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final TemporaryFolder temporaryFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "temporaryFolder"
},
{
... | {
"body": "@Test\n public void testInsecureHttpsEnable() throws Exception {\n final CliParser parser = new CliParser(toArray(singleEndpointArgs, \"--insecure\"));\n\n assertTrue(parser.getNamespace().getBoolean(\"insecure\"));\n }",
"class_method_signature": "CliParserTest.testInsecureHttpsEnable()",
"con... | {
"fields": [
{
"declarator": "NAME_AND_VERSION = \"Spotify Helios CLI \" + Version.POM_VERSION",
"modifier": "private static final",
"original_string": "private static final String NAME_AND_VERSION = \"Spotify Helios CLI \" + Version.POM_VERSION;",
"type": "String",
"var_name": "NAM... | {
"body": "public Namespace getNamespace() {\n return options;\n }",
"class_method_signature": "CliParser.getNamespace()",
"constructor": false,
"full_signature": "public Namespace getNamespace()",
"identifier": "getNamespace",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return"... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_160 | {
"fields": [
{
"declarator": "executor = Executors.newCachedThreadPool()",
"modifier": "private final",
"original_string": "private final ExecutorService executor = Executors.newCachedThreadPool();",
"type": "ExecutorService",
"var_name": "executor"
},
{
"declarator": ... | {
"body": "@Test\n public void verifySupervisorRestartsExitedContainer() throws Exception {\n final String containerId1 = \"deadbeef1\";\n final String containerId2 = \"deadbeef2\";\n\n final ContainerCreation createResponse1 = ContainerCreation.builder().id(containerId1).build();\n final ContainerCreati... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(Supervisor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(Supervisor.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator":... | {
"body": "@SuppressWarnings(\"MissingSwitchDefault\")\n public void setGoal(final Goal goal) {\n if (this.goal == goal) {\n return;\n }\n log.debug(\"Supervisor {}: setting goal: {}\", job.getId(), goal);\n this.goal = goal;\n statusUpdater.setGoal(goal);\n switch (goal) {\n case START:\... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
20171642_137 | {
"fields": [
{
"declarator": "JOB_ID = new JobId(\"foo-job\", \"0.1.0\")",
"modifier": "private static final",
"original_string": "private static final JobId JOB_ID = new JobId(\"foo-job\", \"0.1.0\");",
"type": "JobId",
"var_name": "JOB_ID"
},
{
"declarator": "GROUP_N... | {
"body": "@Test\n public void testDeploymentGroupNotFoundJson() throws Exception {\n final ListenableFuture<DeploymentGroupStatusResponse> nullFuture =\n Futures.immediateFuture(null);\n when(client.deploymentGroupStatus(anyString())).thenReturn(nullFuture);\n\n final String name = \"non-existent-gr... | {
"fields": [
{
"declarator": "nameArg",
"modifier": "private final",
"original_string": "private final Argument nameArg;",
"type": "Argument",
"var_name": "nameArg"
},
{
"declarator": "fullArg",
"modifier": "private final",
"original_string": "private final... | {
"body": "@Override\n int run(final Namespace options, final HeliosClient client, final PrintStream out,\n final boolean json, final BufferedReader stdin)\n throws ExecutionException, InterruptedException {\n final String name = options.getString(nameArg.getDest());\n final boolean full = option... | {
"created": "5/26/2014 2:29:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20171642,
"size": null,
"stargazer_count": null,
"stars": 2027,
"updates": "2020-01-12T17:38:00+00:00",
"url": "https://github.com/spotify/helios"... |
84473688_0 | {
"fields": [],
"file": "S3HtsjdkPlugin/src/test/java/com/epam/cmbi/s3/ConfigurationTest.java",
"identifier": "ConfigurationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test (expected = IllegalArgumentException.class)\n public void testConfigurationShouldThrowExceptionWhenIllegalNumberOfConnectionsIsSet() {\n System.setProperty(Configuration.CONNECTIONS_NUMBER_PARAMETER, \"-1\");\n Configuration.init();\n }",
"class_method_signature": "Configuration... | {
"fields": [
{
"declarator": "numberOfConnections",
"modifier": "private static",
"original_string": "private static int numberOfConnections;",
"type": "int",
"var_name": "numberOfConnections"
},
{
"declarator": "maxDownloadPartSize",
"modifier": "private static... | {
"body": "public static void init() {\n int conNum = getIntProperty(CONNECTIONS_NUMBER_PARAMETER, DEFAULT_CONNECTIONS_NUMBER);\n if (conNum > 0) {\n numberOfConnections = conNum;\n } else {\n throw new IllegalArgumentException(\"Negative number of connections value\",\n ... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 84473688,
"size": 55,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/epam/htsjdk-s3-plugin"
} |
84473688_15 | {
"fields": [
{
"declarator": "NUM_OF_THREADS = 2",
"modifier": "private final static",
"original_string": "private final static int NUM_OF_THREADS = 2;",
"type": "int",
"var_name": "NUM_OF_THREADS"
},
{
"declarator": "DATA_SIZE = 37",
"modifier": "private final s... | {
"body": "@Test\n public void taskProducerShouldTerminateWhenItIsCanceled() throws InterruptedException {\n BlockingQueue<Future<Optional<byte[]>>> tasksQueue = new LinkedBlockingQueue<>();\n\n ParallelPartsLoader taskProducer = new ParallelPartsLoader(\n S3DataLoaderMocker.FAKE_URI,\... | {
"fields": [
{
"declarator": "LOG = Log.getInstance(ParallelPartsLoader.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = Log.getInstance(ParallelPartsLoader.class);",
"type": "Log",
"var_name": "LOG"
},
{
"declarator": "CA... | {
"body": "void cancelLoading() {\n canceledFlag.set(true);\n tasksQueue.clear();\n threadPool.shutdown();\n LOG.debug(\"Thread pool was shut down for \", uri.toString());\n }",
"class_method_signature": "ParallelPartsLoader.cancelLoading()",
"constructor": false,
"full_signature"... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 84473688,
"size": 55,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/epam/htsjdk-s3-plugin"
} |
84473688_14 | {
"fields": [
{
"declarator": "DATA_SIZE = 16",
"modifier": "private final static",
"original_string": "private final static int DATA_SIZE = 16;",
"type": "int",
"var_name": "DATA_SIZE"
},
{
"declarator": "NUM_OF_THREADS = 2",
"modifier": "private final static",
... | {
"body": "@Test\n public void testLoadingInParallel() throws IOException {\n System.setProperty(Configuration.CONNECTIONS_NUMBER_PARAMETER,\n Integer.toString(NUM_OF_THREADS));\n System.setProperty(Configuration.MAX_CHUNK_SIZE_PARAMETER, Integer.toString(PART_SIZE));\n System.s... | {
"fields": [
{
"declarator": "EOF_BYTE = -1",
"modifier": "private static final",
"original_string": "private static final int EOF_BYTE = -1;",
"type": "int",
"var_name": "EOF_BYTE"
},
{
"declarator": "log = Log.getInstance(S3ParallelStream.class)",
"modifier": "... | {
"body": "@Override\n public int read() throws IOException {\n if (chunckEndReached()) {\n currentDataChunck = taskProducer.fetchNextPart();\n chunckIndex = 0;\n }\n return getNextByte();\n }",
"class_method_signature": "S3ParallelStream.read()",
"constructor": false,... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 84473688,
"size": 55,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/epam/htsjdk-s3-plugin"
} |
84473688_1 | {
"fields": [],
"file": "S3HtsjdkPlugin/src/test/java/com/epam/cmbi/s3/ConfigurationTest.java",
"identifier": "ConfigurationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test (expected = IllegalArgumentException.class)\n public void testConfigurationShouldThrowExceptionWhenNumberOfConnectionsIsSetToAString() {\n System.setProperty(Configuration.CONNECTIONS_NUMBER_PARAMETER, \"text\");\n Configuration.init();\n }",
"class_method_signature": "Configura... | {
"fields": [
{
"declarator": "numberOfConnections",
"modifier": "private static",
"original_string": "private static int numberOfConnections;",
"type": "int",
"var_name": "numberOfConnections"
},
{
"declarator": "maxDownloadPartSize",
"modifier": "private static... | {
"body": "public static void init() {\n int conNum = getIntProperty(CONNECTIONS_NUMBER_PARAMETER, DEFAULT_CONNECTIONS_NUMBER);\n if (conNum > 0) {\n numberOfConnections = conNum;\n } else {\n throw new IllegalArgumentException(\"Negative number of connections value\",\n ... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 84473688,
"size": 55,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/epam/htsjdk-s3-plugin"
} |
84473688_6 | {
"fields": [],
"file": "S3HtsjdkPlugin/src/test/java/com/epam/cmbi/s3/ConfigurationTest.java",
"identifier": "ConfigurationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test (expected = IllegalArgumentException.class)\n public void testConfigurationShouldThrowExceptionWhenMaxChunkSizeIsNotAnInteger() {\n System.setProperty(Configuration.MAX_CHUNK_SIZE_PARAMETER, \"524288.6\");\n Configuration.init();\n }",
"class_method_signature": "ConfigurationTes... | {
"fields": [
{
"declarator": "numberOfConnections",
"modifier": "private static",
"original_string": "private static int numberOfConnections;",
"type": "int",
"var_name": "numberOfConnections"
},
{
"declarator": "maxDownloadPartSize",
"modifier": "private static... | {
"body": "public static void init() {\n int conNum = getIntProperty(CONNECTIONS_NUMBER_PARAMETER, DEFAULT_CONNECTIONS_NUMBER);\n if (conNum > 0) {\n numberOfConnections = conNum;\n } else {\n throw new IllegalArgumentException(\"Negative number of connections value\",\n ... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 84473688,
"size": 55,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/epam/htsjdk-s3-plugin"
} |
84473688_13 | {
"fields": [
{
"declarator": "DATA_SIZE = 125",
"modifier": "private final static",
"original_string": "private final static int DATA_SIZE = 125;",
"type": "int",
"var_name": "DATA_SIZE"
},
{
"declarator": "mockFactory",
"modifier": "private",
"original_str... | {
"body": "@Test(expected = RuntimeIOException.class)\n public void partReaderThrowExceptionWhenDataStreamEndsAhead() throws InterruptedException {\n S3DataLoaderMocker.mockPrimitiveLoadFromTo(mockFactory, DATA_SIZE/2);\n\n PartReader reader = new PartReader(S3DataLoaderMocker.FAKE_URI,\n ... | {
"fields": [
{
"declarator": "LOG = Log.getInstance(PartReader.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = Log.getInstance(PartReader.class);",
"type": "Log",
"var_name": "LOG"
},
{
"declarator": "CHECK_INTERVAL = 512... | {
"body": "@Override public Optional<byte[]> call() throws InterruptedException {\n LOG.debug(\"Launched \", threadName, \"on \", uri.toString());\n Thread.currentThread().setName(threadName);\n\n return getByteArray(Configuration.getCustomRetryCount());\n }",
"class_method_signature": "Part... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 84473688,
"size": 55,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/epam/htsjdk-s3-plugin"
} |
84473688_12 | {
"fields": [
{
"declarator": "DATA_SIZE = 125",
"modifier": "private final static",
"original_string": "private final static int DATA_SIZE = 125;",
"type": "int",
"var_name": "DATA_SIZE"
},
{
"declarator": "mockFactory",
"modifier": "private",
"original_str... | {
"body": "@Test\n public void partReaderShouldReconnect() throws InterruptedException {\n S3DataLoaderMocker.mockIOException(mockFactory);\n\n PartReader reader = new PartReader(S3DataLoaderMocker.FAKE_URI,\n 0,\n DATA_SIZE,\n new AtomicBoolean(false),\n ... | {
"fields": [
{
"declarator": "LOG = Log.getInstance(PartReader.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = Log.getInstance(PartReader.class);",
"type": "Log",
"var_name": "LOG"
},
{
"declarator": "CHECK_INTERVAL = 512... | {
"body": "@Override public Optional<byte[]> call() throws InterruptedException {\n LOG.debug(\"Launched \", threadName, \"on \", uri.toString());\n Thread.currentThread().setName(threadName);\n\n return getByteArray(Configuration.getCustomRetryCount());\n }",
"class_method_signature": "Part... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 84473688,
"size": 55,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/epam/htsjdk-s3-plugin"
} |
84473688_7 | {
"fields": [],
"file": "S3HtsjdkPlugin/src/test/java/com/epam/cmbi/s3/ConfigurationTest.java",
"identifier": "ConfigurationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test (expected = IllegalArgumentException.class)\n public void testConfigurationShouldThrowExceptionWhenMinChunkSizeIsNotAnInteger() {\n System.setProperty(Configuration.MIN_CHUNK_SIZE_PARAMETER, \"524288.6\");\n Configuration.init();\n }",
"class_method_signature": "ConfigurationTes... | {
"fields": [
{
"declarator": "numberOfConnections",
"modifier": "private static",
"original_string": "private static int numberOfConnections;",
"type": "int",
"var_name": "numberOfConnections"
},
{
"declarator": "maxDownloadPartSize",
"modifier": "private static... | {
"body": "public static void init() {\n int conNum = getIntProperty(CONNECTIONS_NUMBER_PARAMETER, DEFAULT_CONNECTIONS_NUMBER);\n if (conNum > 0) {\n numberOfConnections = conNum;\n } else {\n throw new IllegalArgumentException(\"Negative number of connections value\",\n ... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 84473688,
"size": 55,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/epam/htsjdk-s3-plugin"
} |
84473688_11 | {
"fields": [
{
"declarator": "DATA_SIZE = 125",
"modifier": "private final static",
"original_string": "private final static int DATA_SIZE = 125;",
"type": "int",
"var_name": "DATA_SIZE"
},
{
"declarator": "mockFactory",
"modifier": "private",
"original_str... | {
"body": "@Test\n public void testPartLoading() throws InterruptedException {\n AtomicBoolean canceledFlag = new AtomicBoolean(false);\n final int partSize = 10;\n PartReader reader = new PartReader(S3DataLoaderMocker.FAKE_URI, DATA_SIZE - partSize,\n DATA_SIZE,\n ... | {
"fields": [
{
"declarator": "LOG = Log.getInstance(PartReader.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = Log.getInstance(PartReader.class);",
"type": "Log",
"var_name": "LOG"
},
{
"declarator": "CHECK_INTERVAL = 512... | {
"body": "@Override public Optional<byte[]> call() throws InterruptedException {\n LOG.debug(\"Launched \", threadName, \"on \", uri.toString());\n Thread.currentThread().setName(threadName);\n\n return getByteArray(Configuration.getCustomRetryCount());\n }",
"class_method_signature": "Part... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 84473688,
"size": 55,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/epam/htsjdk-s3-plugin"
} |
84473688_4 | {
"fields": [],
"file": "S3HtsjdkPlugin/src/test/java/com/epam/cmbi/s3/ConfigurationTest.java",
"identifier": "ConfigurationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test (expected = IllegalArgumentException.class)\n public void testConfigurationShouldThrowExceptionWhenMaxChunkSizeIsSetToAString() {\n System.setProperty(Configuration.MAX_CHUNK_SIZE_PARAMETER, \"text\");\n Configuration.init();\n }",
"class_method_signature": "ConfigurationTest.te... | {
"fields": [
{
"declarator": "numberOfConnections",
"modifier": "private static",
"original_string": "private static int numberOfConnections;",
"type": "int",
"var_name": "numberOfConnections"
},
{
"declarator": "maxDownloadPartSize",
"modifier": "private static... | {
"body": "public static void init() {\n int conNum = getIntProperty(CONNECTIONS_NUMBER_PARAMETER, DEFAULT_CONNECTIONS_NUMBER);\n if (conNum > 0) {\n numberOfConnections = conNum;\n } else {\n throw new IllegalArgumentException(\"Negative number of connections value\",\n ... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 84473688,
"size": 55,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/epam/htsjdk-s3-plugin"
} |
84473688_8 | {
"fields": [],
"file": "S3HtsjdkPlugin/src/test/java/com/epam/cmbi/s3/ConfigurationTest.java",
"identifier": "ConfigurationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test (expected = IllegalArgumentException.class)\n public void testConfigurationShouldThrowExceptionWhenIndexURLIsInvalid() {\n System.setProperty(Configuration.INDEX_URL_PARAMETER, \"not a URL\");\n Configuration.init();\n }",
"class_method_signature": "ConfigurationTest.testConfigu... | {
"fields": [
{
"declarator": "numberOfConnections",
"modifier": "private static",
"original_string": "private static int numberOfConnections;",
"type": "int",
"var_name": "numberOfConnections"
},
{
"declarator": "maxDownloadPartSize",
"modifier": "private static... | {
"body": "public static void init() {\n int conNum = getIntProperty(CONNECTIONS_NUMBER_PARAMETER, DEFAULT_CONNECTIONS_NUMBER);\n if (conNum > 0) {\n numberOfConnections = conNum;\n } else {\n throw new IllegalArgumentException(\"Negative number of connections value\",\n ... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 84473688,
"size": 55,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/epam/htsjdk-s3-plugin"
} |
84473688_9 | {
"fields": [],
"file": "S3HtsjdkPlugin/src/test/java/com/epam/cmbi/s3/ConfigurationTest.java",
"identifier": "ConfigurationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test (expected = IllegalArgumentException.class)\n public void testConfigurationShouldThrowExceptionWhenCustomRetryCountInvalid() {\n System.setProperty(Configuration.CUSTOM_RETRY_COUNT_PARAMETER, \"-1\");\n Configuration.init();\n }",
"class_method_signature": "ConfigurationTest.tes... | {
"fields": [
{
"declarator": "numberOfConnections",
"modifier": "private static",
"original_string": "private static int numberOfConnections;",
"type": "int",
"var_name": "numberOfConnections"
},
{
"declarator": "maxDownloadPartSize",
"modifier": "private static... | {
"body": "public static void init() {\n int conNum = getIntProperty(CONNECTIONS_NUMBER_PARAMETER, DEFAULT_CONNECTIONS_NUMBER);\n if (conNum > 0) {\n numberOfConnections = conNum;\n } else {\n throw new IllegalArgumentException(\"Negative number of connections value\",\n ... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 84473688,
"size": 55,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/epam/htsjdk-s3-plugin"
} |
84473688_5 | {
"fields": [],
"file": "S3HtsjdkPlugin/src/test/java/com/epam/cmbi/s3/ConfigurationTest.java",
"identifier": "ConfigurationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test (expected = IllegalArgumentException.class)\n public void testConfigurationShouldThrowExceptionWhenMinChunkSizeIsSetToAString() {\n System.setProperty(Configuration.MAX_CHUNK_SIZE_PARAMETER, \"text\");\n Configuration.init();\n }",
"class_method_signature": "ConfigurationTest.te... | {
"fields": [
{
"declarator": "numberOfConnections",
"modifier": "private static",
"original_string": "private static int numberOfConnections;",
"type": "int",
"var_name": "numberOfConnections"
},
{
"declarator": "maxDownloadPartSize",
"modifier": "private static... | {
"body": "public static void init() {\n int conNum = getIntProperty(CONNECTIONS_NUMBER_PARAMETER, DEFAULT_CONNECTIONS_NUMBER);\n if (conNum > 0) {\n numberOfConnections = conNum;\n } else {\n throw new IllegalArgumentException(\"Negative number of connections value\",\n ... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 84473688,
"size": 55,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/epam/htsjdk-s3-plugin"
} |
84473688_10 | {
"fields": [
{
"declarator": "DATA_SIZE = 125",
"modifier": "private final static",
"original_string": "private final static int DATA_SIZE = 125;",
"type": "int",
"var_name": "DATA_SIZE"
},
{
"declarator": "mockFactory",
"modifier": "private",
"original_str... | {
"body": "@Test\n public void testFullLoading() throws InterruptedException {\n AtomicBoolean canceledFlag = new AtomicBoolean(false);\n PartReader reader =\n new PartReader(S3DataLoaderMocker.FAKE_URI, 0, DATA_SIZE,\n canceledFlag, mockFactory);\n byte[]... | {
"fields": [
{
"declarator": "LOG = Log.getInstance(PartReader.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = Log.getInstance(PartReader.class);",
"type": "Log",
"var_name": "LOG"
},
{
"declarator": "CHECK_INTERVAL = 512... | {
"body": "@Override public Optional<byte[]> call() throws InterruptedException {\n LOG.debug(\"Launched \", threadName, \"on \", uri.toString());\n Thread.currentThread().setName(threadName);\n\n return getByteArray(Configuration.getCustomRetryCount());\n }",
"class_method_signature": "Part... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 84473688,
"size": 55,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/epam/htsjdk-s3-plugin"
} |
84473688_17 | {
"fields": [
{
"declarator": "FILE_SIZE = 2 * Configuration.getMaxDownloadPartSize() * 3",
"modifier": "private static final",
"original_string": "private static final long FILE_SIZE = 2 * Configuration.getMaxDownloadPartSize() * 3;",
"type": "long",
"var_name": "FILE_SIZE"
},
... | {
"body": "@Test\n public void streamShouldReturnEOF() throws IOException {\n long fileSize = 1042 * 1042;\n PowerMockito.when(client.getFileSize(Mockito.any(AmazonS3URI.class))).thenReturn(fileSize);\n\n S3SeekableStream fakeSeekable = new S3SeekableStream(S3DataLoaderMocker.FAKE_URI,\n ... | {
"fields": [
{
"declarator": "log = Log.getInstance(S3SeekableStream.class)",
"modifier": "private static final",
"original_string": "private static final Log log = Log.getInstance(S3SeekableStream.class);",
"type": "Log",
"var_name": "log"
},
{
"declarator": "SEEK_MIN... | {
"body": "@Override\n public int read() throws IOException {\n return currentDataStream.read();\n }",
"class_method_signature": "S3SeekableStream.read()",
"constructor": false,
"full_signature": "@Override public int read()",
"identifier": "read",
"invocations": [
"read"
],
"modifiers"... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 84473688,
"size": 55,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/epam/htsjdk-s3-plugin"
} |
84473688_2 | {
"fields": [],
"file": "S3HtsjdkPlugin/src/test/java/com/epam/cmbi/s3/ConfigurationTest.java",
"identifier": "ConfigurationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test (expected = IllegalArgumentException.class)\n public void testConfigurationShouldThrowExceptionWhenNegativeMaxChunkSizeIsSet() {\n System.setProperty(Configuration.MAX_CHUNK_SIZE_PARAMETER, \"-1\");\n Configuration.init();\n }",
"class_method_signature": "ConfigurationTest.testC... | {
"fields": [
{
"declarator": "numberOfConnections",
"modifier": "private static",
"original_string": "private static int numberOfConnections;",
"type": "int",
"var_name": "numberOfConnections"
},
{
"declarator": "maxDownloadPartSize",
"modifier": "private static... | {
"body": "public static void init() {\n int conNum = getIntProperty(CONNECTIONS_NUMBER_PARAMETER, DEFAULT_CONNECTIONS_NUMBER);\n if (conNum > 0) {\n numberOfConnections = conNum;\n } else {\n throw new IllegalArgumentException(\"Negative number of connections value\",\n ... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 84473688,
"size": 55,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/epam/htsjdk-s3-plugin"
} |
84473688_3 | {
"fields": [],
"file": "S3HtsjdkPlugin/src/test/java/com/epam/cmbi/s3/ConfigurationTest.java",
"identifier": "ConfigurationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test (expected = IllegalArgumentException.class)\n public void testConfigurationShouldThrowExceptionWhenNegativeMinChunkSizeIsSet() {\n System.setProperty(Configuration.MIN_CHUNK_SIZE_PARAMETER, \"-1\");\n Configuration.init();\n }",
"class_method_signature": "ConfigurationTest.testC... | {
"fields": [
{
"declarator": "numberOfConnections",
"modifier": "private static",
"original_string": "private static int numberOfConnections;",
"type": "int",
"var_name": "numberOfConnections"
},
{
"declarator": "maxDownloadPartSize",
"modifier": "private static... | {
"body": "public static void init() {\n int conNum = getIntProperty(CONNECTIONS_NUMBER_PARAMETER, DEFAULT_CONNECTIONS_NUMBER);\n if (conNum > 0) {\n numberOfConnections = conNum;\n } else {\n throw new IllegalArgumentException(\"Negative number of connections value\",\n ... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 84473688,
"size": 55,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/epam/htsjdk-s3-plugin"
} |
84473688_16 | {
"fields": [
{
"declarator": "FILE_SIZE = 2 * Configuration.getMaxDownloadPartSize() * 3",
"modifier": "private static final",
"original_string": "private static final long FILE_SIZE = 2 * Configuration.getMaxDownloadPartSize() * 3;",
"type": "long",
"var_name": "FILE_SIZE"
},
... | {
"body": "@Test\n public void testRead() throws IOException {\n SeekableStream fakeSeekable = new S3SeekableStream(S3DataLoaderMocker.FAKE_URI, client, factory);\n assertEquals(0, fakeSeekable.read());\n\n final int arraySize = 16;\n byte[] loadArray = new byte[arraySize];\n ass... | {
"fields": [
{
"declarator": "log = Log.getInstance(S3SeekableStream.class)",
"modifier": "private static final",
"original_string": "private static final Log log = Log.getInstance(S3SeekableStream.class);",
"type": "Log",
"var_name": "log"
},
{
"declarator": "SEEK_MIN... | {
"body": "@Override\n public int read() throws IOException {\n return currentDataStream.read();\n }",
"class_method_signature": "S3SeekableStream.read()",
"constructor": false,
"full_signature": "@Override public int read()",
"identifier": "read",
"invocations": [
"read"
],
"modifiers"... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 84473688,
"size": 55,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/epam/htsjdk-s3-plugin"
} |
66862644_5 | {
"fields": [
{
"declarator": "decoder = new ImageDecoder()",
"modifier": "private",
"original_string": "private ImageDecoder decoder = new ImageDecoder();",
"type": "ImageDecoder",
"var_name": "decoder"
}
],
"file": "rxunfurl/src/test/java/com/schinizer/rxunfurl/ImageDecoder... | {
"body": "@Test\n public void testDecodePng() throws IOException\n {\n URL png = ImageDecoderTest.class.getClassLoader().getResource(\"16x16.png\");\n FileInputStream inputStream = new FileInputStream((png == null) ? \"\" : png.getPath());\n Dimension dimension = decoder.decodePngDimension... | {
"fields": [
{
"declarator": "JPEG_START_MARKER = ByteString.decodeHex(\"FF\")",
"modifier": "private static final",
"original_string": "private static final ByteString JPEG_START_MARKER = ByteString.decodeHex(\"FF\");",
"type": "ByteString",
"var_name": "JPEG_START_MARKER"
},
... | {
"body": "Dimension decodePngDimension(BufferedSource pngSource) throws IOException {\n // Png stores in big endian\n pngSource.skip(16);\n int w = pngSource.readInt();\n int h = pngSource.readInt();\n\n return new Dimension(w, h);\n }",
"class_method_signature": "ImageDecoder... | {
"created": null,
"fork": null,
"fork_count": 37,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 66862644,
"size": 167,
"stargazer_count": 423,
"stars": null,
"updates": null,
"url": "https://github.com/Schinizer/RxUnfurl"
} |
66862644_4 | {
"fields": [
{
"declarator": "decoder = new ImageDecoder()",
"modifier": "private",
"original_string": "private ImageDecoder decoder = new ImageDecoder();",
"type": "ImageDecoder",
"var_name": "decoder"
}
],
"file": "rxunfurl/src/test/java/com/schinizer/rxunfurl/ImageDecoder... | {
"body": "@Test\n public void testDecodeJpegProgressive() throws IOException\n {\n URL progressive = ImageDecoderTest.class.getClassLoader().getResource(\"32x32_progressive.jpg\");\n FileInputStream inputStream = new FileInputStream((progressive == null) ? \"\" : progressive.getPath());\n ... | {
"fields": [
{
"declarator": "JPEG_START_MARKER = ByteString.decodeHex(\"FF\")",
"modifier": "private static final",
"original_string": "private static final ByteString JPEG_START_MARKER = ByteString.decodeHex(\"FF\");",
"type": "ByteString",
"var_name": "JPEG_START_MARKER"
},
... | {
"body": "Dimension decodeJpegDimension(BufferedSource jpegSource) throws IOException {\n // Jpeg stores in big endian\n Dimension dimension;\n\n while (true) {\n ByteString marker = jpegSource.readByteString(JPEG_START_MARKER.size());\n\n if (!marker.equals(JPEG_START_MARK... | {
"created": null,
"fork": null,
"fork_count": 37,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 66862644,
"size": 167,
"stargazer_count": 423,
"stars": null,
"updates": null,
"url": "https://github.com/Schinizer/RxUnfurl"
} |
66862644_3 | {
"fields": [
{
"declarator": "decoder = new ImageDecoder()",
"modifier": "private",
"original_string": "private ImageDecoder decoder = new ImageDecoder();",
"type": "ImageDecoder",
"var_name": "decoder"
}
],
"file": "rxunfurl/src/test/java/com/schinizer/rxunfurl/ImageDecoder... | {
"body": "@Test\n public void testDecodeJpegBaseLine() throws IOException\n {\n URL baseline = ImageDecoderTest.class.getClassLoader().getResource(\"64x64_baseline.jpg\");\n FileInputStream inputStream = new FileInputStream((baseline == null) ? \"\" : baseline.getPath());\n Dimension dimen... | {
"fields": [
{
"declarator": "JPEG_START_MARKER = ByteString.decodeHex(\"FF\")",
"modifier": "private static final",
"original_string": "private static final ByteString JPEG_START_MARKER = ByteString.decodeHex(\"FF\");",
"type": "ByteString",
"var_name": "JPEG_START_MARKER"
},
... | {
"body": "Dimension decodeJpegDimension(BufferedSource jpegSource) throws IOException {\n // Jpeg stores in big endian\n Dimension dimension;\n\n while (true) {\n ByteString marker = jpegSource.readByteString(JPEG_START_MARKER.size());\n\n if (!marker.equals(JPEG_START_MARK... | {
"created": null,
"fork": null,
"fork_count": 37,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 66862644,
"size": 167,
"stargazer_count": 423,
"stars": null,
"updates": null,
"url": "https://github.com/Schinizer/RxUnfurl"
} |
66862644_2 | {
"fields": [
{
"declarator": "server = new MockWebServer()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final MockWebServer server = new MockWebServer();",
"type": "MockWebServer",
"var_name": "server"
},
{
"declarator": "rxUnfurl = ne... | {
"body": "@Test\n public void testParagraphFallback() {\n final String mockHtml = \"<!DOCTYPE html><html><p>fallback description</p></body></html>\";\n\n server.setDispatcher(new Dispatcher() {\n @Override\n public MockResponse dispatch(RecordedRequest request) throws Interrupt... | {
"fields": [
{
"declarator": "client",
"modifier": "private",
"original_string": "private OkHttpClient client;",
"type": "OkHttpClient",
"var_name": "client"
},
{
"declarator": "scheduler",
"modifier": "private",
"original_string": "private Scheduler schedu... | {
"body": "public Single<PreviewData> generatePreview(@NonNull String url) {\n return Single.just(url)\n .map(new Function<String, Response>() {\n @Override\n public Response apply(@NonNull String url) throws Exception {\n return clien... | {
"created": null,
"fork": null,
"fork_count": 37,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 66862644,
"size": 167,
"stargazer_count": 423,
"stars": null,
"updates": null,
"url": "https://github.com/Schinizer/RxUnfurl"
} |
66862644_1 | {
"fields": [
{
"declarator": "server = new MockWebServer()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final MockWebServer server = new MockWebServer();",
"type": "MockWebServer",
"var_name": "server"
},
{
"declarator": "rxUnfurl = ne... | {
"body": "@Test\n public void testExtractFallbacks() {\n final String mockHtml = \"<!DOCTYPE html><html><meta name=\\\"description\\\" content=\\\"fallback description\\\" />\\n<title>fallback title</title><body> <img src=\\\"64x64_baseline.jpg\\\"/> </body></html>\";\n\n server.setDispatcher(new Di... | {
"fields": [
{
"declarator": "client",
"modifier": "private",
"original_string": "private OkHttpClient client;",
"type": "OkHttpClient",
"var_name": "client"
},
{
"declarator": "scheduler",
"modifier": "private",
"original_string": "private Scheduler schedu... | {
"body": "public Single<PreviewData> generatePreview(@NonNull String url) {\n return Single.just(url)\n .map(new Function<String, Response>() {\n @Override\n public Response apply(@NonNull String url) throws Exception {\n return clien... | {
"created": null,
"fork": null,
"fork_count": 37,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 66862644,
"size": 167,
"stargazer_count": 423,
"stars": null,
"updates": null,
"url": "https://github.com/Schinizer/RxUnfurl"
} |
66862644_0 | {
"fields": [
{
"declarator": "server = new MockWebServer()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final MockWebServer server = new MockWebServer();",
"type": "MockWebServer",
"var_name": "server"
},
{
"declarator": "rxUnfurl = ne... | {
"body": "@Test\n public void testExtractOpenGraphTags() {\n final String mockHtml = \"<!DOCTYPE html><html> <meta property=\\\"og:url\\\" content=\\\"http://someurl.io\\\"/> <meta property=\\\"og:title\\\" content=\\\"title\\\"/> <meta property=\\\"og:description\\\" content=\\\"description\\\"/> <meta pr... | {
"fields": [
{
"declarator": "client",
"modifier": "private",
"original_string": "private OkHttpClient client;",
"type": "OkHttpClient",
"var_name": "client"
},
{
"declarator": "scheduler",
"modifier": "private",
"original_string": "private Scheduler schedu... | {
"body": "public Single<PreviewData> generatePreview(@NonNull String url) {\n return Single.just(url)\n .map(new Function<String, Response>() {\n @Override\n public Response apply(@NonNull String url) throws Exception {\n return clien... | {
"created": null,
"fork": null,
"fork_count": 37,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 66862644,
"size": 167,
"stargazer_count": 423,
"stars": null,
"updates": null,
"url": "https://github.com/Schinizer/RxUnfurl"
} |
66862644_7 | {
"fields": [
{
"declarator": "decoder = new ImageDecoder()",
"modifier": "private",
"original_string": "private ImageDecoder decoder = new ImageDecoder();",
"type": "ImageDecoder",
"var_name": "decoder"
}
],
"file": "rxunfurl/src/test/java/com/schinizer/rxunfurl/ImageDecoder... | {
"body": "@Test\n public void testDecodeBmp() throws IOException\n {\n URL bmp = ImageDecoderTest.class.getClassLoader().getResource(\"4x4.bmp\");\n FileInputStream inputStream = new FileInputStream((bmp == null) ? \"\" : bmp.getPath());\n Dimension dimension = decoder.decodeBmpDimension(O... | {
"fields": [
{
"declarator": "JPEG_START_MARKER = ByteString.decodeHex(\"FF\")",
"modifier": "private static final",
"original_string": "private static final ByteString JPEG_START_MARKER = ByteString.decodeHex(\"FF\");",
"type": "ByteString",
"var_name": "JPEG_START_MARKER"
},
... | {
"body": "Dimension decodeBmpDimension(BufferedSource bmpSource) throws IOException {\n // Bmp stores in little endian\n bmpSource.skip(18);\n int w = bmpSource.readIntLe();\n int h = bmpSource.readIntLe();\n\n return new Dimension(w, h);\n }",
"class_method_signature": "Image... | {
"created": null,
"fork": null,
"fork_count": 37,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 66862644,
"size": 167,
"stargazer_count": 423,
"stars": null,
"updates": null,
"url": "https://github.com/Schinizer/RxUnfurl"
} |
66862644_6 | {
"fields": [
{
"declarator": "decoder = new ImageDecoder()",
"modifier": "private",
"original_string": "private ImageDecoder decoder = new ImageDecoder();",
"type": "ImageDecoder",
"var_name": "decoder"
}
],
"file": "rxunfurl/src/test/java/com/schinizer/rxunfurl/ImageDecoder... | {
"body": "@Test\n public void testDecodeGif() throws IOException\n {\n URL gif = ImageDecoderTest.class.getClassLoader().getResource(\"8x8.gif\");\n FileInputStream inputStream = new FileInputStream((gif == null) ? \"\" : gif.getPath());\n Dimension dimension = decoder.decodeGifDimension(O... | {
"fields": [
{
"declarator": "JPEG_START_MARKER = ByteString.decodeHex(\"FF\")",
"modifier": "private static final",
"original_string": "private static final ByteString JPEG_START_MARKER = ByteString.decodeHex(\"FF\");",
"type": "ByteString",
"var_name": "JPEG_START_MARKER"
},
... | {
"body": "Dimension decodeGifDimension(BufferedSource gifSource) throws IOException {\n // Gif stores in little endian\n gifSource.skip(6);\n Short w = gifSource.readShortLe();\n Short h = gifSource.readShortLe();\n\n return new Dimension(Integer.valueOf(w), Integer.valueOf(h));\n ... | {
"created": null,
"fork": null,
"fork_count": 37,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 66862644,
"size": 167,
"stargazer_count": 423,
"stars": null,
"updates": null,
"url": "https://github.com/Schinizer/RxUnfurl"
} |
10277647_1 | {
"fields": [
{
"declarator": "NO_PERMISSIONS = EnumSet.noneOf(PosixFilePermission.class)",
"modifier": "private static final",
"original_string": "private static final Set<PosixFilePermission> NO_PERMISSIONS = EnumSet.noneOf(PosixFilePermission.class);",
"type": "Set<PosixFilePermission>"... | {
"body": "@Test\n public void unsupportedModeInstructionThrowsAppropriateException() {\n final Set<PosixFilePermission> toAdd = EnumSet.noneOf(PosixFilePermission.class);\n final Set<PosixFilePermission> toRemove = EnumSet.noneOf(PosixFilePermission.class);\n String instruction;\n instruction = \"u-X\";... | {
"fields": [
{
"declarator": "COMMA = Pattern.compile(\",\")",
"modifier": "private static final",
"original_string": "private static final Pattern COMMA = Pattern.compile(\",\");",
"type": "Pattern",
"var_name": "COMMA"
}
],
"file": "provisio-core/src/main/java/ca/vanzyl/pr... | {
"body": "static void parseOne(final String instruction,\n final Set<PosixFilePermission> toAdd,\n final Set<PosixFilePermission> toRemove) {\n final int plus = instruction.indexOf('+');\n final int minus = instruction.indexOf('-');\n if (plus < 0 && minus < 0) {\n throw new RuntimeException(\"In... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 10277647,
"size": 17455,
"stargazer_count": 7,
"stars": null,
"updates": null,
"url": "https://github.com/jvanzyl/provisio"
} |
10277647_0 | {
"fields": [
{
"declarator": "NO_PERMISSIONS = EnumSet.noneOf(PosixFilePermission.class)",
"modifier": "private static final",
"original_string": "private static final Set<PosixFilePermission> NO_PERMISSIONS = EnumSet.noneOf(PosixFilePermission.class);",
"type": "Set<PosixFilePermission>"... | {
"body": "@Test\n @UseDataProvider(value = \"invalidModeInstructions\")\n public void invalidModeInstructionThrowsAppropriateException(final String instruction) {\n final Set<PosixFilePermission> toAdd = EnumSet.noneOf(PosixFilePermission.class);\n final Set<PosixFilePermission> toRemove = EnumSet.noneOf(Pos... | {
"fields": [
{
"declarator": "COMMA = Pattern.compile(\",\")",
"modifier": "private static final",
"original_string": "private static final Pattern COMMA = Pattern.compile(\",\");",
"type": "Pattern",
"var_name": "COMMA"
}
],
"file": "provisio-core/src/main/java/ca/vanzyl/pr... | {
"body": "static void parseOne(final String instruction,\n final Set<PosixFilePermission> toAdd,\n final Set<PosixFilePermission> toRemove) {\n final int plus = instruction.indexOf('+');\n final int minus = instruction.indexOf('-');\n if (plus < 0 && minus < 0) {\n throw new RuntimeException(\"In... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 10277647,
"size": 17455,
"stargazer_count": 7,
"stars": null,
"updates": null,
"url": "https://github.com/jvanzyl/provisio"
} |
10277647_6 | {
"fields": [],
"file": "provisio-core/src/test/java/ca/vanzyl/provisio/ProvisioUtilsTest.java",
"identifier": "ProvisioUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void validateCoordinateToPath() {\n\n ProvisioArtifact artifact = new ProvisioArtifact(\"io.prestosql:presto-main:332\");\n String path = coordinateToPath(artifact);\n assertEquals(\"presto-main-332.jar\", path);\n }",
"class_method_signature": "ProvisioUtilsTest.validateCoordin... | {
"fields": [],
"file": "provisio-core/src/main/java/ca/vanzyl/provisio/ProvisioUtils.java",
"identifier": "ProvisioUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "ProvisioUtils.coordinateToPath(ProvisioArtifact a)",
"constructor": false,
"full_signature": "public sta... | {
"body": "public static String coordinateToPath(ProvisioArtifact a) {\n\n StringBuffer path = new StringBuffer()\n .append(a.getArtifactId())\n .append(\"-\")\n .append(a.getVersion());\n\n if (a.getClassifier() != null && !a.getClassifier().isEmpty()) {\n path.append(\"-\")\n ... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 10277647,
"size": 17455,
"stargazer_count": 7,
"stars": null,
"updates": null,
"url": "https://github.com/jvanzyl/provisio"
} |
10277647_5 | {
"fields": [],
"file": "provisio-core/src/test/java/ca/vanzyl/provisio/perms/PosixModesTest.java",
"identifier": "PosixModesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n @UseDataProvider(\"intModeTestData\")\n public void translatingToPosixPermissionsWorks(int intMode, String asString) {\n final Set<PosixFilePermission> expected = PosixFilePermissions.fromString(asString);\n assertThat(PosixModes.intModeToPosix(intMode))\n .as(\"integer mode is correct... | {
"fields": [
{
"declarator": "PERMISSIONS = PosixFilePermission.values()",
"modifier": "static final",
"original_string": "static final PosixFilePermission[] PERMISSIONS = PosixFilePermission.values();",
"type": "PosixFilePermission[]",
"var_name": "PERMISSIONS"
},
{
"... | {
"body": "public static Set<PosixFilePermission> intModeToPosix(int intMode) {\n if ((intMode & INT_MODE_MAX) != intMode) {\n throw new RuntimeException(\"Invalid intMode: \" + intMode);\n }\n final Set<PosixFilePermission> set = EnumSet.noneOf(PosixFilePermission.class);\n\n for (int i = 0; i < PER... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 10277647,
"size": 17455,
"stargazer_count": 7,
"stars": null,
"updates": null,
"url": "https://github.com/jvanzyl/provisio"
} |
10277647_4 | {
"fields": [],
"file": "provisio-core/src/test/java/ca/vanzyl/provisio/perms/PosixModesTest.java",
"identifier": "PosixModesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = RuntimeException.class)\n public void outOfRangeNumberThrowsIllegalArgumentException() {\n try {\n PosixModes.intModeToPosix(-1);\n shouldHaveThrown(IllegalArgumentException.class);\n } catch (IllegalArgumentException e) {\n assertThat(e).isExactlyInstanceOf(RuntimeEx... | {
"fields": [
{
"declarator": "PERMISSIONS = PosixFilePermission.values()",
"modifier": "static final",
"original_string": "static final PosixFilePermission[] PERMISSIONS = PosixFilePermission.values();",
"type": "PosixFilePermission[]",
"var_name": "PERMISSIONS"
},
{
"... | {
"body": "public static Set<PosixFilePermission> intModeToPosix(int intMode) {\n if ((intMode & INT_MODE_MAX) != intMode) {\n throw new RuntimeException(\"Invalid intMode: \" + intMode);\n }\n final Set<PosixFilePermission> set = EnumSet.noneOf(PosixFilePermission.class);\n\n for (int i = 0; i < PER... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 10277647,
"size": 17455,
"stargazer_count": 7,
"stars": null,
"updates": null,
"url": "https://github.com/jvanzyl/provisio"
} |
10277647_3 | {
"fields": [
{
"declarator": "NO_PERMISSIONS = EnumSet.noneOf(PosixFilePermission.class)",
"modifier": "private static final",
"original_string": "private static final Set<PosixFilePermission> NO_PERMISSIONS = EnumSet.noneOf(PosixFilePermission.class);",
"type": "Set<PosixFilePermission>"... | {
"body": "@Test\n @UseDataProvider(\"multipleInstructions\")\n public void validModeMultipleInstructionAddsInstructionsInAppropriateSets(\n final String instruction, final Set<PosixFilePermission> add,\n final Set<PosixFilePermission> remove) {\n final Set<PosixFilePermission> toAdd = EnumSet.noneOf(Posix... | {
"fields": [
{
"declarator": "COMMA = Pattern.compile(\",\")",
"modifier": "private static final",
"original_string": "private static final Pattern COMMA = Pattern.compile(\",\");",
"type": "Pattern",
"var_name": "COMMA"
}
],
"file": "provisio-core/src/main/java/ca/vanzyl/pr... | {
"body": "static void parse(final String instructions,\n final Set<PosixFilePermission> toAdd,\n final Set<PosixFilePermission> toRemove) {\n for (final String instruction : COMMA.split(instructions)) {\n parseOne(instruction, toAdd, toRemove);\n }\n }",
"class_method_signature": "ModeParser.pars... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 10277647,
"size": 17455,
"stargazer_count": 7,
"stars": null,
"updates": null,
"url": "https://github.com/jvanzyl/provisio"
} |
10277647_2 | {
"fields": [
{
"declarator": "NO_PERMISSIONS = EnumSet.noneOf(PosixFilePermission.class)",
"modifier": "private static final",
"original_string": "private static final Set<PosixFilePermission> NO_PERMISSIONS = EnumSet.noneOf(PosixFilePermission.class);",
"type": "Set<PosixFilePermission>"... | {
"body": "@Test\n @UseDataProvider(\"validModeInstructions\")\n public void validModeInstructionAddsInstructionsInAppropriateSets(\n final String instruction,\n final Set<PosixFilePermission> add,\n final Set<PosixFilePermission> remove) {\n final Set<PosixFilePermission> toAdd = EnumSet.noneOf(PosixFi... | {
"fields": [
{
"declarator": "COMMA = Pattern.compile(\",\")",
"modifier": "private static final",
"original_string": "private static final Pattern COMMA = Pattern.compile(\",\");",
"type": "Pattern",
"var_name": "COMMA"
}
],
"file": "provisio-core/src/main/java/ca/vanzyl/pr... | {
"body": "static void parseOne(final String instruction,\n final Set<PosixFilePermission> toAdd,\n final Set<PosixFilePermission> toRemove) {\n final int plus = instruction.indexOf('+');\n final int minus = instruction.indexOf('-');\n if (plus < 0 && minus < 0) {\n throw new RuntimeException(\"In... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 10277647,
"size": 17455,
"stargazer_count": 7,
"stars": null,
"updates": null,
"url": "https://github.com/jvanzyl/provisio"
} |
927454_4 | {
"fields": [
{
"declarator": "metrics = new MetricRegistry()",
"modifier": "private final",
"original_string": "private final MetricRegistry metrics = new MetricRegistry();",
"type": "MetricRegistry",
"var_name": "metrics"
},
{
"declarator": "meter = metrics.meter(\"ou... | {
"body": "@Test\n @DisplayName(\"resend unconfirmed messages with lower bound and map confirm handling\")\n void resendUnconfirmedMessagesUseLowerBoundAndConcurrentMapIntegration() throws Exception {\n Channel ch = connection.createChannel();\n ch.confirmSelect();\n Map<Long, String> outst... | {
"fields": [
{
"declarator": "MESSAGE_COUNT = 50_000",
"modifier": "static final",
"original_string": "static final int MESSAGE_COUNT = 50_000;",
"type": "int",
"var_name": "MESSAGE_COUNT"
}
],
"file": "java-mvn/src/main/java/PublisherConfirms.java",
"identifier": "Publish... | {
"body": "static boolean waitUntil(Duration timeout, BooleanSupplier condition) throws InterruptedException {\n int waited = 0;\n while (!condition.getAsBoolean() && waited < timeout.toMillis()) {\n Thread.sleep(100L);\n waited = +100;\n }\n return condition.getAsBoo... | {
"created": "9/21/2010 11:41:26 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 927454,
"size": null,
"stargazer_count": null,
"stars": 4534,
"updates": "2020-01-26T22:55:48+00:00",
"url": "https://github.com/rabbitmq/rabbitm... |
927454_2 | {
"fields": [
{
"declarator": "metrics = new MetricRegistry()",
"modifier": "private final",
"original_string": "private final MetricRegistry metrics = new MetricRegistry();",
"type": "MetricRegistry",
"var_name": "metrics"
},
{
"declarator": "meter = metrics.meter(\"ou... | {
"body": "@Test\n @DisplayName(\"allow max of outstanding confirms\")\n void allowMaxOfOutstandingConfirms() throws Exception {\n int maxOutstandingConfirms = 100;\n Semaphore semaphore = new Semaphore(maxOutstandingConfirms);\n Channel ch = connection.createChannel();\n ch.confirmS... | {
"fields": [
{
"declarator": "MESSAGE_COUNT = 50_000",
"modifier": "static final",
"original_string": "static final int MESSAGE_COUNT = 50_000;",
"type": "int",
"var_name": "MESSAGE_COUNT"
}
],
"file": "java-mvn/src/main/java/PublisherConfirms.java",
"identifier": "Publish... | {
"body": "static boolean waitUntil(Duration timeout, BooleanSupplier condition) throws InterruptedException {\n int waited = 0;\n while (!condition.getAsBoolean() && waited < timeout.toMillis()) {\n Thread.sleep(100L);\n waited = +100;\n }\n return condition.getAsBoo... | {
"created": "9/21/2010 11:41:26 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 927454,
"size": null,
"stargazer_count": null,
"stars": 4534,
"updates": "2020-01-26T22:55:48+00:00",
"url": "https://github.com/rabbitmq/rabbitm... |
927454_3 | {
"fields": [
{
"declarator": "metrics = new MetricRegistry()",
"modifier": "private final",
"original_string": "private final MetricRegistry metrics = new MetricRegistry();",
"type": "MetricRegistry",
"var_name": "metrics"
},
{
"declarator": "meter = metrics.meter(\"ou... | {
"body": "@Test\n @DisplayName(\"resend unconfirmed messages\")\n void resendUnconfirmedMessagesIntegration() throws Exception {\n Channel ch = connection.createChannel();\n ch.confirmSelect();\n Map<Long, String> outstandingConfirms = resendUnconfirmedMessages(ch);\n assertThat(wai... | {
"fields": [
{
"declarator": "MESSAGE_COUNT = 50_000",
"modifier": "static final",
"original_string": "static final int MESSAGE_COUNT = 50_000;",
"type": "int",
"var_name": "MESSAGE_COUNT"
}
],
"file": "java-mvn/src/main/java/PublisherConfirms.java",
"identifier": "Publish... | {
"body": "static boolean waitUntil(Duration timeout, BooleanSupplier condition) throws InterruptedException {\n int waited = 0;\n while (!condition.getAsBoolean() && waited < timeout.toMillis()) {\n Thread.sleep(100L);\n waited = +100;\n }\n return condition.getAsBoo... | {
"created": "9/21/2010 11:41:26 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 927454,
"size": null,
"stargazer_count": null,
"stars": 4534,
"updates": "2020-01-26T22:55:48+00:00",
"url": "https://github.com/rabbitmq/rabbitm... |
927454_0 | {
"fields": [
{
"declarator": "metrics = new MetricRegistry()",
"modifier": "private final",
"original_string": "private final MetricRegistry metrics = new MetricRegistry();",
"type": "MetricRegistry",
"var_name": "metrics"
},
{
"declarator": "meter = metrics.meter(\"ou... | {
"body": "@Test\n @DisplayName(\"publish messages individually\")\n void publishMessagesIndividually() throws Exception {\n Channel ch = connection.createChannel();\n ch.confirmSelect();\n for (int i = 0; i < messageCount; i++) {\n String body = String.valueOf(i);\n c... | {
"fields": [
{
"declarator": "MESSAGE_COUNT = 50_000",
"modifier": "static final",
"original_string": "static final int MESSAGE_COUNT = 50_000;",
"type": "int",
"var_name": "MESSAGE_COUNT"
}
],
"file": "java-mvn/src/main/java/PublisherConfirms.java",
"identifier": "Publish... | {
"body": "static void publishMessagesIndividually() throws Exception {\n try (Connection connection = createConnection()) {\n Channel ch = connection.createChannel();\n\n String queue = UUID.randomUUID().toString();\n ch.queueDeclare(queue, false, false, true, null);\n\n ... | {
"created": "9/21/2010 11:41:26 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 927454,
"size": null,
"stargazer_count": null,
"stars": 4534,
"updates": "2020-01-26T22:55:48+00:00",
"url": "https://github.com/rabbitmq/rabbitm... |
927454_1 | {
"fields": [
{
"declarator": "metrics = new MetricRegistry()",
"modifier": "private final",
"original_string": "private final MetricRegistry metrics = new MetricRegistry();",
"type": "MetricRegistry",
"var_name": "metrics"
},
{
"declarator": "meter = metrics.meter(\"ou... | {
"body": "@Test\n @DisplayName(\"publish messages in batch\")\n void publishMessagesInBatch() throws Exception {\n Channel ch = connection.createChannel();\n ch.confirmSelect();\n int batchSize = 100;\n int outstandingMessageCount = 0;\n for (int i = 0; i < messageCount; i++)... | {
"fields": [
{
"declarator": "MESSAGE_COUNT = 50_000",
"modifier": "static final",
"original_string": "static final int MESSAGE_COUNT = 50_000;",
"type": "int",
"var_name": "MESSAGE_COUNT"
}
],
"file": "java-mvn/src/main/java/PublisherConfirms.java",
"identifier": "Publish... | {
"body": "static void publishMessagesInBatch() throws Exception {\n try (Connection connection = createConnection()) {\n Channel ch = connection.createChannel();\n\n String queue = UUID.randomUUID().toString();\n ch.queueDeclare(queue, false, false, true, null);\n\n ... | {
"created": "9/21/2010 11:41:26 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 927454,
"size": null,
"stargazer_count": null,
"stars": 4534,
"updates": "2020-01-26T22:55:48+00:00",
"url": "https://github.com/rabbitmq/rabbitm... |
81143147_0 | {
"fields": [],
"file": "rfc3986-uri/src/test/java/org/dmfs/rfc3986/validation/BitMapCharSetTest.java",
"identifier": "BitMapCharSetTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testContains() throws Exception\n {\n assertFalse(new BitMapCharSet().contains(' '));\n assertFalse(new BitMapCharSet(0).contains(' '));\n assertFalse(new BitMapCharSet(0, 0).contains(' '));\n assertFalse(new BitMapCharSet(0, 0, 0).contains(' '));\n ... | {
"fields": [
{
"declarator": "mBitmap",
"modifier": "private final",
"original_string": "private final int[] mBitmap;",
"type": "int[]",
"var_name": "mBitmap"
},
{
"declarator": "mLength",
"modifier": "private final",
"original_string": "private final int m... | {
"body": "@Override\n public boolean contains(char c)\n {\n return (c < mLength) && (mBitmap[c >>> 5] & (1 << (c & 0x1F))) != 0;\n }",
"class_method_signature": "BitMapCharSet.contains(char c)",
"constructor": false,
"full_signature": "@Override public boolean contains(char c)",
"identifier":... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 81143147,
"size": 150,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/dmfs/uri-toolkit"
} |
81143147_56 | {
"fields": [],
"file": "rfc3986-uri/src/test/java/org/dmfs/rfc3986/authorities/TextTest.java",
"identifier": "TextTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Ignore\n @Test\n public void testDecoded() throws Exception\n {\n\n }",
"class_method_signature": "TextTest.testDecoded()",
"constructor": false,
"full_signature": "@Ignore @Test public void testDecoded()",
"identifier": "testDecoded",
"invocations": [],
"modifiers": "@Ignore @Test... | {
"fields": [
{
"declarator": "mDelegate",
"modifier": "private final",
"original_string": "private final Authority mDelegate;",
"type": "Authority",
"var_name": "mDelegate"
},
{
"declarator": "mText",
"modifier": "private",
"original_string": "private Strin... | {
"body": "@Override\n public CharSequence decoded(String charset) throws UnsupportedEncodingException\n {\n throw new UnsupportedOperationException(\"an Authority can't be decoded as a whole\");\n }",
"class_method_signature": "Text.decoded(String charset)",
"constructor": false,
"full_signatur... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 81143147,
"size": 150,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/dmfs/uri-toolkit"
} |
81143147_40 | {
"fields": [],
"file": "rfc3986-uri/src/test/java/org/dmfs/rfc3986/uris/LazyUriTest.java",
"identifier": "LazyUriTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void fragment() throws Exception\n {\n assertFalse(new LazyUri(new Precoded(\"http://www.example.com\")).fragment().isPresent());\n assertTrue(new LazyUri(new Precoded(\"http://www.example.com/#\")).fragment().isPresent());\n assertTrue(new LazyUri(new Precoded(\"h... | {
"fields": [
{
"declarator": "mUriEncoded",
"modifier": "private final",
"original_string": "private final UriEncoded mUriEncoded;",
"type": "UriEncoded",
"var_name": "mUriEncoded"
},
{
"declarator": "mOptionalScheme",
"modifier": "private final",
"original... | {
"body": "@Override\n public Optional<? extends Fragment> fragment()\n {\n if (mFragment == null)\n {\n mFragment = new OptionalLazyFragment(\n mUriEncoded.subSequence(mOptionalScheme.parsedLength() + authority().parsedLength() + path().parsedLength() + query().parse... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 81143147,
"size": 150,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/dmfs/uri-toolkit"
} |
81143147_17 | {
"fields": [],
"file": "rfc3986-uri/src/test/java/org/dmfs/rfc3986/paths/EmptyPathTest.java",
"identifier": "EmptyPathTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void isEmpty() throws Exception\n {\n assertTrue(new EmptyPath().isEmpty());\n }",
"class_method_signature": "EmptyPathTest.isEmpty()",
"constructor": false,
"full_signature": "@Test public void isEmpty()",
"identifier": "isEmpty",
"invocations": [
"assertTrue",... | {
"fields": [
{
"declarator": "INSTANCE = new EmptyPath()",
"modifier": "public final static",
"original_string": "public final static EmptyPath INSTANCE = new EmptyPath();",
"type": "EmptyPath",
"var_name": "INSTANCE"
}
],
"file": "rfc3986-uri/src/main/java/org/dmfs/rfc3986/... | {
"body": "@Override\n public boolean isEmpty()\n {\n return true;\n }",
"class_method_signature": "EmptyPath.isEmpty()",
"constructor": false,
"full_signature": "@Override public boolean isEmpty()",
"identifier": "isEmpty",
"invocations": [],
"modifiers": "@Override public",
"parameters... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 81143147,
"size": 150,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/dmfs/uri-toolkit"
} |
81143147_60 | {
"fields": [],
"file": "rfc3986-uri/src/test/java/org/dmfs/rfc3986/schemes/StringSchemeTest.java",
"identifier": "StringSchemeTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCharAt() throws Exception\n {\n assertEquals('h', new StringScheme(\"http\").charAt(0));\n assertEquals('t', new StringScheme(\"http\").charAt(1));\n assertEquals('t', new StringScheme(\"http\").charAt(2));\n assertEquals('p', new StringScheme(\"htt... | {
"fields": [
{
"declarator": "mScheme",
"modifier": "private final",
"original_string": "private final CharSequence mScheme;",
"type": "CharSequence",
"var_name": "mScheme"
}
],
"file": "rfc3986-uri/src/main/java/org/dmfs/rfc3986/schemes/StringScheme.java",
"identifier": "... | {
"body": "@Override\n public char charAt(int i)\n {\n return mScheme.charAt(i);\n }",
"class_method_signature": "StringScheme.charAt(int i)",
"constructor": false,
"full_signature": "@Override public char charAt(int i)",
"identifier": "charAt",
"invocations": [
"charAt"
],
"modifier... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 81143147,
"size": 150,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/dmfs/uri-toolkit"
} |
81143147_37 | {
"fields": [],
"file": "rfc3986-uri/src/test/java/org/dmfs/rfc3986/uris/LazyUriTest.java",
"identifier": "LazyUriTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void authority() throws Exception\n {\n assertEquals(\"example.com\", new LazyUri(new Precoded(\"http://example.com\")).authority().value().host().toString());\n assertEquals(\"example.com\", new LazyUri(new Precoded(\"http://example.com/path\")).authority().value().host(... | {
"fields": [
{
"declarator": "mUriEncoded",
"modifier": "private final",
"original_string": "private final UriEncoded mUriEncoded;",
"type": "UriEncoded",
"var_name": "mUriEncoded"
},
{
"declarator": "mOptionalScheme",
"modifier": "private final",
"original... | {
"body": "@Override\n public OptionalLazyAuthority authority()\n {\n if (mAuthority == null)\n {\n mAuthority = new OptionalLazyAuthority(mUriEncoded.subSequence(mOptionalScheme.parsedLength(), mUriEncoded.length()));\n }\n return mAuthority;\n }",
"class_method_sign... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 81143147,
"size": 150,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/dmfs/uri-toolkit"
} |
81143147_21 | {
"fields": [],
"file": "rfc3986-uri/src/test/java/org/dmfs/rfc3986/paths/StructuredPathTest.java",
"identifier": "StructuredPathTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIsAbsolute() throws Exception\n {\n assertFalse(new StructuredPath().isAbsolute());\n assertFalse(new StructuredPath(IdempotentEncoded.CURRENT).isAbsolute());\n assertFalse(new StructuredPath(new Encoded(\"abc\")).isAbsolute());\n assertFalse(new St... | {
"fields": [
{
"declarator": "mPathSegments",
"modifier": "private final",
"original_string": "private final UriEncoded[] mPathSegments;",
"type": "UriEncoded[]",
"var_name": "mPathSegments"
}
],
"file": "rfc3986-uri/src/main/java/org/dmfs/rfc3986/paths/StructuredPath.java",... | {
"body": "@Override\n public boolean isAbsolute()\n {\n return mPathSegments.length > 0 && IdempotentEncoded.EMPTY.equals(mPathSegments[0]);\n }",
"class_method_signature": "StructuredPath.isAbsolute()",
"constructor": false,
"full_signature": "@Override public boolean isAbsolute()",
"identif... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 81143147,
"size": 150,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/dmfs/uri-toolkit"
} |
81143147_76 | {
"fields": [],
"file": "rfc3986-uri/src/test/java/org/dmfs/rfc3986/parameters/parameters/UrlEncodedParameterTest.java",
"identifier": "UrlEncodedParameterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void name() throws Exception\n {\n assertEquals(\"test\", new UrlEncodedParameter(new Precoded(\"test\")).name().toString());\n assertEquals(\"testa\", new UrlEncodedParameter(new Precoded(\"test%61\")).name().toString());\n assertEquals(\"test=\", new UrlEncodedPa... | {
"fields": [
{
"declarator": "mEncodedParameter",
"modifier": "private final",
"original_string": "private final CharSequence mEncodedParameter;",
"type": "CharSequence",
"var_name": "mEncodedParameter"
},
{
"declarator": "mCharSet",
"modifier": "private final",
... | {
"body": "@Override\n public CharSequence name()\n {\n parse();\n try\n {\n return mName.decoded(mCharSet);\n }\n catch (UnsupportedEncodingException e)\n {\n // this should not happen since we've already tried to load the charset in the construct... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 81143147,
"size": 150,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/dmfs/uri-toolkit"
} |
81143147_77 | {
"fields": [],
"file": "rfc3986-uri/src/test/java/org/dmfs/rfc3986/parameters/parameters/UrlEncodedParameterTest.java",
"identifier": "UrlEncodedParameterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void textValue() throws Exception\n {\n assertEquals(\"\", new UrlEncodedParameter(new Precoded(\"test\")).textValue().toString());\n assertEquals(\"\", new UrlEncodedParameter(new Precoded(\"test%61\")).textValue().toString());\n assertEquals(\"\", new UrlEncodedP... | {
"fields": [
{
"declarator": "mEncodedParameter",
"modifier": "private final",
"original_string": "private final CharSequence mEncodedParameter;",
"type": "CharSequence",
"var_name": "mEncodedParameter"
},
{
"declarator": "mCharSet",
"modifier": "private final",
... | {
"body": "@Override\n public CharSequence textValue()\n {\n parse();\n try\n {\n return mValue.decoded(mCharSet);\n }\n catch (UnsupportedEncodingException e)\n {\n // this should not happen since we've already tried to load the charset in the con... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 81143147,
"size": 150,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/dmfs/uri-toolkit"
} |
81143147_20 | {
"fields": [],
"file": "rfc3986-uri/src/test/java/org/dmfs/rfc3986/paths/StructuredPathTest.java",
"identifier": "StructuredPathTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIsEmpty() throws Exception\n {\n assertTrue(new StructuredPath().isEmpty());\n assertFalse(new StructuredPath(IdempotentEncoded.CURRENT).isEmpty());\n assertFalse(new StructuredPath(new Encoded(\"abc\")).isEmpty());\n assertFalse(new StructuredPath(... | {
"fields": [
{
"declarator": "mPathSegments",
"modifier": "private final",
"original_string": "private final UriEncoded[] mPathSegments;",
"type": "UriEncoded[]",
"var_name": "mPathSegments"
}
],
"file": "rfc3986-uri/src/main/java/org/dmfs/rfc3986/paths/StructuredPath.java",... | {
"body": "@Override\n public boolean isEmpty()\n {\n return mPathSegments.length == 0;\n }",
"class_method_signature": "StructuredPath.isEmpty()",
"constructor": false,
"full_signature": "@Override public boolean isEmpty()",
"identifier": "isEmpty",
"invocations": [],
"modifiers": "@Overr... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 81143147,
"size": 150,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/dmfs/uri-toolkit"
} |
81143147_36 | {
"fields": [],
"file": "rfc3986-uri/src/test/java/org/dmfs/rfc3986/uris/LazyUriTest.java",
"identifier": "LazyUriTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void scheme() throws Exception\n {\n assertEquals(\"http\", new LazyUri(new Precoded(\"http://example.com\")).scheme().value().toString());\n assertEquals(\"http\", new LazyUri(new Precoded(\"http://example.com/path\")).scheme().value().toString());\n assertEquals(... | {
"fields": [
{
"declarator": "mUriEncoded",
"modifier": "private final",
"original_string": "private final UriEncoded mUriEncoded;",
"type": "UriEncoded",
"var_name": "mUriEncoded"
},
{
"declarator": "mOptionalScheme",
"modifier": "private final",
"original... | {
"body": "@Override\n public Optional<? extends Scheme> scheme()\n {\n return mOptionalScheme;\n }",
"class_method_signature": "LazyUri.scheme()",
"constructor": false,
"full_signature": "@Override public Optional<? extends Scheme> scheme()",
"identifier": "scheme",
"invocations": [],
"mo... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 81143147,
"size": 150,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/dmfs/uri-toolkit"
} |
81143147_61 | {
"fields": [],
"file": "rfc3986-uri/src/test/java/org/dmfs/rfc3986/schemes/StringSchemeTest.java",
"identifier": "StringSchemeTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSubSequence() throws Exception\n {\n assertEquals(\"tt\", new StringScheme(\"http\").subSequence(1, 3).toString());\n }",
"class_method_signature": "StringSchemeTest.testSubSequence()",
"constructor": false,
"full_signature": "@Test public void testSubSequence(... | {
"fields": [
{
"declarator": "mScheme",
"modifier": "private final",
"original_string": "private final CharSequence mScheme;",
"type": "CharSequence",
"var_name": "mScheme"
}
],
"file": "rfc3986-uri/src/main/java/org/dmfs/rfc3986/schemes/StringScheme.java",
"identifier": "... | {
"body": "@Override\n public CharSequence subSequence(int i, int i1)\n {\n return mScheme.subSequence(i, i1);\n }",
"class_method_signature": "StringScheme.subSequence(int i, int i1)",
"constructor": false,
"full_signature": "@Override public CharSequence subSequence(int i, int i1)",
"identif... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 81143147,
"size": 150,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/dmfs/uri-toolkit"
} |
81143147_16 | {
"fields": [],
"file": "rfc3986-uri/src/test/java/org/dmfs/rfc3986/paths/EncodedPathTest.java",
"identifier": "EncodedPathTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void iterator() throws Exception\n {\n\n }",
"class_method_signature": "EncodedPathTest.iterator()",
"constructor": false,
"full_signature": "@Test public void iterator()",
"identifier": "iterator",
"invocations": [],
"modifiers": "@Test public",
"parameters": "()",
... | {
"fields": [
{
"declarator": "CONVERTER = new AbstractConvertedIterator.Converter<UriEncoded, CharSequence>()\n {\n @Override\n public UriEncoded convert(CharSequence element)\n {\n return new Precoded(element);\n }\n }",
"modifier": "private final static"... | {
"body": "@Override\n public Iterator<UriEncoded> iterator()\n {\n if (isEmpty())\n {\n return EmptyIterator.instance();\n }\n return new ConvertedIterator<>(new Split(mPath, '/'), CONVERTER);\n }",
"class_method_signature": "EncodedPath.iterator()",
"constructor":... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 81143147,
"size": 150,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/dmfs/uri-toolkit"
} |
81143147_41 | {
"fields": [],
"file": "rfc3986-uri/src/test/java/org/dmfs/rfc3986/uris/LazyUriTest.java",
"identifier": "LazyUriTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void isHierarchical() throws Exception\n {\n assertFalse(new LazyUri(new Precoded(\"mailto:test@example.com\")).isHierarchical());\n assertTrue(new LazyUri(new Precoded(\"http://www.example.com/\")).isHierarchical());\n }",
"class_method_signature": "LazyUriTest.isHi... | {
"fields": [
{
"declarator": "mUriEncoded",
"modifier": "private final",
"original_string": "private final UriEncoded mUriEncoded;",
"type": "UriEncoded",
"var_name": "mUriEncoded"
},
{
"declarator": "mOptionalScheme",
"modifier": "private final",
"original... | {
"body": "@Override\n public boolean isHierarchical()\n {\n return !mOptionalScheme.isPresent() || authority().isPresent() || path().isAbsolute();\n }",
"class_method_signature": "LazyUri.isHierarchical()",
"constructor": false,
"full_signature": "@Override public boolean isHierarchical()",
"... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 81143147,
"size": 150,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/dmfs/uri-toolkit"
} |
81143147_57 | {
"fields": [],
"file": "rfc3986-uri/src/test/java/org/dmfs/rfc3986/authorities/OptionalLazyAuthorityTest.java",
"identifier": "OptionalLazyAuthorityTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIsPresent() throws Exception\n {\n assertTrue(new OptionalLazyAuthority(new Precoded(\"//\")).isPresent());\n assertTrue(new OptionalLazyAuthority(new Precoded(\"//test\")).isPresent());\n assertTrue(new OptionalLazyAuthority(new Precoded(\"//test:123\")).... | {
"fields": [
{
"declarator": "mUriEncoded",
"modifier": "private final",
"original_string": "private final UriEncoded mUriEncoded;",
"type": "UriEncoded",
"var_name": "mUriEncoded"
},
{
"declarator": "mOptionalAuthority",
"modifier": "private",
"original_st... | {
"body": "@Override\n public boolean isPresent()\n {\n return authority().isPresent();\n }",
"class_method_signature": "OptionalLazyAuthority.isPresent()",
"constructor": false,
"full_signature": "@Override public boolean isPresent()",
"identifier": "isPresent",
"invocations": [
"isPres... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 81143147,
"size": 150,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/dmfs/uri-toolkit"
} |
81143147_1 | {
"fields": [],
"file": "rfc3986-uri/src/test/java/org/dmfs/rfc3986/encoding/EncodedTest.java",
"identifier": "EncodedTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testToString() throws Exception\n {\n assertEquals(\"\", new Encoded(\"\").toString());\n assertEquals(\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\",\n new Encoded(\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\")... | {
"fields": [
{
"declarator": "mPlain",
"modifier": "private final",
"original_string": "private final CharSequence mPlain;",
"type": "CharSequence",
"var_name": "mPlain"
},
{
"declarator": "mCharSet",
"modifier": "private final",
"original_string": "private... | {
"body": "@Override\n public String toString()\n {\n if (mEncoded == null)\n {\n try\n {\n mEncoded = encoded(mPlain, mCharSet);\n }\n catch (UnsupportedEncodingException e)\n {\n throw new IllegalArgumentExcepti... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 81143147,
"size": 150,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/dmfs/uri-toolkit"
} |
81143147_66 | {
"fields": [],
"file": "rfc3986-uri/src/test/java/org/dmfs/rfc3986/schemes/StringSchemeTest.java",
"identifier": "StringSchemeTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testToStringIllegalChar() throws Exception\n {\n new StringScheme(\"http_\").toString();\n }",
"class_method_signature": "StringSchemeTest.testToStringIllegalChar()",
"constructor": false,
"full_signature": "@Test(expected... | {
"fields": [
{
"declarator": "mScheme",
"modifier": "private final",
"original_string": "private final CharSequence mScheme;",
"type": "CharSequence",
"var_name": "mScheme"
}
],
"file": "rfc3986-uri/src/main/java/org/dmfs/rfc3986/schemes/StringScheme.java",
"identifier": "... | {
"body": "@Override\n public String toString()\n {\n return mScheme.toString();\n }",
"class_method_signature": "StringScheme.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"invocations": [
"toString"
],
"modifier... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 81143147,
"size": 150,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/dmfs/uri-toolkit"
} |
81143147_31 | {
"fields": [],
"file": "rfc3986-uri/src/test/java/org/dmfs/rfc3986/paths/NormalizedTest.java",
"identifier": "NormalizedTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIsAbsolute() throws Exception\n {\n assertFalse(new Normalized(new EncodedPath(new Precoded(\"abc\"))).isAbsolute());\n assertTrue(new Normalized(new EncodedPath(new Precoded(\"/\"))).isAbsolute());\n }",
"class_method_signature": "NormalizedTest.testIsAbsol... | {
"fields": [
{
"declarator": "mDelegate",
"modifier": "private final",
"original_string": "private final Path mDelegate;",
"type": "Path",
"var_name": "mDelegate"
}
],
"file": "rfc3986-uri/src/main/java/org/dmfs/rfc3986/paths/Normalized.java",
"identifier": "Normalized",
... | {
"body": "@Override\n public boolean isAbsolute()\n {\n return mDelegate.isAbsolute();\n }",
"class_method_signature": "Normalized.isAbsolute()",
"constructor": false,
"full_signature": "@Override public boolean isAbsolute()",
"identifier": "isAbsolute",
"invocations": [
"isAbsolute"
... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 81143147,
"size": 150,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/dmfs/uri-toolkit"
} |
81143147_27 | {
"fields": [],
"file": "rfc3986-uri/src/test/java/org/dmfs/rfc3986/paths/ExtendedTest.java",
"identifier": "ExtendedTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void isEmpty() throws Exception\n {\n assertTrue(new Extended(EmptyPath.INSTANCE, EmptyPath.INSTANCE).isEmpty());\n assertFalse(new Extended(EmptyPath.INSTANCE, new EncodedPath(new Precoded(\"abc/def\"))).isEmpty());\n assertFalse(new Extended(new EncodedPath(new P... | {
"fields": [
{
"declarator": "mDelegate",
"modifier": "private final",
"original_string": "private final Path mDelegate;",
"type": "Path",
"var_name": "mDelegate"
},
{
"declarator": "mNewSegments",
"modifier": "private final",
"original_string": "private fi... | {
"body": "@Override\n public boolean isEmpty()\n {\n return mDelegate.isEmpty() && !mNewSegments.iterator().hasNext();\n }",
"class_method_signature": "Extended.isEmpty()",
"constructor": false,
"full_signature": "@Override public boolean isEmpty()",
"identifier": "isEmpty",
"invocations": ... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 81143147,
"size": 150,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/dmfs/uri-toolkit"
} |
81143147_70 | {
"fields": [],
"file": "rfc3986-uri/src/test/java/org/dmfs/rfc3986/schemes/OptionalLazySchemeTest.java",
"identifier": "OptionalLazySchemeTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = NoSuchElementException.class)\n public void valueFail2() throws Exception\n {\n new OptionalLazyScheme(new Precoded(\"\")).value();\n }",
"class_method_signature": "OptionalLazySchemeTest.valueFail2()",
"constructor": false,
"full_signature": "@Test(expected = NoSuchE... | {
"fields": [
{
"declarator": "mUriEncoded",
"modifier": "private final",
"original_string": "private final UriEncoded mUriEncoded;",
"type": "UriEncoded",
"var_name": "mUriEncoded"
},
{
"declarator": "mOptionalScheme",
"modifier": "private",
"original_strin... | {
"body": "@Override\n public Scheme value(Scheme defaultValue)\n {\n return scheme().value(defaultValue);\n }",
"class_method_signature": "OptionalLazyScheme.value(Scheme defaultValue)",
"constructor": false,
"full_signature": "@Override public Scheme value(Scheme defaultValue)",
"identifier"... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 81143147,
"size": 150,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/dmfs/uri-toolkit"
} |
81143147_6 | {
"fields": [],
"file": "rfc3986-uri/src/test/java/org/dmfs/rfc3986/encoding/PrecodedTest.java",
"identifier": "PrecodedTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void charAt() throws Exception\n {\n\n }",
"class_method_signature": "PrecodedTest.charAt()",
"constructor": false,
"full_signature": "@Test public void charAt()",
"identifier": "charAt",
"invocations": [],
"modifiers": "@Test public",
"parameters": "()",
"return": "... | {
"fields": [
{
"declarator": "mEncoded",
"modifier": "private final",
"original_string": "private final CharSequence mEncoded;",
"type": "CharSequence",
"var_name": "mEncoded"
},
{
"declarator": "mStart",
"modifier": "private final",
"original_string": "pri... | {
"body": "@Override\n public char charAt(int i)\n {\n if (i < 0)\n {\n throw new ArrayIndexOutOfBoundsException(String.format(\"Index %d is negative.\", i));\n }\n if (mStart + i >= mEnd)\n {\n throw new ArrayIndexOutOfBoundsException(String.format(\"Ind... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 81143147,
"size": 150,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/dmfs/uri-toolkit"
} |
81143147_50 | {
"fields": [],
"file": "rfc3986-uri/src/test/java/org/dmfs/rfc3986/uris/EmptyUriTest.java",
"identifier": "EmptyUriTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIsAbsolute() throws Exception\n {\n assertFalse(new EmptyUri().isAbsolute());\n }",
"class_method_signature": "EmptyUriTest.testIsAbsolute()",
"constructor": false,
"full_signature": "@Test public void testIsAbsolute()",
"identifier": "testIsAbsolute",
"inv... | {
"fields": [
{
"declarator": "INSTANCE = new EmptyUri()",
"modifier": "public final static",
"original_string": "public final static EmptyUri INSTANCE = new EmptyUri();",
"type": "EmptyUri",
"var_name": "INSTANCE"
}
],
"file": "rfc3986-uri/src/main/java/org/dmfs/rfc3986/uris... | {
"body": "@Override\n public boolean isAbsolute()\n {\n return false;\n }",
"class_method_signature": "EmptyUri.isAbsolute()",
"constructor": false,
"full_signature": "@Override public boolean isAbsolute()",
"identifier": "isAbsolute",
"invocations": [],
"modifiers": "@Override public",
... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 81143147,
"size": 150,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/dmfs/uri-toolkit"
} |
81143147_46 | {
"fields": [],
"file": "rfc3986-uri/src/test/java/org/dmfs/rfc3986/uris/EmptyUriTest.java",
"identifier": "EmptyUriTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testPath() throws Exception\n {\n assertTrue(new EmptyUri().path().isEmpty());\n }",
"class_method_signature": "EmptyUriTest.testPath()",
"constructor": false,
"full_signature": "@Test public void testPath()",
"identifier": "testPath",
"invocations": [
"ass... | {
"fields": [
{
"declarator": "INSTANCE = new EmptyUri()",
"modifier": "public final static",
"original_string": "public final static EmptyUri INSTANCE = new EmptyUri();",
"type": "EmptyUri",
"var_name": "INSTANCE"
}
],
"file": "rfc3986-uri/src/main/java/org/dmfs/rfc3986/uris... | {
"body": "@Override\n public Path path()\n {\n return EmptyPath.INSTANCE;\n }",
"class_method_signature": "EmptyUri.path()",
"constructor": false,
"full_signature": "@Override public Path path()",
"identifier": "path",
"invocations": [],
"modifiers": "@Override public",
"parameters": "(... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 81143147,
"size": 150,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/dmfs/uri-toolkit"
} |
81143147_11 | {
"fields": [],
"file": "rfc3986-uri/src/test/java/org/dmfs/rfc3986/encoding/PrecodedTest.java",
"identifier": "PrecodedTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDecoded() throws Exception\n {\n assertEquals(\"\", new Precoded(\"\").decoded());\n assertEquals(\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\",\n new Precoded(\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\")... | {
"fields": [
{
"declarator": "mEncoded",
"modifier": "private final",
"original_string": "private final CharSequence mEncoded;",
"type": "CharSequence",
"var_name": "mEncoded"
},
{
"declarator": "mStart",
"modifier": "private final",
"original_string": "pri... | {
"body": "@Override\n public CharSequence decoded(String charset) throws UnsupportedEncodingException\n {\n if (\"UTF-8\".equalsIgnoreCase(charset))\n {\n return decoded();\n }\n return decoded(mEncoded, mStart, mEnd, charset);\n }",
"class_method_signature": "Precod... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 81143147,
"size": 150,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/dmfs/uri-toolkit"
} |
81143147_10 | {
"fields": [],
"file": "rfc3986-uri/src/test/java/org/dmfs/rfc3986/encoding/PrecodedTest.java",
"identifier": "PrecodedTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void normalized() throws Exception\n {\n assertEquals(\"\", new Precoded(\"\").normalized().toString());\n assertEquals(\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\",\n new Precoded(\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP... | {
"fields": [
{
"declarator": "mEncoded",
"modifier": "private final",
"original_string": "private final CharSequence mEncoded;",
"type": "CharSequence",
"var_name": "mEncoded"
},
{
"declarator": "mStart",
"modifier": "private final",
"original_string": "pri... | {
"body": "@Override\n public UriEncoded normalized()\n {\n if (mNormalized == null)\n {\n mNormalized = new Normalized(this);\n }\n return mNormalized;\n }",
"class_method_signature": "Precoded.normalized()",
"constructor": false,
"full_signature": "@Override pub... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 81143147,
"size": 150,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/dmfs/uri-toolkit"
} |
81143147_47 | {
"fields": [],
"file": "rfc3986-uri/src/test/java/org/dmfs/rfc3986/uris/EmptyUriTest.java",
"identifier": "EmptyUriTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testQuery() throws Exception\n {\n assertFalse(new EmptyUri().query().isPresent());\n }",
"class_method_signature": "EmptyUriTest.testQuery()",
"constructor": false,
"full_signature": "@Test public void testQuery()",
"identifier": "testQuery",
"invocations": [
... | {
"fields": [
{
"declarator": "INSTANCE = new EmptyUri()",
"modifier": "public final static",
"original_string": "public final static EmptyUri INSTANCE = new EmptyUri();",
"type": "EmptyUri",
"var_name": "INSTANCE"
}
],
"file": "rfc3986-uri/src/main/java/org/dmfs/rfc3986/uris... | {
"body": "@Override\n public Optional<? extends Query> query()\n {\n return absent();\n }",
"class_method_signature": "EmptyUri.query()",
"constructor": false,
"full_signature": "@Override public Optional<? extends Query> query()",
"identifier": "query",
"invocations": [
"absent"
],
... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 81143147,
"size": 150,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/dmfs/uri-toolkit"
} |
81143147_51 | {
"fields": [],
"file": "rfc3986-uri/src/test/java/org/dmfs/rfc3986/authorities/TextTest.java",
"identifier": "TextTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testLength() throws Exception\n {\n assertEquals(0, new Text(new StructuredAuthority(new Precoded(\"\"))).length());\n assertEquals(4, new Text(new StructuredAuthority(new Precoded(\"host\"))).length());\n assertEquals(8, new Text(new StructuredAuthority(new P... | {
"fields": [
{
"declarator": "mDelegate",
"modifier": "private final",
"original_string": "private final Authority mDelegate;",
"type": "Authority",
"var_name": "mDelegate"
},
{
"declarator": "mText",
"modifier": "private",
"original_string": "private Strin... | {
"body": "@Override\n public int length()\n {\n if (mText == null)\n {\n // result not cached yet, calculate the length on the fly\n int len = mDelegate.host().length();\n if (mDelegate.userInfo().isPresent())\n {\n len += mDelegate.userI... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 81143147,
"size": 150,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/dmfs/uri-toolkit"
} |
81143147_7 | {
"fields": [],
"file": "rfc3986-uri/src/test/java/org/dmfs/rfc3986/encoding/PrecodedTest.java",
"identifier": "PrecodedTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void subSequence() throws Exception\n {\n assertEquals(new Precoded(\"123\"), new Precoded(\"abc123xyz\").subSequence(3, 6));\n assertEquals(\"123\", new Precoded(\"abc123xyz\").subSequence(3, 6).toString());\n }",
"class_method_signature": "PrecodedTest.subSequence(... | {
"fields": [
{
"declarator": "mEncoded",
"modifier": "private final",
"original_string": "private final CharSequence mEncoded;",
"type": "CharSequence",
"var_name": "mEncoded"
},
{
"declarator": "mStart",
"modifier": "private final",
"original_string": "pri... | {
"body": "@Override\n public UriEncoded subSequence(int startIndex, int endIndex)\n {\n if (startIndex == 0 && endIndex == length())\n {\n return this;\n }\n if (endIndex < startIndex)\n {\n throw new ArrayIndexOutOfBoundsException(String.format(\"Start ... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 81143147,
"size": 150,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/dmfs/uri-toolkit"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.