id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
207726223_5 | {
"fields": [],
"file": "tubemq-client/src/test/java/com/tencent/tubemq/client/consumer/PartitionExtTest.java",
"identifier": "PartitionExtTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testPartitionExtError() {\n FlowCtrlRuleHandler groupFlowCtrlRuleHandler = new FlowCtrlRuleHandler(false);\n FlowCtrlRuleHandler defFlowCtrlRuleHandler = new FlowCtrlRuleHandler(true);\n PartitionExt partition = new PartitionExt(\n groupFlowCtrlRul... | {
"fields": [
{
"declarator": "serialVersionUID = 7587342323917872253L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 7587342323917872253L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "group... | {
"body": "public void setPullTempData(int reqProcType, int errCode,\n boolean isEscLimit, int msgSize,\n long limitDlt, long curDataDlt,\n boolean isRequireSlow) {\n this.lastRptTIme = System.currentTimeMillis();\n ... | {
"created": null,
"fork": null,
"fork_count": 385,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 207726223,
"size": 15756,
"stargazer_count": 1952,
"stars": null,
"updates": null,
"url": "https://github.com/Tencent/TubeMQ"
} |
207726223_20 | {
"fields": [],
"file": "tubemq-server/src/test/java/com/tencent/tubemq/server/broker/utils/DataStoreUtilsTest.java",
"identifier": "DataStoreUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void getInt() {\n ByteBuffer bf = ByteBuffer.allocate(100);\n bf.putInt(123);\n byte[] data = bf.array();\n int offset = 0;\n int val = DataStoreUtils.getInt(offset, data);\n // get int by DataStoreUtils\n Assert.isTrue(val == 123);\n }"... | {
"fields": [
{
"declarator": "MAX_MSG_TRANSFER_SIZE = 1024 * 1024",
"modifier": "public static final",
"original_string": "public static final int MAX_MSG_TRANSFER_SIZE = 1024 * 1024;",
"type": "int",
"var_name": "MAX_MSG_TRANSFER_SIZE"
},
{
"declarator": "MAX_MSG_DATA... | {
"body": "public static int getInt(final int offset, final byte[] data) {\n return ByteBuffer.wrap(data, offset, 4).getInt();\n }",
"class_method_signature": "DataStoreUtils.getInt(final int offset, final byte[] data)",
"constructor": false,
"full_signature": "public static int getInt(final int offse... | {
"created": null,
"fork": null,
"fork_count": 385,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 207726223,
"size": 15756,
"stargazer_count": 1952,
"stars": null,
"updates": null,
"url": "https://github.com/Tencent/TubeMQ"
} |
207726223_9 | {
"fields": [],
"file": "tubemq-client/src/test/java/com/tencent/tubemq/client/producer/RoundRobinPartitionRouterTest.java",
"identifier": "RoundRobinPartitionRouterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = TubeClientException.class)\n public void testGetPartitionInvalidInput() throws TubeClientException {\n RoundRobinPartitionRouter router = new RoundRobinPartitionRouter();\n Message message = new Message(\"test\", new byte[]{1, 2, 3});\n List<Partition> partitions = ... | {
"fields": [
{
"declarator": "logger =\n LoggerFactory.getLogger(RoundRobinPartitionRouter.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger =\n LoggerFactory.getLogger(RoundRobinPartitionRouter.class);",
"type": "Log... | {
"body": "@Override\n public Partition getPartition(final Message message, final List<Partition> partitions) throws TubeClientException {\n if (partitions == null || partitions.isEmpty()) {\n throw new TubeClientException(new StringBuilder(512)\n .append(\"No available partiti... | {
"created": null,
"fork": null,
"fork_count": 385,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 207726223,
"size": 15756,
"stargazer_count": 1952,
"stars": null,
"updates": null,
"url": "https://github.com/Tencent/TubeMQ"
} |
207726223_16 | {
"fields": [
{
"declarator": "fileSegmentList",
"modifier": "",
"original_string": "FileSegmentList fileSegmentList;",
"type": "FileSegmentList",
"var_name": "fileSegmentList"
}
],
"file": "tubemq-server/src/test/java/com/tencent/tubemq/server/broker/msgstore/disk/FileSegmen... | {
"body": "@Test\n public void getView() {\n File dir = new File(\"src/test/resource/data\");\n dir.mkdir();\n try {\n File file =\n new File(\"src/test/resource/data\",\n DataStoreUtils.nameFromOffset(0L, DataStoreUtils.DATA_FILE_SUFFIX... | {
"fields": [
{
"declarator": "logger =\n LoggerFactory.getLogger(FileSegmentList.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger =\n LoggerFactory.getLogger(FileSegmentList.class);",
"type": "Logger",
"var_nam... | {
"body": "@Override\n public List<Segment> getView() {\n return segmentList.get();\n }",
"class_method_signature": "FileSegmentList.getView()",
"constructor": false,
"full_signature": "@Override public List<Segment> getView()",
"identifier": "getView",
"invocations": [
"get"
],
"modifi... | {
"created": null,
"fork": null,
"fork_count": 385,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 207726223,
"size": 15756,
"stargazer_count": 1952,
"stars": null,
"updates": null,
"url": "https://github.com/Tencent/TubeMQ"
} |
207726223_2 | {
"fields": [],
"file": "tubemq-client/src/test/java/com/tencent/tubemq/client/factory/TubeBaseSessionFactoryTest.java",
"identifier": "TubeBaseSessionFactoryTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testTubeBaseSessionFactory() throws Exception {\n TubeClientConfig config = mock(TubeClientConfig.class);\n when(config.getMasterInfo()).thenReturn(new MasterInfo(\"192.168.1.1:18080\"));\n\n ClientFactory clientFactory = mock(ClientFactory.class);\n Power... | {
"fields": [
{
"declarator": "logger =\n LoggerFactory.getLogger(TubeBaseSessionFactory.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger =\n LoggerFactory.getLogger(TubeBaseSessionFactory.class);",
"type": "Logger",
... | {
"body": "public TubeBaseSessionFactory(final ClientFactory clientFactory,\n final TubeClientConfig tubeClientConfig) throws TubeClientException {\n super();\n this.checkConfig(tubeClientConfig);\n this.tubeClientConfig = tubeClientConfig;\n RpcConfig conf... | {
"created": null,
"fork": null,
"fork_count": 385,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 207726223,
"size": 15756,
"stargazer_count": 1952,
"stars": null,
"updates": null,
"url": "https://github.com/Tencent/TubeMQ"
} |
207726223_11 | {
"fields": [],
"file": "tubemq-core/src/test/java/com/tencent/tubemq/corerpc/netty/NettyProtocolEncoderTest.java",
"identifier": "NettyProtocolEncoderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void encode() {\n NettyProtocolEncoder nettyProtocolEncoder = new NettyProtocolEncoder();\n // build RpcDataPack\n RpcDataPack obj = new RpcDataPack();\n // set serial number\n obj.setSerialNo(123);\n List<ByteBuffer> dataList = new LinkedList<Byt... | {
"fields": [],
"file": "tubemq-core/src/main/java/com/tencent/tubemq/corerpc/netty/NettyProtocolEncoder.java",
"identifier": "NettyProtocolEncoder",
"interfaces": "",
"methods": [
{
"class_method_signature": "NettyProtocolEncoder.encode(ChannelHandlerContext ctx,\n Channe... | {
"body": "@Override\n protected Object encode(ChannelHandlerContext ctx,\n Channel channel, Object msg) throws Exception {\n RpcDataPack dataPack = (RpcDataPack) msg;\n List<ByteBuffer> origs = dataPack.getDataLst();\n List<ByteBuffer> bbs = new ArrayList<ByteBuffer... | {
"created": null,
"fork": null,
"fork_count": 385,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 207726223,
"size": 15756,
"stargazer_count": 1952,
"stars": null,
"updates": null,
"url": "https://github.com/Tencent/TubeMQ"
} |
207726223_10 | {
"fields": [],
"file": "tubemq-client/src/test/java/com/tencent/tubemq/client/producer/RoundRobinPartitionRouterTest.java",
"identifier": "RoundRobinPartitionRouterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetPartition() throws TubeClientException {\n RoundRobinPartitionRouter router = new RoundRobinPartitionRouter();\n Message message = new Message(\"test\", new byte[]{1, 2, 3});\n List<Partition> partitions = new ArrayList<Partition>();\n Partition par... | {
"fields": [
{
"declarator": "logger =\n LoggerFactory.getLogger(RoundRobinPartitionRouter.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger =\n LoggerFactory.getLogger(RoundRobinPartitionRouter.class);",
"type": "Log... | {
"body": "@Override\n public Partition getPartition(final Message message, final List<Partition> partitions) throws TubeClientException {\n if (partitions == null || partitions.isEmpty()) {\n throw new TubeClientException(new StringBuilder(512)\n .append(\"No available partiti... | {
"created": null,
"fork": null,
"fork_count": 385,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 207726223,
"size": 15756,
"stargazer_count": 1952,
"stars": null,
"updates": null,
"url": "https://github.com/Tencent/TubeMQ"
} |
207726223_3 | {
"fields": [],
"file": "tubemq-client/src/test/java/com/tencent/tubemq/client/consumer/PartitionExtTest.java",
"identifier": "PartitionExtTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testPartitionExt() {\n FlowCtrlRuleHandler groupFlowCtrlRuleHandler = new FlowCtrlRuleHandler(false);\n FlowCtrlRuleHandler defFlowCtrlRuleHandler = new FlowCtrlRuleHandler(true);\n PartitionExt partition = new PartitionExt(\n groupFlowCtrlRuleHand... | {
"fields": [
{
"declarator": "serialVersionUID = 7587342323917872253L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 7587342323917872253L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "group... | {
"body": "public PartitionExt(final FlowCtrlRuleHandler groupFlowCtrlRuleHandler,\n final FlowCtrlRuleHandler defFlowCtrlRuleHandler,\n final BrokerInfo broker, final String topic, final int partitionId) {\n super(broker, topic, partitionId);\n this.groupFl... | {
"created": null,
"fork": null,
"fork_count": 385,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 207726223,
"size": 15756,
"stargazer_count": 1952,
"stars": null,
"updates": null,
"url": "https://github.com/Tencent/TubeMQ"
} |
48675485_89 | {
"fields": [
{
"declarator": "contextFilter = new ContextFilter()",
"modifier": "",
"original_string": "Filter contextFilter = new ContextFilter();",
"type": "Filter",
"var_name": "contextFilter"
},
{
"declarator": "invoker",
"modifier": "",
"... | {
"body": "@Test\n public void testWithAttachments() {\n URL url = URL.valueOf(\"test://test:11/test?group=dubbo&version=1.1\");\n Invoker<DemoService> invoker = new MyInvoker<DemoService>(url);\n Invocation invocation = new MockInvocation();\n Result result = contextFilter.invoke(invok... | {
"fields": [],
"file": "dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/filter/ContextFilter.java",
"identifier": "ContextFilter",
"interfaces": "implements Filter",
"methods": [
{
"class_method_signature": "ContextFilter.invoke(Invoker<?> invoker, Invocation invocation)",
"constr... | {
"body": "public Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException {\n Map<String, String> attachments = invocation.getAttachments();\n if (attachments != null) {\n attachments = new HashMap<String, String>(attachments);\n attachments.remove(Constants.PA... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 48675485,
"size": 4018,
"stargazer_count": 7,
"stars": null,
"updates": null,
"url": "https://github.com/spccold/dubbo-comments"
} |
48675485_88 | {
"fields": [
{
"declarator": "contextFilter = new ContextFilter()",
"modifier": "",
"original_string": "Filter contextFilter = new ContextFilter();",
"type": "Filter",
"var_name": "contextFilter"
},
{
"declarator": "invoker",
"modifier": "",
"... | {
"body": "@SuppressWarnings(\"unchecked\")\n @Test\n public void testSetContext() {\n invocation = EasyMock.createMock(Invocation.class);\n EasyMock.expect(invocation.getMethodName()).andReturn(\"$enumlength\").anyTimes();\n EasyMock.expect(invocation.getParameterTypes()).andReturn(new Cla... | {
"fields": [],
"file": "dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/filter/ContextFilter.java",
"identifier": "ContextFilter",
"interfaces": "implements Filter",
"methods": [
{
"class_method_signature": "ContextFilter.invoke(Invoker<?> invoker, Invocation invocation)",
"constr... | {
"body": "public Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException {\n Map<String, String> attachments = invocation.getAttachments();\n if (attachments != null) {\n attachments = new HashMap<String, String>(attachments);\n attachments.remove(Constants.PA... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 48675485,
"size": 4018,
"stargazer_count": 7,
"stars": null,
"updates": null,
"url": "https://github.com/spccold/dubbo-comments"
} |
180317496_1 | {
"fields": [],
"file": "Chapter04/websockets/customer-service/src/test/java/com/packt/quarkus/chapter4/CustomerEndpointTest.java",
"identifier": "CustomerEndpointTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCustomerService() {\n\n JsonObject obj = Json.createObjectBuilder()\n .add(\"name\", \"John\")\n .add(\"surname\", \"Smith\").build();\n\n // Test POST\n given()\n .contentType(\"application/json\")\n ... | {
"fields": [
{
"declarator": "customerRepository",
"modifier": "@Inject",
"original_string": "@Inject CustomerRepository customerRepository;",
"type": "CustomerRepository",
"var_name": "customerRepository"
}
],
"file": "Chapter04/websockets/customer-service/src/main/java/com... | {
"body": "@DELETE\n public Response delete(@QueryParam(\"id\") Integer customerId) {\n customerRepository.deleteCustomer(customerId);\n return Response.status(204).build();\n }",
"class_method_signature": "CustomerEndpoint.delete(@QueryParam(\"id\") Integer customerId)",
"constructor": false,... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 180317496,
"size": 18296,
"stargazer_count": 33,
"stars": null,
"updates": null,
"url": "https://github.com/PacktPublishing/Hands-On-Cloud-Native-Applications-with-Java-and-... |
180317496_14 | {
"fields": [],
"file": "Chapter09/axle/customer-service/src/test/java/com/packt/quarkus/chapter9/CustomerEndpointTest.java",
"identifier": "CustomerEndpointTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCustomerService() {\n\n JsonObject obj = Json.createObjectBuilder()\n .add(\"name\", \"John\")\n .add(\"surname\", \"Smith\").build();\n\n // Test POST\n given()\n .contentType(\"application/json\")\n ... | {
"fields": [
{
"declarator": "customerRepository",
"modifier": "@Inject",
"original_string": "@Inject CustomerRepository customerRepository;",
"type": "CustomerRepository",
"var_name": "customerRepository"
},
{
"declarator": "bus",
"modifier": "@Inject",
"o... | {
"body": "@DELETE\n public Response delete(@QueryParam(\"id\") Integer customerId) {\n customerRepository.deleteCustomer(customerId);\n return Response.status(204).build();\n }",
"class_method_signature": "CustomerEndpoint.delete(@QueryParam(\"id\") Integer customerId)",
"constructor": false,... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 180317496,
"size": 18296,
"stargazer_count": 33,
"stars": null,
"updates": null,
"url": "https://github.com/PacktPublishing/Hands-On-Cloud-Native-Applications-with-Java-and-... |
180317496_7 | {
"fields": [],
"file": "Chapter06/fault-tolerance/src/test/java/com/packt/quarkus/chapter6/CustomerEndpointTest.java",
"identifier": "CustomerEndpointTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCustomerService() {\n\n given()\n .when().get(\"/customers\")\n .then()\n .statusCode(200)\n .body(\"$.size()\", is(2));\n\n\n JsonObject objOrder = Json.createObjectBuilder()\n .add(\"item\"... | {
"fields": [
{
"declarator": "customerRepository",
"modifier": "@Inject",
"original_string": "@Inject CustomerRepository customerRepository;",
"type": "CustomerRepository",
"var_name": "customerRepository"
}
],
"file": "Chapter06/fault-tolerance/src/main/java/com/packt/quark... | {
"body": "@DELETE\n public Response delete(@QueryParam(\"id\") Long customerId) {\n customerRepository.deleteCustomer(customerId);\n return Response.status(204).build();\n }",
"class_method_signature": "CustomerEndpoint.delete(@QueryParam(\"id\") Long customerId)",
"constructor": false,
"fu... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 180317496,
"size": 18296,
"stargazer_count": 33,
"stars": null,
"updates": null,
"url": "https://github.com/PacktPublishing/Hands-On-Cloud-Native-Applications-with-Java-and-... |
180317496_13 | {
"fields": [],
"file": "Chapter09/core/customer-service/src/test/java/com/packt/quarkus/chapter9/CustomerEndpointTest.java",
"identifier": "CustomerEndpointTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCustomerService() {\n\n JsonObject obj = Json.createObjectBuilder()\n .add(\"name\", \"John\")\n .add(\"surname\", \"Smith\").build();\n\n // Test POST\n given()\n .contentType(\"application/json\")\n ... | {
"fields": [
{
"declarator": "customerRepository",
"modifier": "@Inject",
"original_string": "@Inject CustomerRepository customerRepository;",
"type": "CustomerRepository",
"var_name": "customerRepository"
}
],
"file": "Chapter09/core/customer-service/src/main/java/com/packt... | {
"body": "@DELETE\n public Response delete(@QueryParam(\"id\") Integer customerId) {\n customerRepository.deleteCustomer(customerId);\n return Response.status(204).build();\n }",
"class_method_signature": "CustomerEndpoint.delete(@QueryParam(\"id\") Integer customerId)",
"constructor": false,... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 180317496,
"size": 18296,
"stargazer_count": 33,
"stars": null,
"updates": null,
"url": "https://github.com/PacktPublishing/Hands-On-Cloud-Native-Applications-with-Java-and-... |
180317496_12 | {
"fields": [],
"file": "Chapter09/rx2java/customer-service/src/test/java/com/packt/quarkus/chapter9/CustomerEndpointTest.java",
"identifier": "CustomerEndpointTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCustomerService() {\n\n JsonObject obj = Json.createObjectBuilder()\n .add(\"name\", \"John\")\n .add(\"surname\", \"Smith\").build();\n\n // Test POST\n given()\n .contentType(\"application/json\")\n ... | {
"fields": [
{
"declarator": "customerRepository",
"modifier": "@Inject",
"original_string": "@Inject\n CustomerRepository customerRepository;",
"type": "CustomerRepository",
"var_name": "customerRepository"
}
],
"file": "Chapter09/rx2java/customer-service/src/main/java/c... | {
"body": "@DELETE\n public Response delete(@QueryParam(\"id\") Integer customerId) {\n customerRepository.deleteCustomer(customerId);\n return Response.status(204).build();\n }",
"class_method_signature": "CustomerEndpoint.delete(@QueryParam(\"id\") Integer customerId)",
"constructor": false,... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 180317496,
"size": 18296,
"stargazer_count": 33,
"stars": null,
"updates": null,
"url": "https://github.com/PacktPublishing/Hands-On-Cloud-Native-Applications-with-Java-and-... |
180317496_6 | {
"fields": [
{
"declarator": "keycloakURL",
"modifier": "@ConfigProperty(name = \"keycloak.url\")",
"original_string": "@ConfigProperty(name = \"keycloak.url\")\n String keycloakURL;",
"type": "String",
"var_name": "keycloakURL"
}
],
"file": "Chapter07/jwt-demo/src/test/j... | {
"body": "@Test\n public void testHelloEndpoint() {\n\n String secret =\"mysecret\";\n RestAssured.baseURI = keycloakURL;\n Response response = given().urlEncodingEnabled(true)\n .auth().preemptive().basic(\"quarkus-client\", secret)\n .param(\"grant_type\", \"pa... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(CustomerEndpoint.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(CustomerEndpoint.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
}... | {
"body": "@DELETE\n @RolesAllowed(\"admin\")\n public Response delete(@QueryParam(\"id\") Long customerId) {\n customerRepository.deleteCustomer(customerId);\n return Response.status(204).build();\n }",
"class_method_signature": "CustomerEndpoint.delete(@QueryParam(\"id\") Long customerId)",... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 180317496,
"size": 18296,
"stargazer_count": 33,
"stars": null,
"updates": null,
"url": "https://github.com/PacktPublishing/Hands-On-Cloud-Native-Applications-with-Java-and-... |
180317496_5 | {
"fields": [
{
"declarator": "keycloakURL",
"modifier": "@ConfigProperty(name = \"keycloak.url\")",
"original_string": "@ConfigProperty(name = \"keycloak.url\")\n String keycloakURL;",
"type": "String",
"var_name": "keycloakURL"
}
],
"file": "Chapter07/keycloak-demo/src/t... | {
"body": "@Test\n public void testHelloEndpoint() {\n\n String secret =\"mysecret\";\n RestAssured.baseURI = keycloakURL;\n Response response = given().urlEncodingEnabled(true)\n .auth().preemptive().basic(\"quarkus-client\", secret)\n .param(\"grant_type\", \"pa... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(CustomerEndpoint.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(CustomerEndpoint.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
}... | {
"body": "@DELETE\n @RolesAllowed(\"admin\")\n public Response delete(@QueryParam(\"id\") Long customerId) {\n customerRepository.deleteCustomer(customerId);\n return Response.status(204).build();\n }",
"class_method_signature": "CustomerEndpoint.delete(@QueryParam(\"id\") Long customerId)",... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 180317496,
"size": 18296,
"stargazer_count": 33,
"stars": null,
"updates": null,
"url": "https://github.com/PacktPublishing/Hands-On-Cloud-Native-Applications-with-Java-and-... |
180317496_9 | {
"fields": [],
"file": "Chapter06/openapi-swagger/src/test/java/com/packt/quarkus/chapter6/CustomerEndpointTest.java",
"identifier": "CustomerEndpointTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCustomerService() {\n\n given()\n .when().get(\"/customers\")\n .then()\n .statusCode(200)\n .body(\"$.size()\", is(2));\n\n\n JsonObject objOrder = Json.createObjectBuilder()\n .add(\"item\"... | {
"fields": [
{
"declarator": "customerRepository",
"modifier": "@Inject",
"original_string": "@Inject CustomerRepository customerRepository;",
"type": "CustomerRepository",
"var_name": "customerRepository"
}
],
"file": "Chapter06/openapi-swagger/src/main/java/com/packt/quark... | {
"body": "@DELETE\n public Response delete(@Parameter(description = \"The customer to delete.\", required = true) @QueryParam(\"id\") Long customerId) {\n customerRepository.deleteCustomer(customerId);\n return Response.status(204).build();\n }",
"class_method_signature": "CustomerEndpoint.dele... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 180317496,
"size": 18296,
"stargazer_count": 33,
"stars": null,
"updates": null,
"url": "https://github.com/PacktPublishing/Hands-On-Cloud-Native-Applications-with-Java-and-... |
180317496_8 | {
"fields": [],
"file": "Chapter06/metrics/src/test/java/com/packt/quarkus/chapter6/CustomerEndpointTest.java",
"identifier": "CustomerEndpointTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCustomerService() {\n\n given()\n .when().get(\"/customers\")\n .then()\n .statusCode(200)\n .body(\"$.size()\", is(2));\n\n\n JsonObject objOrder = Json.createObjectBuilder()\n .add(\"item\"... | {
"fields": [
{
"declarator": "customerRepository",
"modifier": "@Inject",
"original_string": "@Inject CustomerRepository customerRepository;",
"type": "CustomerRepository",
"var_name": "customerRepository"
}
],
"file": "Chapter06/metrics/src/main/java/com/packt/quarkus/chapt... | {
"body": "@DELETE\n public Response delete(@QueryParam(\"id\") Long customerId) {\n customerRepository.deleteCustomer(customerId);\n return Response.status(204).build();\n }",
"class_method_signature": "CustomerEndpoint.delete(@QueryParam(\"id\") Long customerId)",
"constructor": false,
"fu... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 180317496,
"size": 18296,
"stargazer_count": 33,
"stars": null,
"updates": null,
"url": "https://github.com/PacktPublishing/Hands-On-Cloud-Native-Applications-with-Java-and-... |
180317496_10 | {
"fields": [],
"file": "Chapter06/rest-client/src/test/java/com/packt/quarkus/chapter6/restclient/CustomerEndpointTest.java",
"identifier": "CustomerEndpointTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCustomerService() {\n\n given()\n .when().get(\"/customers\")\n .then()\n .statusCode(200)\n .body(\"$.size()\", is(2));\n\n\n JsonObject objOrder = Json.createObjectBuilder()\n .add(\"item\"... | {
"fields": [
{
"declarator": "customer",
"modifier": "@Inject\n @RestClient",
"original_string": "@Inject\n @RestClient\n CustomerEndpointItf customer;",
"type": "CustomerEndpointItf",
"var_name": "customer"
}
],
"file": "Chapter06/rest-client/src/main/java/com/pack... | {
"body": "@DELETE\n public Response delete(@QueryParam(\"id\") Long customerId) {\n return customer.delete(customerId);\n }",
"class_method_signature": "CustomerEndpoint.delete(@QueryParam(\"id\") Long customerId)",
"constructor": false,
"full_signature": "@DELETE public Response delete(@QueryPara... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 180317496,
"size": 18296,
"stargazer_count": 33,
"stars": null,
"updates": null,
"url": "https://github.com/PacktPublishing/Hands-On-Cloud-Native-Applications-with-Java-and-... |
180317496_4 | {
"fields": [],
"file": "Chapter07/elytron-demo/src/test/java/com/packt/quarkus/chapter7/CustomerEndpointTest.java",
"identifier": "CustomerEndpointTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCustomerService() {\n\n given()\n .auth()\n .preemptive()\n .basic(\"frank\", \"password123\")\n .when().get(\"/customers\")\n .then()\n .statusCode(200)\n .body(\"$.si... | {
"fields": [
{
"declarator": "customerRepository",
"modifier": "@Inject",
"original_string": "@Inject CustomerRepository customerRepository;",
"type": "CustomerRepository",
"var_name": "customerRepository"
}
],
"file": "Chapter07/elytron-demo/src/main/java/com/packt/quarkus/... | {
"body": "@DELETE\n public Response delete(@QueryParam(\"id\") Long customerId) {\n customerRepository.deleteCustomer(customerId);\n return Response.status(204).build();\n }",
"class_method_signature": "CustomerEndpoint.delete(@QueryParam(\"id\") Long customerId)",
"constructor": false,
"fu... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 180317496,
"size": 18296,
"stargazer_count": 33,
"stars": null,
"updates": null,
"url": "https://github.com/PacktPublishing/Hands-On-Cloud-Native-Applications-with-Java-and-... |
180317496_2 | {
"fields": [],
"file": "Chapter08/profiles/src/test/java/com/packt/quarkus/chapter8/CustomerEndpointTest.java",
"identifier": "CustomerEndpointTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCustomerService() {\n\n given()\n .when().get(\"/customers\")\n .then()\n .statusCode(200)\n .body(\"$.size()\", is(2));\n\n\n JsonObject objOrder = Json.createObjectBuilder()\n .add(\"item\"... | {
"fields": [
{
"declarator": "customerRepository",
"modifier": "@Inject",
"original_string": "@Inject CustomerRepository customerRepository;",
"type": "CustomerRepository",
"var_name": "customerRepository"
}
],
"file": "Chapter08/profiles/src/main/java/com/packt/quarkus/chap... | {
"body": "@DELETE\n public Response delete(@QueryParam(\"id\") Long customerId) {\n customerRepository.deleteCustomer(customerId);\n return Response.status(204).build();\n }",
"class_method_signature": "CustomerEndpoint.delete(@QueryParam(\"id\") Long customerId)",
"constructor": false,
"fu... | {
"created": null,
"fork": null,
"fork_count": 26,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 180317496,
"size": 18296,
"stargazer_count": 33,
"stars": null,
"updates": null,
"url": "https://github.com/PacktPublishing/Hands-On-Cloud-Native-Applications-with-Java-and-... |
83002023_6 | {
"fields": [
{
"declarator": "activity",
"modifier": "private",
"original_string": "private FragmentActivity activity;",
"type": "FragmentActivity",
"var_name": "activity"
},
{
"declarator": "controller",
"modifier": "private",
"original_string": "private A... | {
"body": "@Test\n public void onResume_deliversBrowserSwitchResultViaClient() {\n sut.browserSwitchClient = browserSwitchClient;\n sut.onResume();\n\n verify(browserSwitchClient).deliverResult(sut);\n }",
"class_method_signature": "BrowserSwitchFragmentTest.onResume_deliversBrowserSwitch... | {
"fields": [
{
"declarator": "browserSwitchClient = null",
"modifier": "@VisibleForTesting",
"original_string": "@VisibleForTesting\n BrowserSwitchClient browserSwitchClient = null;",
"type": "BrowserSwitchClient",
"var_name": "browserSwitchClient"
},
{
"declarator"... | {
"body": "@Override\n public void onResume() {\n super.onResume();\n browserSwitchClient.deliverResult(this);\n }",
"class_method_signature": "BrowserSwitchFragment.onResume()",
"constructor": false,
"full_signature": "@Override public void onResume()",
"identifier": "onResume",
"invoca... | {
"created": null,
"fork": null,
"fork_count": 13,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 83002023,
"size": 287,
"stargazer_count": 11,
"stars": null,
"updates": null,
"url": "https://github.com/braintree/browser-switch-android"
} |
83002023_7 | {
"fields": [
{
"declarator": "activity",
"modifier": "private",
"original_string": "private FragmentActivity activity;",
"type": "FragmentActivity",
"var_name": "activity"
},
{
"declarator": "controller",
"modifier": "private",
"original_string": "private A... | {
"body": "@Test\n public void getReturnUrlScheme_returnsUrlSchemeUsingPackageNameFromContext() {\n String result = sut.getReturnUrlScheme();\n assertEquals(result, \"com.braintreepayments.browserswitch.test.browserswitch\");\n }",
"class_method_signature": "BrowserSwitchFragmentTest.getReturnUr... | {
"fields": [
{
"declarator": "browserSwitchClient = null",
"modifier": "@VisibleForTesting",
"original_string": "@VisibleForTesting\n BrowserSwitchClient browserSwitchClient = null;",
"type": "BrowserSwitchClient",
"var_name": "browserSwitchClient"
},
{
"declarator"... | {
"body": "public String getReturnUrlScheme() {\n return returnUrlScheme;\n }",
"class_method_signature": "BrowserSwitchFragment.getReturnUrlScheme()",
"constructor": false,
"full_signature": "public String getReturnUrlScheme()",
"identifier": "getReturnUrlScheme",
"invocations": [],
"modifiers"... | {
"created": null,
"fork": null,
"fork_count": 13,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 83002023,
"size": 287,
"stargazer_count": 11,
"stars": null,
"updates": null,
"url": "https://github.com/braintree/browser-switch-android"
} |
83002023_0 | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private Context context;",
"type": "Context",
"var_name": "context"
},
{
"declarator": "applicationContext",
"modifier": "private",
"original_string": "private Context applic... | {
"body": "@Test\n public void put_placesKeyValuePairIntoSharedPrefs() {\n when(\n sharedPreferencesEditor.putString(anyString(), anyString())\n ).thenReturn(sharedPreferencesEditor);\n PersistentStore.put(\"key\", \"value\", context);\n\n InOrder inOrder = Mockito.inOrder(sh... | {
"fields": [
{
"declarator": "PREFERENCES_KEY =\n \"com.braintreepayament.browserswitch.persistentstore\"",
"modifier": "@VisibleForTesting\n static final",
"original_string": "@VisibleForTesting\n static final String PREFERENCES_KEY =\n \"com.braintreepayament.browserswitch... | {
"body": "static void put(String key, String value, Context context) {\n Context applicationContext = context.getApplicationContext();\n SharedPreferences sharedPreferences =\n applicationContext.getSharedPreferences(PREFERENCES_KEY, Context.MODE_PRIVATE);\n sharedPreferences.edit().p... | {
"created": null,
"fork": null,
"fork_count": 13,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 83002023,
"size": 287,
"stargazer_count": 11,
"stars": null,
"updates": null,
"url": "https://github.com/braintree/browser-switch-android"
} |
83002023_10 | {
"fields": [
{
"declarator": "activity",
"modifier": "private",
"original_string": "private FragmentActivity activity;",
"type": "FragmentActivity",
"var_name": "activity"
},
{
"declarator": "controller",
"modifier": "private",
"original_string": "private A... | {
"body": "@Test\n public void browserSwitchWithOptions_startsBrowserSwitch() {\n sut.browserSwitchClient = browserSwitchClient;\n\n BrowserSwitchOptions browserSwitchOptions = new BrowserSwitchOptions();\n sut.browserSwitch(browserSwitchOptions);\n\n verify(browserSwitchClient).start(b... | {
"fields": [
{
"declarator": "browserSwitchClient = null",
"modifier": "@VisibleForTesting",
"original_string": "@VisibleForTesting\n BrowserSwitchClient browserSwitchClient = null;",
"type": "BrowserSwitchClient",
"var_name": "browserSwitchClient"
},
{
"declarator"... | {
"body": "@SuppressWarnings(\"WeakerAccess\")\n public void browserSwitch(int requestCode, String url) {\n BrowserSwitchOptions browserSwitchOptions = new BrowserSwitchOptions()\n .requestCode(requestCode)\n .url(Uri.parse(url));\n browserSwitchClient.start(browserSwitc... | {
"created": null,
"fork": null,
"fork_count": 13,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 83002023,
"size": 287,
"stargazer_count": 11,
"stars": null,
"updates": null,
"url": "https://github.com/braintree/browser-switch-android"
} |
83002023_1 | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private Context context;",
"type": "Context",
"var_name": "context"
},
{
"declarator": "applicationContext",
"modifier": "private",
"original_string": "private Context applic... | {
"body": "@Test\n public void get_retrievesValueFromSharedPrefsByKey() {\n when(sharedPreferences.getString(\"key\", null)).thenReturn(\"sampleValue\");\n String result = PersistentStore.get(\"key\", context);\n assertEquals(result, \"sampleValue\");\n }",
"class_method_signature": "Pers... | {
"fields": [
{
"declarator": "PREFERENCES_KEY =\n \"com.braintreepayament.browserswitch.persistentstore\"",
"modifier": "@VisibleForTesting\n static final",
"original_string": "@VisibleForTesting\n static final String PREFERENCES_KEY =\n \"com.braintreepayament.browserswitch... | {
"body": "static String get(String key, Context context) {\n Context applicationContext = context.getApplicationContext();\n SharedPreferences sharedPreferences =\n applicationContext.getSharedPreferences(PREFERENCES_KEY, Context.MODE_PRIVATE);\n return sharedPreferences.getString(key... | {
"created": null,
"fork": null,
"fork_count": 13,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 83002023,
"size": 287,
"stargazer_count": 11,
"stars": null,
"updates": null,
"url": "https://github.com/braintree/browser-switch-android"
} |
83002023_2 | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private Context context;",
"type": "Context",
"var_name": "context"
},
{
"declarator": "applicationContext",
"modifier": "private",
"original_string": "private Context applic... | {
"body": "@Test\n public void remove_removesValueInSharedPrefsByKey() {\n when(sharedPreferencesEditor.remove(anyString())).thenReturn(sharedPreferencesEditor);\n PersistentStore.remove(\"key\", context);\n\n InOrder inOrder = Mockito.inOrder(sharedPreferencesEditor);\n inOrder.verify(... | {
"fields": [
{
"declarator": "PREFERENCES_KEY =\n \"com.braintreepayament.browserswitch.persistentstore\"",
"modifier": "@VisibleForTesting\n static final",
"original_string": "@VisibleForTesting\n static final String PREFERENCES_KEY =\n \"com.braintreepayament.browserswitch... | {
"body": "static void remove(String key, Context context) {\n Context applicationContext = context.getApplicationContext();\n SharedPreferences sharedPreferences =\n applicationContext.getSharedPreferences(PREFERENCES_KEY, Context.MODE_PRIVATE);\n sharedPreferences.edit().remove(key).... | {
"created": null,
"fork": null,
"fork_count": 13,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 83002023,
"size": 287,
"stargazer_count": 11,
"stars": null,
"updates": null,
"url": "https://github.com/braintree/browser-switch-android"
} |
83002023_3 | {
"fields": [
{
"declarator": "rule = new PowerMockRule()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public PowerMockRule rule = new PowerMockRule();",
"type": "PowerMockRule",
"var_name": "rule"
},
{
"declarator": "context",
"modifier": "pr... | {
"body": "@Test\n public void createIntentToLaunchUriInBrowser_returnsIntent() {\n when(context.getApplicationContext()).thenReturn(applicationContext);\n when(ChromeCustomTabs.isAvailable(applicationContext)).thenReturn(false);\n\n Uri uri = Uri.parse(\"https://www.example.com\");\n I... | {
"fields": [],
"file": "browser-switch/src/main/java/com/braintreepayments/browserswitch/BrowserSwitchConfig.java",
"identifier": "BrowserSwitchConfig",
"interfaces": "",
"methods": [
{
"class_method_signature": "BrowserSwitchConfig.newInstance()",
"constructor": false,
"full_signature"... | {
"body": "Intent createIntentToLaunchUriInBrowser(Context context, Uri uri) {\n Intent intent = new Intent(Intent.ACTION_VIEW, uri);\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n Context applicationContext = context.getApplicationContext();\n if (ChromeCustomTabs.isAvailable(appli... | {
"created": null,
"fork": null,
"fork_count": 13,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 83002023,
"size": 287,
"stargazer_count": 11,
"stars": null,
"updates": null,
"url": "https://github.com/braintree/browser-switch-android"
} |
83002023_8 | {
"fields": [
{
"declarator": "activity",
"modifier": "private",
"original_string": "private FragmentActivity activity;",
"type": "FragmentActivity",
"var_name": "activity"
},
{
"declarator": "controller",
"modifier": "private",
"original_string": "private A... | {
"body": "@Test\n public void browserSwitchWithUri_startsBrowserSwitch() {\n sut.browserSwitchClient = browserSwitchClient;\n sut.browserSwitch(123, \"https://example.com\");\n\n Uri uri = Uri.parse(\"https://example.com\");\n\n ArgumentCaptor<BrowserSwitchOptions> captor =\n ... | {
"fields": [
{
"declarator": "browserSwitchClient = null",
"modifier": "@VisibleForTesting",
"original_string": "@VisibleForTesting\n BrowserSwitchClient browserSwitchClient = null;",
"type": "BrowserSwitchClient",
"var_name": "browserSwitchClient"
},
{
"declarator"... | {
"body": "@SuppressWarnings(\"WeakerAccess\")\n public void browserSwitch(int requestCode, String url) {\n BrowserSwitchOptions browserSwitchOptions = new BrowserSwitchOptions()\n .requestCode(requestCode)\n .url(Uri.parse(url));\n browserSwitchClient.start(browserSwitc... | {
"created": null,
"fork": null,
"fork_count": 13,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 83002023,
"size": 287,
"stargazer_count": 11,
"stars": null,
"updates": null,
"url": "https://github.com/braintree/browser-switch-android"
} |
83002023_4 | {
"fields": [
{
"declarator": "rule = new PowerMockRule()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public PowerMockRule rule = new PowerMockRule();",
"type": "PowerMockRule",
"var_name": "rule"
},
{
"declarator": "context",
"modifier": "pr... | {
"body": "@Test\n public void createIntentToLaunchUriInBrowser_optionallyConfiguresIntentForChromeCustomTabs() {\n when(context.getApplicationContext()).thenReturn(applicationContext);\n when(ChromeCustomTabs.isAvailable(applicationContext)).thenReturn(true);\n\n Uri uri = Uri.parse(\"https:/... | {
"fields": [],
"file": "browser-switch/src/main/java/com/braintreepayments/browserswitch/BrowserSwitchConfig.java",
"identifier": "BrowserSwitchConfig",
"interfaces": "",
"methods": [
{
"class_method_signature": "BrowserSwitchConfig.newInstance()",
"constructor": false,
"full_signature"... | {
"body": "Intent createIntentToLaunchUriInBrowser(Context context, Uri uri) {\n Intent intent = new Intent(Intent.ACTION_VIEW, uri);\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n Context applicationContext = context.getApplicationContext();\n if (ChromeCustomTabs.isAvailable(appli... | {
"created": null,
"fork": null,
"fork_count": 13,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 83002023,
"size": 287,
"stargazer_count": 11,
"stars": null,
"updates": null,
"url": "https://github.com/braintree/browser-switch-android"
} |
83002023_5 | {
"fields": [
{
"declarator": "rule = new PowerMockRule()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public PowerMockRule rule = new PowerMockRule();",
"type": "PowerMockRule",
"var_name": "rule"
},
{
"declarator": "context",
"modifier": "pr... | {
"body": "@Test\n public void createIntentForBrowserSwitchActivityQuery_configuresAndReturnsIntent() {\n when(context.getApplicationContext()).thenReturn(applicationContext);\n when(applicationContext.getPackageName()).thenReturn(\"sample.package.name\");\n\n String returnUrlScheme = \"sample... | {
"fields": [],
"file": "browser-switch/src/main/java/com/braintreepayments/browserswitch/BrowserSwitchConfig.java",
"identifier": "BrowserSwitchConfig",
"interfaces": "",
"methods": [
{
"class_method_signature": "BrowserSwitchConfig.newInstance()",
"constructor": false,
"full_signature"... | {
"body": "Intent createIntentForBrowserSwitchActivityQuery(String returnUrlScheme) {\n String browserSwitchUrl = String.format(\"%s://\", returnUrlScheme);\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(browserSwitchUrl));\n intent.addCategory(Intent.CATEGORY_DEFAULT);\n inten... | {
"created": null,
"fork": null,
"fork_count": 13,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 83002023,
"size": 287,
"stargazer_count": 11,
"stars": null,
"updates": null,
"url": "https://github.com/braintree/browser-switch-android"
} |
83002023_9 | {
"fields": [
{
"declarator": "activity",
"modifier": "private",
"original_string": "private FragmentActivity activity;",
"type": "FragmentActivity",
"var_name": "activity"
},
{
"declarator": "controller",
"modifier": "private",
"original_string": "private A... | {
"body": "@Test\n public void browserSwitchWithIntent_startsBrowserSwitch() {\n Intent intent = new Intent();\n\n sut.browserSwitchClient = browserSwitchClient;\n sut.browserSwitch(123, intent);\n\n ArgumentCaptor<BrowserSwitchOptions> captor =\n ArgumentCaptor.forClass(... | {
"fields": [
{
"declarator": "browserSwitchClient = null",
"modifier": "@VisibleForTesting",
"original_string": "@VisibleForTesting\n BrowserSwitchClient browserSwitchClient = null;",
"type": "BrowserSwitchClient",
"var_name": "browserSwitchClient"
},
{
"declarator"... | {
"body": "@SuppressWarnings(\"WeakerAccess\")\n public void browserSwitch(int requestCode, String url) {\n BrowserSwitchOptions browserSwitchOptions = new BrowserSwitchOptions()\n .requestCode(requestCode)\n .url(Uri.parse(url));\n browserSwitchClient.start(browserSwitc... | {
"created": null,
"fork": null,
"fork_count": 13,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 83002023,
"size": 287,
"stargazer_count": 11,
"stars": null,
"updates": null,
"url": "https://github.com/braintree/browser-switch-android"
} |
89198062_55 | {
"fields": [
{
"declarator": "mementos = new HashSet<>()",
"modifier": "private",
"original_string": "private HashSet<Memento> mementos = new HashSet<>();",
"type": "HashSet<Memento>",
"var_name": "mementos"
}
],
"file": "idlj/src/test/java/com/sun/tools/corba/ee/idl/UtilTes... | {
"body": "@Test\n public void readVersionFromUnnamedPropertyFile() throws Exception {\n assertThat(Util.getVersion(\"\"), containsString(\"4.02\"));\n }",
"class_method_signature": "UtilTest.readVersionFromUnnamedPropertyFile()",
"constructor": false,
"full_signature": "@Test public void readVersi... | {
"fields": [
{
"declarator": "DEFAULT_MESSAGE_RESOURCE = \"com/sun/tools/corba/ee/idl/idl\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_MESSAGE_RESOURCE = \"com/sun/tools/corba/ee/idl/idl\";",
"type": "String",
"var_name": "DEFAULT_M... | {
"body": "public static String getVersion ()\n {\n return getVersion (DEFAULT_MESSAGE_RESOURCE);\n }",
"class_method_signature": "Util.getVersion()",
"constructor": false,
"full_signature": "public static String getVersion()",
"identifier": "getVersion",
"invocations": [
"getVersion"
],
"modif... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_14 | {
"fields": [
{
"declarator": "factory = new TypeFactory()",
"modifier": "private",
"original_string": "private TypeFactory factory = new TypeFactory();",
"type": "TypeFactory",
"var_name": "factory"
}
],
"file": "rmic/src/test/java/org/glassfish/rmic/asm/TypeFactoryTest.java... | {
"body": "@Test\n public void constructObjectArrayArgument() throws Exception {\n Type methodType = TypeFactory.createMethodType(\"([Ljava/lang/Object;)V\");\n\n assertThat(methodType.getReturnType(), equalTo(Type.tVoid));\n assertThat(methodType.getArgumentTypes(), arrayContaining(Type.tArra... | {
"fields": [],
"file": "rmic/src/main/java/org/glassfish/rmic/asm/TypeFactory.java",
"identifier": "TypeFactory",
"interfaces": "",
"methods": [
{
"class_method_signature": "TypeFactory.createType(String descriptor)",
"constructor": false,
"full_signature": "static Type createType(Strin... | {
"body": "static Type createMethodType(String descriptor) {\n org.objectweb.asm.Type returnType = org.objectweb.asm.Type.getReturnType(descriptor);\n return Type.tMethod(toRmicType(returnType), toTypeArray(org.objectweb.asm.Type.getArgumentTypes(descriptor)));\n }",
"class_method_signature": "Type... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_43 | {
"fields": [
{
"declarator": "timer = new TimerFake()",
"modifier": "private",
"original_string": "private TimerFake timer = new TimerFake();",
"type": "TimerFake",
"var_name": "timer"
},
{
"declarator": "selector = new SelectorImpl(getOrb(), timer)",
"modifier":... | {
"body": "@Test\n public void whenIoAvailable_dispatchToEventHandler() throws IOException {\n registerEventHandler();\n\n selectorStub.setReady(channel, SelectionKey.OP_READ);\n selector.runSelectionLoopOnce();\n assertEquals(1, eventHandler.numInvocations);\n }",
"class_method_si... | {
"fields": [
{
"declarator": "wrapper =\n ORBUtilSystemException.self",
"modifier": "private static final",
"original_string": "private static final ORBUtilSystemException wrapper =\n ORBUtilSystemException.self ;",
"type": "ORBUtilSystemException",
"var_name": "wrappe... | {
"body": "void runSelectionLoopOnce() throws IOException {\n beginSelect();\n\n int n = 0;\n handleDeferredRegistrations();\n enableInterestOps();\n try {\n n = selector.select(timeout);\n } catch (IOException e) {\n display( \"Exception in select:\", ... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_38 | {
"fields": [
{
"declarator": "DATA_TO_BE_READ = new byte[]{0, 1, 2, 3, 4, 5, 6}",
"modifier": "private static final",
"original_string": "private static final byte[] DATA_TO_BE_READ = new byte[]{0, 1, 2, 3, 4, 5, 6};",
"type": "byte[]",
"var_name": "DATA_TO_BE_READ"
},
{
... | {
"body": "@Test(expected = EOFException.class)\n public void whenEOFDetectedThrowException() throws IOException {\n getSocketChannel().setEndOfInput();\n ByteBuffer oldBuffer = ByteBuffer.allocate(5);\n reader.read(getSocketChannel(), oldBuffer, 0);\n }",
"class_method_signature": "Socke... | {
"fields": [
{
"declarator": "orb",
"modifier": "private",
"original_string": "private ORB orb;",
"type": "ORB",
"var_name": "orb"
}
],
"file": "orbmain/src/main/java/com/sun/corba/ee/impl/transport/SocketChannelReader.java",
"identifier": "SocketChannelReader",
"interfa... | {
"body": "public ByteBuffer read(SocketChannel channel, ByteBuffer previouslyReadData, int minNeeded) throws IOException {\n ByteBuffer byteBuffer = prepareToAppendTo(previouslyReadData);\n\n int numBytesRead = channel.read(byteBuffer);\n if (numBytesRead < 0) {\n throw new EOFExcepti... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_18 | {
"fields": [
{
"declarator": "classPath = new ClassPath()",
"modifier": "private",
"original_string": "private ClassPath classPath = new ClassPath();",
"type": "ClassPath",
"var_name": "classPath"
},
{
"declarator": "out = new ByteArrayOutputStream()",
"modifier"... | {
"body": "@Test\n public void whenNoErrorsOrWarnings_outputIsEmpty() throws Exception {\n main.displayErrors(environment);\n\n assertThat(getOutput(), isEmptyString());\n }",
"class_method_signature": "MainTest.whenNoErrorsOrWarnings_outputIsEmpty()",
"constructor": false,
"full_signature":... | {
"fields": [
{
"declarator": "sourcePathArg",
"modifier": "",
"original_string": "String sourcePathArg;",
"type": "String",
"var_name": "sourcePathArg"
},
{
"declarator": "sysClassPathArg",
"modifier": "",
"original_string": "String sysClassPathArg;",
... | {
"body": "boolean displayErrors(BatchEnvironment env) {\n List<String> summary = new ArrayList<>();\n \n if (env.nerrors > 0) summary.add(getErrorSummary(env));\n if (env.nwarnings > 0) summary.add(getWarningSummary(env));\n if (!summary.isEmpty()) output(String.join(\", \", summar... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_34 | {
"fields": [
{
"declarator": "DATA_TO_BE_READ = new byte[]{0, 1, 2, 3, 4, 5, 6}",
"modifier": "private static final",
"original_string": "private static final byte[] DATA_TO_BE_READ = new byte[]{0, 1, 2, 3, 4, 5, 6};",
"type": "byte[]",
"var_name": "DATA_TO_BE_READ"
},
{
... | {
"body": "@Test\n public void whenCurrentBufferHasPartialData_readToAppendData() throws IOException {\n ByteBuffer oldBuffer = ByteBuffer.allocate(100);\n populateBuffer(oldBuffer, DATA_TO_BE_READ, 0, 3);\n enqueData(DATA_TO_BE_READ, 3, DATA_TO_BE_READ.length - 3);\n ByteBuffer buffer ... | {
"fields": [
{
"declarator": "orb",
"modifier": "private",
"original_string": "private ORB orb;",
"type": "ORB",
"var_name": "orb"
}
],
"file": "orbmain/src/main/java/com/sun/corba/ee/impl/transport/SocketChannelReader.java",
"identifier": "SocketChannelReader",
"interfa... | {
"body": "public ByteBuffer read(SocketChannel channel, ByteBuffer previouslyReadData, int minNeeded) throws IOException {\n ByteBuffer byteBuffer = prepareToAppendTo(previouslyReadData);\n\n int numBytesRead = channel.read(byteBuffer);\n if (numBytesRead < 0) {\n throw new EOFExcepti... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_1 | {
"fields": [
{
"declarator": "USE_LEGACY_PARSING_PROPERTY = \"org.glassfish.rmic.UseLegacyClassParsing\"",
"modifier": "private static final",
"original_string": "private static final String USE_LEGACY_PARSING_PROPERTY = \"org.glassfish.rmic.UseLegacyClassParsing\";",
"type": "String",
... | {
"body": "@Test\n public void whenPropertyNotSet_chooseAsmParser() throws Exception {\n ClassDefinitionFactory factory = BatchEnvironment.createClassDefinitionFactory();\n\n assertThat(factory, instanceOf(AsmClassFactory.class));\n }",
"class_method_signature": "BatchEnvironmentTest.whenPropert... | {
"fields": [
{
"declarator": "USE_LEGACY_PARSING_PROPERTY = \"org.glassfish.rmic.UseLegacyClassParsing\"",
"modifier": "private static final",
"original_string": "private static final String USE_LEGACY_PARSING_PROPERTY = \"org.glassfish.rmic.UseLegacyClassParsing\";",
"type": "String",
... | {
"body": "static ClassDefinitionFactory createClassDefinitionFactory() {\n try {\n return useBinaryClassFactory() ? new BinaryClassFactory() : new AsmClassFactory();\n } catch (NoClassDefFoundError e) {\n if (!mayUseBinaryClassFactory())\n throw new BatchEnvironment... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_22 | {
"fields": [
{
"declarator": "classPath = new ClassPath()",
"modifier": "private",
"original_string": "private ClassPath classPath = new ClassPath();",
"type": "ClassPath",
"var_name": "classPath"
},
{
"declarator": "out = new ByteArrayOutputStream()",
"modifier"... | {
"body": "@Test\n public void afterThreeWarningss_outputReportsNumberOfErrors() throws Exception {\n reportWarning();\n reportWarning();\n reportWarning();\n\n main.displayErrors(environment);\n\n assertThat(getOutput(), containsString(\"3 warnings\"));\n }",
"class_method_... | {
"fields": [
{
"declarator": "sourcePathArg",
"modifier": "",
"original_string": "String sourcePathArg;",
"type": "String",
"var_name": "sourcePathArg"
},
{
"declarator": "sysClassPathArg",
"modifier": "",
"original_string": "String sysClassPathArg;",
... | {
"body": "boolean displayErrors(BatchEnvironment env) {\n List<String> summary = new ArrayList<>();\n \n if (env.nerrors > 0) summary.add(getErrorSummary(env));\n if (env.nwarnings > 0) summary.add(getWarningSummary(env));\n if (!summary.isEmpty()) output(String.join(\", \", summar... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_23 | {
"fields": [
{
"declarator": "classPath = new ClassPath()",
"modifier": "private",
"original_string": "private ClassPath classPath = new ClassPath();",
"type": "ClassPath",
"var_name": "classPath"
},
{
"declarator": "out = new ByteArrayOutputStream()",
"modifier"... | {
"body": "@Test\n public void afterOneErrorAndTwoWarnings_outputReportsNumbersOfBoth() throws Exception {\n reportError();\n reportWarning();\n reportWarning();\n\n main.displayErrors(environment);\n\n assertThat(getOutput(), containsString(\"1 error, 2 warnings\"));\n }",
... | {
"fields": [
{
"declarator": "sourcePathArg",
"modifier": "",
"original_string": "String sourcePathArg;",
"type": "String",
"var_name": "sourcePathArg"
},
{
"declarator": "sysClassPathArg",
"modifier": "",
"original_string": "String sysClassPathArg;",
... | {
"body": "boolean displayErrors(BatchEnvironment env) {\n List<String> summary = new ArrayList<>();\n \n if (env.nerrors > 0) summary.add(getErrorSummary(env));\n if (env.nwarnings > 0) summary.add(getWarningSummary(env));\n if (!summary.isEmpty()) output(String.join(\", \", summar... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_0 | {
"fields": [],
"file": "rmic/src/test/java/org/glassfish/rmic/BatchEnvironmentTest.java",
"identifier": "BatchEnvironmentTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void createdClassPathString_usesPathSeparator() throws Exception {\n String systemPath = \"./jdk/jre/lib/rt.jar\";\n String classPath = \"./user.jar\" + File.pathSeparator + \"./user2.jar\" + File.pathSeparator + \"./user3.jar\";\n\n assertThat(BatchEnvironment.create... | {
"fields": [
{
"declarator": "destinationDir",
"modifier": "private",
"original_string": "private File destinationDir;",
"type": "File",
"var_name": "destinationDir"
},
{
"declarator": "generatedFiles = new Vector<>()",
"modifier": "private",
"original_stri... | {
"body": "public static ClassPath createClassPath(String classPathString, String sysClassPathString) {\n /*\n * Previously, this method delegated to the\n * org.glassfish.rmic.tools.javac.BatchEnvironment.classPaths method in order\n * to supply default values for paths not specified o... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_35 | {
"fields": [
{
"declarator": "DATA_TO_BE_READ = new byte[]{0, 1, 2, 3, 4, 5, 6}",
"modifier": "private static final",
"original_string": "private static final byte[] DATA_TO_BE_READ = new byte[]{0, 1, 2, 3, 4, 5, 6};",
"type": "byte[]",
"var_name": "DATA_TO_BE_READ"
},
{
... | {
"body": "@Test\n public void whenCurrentBufferIsFull_readToAppendData() throws IOException {\n ByteBuffer oldBuffer = ByteBuffer.allocate(3);\n populateBuffer(oldBuffer, DATA_TO_BE_READ, 0, 3);\n enqueData(DATA_TO_BE_READ, 3, DATA_TO_BE_READ.length - 3);\n ByteBuffer buffer = reader.r... | {
"fields": [
{
"declarator": "orb",
"modifier": "private",
"original_string": "private ORB orb;",
"type": "ORB",
"var_name": "orb"
}
],
"file": "orbmain/src/main/java/com/sun/corba/ee/impl/transport/SocketChannelReader.java",
"identifier": "SocketChannelReader",
"interfa... | {
"body": "public ByteBuffer read(SocketChannel channel, ByteBuffer previouslyReadData, int minNeeded) throws IOException {\n ByteBuffer byteBuffer = prepareToAppendTo(previouslyReadData);\n\n int numBytesRead = channel.read(byteBuffer);\n if (numBytesRead < 0) {\n throw new EOFExcepti... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_19 | {
"fields": [
{
"declarator": "classPath = new ClassPath()",
"modifier": "private",
"original_string": "private ClassPath classPath = new ClassPath();",
"type": "ClassPath",
"var_name": "classPath"
},
{
"declarator": "out = new ByteArrayOutputStream()",
"modifier"... | {
"body": "@Test\n public void afterOneError_outputReportsOneError() throws Exception {\n reportError();\n\n main.displayErrors(environment);\n\n assertThat(getOutput(), containsString(\"1 error\"));\n }",
"class_method_signature": "MainTest.afterOneError_outputReportsOneError()",
"cons... | {
"fields": [
{
"declarator": "sourcePathArg",
"modifier": "",
"original_string": "String sourcePathArg;",
"type": "String",
"var_name": "sourcePathArg"
},
{
"declarator": "sysClassPathArg",
"modifier": "",
"original_string": "String sysClassPathArg;",
... | {
"body": "boolean displayErrors(BatchEnvironment env) {\n List<String> summary = new ArrayList<>();\n \n if (env.nerrors > 0) summary.add(getErrorSummary(env));\n if (env.nwarnings > 0) summary.add(getWarningSummary(env));\n if (!summary.isEmpty()) output(String.join(\", \", summar... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_58 | {
"fields": [
{
"declarator": "mementos = new HashSet<>()",
"modifier": "private",
"original_string": "private HashSet<Memento> mementos = new HashSet<>();",
"type": "HashSet<Memento>",
"var_name": "mementos"
}
],
"file": "idlj/src/test/java/com/sun/tools/corba/ee/idl/UtilTes... | {
"body": "@Test\n public void substituteMultiParamMessage() throws Exception {\n assertThat(Util.getMessage(\"GenFileStream.1\", new String[] {\"zork\", \"foo\"}), equalTo(\"zork could not be generated: foo\"));\n }",
"class_method_signature": "UtilTest.substituteMultiParamMessage()",
"constructor"... | {
"fields": [
{
"declarator": "DEFAULT_MESSAGE_RESOURCE = \"com/sun/tools/corba/ee/idl/idl\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_MESSAGE_RESOURCE = \"com/sun/tools/corba/ee/idl/idl\";",
"type": "String",
"var_name": "DEFAULT_M... | {
"body": "public static String getMessage (String key)\n {\n if (messages == null)\n readMessages ();\n String message = messages.getProperty (key);\n if (message == null)\n message = getDefaultMessage (key);\n return message;\n }",
"class_method_signature": "Util.getMessage(String key)",
... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_39 | {
"fields": [
{
"declarator": "DATA_TO_BE_READ = new byte[]{0, 1, 2, 3, 4, 5, 6}",
"modifier": "private static final",
"original_string": "private static final byte[] DATA_TO_BE_READ = new byte[]{0, 1, 2, 3, 4, 5, 6};",
"type": "byte[]",
"var_name": "DATA_TO_BE_READ"
},
{
... | {
"body": "@Test\n public void whenNoDataRemains_returnNull() throws IOException {\n ByteBuffer oldBuffer = ByteBuffer.allocate(10);\n populateBuffer(oldBuffer, DATA_TO_BE_READ, 0, DATA_TO_BE_READ.length);\n ByteBuffer buffer = reader.read(getSocketChannel(), oldBuffer, 10);\n assertNul... | {
"fields": [
{
"declarator": "orb",
"modifier": "private",
"original_string": "private ORB orb;",
"type": "ORB",
"var_name": "orb"
}
],
"file": "orbmain/src/main/java/com/sun/corba/ee/impl/transport/SocketChannelReader.java",
"identifier": "SocketChannelReader",
"interfa... | {
"body": "public ByteBuffer read(SocketChannel channel, ByteBuffer previouslyReadData, int minNeeded) throws IOException {\n ByteBuffer byteBuffer = prepareToAppendTo(previouslyReadData);\n\n int numBytesRead = channel.read(byteBuffer);\n if (numBytesRead < 0) {\n throw new EOFExcepti... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_42 | {
"fields": [
{
"declarator": "timer = new TimerFake()",
"modifier": "private",
"original_string": "private TimerFake timer = new TimerFake();",
"type": "TimerFake",
"var_name": "timer"
},
{
"declarator": "selector = new SelectorImpl(getOrb(), timer)",
"modifier":... | {
"body": "@Test\n public void whenRegisteringReadEventWithoutSelectThread_readerThreadIsCreated() {\n eventHandler.setUseSelectThreadToWait(false);\n eventHandler.setInterestOps(SelectionKey.OP_READ);\n selector.registerForEvent(eventHandler);\n assertTrue(getWorkQueue().remove() insta... | {
"fields": [
{
"declarator": "wrapper =\n ORBUtilSystemException.self",
"modifier": "private static final",
"original_string": "private static final ORBUtilSystemException wrapper =\n ORBUtilSystemException.self ;",
"type": "ORBUtilSystemException",
"var_name": "wrappe... | {
"body": "@Transport\n public void registerForEvent(EventHandler eventHandler)\n {\n if (isClosed()) {\n closedEventHandler();\n return;\n }\n\n if (eventHandler.shouldUseSelectThreadToWait()) {\n synchronized (deferredRegistrations) {\n defe... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_15 | {
"fields": [
{
"declarator": "factory = new TypeFactory()",
"modifier": "private",
"original_string": "private TypeFactory factory = new TypeFactory();",
"type": "TypeFactory",
"var_name": "factory"
}
],
"file": "rmic/src/test/java/org/glassfish/rmic/asm/TypeFactoryTest.java... | {
"body": "@Test\n public void constructCharArrayArgument() throws Exception {\n Type methodType = TypeFactory.createMethodType(\"([C)V\");\n\n assertThat(methodType.getReturnType(), equalTo(Type.tVoid));\n assertThat(methodType.getArgumentTypes(), arrayContaining(Type.tArray(Type.tChar)));\n ... | {
"fields": [],
"file": "rmic/src/main/java/org/glassfish/rmic/asm/TypeFactory.java",
"identifier": "TypeFactory",
"interfaces": "",
"methods": [
{
"class_method_signature": "TypeFactory.createType(String descriptor)",
"constructor": false,
"full_signature": "static Type createType(Strin... | {
"body": "static Type createMethodType(String descriptor) {\n org.objectweb.asm.Type returnType = org.objectweb.asm.Type.getReturnType(descriptor);\n return Type.tMethod(toRmicType(returnType), toTypeArray(org.objectweb.asm.Type.getArgumentTypes(descriptor)));\n }",
"class_method_signature": "Type... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_54 | {
"fields": [
{
"declarator": "mementos = new HashSet<>()",
"modifier": "private",
"original_string": "private HashSet<Memento> mementos = new HashSet<>();",
"type": "HashSet<Memento>",
"var_name": "mementos"
}
],
"file": "idlj/src/test/java/com/sun/tools/corba/ee/idl/UtilTes... | {
"body": "@Test\n public void readVersionFromDefaultPropertyFile() throws Exception {\n assertThat(Util.getVersion(), containsString(\"4.02\"));\n }",
"class_method_signature": "UtilTest.readVersionFromDefaultPropertyFile()",
"constructor": false,
"full_signature": "@Test public void readVersionFr... | {
"fields": [
{
"declarator": "DEFAULT_MESSAGE_RESOURCE = \"com/sun/tools/corba/ee/idl/idl\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_MESSAGE_RESOURCE = \"com/sun/tools/corba/ee/idl/idl\";",
"type": "String",
"var_name": "DEFAULT_M... | {
"body": "public static String getVersion ()\n {\n return getVersion (DEFAULT_MESSAGE_RESOURCE);\n }",
"class_method_signature": "Util.getVersion()",
"constructor": false,
"full_signature": "public static String getVersion()",
"identifier": "getVersion",
"invocations": [
"getVersion"
],
"modif... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_49 | {
"fields": [
{
"declarator": "orb = createStrictStub(ORBFake.class)",
"modifier": "private",
"original_string": "private ORBFake orb = createStrictStub(ORBFake.class);",
"type": "ORBFake",
"var_name": "orb"
},
{
"declarator": "any",
"modifier": "private",
"... | {
"body": "@Test(expected = BAD_OPERATION.class)\n public void whenReadingUninitializedAny_throwException() {\n any.extract_octet();\n }",
"class_method_signature": "AnyImplTest.whenReadingUninitializedAny_throwException()",
"constructor": false,
"full_signature": "@Test(expected = BAD_OPERATION.cl... | {
"fields": [
{
"declarator": "serialVersionUID = -8646067979785949029L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -8646067979785949029L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "typ... | {
"body": "public byte extract_octet()\n {\n //debug.log (\"extract_octet\");\n checkExtractBadOperation( TCKind._tk_octet ) ;\n return (byte)value;\n }",
"class_method_signature": "AnyImpl.extract_octet()",
"constructor": false,
"full_signature": "public byte extract_octet()",
"ide... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_32 | {
"fields": [
{
"declarator": "impl = new JNDIStateFactoryImpl()",
"modifier": "private",
"original_string": "private JNDIStateFactoryImpl impl = new JNDIStateFactoryImpl();",
"type": "JNDIStateFactoryImpl",
"var_name": "impl"
},
{
"declarator": "remote = createStrictSt... | {
"body": "@Test\n public void whenObjectIsAStub_connectIt() throws Exception {\n installDelegateForStub(corbaStub);\n\n impl.getStateToBind(remote, null, context, env);\n assertThat(corbaStub.connected, is(true));\n }",
"class_method_signature": "JNDIStateFactoryImplTest.whenObjectIsAStu... | {
"fields": [
{
"declarator": "orbFields = new ConcurrentHashMap<>()",
"modifier": "private",
"original_string": "private ConcurrentMap<Class<?>, Field> orbFields = new ConcurrentHashMap<>();",
"type": "ConcurrentMap<Class<?>, Field>",
"var_name": "orbFields"
}
],
"file": "or... | {
"body": "public Object getStateToBind(Object orig, Name name, Context ctx,\n Hashtable<?,?> env) throws NamingException \n {\n if (orig instanceof org.omg.CORBA.Object) {\n return orig;\n }\n\n if (!(orig instanceof Remote)) {\n return null;\n }\n\n ... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_7 | {
"fields": [
{
"declarator": "USE_LEGACY_PARSING_PROPERTY = \"org.glassfish.rmic.UseLegacyClassParsing\"",
"modifier": "private static final",
"original_string": "private static final String USE_LEGACY_PARSING_PROPERTY = \"org.glassfish.rmic.UseLegacyClassParsing\";",
"type": "String",
... | {
"body": "@Test\n public void whenLegacyParserRequestedOnJdk10EarlyAccess_chooseAsmParser() throws Exception {\n preferLegacyParser();\n simulateJdkVersion(\"10-ea\");\n\n ClassDefinitionFactory factory = BatchEnvironment.createClassDefinitionFactory();\n\n assertThat(factory, instance... | {
"fields": [
{
"declarator": "USE_LEGACY_PARSING_PROPERTY = \"org.glassfish.rmic.UseLegacyClassParsing\"",
"modifier": "private static final",
"original_string": "private static final String USE_LEGACY_PARSING_PROPERTY = \"org.glassfish.rmic.UseLegacyClassParsing\";",
"type": "String",
... | {
"body": "static ClassDefinitionFactory createClassDefinitionFactory() {\n try {\n return useBinaryClassFactory() ? new BinaryClassFactory() : new AsmClassFactory();\n } catch (NoClassDefFoundError e) {\n if (!mayUseBinaryClassFactory())\n throw new BatchEnvironment... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_24 | {
"fields": [
{
"declarator": "classPath = new ClassPath()",
"modifier": "private",
"original_string": "private ClassPath classPath = new ClassPath();",
"type": "ClassPath",
"var_name": "classPath"
},
{
"declarator": "out = new ByteArrayOutputStream()",
"modifier"... | {
"body": "@Test\n public void afterTwoErrorsAndOneWarnings_outputReportsNumbersOfBoth() throws Exception {\n reportError();\n reportError();\n reportWarning();\n\n main.displayErrors(environment);\n\n assertThat(getOutput(), containsString(\"2 errors, 1 warning\"));\n }",
"... | {
"fields": [
{
"declarator": "sourcePathArg",
"modifier": "",
"original_string": "String sourcePathArg;",
"type": "String",
"var_name": "sourcePathArg"
},
{
"declarator": "sysClassPathArg",
"modifier": "",
"original_string": "String sysClassPathArg;",
... | {
"body": "boolean displayErrors(BatchEnvironment env) {\n List<String> summary = new ArrayList<>();\n \n if (env.nerrors > 0) summary.add(getErrorSummary(env));\n if (env.nwarnings > 0) summary.add(getWarningSummary(env));\n if (!summary.isEmpty()) output(String.join(\", \", summar... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_53 | {
"fields": [
{
"declarator": "mementos = new ArrayList<>()",
"modifier": "private",
"original_string": "private List<Memento> mementos = new ArrayList<>();",
"type": "List<Memento>",
"var_name": "mementos"
}
],
"file": "orbmain/src/test/java/com/sun/corba/ee/spi/presentation... | {
"body": "@Test\n public void whenSystemPropertyFalse_presentationManagerCreatesStaticStubs() throws Exception {\n mementos.add(SystemPropertySupport.install(ORBConstants.USE_DYNAMIC_STUB_PROPERTY, \"false\"));\n\n assertThat(PresentationDefaults.makeOrbPresentationManager().useDynamicStubs(), is(false));\n ... | {
"fields": [
{
"declarator": "staticImpl = null",
"modifier": "private static",
"original_string": "private static PresentationManager.StubFactoryFactory staticImpl = null;",
"type": "PresentationManager.StubFactoryFactory",
"var_name": "staticImpl"
},
{
"declarator": ... | {
"body": "public static PresentationManagerImpl makeOrbPresentationManager() {\n final boolean useDynamicStub = getBooleanPropertyValue( \n ORBConstants.USE_DYNAMIC_STUB_PROPERTY, inAppServer() ) ;\n\n final boolean debug = getBooleanPropertyValue( \n ORBConstants.DEBUG_DYNAMIC_ST... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_12 | {
"fields": [
{
"declarator": "factory = new TypeFactory()",
"modifier": "private",
"original_string": "private TypeFactory factory = new TypeFactory();",
"type": "TypeFactory",
"var_name": "factory"
}
],
"file": "rmic/src/test/java/org/glassfish/rmic/asm/TypeFactoryTest.java... | {
"body": "@Test\n public void constructAllNumericArgsToBooleanMethod() throws Exception {\n Type methodType = TypeFactory.createMethodType(\"(SIJFD)Z\");\n\n assertThat(methodType.getReturnType(), equalTo(Type.tBoolean));\n assertThat(methodType.getArgumentTypes(), arrayContaining(Type.tShort... | {
"fields": [],
"file": "rmic/src/main/java/org/glassfish/rmic/asm/TypeFactory.java",
"identifier": "TypeFactory",
"interfaces": "",
"methods": [
{
"class_method_signature": "TypeFactory.createType(String descriptor)",
"constructor": false,
"full_signature": "static Type createType(Strin... | {
"body": "static Type createMethodType(String descriptor) {\n org.objectweb.asm.Type returnType = org.objectweb.asm.Type.getReturnType(descriptor);\n return Type.tMethod(toRmicType(returnType), toTypeArray(org.objectweb.asm.Type.getArgumentTypes(descriptor)));\n }",
"class_method_signature": "Type... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_45 | {
"fields": [
{
"declarator": "timer = new TimerFake()",
"modifier": "private",
"original_string": "private TimerFake timer = new TimerFake();",
"type": "TimerFake",
"var_name": "timer"
},
{
"declarator": "selector = new SelectorImpl(getOrb(), timer)",
"modifier":... | {
"body": "@Test\n public void whenEventHappens_resetTheTimer() throws IOException {\n registerEventHandler();\n\n timer.setCurrentTime(1000);\n selectorStub.setReady(channel, SelectionKey.OP_READ);\n selector.runSelectionLoopOnce();\n assertFalse(eventHandler.timeout);\n }",
... | {
"fields": [
{
"declarator": "wrapper =\n ORBUtilSystemException.self",
"modifier": "private static final",
"original_string": "private static final ORBUtilSystemException wrapper =\n ORBUtilSystemException.self ;",
"type": "ORBUtilSystemException",
"var_name": "wrappe... | {
"body": "void runSelectionLoopOnce() throws IOException {\n beginSelect();\n\n int n = 0;\n handleDeferredRegistrations();\n enableInterestOps();\n try {\n n = selector.select(timeout);\n } catch (IOException e) {\n display( \"Exception in select:\", ... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_28 | {
"fields": [
{
"declarator": "impl = new JNDIStateFactoryImpl()",
"modifier": "private",
"original_string": "private JNDIStateFactoryImpl impl = new JNDIStateFactoryImpl();",
"type": "JNDIStateFactoryImpl",
"var_name": "impl"
},
{
"declarator": "remote = createStrictSt... | {
"body": "@Test\n public void whenObjectIsNotRemote_returnNull() throws Exception {\n assertThat(impl.getStateToBind(new Object(), null, null, env), nullValue());\n }",
"class_method_signature": "JNDIStateFactoryImplTest.whenObjectIsNotRemote_returnNull()",
"constructor": false,
"full_signature": ... | {
"fields": [
{
"declarator": "orbFields = new ConcurrentHashMap<>()",
"modifier": "private",
"original_string": "private ConcurrentMap<Class<?>, Field> orbFields = new ConcurrentHashMap<>();",
"type": "ConcurrentMap<Class<?>, Field>",
"var_name": "orbFields"
}
],
"file": "or... | {
"body": "public Object getStateToBind(Object orig, Name name, Context ctx,\n Hashtable<?,?> env) throws NamingException \n {\n if (orig instanceof org.omg.CORBA.Object) {\n return orig;\n }\n\n if (!(orig instanceof Remote)) {\n return null;\n }\n\n ... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_29 | {
"fields": [
{
"declarator": "impl = new JNDIStateFactoryImpl()",
"modifier": "private",
"original_string": "private JNDIStateFactoryImpl impl = new JNDIStateFactoryImpl();",
"type": "JNDIStateFactoryImpl",
"var_name": "impl"
},
{
"declarator": "remote = createStrictSt... | {
"body": "@Test\n public void whenCannotGetOrbFromContext_returnNull() throws Exception {\n assertThat(impl.getStateToBind(remote, null, createStrictStub(Context.class), env), nullValue());\n }",
"class_method_signature": "JNDIStateFactoryImplTest.whenCannotGetOrbFromContext_returnNull()",
"construc... | {
"fields": [
{
"declarator": "orbFields = new ConcurrentHashMap<>()",
"modifier": "private",
"original_string": "private ConcurrentMap<Class<?>, Field> orbFields = new ConcurrentHashMap<>();",
"type": "ConcurrentMap<Class<?>, Field>",
"var_name": "orbFields"
}
],
"file": "or... | {
"body": "public Object getStateToBind(Object orig, Name name, Context ctx,\n Hashtable<?,?> env) throws NamingException \n {\n if (orig instanceof org.omg.CORBA.Object) {\n return orig;\n }\n\n if (!(orig instanceof Remote)) {\n return null;\n }\n\n ... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_44 | {
"fields": [
{
"declarator": "timer = new TimerFake()",
"modifier": "private",
"original_string": "private TimerFake timer = new TimerFake();",
"type": "TimerFake",
"var_name": "timer"
},
{
"declarator": "selector = new SelectorImpl(getOrb(), timer)",
"modifier":... | {
"body": "@Test\n public void whenEventTimesOut_reportTimeout() throws IOException {\n registerEventHandler();\n\n timer.setCurrentTime(1000);\n selector.runSelectionLoopOnce();\n assertTrue(eventHandler.timeout);\n }",
"class_method_signature": "SelectorImplTest.whenEventTimesOut... | {
"fields": [
{
"declarator": "wrapper =\n ORBUtilSystemException.self",
"modifier": "private static final",
"original_string": "private static final ORBUtilSystemException wrapper =\n ORBUtilSystemException.self ;",
"type": "ORBUtilSystemException",
"var_name": "wrappe... | {
"body": "void runSelectionLoopOnce() throws IOException {\n beginSelect();\n\n int n = 0;\n handleDeferredRegistrations();\n enableInterestOps();\n try {\n n = selector.select(timeout);\n } catch (IOException e) {\n display( \"Exception in select:\", ... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_13 | {
"fields": [
{
"declarator": "factory = new TypeFactory()",
"modifier": "private",
"original_string": "private TypeFactory factory = new TypeFactory();",
"type": "TypeFactory",
"var_name": "factory"
}
],
"file": "rmic/src/test/java/org/glassfish/rmic/asm/TypeFactoryTest.java... | {
"body": "@Test\n public void constructAllObjectArguments() throws Exception {\n Type methodType = TypeFactory.createMethodType(\"(Ljava/lang/String;Lorg/glassfish/rmic/classes/nestedClasses/TwoLevelNested$Level1;)V\");\n\n assertThat(methodType.getReturnType(), equalTo(Type.tVoid));\n assert... | {
"fields": [],
"file": "rmic/src/main/java/org/glassfish/rmic/asm/TypeFactory.java",
"identifier": "TypeFactory",
"interfaces": "",
"methods": [
{
"class_method_signature": "TypeFactory.createType(String descriptor)",
"constructor": false,
"full_signature": "static Type createType(Strin... | {
"body": "static Type createMethodType(String descriptor) {\n org.objectweb.asm.Type returnType = org.objectweb.asm.Type.getReturnType(descriptor);\n return Type.tMethod(toRmicType(returnType), toTypeArray(org.objectweb.asm.Type.getArgumentTypes(descriptor)));\n }",
"class_method_signature": "Type... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_52 | {
"fields": [
{
"declarator": "mementos = new ArrayList<>()",
"modifier": "private",
"original_string": "private List<Memento> mementos = new ArrayList<>();",
"type": "List<Memento>",
"var_name": "mementos"
}
],
"file": "orbmain/src/test/java/com/sun/corba/ee/spi/presentation... | {
"body": "@Test\n public void defaultOrbPresentationManager_createsDynamicStubs() throws Exception {\n assertThat(PresentationDefaults.makeOrbPresentationManager().useDynamicStubs(), is(true));\n }",
"class_method_signature": "PresentationDefaultsTest.defaultOrbPresentationManager_createsDynamicStubs()",
"c... | {
"fields": [
{
"declarator": "staticImpl = null",
"modifier": "private static",
"original_string": "private static PresentationManager.StubFactoryFactory staticImpl = null;",
"type": "PresentationManager.StubFactoryFactory",
"var_name": "staticImpl"
},
{
"declarator": ... | {
"body": "public static PresentationManagerImpl makeOrbPresentationManager() {\n final boolean useDynamicStub = getBooleanPropertyValue( \n ORBConstants.USE_DYNAMIC_STUB_PROPERTY, inAppServer() ) ;\n\n final boolean debug = getBooleanPropertyValue( \n ORBConstants.DEBUG_DYNAMIC_ST... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_25 | {
"fields": [
{
"declarator": "BUFFER_SIZE = 128",
"modifier": "static final",
"original_string": "static final int BUFFER_SIZE = 128;",
"type": "int",
"var_name": "BUFFER_SIZE"
},
{
"declarator": "orb = createStrictStub(ORBFake.class)",
"modifier": "private final... | {
"body": "@Test(expected = RemarshalException.class)\n public void whenPIHandleReturnsRemarshalException_throwIt() throws Exception {\n orb.setPiEndingPointException(new RemarshalException());\n\n impl.marshalingComplete(null, outputObject);\n }",
"class_method_signature": "ClientRequestDispatc... | {
"fields": [
{
"declarator": "wrapper =\n ORBUtilSystemException.self",
"modifier": "private static final",
"original_string": "private static final ORBUtilSystemException wrapper =\n ORBUtilSystemException.self ;",
"type": "ORBUtilSystemException",
"var_name": "wrappe... | {
"body": "@Subcontract\n public CDRInputObject marshalingComplete(java.lang.Object self,\n CDROutputObject outputObject)\n throws \n ApplicationException, \n org.omg.CORBA.portable.RemarshalException\n {\n MessageMediator messageMedia... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_6 | {
"fields": [
{
"declarator": "USE_LEGACY_PARSING_PROPERTY = \"org.glassfish.rmic.UseLegacyClassParsing\"",
"modifier": "private static final",
"original_string": "private static final String USE_LEGACY_PARSING_PROPERTY = \"org.glassfish.rmic.UseLegacyClassParsing\";",
"type": "String",
... | {
"body": "@Test\n public void whenLegacyParserRequestedOnJdk10_chooseAsmParser() throws Exception {\n preferLegacyParser();\n simulateJdkVersion(\"10\");\n\n ClassDefinitionFactory factory = BatchEnvironment.createClassDefinitionFactory();\n\n assertThat(factory, instanceOf(AsmClassFac... | {
"fields": [
{
"declarator": "USE_LEGACY_PARSING_PROPERTY = \"org.glassfish.rmic.UseLegacyClassParsing\"",
"modifier": "private static final",
"original_string": "private static final String USE_LEGACY_PARSING_PROPERTY = \"org.glassfish.rmic.UseLegacyClassParsing\";",
"type": "String",
... | {
"body": "static ClassDefinitionFactory createClassDefinitionFactory() {\n try {\n return useBinaryClassFactory() ? new BinaryClassFactory() : new AsmClassFactory();\n } catch (NoClassDefFoundError e) {\n if (!mayUseBinaryClassFactory())\n throw new BatchEnvironment... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_33 | {
"fields": [
{
"declarator": "DATA_TO_BE_READ = new byte[]{0, 1, 2, 3, 4, 5, 6}",
"modifier": "private static final",
"original_string": "private static final byte[] DATA_TO_BE_READ = new byte[]{0, 1, 2, 3, 4, 5, 6};",
"type": "byte[]",
"var_name": "DATA_TO_BE_READ"
},
{
... | {
"body": "@Test\n public void whenCurrentBufferNull_allocateBufferAndRead() throws IOException {\n enqueData(DATA_TO_BE_READ);\n ByteBuffer buffer = reader.read(getSocketChannel(), null, 0);\n assertBufferContents(buffer, DATA_TO_BE_READ);\n }",
"class_method_signature": "SocketChannelRe... | {
"fields": [
{
"declarator": "orb",
"modifier": "private",
"original_string": "private ORB orb;",
"type": "ORB",
"var_name": "orb"
}
],
"file": "orbmain/src/main/java/com/sun/corba/ee/impl/transport/SocketChannelReader.java",
"identifier": "SocketChannelReader",
"interfa... | {
"body": "public ByteBuffer read(SocketChannel channel, ByteBuffer previouslyReadData, int minNeeded) throws IOException {\n ByteBuffer byteBuffer = prepareToAppendTo(previouslyReadData);\n\n int numBytesRead = channel.read(byteBuffer);\n if (numBytesRead < 0) {\n throw new EOFExcepti... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_48 | {
"fields": [
{
"declarator": "orb = createStrictStub(ORBFake.class)",
"modifier": "private",
"original_string": "private ORBFake orb = createStrictStub(ORBFake.class);",
"type": "ORBFake",
"var_name": "orb"
},
{
"declarator": "any",
"modifier": "private",
"... | {
"body": "@Test\n public void whenAnyCreated_typeIsNull() {\n assertEquals(TCKind.tk_null, any.type().kind());\n }",
"class_method_signature": "AnyImplTest.whenAnyCreated_typeIsNull()",
"constructor": false,
"full_signature": "@Test public void whenAnyCreated_typeIsNull()",
"identifier": "whenAn... | {
"fields": [
{
"declarator": "serialVersionUID = -8646067979785949029L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -8646067979785949029L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "typ... | {
"body": "public TypeCode type() {\n return typeCode;\n }",
"class_method_signature": "AnyImpl.type()",
"constructor": false,
"full_signature": "public TypeCode type()",
"identifier": "type",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "TypeCode",
"signature": ... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_26 | {
"fields": [
{
"declarator": "presentationManager = createStrictStub(PresentationManagerFake.class)",
"modifier": "private",
"original_string": "private PresentationManagerFake presentationManager = createStrictStub(PresentationManagerFake.class);",
"type": "PresentationManagerFake",
... | {
"body": "@Test\n public void whenColocatedCallThrowsException_exceptionHasStackTrace() throws Throwable {\n try {\n handler.invoke(calledObject, throwExceptionMethod, new Object[0]);\n } catch (TestException exception) {\n assertThat(exception.getStackTrace(), not(emptyArray()... | {
"fields": [
{
"declarator": "classData",
"modifier": "private transient",
"original_string": "private transient PresentationManager.ClassData classData ;",
"type": "PresentationManager.ClassData",
"var_name": "classData"
},
{
"declarator": "pm",
"modifier": "pri... | {
"body": "public Object invoke( Object proxy, final Method method,\n Object[] args ) throws Throwable {\n\n Delegate delegate = null ;\n try {\n delegate = StubAdapter.getDelegate( stub ) ;\n } catch (SystemException ex) {\n throw Util.getInstance().mapSystemExceptio... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_5 | {
"fields": [
{
"declarator": "USE_LEGACY_PARSING_PROPERTY = \"org.glassfish.rmic.UseLegacyClassParsing\"",
"modifier": "private static final",
"original_string": "private static final String USE_LEGACY_PARSING_PROPERTY = \"org.glassfish.rmic.UseLegacyClassParsing\";",
"type": "String",
... | {
"body": "@Test\n public void whenLegacyParserRequestedOnJdk9_chooseBinaryParser() throws Exception {\n preferLegacyParser();\n simulateJdkVersion(\"9\");\n\n ClassDefinitionFactory factory = BatchEnvironment.createClassDefinitionFactory();\n\n assertThat(factory, instanceOf(BinaryClas... | {
"fields": [
{
"declarator": "USE_LEGACY_PARSING_PROPERTY = \"org.glassfish.rmic.UseLegacyClassParsing\"",
"modifier": "private static final",
"original_string": "private static final String USE_LEGACY_PARSING_PROPERTY = \"org.glassfish.rmic.UseLegacyClassParsing\";",
"type": "String",
... | {
"body": "static ClassDefinitionFactory createClassDefinitionFactory() {\n try {\n return useBinaryClassFactory() ? new BinaryClassFactory() : new AsmClassFactory();\n } catch (NoClassDefFoundError e) {\n if (!mayUseBinaryClassFactory())\n throw new BatchEnvironment... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_30 | {
"fields": [
{
"declarator": "impl = new JNDIStateFactoryImpl()",
"modifier": "private",
"original_string": "private JNDIStateFactoryImpl impl = new JNDIStateFactoryImpl();",
"type": "JNDIStateFactoryImpl",
"var_name": "impl"
},
{
"declarator": "remote = createStrictSt... | {
"body": "@Test\n public void whenObjectIsNotAStub_returnNull() throws Exception {\n installDelegate(createStrictStub(NoStubDelegate.class));\n\n assertThat(impl.getStateToBind(remote, null, context, env), nullValue());\n }",
"class_method_signature": "JNDIStateFactoryImplTest.whenObjectIsNotAS... | {
"fields": [
{
"declarator": "orbFields = new ConcurrentHashMap<>()",
"modifier": "private",
"original_string": "private ConcurrentMap<Class<?>, Field> orbFields = new ConcurrentHashMap<>();",
"type": "ConcurrentMap<Class<?>, Field>",
"var_name": "orbFields"
}
],
"file": "or... | {
"body": "public Object getStateToBind(Object orig, Name name, Context ctx,\n Hashtable<?,?> env) throws NamingException \n {\n if (orig instanceof org.omg.CORBA.Object) {\n return orig;\n }\n\n if (!(orig instanceof Remote)) {\n return null;\n }\n\n ... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_9 | {
"fields": [],
"file": "rmic/src/test/java/org/glassfish/rmic/asm/AsmClassFactoryTest.java",
"identifier": "AsmClassFactoryTest",
"interfaces": "",
"superclass": "extends ClassDefinitionFactoryTest"
} | {
"body": "@Test\n public void canRetrieveLatestAsmVersion() {\n assertThat(AsmClassFactory.getLatestVersion(), equalTo(Opcodes.ASM6));\n }",
"class_method_signature": "AsmClassFactoryTest.canRetrieveLatestAsmVersion()",
"constructor": false,
"full_signature": "@Test public void canRetrieveLatestAs... | {
"fields": [
{
"declarator": "simulateMissingASM = false",
"modifier": "@SuppressWarnings(\"unused\")\n private static final",
"original_string": "@SuppressWarnings(\"unused\")\n private static final Boolean simulateMissingASM = false;",
"type": "Boolean",
"var_name": "simulat... | {
"body": "static int getLatestVersion() {\n try {\n int latest = 0;\n for (Field field : Opcodes.class.getDeclaredFields()) {\n if (field.getName().startsWith(\"ASM\") && field.getType().equals(int.class)) {\n latest = Math.max(latest, field.getInt(Opcod... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_47 | {
"fields": [
{
"declarator": "orb = createStrictStub(ORB.class)",
"modifier": "private",
"original_string": "private ORB orb = createStrictStub(ORB.class);",
"type": "ORB",
"var_name": "orb"
},
{
"declarator": "oid = createStrictStub(ObjectId.class)",
"modifier":... | {
"body": "@Test\n public void whenForeignProfileOrbVersion_isLocalReturnsFalse() throws Exception {\n setOrbVersion(ORBVersionImpl.FOREIGN);\n\n assertThat(iiopProfile.isLocal(), is(false));\n }",
"class_method_signature": "IIOPProfileImplTest.whenForeignProfileOrbVersion_isLocalReturnsFalse()"... | {
"fields": [
{
"declarator": "wrapper =\n IORSystemException.self",
"modifier": "private static final",
"original_string": "private static final IORSystemException wrapper =\n IORSystemException.self ;",
"type": "IORSystemException",
"var_name": "wrapper"
},
{
... | {
"body": "@IsLocal\n public synchronized boolean isLocal()\n {\n if (!checkedIsLocal) {\n checkedIsLocal = true ;\n if (isForeignObject()) return false;\n\n final int port = proftemp.getPrimaryAddress().getPort();\n final String host = proftemp.getPrimaryAddre... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_10 | {
"fields": [
{
"declarator": "factory = new TypeFactory()",
"modifier": "private",
"original_string": "private TypeFactory factory = new TypeFactory();",
"type": "TypeFactory",
"var_name": "factory"
}
],
"file": "rmic/src/test/java/org/glassfish/rmic/asm/TypeFactoryTest.java... | {
"body": "@Test\n public void constructNoArgVoidMethodType() throws Exception {\n Type methodType = TypeFactory.createMethodType(\"()V\");\n\n assertThat(methodType.getReturnType(), equalTo(Type.tVoid));\n assertThat(methodType.getArgumentTypes(), emptyArray());\n }",
"class_method_signa... | {
"fields": [],
"file": "rmic/src/main/java/org/glassfish/rmic/asm/TypeFactory.java",
"identifier": "TypeFactory",
"interfaces": "",
"methods": [
{
"class_method_signature": "TypeFactory.createType(String descriptor)",
"constructor": false,
"full_signature": "static Type createType(Strin... | {
"body": "static Type createMethodType(String descriptor) {\n org.objectweb.asm.Type returnType = org.objectweb.asm.Type.getReturnType(descriptor);\n return Type.tMethod(toRmicType(returnType), toTypeArray(org.objectweb.asm.Type.getArgumentTypes(descriptor)));\n }",
"class_method_signature": "Type... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_51 | {
"fields": [
{
"declarator": "mementos = new ArrayList<>()",
"modifier": "private",
"original_string": "private List<Memento> mementos = new ArrayList<>();",
"type": "List<Memento>",
"var_name": "mementos"
}
],
"file": "orbmain/src/test/java/com/sun/corba/ee/spi/presentation... | {
"body": "@Test\n public void staticStubFactory_doesNotCreateDynamicStubs() throws Exception {\n assertThat(PresentationDefaults.getStaticStubFactoryFactory().createsDynamicStubs(), is(false));\n }",
"class_method_signature": "PresentationDefaultsTest.staticStubFactory_doesNotCreateDynamicStubs()",
"constru... | {
"fields": [
{
"declarator": "staticImpl = null",
"modifier": "private static",
"original_string": "private static PresentationManager.StubFactoryFactory staticImpl = null;",
"type": "PresentationManager.StubFactoryFactory",
"var_name": "staticImpl"
},
{
"declarator": ... | {
"body": "public synchronized static PresentationManager.StubFactoryFactory getStaticStubFactoryFactory() {\n if (staticImpl == null) staticImpl = new StubFactoryFactoryStaticImpl();\n\n return staticImpl;\n }",
"class_method_signature": "PresentationDefaults.getStaticStubFactoryFactory()",
"con... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_50 | {
"fields": [
{
"declarator": "mementos = new ArrayList<>()",
"modifier": "private",
"original_string": "private List<Memento> mementos = new ArrayList<>();",
"type": "List<Memento>",
"var_name": "mementos"
}
],
"file": "orbmain/src/test/java/com/sun/corba/ee/spi/presentation... | {
"body": "@Test\n public void dynamicStubFactory_createsDynamicStubs() throws Exception {\n assertThat(PresentationDefaults.getDynamicStubFactoryFactory().createsDynamicStubs(), is(true));\n }",
"class_method_signature": "PresentationDefaultsTest.dynamicStubFactory_createsDynamicStubs()",
"constructor": fal... | {
"fields": [
{
"declarator": "staticImpl = null",
"modifier": "private static",
"original_string": "private static PresentationManager.StubFactoryFactory staticImpl = null;",
"type": "PresentationManager.StubFactoryFactory",
"var_name": "staticImpl"
},
{
"declarator": ... | {
"body": "synchronized static PresentationManager.StubFactoryFactory getDynamicStubFactoryFactory() {\n if (dynamicImpl == null) dynamicImpl = new StubFactoryFactoryCodegenImpl();\n\n return dynamicImpl ;\n }",
"class_method_signature": "PresentationDefaults.getDynamicStubFactoryFactory()",
"con... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_11 | {
"fields": [
{
"declarator": "factory = new TypeFactory()",
"modifier": "private",
"original_string": "private TypeFactory factory = new TypeFactory();",
"type": "TypeFactory",
"var_name": "factory"
}
],
"file": "rmic/src/test/java/org/glassfish/rmic/asm/TypeFactoryTest.java... | {
"body": "@Test\n public void constructByteArrayToIntType() throws Exception {\n Type methodType = TypeFactory.createMethodType(\"([B)I\");\n\n assertThat(methodType.getReturnType(), equalTo(Type.tInt));\n assertThat(methodType.getArgumentTypes(), arrayContaining(Type.tArray(Type.tByte)));\n ... | {
"fields": [],
"file": "rmic/src/main/java/org/glassfish/rmic/asm/TypeFactory.java",
"identifier": "TypeFactory",
"interfaces": "",
"methods": [
{
"class_method_signature": "TypeFactory.createType(String descriptor)",
"constructor": false,
"full_signature": "static Type createType(Strin... | {
"body": "static Type createMethodType(String descriptor) {\n org.objectweb.asm.Type returnType = org.objectweb.asm.Type.getReturnType(descriptor);\n return Type.tMethod(toRmicType(returnType), toTypeArray(org.objectweb.asm.Type.getArgumentTypes(descriptor)));\n }",
"class_method_signature": "Type... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_46 | {
"fields": [
{
"declarator": "BYTE_DATA = {0,1,2,3,4,5,6,7,8,9,10}",
"modifier": "private static final",
"original_string": "private static final byte[] BYTE_DATA = {0,1,2,3,4,5,6,7,8,9,10};",
"type": "byte[]",
"var_name": "BYTE_DATA"
}
],
"file": "orbmain/src/test/java/com/... | {
"body": "@Test(expected = RuntimeException.class)\n public void whenNioConfigureBlockingFails_throwException() throws IOException {\n SocketChannelFake socketChannel = getSocketChannel();\n socketChannel.setFailToConfigureBlocking();\n useNio();\n }",
"class_method_signature": "Connecti... | {
"fields": [
{
"declarator": "wrapper =\n ORBUtilSystemException.self",
"modifier": "protected static final",
"original_string": "protected static final ORBUtilSystemException wrapper =\n ORBUtilSystemException.self;",
"type": "ORBUtilSystemException",
"var_nam... | {
"body": "public SocketChannel getSocketChannel() {\n return socketChannel;\n }",
"class_method_signature": "ConnectionImpl.getSocketChannel()",
"constructor": false,
"full_signature": "public SocketChannel getSocketChannel()",
"identifier": "getSocketChannel",
"invocations": [],
"modifiers": "... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_8 | {
"fields": [
{
"declarator": "USE_LEGACY_PARSING_PROPERTY = \"org.glassfish.rmic.UseLegacyClassParsing\"",
"modifier": "private static final",
"original_string": "private static final String USE_LEGACY_PARSING_PROPERTY = \"org.glassfish.rmic.UseLegacyClassParsing\";",
"type": "String",
... | {
"body": "@Test\n public void whenLegacyParserRequestedOnJdk11_chooseAsmParser() throws Exception {\n preferLegacyParser();\n simulateJdkVersion(\"11\");\n\n ClassDefinitionFactory factory = BatchEnvironment.createClassDefinitionFactory();\n\n assertThat(factory, instanceOf(AsmClassFac... | {
"fields": [
{
"declarator": "USE_LEGACY_PARSING_PROPERTY = \"org.glassfish.rmic.UseLegacyClassParsing\"",
"modifier": "private static final",
"original_string": "private static final String USE_LEGACY_PARSING_PROPERTY = \"org.glassfish.rmic.UseLegacyClassParsing\";",
"type": "String",
... | {
"body": "static ClassDefinitionFactory createClassDefinitionFactory() {\n try {\n return useBinaryClassFactory() ? new BinaryClassFactory() : new AsmClassFactory();\n } catch (NoClassDefFoundError e) {\n if (!mayUseBinaryClassFactory())\n throw new BatchEnvironment... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_31 | {
"fields": [
{
"declarator": "impl = new JNDIStateFactoryImpl()",
"modifier": "private",
"original_string": "private JNDIStateFactoryImpl impl = new JNDIStateFactoryImpl();",
"type": "JNDIStateFactoryImpl",
"var_name": "impl"
},
{
"declarator": "remote = createStrictSt... | {
"body": "@Test\n public void whenObjectIsAStub_returnIt() throws Exception {\n installDelegateForStub(corbaStub);\n\n Object state = impl.getStateToBind(remote, null, context, env);\n assertThat(state, sameInstance(corbaStub));\n }",
"class_method_signature": "JNDIStateFactoryImplTest.w... | {
"fields": [
{
"declarator": "orbFields = new ConcurrentHashMap<>()",
"modifier": "private",
"original_string": "private ConcurrentMap<Class<?>, Field> orbFields = new ConcurrentHashMap<>();",
"type": "ConcurrentMap<Class<?>, Field>",
"var_name": "orbFields"
}
],
"file": "or... | {
"body": "public Object getStateToBind(Object orig, Name name, Context ctx,\n Hashtable<?,?> env) throws NamingException \n {\n if (orig instanceof org.omg.CORBA.Object) {\n return orig;\n }\n\n if (!(orig instanceof Remote)) {\n return null;\n }\n\n ... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_4 | {
"fields": [
{
"declarator": "USE_LEGACY_PARSING_PROPERTY = \"org.glassfish.rmic.UseLegacyClassParsing\"",
"modifier": "private static final",
"original_string": "private static final String USE_LEGACY_PARSING_PROPERTY = \"org.glassfish.rmic.UseLegacyClassParsing\";",
"type": "String",
... | {
"body": "@Test\n public void whenLegacyParserRequestedOnJdk8_chooseBinaryParser() throws Exception {\n preferLegacyParser();\n simulateJdkVersion(\"1.8\");\n\n ClassDefinitionFactory factory = BatchEnvironment.createClassDefinitionFactory();\n\n assertThat(factory, instanceOf(BinaryCl... | {
"fields": [
{
"declarator": "USE_LEGACY_PARSING_PROPERTY = \"org.glassfish.rmic.UseLegacyClassParsing\"",
"modifier": "private static final",
"original_string": "private static final String USE_LEGACY_PARSING_PROPERTY = \"org.glassfish.rmic.UseLegacyClassParsing\";",
"type": "String",
... | {
"body": "static ClassDefinitionFactory createClassDefinitionFactory() {\n try {\n return useBinaryClassFactory() ? new BinaryClassFactory() : new AsmClassFactory();\n } catch (NoClassDefFoundError e) {\n if (!mayUseBinaryClassFactory())\n throw new BatchEnvironment... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_27 | {
"fields": [
{
"declarator": "impl = new JNDIStateFactoryImpl()",
"modifier": "private",
"original_string": "private JNDIStateFactoryImpl impl = new JNDIStateFactoryImpl();",
"type": "JNDIStateFactoryImpl",
"var_name": "impl"
},
{
"declarator": "remote = createStrictSt... | {
"body": "@Test\n public void whenObjectIsCorbaObject_returnIt() throws Exception {\n Object testObject = createStrictStub(org.omg.CORBA.Object.class);\n\n assertThat(impl.getStateToBind(testObject, null, null, env), sameInstance(testObject));\n }",
"class_method_signature": "JNDIStateFactoryIm... | {
"fields": [
{
"declarator": "orbFields = new ConcurrentHashMap<>()",
"modifier": "private",
"original_string": "private ConcurrentMap<Class<?>, Field> orbFields = new ConcurrentHashMap<>();",
"type": "ConcurrentMap<Class<?>, Field>",
"var_name": "orbFields"
}
],
"file": "or... | {
"body": "public Object getStateToBind(Object orig, Name name, Context ctx,\n Hashtable<?,?> env) throws NamingException \n {\n if (orig instanceof org.omg.CORBA.Object) {\n return orig;\n }\n\n if (!(orig instanceof Remote)) {\n return null;\n }\n\n ... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_41 | {
"fields": [
{
"declarator": "timer = new TimerFake()",
"modifier": "private",
"original_string": "private TimerFake timer = new TimerFake();",
"type": "TimerFake",
"var_name": "timer"
},
{
"declarator": "selector = new SelectorImpl(getOrb(), timer)",
"modifier":... | {
"body": "@Test\n public void whenRegisteringAcceptEventWithoutSelectThread_listenerThreadIsCreated() {\n eventHandler.setUseSelectThreadToWait(false);\n eventHandler.setInterestOps(SelectionKey.OP_ACCEPT);\n selector.registerForEvent(eventHandler);\n assertTrue(getWorkQueue().remove()... | {
"fields": [
{
"declarator": "wrapper =\n ORBUtilSystemException.self",
"modifier": "private static final",
"original_string": "private static final ORBUtilSystemException wrapper =\n ORBUtilSystemException.self ;",
"type": "ORBUtilSystemException",
"var_name": "wrappe... | {
"body": "@Transport\n public void registerForEvent(EventHandler eventHandler)\n {\n if (isClosed()) {\n closedEventHandler();\n return;\n }\n\n if (eventHandler.shouldUseSelectThreadToWait()) {\n synchronized (deferredRegistrations) {\n defe... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_16 | {
"fields": [
{
"declarator": "factory = new TypeFactory()",
"modifier": "private",
"original_string": "private TypeFactory factory = new TypeFactory();",
"type": "TypeFactory",
"var_name": "factory"
}
],
"file": "rmic/src/test/java/org/glassfish/rmic/asm/TypeFactoryTest.java... | {
"body": "@Test\n public void constructMultiDimensionalArrayType() throws Exception {\n assertThat(TypeFactory.createType(\"[[I\"), equalTo(Type.tArray(Type.tArray(Type.tInt))));\n }",
"class_method_signature": "TypeFactoryTest.constructMultiDimensionalArrayType()",
"constructor": false,
"full_sig... | {
"fields": [],
"file": "rmic/src/main/java/org/glassfish/rmic/asm/TypeFactory.java",
"identifier": "TypeFactory",
"interfaces": "",
"methods": [
{
"class_method_signature": "TypeFactory.createType(String descriptor)",
"constructor": false,
"full_signature": "static Type createType(Strin... | {
"body": "static Type createType(String descriptor) {\n return toRmicType(org.objectweb.asm.Type.getType(descriptor));\n }",
"class_method_signature": "TypeFactory.createType(String descriptor)",
"constructor": false,
"full_signature": "static Type createType(String descriptor)",
"identifier": "cre... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_57 | {
"fields": [
{
"declarator": "mementos = new HashSet<>()",
"modifier": "private",
"original_string": "private HashSet<Memento> mementos = new HashSet<>();",
"type": "HashSet<Memento>",
"var_name": "mementos"
}
],
"file": "idlj/src/test/java/com/sun/tools/corba/ee/idl/UtilTes... | {
"body": "@Test\n public void substituteSingleParamMessage() throws Exception {\n assertThat(Util.getMessage(\"InvalidArgument.1\", \"zork\"), equalTo(\"Invalid argument: zork.\"));\n }",
"class_method_signature": "UtilTest.substituteSingleParamMessage()",
"constructor": false,
"full_signature": ... | {
"fields": [
{
"declarator": "DEFAULT_MESSAGE_RESOURCE = \"com/sun/tools/corba/ee/idl/idl\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_MESSAGE_RESOURCE = \"com/sun/tools/corba/ee/idl/idl\";",
"type": "String",
"var_name": "DEFAULT_M... | {
"body": "public static String getMessage (String key)\n {\n if (messages == null)\n readMessages ();\n String message = messages.getProperty (key);\n if (message == null)\n message = getDefaultMessage (key);\n return message;\n }",
"class_method_signature": "Util.getMessage(String key)",
... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_20 | {
"fields": [
{
"declarator": "classPath = new ClassPath()",
"modifier": "private",
"original_string": "private ClassPath classPath = new ClassPath();",
"type": "ClassPath",
"var_name": "classPath"
},
{
"declarator": "out = new ByteArrayOutputStream()",
"modifier"... | {
"body": "@Test\n public void afterThreeErrors_outputReportsNumberOfErrors() throws Exception {\n reportError();\n reportError();\n reportError();\n\n main.displayErrors(environment);\n\n assertThat(getOutput(), containsString(\"3 errors\"));\n }",
"class_method_signature":... | {
"fields": [
{
"declarator": "sourcePathArg",
"modifier": "",
"original_string": "String sourcePathArg;",
"type": "String",
"var_name": "sourcePathArg"
},
{
"declarator": "sysClassPathArg",
"modifier": "",
"original_string": "String sysClassPathArg;",
... | {
"body": "boolean displayErrors(BatchEnvironment env) {\n List<String> summary = new ArrayList<>();\n \n if (env.nerrors > 0) summary.add(getErrorSummary(env));\n if (env.nwarnings > 0) summary.add(getWarningSummary(env));\n if (!summary.isEmpty()) output(String.join(\", \", summar... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_3 | {
"fields": [
{
"declarator": "USE_LEGACY_PARSING_PROPERTY = \"org.glassfish.rmic.UseLegacyClassParsing\"",
"modifier": "private static final",
"original_string": "private static final String USE_LEGACY_PARSING_PROPERTY = \"org.glassfish.rmic.UseLegacyClassParsing\";",
"type": "String",
... | {
"body": "@Test(expected = BatchEnvironmentError.class)\n public void whenAsmClassesMissingOnJdk10_reportError() throws Exception {\n simulateAsmClassesMissing();\n simulateJdkVersion(\"10\");\n\n BatchEnvironment.createClassDefinitionFactory();\n }",
"class_method_signature": "BatchEnvi... | {
"fields": [
{
"declarator": "USE_LEGACY_PARSING_PROPERTY = \"org.glassfish.rmic.UseLegacyClassParsing\"",
"modifier": "private static final",
"original_string": "private static final String USE_LEGACY_PARSING_PROPERTY = \"org.glassfish.rmic.UseLegacyClassParsing\";",
"type": "String",
... | {
"body": "static ClassDefinitionFactory createClassDefinitionFactory() {\n try {\n return useBinaryClassFactory() ? new BinaryClassFactory() : new AsmClassFactory();\n } catch (NoClassDefFoundError e) {\n if (!mayUseBinaryClassFactory())\n throw new BatchEnvironment... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_36 | {
"fields": [
{
"declarator": "DATA_TO_BE_READ = new byte[]{0, 1, 2, 3, 4, 5, 6}",
"modifier": "private static final",
"original_string": "private static final byte[] DATA_TO_BE_READ = new byte[]{0, 1, 2, 3, 4, 5, 6};",
"type": "byte[]",
"var_name": "DATA_TO_BE_READ"
},
{
... | {
"body": "@Test\n public void whenCurrentBufferTooSmallForIncomingData_reallocateAndAppend() throws IOException {\n ByteBuffer oldBuffer = ByteBuffer.allocate(5);\n populateBuffer(oldBuffer, DATA_TO_BE_READ, 0, 3);\n enqueData(DATA_TO_BE_READ, 3, DATA_TO_BE_READ.length - 3);\n ByteBuff... | {
"fields": [
{
"declarator": "orb",
"modifier": "private",
"original_string": "private ORB orb;",
"type": "ORB",
"var_name": "orb"
}
],
"file": "orbmain/src/main/java/com/sun/corba/ee/impl/transport/SocketChannelReader.java",
"identifier": "SocketChannelReader",
"interfa... | {
"body": "public ByteBuffer read(SocketChannel channel, ByteBuffer previouslyReadData, int minNeeded) throws IOException {\n ByteBuffer byteBuffer = prepareToAppendTo(previouslyReadData);\n\n int numBytesRead = channel.read(byteBuffer);\n if (numBytesRead < 0) {\n throw new EOFExcepti... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_37 | {
"fields": [
{
"declarator": "DATA_TO_BE_READ = new byte[]{0, 1, 2, 3, 4, 5, 6}",
"modifier": "private static final",
"original_string": "private static final byte[] DATA_TO_BE_READ = new byte[]{0, 1, 2, 3, 4, 5, 6};",
"type": "byte[]",
"var_name": "DATA_TO_BE_READ"
},
{
... | {
"body": "@Test\n public void whenMoreDataAvailableThanNeeded_ignoreIt() throws IOException {\n ByteBuffer oldBuffer = ByteBuffer.allocate(10);\n oldBuffer.flip();\n enqueData(DATA_TO_BE_READ);\n getSocketChannel().setNumBytesToRead(3, 3);\n ByteBuffer buffer = reader.read(getSo... | {
"fields": [
{
"declarator": "orb",
"modifier": "private",
"original_string": "private ORB orb;",
"type": "ORB",
"var_name": "orb"
}
],
"file": "orbmain/src/main/java/com/sun/corba/ee/impl/transport/SocketChannelReader.java",
"identifier": "SocketChannelReader",
"interfa... | {
"body": "public ByteBuffer read(SocketChannel channel, ByteBuffer previouslyReadData, int minNeeded) throws IOException {\n ByteBuffer byteBuffer = prepareToAppendTo(previouslyReadData);\n\n int numBytesRead = channel.read(byteBuffer);\n if (numBytesRead < 0) {\n throw new EOFExcepti... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_2 | {
"fields": [
{
"declarator": "USE_LEGACY_PARSING_PROPERTY = \"org.glassfish.rmic.UseLegacyClassParsing\"",
"modifier": "private static final",
"original_string": "private static final String USE_LEGACY_PARSING_PROPERTY = \"org.glassfish.rmic.UseLegacyClassParsing\";",
"type": "String",
... | {
"body": "@Test\n public void whenAsmClassesMissingOnJdk8_chooseBinaryParser() throws Exception {\n simulateAsmClassesMissing();\n simulateJdkVersion(\"1.8\");\n\n ClassDefinitionFactory factory = BatchEnvironment.createClassDefinitionFactory();\n\n assertThat(factory, instanceOf(Binar... | {
"fields": [
{
"declarator": "USE_LEGACY_PARSING_PROPERTY = \"org.glassfish.rmic.UseLegacyClassParsing\"",
"modifier": "private static final",
"original_string": "private static final String USE_LEGACY_PARSING_PROPERTY = \"org.glassfish.rmic.UseLegacyClassParsing\";",
"type": "String",
... | {
"body": "static ClassDefinitionFactory createClassDefinitionFactory() {\n try {\n return useBinaryClassFactory() ? new BinaryClassFactory() : new AsmClassFactory();\n } catch (NoClassDefFoundError e) {\n if (!mayUseBinaryClassFactory())\n throw new BatchEnvironment... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_21 | {
"fields": [
{
"declarator": "classPath = new ClassPath()",
"modifier": "private",
"original_string": "private ClassPath classPath = new ClassPath();",
"type": "ClassPath",
"var_name": "classPath"
},
{
"declarator": "out = new ByteArrayOutputStream()",
"modifier"... | {
"body": "@Test\n public void afterOneWarning_outputReportsOneWarning() throws Exception {\n reportWarning();\n\n main.displayErrors(environment);\n\n assertThat(getOutput(), containsString(\"1 warning\"));\n }",
"class_method_signature": "MainTest.afterOneWarning_outputReportsOneWarning... | {
"fields": [
{
"declarator": "sourcePathArg",
"modifier": "",
"original_string": "String sourcePathArg;",
"type": "String",
"var_name": "sourcePathArg"
},
{
"declarator": "sysClassPathArg",
"modifier": "",
"original_string": "String sysClassPathArg;",
... | {
"body": "boolean displayErrors(BatchEnvironment env) {\n List<String> summary = new ArrayList<>();\n \n if (env.nerrors > 0) summary.add(getErrorSummary(env));\n if (env.nwarnings > 0) summary.add(getWarningSummary(env));\n if (!summary.isEmpty()) output(String.join(\", \", summar... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_56 | {
"fields": [
{
"declarator": "mementos = new HashSet<>()",
"modifier": "private",
"original_string": "private HashSet<Memento> mementos = new HashSet<>();",
"type": "HashSet<Memento>",
"var_name": "mementos"
}
],
"file": "idlj/src/test/java/com/sun/tools/corba/ee/idl/UtilTes... | {
"body": "@Test\n public void retrieveMessage() throws Exception {\n assertThat(Util.getMessage(\"EvaluationException.not\"), equalTo(\"bitwise not\"));\n }",
"class_method_signature": "UtilTest.retrieveMessage()",
"constructor": false,
"full_signature": "@Test public void retrieveMessage()",
"i... | {
"fields": [
{
"declarator": "DEFAULT_MESSAGE_RESOURCE = \"com/sun/tools/corba/ee/idl/idl\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_MESSAGE_RESOURCE = \"com/sun/tools/corba/ee/idl/idl\";",
"type": "String",
"var_name": "DEFAULT_M... | {
"body": "public static String getMessage (String key)\n {\n if (messages == null)\n readMessages ();\n String message = messages.getProperty (key);\n if (message == null)\n message = getDefaultMessage (key);\n return message;\n }",
"class_method_signature": "Util.getMessage(String key)",
... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_17 | {
"fields": [
{
"declarator": "classPath = new ClassPath()",
"modifier": "private",
"original_string": "private ClassPath classPath = new ClassPath();",
"type": "ClassPath",
"var_name": "classPath"
},
{
"declarator": "out = new ByteArrayOutputStream()",
"modifier"... | {
"body": "@Test\n public void whenNoErrorsOrWarnings_displayErrorsReturnsTrue() throws Exception {\n assertThat(main.displayErrors(environment), is(true));\n }",
"class_method_signature": "MainTest.whenNoErrorsOrWarnings_displayErrorsReturnsTrue()",
"constructor": false,
"full_signature": "@Test p... | {
"fields": [
{
"declarator": "sourcePathArg",
"modifier": "",
"original_string": "String sourcePathArg;",
"type": "String",
"var_name": "sourcePathArg"
},
{
"declarator": "sysClassPathArg",
"modifier": "",
"original_string": "String sysClassPathArg;",
... | {
"body": "boolean displayErrors(BatchEnvironment env) {\n List<String> summary = new ArrayList<>();\n \n if (env.nerrors > 0) summary.add(getErrorSummary(env));\n if (env.nwarnings > 0) summary.add(getWarningSummary(env));\n if (!summary.isEmpty()) output(String.join(\", \", summar... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
89198062_40 | {
"fields": [
{
"declarator": "DATA_TO_BE_READ = new byte[]{0, 1, 2, 3, 4, 5, 6}",
"modifier": "private static final",
"original_string": "private static final byte[] DATA_TO_BE_READ = new byte[]{0, 1, 2, 3, 4, 5, 6};",
"type": "byte[]",
"var_name": "DATA_TO_BE_READ"
},
{
... | {
"body": "@Test\n public void whenAtCapacityAndNoDataRemains_returnNullAndPreserveOldBuffer() throws IOException {\n ByteBuffer oldBuffer = ByteBuffer.wrap(DATA_TO_BE_READ);\n ByteBuffer buffer = reader.read(getSocketChannel(), oldBuffer, 10);\n assertNull(buffer);\n assertPopulatedBuf... | {
"fields": [
{
"declarator": "orb",
"modifier": "private",
"original_string": "private ORB orb;",
"type": "ORB",
"var_name": "orb"
}
],
"file": "orbmain/src/main/java/com/sun/corba/ee/impl/transport/SocketChannelReader.java",
"identifier": "SocketChannelReader",
"interfa... | {
"body": "public ByteBuffer read(SocketChannel channel, ByteBuffer previouslyReadData, int minNeeded) throws IOException {\n ByteBuffer byteBuffer = prepareToAppendTo(previouslyReadData);\n\n int numBytesRead = channel.read(byteBuffer);\n if (numBytesRead < 0) {\n throw new EOFExcepti... | {
"created": null,
"fork": null,
"fork_count": 17,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 89198062,
"size": 83940,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/javaee/glassfish-corba"
} |
10624930_22 | {
"fields": [],
"file": "model/push/src/test/java/org/jboss/aerogear/unifiedpush/message/UnifiedPushMessageTest.java",
"identifier": "UnifiedPushMessageTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMessageToStrippedJson() throws IOException, URISyntaxException {\n //given\n final Map<String, Object> container = new LinkedHashMap<>();\n final Map<String, Object> messageObject = new LinkedHashMap<>();\n final Map<String, Object> apnsObject = new Li... | {
"fields": [
{
"declarator": "serialVersionUID = -5978882928783277261L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -5978882928783277261L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "OBJ... | {
"body": "public String toStrippedJsonString() {\n try {\n final Map<String, Object> json = new LinkedHashMap<>();\n json.put(\"alert\", this.message.getAlert());\n json.put(\"priority\", this.message.getPriority().toString());\n if (this.getMessage().getBadge()>0) ... | {
"created": "6/11/2013 3:48:01 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10624930,
"size": null,
"stargazer_count": null,
"stars": 411,
"updates": "2020-01-27T00:45:29+00:00",
"url": "https://github.com/aerogear/aerogea... |
10624930_34 | {
"fields": [
{
"declarator": "GOOD_APP_ID = \"good_push_app_id\"",
"modifier": "private static final",
"original_string": "private static final String GOOD_APP_ID = \"good_push_app_id\";",
"type": "String",
"var_name": "GOOD_APP_ID"
},
{
"declarator": "BAD_APP_ID = \"t... | {
"body": "@Test\n public void registerAndroidVariantShouldReturn404WhenPushAppDoesNotExist() {\n final AndroidVariant variant = new AndroidVariant();\n final ResteasyUriInfo uriInfo = new ResteasyUriInfo(\"http://example.org/abc\", \"\", \"push\");\n final PushApplication pushApp = new PushAp... | {
"fields": [],
"file": "jaxrs/src/main/java/org/jboss/aerogear/unifiedpush/rest/registry/applications/AndroidVariantEndpoint.java",
"identifier": "AndroidVariantEndpoint",
"interfaces": "",
"methods": [
{
"class_method_signature": "AndroidVariantEndpoint.AndroidVariantEndpoint()",
"constructo... | {
"body": "@POST\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(MediaType.APPLICATION_JSON)\n public Response registerAndroidVariant(\n AndroidVariant androidVariant,\n @PathParam(\"pushAppID\") String pushApplicationID,\n @Context UriInfo uriInfo) {\n\n // find t... | {
"created": "6/11/2013 3:48:01 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10624930,
"size": null,
"stargazer_count": null,
"stars": 411,
"updates": "2020-01-27T00:45:29+00:00",
"url": "https://github.com/aerogear/aerogea... |
10624930_63 | {
"fields": [],
"file": "push-sender/src/test/java/org/jboss/aerogear/unifiedpush/message/token/TokenLoaderUtilsTest.java",
"identifier": "TokenLoaderUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNotCategoryOnly() {\n final Criteria criteria = new Criteria();\n criteria.setAliases(Arrays.asList(\"foo\", \"bar\"));\n assertThat(TokenLoaderUtils.isCategoryOnlyCriteria(criteria)).isFalse();\n }",
"class_method_signature": "TokenLoaderUtilsTest.testN... | {
"fields": [],
"file": "push-sender/src/main/java/org/jboss/aerogear/unifiedpush/message/token/TokenLoaderUtils.java",
"identifier": "TokenLoaderUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "TokenLoaderUtils.TokenLoaderUtils()",
"constructor": true,
"full_signature... | {
"body": "public static boolean isCategoryOnlyCriteria(final Criteria criteria) {\n\n return isEmpty(criteria.getAliases()) && // we are not subscribing to alias topic (yet)\n isEmpty(criteria.getDeviceTypes()) && // we are not subscribing to device type topic (yet)\n !isE... | {
"created": "6/11/2013 3:48:01 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10624930,
"size": null,
"stargazer_count": null,
"stars": 411,
"updates": "2020-01-27T00:45:29+00:00",
"url": "https://github.com/aerogear/aerogea... |
10624930_18 | {
"fields": [],
"file": "model/push/src/test/java/org/jboss/aerogear/unifiedpush/message/UnifiedPushMessageTest.java",
"identifier": "UnifiedPushMessageTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCategoriesCriteria() throws IOException {\n final Map<String, Object> container = new LinkedHashMap<>();\n final Map<String, Object> messageObject = new LinkedHashMap<>();\n\n messageObject.put(\"alert\", \"Howdy\");\n messageObject.put(\"sound\", \"de... | {
"fields": [
{
"declarator": "serialVersionUID = -5978882928783277261L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -5978882928783277261L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "OBJ... | {
"body": "public Criteria getCriteria() {\n return criteria;\n }",
"class_method_signature": "UnifiedPushMessage.getCriteria()",
"constructor": false,
"full_signature": "public Criteria getCriteria()",
"identifier": "getCriteria",
"invocations": [],
"modifiers": "public",
"parameters": "()",
... | {
"created": "6/11/2013 3:48:01 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10624930,
"size": null,
"stargazer_count": null,
"stars": 411,
"updates": "2020-01-27T00:45:29+00:00",
"url": "https://github.com/aerogear/aerogea... |
10624930_59 | {
"fields": [],
"file": "common/src/test/java/org/jboss/aerogear/unifiedpush/auth/HttpBasicHelperTest.java",
"identifier": "HttpBasicHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void tryToExtractUsernameAndPasswordFromNullHeader() {\n final HttpServletRequest request = Mockito.mock(HttpServletRequest.class);\n Mockito.when(request.getHeader(\"Authorization\")).thenReturn(null);\n\n final String[] credentials = HttpBasicHelper.extractUsernameA... | {
"fields": [
{
"declarator": "HTTP_BASIC_SCHEME = \"Basic \"",
"modifier": "private static final",
"original_string": "private static final String HTTP_BASIC_SCHEME = \"Basic \";",
"type": "String",
"var_name": "HTTP_BASIC_SCHEME"
}
],
"file": "common/src/main/java/org/jboss... | {
"body": "public static String[] extractUsernameAndPasswordFromBasicHeader(final HttpServletRequest request) {\n String username = \"\";\n String password = \"\";\n final String authorizationHeader = getAuthorizationHeader(request);\n\n if (authorizationHeader != null && isBasic(authoriza... | {
"created": "6/11/2013 3:48:01 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10624930,
"size": null,
"stargazer_count": null,
"stars": 411,
"updates": "2020-01-27T00:45:29+00:00",
"url": "https://github.com/aerogear/aerogea... |
10624930_2 | {
"fields": [],
"file": "model/api/src/test/java/org/jboss/aerogear/unifiedpush/api/validation/DeviceTokenValidatorTest.java",
"identifier": "DeviceTokenValidatorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testInvalidToken() {\n final VariantType andVariantType = VariantType.ANDROID;\n assertThat(DeviceTokenValidator.isValidDeviceTokenForVariant(\"some-bogus:token\", andVariantType)).isFalse();\n }",
"class_method_signature": "DeviceTokenValidatorTest.testInvalidToke... | {
"fields": [
{
"declarator": "IOS_DEVICE_TOKEN = Pattern.compile(\"(?i)[a-f0-9 -]{64,}\")",
"modifier": "private static final",
"original_string": "private static final Pattern IOS_DEVICE_TOKEN = Pattern.compile(\"(?i)[a-f0-9 -]{64,}\");",
"type": "Pattern",
"var_name": "IOS_DEVICE_... | {
"body": "public static boolean isValidDeviceTokenForVariant(final String deviceToken, final VariantType type) {\n switch (type) {\n case IOS:\n case IOS_TOKEN:\n return IOS_DEVICE_TOKEN.matcher(deviceToken).matches();\n case ANDROID:\n return AND... | {
"created": "6/11/2013 3:48:01 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10624930,
"size": null,
"stargazer_count": null,
"stars": 411,
"updates": "2020-01-27T00:45:29+00:00",
"url": "https://github.com/aerogear/aerogea... |
10624930_38 | {
"fields": [
{
"declarator": "GOOD_APP_ID = \"good_app_id\"",
"modifier": "private static final",
"original_string": "private static final String GOOD_APP_ID = \"good_app_id\";",
"type": "String",
"var_name": "GOOD_APP_ID"
},
{
"declarator": "endpoint",
"modifier... | {
"body": "@Test\n public void shouldRegisteriOSVariantSuccessfully() {\n final ResteasyUriInfo uriInfo = new ResteasyUriInfo(\"http://example.org/abc\", \"\", \"push\");\n final PushApplication pushApp = new PushApplication();\n\n final iOSApplicationUploadForm form = new iOSApplicationUpload... | {
"fields": [
{
"declarator": "producer",
"modifier": "@Inject\n protected",
"original_string": "@Inject\n protected APNSClientProducer producer;",
"type": "APNSClientProducer",
"var_name": "producer"
}
],
"file": "jaxrs/src/main/java/org/jboss/aerogear/unifiedpush/rest... | {
"body": "@POST\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(MediaType.APPLICATION_JSON)\n public Response registeriOSVariant(\n iOSApplicationUploadForm form,\n @PathParam(\"pushAppID\") String pushApplicationID,\n @Context UriInfo uriInfo) {\n // find the roo... | {
"created": "6/11/2013 3:48:01 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10624930,
"size": null,
"stargazer_count": null,
"stars": 411,
"updates": "2020-01-27T00:45:29+00:00",
"url": "https://github.com/aerogear/aerogea... |
10624930_14 | {
"fields": [],
"file": "model/push/src/test/java/org/jboss/aerogear/unifiedpush/message/UnifiedPushMessageTest.java",
"identifier": "UnifiedPushMessageTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testLocalizedTitleKey() throws IOException {\n final Map<String, Object> container = new LinkedHashMap<>();\n final Map<String, Object> messageObject = new LinkedHashMap<>();\n final Map<String, Object> apnsObject = new LinkedHashMap<>();\n\n apnsObject.pu... | {
"fields": [
{
"declarator": "serialVersionUID = -5978882928783277261L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -5978882928783277261L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "OBJ... | {
"body": "public Message getMessage() {\n return message;\n }",
"class_method_signature": "UnifiedPushMessage.getMessage()",
"constructor": false,
"full_signature": "public Message getMessage()",
"identifier": "getMessage",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"retu... | {
"created": "6/11/2013 3:48:01 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10624930,
"size": null,
"stargazer_count": null,
"stars": 411,
"updates": "2020-01-27T00:45:29+00:00",
"url": "https://github.com/aerogear/aerogea... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.