auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void testAlterReplicaLogDirsPartialResponse() throws Exception { try (AdminClientUnitTestEnv env = mockClientEnv()) { createAlterLogDirsResponse(env, env.cluster().nodeById(0), Errors.NONE, 1); TopicPartitionReplica tpr1 = new TopicPartitionReplica("topic", 1, 0); TopicPartitionReplica tpr2 = new TopicPartitionReplica("topic", 2, 0); Map<TopicPartitionReplica, String> logDirs = new HashMap<>(); logDirs.put(tpr1, "/data1"); logDirs.put(tpr2, "/data1"); AlterReplicaLogDirsResult result = env.adminClient().alterReplicaLogDirs(logDirs); assertNull(result.values().get(tpr1).get()); <START> try { <END> result.values().get(tpr2).get(); fail("Expected an exception."); } catch (ExecutionException e) { assertTrue("Expected an ExecutionException wrapping an ApiException, but got " + Utils.stackTrace(e), e.getCause() instanceof ApiException); } } }</code><technical_language>TestUtils.assertFutureThrows()</technical_language>

Target:
public void testAlterReplicaLogDirsPartialResponse() throws Exception { try (AdminClientUnitTestEnv env = mockClientEnv()) { createAlterLogDirsResponse(env, env.cluster().nodeById(0), Errors.NONE, 1); TopicPartitionReplica tpr1 = new TopicPartitionReplica("topic", 1, 0); TopicPartitionReplica tpr2 = new TopicPartitionReplica("topic", 2, 0); Map<TopicPartitionReplica, String> logDirs = new HashMap<>(); logDirs.put(tpr1, "/data1"); logDirs.put(tpr2, "/data1"); AlterReplicaLogDirsResult result = env.adminClient().alterReplicaLogDirs(logDirs); assertNull(result.values().get(tpr1).get()); TestUtils.assertFutureThrows(result.values().get(tpr2), ApiException.class); } }
Source:
<code>public Status insert(String table, String key, Map<String, ByteIterator> values) { Message record = getRecord(key, values); String rowKey = (String) record.getField(msgDesc.findFieldByName("YCSB")); logger.debug("insert key = {}", rowKey); try { batchRecords.add(record); batchCount++; if (batchSize == 0 || batchSize == batchCount) { batchInsert(); batchCount = 0; } <START> return Status.OK; <END> } catch (Throwable e) { logger.error(MessageFormatter.format("Error inserting key: {}", rowKey).getMessage(), e); } return Status.ERROR; }</code><technical_language>batched executed this BATCHED_OK</technical_language>

Target:
public Status insert(String table, String key, Map<String, ByteIterator> values) { Message record = getRecord(key, values); String rowKey = (String) record.getField(msgDesc.findFieldByName("YCSB")); LOGGER.debug("insert key = {}", rowKey); try { batchRecords.add(record); batchCount++; if (batchSize == 0 || batchSize == batchCount) { batchInsert(); batchCount = 0; } return Status.OK; } catch (Throwable e) { LOGGER.error(MessageFormatter.format("Error inserting key: {}", rowKey).getMessage(), e); } return Status.ERROR; }
Source:
<code>public void shutdown(final String taskId) { if (!started) { log.info("This TaskRunner is stopped. Ignoring shutdown command for task: %s", taskId); } else if (pendingTasks.remove(taskId) != null) { pendingTaskPayloads.remove(taskId); log.info("Removed task from pending queue: %s", taskId); } else if (completeTasks.containsKey(taskId)) { cleanup(taskId); } else { final ZkWorker zkWorker = findWorkerRunningTask(taskId); if (zkWorker == null) { log.info("Can't shutdown! No worker running task %s", taskId); return; } URL url = null; try { url = makeWorkerURL(zkWorker.getWorker(), String.format("/task/%s/shutdown", taskId)); final StatusResponseHolder response = httpClient.go( new Request(HttpMethod.POST, url), RESPONSE_HANDLER, shutdownTimeout ).get(); log.info( "Sent shutdown message to worker: %s, status %s, response: %s", zkWorker.getWorker().getHost(), response.getStatus(), response.getContent() ); <START> if (!response.getStatus().equals(HttpResponseStatus.OK)) { <END> log.error("Shutdown failed for %s! Are you sure the task was running?", taskId); } } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new RE(e, "Interrupted posting shutdown to [%s] for task [%s]", url, taskId); } catch (Exception e) { throw new RE(e, "Error in handling post to [%s] for task [%s]", zkWorker.getWorker().getHost(), taskId); } } }</code><technical_language>invert this null? !HttpResponseStatus.OK.equals(response.getStatus())</technical_language>

Target:
public void shutdown(final String taskId) { if (!started) { log.info("This TaskRunner is stopped. Ignoring shutdown command for task: %s", taskId); } else if (pendingTasks.remove(taskId) != null) { pendingTaskPayloads.remove(taskId); log.info("Removed task from pending queue: %s", taskId); } else if (completeTasks.containsKey(taskId)) { cleanup(taskId); } else { final ZkWorker zkWorker = findWorkerRunningTask(taskId); if (zkWorker == null) { log.info("Can't shutdown! No worker running task %s", taskId); return; } URL url = null; try { url = makeWorkerURL(zkWorker.getWorker(), String.format("/task/%s/shutdown", taskId)); final StatusResponseHolder response = httpClient.go( new Request(HttpMethod.POST, url), RESPONSE_HANDLER, shutdownTimeout ).get(); log.info( "Sent shutdown message to worker: %s, status %s, response: %s", zkWorker.getWorker().getHost(), response.getStatus(), response.getContent() ); if (!HttpResponseStatus.OK.equals(response.getStatus())) { log.error("Shutdown failed for %s! Are you sure the task was running?", taskId); } } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new RE(e, "Interrupted posting shutdown to [%s] for task [%s]", url, taskId); } catch (Exception e) { throw new RE(e, "Error in handling post to [%s] for task [%s]", zkWorker.getWorker().getHost(), taskId); } } }
Source:
<code>private void verifyExistenceOfsectionName(String sectionName) { this.sessionLevel.computeIfAbsent(sectionName, key -> { addSectionWithDefaultPrivileges(sectionName); <START> return new LinkedHashMap<String, Map<String, Boolean>>(); <END> }); }</code><technical_language>simply return new LinkedHashMap<></technical_language>

Target:
private void verifyExistenceOfsectionName(String sectionName) { this.sessionLevel.computeIfAbsent(sectionName, key -> { addSectionWithDefaultPrivileges(sectionName); return new LinkedHashMap<>(); }); }
Source:
<code>private static Boolean canPlayFile(final FileSync.FileManifest senseManifest, final FileInfo fileInfo) { for (final FileSync.FileManifest.File file : senseManifest.getFileInfoList()) { if (file.hasDownloadInfo() && file.getDownloadInfo().hasSdCardFilename() && file.getDownloadInfo().hasSdCardPath()) { final String sdCardPath = file.getDownloadInfo().getSdCardPath(); final String sdCardFilename = file.getDownloadInfo().getSdCardFilename(); final byte[] fileInfoSha; try { fileInfoSha = fileInfo.getShaBytes(); } catch (DecoderException e) { LOGGER.error("method=canPlayFile exception=DecoderException file-info-path={} file-info-sha={} error={}", fileInfo.path, fileInfo.sha, e); continue; } LOGGER.trace("method=canPlayFile device-id={} sd-card-path={} sd-card-filename={} file-info-path={}", senseManifest.getSenseId(), sdCardPath, sdCardFilename, fileInfo.path); if (getFullPath(sdCardPath, sdCardFilename).equals(fileInfo.path)) { if (Arrays.equals(fileInfoSha, file.getDownloadInfo().getSha1().toByteArray())) { return true; <START> } else { <END> LOGGER.warn("device-id={} file-info-path={} file-info-sha={} error=sha-does-not-match", senseManifest.getSenseId(), fileInfo.path, fileInfo.sha); } } } else { LOGGER.debug("device-id={} error=incomplete-download-info", senseManifest.getSenseId()); } } LOGGER.debug("device-id={} error=cannot-play-file file-info-path={}", senseManifest.getSenseId(), fileInfo.path); return false; }</code><technical_language>need for else</technical_language>

Target:
private static Boolean canPlayFile(final FileSync.FileManifest senseManifest, final FileInfo fileInfo) { for (final FileSync.FileManifest.File file : senseManifest.getFileInfoList()) { if (file.hasDownloadInfo() && file.getDownloadInfo().hasSdCardFilename() && file.getDownloadInfo().hasSdCardPath()) { final String sdCardPath = file.getDownloadInfo().getSdCardPath(); final String sdCardFilename = file.getDownloadInfo().getSdCardFilename(); final byte[] fileInfoSha; try { fileInfoSha = fileInfo.getShaBytes(); } catch (DecoderException e) { LOGGER.error("method=canPlayFile exception=DecoderException file-info-path={} file-info-sha={} error={}", fileInfo.path, fileInfo.sha, e); continue; } LOGGER.trace("method=canPlayFile device-id={} sd-card-path={} sd-card-filename={} file-info-path={}", senseManifest.getSenseId(), sdCardPath, sdCardFilename, fileInfo.path); if (getFullPath(sdCardPath, sdCardFilename).equals(fileInfo.path)) { if (Arrays.equals(fileInfoSha, file.getDownloadInfo().getSha1().toByteArray())) { return true; } LOGGER.warn("device-id={} file-info-path={} file-info-sha={} error=sha-does-not-match", senseManifest.getSenseId(), fileInfo.path, fileInfo.sha); } } else { LOGGER.debug("device-id={} error=incomplete-download-info", senseManifest.getSenseId()); } } LOGGER.debug("device-id={} error=cannot-play-file file-info-path={}", senseManifest.getSenseId(), fileInfo.path); return false; }
Source:
<code>public static String truncateFileNameFromFullPath(String file) { <START> return file.substring(file.lastIndexOf('/')+1); <END> }</code><technical_language>nit: spaces + change / OS-specific path separator, i.e. [File.separator](<LINK_0></technical_language>

Target:
public static String truncateFileNameFromFullPath(String file) { return file.substring(file.lastIndexOf(File.separator) + 1); }
Source:
<code>Mono<Response<KeyVaultKey>> updateKeyPropertiesWithResponse(KeyProperties keyProperties, Context context, KeyOperation... keyOperations) { Objects.requireNonNull(keyProperties, "The key properties input parameter cannot be null."); context = context == null ? Context.NONE : context; KeyRequestParameters parameters = new KeyRequestParameters() .setTags(keyProperties.getTags()) .setKeyAttributes(new KeyRequestAttributes(keyProperties)) <START> .setKeyReleasePolicy(keyProperties.getKeyReleasePolicy()); <END> if (keyOperations.length > 0) { parameters.setKeyOps(Arrays.asList(keyOperations)); } return service.updateKey(vaultUrl, keyProperties.getName(), keyProperties.getVersion(), apiVersion, ACCEPT_LANGUAGE, parameters, CONTENT_TYPE_HEADER_VALUE, context.addData(AZ_TRACING_NAMESPACE_KEY, KEYVAULT_TRACING_NAMESPACE_VALUE)) .doOnRequest(ignored -> logger.info("Updating key - {}", keyProperties.getName())) .doOnSuccess(response -> logger.info("Updated key - {}", response.getValue().getName())) .doOnError(error -> logger.warning("Failed to update key - {}", keyProperties.getName(), error)); }</code><technical_language>copying this KeyProperties needs anyway, define KeyProperties, means KeyVaultBundle.properties.releasePolicy is where'd get it</technical_language>

Target:
Mono<Response<KeyVaultKey>> updateKeyPropertiesWithResponse(KeyProperties keyProperties, Context context, KeyOperation... keyOperations) { Objects.requireNonNull(keyProperties, "The key properties input parameter cannot be null."); context = context == null ? Context.NONE : context; KeyRequestParameters parameters = new KeyRequestParameters() .setTags(keyProperties.getTags()) .setKeyAttributes(new KeyRequestAttributes(keyProperties)) .setReleasePolicy(keyProperties.getReleasePolicy()); if (keyOperations.length > 0) { parameters.setKeyOps(Arrays.asList(keyOperations)); } return service.updateKey(vaultUrl, keyProperties.getName(), keyProperties.getVersion(), apiVersion, ACCEPT_LANGUAGE, parameters, CONTENT_TYPE_HEADER_VALUE, context.addData(AZ_TRACING_NAMESPACE_KEY, KEYVAULT_TRACING_NAMESPACE_VALUE)) .doOnRequest(ignored -> logger.info("Updating key - {}", keyProperties.getName())) .doOnSuccess(response -> logger.info("Updated key - {}", response.getValue().getName())) .doOnError(error -> logger.warning("Failed to update key - {}", keyProperties.getName(), error)); }
Source:
<code>public static Resource getResource(FBNetworkElement fbne){ if(null != fbne.getFbNetwork()) { <START> if(fbne.getFbNetwork().eContainer() instanceof Resource){ return (Resource)fbne.getFbNetwork().eContainer(); } if(fbne.getFbNetwork().eContainer() instanceof SubApp){ return getResource(((SubApp)fbne.getFbNetwork().eContainer())); } <END> } if(fbne.isMapped()){ return fbne.getMapping().getTo().getResource(); } return null; }</code><technical_language>nicer, if get eContainer reference in a local variable</technical_language>

Target:
public static Resource getResource(FBNetworkElement fbne){ if(null != fbne.getFbNetwork()) { EObject container = fbne.getFbNetwork().eContainer(); if(container instanceof Resource){ return (Resource)container; } if(container instanceof SubApp){ return getResource(((SubApp)container)); } } if(fbne.isMapped()){ return fbne.getMapping().getTo().getResource(); } return null; }
Source:
<code>SuggestReviewerInfo(AccountInfo a) { this.account = a; <START> this.group = null; <END> }</code><technical_language>Setting group null done JVM object created</technical_language>

Target:
SuggestReviewerInfo(AccountInfo a) { this.account = a; }
Source:
<code>private void updateCodeMinings() { <START> fMonitor= new NullProgressMonitor(); <END> IProgressMonitor monitor= fMonitor; getCodeMinings(fViewer, fCodeMiningProviders, monitor).thenAccept(symbols -> { if (!monitor.isCanceled()) { Map<Position, List<ICodeMining>> groups= groupByLines(symbols, fCodeMiningProviders); renderCodeMinings(groups, fViewer, monitor); } }); }</code><technical_language>important change. This monitor is ICodeMiningProvider implementation. if change that, need change other implementation JDT Java, LSP4e. @Mickael do that</technical_language>

Target:
private void updateCodeMinings() { fMonitor= new NullProgressMonitor(); IProgressMonitor monitor= fMonitor; getCodeMinings(fViewer, fCodeMiningProviders, monitor).thenAccept(symbols -> { if (!monitor.isCanceled()) { Map<Position, List<ICodeMining>> groups= goupByLines(symbols, fCodeMiningProviders); renderCodeMinings(groups, fViewer, monitor); } }); }
Source:
<code>SqlgDataSource setup(String driver, final Configuration configuration) throws Exception; <START> SqlgDataSource setupFromJndi(String jndiName, Configuration configuration) throws Exception; <END> interface SqlgDataSource { DataSource get(String jdbcUrl); void close(String jdbcUrl); String getPoolStatsAsJson(); }</code><technical_language>This is IMHO right place handle JNDI datasources. obtain a datasource JNDI, is bound some URL do is get actual connection datasource. I.e. SqlgDataSource#get(String) method sense for JNDI-based connections</technical_language>

Target:
SqlgDataSource setup(String driver, final Configuration configuration) throws Exception; interface SqlgDataSource { DataSource getDatasource(); void close(); String getPoolStatsAsJson(); }
Source:
<code>public MSKConcept queryCVS(String vocabularyId, String conceptId, String histologyCode, String siteCode) throws CrosswalkException { RestTemplate restTemplate = new RestTemplate(); try { ResponseEntity<MSKConcept> response = restTemplate.getForEntity(crosswalkURL, MSKConcept.class, vocabularyId, conceptId, histologyCode, siteCode); return response.getBody(); } catch (HttpClientErrorException e) { logger.error("queryCVS() -- caught HttpClientErrorException: " + e); String errorString = "URI: " + crosswalkURL + "\n" + "vocabularyId: " + vocabularyId + "\n" + <START> "conceptId: " + conceptId != null ? conceptId : "" + "\n" + <END> "histologyCode: " + histologyCode != null ? histologyCode : "" + "\n" + "siteCode: " + siteCode != null ? siteCode : "" + "\n"; if (e.getStatusCode().is4xxClientError()) { throw new CrosswalkConceptNotFoundException("4xx Error while getting data from CVS Service with: \n " + errorString, e); } else if (e.getStatusCode().is5xxServerError()) { throw new CrosswalkServiceUnavailableException("5xx Error while getting data from CVS", e); } throw new UnexpectedCrosswalkResponseException("Exception while getting data from CVS Service with: \n " + errorString, e); } }</code><technical_language>need null checks, if is null string "null" printed. of leaving is fine too</technical_language>

Target:
public MSKConcept queryCVS(String vocabularyId, String conceptId, String histologyCode, String siteCode) throws CrosswalkException { RestTemplate restTemplate = new RestTemplate(); try { ResponseEntity<MSKConcept> response = restTemplate.getForEntity(crosswalkURL, MSKConcept.class, vocabularyId, conceptId, histologyCode, siteCode); return response.getBody(); } catch (HttpStatusCodeException e) { logger.error("queryCVS() -- caught HttpStatusCodeException: " + e); String errorString = "URI: " + crosswalkURL + "\n" + "vocabularyId: " + vocabularyId + "\n" + "conceptId: " + conceptId + "\n" + "histologyCode: " + histologyCode + "\n" + "siteCode: " + siteCode + "\n"; if (e.getStatusCode().is4xxClientError()) { throw new CrosswalkConceptNotFoundException("4xx Error while getting data from CVS Service with: \n" + errorString, e); } else if (e.getStatusCode().is5xxServerError()) { throw new CrosswalkServiceUnavailableException("5xx Error while getting data from CVS", e); } throw new UnexpectedCrosswalkResponseException("Exception while getting data from CVS Service with: \n" + errorString, e); } catch (RestClientException e) { logger.error("queryCVS() -- caught RestClientErrorException: " + e); String errorString = "URI: " + crosswalkURL + "\n" + "vocabularyId: " + vocabularyId + "\n" + "conceptId: " + conceptId + "\n" + "histologyCode: " + histologyCode + "\n" + "siteCode: " + siteCode + "\n"; throw new UnexpectedCrosswalkResponseException("RestClientException while getting data from CVS Service" + errorString, e); } }
Source:
<code>public void postShutdown() { if (activityHelper != null) { activityHelper.shutdown(); activityHelper = null; } if (idleHelper != null) { idleHelper.shutdown(); idleHelper = null; } if (workspaceUndoMonitor != null) { workspaceUndoMonitor.shutdown(); workspaceUndoMonitor = null; } Display display = getWorkbenchConfigurer().getWorkbench().getDisplay(); IWorkspace workspace = IDEWorkbenchPlugin.getPluginWorkspace(); final Runnable disconnectFromWorkspace = new Runnable() { @Override public void run() { if (isWorkspaceLocked(workspace)) { display.asyncExec(this); return; } disconnectFromWorkspace(); } }; if (!display.isDisposed() && workspace != <START> null && isWorkspaceLocked(workspace)) <END> { display.asyncExec(disconnectFromWorkspace); } }</code><technical_language>I miss else branch. change disconnect if workspace is locked</technical_language>

Target:
public void postShutdown() { if (activityHelper != null) { activityHelper.shutdown(); activityHelper = null; } if (idleHelper != null) { idleHelper.shutdown(); idleHelper = null; } if (workspaceUndoMonitor != null) { workspaceUndoMonitor.shutdown(); workspaceUndoMonitor = null; } Display display = getWorkbenchConfigurer().getWorkbench().getDisplay(); IWorkspace workspace = IDEWorkbenchPlugin.getPluginWorkspace(); final Runnable disconnectFromWorkspace = new Runnable() { @Override public void run() { if (isWorkspaceLocked(workspace)) { display.asyncExec(this); return; } disconnectFromWorkspace(); } }; if (workspace != null) { if (!display.isDisposed() && isWorkspaceLocked(workspace)) { display.asyncExec(disconnectFromWorkspace); } else { disconnectFromWorkspace.run(); } } workbenchAdvisor = null; }
Source:
<code>public void run() { boolean empty; ByteBuffer sendBuffer; try { sendBuffer = bufferPool.borrow(); } catch (final InterruptedException e) { handler.handle(e); return; } while (!(messages.isEmpty() && shutdown)) { try { <START> if (Thread.interrupted()) { <END> return; } final Message message = messages.poll(WAIT_SLEEP_MS, TimeUnit.MILLISECONDS); if (message != null) { builder.setLength(0); message.writeTo(builder); int lowerBoundSize = builder.length(); if (sendBuffer.capacity() < lowerBoundSize) { throw new InvalidMessageException(MESSAGE_TOO_LONG, builder.toString()); } if (sendBuffer.remaining() < (lowerBoundSize + 1)) { outboundQueue.put(sendBuffer); sendBuffer = bufferPool.borrow(); } sendBuffer.mark(); if (sendBuffer.position() > 0) { sendBuffer.put((byte) '\n'); } try { writeBuilderToSendBuffer(sendBuffer); } catch (BufferOverflowException boe) { outboundQueue.put(sendBuffer); sendBuffer = bufferPool.borrow(); writeBuilderToSendBuffer(sendBuffer); } if (null == messages.peek()) { outboundQueue.put(sendBuffer); sendBuffer = bufferPool.borrow(); } } } catch (final InterruptedException e) { if (shutdown) { endSignal.countDown(); return; } } catch (final Exception e) { handler.handle(e); } } builder.setLength(0); builder.trimToSize(); endSignal.countDown(); }</code><technical_language>Do want a timeout here? This means metrics logged in period propagated a TimeoutException</technical_language>

Target:
public void run() { boolean empty; ByteBuffer sendBuffer; try { sendBuffer = bufferPool.borrow(); } catch (final InterruptedException e) { handler.handle(e); return; } while (!(shutdown && messages.isEmpty())) { try { final Message message = messages.poll(WAIT_SLEEP_MS, TimeUnit.MILLISECONDS); if (message != null) { builder.setLength(0); message.writeTo(builder); int lowerBoundSize = builder.length(); if (sendBuffer.capacity() < lowerBoundSize) { throw new InvalidMessageException(MESSAGE_TOO_LONG, builder.toString()); } if (sendBuffer.remaining() < (lowerBoundSize + 1)) { outboundQueue.put(sendBuffer); sendBuffer = bufferPool.borrow(); } sendBuffer.mark(); if (sendBuffer.position() > 0) { sendBuffer.put((byte) '\n'); } try { writeBuilderToSendBuffer(sendBuffer); } catch (BufferOverflowException boe) { outboundQueue.put(sendBuffer); sendBuffer = bufferPool.borrow(); writeBuilderToSendBuffer(sendBuffer); } if (null == messages.peek()) { outboundQueue.put(sendBuffer); sendBuffer = bufferPool.borrow(); } } } catch (final InterruptedException e) { if (shutdown) { endSignal.countDown(); return; } } catch (final Exception e) { handler.handle(e); } } builder.setLength(0); builder.trimToSize(); endSignal.countDown(); }
Source:
<code>public void getBlockState(BlockPos pos, CallbackInfoReturnable<IBlockState> ci) { <START> if (this.isCubicWorld() && this.isValid(pos)) { <END> ci.setReturnValue(this.getCubeCache().getCube(CubePos.fromBlockCoords(pos)).getBlockState(pos)); ci.cancel(); } }</code><technical_language>cancel return AIR if valid</technical_language>

Target:
public void getBlockState(BlockPos pos, CallbackInfoReturnable<IBlockState> ci) { if (this.isCubicWorld()) { if (this.isValid(pos)) ci.setReturnValue(this.getCubeCache().getCube(CubePos.fromBlockCoords(pos)).getBlockState(pos)); else ci.setReturnValue(Blocks.AIR.getDefaultState()); ci.cancel(); } }
Source:
<code>public boolean handleNetworkException(VDSNetworkException ex, VDS vds) { if (vds.getStatus() != VDSStatus.Down) { if (mUnrespondedAttempts.get() < Config.<Integer> GetValue(ConfigValues.VDSAttemptsToResetCount) || lastUpdate + (TimeUnit.SECONDS.toMillis(Config.<Integer> GetValue(ConfigValues.TimeoutToResetVdsInSeconds))) > System.currentTimeMillis()) { boolean result = false; if (vds.getStatus() != VDSStatus.Connecting && vds.getStatus() != VDSStatus.PreparingForMaintenance && vds.getStatus() != VDSStatus.NonResponsive) { setStatus(VDSStatus.Connecting, vds); result = true; } mUnrespondedAttempts.incrementAndGet(); return result; } if (vds.getStatus() == VDSStatus.NonResponsive || vds.getStatus() == VDSStatus.Maintenance) { setStatus(VDSStatus.NonResponsive, vds); return true; } setStatus(VDSStatus.NonResponsive, vds); log.errorFormat( "Server failed to respond, vds_id = {0}, vds_name = {1}, error = {2}", vds.getId(), vds.getName(), ex.getMessage()); AuditLogableBase logable = new AuditLogableBase(vds.getId()); AuditLogDirector.log(logable, AuditLogType.VDS_FAILURE); ResourceManager.getInstance().getEventListener().vdsNotResponding(vds); <START> moveVMsToUnknown(); <END> } return true; }</code><technical_language>this is needed here? i automatically in responsive treatment command</technical_language>

Target:
public boolean handleNetworkException(VDSNetworkException ex, VDS vds) { if (vds.getStatus() != VDSStatus.Down) { if (mUnrespondedAttempts.get() < Config.<Integer> GetValue(ConfigValues.VDSAttemptsToResetCount) || lastUpdate + (TimeUnit.SECONDS.toMillis(Config.<Integer> GetValue(ConfigValues.TimeoutToResetVdsInSeconds))) > System.currentTimeMillis()) { boolean result = false; if (vds.getStatus() != VDSStatus.Connecting && vds.getStatus() != VDSStatus.PreparingForMaintenance && vds.getStatus() != VDSStatus.NonResponsive) { setStatus(VDSStatus.Connecting, vds); result = true; } mUnrespondedAttempts.incrementAndGet(); return result; } if (vds.getStatus() == VDSStatus.NonResponsive || vds.getStatus() == VDSStatus.Maintenance) { setStatus(VDSStatus.NonResponsive, vds); return true; } setStatus(VDSStatus.NonResponsive, vds); log.errorFormat( "Server failed to respond, vds_id = {0}, vds_name = {1}, error = {2}", vds.getId(), vds.getName(), ex.getMessage()); AuditLogableBase logable = new AuditLogableBase(vds.getId()); AuditLogDirector.log(logable, AuditLogType.VDS_FAILURE); ResourceManager.getInstance().getEventListener().vdsNotResponding(vds); } return true; }
Source:
<code><START> public ContentFileTransactionContext(File contentDirectory, File deletedTmpDirectory) { <END> this.contentDirectory = contentDirectory; this.deletedTmpDirectory = deletedTmpDirectory; addedFilesQueue = new LinkedList<String>(); }</code><technical_language>params null</technical_language>

Target:
public ContentFileTransactionContext(File contentDirectory, File deletedTmpDirectory) { Preconditions.checkNotNull(contentDirectory); Preconditions.checkNotNull(deletedTmpDirectory); this.contentDirectory = contentDirectory; this.deletedTmpDirectory = deletedTmpDirectory; addedFilesQueue = new LinkedList<String>(); }
Source:
<code>public void nakedS3Put() throws IOException, SignatureException, XmlProcessingException, URISyntaxException { try { final Path beowulfPath = ResourceUtils.loadFileResource(RESOURCE_BASE_NAME + "beowulf.txt"); final SeekableByteChannel beowulfChannel = new ResourceObjectPutter(RESOURCE_BASE_NAME).buildChannel("beowulf.txt"); <START> final PutObjectResponse job = client.putObject(new PutObjectRequest(BUCKET_NAME, "beowulf.txt", <END> beowulfChannel, Files.size(beowulfPath))); assertThat(job.getStatusCode(), is(200)); } finally { deleteAllContents(client, BUCKET_NAME); } }</code><technical_language>This a job. Please rename object match object is</technical_language>

Target:
public void nakedS3Put() throws IOException, SignatureException, XmlProcessingException, URISyntaxException { try { final Path beowulfPath = ResourceUtils.loadFileResource(RESOURCE_BASE_NAME + "beowulf.txt"); final SeekableByteChannel beowulfChannel = new ResourceObjectPutter(RESOURCE_BASE_NAME).buildChannel("beowulf.txt"); final PutObjectResponse putObjectResponse = client.putObject(new PutObjectRequest(BUCKET_NAME, "beowulf.txt", beowulfChannel, Files.size(beowulfPath))); assertThat(putObjectResponse.getStatusCode(), is(200)); } finally { deleteAllContents(client, BUCKET_NAME); } }
Source:
<code>private void sanitazeOnMutation(final int what) { try{ switch (what) { case SET_PRINCIPAL: if(this.principal!=null && !this.principal.equals(AnonymousPrincipal.getInstance())){ this.userCallbackKinds.remove(CallbackKind.PRINCIPAL); } break; case SET_CRED_SOURCE: if(this.credentialSource!=null && !this.credentialSource.equals(IdentityCredentials.NONE)){ this.userCallbackKinds.remove(CallbackKind.CREDENTIAL); } break; case SET_REALM: this.userCallbackKinds.remove(CallbackKind.REALM); break; case SET_PARAM_SPECS: this.userCallbackKinds.remove(CallbackKind.PARAMETERS); break; case SET_KEY_MGR_FAC: this.userCallbackKinds.remove(CallbackKind.PEER_CREDENTIAL); break; case SET_USER_CB_KINDS: if (this.principal != null) { sanitazeOnMutation(SET_PRINCIPAL); } <START> if (this.credentialSource != null) { <END> sanitazeOnMutation(SET_CRED_SOURCE); } if (this.setRealm != null) { sanitazeOnMutation(SET_REALM); } if (this.parameterSpecs != null) { sanitazeOnMutation(SET_PARAM_SPECS); } if (this.keyManagerFactory != null) { sanitazeOnMutation(SET_KEY_MGR_FAC); } break; default: break; } }catch(Exception e){ e.printStackTrace(); } }</code><technical_language>I guess this needs check for IdentityCredentials.NONE well</technical_language>

Target:
private void sanitazeOnMutation(final int what) { switch (what) { case SET_PRINCIPAL: if (this.principal != null && ! this.principal.equals(AnonymousPrincipal.getInstance())) { this.userCallbackKinds.remove(CallbackKind.PRINCIPAL); } break; case SET_CRED_SOURCE: if (this.credentialSource != null && ! this.credentialSource.equals(IdentityCredentials.NONE)) { this.userCallbackKinds.remove(CallbackKind.CREDENTIAL); } break; case SET_REALM: this.userCallbackKinds.remove(CallbackKind.REALM); break; case SET_PARAM_SPECS: this.userCallbackKinds.remove(CallbackKind.PARAMETERS); break; case SET_KEY_MGR_FAC: this.userCallbackKinds.remove(CallbackKind.PEER_CREDENTIAL); break; case SET_USER_CB_KINDS: if (this.principal != null) { sanitazeOnMutation(SET_PRINCIPAL); } if (this.credentialSource != null) { sanitazeOnMutation(SET_CRED_SOURCE); } if (this.setRealm != null) { sanitazeOnMutation(SET_REALM); } if (this.parameterSpecs != null) { sanitazeOnMutation(SET_PARAM_SPECS); } if (this.keyManagerFactory != null) { sanitazeOnMutation(SET_KEY_MGR_FAC); } break; } }
Source:
<code>public Object apply(RevisionResource rsrc, Input input) <START> throws NoSuchChangeException, OrmException, <END> IOException, ResourceConflictException { final PatchSet patchSet = rsrc.getPatchSet(); final PatchSet.Id patchSetId = patchSet.getId(); final Change change = rsrc.getChange(); if (!patchSet.isDraft()) { throw new ResourceConflictException("patch set is not a draft."); } if (!rsrc.getControl().canDeleteDraft(dbProvider.get())) { throw new ResourceConflictException( "Not permitted to delete this draft patch set"); } ChangeUtil.deleteOnlyDraftPatchSet(patchSet, change, gitManager, gitRefUpdated, dbProvider.get()); if (dbProvider.get().patchSets().byChange( change.getId()).toList().size() == 0) { ChangeUtil.deleteDraftChange(patchSetId, gitManager, gitRefUpdated, dbProvider.get()); } else { if (change.currentPatchSetId().equals(patchSetId)) { try { updateCurrentPatchSet(dbProvider.get(), change, previousPatchSetInfo(patchSetId)); } catch (PatchSetInfoNotAvailableException e) { throw new NoSuchChangeException(change.getId()); } } } return Response.none(); }</code><technical_language>NoSuchChangeException converted ResourceNotFoundException caller 404 instead of 500 Internal Server Error</technical_language>

Target:
public Object apply(RevisionResource rsrc, Input input) throws ResourceNotFoundException, AuthException, OrmException, IOException, ResourceConflictException { PatchSet patchSet = rsrc.getPatchSet(); PatchSet.Id patchSetId = patchSet.getId(); Change change = rsrc.getChange(); if (!patchSet.isDraft()) { throw new ResourceConflictException("Patch set is not a draft."); } if (!rsrc.getControl().canDeleteDraft(dbProvider.get())) { throw new AuthException("Not permitted to delete this draft patch set"); } deleteDraftPatchSet(patchSet, change); deleteOrUpdateDraftChange(patchSetId, change); return Response.none(); }
Source:
<code>public void onLiveInstanceChange(List<LiveInstance> liveInstances, NotificationContext changeContext) { logger.trace("Live instance change triggered from with: {}", dcName, liveInstances); updateInstanceLiveness(liveInstances); <START> if (!liveStateInitialized) { <END> logger.info("Received initial notification for live instance change from {}", dcName); liveStateInitialized = true; } helixClusterManagerMetrics.liveInstanceChangeTriggerCount.inc(); }</code><technical_language>minor: this is a lock, AtomicBoolean compareAndSet()</technical_language>

Target:
public void onLiveInstanceChange(List<LiveInstance> liveInstances, NotificationContext changeContext) { logger.trace("Live instance change triggered from with: {}", dcName, liveInstances); updateInstanceLiveness(liveInstances); if (!liveStateInitialized.get()) { logger.info("Received initial notification for live instance change from {}", dcName); liveStateInitialized.set(true); } helixClusterManagerMetrics.liveInstanceChangeTriggerCount.inc(); }
Source:
<code>public long getTimeForPoint(int x) { return UIThreadRunnable.syncExec((Result<Long>) () -> { Rectangle bounds = widget.getBounds(); Point p = new Point(x, bounds.y + bounds.height / 2); if (!bounds.contains(p)) { <START> return null; <END> } long time = widget.getTimeAtX(x); return time; }); }</code><technical_language>NullPointerException (can't cast long)</technical_language>

Target:
public @Nullable Long getTimeForPoint(int x) { return UIThreadRunnable.syncExec((Result<@Nullable Long>) () -> { Rectangle bounds = widget.getBounds(); Point p = new Point(x, bounds.y + bounds.height / 2); if (!bounds.contains(p)) { return null; } return widget.getTimeAtX(x); }); }
Source:
<code>public void buildAndInstallSkipDepsExistentProject() throws Exception{ DefaultRemoteExecutor executor = new DefaultRemoteExecutor(executorService); CompletableFuture<KieCompilationResponse> futureRes = executor.buildAndInstall(Paths.get(tmpRoot.toAbsolutePath()+"/dummy").toAbsolutePath().toString(), mavenRepo.toString(), Boolean.TRUE); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isTrue(); assertThat(res.getDependencies()).isEmpty(); <START> assertThat(res.getDependencies()).hasSize(0); <END> }</code><technical_language>Please remove redundant assertThat(res.getDependencies()).hasSize(0); - assertion is expressed isEmpty() line above. is present 10x in this PR (ctrl + f assertThat(res.getDependencies()).hasSize(0);)</technical_language>

Target:
public void buildAndInstallSkipDepsExistentProject() throws Exception{ DefaultRemoteExecutor executor = new DefaultRemoteExecutor(executorService); CompletableFuture<KieCompilationResponse> futureRes = executor.buildAndInstall(Paths.get(tmpRoot.toAbsolutePath()+"/dummy").toAbsolutePath().toString(), mavenRepo.toString(), Boolean.TRUE); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isTrue(); assertThat(res.getDependencies()).isEmpty(); }
Source:
<code>@Test public void unableToConnectWrongCredentials() { configureDefaultSSHSlaveLauncher().pwdCredentials("unexsisting", "unexsisting"); slave.save(); elasticSleep(3000); <START> verifyLog("Authentication failed"); <END> }</code><technical_language>need sleep - waitUntil log contains... a timeout,</technical_language>

Target:
@Test public void unableToConnectWrongCredentials() { configureDefaultSSHSlaveLauncher().pwdCredentials("unexsisting", "unexsisting"); slave.save(); waitForLogMessage("Authentication failed"); }
Source:
<code>public boolean hasTriggerIdCriteria() { <START> return null != triggerId || !isEmpty(triggerIds); <END> }</code><technical_language>This return !isEmpty(triggerId) || !isEmpty(triggerIds);</technical_language>

Target:
public boolean hasTriggerIdCriteria() { return !isEmpty(triggerId) || !isEmpty(triggerIds); }
Source:
<code><START> private Filter getQueriesFilter(List<String> queryIds) { <END> return filterBuilder.allOf( filterBuilder.attribute(Core.METACARD_TAGS).is().text(QUERY_TAG), filterBuilder.anyOf( queryIds .stream() .map(id -> filterBuilder.attribute(Core.ID).is().text(id)) .collect(Collectors.toList()))); }</code><technical_language>Consider assigning some of expressions local variables reduce nesting</technical_language>

Target:
private Filter getQueriesFilter(List<String> queryIds) { List<Filter> queryFilters = queryIds .stream() .map(id -> filterBuilder.attribute(Core.ID).is().text(id)) .collect(Collectors.toList()); return filterBuilder.allOf( filterBuilder.attribute(Core.METACARD_TAGS).is().text(QUERY_TAG), filterBuilder.anyOf(queryFilters)); }
Source:
<code>public void purge(EncounterProvider delegate, RequestContext context) throws ResponseException { <START> delegate.getEncounter().removeProvider(delegate.getEncounterRole(),delegate.getProvider()); <END> }</code><technical_language>purge is removing element list i.e. delegate.getEncounter().getEncounterProviders(). delegate.getEncounter().removeProvider voids element</technical_language>

Target:
public void purge(EncounterProvider delegate, RequestContext context) throws ResponseException { throw new ResourceDoesNotSupportOperationException(); }
Source:
<code>filters(RecordQueryBuilder<I, R> builder, RecordSpec<I, R, ?> spec, TargetFilters filters) { <START> if (filters.getFilterCount() > 0) { <END> List<CompositeFilter> compositeFilters = filters.getFilterList(); for (CompositeFilter composite : compositeFilters) { CompositeFilter.CompositeOperator compositeOperator = composite.getOperator(); switch (compositeOperator) { case ALL: convert(composite, spec, builder); break; case EITHER: builder.either((either) -> convert(composite, spec, either)); break; case UNRECOGNIZED: case CCF_CO_UNDEFINED: default: throw newIllegalArgumentException( "Unsupported composite operator `%s` encountered.", compositeOperator); } } } }</code><technical_language>do want check count? generated code List instance anyway. if inline compositeFilters variable remove if check? this method tested. If wanted more obvious if list is empty, do beginning of method return right if so</technical_language>

Target:
filters(RecordQueryBuilder<I, R> builder, RecordSpec<I, R, ?> spec, TargetFilters filters) { for (CompositeFilter composite : filters.getFilterList()) { CompositeFilter.CompositeOperator compositeOperator = composite.getOperator(); switch (compositeOperator) { case ALL: convert(composite, spec, builder); break; case EITHER: builder.either((either) -> convert(composite, spec, either)); break; case UNRECOGNIZED: case CCF_CO_UNDEFINED: default: throw newIllegalArgumentException( "Unsupported composite operator `%s` encountered.", compositeOperator); } } }
Source:
<code><START> public String update(Request request, Response response) { <END> final String materialName = request.params(MATERIAL_NAME); final SCM existingSCM = fetchEntityFromConfig(materialName); final SCM scmFromRequest = buildEntityFromRequestBody(request); if (isRenameAttempt(existingSCM.getId(), scmFromRequest.getId()) || isRenameAttempt(existingSCM.getName(), scmFromRequest.getName())) { throw haltBecauseRenameOfEntityIsNotSupported(getEntityType().getEntityNameLowerCase()); } if (isPutRequestStale(request, existingSCM)) { throw haltBecauseEtagDoesNotMatch(getEntityType().getEntityNameLowerCase(), existingSCM.getId()); } final HttpLocalizedOperationResult operationResult = new HttpLocalizedOperationResult(); pluggableScmService.updatePluggableScmMaterial(currentUsername(), scmFromRequest, operationResult, getIfMatch(request)); return handleCreateOrUpdateResponse(request, response, scmFromRequest, operationResult); }</code><technical_language>handling updates SCM's ConfigRepo</technical_language>

Target:
public String update(Request request, Response response) { final String materialName = request.params(MATERIAL_NAME); final SCM existingSCM = fetchEntityFromConfig(materialName); final SCM scmFromRequest = buildEntityFromRequestBody(request); if (isRenameAttempt(existingSCM.getId(), scmFromRequest.getId()) || isRenameAttempt(existingSCM.getName(), scmFromRequest.getName())) { throw haltBecauseRenameOfEntityIsNotSupported(getEntityType().getEntityNameLowerCase()); } haltIfEntityIsDefinedRemotely(existingSCM); if (isPutRequestStale(request, existingSCM)) { throw haltBecauseEtagDoesNotMatch(getEntityType().getEntityNameLowerCase(), existingSCM.getId()); } final HttpLocalizedOperationResult operationResult = new HttpLocalizedOperationResult(); pluggableScmService.updatePluggableScmMaterial(currentUsername(), scmFromRequest, operationResult, getIfMatch(request)); return handleCreateOrUpdateResponse(request, response, scmFromRequest, operationResult); }
Source:
<code>default void addGutterItem(int lineStart, int lineEnd, String gutterId, Element element) { <START> addGutterItem(lineStart, gutterId, element); <END> }</code><technical_language>for (int i = lineStart; i <= lineEnd; i++) { addGutterItem(i, element); }</technical_language>

Target:
default void addGutterItem(int lineStart, int lineEnd, String gutterId, Element element) { for (int i = lineStart; i <= lineEnd; i++) { addGutterItem(i, gutterId, element); } }
Source:
<code><START> public String getExternalId() <END> { try { for (ImmutablePair<String, String> identifier : this .<ImmutablePair<String, String>>getData("identifiers")) { if (identifier.getKey().equalsIgnoreCase("external_id")) { return identifier.getValue(); } } } catch (Exception ex) { return null; } return null; }</code><technical_language>this is a mock patient, return null here</technical_language>

Target:
public String getExternalId() { return null; }
Source:
<code>public final static String encrypt(String source, String certificateFile, String passwd, String alias) throws Exception { try { String result = ""; <START> if (!StringHelper.isNullOrEmpty(source.trim())) { <END> KeyStore store = EncryptionUtils.getKeyStore(certificateFile, passwd, certType); result = encrypt(source, store.getCertificate(alias)); } return result; } catch (Exception e) { log.error("Error doing the encryption", e); throw e; } }</code><technical_language>StringUtils.isNotEmpty(source)</technical_language>

Target:
public final static String encrypt(String source, String certificateFile, String passwd, String alias) throws Exception { try { String result = ""; if (source.trim().length() > 0) { KeyStore store = EncryptionUtils.getKeyStore(certificateFile, passwd, certType); result = encrypt(source, store.getCertificate(alias)); } return result; } catch (Exception e) { log.error("Error doing the encryption", e); throw e; } }
Source:
<code>public static void register(MBeanServer mBeanServer, Object mbean, String type, String name) { try { ObjectName objectName = objectNameFor(type, name); if (!mBeanServer.isRegistered(objectName)) { mBeanServer.registerMBean(mbean, objectName); } } catch (Exception e) { <START> throw new RuntimeException(e); <END> } }</code><technical_language>Throwables.propagate? is narrow types of exception caught here</technical_language>

Target:
public static void register(MBeanServer mBeanServer, Object mbean, String type, String name) { try { ObjectName objectName = objectNameFor(type, name); if (!mBeanServer.isRegistered(objectName)) { mBeanServer.registerMBean(mbean, objectName); } } catch (OperationsException e) { Throwables.propagate(e); } catch (MBeanRegistrationException e) { Throwables.propagate(e); } }
Source:
<code>public void recordsLeaderPingTimeout() { <START> when(pingableLeader.ping()).thenAnswer(bla -> { <END> Thread.sleep(10_000); return true; }); when(pingableLeader.getUUID()).thenReturn(REMOTE_UUID.toString()); LeaderPinger pinger = pingerWithTimeout(Duration.ofMillis(100)); assertThat(pinger.pingLeaderWithUuid(REMOTE_UUID)).isFalse(); verify(recorder).recordLeaderPingTimeout(); verifyNoMoreInteractions(recorder); }</code><technical_language>nit: unused $ please</technical_language>

Target:
public void recordsLeaderPingTimeout() { when(pingableLeader.ping()).thenAnswer($ -> { Thread.sleep(10_000); return true; }); when(pingableLeader.getUUID()).thenReturn(REMOTE_UUID.toString()); LeaderPinger pinger = pingerWithTimeout(Duration.ofMillis(100)); assertThat(pinger.pingLeaderWithUuid(REMOTE_UUID)).isFalse(); verify(recorder).recordLeaderPingTimeout(); verifyNoMoreInteractions(recorder); }
Source:
<code>public void updated(Map<String, Object> properties) { logger.info("Updated Heater..."); this.properties = properties; for (String s : properties.keySet()) { <START> logger.info("Update - " + s + ": " + properties.get(s)); <END> } doUpdate(true); logger.info("Updated Heater... Done."); }</code><technical_language>I spotted this one... Update - {}: ... a lines above</technical_language>

Target:
public void updated(Map<String, Object> properties) { logger.info("Updated Heater..."); this.properties = properties; for (String s : properties.keySet()) { logger.info("Update - {}: {}", s, properties.get(s)); } doUpdate(true); logger.info("Updated Heater... Done."); }
Source:
<code>public void testIsValid() { Month month = MonthDay.now().getMonth(); int day = MonthDay.now().getDayOfMonth(); <START> MonthDay future = MonthDay.of( month.plus( 1 ), day ); <END> MonthDay past = MonthDay.of( month.minus( 1 ), day ); assertTrue( constraint.isValid( null, null ) ); assertTrue( constraint.isValid( past, null ) ); assertFalse( constraint.isValid( future, null ) ); }</code><technical_language>This rollover problems well!</technical_language>

Target:
public void testIsValid() { Month currentMonth = MonthDay.now().getMonth(); MonthDay future = MonthDay.of( currentMonth.plus( 1 ), 15 ); MonthDay past = MonthDay.of( currentMonth.minus( 1 ), 15 ); assertTrue( constraint.isValid( null, null ), "null fails validation." ); if ( currentMonth != Month.JANUARY ) { assertTrue( constraint.isValid( past, null ), "Past MonthDay '" + past + "' fails validation."); } if ( currentMonth != Month.DECEMBER ) { assertFalse( constraint.isValid( future, null ), "Future MonthDay '" + future + "' validated as past."); } }
Source:
<code>private void handleUncommittedChanges(final Repository repository, final List<String> files) { PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { public void run() { Shell shell = PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getShell(); CleanupUncomittedChangesDialog cleanupUncomittedChangesDialog = new CleanupUncomittedChangesDialog( shell, MessageFormat .format(UIText.AbstractRebaseCommandHandler_cleanupDialog_title, <START> repository), <END> UIText.AbstractRebaseCommandHandler_cleanupDialog_text, repository, files); cleanupUncomittedChangesDialog.open(); if (cleanupUncomittedChangesDialog.shouldContinue()) { try { execute(repository); } catch (ExecutionException e) { Activator.logError(e.getMessage(), e); } } } }); }</code><technical_language>This repo name, repo</technical_language>

Target:
private void handleUncommittedChanges(final Repository repository, final List<String> files) { PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { public void run() { Shell shell = PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getShell(); String repoName = Activator.getDefault().getRepositoryUtil() .getRepositoryName(repository); CleanupUncomittedChangesDialog cleanupUncomittedChangesDialog = new CleanupUncomittedChangesDialog( shell, MessageFormat .format(UIText.AbstractRebaseCommandHandler_cleanupDialog_title, repoName), UIText.AbstractRebaseCommandHandler_cleanupDialog_text, repository, files); cleanupUncomittedChangesDialog.open(); if (cleanupUncomittedChangesDialog.shouldContinue()) { try { execute(repository); } catch (ExecutionException e) { Activator.logError(e.getMessage(), e); } } } }); }