auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private KeyAwareLockPromise acquireLocalLock(InvocationContext ctx, DataCommand command) throws InterruptedException { if (trace) log.tracef("acquireLocalLock"); final TxInvocationContext txContext = (TxInvocationContext) ctx; Object key = command.getKey(); txContext.addAffectedKey(key); <START> ((TxInvocationContext) ctx).getCacheTransaction().cleanupBackupLocksForKey(key); <END> return lockOrRegisterBackupLock(txContext, key, getLockTimeoutMillis(command)); }</code><technical_language>txContext</technical_language>

Target:
private KeyAwareLockPromise acquireLocalLock(InvocationContext ctx, DataCommand command) throws InterruptedException { if (trace) log.tracef("acquireLocalLock"); final TxInvocationContext txContext = (TxInvocationContext) ctx; Object key = command.getKey(); txContext.addAffectedKey(key); txContext.getCacheTransaction().removeBackupLock(key); return lockOrRegisterBackupLock(txContext, key, getLockTimeoutMillis(command)); }
Source:
<code>public void setUp() { VM vm = new VM(); vm.setId(vmId); <START> doReturn(vm).when(command).getVm(); <END> }</code><technical_language>simply "command.setVM(vm)"</technical_language>

Target:
public void setUp() { VM vm = new VM(); vm.setId(vmId); command.setVm(vm); }
Source:
<code>private BlockingConnection retrieveMQTTConnection(String host, String truststorePath, String truststorePass, String keystorePath, String keystorePass) throws Exception { MQTT mqtt = new MQTT(); mqtt.setConnectAttemptsMax(1); mqtt.setReconnectAttemptsMax(0); mqtt.setHost(host); mqtt.setUserName(fullUser); mqtt.setPassword(fullPass); <START> SSLContext sslContext = SSLContext.getInstance("TLS"); <END> sslContext.init(getKeyManager(keystorePath, keystorePass), getTrustManager(truststorePath, truststorePass), null); mqtt.setSslContext(sslContext); BlockingConnection connection = mqtt.blockingConnection(); connection.connect(); return connection; }</code><technical_language>SSLSupport class included in code-base generate SSLContext</technical_language>

Target:
private BlockingConnection retrieveMQTTConnection(String host, String truststorePath, String truststorePass, String keystorePath, String keystorePass) throws Exception { MQTT mqtt = new MQTT(); mqtt.setConnectAttemptsMax(1); mqtt.setReconnectAttemptsMax(0); mqtt.setHost(host); mqtt.setUserName(fullUser); mqtt.setPassword(fullPass); SSLContext sslContext = SSLSupport.createContext(TransportConstants.DEFAULT_KEYSTORE_PROVIDER, keystorePath, keystorePass, TransportConstants.DEFAULT_TRUSTSTORE_PROVIDER, truststorePath, truststorePass); mqtt.setSslContext(sslContext); BlockingConnection connection = mqtt.blockingConnection(); connection.connect(); return connection; }
Source:
<code>boolean resumeSession() { Session session = currentSession.get(); if (session == null) { startSession(false); return false; } else { <START> return session.isStopped.compareAndSet(true, false); <END> } }</code><technical_language>this cope case "The previous session ended in a crash. In other words, session 1 crash most." in project definition? check if unhandled errors</technical_language>

Target:
boolean resumeSession() { Session session = currentSession.get(); boolean resumed; if (session == null) { session = startSession(false); resumed = false; } else { resumed = session.isStopped.compareAndSet(true, false); } notifySessionStartObserver(session); return resumed; }
Source:
<code>public void onInfoWindowClick(Marker marker) { mCustomInfoWindowAdapter.cancelUpdates(); ObaTripStatus status = mMarkerData.getStatusFromMarker(marker); <START> String focusedStopId = mController.getFocusedStopId(); <END> if (mController != null && mController.getFocusedStopId != null) { TripDetailsActivity.start(mActivity, status.getActiveTripId(), focusedStopId); } else { TripDetailsActivity.start(mActivity, status.getActiveTripId()); } }</code><technical_language>@azizmb9494 Amazon implementation is slightly Google implementation. this happen if Gradle copy script execute properly building Google variant. try re-building this project of Google build variants (oba, agencyx, agencyy) re-generate Amazon code, push new version here</technical_language>

Target:
public void onInfoWindowClick(Marker marker) { mCustomInfoWindowAdapter.cancelUpdates(); ObaTripStatus status = mMarkerData.getStatusFromMarker(marker); if (mController != null && mController.getFocusedStopId() != null) { TripDetailsActivity.start(mActivity, status.getActiveTripId(), mController.getFocusedStopId()); } else { TripDetailsActivity.start(mActivity, status.getActiveTripId()); } }
Source:
<code>private static void log(String text) { if (debug) { <START> log(text); <END> } }</code><technical_language>If debug = true, log call recursively. Surely if(debug) { Log.d(text); }</technical_language>

Target:
private static void log(String text) { if (debug) { Log.d(TAG, text); } }
Source:
<code>public void testPartitionMultiget() throws Exception { List<String> keys = Lists.newArrayList(); for (int i = 0; i < 500; i++) { final String key = "key-" + i; keys.add(key); client.set(key, key, TTL); } final ListenableFuture<List<String>> resultsFuture = client.get(keys); final List<String> results = resultsFuture.get(); assertEquals(keys, results); <START> for (String key : keys) { <END> client.delete(key); } }</code><technical_language>Do deletes in a finally-block in case test fails</technical_language>

Target:
public void testPartitionMultiget() throws Exception { final List<String> keys = Lists.newArrayList(); for (int i = 0; i < 500; i++) { keys.add("key-" + i); } final List<ListenableFuture<MemcacheStatus>> futures = Lists.newArrayList(); try { for (final String key : keys) { futures.add(client.set(key, key, TTL)); } Futures.allAsList(futures).get(); final ListenableFuture<List<String>> resultsFuture = client.get(keys); final List<String> results = resultsFuture.get(); assertEquals(keys, results); } finally { futures.clear(); for (final String key : keys) { futures.add(client.delete(key)); } Futures.allAsList(futures).get(); } }
Source:
<code>public Function<Double, Double> differentiate(Function<Double, Double> function, Function<Double, Boolean> domain) { ArgChecker.notNull(function, "function"); ArgChecker.notNull(domain, "domain"); return new Function<Double, Double>() { @SuppressWarnings("synthetic-access") @Override public Double apply(Double x) { ArgChecker.notNull(x, "x"); ArgChecker.isTrue(domain.apply(x), "point is not in the function domain", x.toString()); <START> if (!domain.apply(x + eps)) { <END> if (!domain.apply(x - eps)) { throw new IllegalArgumentException("cannot get derivative at point " + x.toString()); } return (-function.apply(x - threeEps) + 4d * function.apply(x - twoEps) - 5d * function.apply(x - eps) + 2d * function.apply(x)) / epsSqr; } else { if (!domain.apply(x - eps)) { return (-function.apply(x + threeEps) + 4d * function.apply(x + twoEps) - 5d * function.apply(x + eps) + 2d * function.apply(x)) / epsSqr; } return (function.apply(x + eps) + function.apply(x - eps) - 2d * function.apply(x)) / epsSqr; } } }; }</code><technical_language>this test 'x + threeEps', this is maximum shift in formula</technical_language>

Target:
public Function<Double, Double> differentiate(Function<Double, Double> function, Function<Double, Boolean> domain) { ArgChecker.notNull(function, "function"); ArgChecker.notNull(domain, "domain"); return new Function<Double, Double>() { @SuppressWarnings("synthetic-access") @Override public Double apply(Double x) { ArgChecker.notNull(x, "x"); ArgChecker.isTrue(domain.apply(x), "point is not in the function domain", x.toString()); if (!domain.apply(x + threeEps)) { if (!domain.apply(x - threeEps)) { throw new IllegalArgumentException("cannot get derivative at point " + x.toString()); } return (-function.apply(x - threeEps) + 4d * function.apply(x - twoEps) - 5d * function.apply(x - eps) + 2d * function.apply(x)) / epsSqr; } else { if (!domain.apply(x - eps)) { return (-function.apply(x + threeEps) + 4d * function.apply(x + twoEps) - 5d * function.apply(x + eps) + 2d * function.apply(x)) / epsSqr; } return (function.apply(x + eps) + function.apply(x - eps) - 2d * function.apply(x)) / epsSqr; } } }; }
Source:
<code>public void snippetIsNotAffectedByXSS() { new ArticlePage().open("/File:Mala-mi.jpg"); FilePageObject filePage = new FilePageObject(); Assertion.assertTrue(filePage.doesSnippetContainXSS()); <START> AlertHandler xssAlert = new AlertHandler(); <END> Assertion.assertFalse(xssAlert.isAlertPresent(driver)); }</code><technical_language>I wrote above, need create instance of AlertHandler isAlertPresent() is a static method. invoke this: AlertHandler.isAlertPresent(driver)</technical_language>

Target:
public void snippetIsNotAffectedByXSS() { new ArticlePage().open("/File:Mala-mi.jpg"); FilePageObject filePage = new FilePageObject(); Assertion.assertTrue(filePage.doesSnippetContainXSS()); Assertion.assertFalse(AlertHandler.isAlertPresent(driver)); }
Source:
<code>public void permissionIndividuallyByRole(Permissionable parent, Permissionable permissionable, User user, Role role) throws DotDataException, DotSecurityException { List<Permission> newSetOfPermissions = getNewPermissions(parent, permissionable, user); <START> List<Permission> newSetOfPermissionsFiltered = new ArrayList<>(); <END> for (Permission newPermission : newSetOfPermissions) { Role newPermissionRole = APILocator.getRoleAPI().loadRoleById(newPermission.getRoleId()); if (!APILocator.getRoleAPI().isParentRole(role, newPermissionRole)) { newSetOfPermissionsFiltered.add(newPermission); } } if (!newSetOfPermissions.isEmpty()) { permissionFactory.assignPermissions(newSetOfPermissionsFiltered, permissionable); } }</code><technical_language>immutable</technical_language>

Target:
public void permissionIndividuallyByRole(Permissionable parent, Permissionable permissionable, User user, Role role) throws DotDataException, DotSecurityException { List<Permission> newSetOfPermissions = getNewPermissions(parent, permissionable, user); ImmutableList.Builder<Permission> immutablePermissionsFiltered = new Builder<>(); for (Permission newPermission : newSetOfPermissions) { Role newPermissionRole = APILocator.getRoleAPI().loadRoleById(newPermission.getRoleId()); if (!APILocator.getRoleAPI().isParentRole(role, newPermissionRole)) { immutablePermissionsFiltered.add(newPermission); } } final List<Permission> permissionsFiltered = immutablePermissionsFiltered.build(); if (!permissionsFiltered.isEmpty()) { permissionFactory.assignPermissions(permissionsFiltered, permissionable); } }
Source:
<code>public void setLevel(Level newLevel) throws SecurityException { super.setLevel(newLevel); <START> LogContext.checkAccess(); <END> loggerNode.setLevel(newLevel); }</code><technical_language>This moved LogContext.checkAccess()</technical_language>

Target:
public void setLevel(Level newLevel) throws SecurityException { LogContext.checkAccess(); super.setLevel(newLevel); loggerNode.setLevel(newLevel); }
Source:
<code>private static Optional<KubernetesSlave> resolveNode(@NonNull Jenkins jenkins, String namespace, String name) { return new ArrayList<>(jenkins.getNodes()).stream() <START> .filter(n -> n instanceof KubernetesSlave) .map(n -> (KubernetesSlave) n) <END> .filter(ks -> Objects.equals(ks.getNamespace(), namespace) && Objects.equals(ks.getPodName(), name)) .findFirst(); }</code><technical_language>suggestion .filter(KubernetesSlave.class::isInstance) .map(KubernetesSlave.class::cast) show Java 8 skills making code more legible</technical_language>

Target:
private static Optional<KubernetesSlave> resolveNode(@NonNull Jenkins jenkins, String namespace, String name) { return new ArrayList<>(jenkins.getNodes()).stream() .filter(KubernetesSlave.class::isInstance) .map(KubernetesSlave.class::cast) .filter(ks -> Objects.equals(ks.getNamespace(), namespace) && Objects.equals(ks.getPodName(), name)) .findFirst(); }
Source:
<code>private static void putKielBusStyle(String name, Style style) { <START> STYLES.put("AK____|B" + name, style); <END> STYLES.put("KIEL__|B" + name, style); }</code><technical_language>I if strip of for station board. Currently lots of departures duplicated. Is "KIEL" operator, is alias of "AK"</technical_language>

Target:
private static void putKielBusStyle(String name, Style style) { STYLES.put("AK|B" + name, style); STYLES.put("KIEL|B" + name, style); }
Source:
<code>private Path getArtifactPath(String basePath, String artifactPath) throws IOException { Path base = Paths.get(basePath); Path path = base.resolve(artifactPath); <START> if (!Files.exists(path.getParent())) <END> { Files.createDirectories(path.getParent()); } return path; }</code><technical_language>![CRITICAL](<LINK_0> null pointer dereference in org.carlspring.strongbox.providers.storage.FileSystemStorageProvider.getArtifactPath(String, String) due return of called method [![rule](<LINK_1>](<LINK_2></technical_language>

Target:
public static Path getArtifactPath(String basePath, String artifactPath) throws IOException { Path base = Paths.get(basePath); Path path = base.resolve(artifactPath); if (!Files.exists(path.getParent())) { Files.createDirectories(path.getParent()); } return path; }
Source:
<code>private List<DiskImage> initializeListForCopiedImage() { <START> List<DiskImage> clonedDiskImages = (ArrayList)getImages().clone(); <END> ArrayList<Guid> storageDomains = new ArrayList<>(); for (DiskImage clonedDiskImage : clonedDiskImages) { clonedDiskImage.setStorageIds(storageDomains); } return clonedDiskImages; }</code><technical_language>Yikes. new ArrayList<>(getImages())</technical_language>

Target:
private List<DiskImage> initializeListForCopiedImage() { List<DiskImage> clonedDiskImages = new ArrayList<>(getImages()); ArrayList<Guid> storageDomains = new ArrayList<>(); for (DiskImage clonedDiskImage : clonedDiskImages) { clonedDiskImage.setStorageIds(storageDomains); } return clonedDiskImages; }
Source:
<code>public IndexedRecord fillRecord(SyncStatus status, Schema schema, IndexedRecord record) { Boolean isDynamic = Boolean.FALSE; Schema currentSchema = schema; if (AvroUtils.isIncludeAllFields(schema)) { isDynamic = true; <START> currentSchema = MarketoSourceOrSink.mergeDynamicSchemas(record.getSchema(), flowSchema); <END> } IndexedRecord outRecord = new Record(currentSchema); for (Field f : currentSchema.getFields()) { switch (f.name()) { case FIELD_LEAD_ID: case FIELD_ID_SOAP: case FIELD_ID_REST: case FIELD_CAMPAIGN_ID: if (status.getId() == null) { try { outRecord.put(currentSchema.getField(f.name()).pos(), record.get(inputSchema.getField(f.name()).pos())); } catch (NullPointerException e) { LOG.error("Could not find field `{}` in schema : {}.", f.name(), e.getMessage()); } } else { outRecord.put(f.pos(), status.getId()); } break; case FIELD_SUCCESS: outRecord.put(f.pos(), Boolean.parseBoolean(status.getStatus())); break; case FIELD_STATUS: outRecord.put(f.pos(), status.getStatus()); break; case FIELD_ERROR_MSG: case FIELD_REASON: outRecord.put(f.pos(), status.getAvailableReason()); break; case FIELD_MARKETO_GUID: outRecord.put(f.pos(), status.getMarketoGUID()); break; case FIELD_SEQ: outRecord.put(f.pos(), status.getSeq()); break; default: if (isDynamic) { outRecord.put(currentSchema.getField(f.name()).pos(), record.get(f.pos())); } else { outRecord.put(currentSchema.getField(f.name()).pos(), record.get(inputSchema.getField(f.name()).pos())); } } } return outRecord; }</code><technical_language>I remember output record schema. Consider performance, merge record for record</technical_language>

Target:
public IndexedRecord fillRecord(SyncStatus status, Schema schema, IndexedRecord record) { Boolean isDynamic = Boolean.FALSE; Schema currentSchema = schema; if (AvroUtils.isIncludeAllFields(schema)) { isDynamic = true; if (dynamicSchema == null) { dynamicSchema = MarketoSourceOrSink.mergeDynamicSchemas(record.getSchema(), schema); } currentSchema = dynamicSchema; } IndexedRecord outRecord = new Record(currentSchema); for (Field f : currentSchema.getFields()) { switch (f.name()) { case FIELD_LEAD_ID: case FIELD_ID_SOAP: case FIELD_ID_REST: case FIELD_CAMPAIGN_ID: if (status.getId() == null) { try { outRecord.put(currentSchema.getField(f.name()).pos(), record.get(inputSchema.getField(f.name()).pos())); } catch (NullPointerException e) { LOG.error("Could not find field `{}` in schema : {}.", f.name(), e.getMessage()); } } else { outRecord.put(f.pos(), status.getId()); } break; case FIELD_SUCCESS: outRecord.put(f.pos(), Boolean.parseBoolean(status.getStatus())); break; case FIELD_STATUS: outRecord.put(f.pos(), status.getStatus()); break; case FIELD_ERROR_MSG: case FIELD_REASON: outRecord.put(f.pos(), status.getAvailableReason()); break; case FIELD_MARKETO_GUID: outRecord.put(f.pos(), status.getMarketoGUID()); break; case FIELD_SEQ: outRecord.put(f.pos(), status.getSeq()); break; default: if (isDynamic) { outRecord.put(currentSchema.getField(f.name()).pos(), record.get(f.pos())); } else { outRecord.put(currentSchema.getField(f.name()).pos(), record.get(inputSchema.getField(f.name()).pos())); } } } return outRecord; }
Source:
<code>public void testBooleanLiteralStats() { assertExpression("true") .equalTo(standardInputStatistics); assertExpression("false") .outputRowsCount(0.0) .symbolStats("x", SymbolStatsAssertion::empty) .symbolStats("y", SymbolStatsAssertion::empty) .symbolStats("z", SymbolStatsAssertion::empty) .symbolStats("leftOpen", SymbolStatsAssertion::empty) .symbolStats("rightOpen", SymbolStatsAssertion::empty) .symbolStats("emptyRange", SymbolStatsAssertion::empty) .symbolStats("unknownRange", SymbolStatsAssertion::empty); assertExpression("cast(null as boolean)") .outputRowsCount(0.0) .symbolStats("x", SymbolStatsAssertion::empty) .symbolStats("y", SymbolStatsAssertion::empty) .symbolStats("z", SymbolStatsAssertion::empty) .symbolStats("leftOpen", SymbolStatsAssertion::empty) .symbolStats("rightOpen", SymbolStatsAssertion::empty) .symbolStats("emptyRange", SymbolStatsAssertion::empty) .symbolStats("unknownRange", SymbolStatsAssertion::empty); <START> assertExpression("cast(null as boolean) AND sin(x) > x").outputRowsCountUnknown(); <END> assertExpression("cast(null as boolean) AND null") .outputRowsCount(0.0) .symbolStats("x", SymbolStatsAssertion::empty) .symbolStats("y", SymbolStatsAssertion::empty) .symbolStats("z", SymbolStatsAssertion::empty) .symbolStats("leftOpen", SymbolStatsAssertion::empty) .symbolStats("rightOpen", SymbolStatsAssertion::empty) .symbolStats("emptyRange", SymbolStatsAssertion::empty) .symbolStats("unknownRange", SymbolStatsAssertion::empty); }</code><technical_language>unknown? return outputRowsCount(0.0). @rschlussel</technical_language>

Target:
public void testBooleanLiteralStats() { assertExpression("true") .equalTo(standardInputStatistics); assertExpression("false") .outputRowsCount(0.0) .symbolStats("x", SymbolStatsAssertion::empty) .symbolStats("y", SymbolStatsAssertion::empty) .symbolStats("z", SymbolStatsAssertion::empty) .symbolStats("leftOpen", SymbolStatsAssertion::empty) .symbolStats("rightOpen", SymbolStatsAssertion::empty) .symbolStats("emptyRange", SymbolStatsAssertion::empty) .symbolStats("unknownRange", SymbolStatsAssertion::empty); assertExpression("cast(null as boolean) AND cast(null as boolean)") .outputRowsCount(0.0) .symbolStats("x", SymbolStatsAssertion::empty) .symbolStats("y", SymbolStatsAssertion::empty) .symbolStats("z", SymbolStatsAssertion::empty) .symbolStats("leftOpen", SymbolStatsAssertion::empty) .symbolStats("rightOpen", SymbolStatsAssertion::empty) .symbolStats("emptyRange", SymbolStatsAssertion::empty) .symbolStats("unknownRange", SymbolStatsAssertion::empty); assertExpression("cast(null as boolean) OR sin(x) > x").outputRowsCount(NaN); Expression expression = expression("cast(null as boolean) AND sin(x) > x"); RowExpression rowExpression = translator.translateAndOptimize(expression, standardTypes); PlanNodeStatsEstimate rowExpressionStatsEstimate = statsCalculator.filterStats(standardInputStatistics, rowExpression, session, standardTypes); PlanNodeStatsAssertion.assertThat(rowExpressionStatsEstimate).outputRowsCount(0.0); }
Source:
<code>public void commandDone(ICommandToken token, ICommandResult result) { if (token.getCommand() instanceof MICommand<?> && result instanceof MIInfo && ((MIInfo) result).isRunning()) { IDMContext ctx = ((MICommand<MIInfo>) token.getCommand()).getContext(); <START> IExecutionDMContext execDMCtx = (ctx instanceof IExecutionDMContext) ? (IExecutionDMContext) ctx <END> : DMContexts.getParentOfType(ctx, IExecutionDMContext.class); if (execDMCtx != null) { MIResultRecord rr = ((MIInfo) result).getMIOutput().getMIResultRecord(); if (rr != null) { fRunCommands.put(execDMCtx, Integer.valueOf(rr.getToken())); } } } }</code><technical_language>I this line replaced DMContexts.getAncestorOfType(ctx, IExecutionDMContext.class)</technical_language>

Target:
public void commandDone(ICommandToken token, ICommandResult result) { if (token.getCommand() instanceof MICommand<?> && result instanceof MIInfo && ((MIInfo) result).isRunning()) { IDMContext ctx = ((MICommand<MIInfo>) token.getCommand()).getContext(); IExecutionDMContext execDMCtx = DMContexts.getAncestorOfType(ctx, IExecutionDMContext.class); if (execDMCtx != null) { MIResultRecord rr = ((MIInfo) result).getMIOutput().getMIResultRecord(); if (rr != null) { fRunCommands.put(execDMCtx, Integer.valueOf(rr.getToken())); } } } }
Source:
<code>protected boolean checkIfLunDiskCanBeAdded() { LUNs lun = ((LunDisk) getParameters().getDiskInfo()).getLun(); switch (lun.getLunType()) { case UNKNOWN: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_HAS_NO_VALID_TYPE); case ISCSI: if (lun.getLunConnections() == null || lun.getLunConnections().isEmpty()) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_ISCSI_MISSING_CONNECTION_PARAMS); } for (StorageServerConnections conn : lun.getLunConnections()) { if (StringUtils.isEmpty(conn.getiqn()) || StringUtils.isEmpty(conn.getconnection()) || StringUtils.isEmpty(conn.getport())) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_ISCSI_MISSING_CONNECTION_PARAMS); } } break; } if (getDiskLunMapDao().getDiskIdByLunId(lun.getLUN_id()) != null) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_IS_ALREADY_IN_USE); } <START> if (getVm() != null) { <END> if (!isVmNotInPreviewSnapshot()) { return false; } if (!isVmNotLocked()) { return false; } } return true; }</code><technical_language>return getVm == null || ( isVmNotInPreviewSnapshot() && isVmNotLocked() ) )</technical_language>

Target:
protected boolean checkIfLunDiskCanBeAdded() { LUNs lun = ((LunDisk) getParameters().getDiskInfo()).getLun(); switch (lun.getLunType()) { case UNKNOWN: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_HAS_NO_VALID_TYPE); case ISCSI: if (lun.getLunConnections() == null || lun.getLunConnections().isEmpty()) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_ISCSI_MISSING_CONNECTION_PARAMS); } for (StorageServerConnections conn : lun.getLunConnections()) { if (StringUtils.isEmpty(conn.getiqn()) || StringUtils.isEmpty(conn.getconnection()) || StringUtils.isEmpty(conn.getport())) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_ISCSI_MISSING_CONNECTION_PARAMS); } } break; } if (getDiskLunMapDao().getDiskIdByLunId(lun.getLUN_id()) != null) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_IS_ALREADY_IN_USE); } if (getVm() != null && !(isVmNotInPreviewSnapshot() && isVmNotLocked())) { return false; } return true; }
Source:
<code>public void addOrderSetMember(OrderSetMember orderSetMember, Integer position) { if (orderSetMember == null || getOrderSetMembers().contains(orderSetMember)) return; position = position == null ? getOrderSetMembers().size() : position - 1; orderSetMember.setOrderSet(this); <START> getOrderSetMembers().add(position, orderSetMember); <END> }</code><technical_language>if position parameter <= 0? nice</technical_language>

Target:
public void addOrderSetMember(OrderSetMember orderSetMember, Integer position) { Integer listIndex = findListIndexForGivenPosition(position); orderSetMember.setOrderSet(this); getOrderSetMembers().add(listIndex, orderSetMember); }
Source:
<code>private Keyspace(String keyspaceName, boolean loadSSTables) { metadata = Schema.instance.getKeyspaceMetadata(keyspaceName); assert metadata != null : "Unknown keyspace " + keyspaceName; createReplicationStrategy(metadata); this.metric = new KeyspaceMetrics(this); this.viewManager = new ViewManager(this); for (TableMetadata cfm : metadata.tablesAndViews()) { <START> logger.info("Initializing {}.{}", getName(), cfm.name); <END> if (cfm.isVirtual()) initVirtualCf(Schema.instance.getTableMetadataRef(cfm.id)); else initCf(Schema.instance.getTableMetadataRef(cfm.id), loadSSTables); } this.viewManager.reload(false); }</code><technical_language>Change trace() info() intentional</technical_language>

Target:
private Keyspace(String keyspaceName, boolean loadSSTables) { metadata = Schema.instance.getKeyspaceMetadata(keyspaceName); assert metadata != null : "Unknown keyspace " + keyspaceName; createReplicationStrategy(metadata); this.metric = new KeyspaceMetrics(this); this.viewManager = new ViewManager(this); for (TableMetadata cfm : metadata.tablesAndViews()) { logger.trace("Initializing {}.{}", getName(), cfm.name); if (cfm.isVirtual()) initVirtualCf(Schema.instance.getTableMetadata(cfm.id)); else initCf(Schema.instance.getTableMetadataRef(cfm.id), loadSSTables); } this.viewManager.reload(false); }
Source:
<code>public void typeInLinkInput(String text) { waitForElementVisibleByElement(linkInput); <START> waitForElementClickableByElement(linkInput); <END> linkInput.sendKeys(text); waitForElementNotVisibleByElement(inputPending); waitForValueToBePresentInElementsAttributeByElement(linkInput, "value", text); title.click(); }</code><technical_language>Double waiting. Consider one</technical_language>

Target:
public void typeInLinkInput(String text) { waitForDialogVisible(); waitForElementClickableByElement(linkInput); linkInput.sendKeys(text); waitForElementNotVisibleByElement(inputPending); waitForValueToBePresentInElementsAttributeByElement(linkInput, "value", text); title.click(); }
Source:
<code><START> public void entityReference(String entity) { <END> delegate.entityReference(entity); }</code><technical_language>assertOpenBlock(); here, a test fails</technical_language>

Target:
public void entityReference(String entity) { assertOpenBlock(); delegate.entityReference(entity); }
Source:
<code>public ObjectName createName(String type, String domain, String name) { try { ObjectName objectName; Hashtable<String, String> properties = new Hashtable<>(); properties.put("name", name); properties.put("type", type); objectName = new ObjectName(domain, properties); boolean retry = false; if (objectName.isDomainPattern()) { domain = ObjectName.quote(domain); retry = true; } if (objectName.isPropertyValuePattern("name")) { properties.put("name", ObjectName.quote(name)); retry = true; } if (objectName.isPropertyValuePattern("type")) { properties.put("type", ObjectName.quote(type)); <START> retry = true; <END> } if (retry) { objectName = new ObjectName(domain, properties); } return objectName; } catch (MalformedObjectNameException e) { try { return new ObjectName(domain, "name", ObjectName.quote(name)); } catch (MalformedObjectNameException e1) { LOGGER.warn("Unable to register {}", type, name, e1); throw new RuntimeException(e1); } } }</code><technical_language>I objectName = new ObjectName(domain, properties) is small enough warrant of of creating a retry variable control execution. I more clear do in branch</technical_language>

Target:
public ObjectName createName(String type, String domain, String name) { try { ObjectName objectName; Hashtable<String, String> properties = new Hashtable<>(); properties.put("name", name); properties.put("type", type); objectName = new ObjectName(domain, properties); if (objectName.isDomainPattern()) { domain = ObjectName.quote(domain); } if (objectName.isPropertyValuePattern("name")) { properties.put("name", ObjectName.quote(name)); } if (objectName.isPropertyValuePattern("type")) { properties.put("type", ObjectName.quote(type)); } objectName = new ObjectName(domain, properties); return objectName; } catch (MalformedObjectNameException e) { try { return new ObjectName(domain, "name", ObjectName.quote(name)); } catch (MalformedObjectNameException e1) { LOGGER.warn("Unable to register {}", type, name, e1); throw new RuntimeException(e1); } } }
Source:
<code>public TabModelProvider(EventBus eventBus, Provider<DefaultConfirmationPopupPresenterWidget> defaultConfirmPopupProvider) { this.eventBus = eventBus; this.popupHandler = new ModelBoundPopupHandler<M>(this, eventBus); this.popupHandler.setDefaultConfirmPopupProvider(defaultConfirmPopupProvider); eventBus.addHandler(UiCommonInitEvent.getType(), new UiCommonInitHandler() { @Override public void onUiCommonInit(UiCommonInitEvent event) { TabModelProvider.this.onCommonModelChange(); } }); eventBus.addHandler(CleanupModelEvent.getType(), new CleanupModelEvent.CleanupModelHandler() { @Override public void onCleanupModel(CleanupModelEvent event) { <START> if (getCommonModel() != null && getModel() != null) { <END> getModel().setEventBus(null); } } }); }</code><technical_language>In UserPortal, TabModelProvider#getCommonModel returns null UserPortal's ApplicationInit call CommonModelManager#init - CommonModel instance in UserPortal. This refactored this: if (hasModel() && handleItemsChangedEvent()) { ... } new method in TabModelProvider: /** * Returns {@code true} if model instance is this model provider. */ protected boolean hasModel() { return getCommonModel() != null && getModel() != null; } UserPortal-specific override in UserPortalDataBoundModelProvider: @Override protected boolean hasModel() { // call super, CommonModel in UserPortal return getModel() != null; }</technical_language>

Target:
public TabModelProvider(EventBus eventBus, Provider<DefaultConfirmationPopupPresenterWidget> defaultConfirmPopupProvider) { this.eventBus = eventBus; this.popupHandler = new ModelBoundPopupHandler<M>(this, eventBus); this.popupHandler.setDefaultConfirmPopupProvider(defaultConfirmPopupProvider); eventBus.addHandler(UiCommonInitEvent.getType(), new UiCommonInitHandler() { @Override public void onUiCommonInit(UiCommonInitEvent event) { TabModelProvider.this.onCommonModelChange(); } }); eventBus.addHandler(CleanupModelEvent.getType(), new CleanupModelEvent.CleanupModelHandler() { @Override public void onCleanupModel(CleanupModelEvent event) { if (hasModel()) { getModel().setEventBus(null); } } }); }
Source:
<code>public void start() { try { if (!stateMachine.transitionToRunning()) { return; } ListenableFuture<?> future = task.execute(statement, transactionManager, metadata, accessControl, stateMachine, parameters); Futures.addCallback(future, new FutureCallback<Object>() { @Override public void onSuccess(@Nullable Object result) { stateMachine.transitionToFinishing(); } @Override public void onFailure(Throwable throwable) { fail(throwable); } }); } catch (Throwable e) { fail(e); <START> if (!(e instanceof RuntimeException)) { <END> throw e; } } }</code><technical_language>do want re-throw checked exception? artifact</technical_language>

Target:
public void start() { try { if (!stateMachine.transitionToRunning()) { return; } ListenableFuture<?> future = task.execute(statement, transactionManager, metadata, accessControl, stateMachine, parameters); Futures.addCallback(future, new FutureCallback<Object>() { @Override public void onSuccess(@Nullable Object result) { stateMachine.transitionToFinishing(); } @Override public void onFailure(Throwable throwable) { fail(throwable); } }); } catch (Throwable e) { fail(e); throwIfInstanceOf(e, Error.class); } }
Source:
<code>public void added(Provider<E> provider, E element) { elementWriteLock.lock(); try { final Collection<E> providerElements = providerToElements.get(provider); if (providerElements == null) { <START> logger.warn("Cannot add an element should added for an unknown provider."); <END> return; } if (!added(provider, element, providerElements)) { return; } } finally { elementWriteLock.unlock(); } notifyListenersAboutAddedElement(element); }</code><technical_language>suggestion logger.warn("Cannot add key '{}' add. Provider '{}' unknown.", element.getClass().getSimpleName(), element.getUID(), provider.getClass().getSimpleName());</technical_language>

Target:
public void added(Provider<E> provider, E element) { elementWriteLock.lock(); try { final Collection<E> providerElements = providerToElements.get(provider); if (providerElements == null) { logger.warn("Cannot add \"{}\" with key \"{}\". Provider \"{}\" unknown.", element.getClass().getSimpleName(), element.getUID(), provider.getClass().getSimpleName()); return; } if (!added(provider, element, providerElements)) { return; } } finally { elementWriteLock.unlock(); } notifyListenersAboutAddedElement(element); }
Source:
<code>private void cleanupExpiredInFlightRequests() { Iterator<Map.Entry<Integer, ChunkPutRequestInfo>> inFlightRequestsIterator = correlationIdToChunkPutRequestInfo.entrySet().iterator(); while (inFlightRequestsIterator.hasNext()) { Map.Entry<Integer, ChunkPutRequestInfo> entry = inFlightRequestsIterator.next(); if (time.milliseconds() - entry.getValue().getStartTimeMs() > routerConfig.routerRequestTimeoutMs) { operationTracker.onResponse(entry.getValue().replicaId, false); chunkException = new RouterException("Timed out waiting for responses", RouterErrorCode.OperationTimedOut); <START> ReplicaId replica = entry.getValue().replicaId; <END> DataNodeId dataNodeId = replica.getDataNodeId(); NonBlockingRouterMetrics.NodeLevelMetrics dataNodeBasedMetrics = routerMetrics.getDataNodeBasedMetrics(dataNodeId); dataNodeBasedMetrics.putRequestTimeoutCount.inc(); dataNodeBasedMetrics.putRequestErrorCount.inc(); dataNodeBasedMetrics.countError(RouterErrorCode.OperationTimedOut); inFlightRequestsIterator.remove(); } else { break; } } }</code><technical_language>is this variable for</technical_language>

Target:
private void cleanupExpiredInFlightRequests() { Iterator<Map.Entry<Integer, ChunkPutRequestInfo>> inFlightRequestsIterator = correlationIdToChunkPutRequestInfo.entrySet().iterator(); while (inFlightRequestsIterator.hasNext()) { Map.Entry<Integer, ChunkPutRequestInfo> entry = inFlightRequestsIterator.next(); if (time.milliseconds() - entry.getValue().startTimeMs > routerConfig.routerRequestTimeoutMs) { operationTracker.onResponse(entry.getValue().replicaId, false); chunkException = new RouterException("Timed out waiting for responses", RouterErrorCode.OperationTimedOut); NonBlockingRouterMetrics.NodeLevelMetrics dataNodeBasedMetrics = routerMetrics.getDataNodeBasedMetrics(entry.getValue().replicaId.getDataNodeId()); dataNodeBasedMetrics.putRequestErrorCount.inc(); inFlightRequestsIterator.remove(); } else { break; } } }
Source:
<code>@Override public void perform() { if (input != parent.getInput(i)) { input = (CascadeRelSubset) parent.getInput(i); tasks.push(this); tasks.push( new OptimizeGroup(input, upper, !(parent instanceof AbstractConverter))); return; } if (context == null) { return; } RelOptCost winner = input.getWinner(); if (winner == null) { context.lowerBoundSum = infCost; return; } if (context.lowerBoundSum != null && context.lowerBoundSum != infCost) { context.lowerBoundSum = context. lowerBoundSum.minus(context.lowerBounds.get(i)); <START> context.lowerBoundSum = context.lowerBoundSum.plus(winner); <END> context.lowerBounds.set(i, winner); } }</code><technical_language>Is test for it</technical_language>

Target:
@Override public void perform() { if (input != parent.getInput(i)) { input = (CascadeRelSubset) parent.getInput(i); tasks.push(this); tasks.push( new OptimizeGroup(input, upper, !(parent instanceof AbstractConverter))); return; } if (context == null) { return; } RelOptCost winner = input.getWinnerCost(); if (winner == null) { context.lowerBoundSum = infCost; return; } if (context.lowerBoundSum != null && context.lowerBoundSum != infCost) { context.lowerBoundSum = context. lowerBoundSum.minus(context.lowerBounds.get(i)); context.lowerBoundSum = context.lowerBoundSum.plus(winner); context.lowerBounds.set(i, winner); } }
Source:
<code>public WebDriver switchToWindowWithTitle(String title) { PageObjectLogging.log("Switching windows", <START> "Switching to window with title: " + title, true); <END> return driver.switchTo().window(getTabWithTitle(title)); }</code><technical_language>Please String.format well</technical_language>

Target:
public WebDriver switchToWindowWithTitle(String title) { PageObjectLogging.log("Switching windows", String.format("Switching to window with title: %s", title), true); return driver.switchTo().window(getTabWithTitle(title)); }
Source:
<code>private AdminSearchPageData putFeedbackSessionLinkIntoMap(List<StudentAttributes> students, AdminSearchPageData data){ Logic logic = new Logic(); for(StudentAttributes student : students){ List<FeedbackSessionAttributes> feedbackSessions = logic.getFeedbackSessionsForCourse(student.course); for(FeedbackSessionAttributes fsa : feedbackSessions){ if(!fsa.isOpened()){ continue; } String submitUrl = new Url(Config.APP_URL + Const.ActionURIs.STUDENT_FEEDBACK_SUBMISSION_EDIT_PAGE) .withCourseId(student.course) .withSessionName(fsa.feedbackSessionName) .withRegistrationKey(StringHelper.encrypt(student.key)) .withStudentEmail(student.email) .toString(); if (data.studentfeedbackSessionLinksMap.get(student.getIdentificationString()) == null){ List<String> submitUtlList = new ArrayList<String>(); submitUtlList.add(submitUrl); data.studentfeedbackSessionLinksMap.put(student.getIdentificationString(), submitUtlList); } else { data.studentfeedbackSessionLinksMap.get(student.getIdentificationString()).add(submitUrl); } data.feedbackSeesionLinkToNameMap.put(submitUrl, fsa.feedbackSessionName); } } return data; <START> } <END></code><technical_language>Nesting level is a bit deep. if extract a method works session call method in a loop. OK if cannot</technical_language>

Target:
private AdminSearchPageData putFeedbackSessionLinkIntoMap(List<StudentAttributes> students, AdminSearchPageData data){ Logic logic = new Logic(); for(StudentAttributes student : students){ List<FeedbackSessionAttributes> feedbackSessions = logic.getFeedbackSessionsForCourse(student.course); for(FeedbackSessionAttributes fsa : feedbackSessions){ data = extractDataFromFeedbackSeesion(fsa, data, student); } } return data; }
Source:
<code>public List<HostAddress> getPreferredNodes(List<HostAddress> sortedCandidates) { if (getNodeSelectionStrategy() == SOFT_AFFINITY) { <START> return ImmutableList.of(sortedCandidates.get(abs(path.hashCode() % sortedCandidates.size()))); <END> } return addresses; }</code><technical_language>put addresses</technical_language>

Target:
public List<HostAddress> getPreferredNodes(List<HostAddress> sortedCandidates) { if (sortedCandidates == null || sortedCandidates.isEmpty()) { throw new RuntimeException("sortedCandidates is null or empty for HiveSplit"); } if (getNodeSelectionStrategy() == SOFT_AFFINITY) { return ImmutableList.of( sortedCandidates.get(path.hashCode() % sortedCandidates.size()), sortedCandidates.get((path.hashCode() + 1) % sortedCandidates.size())); } return addresses; }
Source:
<code>TcpClientChannel(ClientChannelConfiguration cfg) throws ClientConnectionException, ClientAuthenticationException { validateConfiguration(cfg); try { sock = createSocket(cfg); out = sock.getOutputStream(); in = sock.getInputStream(); <START> GridUnsafeDataInput dis = new GridUnsafeDataInput(); <END> dis.inputStream(in); dataInput = dis; } catch (IOException e) { throw new ClientConnectionException(e); } handshake(cfg.getUserName(), cfg.getUserPassword()); }</code><technical_language>benefits standard DataInputStream</technical_language>

Target:
TcpClientChannel(ClientChannelConfiguration cfg) throws ClientConnectionException, ClientAuthenticationException { validateConfiguration(cfg); try { sock = createSocket(cfg); out = sock.getOutputStream(); in = sock.getInputStream(); GridUnsafeDataInput dis = new GridUnsafeDataInput(); dis.inputStream(in); dataInput = dis; } catch (IOException e) { throw handleIOError("addr=" + cfg.getAddress(), e); } handshake(cfg.getUserName(), cfg.getUserPassword()); }
Source:
<code>public void verseEight() { <START> String expected = "This is the man all tattered and torn that kissed the maiden all forlorn that milked the cow with the crumpled horn that tossed the dog that worried the cat that killed the rat that ate the malt that lay in the house that Jack built."; <END> int verse = 8; assertEquals(expected, house.verse(verse)); }</code><technical_language>Some of lines a bit long - able break a couple of lines. This allow read more easily edited more easily too</technical_language>

Target:
public void verseEight() { String expected = "This is the man all tattered and torn\n" + "that kissed the maiden all forlorn\n" + "that milked the cow with the crumpled horn\n" + "that tossed the dog\n" + "that worried the cat\n" + "that killed the rat\n" + "that ate the malt\n" + "that lay in the house that Jack built."; int verse = 8; assertEquals(expected, house.verse(verse)); }
Source:
<code><START> public static Pair<Set<String>, Set<String>> determineProblematicNics(List<VdsNetworkInterface> interfaces, <END> List<Network> clusterNetworks) { Set<String> networks = new HashSet<String>(); Set<String> brokenNics = new HashSet<String>(); Map<String, Network> networksByName = NetworkUtils.networksByName(clusterNetworks); for (VdsNetworkInterface iface : interfaces) { if (isRequiredInterfaceDown(networksByName, interfaces, iface)) { brokenNics.add(NetworkUtils.stripVlan(iface)); networks.add(iface.getNetworkName()); } } return new Pair<Set<String>, Set<String>>(brokenNics, networks); }</code><technical_language>Is order important here? 2 collections correlate another</technical_language>

Target:
public static Map<String, Set<String>> determineProblematicNics(List<VdsNetworkInterface> interfaces, List<Network> clusterNetworks) { Map<String, Set<String>> brokenNicsToNetworks = new HashMap<String, Set<String>>(); Map<String, Network> networksByName = NetworkUtils.networksByName(clusterNetworks); for (VdsNetworkInterface iface : interfaces) { if (isRequiredInterfaceDown(networksByName, interfaces, iface)) { String baseNicName = NetworkUtils.stripVlan(iface); Set<String> networks = brokenNicsToNetworks.get(baseNicName); if (networks == null) { networks = new HashSet<String>(); brokenNicsToNetworks.put(baseNicName, networks); } networks.add(iface.getNetworkName()); } } return brokenNicsToNetworks; }
Source:
<code>public void destroyBlockingChannel(BlockingChannel blockingChannel) { rwlock.readLock().lock(); try { boolean changed = blockingChannelActiveConnections.remove(blockingChannel); if (!changed) { logger.error("Invalid connection being destroyed. " + "Channel does not belong to this queue. queue host port channel host port {}", host, port, blockingChannel.getRemoteHost(), blockingChannel.getRemotePort()); throw new IllegalArgumentException("Invalid connection. Channel does not belong to this queue"); } blockingChannel.disconnect(); <START> BlockingChannel channel = null; <END> if (portType == PortType.PLAINTEXT) { channel = new BlockingChannel(blockingChannel.getRemoteHost(), blockingChannel.getRemotePort(), config.connectionPoolReadBufferSizeBytes, config.connectionPoolWriteBufferSizeBytes, config.connectionPoolReadTimeoutMs, config.connectionPoolConnectTimeoutMs); } else if (portType == PortType.SSL) { channel = new SSLBlockingChannel(blockingChannel.getRemoteHost(), blockingChannel.getRemotePort(), config.connectionPoolReadBufferSizeBytes, config.connectionPoolWriteBufferSizeBytes, config.connectionPoolReadTimeoutMs, config.connectionPoolConnectTimeoutMs); } channel.connect(); logger.trace("Destroying connection and adding new connection for host port {}", host, port); blockingChannelAvailableConnections.add(channel); } catch (Exception e) { logger .error("Connection failure to remote host and port when destroying and recreating the connection", host, port); synchronized (lock) { numberOfConnections.decrementAndGet(); } } finally { rwlock.readLock().unlock(); } }</code><technical_language>put lines in a method? in multiple places</technical_language>

Target:
public void destroyBlockingChannel(BlockingChannel blockingChannel) { rwlock.readLock().lock(); try { boolean changed = blockingChannelActiveConnections.remove(blockingChannel); if (!changed) { logger.error("Invalid connection being destroyed. " + "Channel does not belong to this queue. queue host port channel host port {}", host, port.getPort(), blockingChannel.getRemoteHost(), blockingChannel.getRemotePort()); throw new IllegalArgumentException("Invalid connection. Channel does not belong to this queue"); } blockingChannel.disconnect(); BlockingChannel channel = getBlockingChannelBasedOnPortType(blockingChannel.getRemoteHost(), blockingChannel.getRemotePort()); channel.connect(); logger.trace("Destroying connection and adding new connection for host port {}", host, port.getPort()); blockingChannelAvailableConnections.add(channel); } catch (Exception e) { logger .error("Connection failure to remote host and port when destroying and recreating the connection", host, port.getPort()); synchronized (lock) { numberOfConnections.decrementAndGet(); } } finally { rwlock.readLock().unlock(); } }
Source:
<code>public ProfileGenericDataAsyncResponse getProfileGenericData( @OrganisationIdentification final String organisationIdentification, @RequestPayload final ProfileGenericDataRequest request, @MessagePriority final String messagePriority, @ResponseUrl final String responseUrl, @ScheduleTime final String scheduleTime) throws OsgpException { LOGGER.debug("Incoming ProfileGenericDataRequest for meter: {}.", request.getDeviceIdentification()); ProfileGenericDataAsyncResponse response = null; try { final com.alliander.osgp.domain.core.valueobjects.smartmetering.ProfileGenericDataRequest dataRequest = this.monitoringMapper .map(request, com.alliander.osgp.domain.core.valueobjects.smartmetering.ProfileGenericDataRequest.class); int msgPrio = MessagePriorityEnum.getMessagePriority(messagePriority); final String correlationUid = this.monitoringService.enqueueProfileGenericDataRequestData( organisationIdentification, request.getDeviceIdentification(), dataRequest, msgPrio, this.monitoringMapper.map(scheduleTime, Long.class)); response = new ProfileGenericDataAsyncResponse(); response.setCorrelationUid(correlationUid); response.setDeviceIdentification(request.getDeviceIdentification()); this.responseUrlService.saveResponseUrlIfNeeded(correlationUid, responseUrl); } catch (final Exception e) { <START> LOGGER.error("Exception: while requesting meter reads for device: for organisation {}.", <END> new Object[] { e.getMessage(), request.getDeviceIdentification(), organisationIdentification }, e); this.handleException(e); } return response; }</code><technical_language>Incorrect log message</technical_language>

Target:
public ProfileGenericDataAsyncResponse getProfileGenericData( @OrganisationIdentification final String organisationIdentification, @RequestPayload final ProfileGenericDataRequest request, @MessagePriority final String messagePriority, @ResponseUrl final String responseUrl, @ScheduleTime final String scheduleTime) throws OsgpException { LOGGER.debug("Incoming ProfileGenericDataRequest for meter: {}.", request.getDeviceIdentification()); ProfileGenericDataAsyncResponse response = null; try { final com.alliander.osgp.domain.core.valueobjects.smartmetering.ProfileGenericDataRequest dataRequest = this.monitoringMapper .map(request, com.alliander.osgp.domain.core.valueobjects.smartmetering.ProfileGenericDataRequest.class); int msgPrio = MessagePriorityEnum.getMessagePriority(messagePriority); final String correlationUid = this.monitoringService.enqueueProfileGenericDataRequestData( organisationIdentification, request.getDeviceIdentification(), dataRequest, msgPrio, this.monitoringMapper.map(scheduleTime, Long.class)); response = new ProfileGenericDataAsyncResponse(); response.setCorrelationUid(correlationUid); response.setDeviceIdentification(request.getDeviceIdentification()); this.responseUrlService.saveResponseUrlIfNeeded(correlationUid, responseUrl); } catch (final Exception e) { LOGGER.error("Exception: while requesting profile generic data for device: for organisation {}.", new Object[] { e.getMessage(), request.getDeviceIdentification(), organisationIdentification }, e); this.handleException(e); } return response; }