auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public boolean vetoJobExecution(Trigger trigger, JobExecutionContext context) { <START> if (modeManager.getCurrentMode() == Mode.SUSPEND) { <END> log.debug("Pinsetter trigger listener detected SUSPEND mode, " + "vetoing job to be executed"); return true; } return false; }</code><technical_language>Is spec test this</technical_language>

Target:
public boolean vetoJobExecution(Trigger trigger, JobExecutionContext context) { if (modeManager.getLastCandlepinModeChange().getMode() == Mode.SUSPEND) { log.debug("Pinsetter trigger listener detected SUSPEND mode, " + "vetoing job to be executed"); return true; } return false; }
Source:
<code>public void onCompleted() { <START> while (true) { <END> final int s = state.get(); if (s == NOT_REQUESTED_NOT_COMPLETED) { if (state.compareAndSet(NOT_REQUESTED_NOT_COMPLETED, NOT_REQUESTED_COMPLETED)) { return; } } else if (s == REQUESTED_NOT_COMPLETED) { if (state.compareAndSet(REQUESTED_NOT_COMPLETED, REQUESTED_COMPLETED)) { emit(); return; } } else return; } }</code><technical_language>If == ABSENT is need interact backpressure logic a plain onCompleted request. In this case, check isUnsubscribed()</technical_language>

Target:
public void onCompleted() { if (last == ABSENT) { child.onCompleted(); return; } while (true) { final int s = state.get(); if (s == NOT_REQUESTED_NOT_COMPLETED) { if (state.compareAndSet(NOT_REQUESTED_NOT_COMPLETED, NOT_REQUESTED_COMPLETED)) { return; } } else if (s == REQUESTED_NOT_COMPLETED) { if (state.compareAndSet(REQUESTED_NOT_COMPLETED, REQUESTED_COMPLETED)) { emit(); return; } } else return; } }
Source:
<code>public void consumerPrefetch(TestContext context) throws Exception { int count = 3; int amountOfUnAckMessages = count - 1; Async prefetchDone = context.async(); client.basicQos(amountOfUnAckMessages, done -> prefetchDone.countDown()); prefetchDone.await(); Set<String> messages = createMessages(count); String queue = setupQueue(messages); String address = queue + ".address"; Async receivedExpectedNumberOfMessages = context.async(amountOfUnAckMessages); vertx.eventBus().consumer(address, msg -> { if (receivedExpectedNumberOfMessages.isCompleted()) { context.fail(); } else { receivedExpectedNumberOfMessages.countDown(); } }); client.basicConsume(queue, address, false, onSuccess(v -> { })); receivedExpectedNumberOfMessages.await(); <START> Thread.sleep(1000); <END> }</code><technical_language>good, Async#awaitSuccess instead</technical_language>

Target:
public void consumerPrefetch(TestContext context) throws Exception { int count = 3; int amountOfUnAckMessages = count - 1; Async prefetchDone = context.async(); client.basicQos(amountOfUnAckMessages, done -> prefetchDone.countDown()); prefetchDone.await(); Set<String> messages = createMessages(count); String queue = setupQueue(messages); String address = queue + ".address"; Async receivedExpectedNumberOfMessages = context.async(amountOfUnAckMessages); vertx.eventBus().consumer(address, msg -> { if (receivedExpectedNumberOfMessages.isCompleted()) { context.fail(); } else { receivedExpectedNumberOfMessages.countDown(); } }); client.basicConsume(queue, address, false, onSuccess(v -> { })); receivedExpectedNumberOfMessages.await(); Async async = context.async(); vertx.setTimer(1000, spent -> async.countDown()); }
Source:
<code>void updateEntityWithResponseSubclassAsync() { final String partitionKeyValue = testResourceNamer.randomName("APartitionKey", 20); final String rowKeyValue = testResourceNamer.randomName("ARowKey", 20); final int expectedStatusCode = 204; <START> SingleFieldEntity tableEntity = new SingleFieldEntity(partitionKeyValue, rowKeyValue); <END> tableEntity.setSubclassProperty("InitialValue"); tableClient.createEntity(tableEntity).block(TIMEOUT); tableEntity.setSubclassProperty("UpdatedValue"); StepVerifier.create(tableClient.updateEntityWithResponse(tableEntity, true, UpdateMode.MERGE)) .assertNext(response -> assertEquals(expectedStatusCode, response.getStatusCode())) .expectComplete() .verify(); StepVerifier.create(tableClient.getEntity(partitionKeyValue, rowKeyValue)) .assertNext(entity -> { final Map<String, Object> properties = entity.getProperties(); assertTrue(properties.containsKey("SubclassProperty")); assertEquals("UpdatedValue", properties.get("SubclassProperty")); }) .verifyComplete(); }</code><technical_language>nit; consistent of final</technical_language>

Target:
void updateEntityWithResponseSubclassAsync() { String partitionKeyValue = testResourceNamer.randomName("APartitionKey", 20); String rowKeyValue = testResourceNamer.randomName("ARowKey", 20); int expectedStatusCode = 204; SingleFieldEntity tableEntity = new SingleFieldEntity(partitionKeyValue, rowKeyValue); tableEntity.setSubclassProperty("InitialValue"); tableClient.createEntity(tableEntity).block(TIMEOUT); tableEntity.setSubclassProperty("UpdatedValue"); StepVerifier.create(tableClient.updateEntityWithResponse(tableEntity, true, UpdateMode.MERGE)) .assertNext(response -> assertEquals(expectedStatusCode, response.getStatusCode())) .expectComplete() .verify(); StepVerifier.create(tableClient.getEntity(partitionKeyValue, rowKeyValue)) .assertNext(entity -> { Map<String, Object> properties = entity.getProperties(); assertTrue(properties.containsKey("SubclassProperty")); assertEquals("UpdatedValue", properties.get("SubclassProperty")); }) .verifyComplete(); }
Source:
<code>public void releaseStore(Store<?, ?> resource) { Map.Entry<CachingTier.Provider, AuthoritativeTier.Provider> entry = providersMap.get(resource); if (entry == null) { throw new IllegalArgumentException("Given store is not managed by this provider : " + resource); } CacheStore cacheStore = (CacheStore) resource; <START> entry.getKey().releaseCachingTier(cacheStore.cachingTier()); <END> entry.getValue().releaseAuthoritativeTier(cacheStore.authoritativeTier); }</code><technical_language>explicit real ref</technical_language>

Target:
public void releaseStore(Store<?, ?> resource) { Map.Entry<CachingTier.Provider, AuthoritativeTier.Provider> entry = providersMap.get(resource); if (entry == null) { throw new IllegalArgumentException("Given store is not managed by this provider : " + resource); } CacheStore cacheStore = (CacheStore) resource; entry.getKey().releaseCachingTier(cacheStore.realCachingTier); entry.getValue().releaseAuthoritativeTier(cacheStore.authoritativeTier); }
Source:
<code>probeResult processClusters(long nowMs) { synchronized (critSect) { List<Cluster> clusters = new ArrayList<Cluster>(); clusters = computeClusters(clusters); if (clusters.isEmpty()) { if (probes_.size() >= kMaxProbePackets) <START> probes_.get(0); <END> return probeResult.kNoUpdate; } Cluster bestProbe = findBestProbe(clusters); if (bestProbe != null) { int probeBitrateBps = Math.min(bestProbe.getSendBitrateBps(), bestProbe .getRecvBitrateBps()); if (isBitrateImproving(probeBitrateBps)) { logger.warn("Probe successful, sent at " + bestProbe.getSendBitrateBps() + " bps, received at " + bestProbe.getRecvBitrateBps() + " bps. Mean send delta: " + bestProbe.sendMeanMs + " ms, mean recv delta: " + bestProbe.recvMeanMs + " ms, num probes: " + bestProbe.count); remoteRate.setEstimate(probeBitrateBps, nowMs); return probeResult.kBitrateUpdated; } } if (clusters.size() >= kExpectedNumberOfProbes) probes_.clear(); return probeResult.kNoUpdate; } }</code><technical_language>get() remove element list</technical_language>

Target:
private ProbeResult processClusters(long nowMs) { synchronized (critSect) { List<Cluster> clusters = new ArrayList<Cluster>(); computeClusters(clusters); if (clusters.isEmpty()) { if (probes_.size() >= kMaxProbePackets) probes_.remove(0); return ProbeResult.kNoUpdate; } Cluster bestProbe = findBestProbe(clusters); int probeBitrateBps = Math.min(bestProbe.getSendBitrateBps(), bestProbe .getRecvBitrateBps()); if (isBitrateImproving(probeBitrateBps)) { logger.warn("Probe successful, sent at " + bestProbe.getSendBitrateBps() + " bps, received at " + bestProbe.getRecvBitrateBps() + " bps. Mean send delta: " + bestProbe.sendMeanMs + " ms, mean recv delta: " + bestProbe.recvMeanMs + " ms, num probes: " + bestProbe.count); remoteRate.setEstimate(probeBitrateBps, nowMs); return ProbeResult.kBitrateUpdated; } if (clusters.size() >= kExpectedNumberOfProbes) probes_.clear(); return ProbeResult.kNoUpdate; } }
Source:
<code>public List<UserFromView> getTableFromView() { List<UserFromView> usersList = new LinkedList<>(); int pagination = 0; <START> driver.findElement(SHOW_10_ITEMS.getBy()).click(); <END> do { if (driver.findElements(AdministrationPageLocators.TABLE_ROWS.getBy()).size() <= 1) { return usersList; } else { List<WebElement> rowsList = driver.findElements(AdministrationPageLocators.TABLE_ROWS.getBy()); for (int j = 1; j < rowsList.size(); j++) { List<WebElement> cellsList = rowsList.get(j).findElements(AdministrationPageLocators.ROW_CELLS.getBy()); usersList.add(UserFromView.newBuilder() .firstName(cellsList.get(0).getText()) .lastName(cellsList.get(1).getText()) .login(cellsList.get(2).getText()) .role(cellsList.get(3).getText()) .region(cellsList.get(4).getText()) .build()); } } pagination++; clickNextButton(); } while (pagination < getQuantityOfTablePages()); clickFirstButton(); return usersList; }</code><technical_language>palka - a wrapper click() method</technical_language>

Target:
public List<UserFromView> getTableFromView() { List<UserFromView> usersList = new LinkedList<>(); int pagination = 0; click(USERS_LIST_RESIZE_LINK); do { if (driver.findElements(AdministrationPageLocators.TABLE_ROWS.getBy()).size() <= 1) { return usersList; } else { List<WebElement> rowsList = driver.findElements(AdministrationPageLocators.TABLE_ROWS.getBy()); for (int j = 1; j < rowsList.size(); j++) { List<WebElement> cellsList = rowsList.get(j).findElements(AdministrationPageLocators.ROW_CELLS.getBy()); usersList.add(UserFromView.newBuilder() .firstName(cellsList.get(0).getText()) .lastName(cellsList.get(1).getText()) .login(cellsList.get(2).getText()) .role(cellsList.get(3).getText()) .region(cellsList.get(4).getText()) .build()); } } pagination++; clickNextButton(); } while (pagination < getQuantityOfTablePages()); clickFirstButton(); return usersList; }
Source:
<code>public static void SET_PURGE_DELETED_ROWS (String schemaName, String tableName, String enable) throws Exception{ <START> schemaName = schemaName.toUpperCase(); <END> tableName = tableName.toUpperCase(); LanguageConnectionContext lcc = ConnectionUtil.getCurrentLCC(); TransactionController tc = lcc.getTransactionExecute(); DataDictionary dd = lcc.getDataDictionary(); dd.startWriting(lcc); SchemaDescriptor sd = dd.getSchemaDescriptor(schemaName, tc, true); if (sd == null) { throw StandardException.newException(SQLState.LANG_SCHEMA_DOES_NOT_EXIST, schemaName); } TableDescriptor td = dd.getTableDescriptor(tableName, sd, tc); if (td == null) { throw StandardException.newException(SQLState.TABLE_NOT_FOUND, tableName); } DDLMessage.DDLChange ddlChange = ProtoUtil.createAlterTable(((SpliceTransactionManager) tc).getActiveStateTxn().getTxnId(), (BasicUUID) td.getUUID()); DependencyManager dm = dd.getDependencyManager(); dm.invalidateFor(td, DependencyManager.ALTER_TABLE, lcc); tc.prepareDataDictionaryChange(DDLUtils.notifyMetadataChange(ddlChange)); boolean b = "TRUE".compareToIgnoreCase(enable) == 0; td.setPurgeDeletedRows(b); dd.dropTableDescriptor(td, sd, tc); dd.addDescriptor(td, sd, DataDictionary.SYSTABLES_CATALOG_NUM, false, tc, false); }</code><technical_language>EngineUtils.validateSchemat()/validateTable() instead, deal quoted names. This needed in other procedures here</technical_language>

Target:
public static void SET_PURGE_DELETED_ROWS (String schemaName, String tableName, String enable) throws Exception{ schemaName = EngineUtils.validateSchema(schemaName); tableName = EngineUtils.validateTable(tableName); LanguageConnectionContext lcc = ConnectionUtil.getCurrentLCC(); TransactionController tc = lcc.getTransactionExecute(); DataDictionary dd = lcc.getDataDictionary(); dd.startWriting(lcc); SchemaDescriptor sd = dd.getSchemaDescriptor(schemaName, tc, true); if (sd == null) { throw StandardException.newException(SQLState.LANG_SCHEMA_DOES_NOT_EXIST, schemaName); } TableDescriptor td = dd.getTableDescriptor(tableName, sd, tc); if (td == null) { throw StandardException.newException(SQLState.TABLE_NOT_FOUND, tableName); } DDLMessage.DDLChange ddlChange = ProtoUtil.createAlterTable(((SpliceTransactionManager) tc).getActiveStateTxn().getTxnId(), (BasicUUID) td.getUUID()); DependencyManager dm = dd.getDependencyManager(); dm.invalidateFor(td, DependencyManager.ALTER_TABLE, lcc); tc.prepareDataDictionaryChange(DDLUtils.notifyMetadataChange(ddlChange)); boolean b = "TRUE".compareToIgnoreCase(enable) == 0; td.setPurgeDeletedRows(b); dd.dropTableDescriptor(td, sd, tc); dd.addDescriptor(td, sd, DataDictionary.SYSTABLES_CATALOG_NUM, false, tc, false); }
Source:
<code>public void setValue(int flags) { during.setChecked((flags & Task.NOTIFY_AT_DEADLINE) > 0); after.setChecked((flags & Task.NOTIFY_AFTER_DEADLINE) > 0); int rmd_mode_default = Preferences.getIntegerFromString(R.string.p_default_reminders_mode_key, 0); if((flags & Task.NOTIFY_MODE_NONSTOP) > 0) mode.setSelection(2); else if((flags & Task.NOTIFY_MODE_FIVE) > 0) mode.setSelection(1); else if((rmd_mode_default & Task.NOTIFY_MODE_NONSTOP) > 0) mode.setSelection(2); else if((rmd_mode_default & Task.NOTIFY_MODE_FIVE) > 0) <START> mode.setSelection(1); <END> else mode.setSelection(0); }</code><technical_language>set task defaults in TaskDao.setDefaultReminders, here..</technical_language>

Target:
public void setValue(int flags) { during.setChecked((flags & Task.NOTIFY_AT_DEADLINE) > 0); after.setChecked((flags & Task.NOTIFY_AFTER_DEADLINE) > 0); if((flags & Task.NOTIFY_MODE_NONSTOP) > 0) mode.setSelection(2); else if((flags & Task.NOTIFY_MODE_FIVE) > 0) mode.setSelection(1); else mode.setSelection(0); }
Source:
<code>public CorfuGuidGenerator(CorfuRuntime rt) { runtime = rt; try { <START> distributedCounter = (SMRMap<Integer, Long>) <END> (rt.getObjectsView().build() .setType(SMRMap.class) .setStreamName(GUID_STREAM_NAME) .open()); } catch (Exception e) { log.error("Failed to initialize CorfuGuidGenerator", e); throw e; } }</code><technical_language>try/catch? fail. Also, cast is necessary</technical_language>

Target:
public CorfuGuidGenerator(CorfuRuntime rt) { runtime = rt; distributedCounter = rt.getObjectsView().build() .setType(SMRMap.class) .setStreamName(GUID_STREAM_NAME) .open(); }
Source:
<code><START> public static void deliverReport(@Nullable byte[] releaseStageBytes, @NonNull byte[] payloadBytes) { <END> String payload = new String(payloadBytes, StandardCharsets.UTF_8); String releaseStage = new String(releaseStageBytes, StandardCharsets.UTF_8); Client client = getClient(); if (releaseStage == null || releaseStage.length() == 0 || client.getConfig().shouldNotifyForReleaseStage(releaseStage)) { client.getErrorStore().enqueueContentForDelivery(payload); client.getErrorStore().flushAsync(); } }</code><technical_language>other methods in NativeInterface a String a parameter. affected this issue</technical_language>

Target:
public static void deliverReport(@Nullable byte[] releaseStageBytes, @NonNull byte[] payloadBytes) { if (payloadBytes == null) { return; } String payload = new String(payloadBytes, UTF8Charset); String releaseStage = releaseStageBytes == null ? null : new String(releaseStageBytes, UTF8Charset); Client client = getClient(); if (releaseStage == null || releaseStage.length() == 0 || client.getConfig().shouldNotifyForReleaseStage(releaseStage)) { client.getErrorStore().enqueueContentForDelivery(payload); client.getErrorStore().flushAsync(); } }
Source:
<code>public void savedLogin_lastSavedLoginCredentials_shouldAllowLoginWithoutPrompting() <START> throws InterruptedException { <END> String title = TestController.getUI().getTitle(); assertEquals("test/test (none)", title); }</code><technical_language>Is throws InterruptedException declaration necessary</technical_language>

Target:
public void savedLogin_lastSavedLoginCredentials_shouldAllowLoginWithoutPrompting() { String title = TestController.getUI().getTitle(); assertEquals("test/test (none)", title); }
Source:
<code>private void saveResponse(FeedbackResponseAttributes response) throws EntityDoesNotExistException { if (response.getId() != null) { if (response.responseMetaData.getValue().isEmpty() || response.recipientEmail.isEmpty() || <START> isEmptyContributionResponse(response)) { <END> logic.deleteFeedbackResponse(response); return; } try { logic.updateFeedbackResponse(response); } catch (EntityAlreadyExistsException | InvalidParametersException e) { setStatusForException(e); } } else if (!response.responseMetaData.getValue().isEmpty() && !response.recipientEmail.isEmpty() && !isEmptyContributionResponse(response)) { try { logic.createFeedbackResponse(response); } catch (EntityAlreadyExistsException | InvalidParametersException e) { setStatusForException(e); } } }</code><technical_language>Instead of this, I override isQuestionSkipped in FeedbackContributionQuestionDetails instead. called earlier in this action sets answer empty this branch is taken</technical_language>

Target:
private void saveResponse(FeedbackResponseAttributes response) throws EntityDoesNotExistException { if (response.getId() != null) { if (response.responseMetaData.getValue().isEmpty() || response.recipientEmail.isEmpty()) { logic.deleteFeedbackResponse(response); return; } try { logic.updateFeedbackResponse(response); } catch (EntityAlreadyExistsException | InvalidParametersException e) { setStatusForException(e); } } else if (!response.responseMetaData.getValue().isEmpty() && !response.recipientEmail.isEmpty()) { try { logic.createFeedbackResponse(response); } catch (EntityAlreadyExistsException | InvalidParametersException e) { setStatusForException(e); } } }
Source:
<code>void shouldUpdateChargeToAuthorisationSuccess_IfEpdqStatusIs5() { final String payload = notificationPayloadForTransaction(payId, EPDQ_AUTHORISED); setUpGatewayAccountToReturnGatewayAccountEntity(Optional.of(gatewayAccountEntity)); setUpChargeServiceToReturnCharge(Optional.of(charge)); <START> final boolean result = notificationService.handleNotificationFor(payload, FORWARDED_IP_ADDRESSES); assertTrue(result); <END> verify(mockChargeNotificationProcessor).invoke(payId, charge, AUTHORISATION_SUCCESS, null); }</code><technical_language>inlined</technical_language>

Target:
void shouldUpdateChargeToAuthorisationSuccess_IfEpdqStatusIs5() { final String payload = notificationPayloadForTransaction(payId, EPDQ_AUTHORISED); setUpGatewayAccountToReturnGatewayAccountEntity(Optional.of(gatewayAccountEntity)); setUpChargeServiceToReturnCharge(Optional.of(charge)); assertTrue(notificationService.handleNotificationFor(payload, FORWARDED_IP_ADDRESSES)); verify(mockChargeNotificationProcessor).invoke(payId, charge, AUTHORISATION_SUCCESS, null); }
Source:
<code>public void cherryPickWithContentMerge() throws Exception { RevCommit base = tr.branch("HEAD").commit() .add("foo", "foo contents\n\n\n\n\n\n\n\n\n\n") .create(); RevCommit head = tr.branch("HEAD").commit() .add("foo", "foo contents\n\n\n\n\n\n\n\n\n\nlast line") .create(); RevCommit toPick = tr.commit() .message("message to cherry-pick") .parent(base) .add("foo", "changed foo contents\n\n\n\n\n\n\n\n\n\n") .create(); RevCommit result = tr.cherryPick(toPick); rw.parseBody(result); assertEquals(1, result.getParentCount()); assertEquals(head, result.getParent(0)); assertEquals(toPick.getAuthorIdent(), result.getAuthorIdent()); assertEquals(new PersonIdent(toPick.getCommitterIdent(), new Date(0)), new PersonIdent(result.getCommitterIdent(), new Date(0))); assertTrue(toPick.getCommitTime() < result.getCommitTime()); assertEquals("message to cherry-pick", result.getFullMessage()); <START> assertEquals("changed foo contents\n\n\n\n\n\n\n\n\n\nlast line\n", <END> blobAsString(result, "foo")); }</code><technical_language>a bug in JGits merging. content merge line adding a newline. fixed</technical_language>

Target:
public void cherryPickWithContentMerge() throws Exception { RevCommit base = tr.branch("HEAD").commit() .add("foo", "foo contents\n\n") .create(); RevCommit head = tr.branch("HEAD").commit() .add("foo", "foo contents\n\nlast line\n") .create(); RevCommit toPick = tr.commit() .message("message to cherry-pick") .parent(base) .add("foo", "changed foo contents\n\n") .create(); RevCommit result = tr.cherryPick(toPick); rw.parseBody(result); assertEquals(1, result.getParentCount()); assertEquals(head, result.getParent(0)); assertEquals(toPick.getAuthorIdent(), result.getAuthorIdent()); assertEquals(new PersonIdent(toPick.getCommitterIdent(), new Date(0)), new PersonIdent(result.getCommitterIdent(), new Date(0))); assertTrue(toPick.getCommitTime() < result.getCommitTime()); assertEquals("message to cherry-pick", result.getFullMessage()); assertEquals("changed foo contents\n\nlast line\n", blobAsString(result, "foo")); }
Source:
<code>static RangeCondition<Long> forDiscreteRange(long min, long max, long step) { if <START> (min < max || <END> step < 0) { throw new IllegalArgumentException(); } long increment = Math.max(step, 1L); Set<Long> times = new TreeSet<>(); for (long t = max; t < min; t += increment) { times.add(t); } times.add(min); return fromCollection(times); }</code><technical_language>if (max < min) ?</technical_language>

Target:
static RangeCondition<Long> forDiscreteRange(long min, long max, long step) { if (max < min || step < 0) { throw new IllegalArgumentException(); } long increment = Math.max(step, 1L); Set<Long> times = new TreeSet<>(); for (long t = min; t < max; t += increment) { times.add(t); } times.add(max); return fromCollection(times); }
Source:
<code><START> public boolean isSoftDecline() { <END> return Optional.ofNullable(lastEvent) .map(e -> e.equals("REFUSED")) .map(e -> e && exemptionResponseResult != null) .map(e -> e && SOFT_DECLINE_EXEMPTION_RESPONSE_RESULTS.contains(exemptionResponseResult)) .orElse(false); }</code><technical_language>thought putting logic determine if a soft decline in WorldpayOrderStatusResponse. Good idea. (While I this class friends conflate a representation of actual response interpretation of it, this is for now, putting this new logic in sense)</technical_language>

Target:
public boolean isSoftDecline() { return Optional.ofNullable(lastEvent).map("REFUSED"::equals).orElse(false) && Optional.ofNullable(exemptionResponseResult).map(SOFT_DECLINE_EXEMPTION_RESPONSE_RESULTS::contains).orElse(false); }
Source:
<code>public void shouldRunRecurringJob() throws Throwable { long period = 100; int count = 5; life.start(); scheduler.scheduleRecurring( indexPopulation, countInvocationsJob, period, MILLISECONDS ); <START> awaitFirstInvocation(); <END> awaitInvocationCount( count ); scheduler.shutdown(); int actualInvocations = invocations.get(); sleep( period * 2 ); assertThat( invocations.get(), equalTo( actualInvocations ) ); }</code><technical_language>remove this call of awaitInvocationCount( count ) below</technical_language>

Target:
public void shouldRunRecurringJob() throws Throwable { long period = 100; int count = 5; life.start(); scheduler.scheduleRecurring( indexPopulation, countInvocationsJob, period, MILLISECONDS ); awaitInvocationCount( count ); scheduler.shutdown(); int actualInvocations = invocations.get(); sleep( period * 2 ); assertThat( invocations.get(), equalTo( actualInvocations ) ); }
Source:
<code>public void testOnContextMenuRequested() { ContextMenu contextMenu = mock(ContextMenu.class); ContextMenuEvent contextMenuEvent = mock(ContextMenuEvent.class); LeaderboardEntry leaderboardEntry = new LeaderboardEntry(); when(userContextMenuController.getContextMenu()).thenReturn(contextMenu); <START> when(uiService.loadFxml("theme\\leaderboard\\leaderboard_user_context_menu.fxml")).thenReturn(userContextMenuController); <END> WaitForAsyncUtils.asyncFx(() -> getRoot().getChildren().setAll(instance.leaderboardRoot)); Player player = PlayerBuilder.create("mockito").defaultValues().get(); userContextMenuController.setPlayer(player); when(leaderboardService.getPlayerObjectsById(any(String.class))).thenReturn(CompletableFuture.completedFuture(Arrays.asList(player))); WaitForAsyncUtils.waitForFxEvents(); instance.onContextMenuRequested(contextMenuEvent); verify(contextMenu).show(any(Window.class), anyDouble(), anyDouble()); }</code><technical_language>//</technical_language>

Target:
public void testOnContextMenuRequested() { ContextMenu contextMenu = mock(ContextMenu.class); ContextMenuEvent contextMenuEvent = mock(ContextMenuEvent.class); TableRow<LeaderboardEntry> leaderboardEntryTableRow = new TableRow<>(); when(userContextMenuController.getContextMenu()).thenReturn(contextMenu); when(uiService.loadFxml("theme/leaderboard/leaderboard_user_context_menu.fxml")).thenReturn(userContextMenuController); LeaderboardEntry value = new LeaderboardEntry(); value.setId("1"); leaderboardEntryTableRow.setItem(value); Player player = PlayerBuilder.create("mockito").defaultValues().get(); userContextMenuController.setPlayer(player); when(leaderboardService.getPlayerObjectsById("1")).thenReturn(CompletableFuture.completedFuture(Arrays.asList(player))); instance.onContextMenuRequested(contextMenuEvent, leaderboardEntryTableRow); WaitForAsyncUtils.waitForFxEvents(); verify(contextMenu).show(any(Node.class), anyDouble(), anyDouble()); }
Source:
<code>public void testKill() throws Exception { final File tmpDir = tempFolder.newFolder(); final File logDir = new File(tmpDir, "logs"); final File logFile = new File(tmpDir, "log"); final TaskLogs taskLogs = new HdfsTaskLogs(new HdfsTaskLogsConfig(logDir.toString()), new Configuration()); Files.write("log1content", logFile, Charsets.UTF_8); taskLogs.pushTaskLog("log1", logFile); Assert.assertEquals("log1content", readLog(taskLogs, "log1", 0)); Thread.sleep(1500); long time = (System.currentTimeMillis()/1000)*1000; Files.write("log2content", logFile, Charsets.UTF_8); taskLogs.pushTaskLog("log2", logFile); Assert.assertEquals("log2content", readLog(taskLogs, "log2", 0)); <START> taskLogs.kill(time); <END> Assert.assertFalse(taskLogs.streamTaskLog("log1", 0).isPresent()); Assert.assertEquals("log2content", readLog(taskLogs, "log2", 0)); }</code><technical_language>here, check modified time for file is time new file is time</technical_language>

Target:
public void testKill() throws Exception { final File tmpDir = tempFolder.newFolder(); final File logDir = new File(tmpDir, "logs"); final File logFile = new File(tmpDir, "log"); final Path logDirPath = new Path(logDir.toString()); FileSystem fs = new Path(logDir.toString()).getFileSystem(new Configuration()); final TaskLogs taskLogs = new HdfsTaskLogs(new HdfsTaskLogsConfig(logDir.toString()), new Configuration()); Files.write("log1content", logFile, Charsets.UTF_8); taskLogs.pushTaskLog("log1", logFile); Assert.assertEquals("log1content", readLog(taskLogs, "log1", 0)); Thread.sleep(1500); long time = (System.currentTimeMillis()/1000)*1000; Assert.assertTrue(fs.getFileStatus(new Path(logDirPath, "log1")).getModificationTime() < time); Files.write("log2content", logFile, Charsets.UTF_8); taskLogs.pushTaskLog("log2", logFile); Assert.assertEquals("log2content", readLog(taskLogs, "log2", 0)); Assert.assertTrue(fs.getFileStatus(new Path(logDirPath, "log2")).getModificationTime() >= time); taskLogs.killOlderThan(time); Assert.assertFalse(taskLogs.streamTaskLog("log1", 0).isPresent()); Assert.assertEquals("log2content", readLog(taskLogs, "log2", 0)); }
Source:
<code>public static void responseCodeAnalysis(HttpResponse response) { int code = response.getStatusLine().getStatusCode(); switch (code) { case HttpStatus.SC_OK: <START> LOG.info("Success operation result code"); <END> break; case HttpStatus.SC_NOT_FOUND: throw new NotFoundException(); case HttpStatus.SC_BAD_REQUEST: throw new BadRequestException(); case HttpStatus.SC_UNAUTHORIZED: throw new NotAuthorizedException(response); case HttpStatus.SC_FORBIDDEN: throw new ForbiddenException(); case HttpStatus.SC_NOT_ACCEPTABLE: case HttpStatus.SC_CONFLICT: throw new NotAcceptableException(); case HttpStatus.SC_INTERNAL_SERVER_ERROR: throw new ServerErrorException("Internal server exception during operation process.", HttpStatus.SC_INTERNAL_SERVER_ERROR); case HttpStatus.SC_NOT_IMPLEMENTED: default: throw new NotSupportedException("Operation is not supported"); } }</code><technical_language>debug, info</technical_language>

Target:
public static void responseCodeAnalysis(HttpResponse response) { int code = response.getStatusLine().getStatusCode(); switch (code) { case HttpStatus.SC_OK: LOG.debug("Success operation result code"); break; case HttpStatus.SC_NOT_FOUND: throw new NotFoundException("Not found HTTP code was received from gateway server."); case HttpStatus.SC_CONFLICT: throw new BadRequestException("Conflict HTTP code was received from gateway server."); case HttpStatus.SC_BAD_REQUEST: throw new BadRequestException("Bad request HTTP code was received from gateway server."); case HttpStatus.SC_UNAUTHORIZED: throw new NotAuthorizedException(response); case HttpStatus.SC_FORBIDDEN: throw new ForbiddenException("Forbidden HTTP code was received from gateway server"); case HttpStatus.SC_METHOD_NOT_ALLOWED: throw new NotAllowedException(response.getStatusLine().getReasonPhrase()); case HttpStatus.SC_INTERNAL_SERVER_ERROR: throw new InternalServerErrorException("Internal server exception during operation process."); case HttpStatus.SC_NOT_IMPLEMENTED: default: throw new NotSupportedException("Operation is not supported by gateway server"); } }
Source:
<code>protected SmtpAgent getSmtpAgent(URL url) { if ((smtpAgent != null) && smtpAgent instanceof SmtpAgent) { return smtpAgent; } else { smtpAgent = SmtpAgentFactory.createAgent(url); if (MessageMonitoringUtil.getAgentSettingsCacheRefreshActive()) { GatewayState gatewayState = GatewayState.getInstance(); MessageMonitoringUtil.updateAgentSettingsCacheTimeoutValue(); gatewayState.setSmtpAgent(smtpAgent); gatewayState.setSmptAgentConfig(SmptAgentConfigFactory.createSmtpAgentConfig(url, null, null)); if (gatewayState.isAgentSettingManagerRunning()) { LOG.trace("Stop Agent Settings Manager"); gatewayState.stopAgentSettingsManager(); } LOG.trace("Start Agent Settings Manager"); gatewayState.startAgentSettingsManager(); } else { <START> LOG.trace("Agent Settings Manager not enabled"); <END> } } return smtpAgent; }</code><technical_language>this log statement debug info trace</technical_language>

Target:
protected SmtpAgent getSmtpAgent(URL url) { if ((smtpAgent != null) && smtpAgent instanceof SmtpAgent) { return smtpAgent; } else { smtpAgent = SmtpAgentFactory.createAgent(url); if (MessageMonitoringUtil.getAgentSettingsCacheRefreshActive()) { GatewayState gatewayState = GatewayState.getInstance(); MessageMonitoringUtil.updateAgentSettingsCacheTimeoutValue(); gatewayState.setSmtpAgent(smtpAgent); gatewayState.setSmptAgentConfig(SmptAgentConfigFactory.createSmtpAgentConfig(url, null, null)); if (gatewayState.isAgentSettingManagerRunning()) { LOG.debug("Stop Agent Settings Manager"); gatewayState.stopAgentSettingsManager(); } LOG.debug("Start Agent Settings Manager"); gatewayState.startAgentSettingsManager(); } else { LOG.debug("Agent Settings Manager not enabled"); } } return smtpAgent; }
Source:
<code><START> public static void main(String[] args) { <END> RestServerMain.main(args); }</code><technical_language>This is testing frontend</technical_language>

Target:
public static void main(String[] args) { AmbryFrontendMain.main(args); }
Source:
<code>public void fill() throws OrmException { Multimap<Account.Id, AccountInfo> missing = ArrayListMultimap.create(); for (AccountInfo info : Iterables.concat(created.values(), provided)) { AccountState state = accountCache.getIfPresent(info._id); if (state != null) { fill(info, state.getAccount()); } else { missing.put(info._id, info); } } if (!missing.isEmpty()) { for (Account account : db.get().accounts().get(missing.keySet())) { <START> for (AccountInfo info : missing.values()) { <END> fill(info, account); } } } }</code><technical_language>need missing.get(account.getId()) here</technical_language>

Target:
public void fill() throws OrmException { Multimap<Account.Id, AccountInfo> missing = ArrayListMultimap.create(); for (AccountInfo info : Iterables.concat(created.values(), provided)) { AccountState state = accountCache.getIfPresent(info._id); if (state != null) { fill(info, state.getAccount()); } else { missing.put(info._id, info); } } if (!missing.isEmpty()) { for (Account account : db.get().accounts().get(missing.keySet())) { for (AccountInfo info : missing.get(account.getId())) { fill(info, account); } } } }
Source:
<code>public VirtualMachine findVmByIp(final String ipAddress) { Set<VirtualMachine> vms = getVirtualMachineClient().listVirtualMachines(); LOG.debug("VMs: "); Optional<VirtualMachine> matchingVm = Iterables.tryFind(vms, new Predicate<VirtualMachine>() { @Override public boolean apply(VirtualMachine vm) { <START> return vm.getNICs().iterator().next().getIPAddress().equals(ipAddress); <END> } }); if (matchingVm.isPresent()) { VirtualMachine vm = matchingVm.get(); LOG.debug("Found vm:{} with ip:{}", vm.getName(), vm.getIPAddress()); return vm; } else { return null; } }</code><technical_language>For predicates, rule of thumb is safe for if unusual stuff is passed in (e.g. if a VM a NIC, want find other VM matching IP throwing exception</technical_language>

Target:
public Maybe<VirtualMachine> findVmByIp(final String ipAddress) { Set<VirtualMachine> vms = getVirtualMachineClient().listVirtualMachines(); LOG.debug("VMs: "); return Maybe.of(Iterables.tryFind(vms, new Predicate<VirtualMachine>() { @Override public boolean apply(VirtualMachine vm) { return vm.getNICs().iterator().next().getIPAddress().equals(ipAddress); } })); }
Source:
<code>public static synchronized List<String> getSuggestions() { List<String> suggestions = new ArrayList<>(); <START> if (U.isRedHat()) { <END> String val; String exp = "500"; boolean dwcParamFlag = (val = readVmParam(DIRTY_WRITEBACK_CENTISECS)) != null && !val.equals(exp); boolean decParamFlag = (val = readVmParam(DIRTY_EXPIRE_CENTISECS)) != null && !val.equals(exp); if (dwcParamFlag || decParamFlag) suggestions.add(String.format("Speed up flushing of dirty pages by OS " + "(alter %s%s%s parameter%s by setting to %s)", (dwcParamFlag ? "vm." + DIRTY_WRITEBACK_CENTISECS : ""), (dwcParamFlag && decParamFlag ? " and " : ""), (decParamFlag ? "vm." + DIRTY_EXPIRE_CENTISECS : ""), (dwcParamFlag && decParamFlag ? "s" : ""), exp)); if ((val = readVmParam(SWAPPINESS)) != null) { try { int maxSwappiness = 10; if (Integer.parseInt(val) > maxSwappiness) suggestions.add(String.format("Reduce pages swapping ratio (set vm.%s=%d or less)", SWAPPINESS, maxSwappiness)); } catch (NumberFormatException ignored) { } } if ((val = readVmParam(ZONE_RECLAIM_MODE)) != null && !val.equals(exp = "0")) suggestions.add(String.format("Disable NUMA memory reclaim (set vm.%s=%s)", ZONE_RECLAIM_MODE, exp)); if ((val = readVmParam(EXTRA_FREE_KBYTES)) != null && !val.equals(exp = "1240000")) suggestions.add(String.format("Avoid direct reclaim and page allocation failures (set vm.%s=%s)", EXTRA_FREE_KBYTES, exp)); } return suggestions; }</code><technical_language>do this for Linux VMs Red Hat? I Ubuntu of VM params there</technical_language>

Target:
public static synchronized List<String> getSuggestions() { List<String> suggestions = new ArrayList<>(); if (U.isLinux()) { Integer val; int exp = 500; boolean dwcParamFlag = (val = readVmParam(DIRTY_WRITEBACK_CENTISECS)) != null && val > exp; boolean decParamFlag = (val = readVmParam(DIRTY_EXPIRE_CENTISECS)) != null && val > exp; if (dwcParamFlag || decParamFlag) suggestions.add(String.format("Speed up flushing of dirty pages by OS " + "(alter %s%s%s parameter%s by setting to %d)", (dwcParamFlag ? "vm." + DIRTY_WRITEBACK_CENTISECS : ""), (dwcParamFlag && decParamFlag ? " and " : ""), (decParamFlag ? "vm." + DIRTY_EXPIRE_CENTISECS : ""), (dwcParamFlag && decParamFlag ? "s" : ""), exp)); if ((val = readVmParam(SWAPPINESS)) != null) { try { int maxSwappiness = 10; if (val > maxSwappiness) suggestions.add(String.format("Reduce pages swapping ratio (set vm.%s=%d or less)", SWAPPINESS, maxSwappiness)); } catch (NumberFormatException ignored) { } } if ((val = readVmParam(ZONE_RECLAIM_MODE)) != null && val > (exp = 0)) suggestions.add(String.format("Disable NUMA memory reclaim (set vm.%s=%d)", ZONE_RECLAIM_MODE, exp)); if ((val = readVmParam(EXTRA_FREE_KBYTES)) != null && val < (exp = 1240000)) suggestions.add(String.format("Avoid direct reclaim and page allocation failures (set vm.%s=%d)", EXTRA_FREE_KBYTES, exp)); } return suggestions; }
Source:
<code>protected LocatedFileStatus computeNext() { try { if (remoteIterator == null) { <START> remoteIterator = getLocatedFileStatusRemoteIterator(path); <END> } while (remoteIterator.hasNext()) { LocatedFileStatus status = getLocatedFileStatus(remoteIterator); String fileName = status.getPath().getName(); if (fileName.startsWith("_") || fileName.startsWith(".") || !processPathBasedOnPredicate(effectivePredicate, pathDomain, status.getPath())) { continue; } return status; } return endOfData(); } catch (FileNotFoundException e) { throw new PrestoException(HIVE_FILE_NOT_FOUND, "Partition location does not exist: " + path); } catch (IOException e) { throw new PrestoException(HIVE_FILESYSTEM_ERROR, "Failed to list directory: " + path, e); } }</code><technical_language>prefer separate if blocks, do things</technical_language>

Target:
protected LocatedFileStatus computeNext() { try { if (remoteIterator == null) { remoteIterator = getLocatedFileStatusRemoteIterator(path); } while (remoteIterator.hasNext()) { LocatedFileStatus status = getLocatedFileStatus(remoteIterator); String fileName = status.getPath().getName(); if (fileName.startsWith("_") || fileName.startsWith(".")) { continue; } return status; } return endOfData(); } catch (FileNotFoundException e) { throw new PrestoException(HIVE_FILE_NOT_FOUND, "Partition location does not exist: " + path); } catch (IOException e) { throw new PrestoException(HIVE_FILESYSTEM_ERROR, "Failed to list directory: " + path, e); } }
Source:
<code>protected void executeQueryCommand() { Map<Guid, DiskImage> imagesAncestors = new HashMap<>(); for (Guid id : getParameters().getIds()) { DiskImage ancestor = diskImageDao.getAncestor(id, getUserID(), getParameters().isFiltered()); <START> imagesAncestors.put(id, ancestor); <END> } getQueryReturnValue().setReturnValue(imagesAncestors); }</code><technical_language>need check ancestor is null adding map</technical_language>

Target:
protected void executeQueryCommand() { Map<Guid, DiskImage> imagesAncestors = new HashMap<>(); for (Guid id : getParameters().getIds()) { DiskImage ancestor = diskImageDao.getAncestor(id, getUserID(), getParameters().isFiltered()); if (ancestor != null) { imagesAncestors.put(id, ancestor); } } getQueryReturnValue().setReturnValue(imagesAncestors); }
Source:
<code>public Response getPolicy(@Tenant String tenant, @Correlator String correlator, @PathParam("subject") String subject, @PathParam("policyId") String policyId) { LOGGER.debug("Getting policy with id for and subject [{}]", policyId, tenant, subject); String id = URLEncoding.decode(policyId); Policy p = dao.loadPolicy(tenant, subject, id); if (p != null) { <START> return Response.status(204).entity(p.getPolicy()).build(); <END> } else { return Response.status(404).build(); } }</code><technical_language>This 204 is returned in getPolicy wanted change deletePolicy (the method), we</technical_language>

Target:
public Response getPolicy(@Tenant String tenant, @Correlator String correlator, @PathParam("subject") String subject, @PathParam("policyId") String policyId) { LOGGER.debug("Getting policy with id for and subject [{}]", policyId, tenant, subject); String id = URLEncoding.decode(policyId); Policy p = dao.loadPolicy(tenant, subject, id); if (p != null) { return Response.ok(p.getPolicy()).build(); } else { return Response.status(404).build(); } }
Source:
<code>private void configureSessionCookie(ServletContext servletContext) { SessionCookieConfig config = servletContext.getSessionCookieConfig(); config.setHttpOnly(true); Validate.notNull(environment, "environment cannot be null!"); <START> config.setSecure(true); <END> config.setPath(servletContext.getContextPath() + "/"); }</code><technical_language>this work in dev mode, config.setSecure(environment.acceptsProfiles(Initializer.PROFILE_LIVE ))</technical_language>

Target:
private void configureSessionCookie(ServletContext servletContext) { SessionCookieConfig config = servletContext.getSessionCookieConfig(); config.setHttpOnly(true); Validate.notNull(environment, "environment cannot be null!"); config.setSecure(environment.acceptsProfiles(Initializer.PROFILE_LIVE)); config.setPath(servletContext.getContextPath() + "/"); }
Source:
<code>private static boolean superTypesHaveOnlyStaticMethods(Symbol.TypeSymbol newClassTypeSymbol) { Type superClass = newClassTypeSymbol.superClass(); if (superClass != null && !superClass.is("java.lang.Object")) { <START> if (!hasOnlyStaticMethodsAndFields(superClass.symbol())) { <END> return false; } } for (Type superInterface : newClassTypeSymbol.interfaces()) { if (!hasOnlyStaticMethodsAndFields(superInterface.symbol())) { return false; } } return true; }</code><technical_language>![MAJOR](<LINK_1> Merge this if statement enclosing one. [![rule](<LINK_2>](<LINK_0></technical_language>

Target:
private static boolean superTypesHaveOnlyStaticMethods(Symbol.TypeSymbol newClassTypeSymbol) { Type superClass = newClassTypeSymbol.superClass(); if (superClass != null && !superClass.is("java.lang.Object") && !hasOnlyStaticMethodsAndFields(superClass.symbol())) { return false; } for (Type superInterface : newClassTypeSymbol.interfaces()) { if (!hasOnlyStaticMethodsAndFields(superInterface.symbol())) { return false; } } return true; }
Source:
<code>public final void init(Config config, TaskContext context) throws Exception { StreamGraphImpl streamGraph = new StreamGraphImpl(runner, config); this.streamApplication.init(streamGraph, config); this.contextManager = streamGraph.getContextManager(); if (this.contextManager != null) { this.contextManager.init(config, context); } this.operatorImplGraph = new OperatorImplGraph(streamGraph, config, context, clock); <START> this.eosDispatcher = EndOfStreamManager.createDispatcher(streamGraph); <END> }</code><technical_language>So, create eosDispatcher multiple times, task. Is due fact initializing creating streamGraph task instance? live for now. revisit this a serialized DAG</technical_language>

Target:
public final void init(Config config, TaskContext context) throws Exception { StreamGraphImpl streamGraph = new StreamGraphImpl(runner, config); this.streamApplication.init(streamGraph, config); this.contextManager = streamGraph.getContextManager(); if (this.contextManager != null) { this.contextManager.init(config, context); } this.operatorImplGraph = new OperatorImplGraph(streamGraph, config, context, clock); this.ioGraph = streamGraph.toIOGraph(); }
Source:
<code>default String getStringValue(JsonObject jsonObject) throws DataException { try { return jsonObject.getString(this.toString()); <START> } catch (RuntimeException e) { <END> throw new DataException("Not possible to retrieve String value for key " + this.toString() + ". Exception: " + e.getMessage()); } }</code><technical_language>catch RuntimeException based class here? I NullPointerException ClassCastException official thrown</technical_language>

Target:
default String getStringValue(JsonObject jsonObject) throws DataException { try { return jsonObject.getString(this.toString()); } catch (ClassCastException | NullPointerException e) { throw new DataException("Not possible to retrieve String value for key " + this.toString() + ". Exception: " + e.getMessage()); } }
Source:
<code>public void handleResponse(RestRequest restRequest, RestResponseChannel restResponseChannel, ReadableStreamChannel response, Exception exception) throws RestServiceException { <START> if (isRunning() && asyncResponseHandler != null && asyncResponseHandler.isRunning()) { <END> asyncResponseHandler.submitResponse(restRequest, restResponseChannel, response, exception); } else { restServerMetrics.requestResponseHandlerUnavailableError.inc(); throw new RestServiceException( "Requests cannot be handled because the AsyncRequestResponseHandler is not available", RestServiceErrorCode.ServiceUnavailable); } }</code><technical_language>This if (isRunning())</technical_language>

Target:
public void handleResponse(RestRequest restRequest, RestResponseChannel restResponseChannel, ReadableStreamChannel response, Exception exception) throws RestServiceException { if (isRunning()) { asyncResponseHandler.submitResponse(restRequest, restResponseChannel, response, exception); } else { restServerMetrics.requestResponseHandlerUnavailableError.inc(); throw new RestServiceException( "Requests cannot be handled because the AsyncRequestResponseHandler is not available", RestServiceErrorCode.ServiceUnavailable); } }
Source:
<code>SnapshotFileSender remoteSnapshotSender(String snpName, UUID rmtNodeId) { return new RemoteSnapshotFileSender(log, new SequentialExecutorWrapper(log, snpRunner), <START> () -> relativeNodePath(cctx.kernalContext().pdsFolderResolver().resolveFolders()), <END> cctx.gridIO().openTransmissionSender(rmtNodeId, DFLT_INITIAL_SNAPSHOT_TOPIC), errMsg -> cctx.gridIO().sendToCustomTopic(rmtNodeId, DFLT_INITIAL_SNAPSHOT_TOPIC, new SnapshotResponseMessage(snpName, errMsg), SYSTEM_POOL), snpName); }</code><technical_language>do need Supplier here</technical_language>

Target:
SnapshotSender remoteSnapshotSender(String snpName, UUID rmtNodeId) { return new RemoteSnapshotSender(log, new SequentialExecutorWrapper(log, snpRunner), () -> igniteCacheStoragePath(pdsSettings), cctx.gridIO().openTransmissionSender(rmtNodeId, DFLT_INITIAL_SNAPSHOT_TOPIC), snpName); }
Source:
<code>public SimplePatientCorrelationSecuredResponseType addPatientCorrelationPLQ( AddPatientCorrelationPLQSecuredRequestType request) { SimplePatientCorrelationSecuredResponseType response = new SimplePatientCorrelationSecuredResponseType(); PatientCorrelationPLQHelper.addPatientCorrelationPLQRecords(request.getPatientLocationQueryResponse()); <START> response.setMessage("It is done."); <END> return response; }</code><technical_language>Remove this message, set more</technical_language>

Target:
public SimplePatientCorrelationSecuredResponseType addPatientCorrelationPLQ( AddPatientCorrelationPLQSecuredRequestType request) { SimplePatientCorrelationSecuredResponseType response = new SimplePatientCorrelationSecuredResponseType(); PatientCorrelationPLQHelper.addPatientCorrelationPLQRecords(request.getPatientLocationQueryResponse()); response.setMessage("Response has been received and processed."); return response; }