id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
14305692_384 | {
"fields": [
{
"declarator": "gson",
"modifier": "private",
"original_string": "private Gson gson;",
"type": "Gson",
"var_name": "gson"
},
{
"declarator": "handler = new RequestChangeAvailabilityJsonCommandHandler()",
"modifier": "private",
"original_string... | {
"body": "@Test\n public void testOperativeCommand() throws UserIdentityUnauthorizedException {\n JsonObject commandObject = gson.fromJson(\"{evseId:'1',availability:'operative'}\", JsonObject.class);\n handler.handle(OperatorApiJsonTestUtils.CHARGING_STATION_ID_STRING, commandObject, ROOT_IDENTITY_... | {
"fields": [
{
"declarator": "COMMAND_NAME = \"RequestChangeAvailability\"",
"modifier": "private static final",
"original_string": "private static final String COMMAND_NAME = \"RequestChangeAvailability\";",
"type": "String",
"var_name": "COMMAND_NAME"
},
{
"declarato... | {
"body": "@Override\n public void handle(String chargingStationId, JsonObject commandObject, IdentityContext identityContext) throws UserIdentityUnauthorizedException {\n ChargingStation chargingStation = repository.findOne(chargingStationId);\n\n if (chargingStation == null || !chargingStation.comm... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_150 | {
"fields": [
{
"declarator": "chargePointService",
"modifier": "private",
"original_string": "private ChargePointService chargePointService;",
"type": "ChargePointService",
"var_name": "chargePointService"
},
{
"declarator": "client",
"modifier": "private",
... | {
"body": "@Test\n public void unlockConnectorVerifyServiceCall() {\n when(chargePointService.unlockConnector(any(UnlockConnectorRequest.class), eq(CHARGING_STATION_ID.getId()))).thenReturn(getUnlockConnectorResponse(UnlockStatus.ACCEPTED));\n ArgumentCaptor<UnlockConnectorRequest> unlockConnectorArg... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ChargingStationOcpp15SoapClient.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ChargingStationOcpp15SoapClient.class);",
"type": "Logger",
"var_nam... | {
"body": "@Override\n public RequestResult unlockConnector(ChargingStationId id, EvseId evseId) {\n LOG.debug(\"Unlocking of connector {} on {}\", evseId, id);\n ChargePointService chargePointService = this.createChargingStationService(id);\n\n UnlockConnectorRequest request = new UnlockConne... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_500 | {
"fields": [
{
"declarator": "service",
"modifier": "private",
"original_string": "private SelectiveIdentificationAuthorizationService service;",
"type": "SelectiveIdentificationAuthorizationService",
"var_name": "service"
},
{
"declarator": "localAuthProvider",
... | {
"body": "@Test\n public void unknownAuthProviderShouldNotThrowException() {\n when(localAuthProvider.validate(IDENTIFYING_TOKEN, CHARGING_STATION_ID)).thenReturn(IDENTIFYING_TOKEN_ACCEPTED);\n when(ocpiAuthProvider.validate(IDENTIFYING_TOKEN, CHARGING_STATION_ID)).thenReturn(IDENTIFYING_TOKEN_ACCEP... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(SelectiveIdentificationAuthorizationService.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(SelectiveIdentificationAuthorizationService.class);",
"type": ... | {
"body": "@Override\n\tpublic IdentifyingToken validate(IdentifyingToken token, @Nullable ChargingStationId chargingStationId) {\n\t\tif (chargingStationId == null) {\n LOG.warn(\"No charging station id passed to validation request for token {}\", token.getToken());\n\t\t\treturn token;\n\t\t}\n\n ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_445 | {
"fields": [
{
"declarator": "repository",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private ReservationRepository repository;",
"type": "ReservationRepository",
"var_name": "repository"
},
{
"declarator": "chargingStationRepository",
... | {
"body": "@Test\n public void testHandleChargingStationUnavailableEvent() {\n ChargingStation cs = new ChargingStation(CHARGING_STATION_ID.getId());\n cs.setEvses(ImmutableSet.<Evse>builder().add(new Evse(\"1\", ComponentStatus.AVAILABLE)).build());\n chargingStationRepository.createOrUpdate(... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ReservationEventListener.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ReservationEventListener.class);",
"type": "Logger",
"var_name": "LOG"
... | {
"body": "@EventHandler\n public void handle(ReservedNowEvent event) {\n LOG.debug(\"ReservedNowEvent for [{}] received!\", event.getChargingStationId());\n \n createReservation(event.getChargingStationId(), ReservationStatus.ACCEPTED, event.getReservationId().getId(), \n \t\tevent.get... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_296 | {
"fields": [
{
"declarator": "eventHandler",
"modifier": "private",
"original_string": "private VasEventHandler eventHandler;",
"type": "VasEventHandler",
"var_name": "eventHandler"
},
{
"declarator": "chargingStationRepository",
"modifier": "@Autowired\n priv... | {
"body": "@Test\n public void chargingStationLocationImprovedEventUnknownChargingStationNoExceptionThrown() {\n assertNull(getTestChargingStationFromRepository());\n\n eventHandler.handle(new ChargingStationLocationImprovedEvent(CHARGING_STATION_ID, COORDINATES, ADDRESS, ACCESSIBILITY, IDENTITY_CONT... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(io.motown.vas.viewmodel.VasEventHandler.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(io.motown.vas.viewmodel.VasEventHandler.class);",
"type": "Logger"... | {
"body": "@EventHandler\n public void handle(ChargingStationCreatedEvent event) {\n LOG.info(\"Handling ChargingStationCreatedEvent\");\n\n String chargingStationId = event.getChargingStationId().getId();\n ChargingStation chargingStation = chargingStationRepository.findOne(chargingStationId)... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_279 | {
"fields": [
{
"declarator": "service",
"modifier": "private",
"original_string": "private MotownVasPublisherService service;",
"type": "MotownVasPublisherService",
"var_name": "service"
},
{
"declarator": "chargingStationRepository",
"modifier": "@Autowired\n ... | {
"body": "@Test\n public void getChargePointInfoNoSubscriptionValidateEmptyResponse() {\n GetChargePointInfoRequest request = new GetChargePointInfoRequest();\n\n GetChargePointInfoResponse response = service.getChargePointInfo(request, SUBSCRIBER_IDENTITY);\n\n assertEquals(0, response.getCh... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(MotownVasPublisherService.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(MotownVasPublisherService.class);",
"type": "Logger",
"var_name": "LOG"
... | {
"body": "@Override\n public GetChargePointInfoResponse getChargePointInfo(@WebParam(partName = \"parameters\", name = \"getChargePointInfoRequest\", targetNamespace = VAS_NAMESPACE) GetChargePointInfoRequest parameters, @WebParam(partName = \"SubscriberIdentity\", name = \"subscriberIdentity\", targetNamespace =... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_72 | {
"fields": [
{
"declarator": "motownCentralSystemService",
"modifier": "private",
"original_string": "private MotownCentralSystemService motownCentralSystemService;",
"type": "MotownCentralSystemService",
"var_name": "motownCentralSystemService"
},
{
"declarator": "dom... | {
"body": "@Test\n public void firmwareStatusNotificationDownloadedVerifyServiceCall() {\n FirmwareStatusNotificationRequest request = new FirmwareStatusNotificationRequest();\n request.setStatus(FirmwareStatus.DOWNLOADED);\n\n motownCentralSystemService.firmwareStatusNotification(request, CHA... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(MotownCentralSystemService.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(MotownCentralSystemService.class);",
"type": "Logger",
"var_name": "LOG"
... | {
"body": "@Override\n public FirmwareStatusNotificationResponse firmwareStatusNotification(FirmwareStatusNotificationRequest request, String chargeBoxIdentity) {\n ChargingStationId chargingStationId = new ChargingStationId(chargeBoxIdentity);\n FirmwareStatus status = request.getStatus();\n\n ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_202 | {
"fields": [
{
"declarator": "requestHandler",
"modifier": "private",
"original_string": "private Ocpp15RequestHandler requestHandler;",
"type": "Ocpp15RequestHandler",
"var_name": "requestHandler"
},
{
"declarator": "client",
"modifier": "private",
"origin... | {
"body": "@Test\n public void testCancelReservationRequestedEvent() {\n when(client.cancelReservation(CHARGING_STATION_ID, RESERVATION_ID.getNumber())).thenReturn(RequestResult.SUCCESS);\n requestHandler.handle(new CancelReservationRequestedEvent(CHARGING_STATION_ID, PROTOCOL, RESERVATION_ID, ROOT_I... | {
"fields": [
{
"declarator": "PROTOCOL_IDENTIFIER = \"OCPPS15\"",
"modifier": "public static final",
"original_string": "public static final String PROTOCOL_IDENTIFIER = \"OCPPS15\";",
"type": "String",
"var_name": "PROTOCOL_IDENTIFIER"
},
{
"declarator": "ADD_ON_TYPE ... | {
"body": "@Override\n public void handle(ConfigurationItemsRequestedEvent event) {\n LOG.info(\"Handling ConfigurationItemsRequestedEvent \" + event.getChargingStationId());\n Map<String, String> configurationItemMap = chargingStationOcpp15Client.getConfiguration(event.getChargingStationId(), event.... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_347 | {
"fields": [
{
"declarator": "gson",
"modifier": "private",
"original_string": "private Gson gson;",
"type": "Gson",
"var_name": "gson"
},
{
"declarator": "handler = new AddChargingStationOpeningTimesJsonCommandHandler()",
"modifier": "private",
"original_s... | {
"body": "@Test(expected = JsonParseException.class)\n public void testSetOpeningTimesInvalidTime() throws UserIdentityUnauthorizedException {\n JsonObject commandObject = gson.fromJson(\"{openingTimes:[{day:'tuesday',timeStart:'12:60',timeStop:'15:00'}]}\", JsonObject.class);\n handler.handle(Opera... | {
"fields": [
{
"declarator": "COMMAND_NAME = \"AddChargingStationOpeningTimes\"",
"modifier": "private static final",
"original_string": "private static final String COMMAND_NAME = \"AddChargingStationOpeningTimes\";",
"type": "String",
"var_name": "COMMAND_NAME"
}
],
"file"... | {
"body": "@Override\n public void handle(String chargingStationId, JsonObject commandObject, IdentityContext identityContext) throws UserIdentityUnauthorizedException {\n ChargingStationId csId = new ChargingStationId(chargingStationId);\n\n if (!commandAuthorizationService.isAuthorized(csId, identi... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_193 | {
"fields": [
{
"declarator": "requestHandler",
"modifier": "private",
"original_string": "private Ocpp15RequestHandler requestHandler;",
"type": "Ocpp15RequestHandler",
"var_name": "requestHandler"
},
{
"declarator": "client",
"modifier": "private",
"origin... | {
"body": "@Test\n public void testRequestSoftResetChargingStationEvent() {\n requestHandler.handle(new SoftResetChargingStationRequestedEvent(CHARGING_STATION_ID, PROTOCOL, ROOT_IDENTITY_CONTEXT), CORRELATION_TOKEN);\n\n verify(client).softReset(CHARGING_STATION_ID);\n }",
"class_method_signatu... | {
"fields": [
{
"declarator": "PROTOCOL_IDENTIFIER = \"OCPPS15\"",
"modifier": "public static final",
"original_string": "public static final String PROTOCOL_IDENTIFIER = \"OCPPS15\";",
"type": "String",
"var_name": "PROTOCOL_IDENTIFIER"
},
{
"declarator": "ADD_ON_TYPE ... | {
"body": "@Override\n public void handle(ConfigurationItemsRequestedEvent event) {\n LOG.info(\"Handling ConfigurationItemsRequestedEvent \" + event.getChargingStationId());\n Map<String, String> configurationItemMap = chargingStationOcpp15Client.getConfiguration(event.getChargingStationId(), event.... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_469 | {
"fields": [],
"file": "domain/core-api/src/test/java/io/motown/domain/api/chargingstation/StatusNotificationTest.java",
"identifier": "StatusNotificationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testImmutableDate() {\n Date now = new Date();\n StatusNotification statusNotification = new StatusNotification(ComponentStatus.AVAILABLE, now, Collections.<String, String>emptyMap());\n statusNotification.getTimeStamp().setTime(ChargingStationTestUtils.TWO_MINUT... | {
"fields": [
{
"declarator": "status",
"modifier": "private final",
"original_string": "private final ComponentStatus status;",
"type": "ComponentStatus",
"var_name": "status"
},
{
"declarator": "timeStamp",
"modifier": "private final",
"original_string": "... | {
"body": "public Date getTimeStamp() {\n return new Date(timeStamp.getTime());\n }",
"class_method_signature": "StatusNotification.getTimeStamp()",
"constructor": false,
"full_signature": "public Date getTimeStamp()",
"identifier": "getTimeStamp",
"invocations": [
"getTime"
],
"modifiers"... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_486 | {
"fields": [],
"file": "domain/core-api/src/test/java/io/motown/domain/api/chargingstation/ConfigureChargingStationCommandTest.java",
"identifier": "ConfigureChargingStationCommandTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = UnsupportedOperationException.class)\n public void unsupportedOperationExceptionThrownWhenModifyingEvses() {\n ConfigureChargingStationCommand command = new ConfigureChargingStationCommand(CHARGING_STATION_ID, EVSES, NULL_USER_IDENTITY_CONTEXT);\n\n command.getEvses().add(... | {
"fields": [
{
"declarator": "chargingStationId",
"modifier": "@TargetAggregateIdentifier\n private final",
"original_string": "@TargetAggregateIdentifier\n private final ChargingStationId chargingStationId;",
"type": "ChargingStationId",
"var_name": "chargingStationId"
},... | {
"body": "public Set<Evse> getEvses() {\n return evses;\n }",
"class_method_signature": "ConfigureChargingStationCommand.getEvses()",
"constructor": false,
"full_signature": "public Set<Evse> getEvses()",
"identifier": "getEvses",
"invocations": [],
"modifiers": "public",
"parameters": "()",
... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_25 | {
"fields": [
{
"declarator": "resource",
"modifier": "private",
"original_string": "private ManufacturerResource resource;",
"type": "ManufacturerResource",
"var_name": "resource"
},
{
"declarator": "repository",
"modifier": "@Mock\n private",
"original_... | {
"body": "@Test(expected = RuntimeException.class)\n public void testDeleteManufacturerThrowsException() {\n doThrow(mock(PersistenceException.class)).when(repository).delete(anyLong());\n resource.deleteManufacturer(anyLong());\n }",
"class_method_signature": "ManufacturerResourceTest.testDele... | {
"fields": [
{
"declarator": "OFFSET_PARAMETER = \"offset\"",
"modifier": "private static final",
"original_string": "private static final String OFFSET_PARAMETER = \"offset\";",
"type": "String",
"var_name": "OFFSET_PARAMETER"
},
{
"declarator": "OFFSET_DEFAULT = \"0\... | {
"body": "@DELETE\n @Path(\"/{id: [0-9]+}\")\n public Response deleteManufacturer(@PathParam(\"id\") Long id) {\n domainService.deleteManufacturer(id);\n return Response.ok(id).build();\n }",
"class_method_signature": "ManufacturerResource.deleteManufacturer(@PathParam(\"id\") Long id)",
"... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_255 | {
"fields": [
{
"declarator": "request",
"modifier": "private",
"original_string": "private HttpServletRequest request;",
"type": "HttpServletRequest",
"var_name": "request"
}
],
"file": "utils/rest/src/test/java/io/motown/utils/rest/response/ResponseBuilderTest.java",
"ide... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testResponseBuilderInvalidOffset() {\n ResponseBuilder.buildResponse(request, -1, 1, 0, Lists.<String>newArrayList());\n }",
"class_method_signature": "ResponseBuilderTest.testResponseBuilderInvalidOffset()",
"constructor": fal... | {
"fields": [
{
"declarator": "QUERY_STRING_FORMAT = \"?offset=%d&limit=%d\"",
"modifier": "private static final",
"original_string": "private static final String QUERY_STRING_FORMAT = \"?offset=%d&limit=%d\";",
"type": "String",
"var_name": "QUERY_STRING_FORMAT"
}
],
"file":... | {
"body": "public static <T> Response<T> buildResponse(final HttpServletRequest request, final int offset, final int limit, final long total, final List<T> elements) {\n checkArgument(offset >= 0);\n checkArgument(limit >= 1);\n checkArgument(total >= 0);\n checkArgument(total == 0 || offs... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_310 | {
"fields": [
{
"declarator": "eventHandler",
"modifier": "private",
"original_string": "private VasEventHandler eventHandler;",
"type": "VasEventHandler",
"var_name": "eventHandler"
},
{
"declarator": "chargingStationRepository",
"modifier": "@Autowired\n priv... | {
"body": "@Test\n public void chargingStationOpeningTimesSetEvent() {\n chargingStationRepository.createOrUpdate(getRegisteredAndConfiguredChargingStation());\n eventHandler.handle(new ChargingStationOpeningTimesSetEvent(CHARGING_STATION_ID, OPENING_TIMES, IDENTITY_CONTEXT));\n\n ChargingStat... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(io.motown.vas.viewmodel.VasEventHandler.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(io.motown.vas.viewmodel.VasEventHandler.class);",
"type": "Logger"... | {
"body": "@EventHandler\n public void handle(ChargingStationCreatedEvent event) {\n LOG.info(\"Handling ChargingStationCreatedEvent\");\n\n String chargingStationId = event.getChargingStationId().getId();\n ChargingStation chargingStation = chargingStationRepository.findOne(chargingStationId)... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_185 | {
"fields": [
{
"declarator": "service = new IdentifyingTokenConverterService()",
"modifier": "private",
"original_string": "private IdentifyingTokenConverterService service = new IdentifyingTokenConverterService();",
"type": "IdentifyingTokenConverterService",
"var_name": "service"
... | {
"body": "@Test\n public void convertInvalidTokenVerifyReturnValue() {\n AuthorisationData authorisationData = service.convertIdentifyingToken(IDENTIFYING_TOKEN_INVALID);\n\n assertEquals(IDENTIFYING_TOKEN_INVALID.getToken(), authorisationData.getIdTag());\n assertEquals(AuthorizationStatus.I... | {
"fields": [],
"file": "ocpp/v15-soap/src/main/java/io/motown/ocpp/v15/soap/chargepoint/IdentifyingTokenConverterService.java",
"identifier": "IdentifyingTokenConverterService",
"interfaces": "",
"methods": [
{
"class_method_signature": "IdentifyingTokenConverterService.convertIdentifyingTokenList(... | {
"body": "public AuthorisationData convertIdentifyingToken(IdentifyingToken token) {\n AuthorisationData authData = new AuthorisationData();\n authData.setIdTag(token.getToken());\n\n //The OCPP spec describes that the IdTagInfo should not be present in case the charging station has to remove th... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_33 | {
"fields": [
{
"declarator": "MOCK_OBJECT_JSON = \"{\\\"name\\\":\\\"TEST\\\",\\\"age\\\":1}\"",
"modifier": "private static final",
"original_string": "private static final String MOCK_OBJECT_JSON = \"{\\\"name\\\":\\\"TEST\\\",\\\"age\\\":1}\";",
"type": "String",
"var_name": "MOC... | {
"body": "@Test\n public void testIsWriteable() {\n assertTrue(provider.isWriteable(MockObject.class, MockObject.class.getGenericSuperclass(), new Annotation[]{}, MediaType.APPLICATION_JSON_TYPE));\n }",
"class_method_signature": "GsonMessageBodyReaderWriterTest.testIsWriteable()",
"constructor": fa... | {
"fields": [
{
"declarator": "UTF_8 = \"UTF-8\"",
"modifier": "private static final",
"original_string": "private static final String UTF_8 = \"UTF-8\";",
"type": "String",
"var_name": "UTF_8"
},
{
"declarator": "gson",
"modifier": "private final",
"origina... | {
"body": "@Override\n public boolean isWriteable(Class<?> aClass, Type type, Annotation[] annotations, MediaType mediaType) {\n return true;\n }",
"class_method_signature": "GsonMessageBodyReaderWriter.isWriteable(Class<?> aClass, Type type, Annotation[] annotations, MediaType mediaType)",
"construc... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_490 | {
"fields": [],
"file": "domain/utils/src/test/java/io/motown/domain/utils/axon/CorrelationCommandHandlerInterceptorTest.java",
"identifier": "CorrelationCommandHandlerInterceptorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void verifyInterceptorChainIsProceeded() throws Throwable {\n CommandMessage<AuthorizeCommand> command = new GenericCommandMessage<>(new AuthorizeCommand(CHARGING_STATION_ID, IDENTIFYING_TOKEN, NULL_USER_IDENTITY_CONTEXT))\n .withMetaData(Collections.singletonMap(Cor... | {
"fields": [],
"file": "domain/utils/src/main/java/io/motown/domain/utils/axon/CorrelationCommandHandlerInterceptor.java",
"identifier": "CorrelationCommandHandlerInterceptor",
"interfaces": "implements CommandHandlerInterceptor",
"methods": [
{
"class_method_signature": "CorrelationCommandHandlerI... | {
"body": "@Override\n public Object handle(CommandMessage<?> command, UnitOfWork unitOfWork, InterceptorChain chain) throws Throwable {\n CommandMessage<?> commandWithKeyAdded = null;\n if (!command.getMetaData().containsKey(CorrelationToken.KEY)) {\n commandWithKeyAdded = command.andMeta... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_243 | {
"fields": [
{
"declarator": "gson = new Gson()",
"modifier": "private",
"original_string": "private Gson gson = new Gson();",
"type": "Gson",
"var_name": "gson"
}
],
"file": "ocpp/websocket-json/src/test/java/io/motown/ocpp/websocketjson/WebSocketWrapperTest.java",
"ident... | {
"body": "@Test\n public void sendResultMessageShouldWriteToSocket() throws IOException {\n WebSocket mockWebSocket = getMockWebSocket();\n WebSocketWrapper wrapper = new WebSocketWrapper(CHARGING_STATION_ID, mockWebSocket, mock(WampMessageHandler.class), gson);\n WampMessage wampMessage = ne... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(WebSocketWrapper.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(WebSocketWrapper.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"... | {
"body": "public void sendResultMessage(WampMessage wampMessage) {\n String wampMessageRaw = wampMessage.toJson(gson);\n\n try {\n writeToSocket(wampMessageRaw);\n\n if (wampMessageHandler != null) {\n wampMessageHandler.handleWampCallResult(\n ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_306 | {
"fields": [
{
"declarator": "eventHandler",
"modifier": "private",
"original_string": "private VasEventHandler eventHandler;",
"type": "VasEventHandler",
"var_name": "eventHandler"
},
{
"declarator": "chargingStationRepository",
"modifier": "@Autowired\n priv... | {
"body": "@Test\n public void chargingStationConfiguredEventVerifyChargeMode() {\n chargingStationRepository.createOrUpdate(getRegisteredAndConfiguredChargingStation());\n ChargeMode expectedChargeMode = ChargeMode.fromChargingProtocol(Iterables.get(EVSES, 0).getConnectors().get(0).getChargingProtoc... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(io.motown.vas.viewmodel.VasEventHandler.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(io.motown.vas.viewmodel.VasEventHandler.class);",
"type": "Logger"... | {
"body": "@EventHandler\n public void handle(ChargingStationCreatedEvent event) {\n LOG.info(\"Handling ChargingStationCreatedEvent\");\n\n String chargingStationId = event.getChargingStationId().getId();\n ChargingStation chargingStation = chargingStationRepository.findOne(chargingStationId)... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_428 | {
"fields": [
{
"declarator": "repository",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private ChargingStationRepository repository;",
"type": "ChargingStationRepository",
"var_name": "repository"
},
{
"declarator": "listener",
"mod... | {
"body": "@Test\n public void testHandleChargingStationConfiguredEvent() {\n ChargingStation cs = repository.findOne(CHARGING_STATION_ID.getId());\n assertTrue(cs.getEvses().isEmpty());\n\n listener.handle(new ChargingStationConfiguredEvent(CHARGING_STATION_ID, EVSES, IDENTITY_CONTEXT));\n ... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ChargingStationEventListener.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ChargingStationEventListener.class);",
"type": "Logger",
"var_name": "L... | {
"body": "@EventHandler\n public void handle(ChargingStationCreatedEvent event) {\n LOG.debug(\"ChargingStationCreatedEvent creates [{}] in operator api repo\", event.getChargingStationId());\n ChargingStation station = new ChargingStation(event.getChargingStationId().getId());\n repository.c... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_64 | {
"fields": [
{
"declarator": "motownCentralSystemService",
"modifier": "private",
"original_string": "private MotownCentralSystemService motownCentralSystemService;",
"type": "MotownCentralSystemService",
"var_name": "motownCentralSystemService"
},
{
"declarator": "dom... | {
"body": "@Test\n public void meterValuesVerifyResponse() {\n MeterValuesRequest request = new MeterValuesRequest();\n\n MeterValuesResponse response = motownCentralSystemService.meterValues(request, CHARGING_STATION_ID.getId());\n\n assertNotNull(response);\n }",
"class_method_signature... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(MotownCentralSystemService.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(MotownCentralSystemService.class);",
"type": "Logger",
"var_name": "LOG"
... | {
"body": "@Override\n public MeterValuesResponse meterValues(MeterValuesRequest request, String chargeBoxIdentity) {\n ChargingStationId chargingStationId = new ChargingStationId(chargeBoxIdentity);\n //OCPP 1.2 does not contain transactionId references in it's metervalue communication\n Tran... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_214 | {
"fields": [
{
"declarator": "AUTHORIZATION_TIMEOUT_IN_MILLIS = 1000",
"modifier": "private static final",
"original_string": "private static final int AUTHORIZATION_TIMEOUT_IN_MILLIS = 1000;",
"type": "int",
"var_name": "AUTHORIZATION_TIMEOUT_IN_MILLIS"
},
{
"declarat... | {
"body": "@Test\n public void testBootUnknownChargingStation() {\n BootChargingStationResult bootChargingStationResult = domainService.bootChargingStation(CHARGING_STATION_ID, PROTOCOL, new AttributeMap<String, String>(), ADD_ON_IDENTITY);\n assertFalse(bootChargingStationResult.isAccepted());\n\n ... | {
"fields": [
{
"declarator": "CHARGING_STATION_EVSE_ID = 0",
"modifier": "public static final",
"original_string": "public static final int CHARGING_STATION_EVSE_ID = 0;",
"type": "int",
"var_name": "CHARGING_STATION_EVSE_ID"
},
{
"declarator": "ERROR_CODE_KEY = \"erro... | {
"body": "public BootChargingStationResult bootChargingStation(ChargingStationId chargingStationId, String protocol,\n AttributeMap<String, String> attributes, AddOnIdentity addOnIdentity) {\n // Check if we already know the charging station, or have to ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_351 | {
"fields": [
{
"declarator": "gson",
"modifier": "private",
"original_string": "private Gson gson;",
"type": "Gson",
"var_name": "gson"
},
{
"declarator": "handler = new SetChargingStationOpeningTimesJsonCommandHandler()",
"modifier": "private",
"original_s... | {
"body": "@Test\n public void testSetOpeningTimes() throws UserIdentityUnauthorizedException {\n JsonObject commandObject = gson.fromJson(\"{openingTimes:[{day:'monday',timeStart:'12:00',timeStop:'12:30'}]}\", JsonObject.class);\n handler.handle(OperatorApiJsonTestUtils.CHARGING_STATION_ID_STRING, c... | {
"fields": [
{
"declarator": "COMMAND_NAME = \"SetChargingStationOpeningTimes\"",
"modifier": "private static final",
"original_string": "private static final String COMMAND_NAME = \"SetChargingStationOpeningTimes\";",
"type": "String",
"var_name": "COMMAND_NAME"
}
],
"file"... | {
"body": "@Override\n public void handle(String chargingStationId, JsonObject commandObject, IdentityContext identityContext) throws UserIdentityUnauthorizedException {\n ChargingStationId csId = new ChargingStationId(chargingStationId);\n\n if (!commandAuthorizationService.isAuthorized(csId, identi... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_326 | {
"fields": [
{
"declarator": "gson",
"modifier": "private",
"original_string": "private Gson gson;",
"type": "Gson",
"var_name": "gson"
},
{
"declarator": "handler = new RequestChangeConfigurationItemJsonCommandHandler()",
"modifier": "private",
"original_s... | {
"body": "@Test\n public void testHandleChangeConfigurationOnRegisteredStation() throws UserIdentityUnauthorizedException {\n JsonObject commandObject = gson.fromJson(\"{'key' : 'foo', 'value': 'bar'}\", JsonObject.class);\n\n handler.handle(OperatorApiJsonTestUtils.CHARGING_STATION_ID.getId(), comm... | {
"fields": [
{
"declarator": "COMMAND_NAME = \"RequestChangeConfigurationItem\"",
"modifier": "private static final",
"original_string": "private static final String COMMAND_NAME = \"RequestChangeConfigurationItem\";",
"type": "String",
"var_name": "COMMAND_NAME"
}
],
"file"... | {
"body": "@Override\n public void handle(String chargingStationId, JsonObject commandObject, IdentityContext identityContext) throws UserIdentityUnauthorizedException {\n ChargingStationId csId = new ChargingStationId(chargingStationId);\n\n if (!commandAuthorizationService.isAuthorized(csId, identi... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_263 | {
"fields": [
{
"declarator": "INTERNAL_SERVER_ERROR = 500",
"modifier": "private static final",
"original_string": "private static final int INTERNAL_SERVER_ERROR = 500;",
"type": "int",
"var_name": "INTERNAL_SERVER_ERROR"
},
{
"declarator": "exception",
"modifie... | {
"body": "@Test\n public void testPersistenceExceptionMapper() {\n PersistenceExceptionMapper mapper = new PersistenceExceptionMapper();\n Response response = mapper.toResponse(exception);\n\n assertNotNull(response);\n assertEquals(INTERNAL_SERVER_ERROR, response.getStatus());\n }"... | {
"fields": [],
"file": "utils/rest/src/main/java/io/motown/utils/rest/jax_rs/PersistenceExceptionMapper.java",
"identifier": "PersistenceExceptionMapper",
"interfaces": "implements ExceptionMapper<PersistenceException>",
"methods": [
{
"class_method_signature": "PersistenceExceptionMapper.toRespons... | {
"body": "@Override\n public Response toResponse(PersistenceException e) {\n return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(e.getMessage()).type(MediaType.TEXT_PLAIN).build();\n }",
"class_method_signature": "PersistenceExceptionMapper.toResponse(PersistenceException e)",
"cons... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_13 | {
"fields": [
{
"declarator": "resource",
"modifier": "private",
"original_string": "private ChargingStationTypeResource resource;",
"type": "ChargingStationTypeResource",
"var_name": "resource"
},
{
"declarator": "repository",
"modifier": "@Mock\n private",
... | {
"body": "@Test(expected = RuntimeException.class)\n public void testGetChargingStationTypeThrowsException() {\n when(repository.findOne(anyLong())).thenThrow(mock(EntityNotFoundException.class));\n resource.getChargingStationType(anyLong());\n }",
"class_method_signature": "ChargingStationType... | {
"fields": [
{
"declarator": "OFFSET_PARAMETER = \"offset\"",
"modifier": "private static final",
"original_string": "private static final String OFFSET_PARAMETER = \"offset\";",
"type": "String",
"var_name": "OFFSET_PARAMETER"
},
{
"declarator": "OFFSET_DEFAULT = \"0\... | {
"body": "@GET\n @Path(\"/{id: [0-9]+}\")\n public Response getChargingStationType(@PathParam(\"id\") Long id) {\n return Response.ok(domainService.getChargingStationType(id)).build();\n }",
"class_method_signature": "ChargingStationTypeResource.getChargingStationType(@PathParam(\"id\") Long id)",
... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_371 | {
"fields": [
{
"declarator": "gson",
"modifier": "private",
"original_string": "private Gson gson;",
"type": "Gson",
"var_name": "gson"
},
{
"declarator": "handler = new RequestSendAuthorizationListJsonCommandHandler()",
"modifier": "private",
"original_str... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testInvalidUpdateType() throws UserIdentityUnauthorizedException {\n JsonObject commandObject = gson.fromJson(\"{listVersion:1,updateType:'NEW',items:[{token:'1',status:'ACCEPTED', mobilityServiceProvider:'MSP',visibleId:'7007'},{toke... | {
"fields": [
{
"declarator": "COMMAND_NAME = \"RequestSendAuthorizationList\"",
"modifier": "private static final",
"original_string": "private static final String COMMAND_NAME = \"RequestSendAuthorizationList\";",
"type": "String",
"var_name": "COMMAND_NAME"
}
],
"file": "o... | {
"body": "@Override\n public void handle(String chargingStationId, JsonObject commandObject, IdentityContext identityContext) throws UserIdentityUnauthorizedException {\n ChargingStationId csId = new ChargingStationId(chargingStationId);\n\n if (!commandAuthorizationService.isAuthorized(csId, identi... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_234 | {
"fields": [
{
"declarator": "AUTHORIZATION_TIMEOUT_IN_MILLIS = 1000",
"modifier": "private static final",
"original_string": "private static final int AUTHORIZATION_TIMEOUT_IN_MILLIS = 1000;",
"type": "int",
"var_name": "AUTHORIZATION_TIMEOUT_IN_MILLIS"
},
{
"declarat... | {
"body": "@Test\n public void testStartTransactionEmptyAttributesChargingStation() {\n Date now = new Date();\n StartTransactionInfo startTransactionInfo = new StartTransactionInfo(EVSE_ID, 0, now, IDENTIFYING_TOKEN_ACCEPTED, Collections.<String, String>emptyMap());\n domainService.startTrans... | {
"fields": [
{
"declarator": "CHARGING_STATION_EVSE_ID = 0",
"modifier": "public static final",
"original_string": "public static final int CHARGING_STATION_EVSE_ID = 0;",
"type": "int",
"var_name": "CHARGING_STATION_EVSE_ID"
},
{
"declarator": "ERROR_CODE_KEY = \"erro... | {
"body": "public void startTransactionNoAuthorize(ChargingStationId chargingStationId, TransactionId transactionId,\n StartTransactionInfo startTransactionInfo, AddOnIdentity addOnIdentity) {\n IdentityContext identityContext = new IdentityContext(addOnIdentity, new ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_44 | {
"fields": [
{
"declarator": "VENDOR = \"MOTOWN\"",
"modifier": "public static final",
"original_string": "public static final String VENDOR = \"MOTOWN\";",
"type": "String",
"var_name": "VENDOR"
},
{
"declarator": "MODEL = \"MODEL1\"",
"modifier": "public static... | {
"body": "@Test\n public void testGetEvsesForNonExistingManufacturerAndModel() {\n Manufacturer manufacturer = getManufacturerWithConfiguration(VENDOR, MODEL);\n insertIntoDatabase(entityManagerFactory, manufacturer);\n\n Set<Evse> evses = domainService.getEvses(UNKNOWN_VENDOR, UNKNOWN_MODEL)... | {
"fields": [
{
"declarator": "chargingStationTypeRepository",
"modifier": "private",
"original_string": "private ChargingStationTypeRepository chargingStationTypeRepository;",
"type": "ChargingStationTypeRepository",
"var_name": "chargingStationTypeRepository"
},
{
"de... | {
"body": "public Set<io.motown.domain.api.chargingstation.Evse> getEvses(String vendor, String model) {\n List<ChargingStationType> items = chargingStationTypeRepository.findByCodeAndManufacturerCode(model, vendor);\n\n Set<io.motown.domain.api.chargingstation.Evse> result = new HashSet<>();\n i... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_408 | {
"fields": [
{
"declarator": "adapter = new EvseIdTypeAdapterDeserializer()",
"modifier": "private final",
"original_string": "private final EvseIdTypeAdapterDeserializer adapter = new EvseIdTypeAdapterDeserializer();",
"type": "EvseIdTypeAdapterDeserializer",
"var_name": "adapter"
... | {
"body": "@Test(expected = JsonParseException.class)\n public void testEvseIdAsObject() {\n JsonObject jsonObject = new JsonObject();\n jsonObject.addProperty(\"evseId\", 1);\n adapter.deserialize(jsonObject, EvseId.class, null);\n }",
"class_method_signature": "EvseIdTypeAdapterDeserial... | {
"fields": [],
"file": "operator-api/json/src/main/java/io/motown/operatorapi/json/gson/EvseIdTypeAdapterDeserializer.java",
"identifier": "EvseIdTypeAdapterDeserializer",
"interfaces": "implements TypeAdapterDeserializer<EvseId>",
"methods": [
{
"class_method_signature": "EvseIdTypeAdapterDeserial... | {
"body": "@Override\n public EvseId deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) {\n if (!json.isJsonPrimitive()) {\n throw new JsonParseException(\"EvseId must be a JSON primitive\");\n }\n\n int evseId;\n\n try {\n evseId = jso... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_367 | {
"fields": [
{
"declarator": "gson",
"modifier": "private",
"original_string": "private Gson gson;",
"type": "Gson",
"var_name": "gson"
},
{
"declarator": "handler = new RequestFirmwareUpdateJsonCommandHandler()",
"modifier": "private",
"original_string": "... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testInvalidUpdateCommandInvalidDate() throws UserIdentityUnauthorizedException {\n JsonObject commandObject = gson.fromJson(\"{location:'DEURNE',retrieveDate:'2014-02-03'}\", JsonObject.class);\n handler.handle(CHARGING_STATION... | {
"fields": [
{
"declarator": "COMMAND_NAME = \"RequestFirmwareUpdate\"",
"modifier": "private static final",
"original_string": "private static final String COMMAND_NAME = \"RequestFirmwareUpdate\";",
"type": "String",
"var_name": "COMMAND_NAME"
}
],
"file": "operator-api/js... | {
"body": "@Override\n public void handle(String chargingStationId, JsonObject commandObject, IdentityContext identityContext) throws UserIdentityUnauthorizedException {\n ChargingStationId csId = new ChargingStationId(chargingStationId);\n\n if (!commandAuthorizationService.isAuthorized(csId, identi... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_8 | {
"fields": [
{
"declarator": "resource",
"modifier": "private",
"original_string": "private ChargingStationTypeResource resource;",
"type": "ChargingStationTypeResource",
"var_name": "resource"
},
{
"declarator": "repository",
"modifier": "@Mock\n private",
... | {
"body": "@Test\n public void testUpdateChargingStationType() {\n ChargingStationType chargingStationType = mock(ChargingStationType.class);\n when(chargingStationType.getId()).thenReturn(1L);\n Response response = resource.updateChargingStationType(1L, chargingStationType);\n verify(r... | {
"fields": [
{
"declarator": "OFFSET_PARAMETER = \"offset\"",
"modifier": "private static final",
"original_string": "private static final String OFFSET_PARAMETER = \"offset\";",
"type": "String",
"var_name": "OFFSET_PARAMETER"
},
{
"declarator": "OFFSET_DEFAULT = \"0\... | {
"body": "@PUT\n @Path(\"/{id: [0-9]+}\")\n @Consumes(ApiVersion.V1_JSON)\n public Response updateChargingStationType(@PathParam(\"id\") Long id, ChargingStationType chargingStationType) {\n return Response.ok(domainService.updateChargingStationType(id, chargingStationType)).build();\n }",
"clas... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_388 | {
"fields": [
{
"declarator": "gson",
"modifier": "private",
"original_string": "private Gson gson;",
"type": "Gson",
"var_name": "gson"
},
{
"declarator": "handler = new PlaceChargingStationJsonCommandHandler()",
"modifier": "private",
"original_string": "p... | {
"body": "@Test\n public void testAddress() throws UserIdentityUnauthorizedException {\n JsonObject commandObject = gson.fromJson(\"{address:{addressLine1:'Teststraat 1',city:'Deurne',country:'NL'},accessibility:'PUBLIC'}\", JsonObject.class);\n handler.handle(OperatorApiJsonTestUtils.CHARGING_STATI... | {
"fields": [
{
"declarator": "COMMAND_NAME = \"PlaceChargingStation\"",
"modifier": "private static final",
"original_string": "private static final String COMMAND_NAME = \"PlaceChargingStation\";",
"type": "String",
"var_name": "COMMAND_NAME"
}
],
"file": "operator-api/json... | {
"body": "@Override\n public void handle(String chargingStationId, JsonObject commandObject, IdentityContext identityContext) throws UserIdentityUnauthorizedException {\n ChargingStationId csId = new ChargingStationId(chargingStationId);\n\n if (!commandAuthorizationService.isAuthorized(csId, identi... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_222 | {
"fields": [
{
"declarator": "AUTHORIZATION_TIMEOUT_IN_MILLIS = 1000",
"modifier": "private static final",
"original_string": "private static final int AUTHORIZATION_TIMEOUT_IN_MILLIS = 1000;",
"type": "int",
"var_name": "AUTHORIZATION_TIMEOUT_IN_MILLIS"
},
{
"declarat... | {
"body": "@Test\n public void testAuthorizationListVersionReceived() {\n CorrelationToken correlationToken = new CorrelationToken();\n domainService.authorizationListVersionReceived(CHARGING_STATION_ID, getAuthorizationListVersion(), correlationToken, ADD_ON_IDENTITY);\n\n verify(gateway).sen... | {
"fields": [
{
"declarator": "CHARGING_STATION_EVSE_ID = 0",
"modifier": "public static final",
"original_string": "public static final int CHARGING_STATION_EVSE_ID = 0;",
"type": "int",
"var_name": "CHARGING_STATION_EVSE_ID"
},
{
"declarator": "ERROR_CODE_KEY = \"erro... | {
"body": "public void authorizationListVersionReceived(ChargingStationId chargingStationId, int currentVersion, CorrelationToken correlationToken, AddOnIdentity addOnIdentity) {\n IdentityContext identityContext = new IdentityContext(addOnIdentity, new NullUserIdentity());\n\n commandGateway.send(new A... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_52 | {
"fields": [
{
"declarator": "VENDOR = \"MOTOWN\"",
"modifier": "public static final",
"original_string": "public static final String VENDOR = \"MOTOWN\";",
"type": "String",
"var_name": "VENDOR"
},
{
"declarator": "MODEL = \"MODEL1\"",
"modifier": "public static... | {
"body": "@Test(expected = EntityNotFoundException.class)\n public void getConnectorsUnknownEvse() {\n ChargingStationType chargingStationType = getChargingStationTypeNonTransient(entityManagerFactory);\n\n domainService.getConnectors(chargingStationType.getId(), UNKNOWN_EVSE_ID);\n }",
"class_... | {
"fields": [
{
"declarator": "chargingStationTypeRepository",
"modifier": "private",
"original_string": "private ChargingStationTypeRepository chargingStationTypeRepository;",
"type": "ChargingStationTypeRepository",
"var_name": "chargingStationTypeRepository"
},
{
"de... | {
"body": "public Set<Connector> getConnectors(Long chargingStationTypeId, Long evseId) {\n ChargingStationType chargingStationType = chargingStationTypeRepository.findOne(chargingStationTypeId);\n Evse evse = getEvseById(chargingStationType, evseId);\n\n return evse.getConnectors();\n }",
"... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_330 | {
"fields": [
{
"declarator": "gson",
"modifier": "private",
"original_string": "private Gson gson;",
"type": "Gson",
"var_name": "gson"
},
{
"declarator": "handler = new MoveChargingStationJsonCommandHandler()",
"modifier": "private",
"original_string": "pr... | {
"body": "@Test\n public void testCoordinates() throws UserIdentityUnauthorizedException {\n JsonObject commandObject = gson.fromJson(\"{coordinates:{latitude:'0.0',longitude:'0.0'},accessibility:'PUBLIC'}\", JsonObject.class);\n handler.handle(OperatorApiJsonTestUtils.CHARGING_STATION_ID_STRING, co... | {
"fields": [
{
"declarator": "COMMAND_NAME = \"MoveChargingStation\"",
"modifier": "private static final",
"original_string": "private static final String COMMAND_NAME = \"MoveChargingStation\";",
"type": "String",
"var_name": "COMMAND_NAME"
}
],
"file": "operator-api/json/s... | {
"body": "@Override\n public void handle(String chargingStationId, JsonObject commandObject, IdentityContext identityContext) throws UserIdentityUnauthorizedException {\n ChargingStationId csId = new ChargingStationId(chargingStationId);\n\n if (!commandAuthorizationService.isAuthorized(csId, identi... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_275 | {
"fields": [
{
"declarator": "service",
"modifier": "private",
"original_string": "private MotownVasPublisherService service;",
"type": "MotownVasPublisherService",
"var_name": "service"
},
{
"declarator": "chargingStationRepository",
"modifier": "@Autowired\n ... | {
"body": "@Test\n public void subscribeAcceptedValidateResponse() {\n SubscribeRequest request = new SubscribeRequest();\n request.setDeliveryAddress(DELIVERY_ADDRESS);\n\n SubscribeResponse response = service.subscribe(request, SUBSCRIBER_IDENTITY);\n\n assertEquals(SubscribeStatus.AC... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(MotownVasPublisherService.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(MotownVasPublisherService.class);",
"type": "Logger",
"var_name": "LOG"
... | {
"body": "@Override\n public SubscribeResponse subscribe(@WebParam(partName = \"parameters\", name = \"subscribeRequest\", targetNamespace = VAS_NAMESPACE) SubscribeRequest parameters, @WebParam(partName = \"SubscriberIdentity\", name = \"subscriberIdentity\", targetNamespace = VAS_NAMESPACE, header = true) Strin... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_449 | {
"fields": [],
"file": "operator-api/view-model/src/test/java/io/motown/operatorapi/viewmodel/persistence/entities/ChargingStationTest.java",
"identifier": "ChargingStationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void isAcceptedOnNewChargingStation() {\n ChargingStation cs = new ChargingStation(\"\");\n\n assertFalse(cs.isAccepted());\n }",
"class_method_signature": "ChargingStationTest.isAcceptedOnNewChargingStation()",
"constructor": false,
"full_signature": "@Test public ... | {
"fields": [
{
"declarator": "id",
"modifier": "@Id\n private",
"original_string": "@Id\n private String id;",
"type": "String",
"var_name": "id"
},
{
"declarator": "protocol",
"modifier": "private",
"original_string": "private String protocol;",
... | {
"body": "public boolean isAccepted() {\n return accepted;\n }",
"class_method_signature": "ChargingStation.isAccepted()",
"constructor": false,
"full_signature": "public boolean isAccepted()",
"identifier": "isAccepted",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_91 | {
"fields": [
{
"declarator": "chargePointService",
"modifier": "private",
"original_string": "private ChargePointService chargePointService;",
"type": "ChargePointService",
"var_name": "chargePointService"
},
{
"declarator": "client",
"modifier": "private",
... | {
"body": "@Test\n public void clearCacheRejectedVerifyReturnValue() {\n when(chargePointService.clearCache(any(ClearCacheRequest.class), eq(CHARGING_STATION_ID.getId()))).thenReturn(getClearCacheResponse(ClearCacheStatus.REJECTED));\n\n boolean requestResult = client.clearCache(CHARGING_STATION_ID);... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ChargingStationOcpp12SoapClient.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ChargingStationOcpp12SoapClient.class);",
"type": "Logger",
"var_nam... | {
"body": "@Override\n public boolean clearCache(ChargingStationId id) {\n ChargePointService chargePointService = this.createChargingStationService(id);\n\n ClearCacheRequest request = new ClearCacheRequest();\n\n boolean requestResult;\n ClearCacheResponse response = chargePointServic... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_432 | {
"fields": [
{
"declarator": "repository",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private ChargingStationRepository repository;",
"type": "ChargingStationRepository",
"var_name": "repository"
},
{
"declarator": "listener",
"mod... | {
"body": "@Test\n public void testHandleConfigurationItemsReceivedEvent() {\n ChargingStation cs = repository.findOne(CHARGING_STATION_ID.getId());\n assertTrue(cs.getConfItems().isEmpty());\n\n listener.handle(new ConfigurationItemsReceivedEvent(CHARGING_STATION_ID, CONFIGURATION_ITEMS, REQU... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ChargingStationEventListener.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ChargingStationEventListener.class);",
"type": "Logger",
"var_name": "L... | {
"body": "@EventHandler\n public void handle(ChargingStationCreatedEvent event) {\n LOG.debug(\"ChargingStationCreatedEvent creates [{}] in operator api repo\", event.getChargingStationId());\n ChargingStation station = new ChargingStation(event.getChargingStationId().getId());\n repository.c... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_127 | {
"fields": [
{
"declarator": "ADD_ON_TYPE = \"OCPPS15\"",
"modifier": "private static final",
"original_string": "private static final String ADD_ON_TYPE = \"OCPPS15\";",
"type": "String",
"var_name": "ADD_ON_TYPE"
},
{
"declarator": "OCPPS15_ADD_ON_IDENTITY = new Type... | {
"body": "@Test\n public void heartBeatVerifyResponse() {\n HeartbeatRequest request = new HeartbeatRequest();\n\n HeartbeatResponse response = motownCentralSystemService.heartbeat(request, CHARGING_STATION_ID.getId());\n\n assertNotNull(response);\n assertNotNull(response.getCurrentTi... | {
"fields": [
{
"declarator": "ADD_ON_TYPE = Ocpp15RequestHandler.ADD_ON_TYPE",
"modifier": "public static final",
"original_string": "public static final String ADD_ON_TYPE = Ocpp15RequestHandler.ADD_ON_TYPE;",
"type": "String",
"var_name": "ADD_ON_TYPE"
},
{
"declarat... | {
"body": "@Override\n public HeartbeatResponse heartbeat(HeartbeatRequest parameters, String chargeBoxIdentity) {\n domainService.heartbeat(new ChargingStationId(chargeBoxIdentity), addOnIdentity);\n\n HeartbeatResponse response = new HeartbeatResponse();\n response.setCurrentTime(new Date())... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_259 | {
"fields": [
{
"declarator": "BAD_REQUEST = 400",
"modifier": "private static final",
"original_string": "private static final int BAD_REQUEST = 400;",
"type": "int",
"var_name": "BAD_REQUEST"
},
{
"declarator": "cause",
"modifier": "@Mock\n private",
"o... | {
"body": "@Test\n public void testJsonIOExceptionMapper() {\n JsonIOExceptionMapper mapper = new JsonIOExceptionMapper();\n Response response = mapper.toResponse(new JsonIOException(cause));\n\n assertNotNull(response);\n assertEquals(BAD_REQUEST, response.getStatus());\n }",
"cla... | {
"fields": [],
"file": "utils/rest/src/main/java/io/motown/utils/rest/jax_rs/JsonIOExceptionMapper.java",
"identifier": "JsonIOExceptionMapper",
"interfaces": "implements ExceptionMapper<JsonIOException>",
"methods": [
{
"class_method_signature": "JsonIOExceptionMapper.toResponse(JsonIOException e)... | {
"body": "@Override\n public Response toResponse(JsonIOException e) {\n return Response.status(Response.Status.BAD_REQUEST).entity(e.getMessage()).type(MediaType.TEXT_PLAIN).build();\n }",
"class_method_signature": "JsonIOExceptionMapper.toResponse(JsonIOException e)",
"constructor": false,
"full_... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_465 | {
"fields": [],
"file": "domain/core-api/src/test/java/io/motown/domain/api/chargingstation/TransactionIdFactoryTest.java",
"identifier": "TransactionIdFactoryTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void creationOfUUIDTransactionId() {\n TransactionId transactionId = TransactionIdFactory.createTransactionId(\"123-456-789-000-000\", CHARGING_STATION_ID, PROTOCOL);\n\n assertTrue(transactionId instanceof UuidTransactionId);\n }",
"class_method_signature": "Transacti... | {
"fields": [],
"file": "domain/core-api/src/main/java/io/motown/domain/api/chargingstation/TransactionIdFactory.java",
"identifier": "TransactionIdFactory",
"interfaces": "",
"methods": [
{
"class_method_signature": "TransactionIdFactory.TransactionIdFactory()",
"constructor": true,
"fu... | {
"body": "public static TransactionId createTransactionId(String transactionNumber, ChargingStationId chargingStationId, String protocol) {\n return Ints.tryParse(checkNotNull(transactionNumber)) != null\n ? new NumberedTransactionId(chargingStationId, protocol, Ints.tryParse(transactionNumber)... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_29 | {
"fields": [
{
"declarator": "resource",
"modifier": "private",
"original_string": "private ConnectorResource resource;",
"type": "ConnectorResource",
"var_name": "resource"
},
{
"declarator": "domainService",
"modifier": "@Mock\n private",
"original_str... | {
"body": "@Test(expected = RuntimeException.class)\n public void getConnectorThrowsException() {\n when(domainService.getConnector(CHARGING_STATION_TYPE_ID, EVSE_ID, CONNECTOR_ID)).thenThrow(mock(EntityNotFoundException.class));\n\n resource.getConnector(CHARGING_STATION_TYPE_ID, EVSE_ID, CONNECTOR_... | {
"fields": [
{
"declarator": "domainService",
"modifier": "private",
"original_string": "private DomainService domainService;",
"type": "DomainService",
"var_name": "domainService"
}
],
"file": "chargingstation-configuration/view-model/src/main/java/io/motown/chargingstation... | {
"body": "@GET\n @Path(\"/{id: [0-9]+}\")\n public Response getConnector(@PathParam(\"chargingStationTypeId\") Long chargingStationTypeId, @PathParam(\"evseId\") Long evseId, @PathParam(\"id\") Long id) {\n return Response.ok(domainService.getConnector(chargingStationTypeId, evseId, id)).build();\n }... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_170 | {
"fields": [
{
"declarator": "chargePointService",
"modifier": "private",
"original_string": "private ChargePointService chargePointService;",
"type": "ChargePointService",
"var_name": "chargePointService"
},
{
"declarator": "client",
"modifier": "private",
... | {
"body": "@Test\n public void sendAuthorizationListNotSupportedVerifyReturnValue() {\n when(chargePointService.sendLocalList(any(SendLocalListRequest.class), eq(CHARGING_STATION_ID.getId()))).thenReturn(getSendLocalListResponse(UpdateStatus.NOT_SUPPORTED));\n\n RequestResult requestResult = client.s... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ChargingStationOcpp15SoapClient.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ChargingStationOcpp15SoapClient.class);",
"type": "Logger",
"var_nam... | {
"body": "@Override\n public RequestResult sendAuthorizationList(ChargingStationId id, String hash, int listVersion, Set<IdentifyingToken> identifyingTokens, AuthorizationListUpdateType updateType) {\n ChargePointService chargePointService = this.createChargingStationService(id);\n\n SendLocalListRe... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_189 | {
"fields": [
{
"declarator": "requestHandler",
"modifier": "private",
"original_string": "private Ocpp15RequestHandler requestHandler;",
"type": "Ocpp15RequestHandler",
"var_name": "requestHandler"
},
{
"declarator": "client",
"modifier": "private",
"origin... | {
"body": "@Test\n public void testConfigurationRequestedEventSpecificConfigKeys() {\n requestHandler.handle(new ConfigurationItemsRequestedEvent(CHARGING_STATION_ID, CONFIGURATION_SPECIFIC_KEYS, PROTOCOL, ROOT_IDENTITY_CONTEXT));\n\n verify(client).getConfiguration(CHARGING_STATION_ID, CONFIGURATION... | {
"fields": [
{
"declarator": "PROTOCOL_IDENTIFIER = \"OCPPS15\"",
"modifier": "public static final",
"original_string": "public static final String PROTOCOL_IDENTIFIER = \"OCPPS15\";",
"type": "String",
"var_name": "PROTOCOL_IDENTIFIER"
},
{
"declarator": "ADD_ON_TYPE ... | {
"body": "@Override\n public void handle(ConfigurationItemsRequestedEvent event) {\n LOG.info(\"Handling ConfigurationItemsRequestedEvent \" + event.getChargingStationId());\n Map<String, String> configurationItemMap = chargingStationOcpp15Client.getConfiguration(event.getChargingStationId(), event.... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_473 | {
"fields": [],
"file": "domain/core-api/src/test/java/io/motown/domain/api/chargingstation/StartTransactionInfoTest.java",
"identifier": "StartTransactionInfoTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testImmutableDate() {\n Date now = new Date();\n StartTransactionInfo startTransactionInfo = new StartTransactionInfo(EVSE_ID, 0, now, IDENTIFYING_TOKEN_ACCEPTED, Collections.<String, String>emptyMap());\n startTransactionInfo.getTimestamp().setTime(TWO_MINUTES_A... | {
"fields": [
{
"declarator": "evseId",
"modifier": "private final",
"original_string": "private final EvseId evseId;",
"type": "EvseId",
"var_name": "evseId"
},
{
"declarator": "meterStart",
"modifier": "private final",
"original_string": "private final int... | {
"body": "public Date getTimestamp() {\n return new Date(timestamp.getTime());\n }",
"class_method_signature": "StartTransactionInfo.getTimestamp()",
"constructor": false,
"full_signature": "public Date getTimestamp()",
"identifier": "getTimestamp",
"invocations": [
"getTime"
],
"modifier... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_166 | {
"fields": [
{
"declarator": "chargePointService",
"modifier": "private",
"original_string": "private ChargePointService chargePointService;",
"type": "ChargePointService",
"var_name": "chargePointService"
},
{
"declarator": "client",
"modifier": "private",
... | {
"body": "@Test\n public void getAuthorizationListVersionVerifyServiceCall() {\n when(chargePointService.getLocalListVersion(any(GetLocalListVersionRequest.class), eq(CHARGING_STATION_ID.getId()))).thenReturn(getGetLocalListVersionResponse(1));\n\n client.getAuthorizationListVersion(CHARGING_STATION... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ChargingStationOcpp15SoapClient.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ChargingStationOcpp15SoapClient.class);",
"type": "Logger",
"var_nam... | {
"body": "@Override\n public int getAuthorizationListVersion(ChargingStationId id) {\n ChargePointService chargePointService = this.createChargingStationService(id);\n\n GetLocalListVersionResponse response = chargePointService.getLocalListVersion(new GetLocalListVersionRequest(), id.getId());\n ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_218 | {
"fields": [
{
"declarator": "AUTHORIZATION_TIMEOUT_IN_MILLIS = 1000",
"modifier": "private static final",
"original_string": "private static final int AUTHORIZATION_TIMEOUT_IN_MILLIS = 1000;",
"type": "int",
"var_name": "AUTHORIZATION_TIMEOUT_IN_MILLIS"
},
{
"declarat... | {
"body": "@Test\n public void testHeartbeat() {\n domainService.heartbeat(REGISTERED_AND_CONFIGURED_CHARGING_STATION_ID, ADD_ON_IDENTITY);\n\n verify(gateway).send(new HeartbeatCommand(REGISTERED_AND_CONFIGURED_CHARGING_STATION_ID, NULL_USER_IDENTITY_CONTEXT));\n }",
"class_method_signature": "... | {
"fields": [
{
"declarator": "CHARGING_STATION_EVSE_ID = 0",
"modifier": "public static final",
"original_string": "public static final int CHARGING_STATION_EVSE_ID = 0;",
"type": "int",
"var_name": "CHARGING_STATION_EVSE_ID"
},
{
"declarator": "ERROR_CODE_KEY = \"erro... | {
"body": "public void heartbeat(ChargingStationId chargingStationId, AddOnIdentity addOnIdentity) {\n this.checkChargingStationExistsAndIsRegisteredAndConfigured(chargingStationId);\n\n IdentityContext identityContext = new IdentityContext(addOnIdentity, new NullUserIdentity());\n\n commandGatew... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_424 | {
"fields": [
{
"declarator": "repository",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private ChargingStationRepository repository;",
"type": "ChargingStationRepository",
"var_name": "repository"
},
{
"declarator": "listener",
"mod... | {
"body": "@Test\n public void testHandleChargingStationMovedEvent() {\n ChargingStation cs = repository.findOne(CHARGING_STATION_ID.getId());\n assertNull(cs.getLatitude());\n assertNull(cs.getLongitude());\n assertNull(cs.getAddressLine1());\n assertNull(cs.getAddressLine2());\... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ChargingStationEventListener.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ChargingStationEventListener.class);",
"type": "Logger",
"var_name": "L... | {
"body": "@EventHandler\n public void handle(ChargingStationCreatedEvent event) {\n LOG.debug(\"ChargingStationCreatedEvent creates [{}] in operator api repo\", event.getChargingStationId());\n ChargingStation station = new ChargingStation(event.getChargingStationId().getId());\n repository.c... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_87 | {
"fields": [
{
"declarator": "chargePointService",
"modifier": "private",
"original_string": "private ChargePointService chargePointService;",
"type": "ChargePointService",
"var_name": "chargePointService"
},
{
"declarator": "client",
"modifier": "private",
... | {
"body": "@Test\n public void changeConfigurationVerifyServiceCall() {\n when(chargePointService.changeConfiguration(any(ChangeConfigurationRequest.class), eq(CHARGING_STATION_ID.getId()))).thenReturn(getChangeConfigurationResponse(ConfigurationStatus.ACCEPTED));\n ArgumentCaptor<ChangeConfiguration... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ChargingStationOcpp12SoapClient.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ChargingStationOcpp12SoapClient.class);",
"type": "Logger",
"var_nam... | {
"body": "@Override\n public boolean changeConfiguration(ChargingStationId id, ConfigurationItem configurationItem) {\n checkNotNull(id);\n checkNotNull(configurationItem);\n\n final String key = configurationItem.getKey();\n final String value = configurationItem.getValue();\n\n ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_68 | {
"fields": [
{
"declarator": "motownCentralSystemService",
"modifier": "private",
"original_string": "private MotownCentralSystemService motownCentralSystemService;",
"type": "MotownCentralSystemService",
"var_name": "motownCentralSystemService"
},
{
"declarator": "dom... | {
"body": "@Test\n public void diagnosticsStatusNotificationUploadFailedVerifyServiceCall() {\n DiagnosticsStatusNotificationRequest request = new DiagnosticsStatusNotificationRequest();\n request.setStatus(DiagnosticsStatus.UPLOAD_FAILED);\n\n motownCentralSystemService.diagnosticsStatusNotif... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(MotownCentralSystemService.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(MotownCentralSystemService.class);",
"type": "Logger",
"var_name": "LOG"
... | {
"body": "@Override\n public DiagnosticsStatusNotificationResponse diagnosticsStatusNotification(DiagnosticsStatusNotificationRequest request, String chargeBoxIdentity) {\n ChargingStationId chargingStationId = new ChargingStationId(chargeBoxIdentity);\n DiagnosticsStatus diagnosticsStatus = request... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_131 | {
"fields": [
{
"declarator": "ADD_ON_TYPE = \"OCPPS15\"",
"modifier": "private static final",
"original_string": "private static final String ADD_ON_TYPE = \"OCPPS15\";",
"type": "String",
"var_name": "ADD_ON_TYPE"
},
{
"declarator": "OCPPS15_ADD_ON_IDENTITY = new Type... | {
"body": "@Test\n public void diagnosticsStatusNotificationVerifyResponse() {\n DiagnosticsStatusNotificationRequest request = new DiagnosticsStatusNotificationRequest();\n\n DiagnosticsStatusNotificationResponse response = motownCentralSystemService.diagnosticsStatusNotification(request, CHARGING_S... | {
"fields": [
{
"declarator": "ADD_ON_TYPE = Ocpp15RequestHandler.ADD_ON_TYPE",
"modifier": "public static final",
"original_string": "public static final String ADD_ON_TYPE = Ocpp15RequestHandler.ADD_ON_TYPE;",
"type": "String",
"var_name": "ADD_ON_TYPE"
},
{
"declarat... | {
"body": "@Override\n public DiagnosticsStatusNotificationResponse diagnosticsStatusNotification(DiagnosticsStatusNotificationRequest request, String chargeBoxIdentity) {\n ChargingStationId chargingStationId = new ChargingStationId(chargeBoxIdentity);\n DiagnosticsStatus diagnosticsStatus = request... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_425 | {
"fields": [
{
"declarator": "repository",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private ChargingStationRepository repository;",
"type": "ChargingStationRepository",
"var_name": "repository"
},
{
"declarator": "listener",
"mod... | {
"body": "@Test\n public void testHandleChargingStationLocationImprovedEvent() {\n ChargingStation cs = repository.findOne(CHARGING_STATION_ID.getId());\n assertNull(cs.getLatitude());\n assertNull(cs.getLongitude());\n assertNull(cs.getAddressLine1());\n assertNull(cs.getAddres... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ChargingStationEventListener.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ChargingStationEventListener.class);",
"type": "Logger",
"var_name": "L... | {
"body": "@EventHandler\n public void handle(ChargingStationCreatedEvent event) {\n LOG.debug(\"ChargingStationCreatedEvent creates [{}] in operator api repo\", event.getChargingStationId());\n ChargingStation station = new ChargingStation(event.getChargingStationId().getId());\n repository.c... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_86 | {
"fields": [
{
"declarator": "chargePointService",
"modifier": "private",
"original_string": "private ChargePointService chargePointService;",
"type": "ChargePointService",
"var_name": "chargePointService"
},
{
"declarator": "client",
"modifier": "private",
... | {
"body": "@Test\n public void changeConfigurationRejectedVerifyReturnValue() {\n when(chargePointService.changeConfiguration(any(ChangeConfigurationRequest.class), eq(CHARGING_STATION_ID.getId()))).thenReturn(getChangeConfigurationResponse(ConfigurationStatus.REJECTED));\n\n boolean hasConfiguration... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ChargingStationOcpp12SoapClient.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ChargingStationOcpp12SoapClient.class);",
"type": "Logger",
"var_nam... | {
"body": "@Override\n public boolean changeConfiguration(ChargingStationId id, ConfigurationItem configurationItem) {\n checkNotNull(id);\n checkNotNull(configurationItem);\n\n final String key = configurationItem.getKey();\n final String value = configurationItem.getValue();\n\n ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_69 | {
"fields": [
{
"declarator": "motownCentralSystemService",
"modifier": "private",
"original_string": "private MotownCentralSystemService motownCentralSystemService;",
"type": "MotownCentralSystemService",
"var_name": "motownCentralSystemService"
},
{
"declarator": "dom... | {
"body": "@Test\n public void firmwareStatusNotificationVerifyResponse() {\n FirmwareStatusNotificationRequest request = new FirmwareStatusNotificationRequest();\n\n FirmwareStatusNotificationResponse response = motownCentralSystemService.firmwareStatusNotification(request, CHARGING_STATION_ID.getId... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(MotownCentralSystemService.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(MotownCentralSystemService.class);",
"type": "Logger",
"var_name": "LOG"
... | {
"body": "@Override\n public FirmwareStatusNotificationResponse firmwareStatusNotification(FirmwareStatusNotificationRequest request, String chargeBoxIdentity) {\n ChargingStationId chargingStationId = new ChargingStationId(chargeBoxIdentity);\n FirmwareStatus status = request.getStatus();\n\n ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_130 | {
"fields": [
{
"declarator": "ADD_ON_TYPE = \"OCPPS15\"",
"modifier": "private static final",
"original_string": "private static final String ADD_ON_TYPE = \"OCPPS15\";",
"type": "String",
"var_name": "ADD_ON_TYPE"
},
{
"declarator": "OCPPS15_ADD_ON_IDENTITY = new Type... | {
"body": "@Test\n public void meterValuesVerifyServiceCall() {\n MeterValuesRequest request = new MeterValuesRequest();\n request.setConnectorId(EVSE_ID.getNumberedId());\n request.setTransactionId(TRANSACTION_NUMBER);\n List<io.motown.ocpp.v15.soap.centralsystem.schema.MeterValue> met... | {
"fields": [
{
"declarator": "ADD_ON_TYPE = Ocpp15RequestHandler.ADD_ON_TYPE",
"modifier": "public static final",
"original_string": "public static final String ADD_ON_TYPE = Ocpp15RequestHandler.ADD_ON_TYPE;",
"type": "String",
"var_name": "ADD_ON_TYPE"
},
{
"declarat... | {
"body": "@Override\n public MeterValuesResponse meterValues(MeterValuesRequest request, String chargeBoxIdentity) {\n ChargingStationId chargingStationId = new ChargingStationId(chargeBoxIdentity);\n TransactionId transactionId = request.getTransactionId() != null ? new NumberedTransactionId(chargi... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_219 | {
"fields": [
{
"declarator": "AUTHORIZATION_TIMEOUT_IN_MILLIS = 1000",
"modifier": "private static final",
"original_string": "private static final int AUTHORIZATION_TIMEOUT_IN_MILLIS = 1000;",
"type": "int",
"var_name": "AUTHORIZATION_TIMEOUT_IN_MILLIS"
},
{
"declarat... | {
"body": "@Test\n public void testDataTransfer() {\n FutureEventCallback futureEventCallback = getFutureEventCallback();\n domainService.incomingDataTransfer(REGISTERED_AND_CONFIGURED_CHARGING_STATION_ID, DATA_TRANSFER_DATA, DATA_TRANSFER_VENDOR, DATA_TRANSFER_MESSAGE_ID, futureEventCallback, ADD_ON... | {
"fields": [
{
"declarator": "CHARGING_STATION_EVSE_ID = 0",
"modifier": "public static final",
"original_string": "public static final int CHARGING_STATION_EVSE_ID = 0;",
"type": "int",
"var_name": "CHARGING_STATION_EVSE_ID"
},
{
"declarator": "ERROR_CODE_KEY = \"erro... | {
"body": "public void incomingDataTransfer(ChargingStationId chargingStationId, String data, String vendorId, String messageId, FutureEventCallback future, AddOnIdentity addOnIdentity) {\n this.checkChargingStationExistsAndIsRegisteredAndConfigured(chargingStationId);\n\n IdentityContext identityContex... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_188 | {
"fields": [
{
"declarator": "requestHandler",
"modifier": "private",
"original_string": "private Ocpp15RequestHandler requestHandler;",
"type": "Ocpp15RequestHandler",
"var_name": "requestHandler"
},
{
"declarator": "client",
"modifier": "private",
"origin... | {
"body": "@Test\n public void testConfigurationRequestedEvent() {\n requestHandler.handle(new ConfigurationItemsRequestedEvent(CHARGING_STATION_ID, CONFIGURATION_KEYS, PROTOCOL, ROOT_IDENTITY_CONTEXT));\n\n verify(client).getConfiguration(CHARGING_STATION_ID, CONFIGURATION_KEYS);\n }",
"class_m... | {
"fields": [
{
"declarator": "PROTOCOL_IDENTIFIER = \"OCPPS15\"",
"modifier": "public static final",
"original_string": "public static final String PROTOCOL_IDENTIFIER = \"OCPPS15\";",
"type": "String",
"var_name": "PROTOCOL_IDENTIFIER"
},
{
"declarator": "ADD_ON_TYPE ... | {
"body": "@Override\n public void handle(ConfigurationItemsRequestedEvent event) {\n LOG.info(\"Handling ConfigurationItemsRequestedEvent \" + event.getChargingStationId());\n Map<String, String> configurationItemMap = chargingStationOcpp15Client.getConfiguration(event.getChargingStationId(), event.... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_472 | {
"fields": [],
"file": "domain/core-api/src/test/java/io/motown/domain/api/chargingstation/StartTransactionInfoTest.java",
"identifier": "StartTransactionInfoTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = UnsupportedOperationException.class)\n public void paramsShouldBeImmutableCopy() {\n Map<String, String> attributes = new HashMap<>();\n attributes.put(\"key\", \"value\");\n\n new StartTransactionInfo(EVSE_ID, 0, new Date(), IDENTIFYING_TOKEN_ACCEPTED, attributes).... | {
"fields": [
{
"declarator": "evseId",
"modifier": "private final",
"original_string": "private final EvseId evseId;",
"type": "EvseId",
"var_name": "evseId"
},
{
"declarator": "meterStart",
"modifier": "private final",
"original_string": "private final int... | {
"body": "public Map<String, String> getAttributes() {\n return attributes;\n }",
"class_method_signature": "StartTransactionInfo.getAttributes()",
"constructor": false,
"full_signature": "public Map<String, String> getAttributes()",
"identifier": "getAttributes",
"invocations": [],
"modifiers"... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_167 | {
"fields": [
{
"declarator": "chargePointService",
"modifier": "private",
"original_string": "private ChargePointService chargePointService;",
"type": "ChargePointService",
"var_name": "chargePointService"
},
{
"declarator": "client",
"modifier": "private",
... | {
"body": "@Test\n public void sendAuthorizationListAcceptedVerifyReturnValue() {\n when(chargePointService.sendLocalList(any(SendLocalListRequest.class), eq(CHARGING_STATION_ID.getId()))).thenReturn(getSendLocalListResponse(UpdateStatus.ACCEPTED));\n\n RequestResult requestResult = client.sendAuthor... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ChargingStationOcpp15SoapClient.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ChargingStationOcpp15SoapClient.class);",
"type": "Logger",
"var_nam... | {
"body": "@Override\n public RequestResult sendAuthorizationList(ChargingStationId id, String hash, int listVersion, Set<IdentifyingToken> identifyingTokens, AuthorizationListUpdateType updateType) {\n ChargePointService chargePointService = this.createChargingStationService(id);\n\n SendLocalListRe... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_464 | {
"fields": [],
"file": "domain/core-api/src/test/java/io/motown/domain/api/chargingstation/TransactionIdFactoryTest.java",
"identifier": "TransactionIdFactoryTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void creationOfNumberedTransactionId() {\n TransactionId transactionId = TransactionIdFactory.createTransactionId(\"1234\", CHARGING_STATION_ID, PROTOCOL);\n\n assertTrue(transactionId instanceof NumberedTransactionId);\n }",
"class_method_signature": "TransactionIdFac... | {
"fields": [],
"file": "domain/core-api/src/main/java/io/motown/domain/api/chargingstation/TransactionIdFactory.java",
"identifier": "TransactionIdFactory",
"interfaces": "",
"methods": [
{
"class_method_signature": "TransactionIdFactory.TransactionIdFactory()",
"constructor": true,
"fu... | {
"body": "public static TransactionId createTransactionId(String transactionNumber, ChargingStationId chargingStationId, String protocol) {\n return Ints.tryParse(checkNotNull(transactionNumber)) != null\n ? new NumberedTransactionId(chargingStationId, protocol, Ints.tryParse(transactionNumber)... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_28 | {
"fields": [
{
"declarator": "resource",
"modifier": "private",
"original_string": "private ConnectorResource resource;",
"type": "ConnectorResource",
"var_name": "resource"
},
{
"declarator": "domainService",
"modifier": "@Mock\n private",
"original_str... | {
"body": "@Test\n public void getConnector() {\n Response response = resource.getConnector(CHARGING_STATION_TYPE_ID, EVSE_ID, CONNECTOR_ID);\n\n verify(domainService).getConnector(CHARGING_STATION_TYPE_ID, EVSE_ID, CONNECTOR_ID);\n assertNotNull(response);\n assertEquals(Response.Statu... | {
"fields": [
{
"declarator": "domainService",
"modifier": "private",
"original_string": "private DomainService domainService;",
"type": "DomainService",
"var_name": "domainService"
}
],
"file": "chargingstation-configuration/view-model/src/main/java/io/motown/chargingstation... | {
"body": "@GET\n @Path(\"/{id: [0-9]+}\")\n public Response getConnector(@PathParam(\"chargingStationTypeId\") Long chargingStationTypeId, @PathParam(\"evseId\") Long evseId, @PathParam(\"id\") Long id) {\n return Response.ok(domainService.getConnector(chargingStationTypeId, evseId, id)).build();\n }... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_171 | {
"fields": [
{
"declarator": "chargePointService",
"modifier": "private",
"original_string": "private ChargePointService chargePointService;",
"type": "ChargePointService",
"var_name": "chargePointService"
},
{
"declarator": "client",
"modifier": "private",
... | {
"body": "@Test\n public void sendAuthorizationListVersionMismatchVerifyReturnValue() {\n when(chargePointService.sendLocalList(any(SendLocalListRequest.class), eq(CHARGING_STATION_ID.getId()))).thenReturn(getSendLocalListResponse(UpdateStatus.VERSION_MISMATCH));\n\n RequestResult requestResult = cl... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ChargingStationOcpp15SoapClient.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ChargingStationOcpp15SoapClient.class);",
"type": "Logger",
"var_nam... | {
"body": "@Override\n public RequestResult sendAuthorizationList(ChargingStationId id, String hash, int listVersion, Set<IdentifyingToken> identifyingTokens, AuthorizationListUpdateType updateType) {\n ChargePointService chargePointService = this.createChargingStationService(id);\n\n SendLocalListRe... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_258 | {
"fields": [
{
"declarator": "request",
"modifier": "private",
"original_string": "private HttpServletRequest request;",
"type": "HttpServletRequest",
"var_name": "request"
}
],
"file": "utils/rest/src/test/java/io/motown/utils/rest/response/ResponseBuilderTest.java",
"ide... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testResponseBuilderOffsetEqualToTotalWhenTotalGreaterThanZero() {\n ResponseBuilder.buildResponse(request, 1, 1, 1, Lists.<String>newArrayList());\n }",
"class_method_signature": "ResponseBuilderTest.testResponseBuilderOffsetEqua... | {
"fields": [
{
"declarator": "QUERY_STRING_FORMAT = \"?offset=%d&limit=%d\"",
"modifier": "private static final",
"original_string": "private static final String QUERY_STRING_FORMAT = \"?offset=%d&limit=%d\";",
"type": "String",
"var_name": "QUERY_STRING_FORMAT"
}
],
"file":... | {
"body": "public static <T> Response<T> buildResponse(final HttpServletRequest request, final int offset, final int limit, final long total, final List<T> elements) {\n checkArgument(offset >= 0);\n checkArgument(limit >= 1);\n checkArgument(total >= 0);\n checkArgument(total == 0 || offs... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_90 | {
"fields": [
{
"declarator": "chargePointService",
"modifier": "private",
"original_string": "private ChargePointService chargePointService;",
"type": "ChargePointService",
"var_name": "chargePointService"
},
{
"declarator": "client",
"modifier": "private",
... | {
"body": "@Test\n public void clearCacheAcceptedVerifyReturnValue() {\n when(chargePointService.clearCache(any(ClearCacheRequest.class), eq(CHARGING_STATION_ID.getId()))).thenReturn(getClearCacheResponse(ClearCacheStatus.ACCEPTED));\n\n boolean requestResult = client.clearCache(CHARGING_STATION_ID);... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ChargingStationOcpp12SoapClient.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ChargingStationOcpp12SoapClient.class);",
"type": "Logger",
"var_nam... | {
"body": "@Override\n public boolean clearCache(ChargingStationId id) {\n ChargePointService chargePointService = this.createChargingStationService(id);\n\n ClearCacheRequest request = new ClearCacheRequest();\n\n boolean requestResult;\n ClearCacheResponse response = chargePointServic... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_433 | {
"fields": [
{
"declarator": "repository",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private ChargingStationRepository repository;",
"type": "ChargingStationRepository",
"var_name": "repository"
},
{
"declarator": "listener",
"mod... | {
"body": "@Test\n public void testHandleConfigurationItemsReceivedEventShouldOnlyCreateUpdateRequestedKeys() {\n ChargingStation cs = repository.findOne(CHARGING_STATION_ID.getId());\n assertTrue(cs.getConfItems().isEmpty());\n String key = \"io.motown.sockets.amount\";\n String expect... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ChargingStationEventListener.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ChargingStationEventListener.class);",
"type": "Logger",
"var_name": "L... | {
"body": "@EventHandler\n public void handle(ChargingStationCreatedEvent event) {\n LOG.debug(\"ChargingStationCreatedEvent creates [{}] in operator api repo\", event.getChargingStationId());\n ChargingStation station = new ChargingStation(event.getChargingStationId().getId());\n repository.c... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_126 | {
"fields": [
{
"declarator": "ADD_ON_TYPE = \"OCPPS15\"",
"modifier": "private static final",
"original_string": "private static final String ADD_ON_TYPE = \"OCPPS15\";",
"type": "String",
"var_name": "ADD_ON_TYPE"
},
{
"declarator": "OCPPS15_ADD_ON_IDENTITY = new Type... | {
"body": "@Test\n public void bootNotificationVerifyServiceCall() {\n BootNotificationRequest request = new BootNotificationRequest();\n request.setChargePointVendor(CHARGING_STATION_VENDOR);\n request.setChargePointModel(CHARGING_STATION_MODEL);\n request.setChargePointSerialNumber(CH... | {
"fields": [
{
"declarator": "ADD_ON_TYPE = Ocpp15RequestHandler.ADD_ON_TYPE",
"modifier": "public static final",
"original_string": "public static final String ADD_ON_TYPE = Ocpp15RequestHandler.ADD_ON_TYPE;",
"type": "String",
"var_name": "ADD_ON_TYPE"
},
{
"declarat... | {
"body": "@Override\n public BootNotificationResponse bootNotification(BootNotificationRequest request, String chargeBoxIdentity) {\n ChargingStationId chargingStationId = new ChargingStationId(chargeBoxIdentity);\n\n String chargingStationAddress = soapHeaderReader.getChargingStationAddress(context... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_448 | {
"fields": [
{
"declarator": "repository",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private ReservationRepository repository;",
"type": "ReservationRepository",
"var_name": "repository"
},
{
"declarator": "chargingStationRepository",
... | {
"body": "@Test\n public void testHandleReservationCancelledEvent() {\n ChargingStation cs = new ChargingStation(CHARGING_STATION_ID.getId());\n cs.setEvses(ImmutableSet.<Evse>builder().add(new Evse(\"1\", ComponentStatus.AVAILABLE)).build());\n chargingStationRepository.createOrUpdate(cs);\n... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ReservationEventListener.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ReservationEventListener.class);",
"type": "Logger",
"var_name": "LOG"
... | {
"body": "@EventHandler\n public void handle(ReservedNowEvent event) {\n LOG.debug(\"ReservedNowEvent for [{}] received!\", event.getChargingStationId());\n \n createReservation(event.getChargingStationId(), ReservationStatus.ACCEPTED, event.getReservationId().getId(), \n \t\tevent.get... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_331 | {
"fields": [
{
"declarator": "gson",
"modifier": "private",
"original_string": "private Gson gson;",
"type": "Gson",
"var_name": "gson"
},
{
"declarator": "handler = new MoveChargingStationJsonCommandHandler()",
"modifier": "private",
"original_string": "pr... | {
"body": "@Test(expected = NumberFormatException.class)\n public void testInvalidCoordinatesNumber() throws UserIdentityUnauthorizedException {\n JsonObject commandObject = gson.fromJson(\"{coordinates:{latitude:'center',longitude:'0.0'},accessibility:'PUBLIC'}\", JsonObject.class);\n handler.handle... | {
"fields": [
{
"declarator": "COMMAND_NAME = \"MoveChargingStation\"",
"modifier": "private static final",
"original_string": "private static final String COMMAND_NAME = \"MoveChargingStation\";",
"type": "String",
"var_name": "COMMAND_NAME"
}
],
"file": "operator-api/json/s... | {
"body": "@Override\n public void handle(String chargingStationId, JsonObject commandObject, IdentityContext identityContext) throws UserIdentityUnauthorizedException {\n ChargingStationId csId = new ChargingStationId(chargingStationId);\n\n if (!commandAuthorizationService.isAuthorized(csId, identi... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_274 | {
"fields": [
{
"declarator": "service",
"modifier": "private",
"original_string": "private VasConversionService service;",
"type": "VasConversionService",
"var_name": "service"
}
],
"file": "vas/v10-soap/src/test/java/io/motown/vas/v10/soap/VasConversionServiceTest.java",
... | {
"body": "@Test\n public void getVasRepresentationFilledChargingStationValidateReturnValue() {\n ChargingStation cs = VasSoapTestUtils.getConfiguredAndFilledChargingStation();\n\n ChargePoint vasRepresentation = service.getVasRepresentation(cs);\n\n VasSoapTestUtils.compareChargingStationToVa... | {
"fields": [],
"file": "vas/v10-soap/src/main/java/io/motown/vas/v10/soap/VasConversionService.java",
"identifier": "VasConversionService",
"interfaces": "",
"methods": [
{
"class_method_signature": "VasConversionService.getVasRepresentation(ChargingStation chargingStation)",
"constructor": f... | {
"body": "public ChargePoint getVasRepresentation(ChargingStation chargingStation) {\n ChargePoint chargePoint = new ChargePoint();\n chargePoint.setAddress(chargingStation.getAddress());\n chargePoint.getChargingCapabilities().addAll(getChargingCapabilities(chargingStation));\n chargePoi... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_53 | {
"fields": [
{
"declarator": "VENDOR = \"MOTOWN\"",
"modifier": "public static final",
"original_string": "public static final String VENDOR = \"MOTOWN\";",
"type": "String",
"var_name": "VENDOR"
},
{
"declarator": "MODEL = \"MODEL1\"",
"modifier": "public static... | {
"body": "@Test\n public void deleteConnector() {\n ChargingStationType chargingStationType = getChargingStationTypeNonTransient(entityManagerFactory);\n io.motown.chargingstationconfiguration.viewmodel.persistence.entities.Evse evse =\n Iterables.get(chargingStationType.getEvses(), 0... | {
"fields": [
{
"declarator": "chargingStationTypeRepository",
"modifier": "private",
"original_string": "private ChargingStationTypeRepository chargingStationTypeRepository;",
"type": "ChargingStationTypeRepository",
"var_name": "chargingStationTypeRepository"
},
{
"de... | {
"body": "public void deleteConnector(Long chargingStationTypeId, Long evseId, Long id) {\n ChargingStationType chargingStationType = chargingStationTypeRepository.findOne(chargingStationTypeId);\n Evse evse = getEvseById(chargingStationType, evseId);\n\n Connector connector = getConnectorById(e... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_366 | {
"fields": [
{
"declarator": "gson",
"modifier": "private",
"original_string": "private Gson gson;",
"type": "Gson",
"var_name": "gson"
},
{
"declarator": "handler = new RequestFirmwareUpdateJsonCommandHandler()",
"modifier": "private",
"original_string": "... | {
"body": "@Test\n public void testUpdateFirmwareCommandWithOptionalParams() throws UserIdentityUnauthorizedException {\n JsonObject commandObject = gson.fromJson(\"{location:'DEURNE',retrieveDate:'2014-02-03T12:00:00Z',numRetries:3,retryInterval:60}\", JsonObject.class);\n handler.handle(CHARGING_ST... | {
"fields": [
{
"declarator": "COMMAND_NAME = \"RequestFirmwareUpdate\"",
"modifier": "private static final",
"original_string": "private static final String COMMAND_NAME = \"RequestFirmwareUpdate\";",
"type": "String",
"var_name": "COMMAND_NAME"
}
],
"file": "operator-api/js... | {
"body": "@Override\n public void handle(String chargingStationId, JsonObject commandObject, IdentityContext identityContext) throws UserIdentityUnauthorizedException {\n ChargingStationId csId = new ChargingStationId(chargingStationId);\n\n if (!commandAuthorizationService.isAuthorized(csId, identi... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_9 | {
"fields": [
{
"declarator": "resource",
"modifier": "private",
"original_string": "private ChargingStationTypeResource resource;",
"type": "ChargingStationTypeResource",
"var_name": "resource"
},
{
"declarator": "repository",
"modifier": "@Mock\n private",
... | {
"body": "@Test(expected = RuntimeException.class)\n public void testUpdateChargingStationTypeThrowsException() {\n ChargingStationType chargingStationType = mock(ChargingStationType.class);\n when(chargingStationType.getId()).thenReturn(1L);\n doThrow(mock(PersistenceException.class)).when(r... | {
"fields": [
{
"declarator": "OFFSET_PARAMETER = \"offset\"",
"modifier": "private static final",
"original_string": "private static final String OFFSET_PARAMETER = \"offset\";",
"type": "String",
"var_name": "OFFSET_PARAMETER"
},
{
"declarator": "OFFSET_DEFAULT = \"0\... | {
"body": "@PUT\n @Path(\"/{id: [0-9]+}\")\n @Consumes(ApiVersion.V1_JSON)\n public Response updateChargingStationType(@PathParam(\"id\") Long id, ChargingStationType chargingStationType) {\n return Response.ok(domainService.updateChargingStationType(id, chargingStationType)).build();\n }",
"clas... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_389 | {
"fields": [
{
"declarator": "gson",
"modifier": "private",
"original_string": "private Gson gson;",
"type": "Gson",
"var_name": "gson"
},
{
"declarator": "handler = new PlaceChargingStationJsonCommandHandler()",
"modifier": "private",
"original_string": "p... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testAddressWrongAccessibility() throws UserIdentityUnauthorizedException {\n JsonObject commandObject = gson.fromJson(\"{address:{addressLine1:'Teststraat 1',city:'Deurne',country:'NL'},accessibility:'NON-PUBLIC'}\", JsonObject.class)... | {
"fields": [
{
"declarator": "COMMAND_NAME = \"PlaceChargingStation\"",
"modifier": "private static final",
"original_string": "private static final String COMMAND_NAME = \"PlaceChargingStation\";",
"type": "String",
"var_name": "COMMAND_NAME"
}
],
"file": "operator-api/json... | {
"body": "@Override\n public void handle(String chargingStationId, JsonObject commandObject, IdentityContext identityContext) throws UserIdentityUnauthorizedException {\n ChargingStationId csId = new ChargingStationId(chargingStationId);\n\n if (!commandAuthorizationService.isAuthorized(csId, identi... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_223 | {
"fields": [
{
"declarator": "AUTHORIZATION_TIMEOUT_IN_MILLIS = 1000",
"modifier": "private static final",
"original_string": "private static final int AUTHORIZATION_TIMEOUT_IN_MILLIS = 1000;",
"type": "int",
"var_name": "AUTHORIZATION_TIMEOUT_IN_MILLIS"
},
{
"declarat... | {
"body": "@Test\n public void testAuthorize() {\n FutureEventCallback futureEventCallback = getFutureEventCallback();\n domainService.authorize(REGISTERED_AND_CONFIGURED_CHARGING_STATION_ID, IDENTIFYING_TOKEN.getToken(), futureEventCallback, ADD_ON_IDENTITY);\n verify(eventWaitingGateway).sen... | {
"fields": [
{
"declarator": "CHARGING_STATION_EVSE_ID = 0",
"modifier": "public static final",
"original_string": "public static final int CHARGING_STATION_EVSE_ID = 0;",
"type": "int",
"var_name": "CHARGING_STATION_EVSE_ID"
},
{
"declarator": "ERROR_CODE_KEY = \"erro... | {
"body": "public void authorize(ChargingStationId chargingStationId, String idTag, FutureEventCallback future, AddOnIdentity addOnIdentity) {\n this.checkChargingStationExistsAndIsRegisteredAndConfigured(chargingStationId);\n\n IdentityContext identityContext = new IdentityContext(addOnIdentity, new Nu... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_45 | {
"fields": [
{
"declarator": "VENDOR = \"MOTOWN\"",
"modifier": "public static final",
"original_string": "public static final String VENDOR = \"MOTOWN\";",
"type": "String",
"var_name": "VENDOR"
},
{
"declarator": "MODEL = \"MODEL1\"",
"modifier": "public static... | {
"body": "@Test\n public void testGetEvsesForNonExistingManufacturerAndExistingModel() {\n Manufacturer manufacturer = getManufacturerWithConfiguration(VENDOR, MODEL);\n insertIntoDatabase(entityManagerFactory, manufacturer);\n\n Set<Evse> evses = domainService.getEvses(UNKNOWN_VENDOR, MODEL)... | {
"fields": [
{
"declarator": "chargingStationTypeRepository",
"modifier": "private",
"original_string": "private ChargingStationTypeRepository chargingStationTypeRepository;",
"type": "ChargingStationTypeRepository",
"var_name": "chargingStationTypeRepository"
},
{
"de... | {
"body": "public Set<io.motown.domain.api.chargingstation.Evse> getEvses(String vendor, String model) {\n List<ChargingStationType> items = chargingStationTypeRepository.findByCodeAndManufacturerCode(model, vendor);\n\n Set<io.motown.domain.api.chargingstation.Evse> result = new HashSet<>();\n i... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_409 | {
"fields": [
{
"declarator": "adapter = new EvseIdTypeAdapterDeserializer()",
"modifier": "private final",
"original_string": "private final EvseIdTypeAdapterDeserializer adapter = new EvseIdTypeAdapterDeserializer();",
"type": "EvseIdTypeAdapterDeserializer",
"var_name": "adapter"
... | {
"body": "@Test(expected = JsonParseException.class)\n public void testEvseIdAsUnparsableString() {\n JsonPrimitive jsonPrimitive = new JsonPrimitive(\"1x\");\n adapter.deserialize(jsonPrimitive, EvseId.class, null);\n }",
"class_method_signature": "EvseIdTypeAdapterDeserializerTest.testEvseIdA... | {
"fields": [],
"file": "operator-api/json/src/main/java/io/motown/operatorapi/json/gson/EvseIdTypeAdapterDeserializer.java",
"identifier": "EvseIdTypeAdapterDeserializer",
"interfaces": "implements TypeAdapterDeserializer<EvseId>",
"methods": [
{
"class_method_signature": "EvseIdTypeAdapterDeserial... | {
"body": "@Override\n public EvseId deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) {\n if (!json.isJsonPrimitive()) {\n throw new JsonParseException(\"EvseId must be a JSON primitive\");\n }\n\n int evseId;\n\n try {\n evseId = jso... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_370 | {
"fields": [
{
"declarator": "gson",
"modifier": "private",
"original_string": "private Gson gson;",
"type": "Gson",
"var_name": "gson"
},
{
"declarator": "handler = new RequestSendAuthorizationListJsonCommandHandler()",
"modifier": "private",
"original_str... | {
"body": "@Test\n public void testDifferentialUpdateType() throws UserIdentityUnauthorizedException {\n JsonObject commandObject = gson.fromJson(\"{listVersion:1,updateType:'DIFFERENTIAL',items:[{token:'1',status:'ACCEPTED', mobilityServiceProvider:'MSP',visibleId:'7007'},{token:'2',status:'BLOCKED'}]}\", ... | {
"fields": [
{
"declarator": "COMMAND_NAME = \"RequestSendAuthorizationList\"",
"modifier": "private static final",
"original_string": "private static final String COMMAND_NAME = \"RequestSendAuthorizationList\";",
"type": "String",
"var_name": "COMMAND_NAME"
}
],
"file": "o... | {
"body": "@Override\n public void handle(String chargingStationId, JsonObject commandObject, IdentityContext identityContext) throws UserIdentityUnauthorizedException {\n ChargingStationId csId = new ChargingStationId(chargingStationId);\n\n if (!commandAuthorizationService.isAuthorized(csId, identi... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_235 | {
"fields": [
{
"declarator": "AUTHORIZATION_TIMEOUT_IN_MILLIS = 1000",
"modifier": "private static final",
"original_string": "private static final int AUTHORIZATION_TIMEOUT_IN_MILLIS = 1000;",
"type": "int",
"var_name": "AUTHORIZATION_TIMEOUT_IN_MILLIS"
},
{
"declarat... | {
"body": "@Test\n public void testStopTransaction() {\n int ocppTransactionId = 0;\n NumberedTransactionId transactionId = new NumberedTransactionId(REGISTERED_AND_CONFIGURED_CHARGING_STATION_ID, PROTOCOL, ocppTransactionId);\n int meterStopValue = 1;\n Date now = new Date();\n\n ... | {
"fields": [
{
"declarator": "CHARGING_STATION_EVSE_ID = 0",
"modifier": "public static final",
"original_string": "public static final int CHARGING_STATION_EVSE_ID = 0;",
"type": "int",
"var_name": "CHARGING_STATION_EVSE_ID"
},
{
"declarator": "ERROR_CODE_KEY = \"erro... | {
"body": "public void stopTransaction(ChargingStationId chargingStationId, NumberedTransactionId transactionId, IdentifyingToken idTag, int meterValueStop, Date timeStamp,\n List<MeterValue> meterValues, AddOnIdentity addOnIdentity) {\n this.checkChargingStationExistsAndIsRegist... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_12 | {
"fields": [
{
"declarator": "resource",
"modifier": "private",
"original_string": "private ChargingStationTypeResource resource;",
"type": "ChargingStationTypeResource",
"var_name": "resource"
},
{
"declarator": "repository",
"modifier": "@Mock\n private",
... | {
"body": "@Test\n public void testGetChargingStationType() {\n Response response = resource.getChargingStationType(anyLong());\n verify(repository).findOne(anyLong());\n\n assertNotNull(response);\n assertEquals(Response.Status.OK.getStatusCode(), response.getStatus());\n }",
"cla... | {
"fields": [
{
"declarator": "OFFSET_PARAMETER = \"offset\"",
"modifier": "private static final",
"original_string": "private static final String OFFSET_PARAMETER = \"offset\";",
"type": "String",
"var_name": "OFFSET_PARAMETER"
},
{
"declarator": "OFFSET_DEFAULT = \"0\... | {
"body": "@GET\n @Path(\"/{id: [0-9]+}\")\n public Response getChargingStationType(@PathParam(\"id\") Long id) {\n return Response.ok(domainService.getChargingStationType(id)).build();\n }",
"class_method_signature": "ChargingStationTypeResource.getChargingStationType(@PathParam(\"id\") Long id)",
... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_327 | {
"fields": [
{
"declarator": "gson",
"modifier": "private",
"original_string": "private Gson gson;",
"type": "Gson",
"var_name": "gson"
},
{
"declarator": "handler = new MoveChargingStationJsonCommandHandler()",
"modifier": "private",
"original_string": "pr... | {
"body": "@Test\n public void testAddress() throws UserIdentityUnauthorizedException {\n JsonObject commandObject = gson.fromJson(\"{address:{addressLine1:'Teststraat 1',city:'Deurne',country:'NL'},accessibility:'PUBLIC'}\", JsonObject.class);\n handler.handle(OperatorApiJsonTestUtils.CHARGING_STATI... | {
"fields": [
{
"declarator": "COMMAND_NAME = \"MoveChargingStation\"",
"modifier": "private static final",
"original_string": "private static final String COMMAND_NAME = \"MoveChargingStation\";",
"type": "String",
"var_name": "COMMAND_NAME"
}
],
"file": "operator-api/json/s... | {
"body": "@Override\n public void handle(String chargingStationId, JsonObject commandObject, IdentityContext identityContext) throws UserIdentityUnauthorizedException {\n ChargingStationId csId = new ChargingStationId(chargingStationId);\n\n if (!commandAuthorizationService.isAuthorized(csId, identi... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_262 | {
"fields": [
{
"declarator": "BAD_REQUEST = 400",
"modifier": "private static final",
"original_string": "private static final int BAD_REQUEST = 400;",
"type": "int",
"var_name": "BAD_REQUEST"
},
{
"declarator": "exception",
"modifier": "@Mock\n private",
... | {
"body": "@Test\n public void testNonUniqueResultExceptionMapper() {\n NonUniqueResultExceptionMapper mapper = new NonUniqueResultExceptionMapper();\n Response response = mapper.toResponse(exception);\n\n assertNotNull(response);\n assertEquals(BAD_REQUEST, response.getStatus());\n ... | {
"fields": [],
"file": "utils/rest/src/main/java/io/motown/utils/rest/jax_rs/NonUniqueResultExceptionMapper.java",
"identifier": "NonUniqueResultExceptionMapper",
"interfaces": "implements ExceptionMapper<NonUniqueResultException>",
"methods": [
{
"class_method_signature": "NonUniqueResultException... | {
"body": "@Override\n public Response toResponse(NonUniqueResultException e) {\n return Response.status(Response.Status.BAD_REQUEST).entity(e.getMessage()).type(MediaType.TEXT_PLAIN).build();\n }",
"class_method_signature": "NonUniqueResultExceptionMapper.toResponse(NonUniqueResultException e)",
"co... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_215 | {
"fields": [
{
"declarator": "AUTHORIZATION_TIMEOUT_IN_MILLIS = 1000",
"modifier": "private static final",
"original_string": "private static final int AUTHORIZATION_TIMEOUT_IN_MILLIS = 1000;",
"type": "int",
"var_name": "AUTHORIZATION_TIMEOUT_IN_MILLIS"
},
{
"declarat... | {
"body": "@Test\n public void testBootNullAndEmptyChargingStationAddress() {\n BootChargingStationResult result = domainService.bootChargingStation(CHARGING_STATION_ID, PROTOCOL, new AttributeMap<String, String>(), ADD_ON_IDENTITY);\n assertFalse(result.isAccepted());\n\n result = domainServi... | {
"fields": [
{
"declarator": "CHARGING_STATION_EVSE_ID = 0",
"modifier": "public static final",
"original_string": "public static final int CHARGING_STATION_EVSE_ID = 0;",
"type": "int",
"var_name": "CHARGING_STATION_EVSE_ID"
},
{
"declarator": "ERROR_CODE_KEY = \"erro... | {
"body": "public BootChargingStationResult bootChargingStation(ChargingStationId chargingStationId, String protocol,\n AttributeMap<String, String> attributes, AddOnIdentity addOnIdentity) {\n // Check if we already know the charging station, or have to ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_350 | {
"fields": [
{
"declarator": "gson",
"modifier": "private",
"original_string": "private Gson gson;",
"type": "Gson",
"var_name": "gson"
},
{
"declarator": "handler = new AddChargingStationOpeningTimesJsonCommandHandler()",
"modifier": "private",
"original_s... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testOpeningTimesTimeStartNotBeforeTimeStop() throws UserIdentityUnauthorizedException {\n JsonObject commandObject = gson.fromJson(\"{openingTimes:[{day:'tuesday',timeStart:'12:00',timeStop:'11:00'}]}\", JsonObject.class);\n ha... | {
"fields": [
{
"declarator": "COMMAND_NAME = \"AddChargingStationOpeningTimes\"",
"modifier": "private static final",
"original_string": "private static final String COMMAND_NAME = \"AddChargingStationOpeningTimes\";",
"type": "String",
"var_name": "COMMAND_NAME"
}
],
"file"... | {
"body": "@Override\n public void handle(String chargingStationId, JsonObject commandObject, IdentityContext identityContext) throws UserIdentityUnauthorizedException {\n ChargingStationId csId = new ChargingStationId(chargingStationId);\n\n if (!commandAuthorizationService.isAuthorized(csId, identi... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_429 | {
"fields": [
{
"declarator": "repository",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private ChargingStationRepository repository;",
"type": "ChargingStationRepository",
"var_name": "repository"
},
{
"declarator": "listener",
"mod... | {
"body": "@Test\n public void testHandleChargingStationMadeReservableEventAndChargingStationMadeNotReservableEvent() {\n ChargingStation cs = repository.findOne(CHARGING_STATION_ID.getId());\n assertFalse(cs.isReservable());\n\n listener.handle(new ChargingStationMadeReservableEvent(CHARGING_... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ChargingStationEventListener.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ChargingStationEventListener.class);",
"type": "Logger",
"var_name": "L... | {
"body": "@EventHandler\n public void handle(ChargingStationCreatedEvent event) {\n LOG.debug(\"ChargingStationCreatedEvent creates [{}] in operator api repo\", event.getChargingStationId());\n ChargingStation station = new ChargingStation(event.getChargingStationId().getId());\n repository.c... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_65 | {
"fields": [
{
"declarator": "motownCentralSystemService",
"modifier": "private",
"original_string": "private MotownCentralSystemService motownCentralSystemService;",
"type": "MotownCentralSystemService",
"var_name": "motownCentralSystemService"
},
{
"declarator": "dom... | {
"body": "@Test\n public void meterValuesVerifyServiceCall() {\n MeterValuesRequest request = new MeterValuesRequest();\n request.setConnectorId(EVSE_ID.getNumberedId());\n List<io.motown.ocpp.v12.soap.centralsystem.schema.MeterValue> meterValuesSoap = getMeterValuesSoap(4);\n request.... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(MotownCentralSystemService.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(MotownCentralSystemService.class);",
"type": "Logger",
"var_name": "LOG"
... | {
"body": "@Override\n public MeterValuesResponse meterValues(MeterValuesRequest request, String chargeBoxIdentity) {\n ChargingStationId chargingStationId = new ChargingStationId(chargeBoxIdentity);\n //OCPP 1.2 does not contain transactionId references in it's metervalue communication\n Tran... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_242 | {
"fields": [
{
"declarator": "gson = new Gson()",
"modifier": "private",
"original_string": "private Gson gson = new Gson();",
"type": "Gson",
"var_name": "gson"
}
],
"file": "ocpp/websocket-json/src/test/java/io/motown/ocpp/websocketjson/WebSocketWrapperTest.java",
"ident... | {
"body": "@Test(expected = ChargePointCommunicationException.class)\n public void ioExceptionShouldResultInCommunicationExceptionOnSendMessage() throws IOException, ChargePointCommunicationException {\n WebSocket mockWebSocket = getMockWebSocket();\n WebSocketWrapper wrapper = new WebSocketWrapper(C... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(WebSocketWrapper.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(WebSocketWrapper.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"... | {
"body": "public void sendMessage(WampMessage wampMessage) throws ChargePointCommunicationException {\n String wampMessageRaw = wampMessage.toJson(gson);\n\n try {\n writeToSocket(wampMessageRaw);\n\n if (wampMessageHandler != null) {\n wampMessageHandler.handleWamp... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_307 | {
"fields": [
{
"declarator": "eventHandler",
"modifier": "private",
"original_string": "private VasEventHandler eventHandler;",
"type": "VasEventHandler",
"var_name": "eventHandler"
},
{
"declarator": "chargingStationRepository",
"modifier": "@Autowired\n priv... | {
"body": "@Test\n public void chargingStationConfiguredEventVerifyConnectorTypes() {\n chargingStationRepository.createOrUpdate(getRegisteredAndConfiguredChargingStation());\n Set<ConnectorType> expectedConnectorTypes = configurationConversionService.getConnectorTypesFromEvses(EVSES);\n\n eve... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(io.motown.vas.viewmodel.VasEventHandler.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(io.motown.vas.viewmodel.VasEventHandler.class);",
"type": "Logger"... | {
"body": "@EventHandler\n public void handle(ChargingStationCreatedEvent event) {\n LOG.info(\"Handling ChargingStationCreatedEvent\");\n\n String chargingStationId = event.getChargingStationId().getId();\n ChargingStation chargingStation = chargingStationRepository.findOne(chargingStationId)... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_184 | {
"fields": [
{
"declarator": "service = new IdentifyingTokenConverterService()",
"modifier": "private",
"original_string": "private IdentifyingTokenConverterService service = new IdentifyingTokenConverterService();",
"type": "IdentifyingTokenConverterService",
"var_name": "service"
... | {
"body": "@Test\n public void convertExpiredTokenVerifyReturnValue() {\n AuthorisationData authorisationData = service.convertIdentifyingToken(IDENTIFYING_TOKEN_EXPIRED);\n\n assertEquals(IDENTIFYING_TOKEN_EXPIRED.getToken(), authorisationData.getIdTag());\n assertEquals(AuthorizationStatus.E... | {
"fields": [],
"file": "ocpp/v15-soap/src/main/java/io/motown/ocpp/v15/soap/chargepoint/IdentifyingTokenConverterService.java",
"identifier": "IdentifyingTokenConverterService",
"interfaces": "",
"methods": [
{
"class_method_signature": "IdentifyingTokenConverterService.convertIdentifyingTokenList(... | {
"body": "public AuthorisationData convertIdentifyingToken(IdentifyingToken token) {\n AuthorisationData authData = new AuthorisationData();\n authData.setIdTag(token.getToken());\n\n //The OCPP spec describes that the IdTagInfo should not be present in case the charging station has to remove th... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_32 | {
"fields": [
{
"declarator": "MOCK_OBJECT_JSON = \"{\\\"name\\\":\\\"TEST\\\",\\\"age\\\":1}\"",
"modifier": "private static final",
"original_string": "private static final String MOCK_OBJECT_JSON = \"{\\\"name\\\":\\\"TEST\\\",\\\"age\\\":1}\";",
"type": "String",
"var_name": "MOC... | {
"body": "@Test\n public void testIsReadable() {\n assertTrue(provider.isReadable(MockObject.class, MockObject.class.getGenericSuperclass(), new Annotation[]{}, MediaType.APPLICATION_JSON_TYPE));\n }",
"class_method_signature": "GsonMessageBodyReaderWriterTest.testIsReadable()",
"constructor": false... | {
"fields": [
{
"declarator": "UTF_8 = \"UTF-8\"",
"modifier": "private static final",
"original_string": "private static final String UTF_8 = \"UTF-8\";",
"type": "String",
"var_name": "UTF_8"
},
{
"declarator": "gson",
"modifier": "private final",
"origina... | {
"body": "@Override\n public boolean isReadable(Class<?> aClass, Type type, Annotation[] annotations, MediaType mediaType) {\n return true;\n }",
"class_method_signature": "GsonMessageBodyReaderWriter.isReadable(Class<?> aClass, Type type, Annotation[] annotations, MediaType mediaType)",
"constructo... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_491 | {
"fields": [
{
"declarator": "resolver",
"modifier": "private",
"original_string": "private MotownRoutingKeyResolver resolver;",
"type": "MotownRoutingKeyResolver",
"var_name": "resolver"
},
{
"declarator": "routingKeyPrefix",
"modifier": "private",
"origin... | {
"body": "@Test\n public void testResolveRoutingKeyCommunicationWithChargingStationEvent() {\n EventMessage message = new GenericEventMessage<>(new HardResetChargingStationRequestedEvent(CHARGING_STATION_ID, PROTOCOL, ROOT_IDENTITY_CONTEXT));\n\n String routingKey = resolver.resolveRoutingKey(messag... | {
"fields": [
{
"declarator": "ROUTING_KEY_PREFIX = \"io.motown.routingkeys.ocpp.soap.chargingstations.\"",
"modifier": "private static final",
"original_string": "private static final String ROUTING_KEY_PREFIX = \"io.motown.routingkeys.ocpp.soap.chargingstations.\";",
"type": "String",
... | {
"body": "@Override\n public String resolveRoutingKey(EventMessage eventMessage) {\n if (eventMessage.getPayload() instanceof CommunicationWithChargingStationRequestedEvent) {\n CommunicationWithChargingStationRequestedEvent event = (CommunicationWithChargingStationRequestedEvent) eventMessage.g... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_254 | {
"fields": [
{
"declarator": "request",
"modifier": "private",
"original_string": "private HttpServletRequest request;",
"type": "HttpServletRequest",
"var_name": "request"
}
],
"file": "utils/rest/src/test/java/io/motown/utils/rest/response/ResponseBuilderTest.java",
"ide... | {
"body": "@Test\n public void testResponseBuilder() {\n ResponseBuilder.buildResponse(request, 0, 1, 0, Lists.<String>newArrayList());\n }",
"class_method_signature": "ResponseBuilderTest.testResponseBuilder()",
"constructor": false,
"full_signature": "@Test public void testResponseBuilder()",
"... | {
"fields": [
{
"declarator": "QUERY_STRING_FORMAT = \"?offset=%d&limit=%d\"",
"modifier": "private static final",
"original_string": "private static final String QUERY_STRING_FORMAT = \"?offset=%d&limit=%d\";",
"type": "String",
"var_name": "QUERY_STRING_FORMAT"
}
],
"file":... | {
"body": "private ResponseBuilder() {\n }",
"class_method_signature": "ResponseBuilder.ResponseBuilder()",
"constructor": true,
"full_signature": "private ResponseBuilder()",
"identifier": "ResponseBuilder",
"invocations": [],
"modifiers": "private",
"parameters": "()",
"return": "",
"signature... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_311 | {
"fields": [
{
"declarator": "eventHandler",
"modifier": "private",
"original_string": "private VasEventHandler eventHandler;",
"type": "VasEventHandler",
"var_name": "eventHandler"
},
{
"declarator": "chargingStationRepository",
"modifier": "@Autowired\n priv... | {
"body": "@Test\n public void chargingStationOpeningTimesAddedEvent() {\n chargingStationRepository.createOrUpdate(getRegisteredAndConfiguredChargingStation());\n eventHandler.handle(new ChargingStationOpeningTimesAddedEvent(CHARGING_STATION_ID, OPENING_TIMES, IDENTITY_CONTEXT));\n\n Charging... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(io.motown.vas.viewmodel.VasEventHandler.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(io.motown.vas.viewmodel.VasEventHandler.class);",
"type": "Logger"... | {
"body": "@EventHandler\n public void handle(ChargingStationCreatedEvent event) {\n LOG.info(\"Handling ChargingStationCreatedEvent\");\n\n String chargingStationId = event.getChargingStationId().getId();\n ChargingStation chargingStation = chargingStationRepository.findOne(chargingStationId)... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_192 | {
"fields": [
{
"declarator": "requestHandler",
"modifier": "private",
"original_string": "private Ocpp15RequestHandler requestHandler;",
"type": "Ocpp15RequestHandler",
"var_name": "requestHandler"
},
{
"declarator": "client",
"modifier": "private",
"origin... | {
"body": "@Test\n public void noTransactionStoppedIfTransactionIdIsIncorrectType() {\n requestHandler.handle(new StopTransactionRequestedEvent(CHARGING_STATION_ID, PROTOCOL, new UuidTransactionId(), ROOT_IDENTITY_CONTEXT), CORRELATION_TOKEN);\n\n verifyZeroInteractions(client);\n }",
"class_met... | {
"fields": [
{
"declarator": "PROTOCOL_IDENTIFIER = \"OCPPS15\"",
"modifier": "public static final",
"original_string": "public static final String PROTOCOL_IDENTIFIER = \"OCPPS15\";",
"type": "String",
"var_name": "PROTOCOL_IDENTIFIER"
},
{
"declarator": "ADD_ON_TYPE ... | {
"body": "@Override\n public void handle(ConfigurationItemsRequestedEvent event) {\n LOG.info(\"Handling ConfigurationItemsRequestedEvent \" + event.getChargingStationId());\n Map<String, String> configurationItemMap = chargingStationOcpp15Client.getConfiguration(event.getChargingStationId(), event.... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_468 | {
"fields": [],
"file": "domain/core-api/src/test/java/io/motown/domain/api/chargingstation/ConfigurationItemsReceivedEventTest.java",
"identifier": "ConfigurationItemsReceivedEventTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = UnsupportedOperationException.class)\n public void unsupportedOperationExceptionThrownWhenModifyingConfigurationItems() {\n new ConfigurationItemsReceivedEvent(CHARGING_STATION_ID, CONFIGURATION_ITEMS, REQUESTED_CONFIGURATION_KEYS, ROOT_IDENTITY_CONTEXT).getConfigurationItems().a... | {
"fields": [
{
"declarator": "chargingStationId",
"modifier": "@TargetAggregateIdentifier\n private final",
"original_string": "@TargetAggregateIdentifier\n private final ChargingStationId chargingStationId;",
"type": "ChargingStationId",
"var_name": "chargingStationId"
},... | {
"body": "public Set<ConfigurationItem> getConfigurationItems() {\n return configurationItems;\n }",
"class_method_signature": "ConfigurationItemsReceivedEvent.getConfigurationItems()",
"constructor": false,
"full_signature": "public Set<ConfigurationItem> getConfigurationItems()",
"identifier": "g... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_487 | {
"fields": [],
"file": "domain/utils/src/test/java/io/motown/domain/utils/axon/CorrelationUnitOfWorkListenerTest.java",
"identifier": "CorrelationUnitOfWorkListenerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void onEventRegisteredReturnsEventWithMetaData() {\n CorrelationToken token = new CorrelationToken();\n CommandMessage<AuthorizeCommand> command = new GenericCommandMessage<>(new AuthorizeCommand(CHARGING_STATION_ID, IDENTIFYING_TOKEN, NULL_USER_IDENTITY_CONTEXT)).withMetaDa... | {
"fields": [
{
"declarator": "correlationToken",
"modifier": "private final",
"original_string": "private final CorrelationToken correlationToken;",
"type": "CorrelationToken",
"var_name": "correlationToken"
}
],
"file": "domain/utils/src/main/java/io/motown/domain/utils/axo... | {
"body": "@Override\n public <T> EventMessage<T> onEventRegistered(UnitOfWork unitOfWork, EventMessage<T> event) {\n return event.withMetaData(Collections.singletonMap(CorrelationToken.KEY, correlationToken));\n }",
"class_method_signature": "CorrelationUnitOfWorkListener.onEventRegistered(UnitOfWork ... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_24 | {
"fields": [
{
"declarator": "resource",
"modifier": "private",
"original_string": "private ManufacturerResource resource;",
"type": "ManufacturerResource",
"var_name": "resource"
},
{
"declarator": "repository",
"modifier": "@Mock\n private",
"original_... | {
"body": "@Test\n public void testDeleteManufacturer() {\n Response response = resource.deleteManufacturer(anyLong());\n verify(repository).delete(anyLong());\n\n assertNotNull(response);\n assertEquals(Response.Status.OK.getStatusCode(), response.getStatus());\n }",
"class_method... | {
"fields": [
{
"declarator": "OFFSET_PARAMETER = \"offset\"",
"modifier": "private static final",
"original_string": "private static final String OFFSET_PARAMETER = \"offset\";",
"type": "String",
"var_name": "OFFSET_PARAMETER"
},
{
"declarator": "OFFSET_DEFAULT = \"0\... | {
"body": "@DELETE\n @Path(\"/{id: [0-9]+}\")\n public Response deleteManufacturer(@PathParam(\"id\") Long id) {\n domainService.deleteManufacturer(id);\n return Response.ok(id).build();\n }",
"class_method_signature": "ManufacturerResource.deleteManufacturer(@PathParam(\"id\") Long id)",
"... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
14305692_203 | {
"fields": [
{
"declarator": "requestHandler",
"modifier": "private",
"original_string": "private Ocpp15RequestHandler requestHandler;",
"type": "Ocpp15RequestHandler",
"var_name": "requestHandler"
},
{
"declarator": "client",
"modifier": "private",
"origin... | {
"body": "@Test\n public void testDataTransferEventWithResponseData() {\n String expectedResponse = \"some test data to transfer\";\n when(client.dataTransfer(CHARGING_STATION_ID, DATA_TRANSFER_MESSAGE)).thenReturn(new DataTransferRequestResult(RequestResult.SUCCESS, expectedResponse));\n\n r... | {
"fields": [
{
"declarator": "PROTOCOL_IDENTIFIER = \"OCPPS15\"",
"modifier": "public static final",
"original_string": "public static final String PROTOCOL_IDENTIFIER = \"OCPPS15\";",
"type": "String",
"var_name": "PROTOCOL_IDENTIFIER"
},
{
"declarator": "ADD_ON_TYPE ... | {
"body": "@Override\n public void handle(ConfigurationItemsRequestedEvent event) {\n LOG.info(\"Handling ConfigurationItemsRequestedEvent \" + event.getChargingStationId());\n Map<String, String> configurationItemMap = chargingStationOcpp15Client.getConfiguration(event.getChargingStationId(), event.... | {
"created": null,
"fork": null,
"fork_count": 11,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 14305692,
"size": 4944,
"stargazer_count": 37,
"stars": null,
"updates": null,
"url": "https://github.com/motown-io/motown"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.