auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code><START> private boolean hasUpServer(Guid clusterId) { <END> if (getClusterUtils().hasMultipleServers(clusterId) && getClusterUtils().getUpServer(clusterId) == null) { addCanDoActionMessage(String.format("$clusterName %1$s", getVdsGroup(clusterId).getname())); addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_NO_UP_SERVER_FOUND); return false; } return true; }</code><technical_language>send cluster object instead of id, need get db for name</technical_language>

Target:
private boolean hasUpServer(Guid clusterId) { if (getClusterUtils().hasMultipleServers(clusterId) && getClusterUtils().getUpServer(clusterId) == null) { addCanDoActionMessage(String.format("$clusterName %1$s", getTargetCluster().getname())); addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_NO_UP_SERVER_FOUND); return false; } return true; }
Source:
<code>public void validate(Object target, Errors errors) { ConsentSignature sig = (ConsentSignature) target; if (Strings.isNullOrEmpty(sig.getName())) { errors.rejectValue("name", CANNOT_BE_BLANK); } if (minAgeOfConsent > 0) { if (Strings.isNullOrEmpty(sig.getBirthdate())) { errors.rejectValue("birthdate", CANNOT_BE_BLANK); } else { LocalDate birthdate = parseBirthday(errors, sig.getBirthdate()); if (birthdate != null) { LocalDate now = LocalDate.now(); Period period = new Period(birthdate, now); if (period.getYears() < minAgeOfConsent) { String message = String.format(TOO_YOUNG, minAgeOfConsent); errors.rejectValue("birthdate", message); } } } } else if (sig.getBirthdate() != null) { <START> parseBirthday(errors, sig.getBirthdate()); <END> } if (sig.getSignedOn() <= 0L) { errors.rejectValue("signedOn", "must be a valid signature timestamp"); } String imageData = sig.getImageData(); String imageMimeType = sig.getImageMimeType(); if (imageData != null && imageData.isEmpty()) { errors.rejectValue("imageData", CANNOT_BE_EMPTY_STRING); } if (imageMimeType != null && imageMimeType.isEmpty()) { errors.rejectValue("imageMimeType", CANNOT_BE_EMPTY_STRING); } if (imageData != null ^ imageMimeType != null) { errors.reject("must specify imageData and imageMimeType if you specify either of them"); } }</code><technical_language>Instead of parsing birthdate in 2 branches, considering parsing birthdate once, minAge check, saving result need parse again</technical_language>

Target:
public void validate(Object target, Errors errors) { ConsentSignature sig = (ConsentSignature) target; if (Strings.isNullOrEmpty(sig.getName())) { errors.rejectValue("name", CANNOT_BE_BLANK); } if (Strings.isNullOrEmpty(sig.getBirthdate())) { if (minAgeOfConsent > 0) { errors.rejectValue("birthdate", CANNOT_BE_BLANK); } } else { LocalDate birthdate = parseBirthday(sig.getBirthdate()); if (birthdate == null) { errors.rejectValue("birthdate", "is invalid (required format: YYYY-MM-DD)"); } else if (minAgeOfConsent > 0) { LocalDate now = LocalDate.now(DateTimeZone.UTC); Period period = new Period(birthdate, now); if (period.getYears() < minAgeOfConsent) { String message = String.format(TOO_YOUNG, minAgeOfConsent); errors.rejectValue("birthdate", message); } } } if (sig.getSignedOn() <= 0L) { errors.rejectValue("signedOn", "must be a valid signature timestamp"); } String imageData = sig.getImageData(); String imageMimeType = sig.getImageMimeType(); if (imageData != null && imageData.isEmpty()) { errors.rejectValue("imageData", CANNOT_BE_EMPTY_STRING); } if (imageMimeType != null && imageMimeType.isEmpty()) { errors.rejectValue("imageMimeType", CANNOT_BE_EMPTY_STRING); } if (imageData != null ^ imageMimeType != null) { errors.reject("must specify imageData and imageMimeType if you specify either of them"); } }
Source:
<code>public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { if (bean instanceof IntegrationFlowBuilder.StandardIntegrationFlow) { return processStandardIntegrationFlow((IntegrationFlowBuilder.StandardIntegrationFlow) bean, beanName); } else if (bean instanceof IntegrationFlow) { <START> return processLambdaIntegrationFlow((IntegrationFlow) bean, beanName); <END> } return bean; }</code><technical_language>a lambda - implement concrete flow.define(). check bean.getClass().isAnonymousClass if needed, I suspect need a lambda not</technical_language>

Target:
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { if (bean instanceof IntegrationFlowBuilder.StandardIntegrationFlow) { return processStandardIntegrationFlow((IntegrationFlowBuilder.StandardIntegrationFlow) bean, beanName); } else if (bean instanceof IntegrationFlow) { return processIntegrationFlowImpl((IntegrationFlow) bean, beanName); } return bean; }
Source:
<code><START> public void loadingStudyWithoutSignedConsentSmsTemplateAddsADefault() { <END> Study study = TestUtils.getValidStudy(StudyServiceMockTest.class); study.setSignedConsentSmsTemplate(null); when(studyDao.getStudy("foo")).thenReturn(study); Study retStudy = service.getStudy("foo"); assertNotNull(retStudy.getAccountExistsSmsTemplate()); }</code><technical_language>tests for email template</technical_language>

Target:
public void loadingStudyWithoutSignedConsentSmsTemplateAddsADefault() { Study study = TestUtils.getValidStudy(StudyServiceMockTest.class); study.setSignedConsentSmsTemplate(null); when(studyDao.getStudy("foo")).thenReturn(study); Study retStudy = service.getStudy("foo"); assertNotNull(retStudy.getSignedConsentSmsTemplate()); }
Source:
<code>private boolean searchForDuplicatesWithExistingVmDevices(VmDevice vmDeviceToHotplug){ Map<String, String> addressMapToHotplug = XmlRpcStringUtils.string2Map(vmDeviceToHotplug.getAddress()); <START> if (!addressMapToHotplug.containsKey("slot")){ <END> return false; } List<VmDevice> allVmDevices = getVmDeviceDao().getVmDeviceByVmId(getVm().getId()); for (VmDevice vmDevice : allVmDevices) { if (vmDevice.getIsManaged() && !vmDeviceToHotplug.getId().equals(vmDevice.getId())){ Map<String, String> deviceAddressMap = XmlRpcStringUtils.string2Map(vmDevice.getAddress()); if(deviceAddressMap.equals(addressMapToHotplug)) { return true; } } } return false; }</code><technical_language>this check is needed</technical_language>

Target:
private boolean searchForDuplicatesWithExistingVmDevices(VmDevice vmDeviceToHotplug){ String deviceAddress = vmDeviceToHotplug.getAddress(); if (StringUtils.isEmpty(deviceAddress)){ return false; } Map<String, String> addressMapToHotplug = XmlRpcStringUtils.string2Map(deviceAddress); List<VmDevice> allVmDevices = getVmDeviceDao().getVmDeviceByVmId(getVm().getId()); for (VmDevice vmDevice : allVmDevices) { if (!vmDeviceToHotplug.getId().equals(vmDevice.getId())){ Map<String, String> deviceAddressMap = XmlRpcStringUtils.string2Map(vmDevice.getAddress()); if(deviceAddressMap.equals(addressMapToHotplug)) { return true; } } } return false; }
Source:
<code>public Object elementOfJsonPath(int index, String path) { List<Object> all = listJsonPathMatches(path); <START> return all.size() > 0 ? all.get(index) : null; <END> }</code><technical_language>suggestion return all.size() > index ? all.get(index) : null;</technical_language>

Target:
public Object elementOfJsonPath(int index, String path) { List<Object> all = listJsonPathMatches(path); return all.size() > index ? all.get(index) : null; }
Source:
<code>public void testLoadBasicYamlFile() { final DirectoryYamlFlowLoader loader = new DirectoryYamlFlowLoader(new Props()); loader.loadProjectFlow(this.project, ExecutionsTestUtil.getFlowDir(BASIC_FLOW_YAML_DIR)); <START> assertThat(loader.getErrors().size()).isEqualTo(0); <END> assertThat(loader.getFlowMap().size()).isEqualTo(1); assertThat(loader.getFlowMap().containsKey(BASIC_FLOW_1)).isTrue(); final Flow flow = loader.getFlowMap().get(BASIC_FLOW_1); assertThat(flow.getNodes().size()).isEqualTo(4); assertThat(loader.getEdgeMap().size()).isEqualTo(1); assertFlowEdgeNoError(loader, flow, 3, BASIC_FLOW_1); }</code><technical_language>previous suggestion consolidate duplicate code need test loader.getFlowMap().size() in @test method. Also, flow.getNodes().size(), flow.getErrors().size(). So, consolidate method a number of arguments</technical_language>

Target:
public void testLoadBasicYamlFile() { final DirectoryYamlFlowLoader loader = new DirectoryYamlFlowLoader(new Props()); loader.loadProjectFlow(this.project, ExecutionsTestUtil.getFlowDir(BASIC_FLOW_YAML_DIR)); checkFlowLoaderProperties(loader, 0, 1, 1); checkFlowProperties(loader, BASIC_FLOW_1, 0, 4, 3, null); }
Source:
<code>public <E> E get(String fieldName) { <START> proxyState.getRealm$realm().checkIfValid(); <END> long columnKey = proxyState.getRow$realm().getColumnKey(fieldName); if (proxyState.getRow$realm().isNull(columnKey)) { return null; } RealmFieldType type = proxyState.getRow$realm().getColumnType(columnKey); switch (type) { case BOOLEAN: return (E) Boolean.valueOf(proxyState.getRow$realm().getBoolean(columnKey)); case INTEGER: return (E) Long.valueOf(proxyState.getRow$realm().getLong(columnKey)); case FLOAT: return (E) Float.valueOf(proxyState.getRow$realm().getFloat(columnKey)); case DOUBLE: return (E) Double.valueOf(proxyState.getRow$realm().getDouble(columnKey)); case STRING: return (E) proxyState.getRow$realm().getString(columnKey); case BINARY: return (E) proxyState.getRow$realm().getBinaryByteArray(columnKey); case DATE: return (E) proxyState.getRow$realm().getDate(columnKey); case DECIMAL128: return (E) proxyState.getRow$realm().getDecimal128(columnKey); case OBJECT_ID: return (E) proxyState.getRow$realm().getObjectId(columnKey); case OBJECT: return (E) getObject(fieldName); case LIST: return (E) getList(fieldName); default: throw new IllegalStateException("Field type not supported: " + type); } }</code><technical_language>This impact more null values, unit tests for data types</technical_language>

Target:
public <E> E get(String fieldName) { proxyState.getRealm$realm().checkIfValid(); long columnKey = proxyState.getRow$realm().getColumnKey(fieldName); if (proxyState.getRow$realm().isNull(columnKey)) { return null; } RealmFieldType type = proxyState.getRow$realm().getColumnType(columnKey); switch (type) { case BOOLEAN: return (E) Boolean.valueOf(proxyState.getRow$realm().getBoolean(columnKey)); case INTEGER: return (E) Long.valueOf(proxyState.getRow$realm().getLong(columnKey)); case FLOAT: return (E) Float.valueOf(proxyState.getRow$realm().getFloat(columnKey)); case DOUBLE: return (E) Double.valueOf(proxyState.getRow$realm().getDouble(columnKey)); case STRING: return (E) proxyState.getRow$realm().getString(columnKey); case BINARY: return (E) proxyState.getRow$realm().getBinaryByteArray(columnKey); case DATE: return (E) proxyState.getRow$realm().getDate(columnKey); case OBJECT: return (E) getObject(fieldName); case LIST: return (E) getList(fieldName); default: throw new IllegalStateException("Field type not supported: " + type); } }
Source:
<code>public boolean updateApi(String apiName, APIData apiData) throws APIException{ final Lock lock = getLock(); try { lock.lock(); assertNameNotEmpty(apiName); API oldAPI = null; API api = APIFactory.createAPI(RestApiAdminUtils.retrieveAPIOMElement(apiData)); SynapseConfiguration synapseConfiguration = getSynapseConfiguration(); oldAPI = synapseConfiguration.getAPI(apiName); if (oldAPI != null) { oldAPI.destroy(); api.setFileName(oldAPI.getFileName()); } synapseConfiguration.updateAPI(apiName, api); api.init(getSynapseEnvironment()); CAppArtifactDataService cAppArtifactDataService = ConfigHolder.getInstance(). getcAppArtifactDataService(); if (cAppArtifactDataService.isArtifactDeployedFromCApp(getTenantId(), ServiceBusConstants.API_TYPE + File.separator + apiName)) { cAppArtifactDataService.setEdited(getTenantId(), ServiceBusConstants.API_TYPE + File.separator + apiName); } else { <START> MediationPersistenceManager pm = getMediationPersistenceManager(); <END> String fileName = api.getFileName(); pm.deleteItem(apiName, fileName, ServiceBusConstants.ITEM_TYPE_REST_API); pm.saveItem(apiName, ServiceBusConstants.ITEM_TYPE_REST_API); } return true; } catch (Exception e) { e.printStackTrace(); return false; } finally { lock.unlock(); } }</code><technical_language>Formatting corrected</technical_language>

Target:
public boolean updateApi(String apiName, APIData apiData) throws APIException{ final Lock lock = getLock(); try { lock.lock(); assertNameNotEmpty(apiName); API oldAPI = null; API api = APIFactory.createAPI(RestApiAdminUtils.retrieveAPIOMElement(apiData)); SynapseConfiguration synapseConfiguration = getSynapseConfiguration(); oldAPI = synapseConfiguration.getAPI(apiName); if (oldAPI != null) { oldAPI.destroy(); api.setFileName(oldAPI.getFileName()); } synapseConfiguration.updateAPI(apiName, api); api.init(getSynapseEnvironment()); CAppArtifactDataService cAppArtifactDataService = ConfigHolder.getInstance(). getcAppArtifactDataService(); String artifactName = getArtifactName(artifactType, apiName); if (cAppArtifactDataService.isArtifactDeployedFromCApp(getTenantId(), artifactName)) { cAppArtifactDataService.setEdited(getTenantId(), artifactName); } else { MediationPersistenceManager pm = getMediationPersistenceManager(); String fileName = api.getFileName(); pm.deleteItem(apiName, fileName, ServiceBusConstants.ITEM_TYPE_REST_API); pm.saveItem(apiName, ServiceBusConstants.ITEM_TYPE_REST_API); } return true; } catch (Exception e) { handleException(log, "Could not update API ", e); return false; } finally { lock.unlock(); } }
Source:
<code>public String getNextName(IServer server, DockerConnectionManager mgr) { <START> IDockerConnection[] cons = mgr.getConnections(); <END> ArrayList<String> names = new ArrayList<String>(); for( int i = 0; i < cons.length; i++ ) { names.add(cons[i].getName()); } final String nameBase = server.getName(); String name = nameBase; int count = 0; boolean done = false; while(!done) { if( names.contains(name)) { count++; name = nameBase + " (" + count + ")"; } else { done = true; } } return name; }</code><technical_language>List<String> names = Arrays.stream(cons).map(IDockerConnection::getName).collect(Collectors.toList())</technical_language>

Target:
public String getNextName(IServer server, DockerConnectionManager mgr) { IDockerConnection[] cons = mgr.getConnections(); List<String> names = Arrays.stream(cons).map(IDockerConnection::getName).collect(Collectors.toList()); final String nameBase = server.getName(); String name = nameBase; int count = 0; boolean done = false; while(!done) { if( names.contains(name)) { count++; name = nameBase + " (" + count + ")"; } else { done = true; } } return name; }
Source:
<code><START> private <T> T errorReplicating(Throwable t) { <END> log.unexpectedErrorReplicating(t); if (statisticsEnabled) replicationFailures.incrementAndGet(); return rethrowAsCacheException(t); }</code><technical_language>histograms on, IMO per-site statistics in core, extended-statistics (for sync backups too)</technical_language>

Target:
private <T> T errorReplicating(Throwable t) { CLUSTER.unexpectedErrorReplicating(t); if (statisticsEnabled) replicationFailures.incrementAndGet(); return rethrowAsCacheException(t); }
Source:
<code>public Long getBytes(Properties properties) { String value = getValue(properties); if (value.isEmpty()) { return null; } <START> return ConfigurationTypeHelper.getMemoryAsBytes(value); <END> }</code><technical_language>do checkState(type == PropertyType.TIMEDURATION)</technical_language>

Target:
public Long getBytes(Properties properties) { String value = getValue(properties); if (value.isEmpty()) { return null; } checkState(getType() == PropertyType.BYTES, "Invalid type getting bytes. Type must be " + PropertyType.BYTES + ", not " + getType()); return ConfigurationTypeHelper.getMemoryAsBytes(value); }
Source:
<code>public boolean isSupported(Node node) { if (node == null) { return false; } if(node.getLookup().lookupAll(BlackboardArtifact.class).size() > 0) { return false; } AbstractFile file = node.getLookup().lookup(AbstractFile.class); if (file != null && file.getSize() > 0 && file.isFile()) { <START> String acceptedMIMEType = NbBundle.getMessage(this.getClass(), <END> "DataContentViewerHTML.acceptedMIMEType"); if(file.getMIMEType() == null) { if(fileTypeDetector == null) return false; try { return fileTypeDetector.detect(file).equals(acceptedMIMEType); } catch (TskCoreException ex) { Exceptions.printStackTrace(ex); return false; } } else return file.getMIMEType().equals(acceptedMIMEType); } return false; }</code><technical_language>is this in bundle? file type detector is 100% reliable get html files tagged text/xml instead. viewable</technical_language>

Target:
public boolean isSupported(Node node) { if (node == null) { return false; } if(node.getLookup().lookupAll(BlackboardArtifact.class).size() > 0) { return false; } AbstractFile file = node.getLookup().lookup(AbstractFile.class); if (file != null && file.getSize() > 0 && file.isFile()) { if(file.getMIMEType() == null) { if(fileTypeDetector == null) return false; try { return fileTypeDetector.detect(file).equals(acceptedMIMEType); } catch (TskCoreException ex) { logger.log(Level.WARNING, "An error occurred while detecting a file" + " type in the HTML content viewer.", ex); return false; } } else return file.getMIMEType().equals(acceptedMIMEType); } return false; }
Source:
<code>public void start() { A.ensure(getSingleTupleExtractor() != null || getMultipleTupleExtractor() != null, "ZeroMq extractor."); log = getIgnite().log(); if (isStart) { <START> log.info("Attempted to start an already started ZeroMQ streamer"); <END> return; } isStart = true; ctx = ZMQ.context(ioThreads); socket = ctx.socket(socketType); socket.connect(addr); if (ZeroMqTypeSocket.SUB.getType() == socketType) socket.subscribe(topic); zeroMqExSrv = Executors.newFixedThreadPool(threadsCount); for (int i = 0; i < threadsCount; i++) { Callable<Boolean> task = new Callable<Boolean>() { @Override public Boolean call() { while (true) { if (ZeroMqTypeSocket.SUB.getType() == socketType) socket.recv(); addMessage(socket.recv()); } } }; zeroMqExSrv.submit(task); } }</code><technical_language>IMO, a warning</technical_language>

Target:
public void start() { A.ensure(getSingleTupleExtractor() != null || getMultipleTupleExtractor() != null, "ZeroMq extractor."); log = getIgnite().log(); if (isStarted) { log.warning("Attempted to start an already started ZeroMQ streamer"); return; } isStarted = true; zeroMqExSrv = Executors.newSingleThreadExecutor(); ctx = ZMQ.context(ioThreads); zeroMqExSrv.execute(new Runnable() { @Override public void run() { ZMQ.Socket socket = ctx.socket(socketType); socket.connect(addr); if (ZeroMqTypeSocket.SUB.getType() == socketType) socket.subscribe(topic); while (isStarted) { try { if (ZeroMqTypeSocket.SUB.getType() == socketType) socket.recv(0); addMessage(socket.recv(0)); } catch (ZMQException e) { if (e.getErrorCode () == ZMQ.Error.ETERM.getCode ()) { break; } } } socket.close(); } }); }
Source:
<code>public void testTxTimeoutOnResumed() throws Exception { executeTestForAllCaches(new CI2Exc<Ignite, IgniteCache<Integer, Integer>>() { @Override public void applyx(Ignite ignite, final IgniteCache<Integer, Integer> cache) throws Exception { for (TransactionIsolation isolation : TransactionIsolation.values()) { final Transaction tx = ignite.transactions().txStart(transactionConcurrency(), isolation, TX_TIMEOUT, 0); cache.put(1, 1); tx.suspend(); GridTestUtils.runAsync(() -> { tx.resume(); cache.put(1, 1); cache.put(2, 2); tx.suspend(); }).get(FUT_TIMEOUT); tx.resume(); cache.put(1, 1); cache.put(2, 2); cache.put(3, 3); tx.suspend(); U.sleep(TX_TIMEOUT + 100L); GridTestUtils.assertThrowsWithCause(new Callable<Object>() { @Override public Object call() throws Exception { tx.resume(); return null; } }, TransactionTimeoutException.class); <START> assertTrue(GridTestUtils.waitForCondition(new PA() { <END> @Override public boolean apply() { return tx.state() == ROLLED_BACK; } }, getTestTimeout())); assertEquals(ROLLED_BACK, tx.state()); assertFalse(cache.containsKey(1)); tx.close(); assertFalse(cache.containsKey(1)); assertFalse(cache.containsKey(2)); assertFalse(cache.containsKey(3)); } } }); }</code><technical_language>replaced lambda</technical_language>

Target:
public void testTxTimeoutOnResumed() throws Exception { executeTestForAllCaches(new CI2Exc<Ignite, IgniteCache<Integer, Integer>>() { @Override public void applyx(Ignite ignite, final IgniteCache<Integer, Integer> cache) throws Exception { for (TransactionIsolation isolation : TransactionIsolation.values()) { final Transaction tx = initTxWithTimeout(ignite, cache, isolation, true); while (tx.startTime() + TX_TIMEOUT >= U.currentTimeMillis()) U.sleep(100L); GridTestUtils.assertThrowsWithCause(tx::resume, TransactionTimeoutException.class); assertTrue(GridTestUtils.waitForCondition(() -> tx.state() == ROLLED_BACK, getTestTimeout())); assertEquals(ROLLED_BACK, tx.state()); assertFalse(cache.containsKey(1)); tx.close(); assertFalse(cache.containsKey(1)); assertFalse(cache.containsKey(2)); assertFalse(cache.containsKey(3)); } } }); }
Source:
<code>public void addAllReviewers(ChangeAttribute a, Change change) throws OrmException { Collection<Account.Id> reviewers = approvalsUtil.getReviewers(db.get(), change.getId()).values(); if (!reviewers.isEmpty()) { a.allReviewers = <START> Lists.newArrayList(); <END> for (Account.Id id : reviewers) { a.allReviewers.add(asAccountAttribute(id)); } } }</code><technical_language>newArrayListWithCapacity(reviewers.size())</technical_language>

Target:
public void addAllReviewers(ChangeAttribute a, Change change) throws OrmException { Collection<Account.Id> reviewers = approvalsUtil.getReviewers(db.get(), change.getId()).values(); if (!reviewers.isEmpty()) { a.allReviewers = Lists.newArrayListWithCapacity(reviewers.size()); for (Account.Id id : reviewers) { a.allReviewers.add(asAccountAttribute(id)); } } }
Source:
<code>public Mono<HttpResponse> process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) { logger.info("Setting host to {}", host); Mono<HttpResponse> result; final UrlBuilder urlBuilder = UrlBuilder.parse(context.getHttpRequest().getUrl()); try { context.getHttpRequest().setUrl(urlBuilder.setHost(host).toURL()); result = next.process(); } catch (MalformedURLException e) { <START> result = Mono.error(new RuntimeException("Please check the host URL: " + urlBuilder.setHost(host), e)); <END> } return result; }</code><technical_language>here. Error message include corrective actions. "Host URL is invalid" better</technical_language>

Target:
public Mono<HttpResponse> process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) { logger.info("Setting host to {}", host); Mono<HttpResponse> result; final UrlBuilder urlBuilder = UrlBuilder.parse(context.getHttpRequest().getUrl()); try { context.getHttpRequest().setUrl(urlBuilder.setHost(host).toURL()); result = next.process(); } catch (MalformedURLException e) { result = Mono.error(new RuntimeException(String.format("Host URL '%s' is invalid.", host), e)); } return result; }
Source:
<code>private void updateUIForOrientation(){ if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) { setActionBarVisible(false); findViewById(R.id.course_unit_nav_bar).setVisibility(View.GONE); pager.setPagingEnabled(false); environment.getSegment().trackCourseComponentViewed(selectedUnit.getId(), courseData.getCourse().getId()); } else { setActionBarVisible(true); findViewById(R.id.course_unit_nav_bar).setVisibility(View.VISIBLE); pager.setPagingEnabled(true); <START> environment.getSegment().trackCourseComponentViewed(selectedUnit.getId(), courseData.getCourse().getId()); <END> } }</code><technical_language>calls identical now, bring if else statement</technical_language>

Target:
private void updateUIForOrientation(){ if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) { setActionBarVisible(false); findViewById(R.id.course_unit_nav_bar).setVisibility(View.GONE); pager.setPagingEnabled(false); } else { setActionBarVisible(true); findViewById(R.id.course_unit_nav_bar).setVisibility(View.VISIBLE); pager.setPagingEnabled(true); } }
Source:
<code>private SSESpecification getSseSpecFromConfig() { final SSESpecification sseSpecification = new SSESpecification(); sseSpecification.setEnabled(conf.getBoolean(S3GUARD_DDB_TABLE_SSE_ENABLED, false)); <START> String cmk = conf.get(S3GUARD_DDB_TABLE_SSE_CMK); <END> if (cmk != null) { if (cmk.equals("alias/aws/dynamodb")) { LOG.warn("Ignoring default DynamoDB table KMS Master Key alias/aws/dynamodb in configuration"); } else { sseSpecification.setSSEType("KMS"); sseSpecification.setKMSMasterKeyId(cmk); } } return sseSpecification; }</code><technical_language>1. want getPassword here, s3autils 2. this is table creation, it</technical_language>

Target:
private SSESpecification getSseSpecFromConfig() { final SSESpecification sseSpecification = new SSESpecification(); boolean enabled = conf.getBoolean(S3GUARD_DDB_TABLE_SSE_ENABLED, false); if (!enabled) { return sseSpecification; } sseSpecification.setEnabled(Boolean.TRUE); String cmk = null; try { cmk = lookupPassword("", conf, S3GUARD_DDB_TABLE_SSE_CMK); } catch (IOException e) { LOG.error("Cannot retrieve " + S3GUARD_DDB_TABLE_SSE_CMK, e); } if (isEmpty(cmk)) { return sseSpecification; } if (SSE_DEFAULT_MASTER_KEY.equals(cmk)) { LOG.warn("Ignoring default DynamoDB table KMS Master Key {}", SSE_DEFAULT_MASTER_KEY); } else { sseSpecification.setSSEType("KMS"); sseSpecification.setKMSMasterKeyId(cmk); } return sseSpecification; }
Source:
<code>ConsoleLogger() { <START> _domains.addAll(EnumSet.allOf(LogDomain.class)); <END> }</code><technical_language>ALL, I add here</technical_language>

Target:
ConsoleLogger() { }
Source:
<code>public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.mark_all_as_read: new AlertDialog.Builder(getActivity()) .setMessage(R.string.mark_all_as_read_question) .setPositiveButton(R.string.mark_all_as_read, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { new MarkReadTask(null, null).schedule(); } }) .setNegativeButton(R.string.cancel, null) .show(); return true; case R.id.notification_filter_unread: mAll = false; mParticipating = false; item.setChecked(true); reloadNotification(); return true; case R.id.notification_filter_all: mAll = true; <START> mParticipating = false; <END> item.setChecked(true); reloadNotification(); return true; case R.id.notification_filter_participating: mAll = false; mParticipating = true; item.setChecked(true); reloadNotification(); return true; } return super.onOptionsItemSelected(item); }</code><technical_language>This shortened to: case R.id.notification_filter_unread: case R.id.notification_filter_all: case R.id.notification_filter_participating: mAll = itemId == R.id.notification_filter_all; mParticipating = itemId == R.id.notification_filter_participating; item.setChecked(true); reloadNotifications(); return true;</technical_language>

Target:
public boolean onOptionsItemSelected(MenuItem item) { int itemId = item.getItemId(); switch (itemId) { case R.id.mark_all_as_read: new AlertDialog.Builder(getActivity()) .setMessage(R.string.mark_all_as_read_question) .setPositiveButton(R.string.mark_all_as_read, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { new MarkReadTask(null, null).schedule(); } }) .setNegativeButton(R.string.cancel, null) .show(); return true; case R.id.notification_filter_unread: case R.id.notification_filter_all: case R.id.notification_filter_participating: mAll = itemId == R.id.notification_filter_all; mParticipating = itemId == R.id.notification_filter_participating; item.setChecked(true); reloadNotification(); return true; } return super.onOptionsItemSelected(item); }
Source:
<code>private static void deleteRosFiles() throws IOException { File rosFiles = new File(InstrumentationRegistry.getContext().getFilesDir(),"realm-object-server"); if (rosFiles.isDirectory()) { deleteFile(rosFiles); <START> } <END> }</code><technical_language>if rosFiles is a file</technical_language>

Target:
private static void deleteRosFiles() throws IOException { File rosFiles = new File(InstrumentationRegistry.getContext().getFilesDir(),"realm-object-server"); deleteFile(rosFiles); }
Source:
<code>public void testSuccessfulResponseWithInputVariable() { UserVariable inputVariable = new UserVariable(TEST_INPUTVARIABLE, TEST_URL); FormulaElement formulaElement = new FormulaElement( FormulaElement.ElementType.USER_VARIABLE, inputVariable.getName(), null); final String responseString = "Response"; Formula formula = Mockito.spy(new Formula(formulaElement)); testSprite.addUserVariable(userVariable); testSprite.addUserVariable(inputVariable); WebRequestAction action = (WebRequestAction) testSprite.getActionFactory().createWebRequestAction( testSprite, formula, userVariable ); action.setWebConnectionFactory(webConnectionFactory); when(StageActivity.stageListener.webConnectionHolder.addConnection(any())).thenReturn(true); try { doAnswer(invocation -> { Sprite sprite = invocation.getArgument(0); return String.valueOf(sprite.getUserVariable(TEST_INPUTVARIABLE).getValue()); }).when(formula).interpretString(any(Sprite.class)); } catch (InterpretationException e) { <START> fail("Formula could not be interpreted"); <END> return; } doAnswer(invocation -> { String url = invocation.getArgument(0); assertEquals(url, TEST_URL); return webConnection; }).when(webConnectionFactory).createWebConnection(anyString(), any()); doAnswer(invocation -> { action.onRequestFinished(responseString); return null; }).when(webConnection).sendWebRequest(); assertTrue(action.act(0f)); assertEquals(responseString, userVariable.getValue()); }</code><technical_language>Exception automatically test fail. please dont catch Excpetions test "fail". another test this failing triggered in a want test pass if Exception is thrown. Hint: Annotations @Test(expected = NullPointerException.class) this test pass if mentioned exception is thrown</technical_language>

Target:
public void testSuccessfulResponseWithInputVariable() throws InterpretationException { WebRequestAction action = setupTestSuccessfulResponseWithInputVariable(); assertTrue(action.act(0f)); }
Source:
<code>public Collection<Resource> getMandatoryResources() { if (currentlyResolvingMandatory) { <START> return new ArrayList<Resource>(currentlyResolving); <END> } return Collections.emptyList(); }</code><technical_language>Collections.unmodifiableList in getOptionalResources</technical_language>

Target:
public Collection<Resource> getMandatoryResources() { if (currentlyResolvingMandatory) { return Collections.unmodifiableList(currentlyResolving); } return Collections.emptyList(); }
Source:
<code>public Predicate<ChangeData> label(String name) throws QueryParseException, OrmException { Set<Account.Id> accounts = null; <START> String splitReviewer[] = name.split("~"); <END> name = splitReviewer[0]; if (splitReviewer.length > 2) { throw new QueryParseException("more than one user specified"); } else if (splitReviewer.length == 2) { accounts = parseAccount(splitReviewer[1]); } return new LabelPredicate(args.changeControlGenericFactory, args.userFactory, args.dbProvider, args.approvalTypes, name, accounts); }</code><technical_language>~ issues querying SSH. ~ character is rejected earlier a message like: message: line 1:19 viable alternative character '~' ideas this error is coming from? This happen UI (and I REST)</technical_language>

Target:
public Predicate<ChangeData> label(String name) throws QueryParseException, OrmException { Set<Account.Id> accounts = null; AccountGroup.UUID group = null; String splitReviewer[] = name.split(",", 2); name = splitReviewer[0]; if (splitReviewer.length == 2) { PredicateArgs lblArgs = new PredicateArgs(splitReviewer[1]); for (Map.Entry<String, String> pair : lblArgs.keyValue.entrySet()) { log.debug("pair.key={} pair.value={}", pair.getKey(), pair.getValue()); if (pair.getKey().equalsIgnoreCase(ARG_ID_USER)) { accounts = parseAccount(pair.getValue()); } else if (pair.getKey().equalsIgnoreCase(ARG_ID_GROUP)) { group = parseGroup(pair.getValue()).getUUID(); } else { log.error("Invalid argument identifier '{}'", pair.getKey()); throw new QueryParseException( "Invalid argument identifier '" + pair.getKey() + "'"); } } for (String value : lblArgs.positional) { log.debug("positional value = {}", value); if (accounts != null || group != null) { log.error("more than one user/group specified ({})", value); throw new QueryParseException("more than one user/group specified (" + value + ")"); } try { accounts = parseAccount(value); } catch (Exception e) { group = parseGroup(value).getUUID(); } } } return new LabelPredicate(args.projectCache, args.changeControlGenericFactory, args.userFactory, args.dbProvider, name, accounts, group); }
Source:
<code>public IamTokenManager(IamOptions options) { this.apiKey = options.getApiKey(); <START> this.url = (options.getUrl() != null) ? options.getUrl() : "<LINK_0>"; <END> this.userManagedAccessToken = options.getAccessToken(); tokenData = new IamToken(); }</code><technical_language>a constant for URL</technical_language>

Target:
public IamTokenManager(IamOptions options) { this.apiKey = options.getApiKey(); this.url = (options.getUrl() != null) ? options.getUrl() : DEFAULT_IAM_URL; this.userManagedAccessToken = options.getAccessToken(); tokenData = new IamToken(); }
Source:
<code>private void lockOtherVmNodes() { for (VNodeModel nodeModel : getUnassignedNumaNodes()) { if (!nodeModel.getVm().getId().equals(vm.getId())) { nodeModel.setLocked(true); } } <START> for (Set<VNodeModel> list : assignedNumaNodes.values()) { <END> for (VNodeModel nodeModel : list) { if (!nodeModel.getVm().getId().equals(vm.getId())) { nodeModel.setLocked(true); } } } }</code><technical_language>Sort of confusing a Set named 'list'</technical_language>

Target:
private void lockOtherVmNodes() { for (VNodeModel nodeModel : getUnassignedNumaNodes()) { if (!nodeModel.getVm().getId().equals(vm.getId())) { nodeModel.setLocked(true); } } for (Set<VNodeModel> nodeModelSet : assignedNumaNodes.values()) { for (VNodeModel nodeModel : nodeModelSet) { if (!nodeModel.getVm().getId().equals(vm.getId())) { nodeModel.setLocked(true); } } } }
Source:
<code>public void test_var_in_parameter_in_lambda() throws JavaModelException { this.workingCopies = new ICompilationUnit[1]; this.workingCopies[0] = getWorkingCopy( "/Completion/src/test/X.java", "package test;\n" + "public class X {\n" + " public static void main(String[] args) { \n" + " I lambda = (va ) -> {}; \n" + " lambda.apply(10); \n" + " }\n" + " }\n" + "interface I {\n" + "void apply(Integer a); \n" + "}\n"); CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); requestor.allowAllRequiredProposals(); String str = this.workingCopies[0].getSource(); String completeBehind = "(va"; int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); <START> System.out.println("requestor.getResults()=\n"+requestor.getResults()); <END> assertResults( "var[KEYWORD]{var, null, null, var, null, 49}", requestor.getResults()); }</code><technical_language>Please remove sysout</technical_language>

Target:
public void test_var_in_parameter_in_lambda() throws JavaModelException { this.workingCopies = new ICompilationUnit[1]; this.workingCopies[0] = getWorkingCopy( "/Completion/src/test/X.java", "package test;\n" + "public class X {\n" + " public static void main(String[] args) { \n" + " I lambda = (va ) -> {}; \n" + " lambda.apply(10); \n" + " }\n" + " }\n" + "interface I {\n" + "void apply(Integer a); \n" + "}\n"); CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); requestor.allowAllRequiredProposals(); String str = this.workingCopies[0].getSource(); String completeBehind = "(va"; int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); assertResults( "var[KEYWORD]{var, null, null, var, null, 49}", requestor.getResults()); }
Source:
<code>protected static InputStream openResource(String path) { if (path.startsWith("splunk_search:")) { path = path.substring("splunk_search:".length()); String[] pathComponents = path.split("/"); String searchType = pathComponents[0]; String outputMode = pathComponents[1]; String search = pathComponents[2]; Args resultsArgs = new Args("output_mode", outputMode); if (searchType.equals("blocking")) { Job job = service.getJobs().create( search, new Args("exec_mode", "blocking")); return job.getResults(resultsArgs); } else if (searchType.equals("oneshot")) { return service.oneshotSearch(search, resultsArgs); } else { throw new IllegalArgumentException( "Unrecognized search type: " + searchType); } } <START> InputStream input = PathPlaceHolder.class.getResourceAsStream(path); <END> assertNotNull("Could not open " + path, input); return input; }</code><technical_language>PathPlaceHolder named ResourceRoot similar</technical_language>

Target:
protected static InputStream openResource(String path) { if (path.startsWith("splunk_search:")) { path = path.substring("splunk_search:".length()); String[] pathComponents = path.split("/"); String searchType = pathComponents[0]; String outputMode = pathComponents[1]; String search = pathComponents[2]; Args resultsArgs = new Args("output_mode", outputMode); if (searchType.equals("blocking")) { Job job = service.getJobs().create( search, new Args("exec_mode", "blocking")); return job.getResults(resultsArgs); } else if (searchType.equals("oneshot")) { return service.oneshotSearch(search, resultsArgs); } else { throw new IllegalArgumentException( "Unrecognized search type: " + searchType); } } InputStream input = ResourceRoot.class.getResourceAsStream(path); assertNotNull("Could not open " + path, input); return input; }
Source:
<code>protected Object singleWriteResponse(InvocationContext ctx, DataWriteCommand cmd, Object returnValue) { BiasManager.Revocation revocation; if (!cmd.isSuccessful() || (revocation = biasManager.startRevokingRemoteBias(cmd.getKey(), ctx.getOrigin())) == null) { return returnValue; } else if (revocation.shouldRevoke()) { Address[] waitFor = revocation.biased().toArray(new Address[revocation.biased().size()]); sendRevokeBias(revocation.biased(), Collections.singleton(cmd.getKey()), cmd.getTopologyId(), cmd.getCommandInvocationId()) .whenComplete(revocation); return new BiasRevocationResponse(returnValue, waitFor); } else { return asyncValue(revocation.handleCompose(() -> { Object response = singleWriteResponse(ctx, cmd, returnValue); if (response == null) { return null; } else if (response instanceof InvocationStage) { return ((InvocationStage) response).toCompletableFuture(); } else { <START> return CompletableFuture.completedFuture(response); <END> } })); } }</code><technical_language>I avoid InvocationStage a CompletableFuture (mostly for perf reasons), do this: return asyncValue(revocation.toCompletionStage()) .andHandle(ctx, cmd, (rCtx, rCommand, rv, throwable) -> singleWriteResponse(rCtx, (DataWriteCommand) rCommand, returnValue));</technical_language>

Target:
protected Object singleWriteResponse(InvocationContext ctx, DataWriteCommand cmd, Object returnValue) { BiasManager.Revocation revocation; if (!cmd.isSuccessful() || (revocation = biasManager.startRevokingRemoteBias(cmd.getKey(), ctx.getOrigin())) == null) { return returnValue; } else if (revocation.shouldRevoke()) { Address[] waitFor = revocation.biased().toArray(new Address[revocation.biased().size()]); sendRevokeBias(revocation.biased(), Collections.singleton(cmd.getKey()), cmd.getTopologyId(), cmd.getCommandInvocationId()) .whenComplete(revocation); return new BiasRevocationResponse(returnValue, waitFor); } else { return asyncValue(revocation.toCompletionStage()).andHandle(ctx, cmd, (rCtx, rCommand, rv, throwable) -> singleWriteResponse(rCtx, (DataWriteCommand) rCommand, returnValue)); } }
Source:
<code>public DeltaBinaryPackingValuesWriter(int blockSizeInValues, int miniBlockNum, int slabSize, int pageSize, ByteBufferAllocator allocator) { this.config = new DeltaBinaryPackingConfig(blockSizeInValues, miniBlockNum); bitWidths = new int[config.miniBlockNumInABlock]; deltaBlockBuffer = new int[blockSizeInValues]; miniBlockByteBuffer = new byte[config.miniBlockSizeInValues * MAX_BITWIDTH]; <START> this.allocator = allocator; <END> baos = new CapacityByteArrayOutputStream(slabSize, pageSize, this.allocator); }</code><technical_language>field is</technical_language>

Target:
public DeltaBinaryPackingValuesWriter(int blockSizeInValues, int miniBlockNum, int slabSize, int pageSize, ByteBufferAllocator allocator) { this.config = new DeltaBinaryPackingConfig(blockSizeInValues, miniBlockNum); bitWidths = new int[config.miniBlockNumInABlock]; deltaBlockBuffer = new int[blockSizeInValues]; miniBlockByteBuffer = new byte[config.miniBlockSizeInValues * MAX_BITWIDTH]; baos = new CapacityByteArrayOutputStream(slabSize, pageSize, allocator); }
Source:
<code>public ParseResult filter(Content content, ParseResult parseResult, HTMLMetaTags metaTags, DocumentFragment doc) { Parse parse = parseResult.get(content.getUrl()); String url = content.getBaseUrl(); ArrayList<Outlink> tempOutlinks = new ArrayList<Outlink>(); String title = parse.getData().getTitle(); ParseStatus status = parse.getData().getStatus(); String text = parse.getText(); if (!filterParse(text)) { <START> LOG.info("ModelURLFilter: Page found irrelevent:: " + url); <END> LOG.info("Checking outlinks"); Outlink[] out = null; for (int i = 0; i < parse.getData().getOutlinks().length; i++) { LOG.info("ModelURLFilter: Outlink to check:: " + parse.getData().getOutlinks()[i].getToUrl()); if (filterUrl(parse.getData().getOutlinks()[i].getToUrl())) { tempOutlinks.add(parse.getData().getOutlinks()[i]); LOG.info("ModelURLFilter: found relevent"); } else { LOG.info("ModelURLFilter: found irrelevent"); } } out = new Outlink[tempOutlinks.size()]; for (int i = 0; i < tempOutlinks.size(); i++) { out[i] = tempOutlinks.get(i); } ParseData parseData = new ParseData(status, title, out, parse.getData() .getContentMeta(), parse.getData().getParseMeta()); parseResult.put(content.getUrl(), new ParseText(text), parseData); } else { LOG.info("ModelURLFilter: Page found relevent:: " + url); } return parseResult; }</code><technical_language>this ModelURLFilter, naive bayes htmlparser filter, please update</technical_language>

Target:
public ParseResult filter(Content content, ParseResult parseResult, HTMLMetaTags metaTags, DocumentFragment doc) { Parse parse = parseResult.get(content.getUrl()); String url = content.getBaseUrl(); ArrayList<Outlink> tempOutlinks = new ArrayList<Outlink>(); String text = parse.getText(); if (!filterParse(text)) { LOG.info("HtmlParseFilter: NaiveBayes: Page found irrelevent:: " + url); LOG.info("Checking outlinks"); Outlink[] out = null; for (int i = 0; i < parse.getData().getOutlinks().length; i++) { LOG.info("HtmlParseFilter: NaiveBayes: Outlink to check:: " + parse.getData().getOutlinks()[i].getToUrl()); if (filterUrl(parse.getData().getOutlinks()[i].getToUrl())) { tempOutlinks.add(parse.getData().getOutlinks()[i]); LOG.info("HtmlParseFilter: NaiveBayes: found relevent"); } else { LOG.info("HtmlParseFilter: NaiveBayes: found irrelevent"); } } out = new Outlink[tempOutlinks.size()]; for (int i = 0; i < tempOutlinks.size(); i++) { out[i] = tempOutlinks.get(i); } parse.getData().setOutlinks(out); } else { LOG.info("HtmlParseFilter: NaiveBayes: Page found relevent:: " + url); } return parseResult; }
Source:
<code>private static MethodNode createMethod(final int access, final String name, final String descriptor) { final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, access, name, descriptor, null, null); m.visitVarInsn(Opcodes.ILOAD, 2); m.visitInsn(Opcodes.ICONST_1); m.visitInsn(Opcodes.IAND); final Label label = new Label(); m.visitJumpInsn(Opcodes.IFEQ, label); <START> m.visitLdcInsn(42); <END> m.visitVarInsn(Opcodes.ISTORE, 1); m.visitLabel(label); m.visitVarInsn(Opcodes.ALOAD, 0); m.visitVarInsn(Opcodes.ILOAD, 1); m.visitMethodInsn(Opcodes.INVOKESPECIAL, "Target", "origin", "(I)V", false); m.visitInsn(Opcodes.RETURN); return m; }</code><technical_language>Creates a boxing warning in Eclipse. Please replace Integer.valueOf(42)</technical_language>

Target:
private static MethodNode createMethod(final int access, final String name, final String descriptor) { final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, access, name, descriptor, null, null); m.visitVarInsn(Opcodes.ILOAD, 2); m.visitInsn(Opcodes.ICONST_1); m.visitInsn(Opcodes.IAND); final Label label = new Label(); m.visitJumpInsn(Opcodes.IFEQ, label); m.visitLdcInsn(Integer.valueOf(42)); m.visitVarInsn(Opcodes.ISTORE, 1); m.visitLabel(label); m.visitVarInsn(Opcodes.ALOAD, 0); m.visitVarInsn(Opcodes.ILOAD, 1); m.visitMethodInsn(Opcodes.INVOKESPECIAL, "Target", "origin", "(I)V", false); m.visitInsn(Opcodes.RETURN); return m; }
Source:
<code>public void setClockConfiguration(final DeviceMessageMetadata deviceMessageMetadata, final SetClockConfigurationRequestData setClockConfigurationRequest) throws FunctionalException { LOGGER.info("setClockConfiguration for organisationIdentification: for deviceIdentification: {}", deviceMessageMetadata.getOrganisationIdentification(), deviceMessageMetadata.getDeviceIdentification()); final SmartMeter smartMeteringDevice = this.domainHelperService .findSmartMeter(deviceMessageMetadata.getDeviceIdentification()); <START> final SetClockConfigurationRequestDto keySetDto = this.configurationMapper.map(setClockConfigurationRequest, <END> SetClockConfigurationRequestDto.class); this.osgpCoreRequestMessageSender.send( new RequestMessage(deviceMessageMetadata.getCorrelationUid(), deviceMessageMetadata.getOrganisationIdentification(), deviceMessageMetadata.getDeviceIdentification(), smartMeteringDevice.getIpAddress(), keySetDto), deviceMessageMetadata.getMessageType(), deviceMessageMetadata.getMessagePriority(), deviceMessageMetadata.getScheduleTime()); }</code><technical_language>I keySetDto is a good variable name here</technical_language>

Target:
public void setClockConfiguration(final DeviceMessageMetadata deviceMessageMetadata, final SetClockConfigurationRequestData setClockConfigurationRequest) throws FunctionalException { LOGGER.info("setClockConfiguration for organisationIdentification: for deviceIdentification: {}", deviceMessageMetadata.getOrganisationIdentification(), deviceMessageMetadata.getDeviceIdentification()); final SmartMeter smartMeteringDevice = this.domainHelperService .findSmartMeter(deviceMessageMetadata.getDeviceIdentification()); final SetClockConfigurationRequestDto setClockConfigurationRequestDto = this.configurationMapper.map(setClockConfigurationRequest, SetClockConfigurationRequestDto.class); this.osgpCoreRequestMessageSender.send( new RequestMessage(deviceMessageMetadata.getCorrelationUid(), deviceMessageMetadata.getOrganisationIdentification(), deviceMessageMetadata.getDeviceIdentification(), smartMeteringDevice.getIpAddress(), setClockConfigurationRequestDto), deviceMessageMetadata.getMessageType(), deviceMessageMetadata.getMessagePriority(), deviceMessageMetadata.getScheduleTime()); }