auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public Action[] getActions(boolean context) { List<Action> actionsList = new ArrayList<Action>(); actionsList.addAll(ExplorerNodeActionVisitor.getActions(content)); actionsList.add(new FileSearchAction( NbBundle.getMessage(this.getClass(), "ImageNode.getActions.openFileSearchByAttr.text"))); Directory dir = this.getLookup().lookup(Directory.class); if (dir != null) { actionsList.add(ExtractAction.getInstance()); actionsList.add(new AbstractAction( Bundle.ImageNode_action_runIngestMods_text()) { @Override public void actionPerformed(ActionEvent e) { final RunIngestModulesDialog ingestDialog = new RunIngestModulesDialog(dir); ingestDialog.display(); } }); } final Image img = this.getLookup().lookup(Image.class); VirtualDirectory virtualDirectory = this.getLookup().lookup(VirtualDirectory.class); boolean isRootVD = false; if (virtualDirectory != null) { try { if (virtualDirectory.getParent() == null) { isRootVD = true; } } catch (TskCoreException ex) { } } if (img != null || isRootVD) { actionsList.add(new AbstractAction( Bundle.ImageNode_action_runIngestMods_text()) { @Override public void actionPerformed(ActionEvent e) { final RunIngestModulesDialog ingestDialog = new RunIngestModulesDialog(Collections.<Content>singletonList(content)); ingestDialog.display(); } }); } actionsList.add(new NewWindowViewAction( <START> NbBundle.getMessage(this.getClass(), "ImageNode.getActions.viewInNewWin.text"), this)); <END> return actionsList.toArray(new Action[0]); }</code><technical_language>Please remove extra stuff here</technical_language>

Target:
public Action[] getActions(boolean context) { List<Action> actionsList = new ArrayList<Action>(); actionsList.addAll(ExplorerNodeActionVisitor.getActions(content)); actionsList.add(new FileSearchAction( Bundle.ImageNode_getActions_openFileSearchByAttr_text())); actionsList.add(new AbstractAction( Bundle.ImageNode_action_runIngestMods_text()) { @Override public void actionPerformed(ActionEvent e) { final RunIngestModulesDialog ingestDialog = new RunIngestModulesDialog(Collections.<Content>singletonList(content)); ingestDialog.display(); } }); actionsList.add(new NewWindowViewAction( NbBundle.getMessage(this.getClass(), "ImageNode.getActions.viewInNewWin.text"), this)); return actionsList.toArray(new Action[0]); }
Source:
<code>protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { HealthCheckService healthCheckService = Globals.getDefaultBaseServiceLocator().getService(HealthCheckService.class); fish.payara.nucleus.healthcheck.HealthCheckService payaraHealthCheckService = Globals.getDefaultBaseServiceLocator().getService(fish.payara.nucleus.healthcheck.HealthCheckService.class); if (healthCheckService == null) { throw new ServletException("Could not find Health Check Service"); } if (!healthCheckService.isEnabled()) { response.sendError(SC_FORBIDDEN, "MicroProfile Health Check Service is disabled"); return; } for (Checker checker : payaraHealthCheckService.getConfiguration().getCheckerList()) { String checkName = checker.getName(); <START> System.out.println("Checker name = " + checkName); <END> if (Boolean.valueOf(checker.getEnabled()) && Boolean.valueOf(checker.getDisplayOnHealthEndpoint())) { PayaraHealthCheck payaraHealthCheck = new PayaraHealthCheck(); payaraHealthCheck.setName(checkName); BaseHealthCheck check = payaraHealthCheckService.getCheck(checkName); check.doCheck(); if (check.getChecksDone() > 0) { payaraHealthCheck.setHealthStatus(check.getMostRecentCumulativeStatus() == null ? "" : check.getMostRecentCumulativeStatus().name()); payaraHealthCheck.setHealthCheckResult(check.getMostRecentCumulativeResult()); } healthCheckService.registerHealthCheck(checkName, payaraHealthCheck, READINESS); } else { healthCheckService.unregisterHealthCheck(checkName); } } healthCheckService.performHealthChecks(response, HealthCheckType.fromPath(request.getPathInfo())); }</code><technical_language>Sysout..</technical_language>

Target:
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { HealthCheckService healthCheckService = Globals.getDefaultBaseServiceLocator().getService(HealthCheckService.class); if (healthCheckService == null) { throw new ServletException("Could not find Health Check Service"); } if (!healthCheckService.isEnabled()) { response.sendError(SC_FORBIDDEN, "MicroProfile Health Check Service is disabled"); return; } healthCheckService.performHealthChecks(response, HealthCheckType.fromPath(request.getPathInfo()), request.getParameter("pretty")); }
Source:
<code>public PreparedPutIterableContentValues prepare() { <START> Checks.checkNotNull(putResolver, "Please specify put resolver"); <END> return new PreparedPutIterableContentValues( storIOSQLiteDb, putResolver, contentValuesIterable, useTransactionIfPossible ); }</code><technical_language>Static import</technical_language>

Target:
public PreparedPutIterableContentValues prepare() { checkNotNull(putResolver, "Please specify put resolver"); return new PreparedPutIterableContentValues( storIOSQLiteDb, putResolver, contentValuesIterable, useTransactionIfPossible ); }
Source:
<code>protected void verifyQuery(AbstractStatisticalQuery<HostNIC, VdsNetworkInterface> query, VdsNetworkInterface entity) throws Exception { assertEquals(HostNIC.class, query.getParentType()); assertSame(entity, query.resolve(NIC_ID)); List<Statistic> statistics = query.getStatistics(entity); verifyStatistics(statistics, new String[] { "data.current.rx", "data.current.tx", "errors.total.rx", "errors.total.tx" }, <START> new BigDecimal[] { asDec(RxTxCalculator.calcRxTx(50, 10D)), asDec(RxTxCalculator.calcRxTx(50, 20D)), <END> asDec(30), asDec(40) }); Statistic adopted = query.adopt(new Statistic()); assertTrue(adopted.isSetHostNic()); assertEquals(NIC_ID.toString(), adopted.getHostNic().getId()); assertTrue(adopted.getHostNic().isSetHost()); assertEquals(GUIDS[0].toString(), adopted.getHostNic().getHost().getId()); }</code><technical_language>convert 50, 100 constants reuse in places pointing manually</technical_language>

Target:
protected void verifyQuery(AbstractStatisticalQuery<HostNIC, VdsNetworkInterface> query, VdsNetworkInterface entity) throws Exception { assertEquals(HostNIC.class, query.getParentType()); assertSame(entity, query.resolve(NIC_ID)); List<Statistic> statistics = query.getStatistics(entity); verifyStatistics(statistics, new String[] { "data.current.rx", "data.current.tx", "errors.total.rx", "errors.total.tx" }, new BigDecimal[] { asDec(RxTxCalculator.percent2bytes(SPEED, RECEIVE_RATE)), asDec(RxTxCalculator.percent2bytes(SPEED, TRANSMIT_RATE)), asDec(RECEIVE_DROP_RATE), asDec(TRANSMIT_DROP_RATE) }); Statistic adopted = query.adopt(new Statistic()); assertTrue(adopted.isSetHostNic()); assertEquals(NIC_ID.toString(), adopted.getHostNic().getId()); assertTrue(adopted.getHostNic().isSetHost()); assertEquals(GUIDS[0].toString(), adopted.getHostNic().getHost().getId()); }
Source:
<code>public DockerTemplate getTemplate(Label label) { for (DockerTemplate t : templates) { if(label == null && !t.getToggleMode()) { return t; <START> } else if (label.matches(t.getLabelSet())) { <END> return t; } } return null; }</code><technical_language>Merge if</technical_language>

Target:
public DockerTemplate getTemplate(Label label) { for (DockerTemplate t : templates) { if(label != null && label.matches(t.getLabelSet())) { return t; } else if(label == null && t.getLabelSet().size() == 0) { return t; } } return null; }
Source:
<code>public List<Key> listKeysCreatedBefore(Date beforeDate) { DatastoreService datastore = DatastoreServiceFactory.getDatastoreService(); com.google.appengine.api.datastore.Query q = new com.google.appengine.api.datastore.Query("Message"); q.setKeysOnly(); q.setFilter(new Query.FilterPredicate( "createdDateTime", FilterOperator.LESS_THAN_OR_EQUAL, beforeDate)); PreparedQuery pq = datastore.prepare(q); <START> FetchOptions fetchOptions; <END> fetchOptions = FetchOptions.Builder.withDefaults(); List<Key> result = new ArrayList<>(); for (Entity e: pq.asIterable(fetchOptions)) { result.add(e.getKey()); } return result; }</code><technical_language>suggestion FetchOptions fetchOptions = FetchOptions.Builder.withDefaults();</technical_language>

Target:
public List<Key> listKeysCreatedBefore(Date beforeDate) { DatastoreService datastore = DatastoreServiceFactory.getDatastoreService(); com.google.appengine.api.datastore.Query q = new com.google.appengine.api.datastore.Query("Message"); q.setKeysOnly(); q.setFilter(new Query.FilterPredicate( "createdDateTime", FilterOperator.LESS_THAN_OR_EQUAL, beforeDate)); PreparedQuery pq = datastore.prepare(q); List<Key> result = new ArrayList<>(); for (Entity e: pq.asIterable()) { result.add(e.getKey()); } return result; }
Source:
<code>void shouldReturnTotalNumberMoreIssues() { final Issues<Issue> issues = new Issues<>(); IssueBuilder builder = new IssueBuilder(); issues.add(builder.setCategory("errorA").build()); issues.add(builder.setCategory("errorB").build()); PropertyStatistics statistics = new PropertyStatistics(issues, "category", Function.identity()); int actualTotal = statistics.getTotal(); <START> assertThat(actualTotal).isEqualTo(2); <END> }</code><technical_language>s.o</technical_language>

Target:
void shouldReturnTotalNumberMoreIssues() { Issues<Issue> issues = new Issues<>(); IssueBuilder builder = new IssueBuilder(); issues.add(builder.setCategory("errorA").build()); issues.add(builder.setCategory("errorB").build()); PropertyStatistics statistics = new PropertyStatistics(issues, "category", Function.identity()); int actualTotal = statistics.getTotal(); assertThat(actualTotal).isEqualTo(2); }
Source:
<code>private static ArrayList<String> getStoreInfo(IEntityManagerHelper helper, String subPath) throws Exception { <START> if (helper.getStoreLocation().contains("hdfs:")) { <END> return HadoopUtil.getAllFilesHDFS(helper.getHadoopURL(), new Path(helper.getStoreLocation() + subPath)); } return runRemoteScript(helper.getQaHost(), helper.getUsername(), helper.getPassword(), "ls " + helper.getStoreLocation() + "/store" + subPath, helper.getIdentityFile()); }</code><technical_language>Change contains starts with</technical_language>

Target:
private static ArrayList<String> getStoreInfo(IEntityManagerHelper helper, String subPath) throws Exception { if (helper.getStoreLocation().startsWith("hdfs:")) { return HadoopUtil.getAllFilesHDFS(helper.getStoreLocation(), helper.getStoreLocation() + subPath); } else { return runRemoteScript(helper.getQaHost(), helper.getUsername(), helper.getPassword(), "ls " + helper.getStoreLocation() + "/store" + subPath, helper.getIdentityFile()); } }
Source:
<code>private V computeInternal(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, boolean computeIfPresent, Metadata metadata, long flags) { assertKeyNotNull(key); assertFunctionNotNull(remappingFunction); InvocationContext ctx = getInvocationContextWithImplicitTransaction(false, 1); ComputeCommand command = commandsFactory.buildComputeCommand(key, remappingFunction, computeIfPresent, metadata, flags); <START> ctx.setLockOwner(command.getKeyLockOwner()); <END> return (V) executeCommandAndCommitIfNeeded(ctx, command); }</code><technical_language>This needs changed support locked stream syntax now</technical_language>

Target:
private V computeInternal(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, boolean computeIfPresent, Metadata metadata, long flags) { return computeInternal(key, remappingFunction, computeIfPresent, metadata, flags, getInvocationContextWithImplicitTransaction(false, 1)); }
Source:
<code>public String toString() { StringBuilder sb = new StringBuilder(); <START> sb.append("PutRequest["); <END> sb.append("BlobID=").append(blobId.getID()); sb.append(", ").append("ClientId=").append(clientId); sb.append(", ").append("CorrelationId=").append(correlationId); if (properties != null) { sb.append(", ").append(getBlobProperties()); } else { sb.append(", ").append("Properties=Null"); } if (usermetadata != null) { sb.append(", ").append("UserMetaDataSize=").append(getUsermetadata().capacity()); } else { sb.append(", ").append("UserMetaDataSize=0"); } sb.append(", ").append("blobType=").append(getBlobType()); sb.append(", ").append("blobSize=").append(getBlobSize()); sb.append("]"); return sb.toString(); }</code><technical_language>V1 is removed</technical_language>

Target:
public String toString() { StringBuilder sb = new StringBuilder(); sb.append("PutRequest["); sb.append("BlobID=").append(blobId.getID()); sb.append(", ").append("ClientId=").append(clientId); sb.append(", ").append("CorrelationId=").append(correlationId); if (properties != null) { sb.append(", ").append(properties); } else { sb.append(", ").append("Properties=Null"); } if (usermetadata != null) { sb.append(", ").append("UserMetaDataSize=").append(usermetadata.capacity()); } else { sb.append(", ").append("UserMetaDataSize=0"); } sb.append(", ").append("blobType=").append(blobType); sb.append(", ").append("blobSize=").append(blobSize); sb.append("]"); return sb.toString(); }
Source:
<code>public String createDispoAnnotation(String programId, String itemId, DispoAnnotationData annotation) { String idOfNewAnnotation = ""; DispoItem dispoItem = getQuery().findDispoItemById(programId, itemId); if (dispoItem != null) { dataFactory.initAnnotation(annotation); idOfNewAnnotation = dataFactory.getNewId(); annotation.setId(idOfNewAnnotation); validateResolution(annotation); boolean isValid = annotation.getIsValid(); JSONArray discrepanciesList = dispoItem.getDiscrepanciesList(); if (isValid) { dispoConnector.connectAnnotation(annotation, discrepanciesList); isValid = annotation.getIsValid(); } JSONObject annotationsList = dispoItem.getAnnotationsList(); try { annotationsList.put(idOfNewAnnotation, DispoUtil.annotationToJsonObj(annotation)); } catch (JSONException ex) { throw new OseeCoreException(ex); } String currentStatus = dispoItem.getStatus(); boolean updateStatus = false; <START> if (!currentStatus.equals("COMPLETE") && !currentStatus.equals("PASS") && isValid) { <END> updateStatus = true; } DispoItem updatedItem = dataFactory.createUpdatedItem(annotationsList, discrepanciesList, updateStatus); ArtifactReadable author = getQuery().findUser(); getWriter().updateDispoItem(author, programId, dispoItem.getGuid(), updatedItem); } return idOfNewAnnotation; }</code><technical_language>COMPLETE, PASS other status values constants in DispoItem</technical_language>

Target:
public String createDispoAnnotation(String programId, String itemId, DispoAnnotationData annotation) { String idOfNewAnnotation = ""; DispoItem dispoItem = getQuery().findDispoItemById(programId, itemId); if (dispoItem != null) { dataFactory.initAnnotation(annotation); idOfNewAnnotation = dataFactory.getNewId(); annotation.setId(idOfNewAnnotation); validateResolution(annotation); boolean isValid = annotation.getIsValid(); JSONArray discrepanciesList = dispoItem.getDiscrepanciesList(); if (isValid) { dispoConnector.connectAnnotation(annotation, discrepanciesList); isValid = annotation.getIsValid(); } JSONObject annotationsList = dispoItem.getAnnotationsList(); try { annotationsList.put(idOfNewAnnotation, DispoUtil.annotationToJsonObj(annotation)); } catch (JSONException ex) { throw new OseeCoreException(ex); } String currentStatus = dispoItem.getStatus(); boolean updateStatus = false; if (!currentStatus.equals(Item_Complete) && !currentStatus.equals(Item_Pass) && isValid) { updateStatus = true; } DispoItem updatedItem = dataFactory.createUpdatedItem(annotationsList, discrepanciesList, updateStatus); ArtifactReadable author = getQuery().findUser(); getWriter().updateDispoItem(author, programId, dispoItem.getGuid(), updatedItem); } return idOfNewAnnotation; }
Source:
<code>public ResponseEntity<String> visualizeNetworks(@ProjectIdentifier @PathVariable("projectId") String projectid, @PathVariable("networkId") String networkId, Principal principal, @CheckAccess @InjectProject IProject project) { ITransformedNetwork transformedNetwork = null; try { <START> transformedNetwork = transformationManager.getTransformedNetwork(networkId); <END> } catch (QuadrigaStorageException qse) { logger.error("Error while retrieving networks for display:", qse); return new ResponseEntity<String>("", HttpStatus.INTERNAL_SERVER_ERROR); } String json = null; if (transformedNetwork != null) { json = jsonCreator.getJson(transformedNetwork.getNodes(), transformedNetwork.getLinks()); } else { return new ResponseEntity<String>(json, HttpStatus.NOT_FOUND); } return new ResponseEntity<String>(json, HttpStatus.OK); }</code><technical_language>If user rights project, a network id a project, this allow a user networks of other projects (assuming a network id)</technical_language>

Target:
public ResponseEntity<String> visualizeNetworks(@ProjectIdentifier @PathVariable("projectId") String projectid, @PathVariable("networkId") String networkId, Principal principal, @CheckAccess @InjectProject IProject project) throws QuadrigaStorageException { boolean isValid = false; try { isValid = nwManager.getNetworkIdsInProject(project.getProjectId()).contains(networkId); } catch (QuadrigaStorageException e) { logger.error("Encountered an error while retrieving the json string", e); return new ResponseEntity<String>("", HttpStatus.INTERNAL_SERVER_ERROR); } if (isValid) { return nwUtils.sendNetworkAsResponseEntity(networkId); } else { return new ResponseEntity<String>("", HttpStatus.UNAUTHORIZED); } }
Source:
<code>private ComponentDto findProject(DbSession dbSession, OrganizationDto organization, SearchWsRequest request) { if (request.getProjectKey() == null) { return null; } ComponentDto project = componentFinder.getByKey(dbSession, request.getProjectKey()); if (!project.getOrganizationUuid().equals(organization.getUuid())) { throwNotFound(project); } if (project.isRoot()) { return project; } ComponentDto component = dbClient.componentDao().selectByUuid(dbSession, project.projectUuid()).orNull(); <START> checkState(component != null, "Project uuid of component uuid '%s' does not exist", project.uuid()); <END> return component; }</code><technical_language>![MAJOR](<LINK_0> 'Severity: MAJOR') Invoke method(s) conditionally. [![rule](<LINK_1>](<LINK_2></technical_language>

Target:
private ComponentDto findProject(DbSession dbSession, OrganizationDto organization, SearchWsRequest request) { if (request.getProjectKey() == null) { return null; } ComponentDto project = componentFinder.getByKey(dbSession, request.getProjectKey()); if (!project.getOrganizationUuid().equals(organization.getUuid())) { throw new NotFoundException(format("Component key '%s' not found", project.getKey())); } if (project.isRoot()) { return project; } ComponentDto component = dbClient.componentDao().selectByUuid(dbSession, project.projectUuid()).orNull(); checkState(component != null, "Project uuid of component uuid '%s' does not exist", project.uuid()); return component; }
Source:
<code><START> private boolean makeJarBackup(File jarFile) { <END> log("Making JAR backup"); for (int i = 0; i < MAX_RETRY; i++) { if (moveFileToBackup(jarFile)) { return true; } log("Failed to make backup. Might be due to original JAR still in use."); try { log("Wait for a while before trying again."); Thread.sleep(WAIT_TIME); } catch (InterruptedException e) { log("Failed to wait for a while"); } } log("Jar file cannot be backed up. Most likely is in use by another process."); return false; }</code><technical_language>This method is specific jar files, right?. Write in a more general way</technical_language>

Target:
private void makeJarBackup(File jarFile) throws IOException { log("Making JAR backup"); for (int i = 0; i < MAX_RETRY; i++) { try { moveFileToBackup(jarFile); return; } catch (IOException e) { log(String.format("Failed to move file %s to backup. Might be due to original JAR still in use.", jarFile.getName())); } try { log("Wait for a while before trying again."); Thread.sleep(WAIT_TIME); } catch (InterruptedException e) { log("Failed to wait for a while"); } } throw new IOException("Jar file cannot be backed up. Most likely is in use by another process."); }
Source:
<code>public void beforeDestroy(BeforeDestroyEvent event, EntityRef player, CharacterComponent characterComponent, AliveCharacterComponent aliveCharacterComponent) { if (player.hasComponent(PlayerCharacterComponent.class)) { event.consume(); logger.info(player.toFullDescription()); String team = player.getComponent(LASTeamComponent.class).team; <START> player.send(new DoHealEvent(100000, player)); <END> player.send(new CharacterTeleportEvent(LASUtils.getTeleportDestination(team))); } }</code><technical_language>@darshan3 magic number 100000 mean? a constant</technical_language>

Target:
public void beforeDestroy(BeforeDestroyEvent event, EntityRef player, CharacterComponent characterComponent, AliveCharacterComponent aliveCharacterComponent) { if (player.hasComponent(PlayerCharacterComponent.class)) { event.consume(); String team = player.getComponent(LASTeamComponent.class).team; player.send(new DoHealEvent(100000, player)); player.send(new CharacterTeleportEvent(LASUtils.getTeleportDestination(team))); } }
Source:
<code>public String exportWorklistAsZip(List<DocumentModel> documents, boolean exportAllBlobs) { try { <START> DownloadService dnd = Framework.getService(DownloadService.class); <END> DocumentListZipExporter zipExporter = new DocumentListZipExporter(); File tmpFile = zipExporter.exportWorklistAsZip(documents, documentManager, exportAllBlobs); if (tmpFile == null) { facesMessages.add(StatusMessage.Severity.INFO, messages.get("label.clipboard.emptyDocuments")); return null; } try { Blob blob = new FileBlob("zip"); blob.setMimeType("application/zip"); blob.setFilename("clipboard.zip"); Files.move(tmpFile.toPath(), blob.getFile().toPath(), StandardCopyOption.REPLACE_EXISTING); String key = dnd.store(Collections.singletonList(new FileBlob(tmpFile))); String url = BaseURL.getBaseURL() + "/" + dnd.getDownloadUrl(key); ExternalContext context = FacesContext.getCurrentInstance().getExternalContext(); context.redirect(url); return ""; } finally { tmpFile.delete(); } } catch (IOException io) { throw new NuxeoException("Error while redirecting for clipboard content", io); } }</code><technical_language>Please call variable downloadService</technical_language>

Target:
public String exportWorklistAsZip(List<DocumentModel> documents, boolean exportAllBlobs) { Blob blob = null; try { DownloadService downloadService = Framework.getService(DownloadService.class); DocumentListZipExporter zipExporter = new DocumentListZipExporter(); blob = zipExporter.exportWorklistAsZip(documents, documentManager, exportAllBlobs); if (blob == null) { facesMessages.add(StatusMessage.Severity.INFO, messages.get("label.clipboard.emptyDocuments")); return null; } blob.setMimeType("application/zip"); blob.setFilename("clipboard.zip"); String key = downloadService.storeBlobs(Collections.singletonList(blob)); String url = BaseURL.getBaseURL() + "/" + downloadService.getDownloadUrl(key); ExternalContext context = FacesContext.getCurrentInstance().getExternalContext(); context.redirect(url); return ""; } catch (IOException io) { if (blob != null) { blob.getFile().delete(); } throw new NuxeoException("Error while redirecting for clipboard content", io); } }
Source:
<code>public void recognizeContent() throws IOException { File form = new File("local/file_path/filename.png"); byte[] fileContent = Files.readAllBytes(form.toPath()); InputStream inputStream = new ByteArrayInputStream(fileContent); SyncPoller<FormRecognizerOperationResult, List<FormPage>> recognizeContentPoller = formRecognizerClient.beginRecognizeContent(inputStream, form.length()); List<FormPage> contentPageResults = recognizeContentPoller.getFinalResult(); for (int i = 0; i < contentPageResults.size(); i++) { FormPage formPage = contentPageResults.get(i); System.out.printf("----Recognizing content info for page %d ----%n", i); System.out.printf("Has width: %f and height: %f, measured with unit: %s.%n", formPage.getWidth(), formPage.getHeight(), formPage.getUnit()); formPage.getTables().forEach(formTable -> { System.out.printf("Table has %d rows and %d columns.%n", formTable.getRowCount(), formTable.getColumnCount()); formTable.getCells().forEach(formTableCell -> System.out.printf("Cell has text %s.%n", formTableCell.getText())); }); formPage.getSelectionMarks().forEach(selectionMark -> { <START> StringBuilder boundingBoxStr = new StringBuilder(); selectionMark.getBoundingBox().getPoints().forEach( point -> boundingBoxStr.append(String.format("[%.2f, %.2f]", point.getX(), point.getY()))); <END> System.out.printf("Page: %s, Selection mark is %s within bounding box %s has a confidence score %.2f.%n", selectionMark.getPageNumber(), selectionMark.getState(), boundingBoxStr, selectionMark.getConfidence()); }); } }</code><technical_language>BoundingBox.toString()</technical_language>

Target:
public void recognizeContent() throws IOException { File form = new File("local/file_path/filename.png"); byte[] fileContent = Files.readAllBytes(form.toPath()); InputStream inputStream = new ByteArrayInputStream(fileContent); SyncPoller<FormRecognizerOperationResult, List<FormPage>> recognizeContentPoller = formRecognizerClient.beginRecognizeContent(inputStream, form.length()); List<FormPage> contentPageResults = recognizeContentPoller.getFinalResult(); for (int i = 0; i < contentPageResults.size(); i++) { FormPage formPage = contentPageResults.get(i); System.out.printf("----Recognizing content info for page %d ----%n", i); System.out.printf("Has width: %f and height: %f, measured with unit: %s.%n", formPage.getWidth(), formPage.getHeight(), formPage.getUnit()); formPage.getTables().forEach(formTable -> { System.out.printf("Table has %d rows and %d columns.%n", formTable.getRowCount(), formTable.getColumnCount()); formTable.getCells().forEach(formTableCell -> System.out.printf("Cell has text %s.%n", formTableCell.getText())); }); formPage.getSelectionMarks().forEach(selectionMark -> System.out.printf( "Page: %s, Selection mark is %s within bounding box %s has a confidence score %.2f.%n", selectionMark.getPageNumber(), selectionMark.getState(), selectionMark.getBoundingBox().toString(), selectionMark.getConfidence())); } }
Source:
<code><START> public static <T> T findOne(List<T> list, Predicate<T> filter) { <END> return list .stream() .filter(filter) .findFirst() .orElse(null); }</code><technical_language>put else in parameters. More useable FpKit.findfirst(list, x -> isGood(x), otherwiseThis) a supplier lazy FpKit.findfirst(list, x -> isGood(x), () -> otherwiseThis)</technical_language>

Target:
public static <T> Optional<T> findOne(List<T> list, Predicate<T> filter) { return list .stream() .filter(filter) .findFirst(); }
Source:
<code>public void testBindListWithHashPrefixParser() { handle.registerRowMapper(FieldMapper.factory(Thing.class)); handle.createUpdate("insert into thing (<columns>) values (<values>)") .setSqlParser(new HashPrefixSqlParser()) .defineList("columns", "id", "foo") .bindList("values", 3, "abc") .execute(); List<Thing> list = handle.createQuery("select id, foo from thing where id in (<ids>)") <START> .setSqlParser(new HashPrefixSqlParser()) <END> .bindList("ids", 1, 3) .mapTo(Thing.class) .list(); assertThat(list) .extracting(Thing::getId, Thing::getFoo, Thing::getBar, Thing::getBaz) .containsExactly( tuple(1, "foo1", null, null), tuple(3, "abc", null, null)); }</code><technical_language>Nit: set SQL parser handle</technical_language>

Target:
public void testBindListWithHashPrefixParser() { handle .registerRowMapper(FieldMapper.factory(Thing.class)) .setSqlParser(new HashPrefixSqlParser()); handle.createUpdate("insert into thing (<columns>) values (<values>)") .defineList("columns", "id", "foo") .bindList("values", 3, "abc") .execute(); List<Thing> list = handle.createQuery("select id, foo from thing where id in (<ids>)") .bindList("ids", 1, 3) .mapTo(Thing.class) .list(); assertThat(list) .extracting(Thing::getId, Thing::getFoo, Thing::getBar, Thing::getBaz) .containsExactly( tuple(1, "foo1", null, null), tuple(3, "abc", null, null)); }
Source:
<code>public LeafNode getNode() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { PubSubManager pubSubManager = PubSubManager.getInstance(connection()); try { pubSubManager.createNode(GeoLocation.NAMESPACE); <START> } catch (Exception e) { <END> } return pubSubManager.getNode(GeoLocation.NAMESPACE); }</code><technical_language>swallow exceptions logging them. In this case: throw them</technical_language>

Target:
private LeafNode getNode() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return PubSubManager.getInstance(connection()).getOrCreateLeafNode(GeoLocation.NAMESPACE); }
Source:
<code>private static Function<String, Pattern> createRefPatternProvider() { return input -> { try { <START> return Pattern.compile(".*\\Q" + input.trim() + "\\E.*", END> Pattern.CASE_INSENSITIVE); } catch (Exception e) { return null; } }; }</code><technical_language>"refs/(heads|tags|notes)/.*\\Q" + input.trim() + "\\E.*" +"|"+ "\\Q" + input.trim() + "\\E.*" achieve want</technical_language>

Target:
private static Function<String, Pattern> createRefPatternProvider() { return input -> { try { String quotedInput = Pattern.quote(input.trim()); return Pattern.compile( "refs/(heads|tags|notes)/.*" + quotedInput + ".*" + "|" + quotedInput + ".*", Pattern.CASE_INSENSITIVE); } catch (Exception e) { return null; } }; }
Source:
<code>public RxJavaProcessor processor() { <START> return new RxJavaProcessor<String, String>() { <END> @Override public Observable<String> process(Observable<String> inputStream) { return inputStream.map(data -> { logger.info("Got data = " + data); return data; }) .buffer(5) .map(data -> String.valueOf(avg(data))); } }; }</code><technical_language>Generics warning @Bean method return type. @SuppressWarning them. other side this converted Lambda well: java @Bean public RxJavaProcessor<String, String> processor() { return inputStream -> inputStream.map(...) ... } need worry Lambda argument type - generics return type do stuff</technical_language>

Target:
public RxJavaProcessor<String,String> processor() { return inputStream -> inputStream.map(data -> { logger.info("Got data = " + data); return data; }).buffer(5).map(data -> String.valueOf(avg(data))); }
Source:
<code>public boolean isGood() { <START> return !"unknown".equalsIgnoreCase(version); <END> }</code><technical_language>@egoebelbecker transform _"unknown"_ a class scoped static final constant</technical_language>

Target:
public boolean isGood() { return !UNKNOWN_VERSION.equalsIgnoreCase(version); }
Source:
<code>void shareScreen(Bitmap bitmap) { try { File file = new File(this.getExternalCacheDir(), "screen.png"); FileOutputStream fOut = new FileOutputStream(file); bitmap.compress(Bitmap.CompressFormat.PNG, 100, fOut); fOut.flush(); fOut.close(); file.setReadable(true, false); Uri fileUri = FileProvider.getUriForFile(getApplicationContext(), getPackageName()+".provider", file); grantUriPermission(getPackageName(), fileUri, Intent.FLAG_GRANT_READ_URI_PERMISSION); final Intent intent = new Intent(android.content.Intent.ACTION_SEND); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.putExtra(Intent.EXTRA_STREAM, fileUri); intent.setType("image/png"); <START> startActivity(Intent.createChooser(intent, getString(R.string.achiev_activity_share_screen))); <END> } catch (IOException e) { e.printStackTrace(); } }</code><technical_language>This generic, share_image_via</technical_language>

Target:
void shareScreen(Bitmap bitmap) { try { File file = new File(this.getExternalCacheDir(), "screen.png"); FileOutputStream fOut = new FileOutputStream(file); bitmap.compress(Bitmap.CompressFormat.PNG, 100, fOut); fOut.flush(); fOut.close(); file.setReadable(true, false); Uri fileUri = FileProvider.getUriForFile(getApplicationContext(), getPackageName()+".provider", file); grantUriPermission(getPackageName(), fileUri, Intent.FLAG_GRANT_READ_URI_PERMISSION); final Intent intent = new Intent(android.content.Intent.ACTION_SEND); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.putExtra(Intent.EXTRA_STREAM, fileUri); intent.setType("image/png"); startActivity(Intent.createChooser(intent, getString(R.string.share_image_via))); } catch (IOException e) { e.printStackTrace(); } }
Source:
<code>protected List<ILinkEvent> getLinkList(long startTime, long endTime, long resolution, IProgressMonitor monitor) { @SuppressWarnings("null") <START> @NonNull List<ILinkEvent> list = Collections.EMPTY_LIST; <END> return list; }</code><technical_language>Collections.emptyList();</technical_language>

Target:
protected List<ILinkEvent> getLinkList(long startTime, long endTime, long resolution, IProgressMonitor monitor) { return Collections.EMPTY_LIST; }
Source:
<code>public void testListConsumerGroupsWithStates() throws Exception { try (AdminClientUnitTestEnv env = new AdminClientUnitTestEnv(mockCluster(1, 0))) { env.kafkaClient().setNodeApiVersions(NodeApiVersions.create()); env.kafkaClient().prepareResponse(prepareMetadataResponse(env.cluster(), Errors.NONE)); env.kafkaClient().prepareResponseFrom( new ListGroupsResponse( <START> new ListGroupsResponseData() <END> .setErrorCode(Errors.NONE.code()) .setGroups(Arrays.asList( new ListGroupsResponseData.ListedGroup() .setGroupId("group-1") .setProtocolType(ConsumerProtocol.PROTOCOL_TYPE) .setGroupState("Stable"), new ListGroupsResponseData.ListedGroup() .setGroupId("group-2") .setGroupState("Empty") ))), env.cluster().nodeById(0)); final ListConsumerGroupsOptions options = new ListConsumerGroupsOptions().inAnyState(); final ListConsumerGroupsResult result = env.adminClient().listConsumerGroups(options); Collection<ConsumerGroupListing> listings = result.valid().get(); assertEquals(2, listings.size()); List<ConsumerGroupListing> expected = new ArrayList<>(); expected.add(new ConsumerGroupListing("group-2", true, ConsumerGroupState.EMPTY)); expected.add(new ConsumerGroupListing("group-1", false, ConsumerGroupState.STABLE)); assertEquals(expected, listings); assertEquals(0, result.errors().get().size()); } }</code><technical_language>nit: Alignment is weird</technical_language>

Target:
public void testListConsumerGroupsWithStates() throws Exception { try (AdminClientUnitTestEnv env = new AdminClientUnitTestEnv(mockCluster(1, 0))) { env.kafkaClient().setNodeApiVersions(NodeApiVersions.create()); env.kafkaClient().prepareResponse(prepareMetadataResponse(env.cluster(), Errors.NONE)); env.kafkaClient().prepareResponseFrom( new ListGroupsResponse(new ListGroupsResponseData() .setErrorCode(Errors.NONE.code()) .setGroups(Arrays.asList( new ListGroupsResponseData.ListedGroup() .setGroupId("group-1") .setProtocolType(ConsumerProtocol.PROTOCOL_TYPE) .setGroupState("Stable"), new ListGroupsResponseData.ListedGroup() .setGroupId("group-2") .setGroupState("Empty")))), env.cluster().nodeById(0)); final ListConsumerGroupsOptions options = new ListConsumerGroupsOptions(); final ListConsumerGroupsResult result = env.adminClient().listConsumerGroups(options); Collection<ConsumerGroupListing> listings = result.valid().get(); assertEquals(2, listings.size()); List<ConsumerGroupListing> expected = new ArrayList<>(); expected.add(new ConsumerGroupListing("group-2", true, Optional.of(ConsumerGroupState.EMPTY))); expected.add(new ConsumerGroupListing("group-1", false, Optional.of(ConsumerGroupState.STABLE))); assertEquals(expected, listings); assertEquals(0, result.errors().get().size()); } }
Source:
<code>protected ApplicationReport getApplicationByName(String appName) { List<ApplicationReport> appList = getApplicationList(); <START> if (appName == null) { <END> throw new CliException("Invalid application name provided by user"); } for (ApplicationReport ar : appList) { if ((ar.getName().equals(appName)) && (ar.getYarnApplicationState() != YarnApplicationState.KILLED) && (ar.getYarnApplicationState() != YarnApplicationState.FINISHED)) { LOG.debug("Application Name: Application ID: Application State: {}", ar.getName(), ar.getApplicationId().toString(), YarnApplicationState.FINISHED); return ar; } } return null; }</code><technical_language>move this check start of function</technical_language>

Target:
protected ApplicationReport getApplicationByName(String appName) { if (appName == null) { throw new CliException("Invalid application name provided by user"); } List<ApplicationReport> appList = getApplicationList(); for (ApplicationReport ar : appList) { if ((ar.getName().equals(appName)) && (ar.getYarnApplicationState() != YarnApplicationState.KILLED) && (ar.getYarnApplicationState() != YarnApplicationState.FINISHED)) { LOG.debug("Application Name: Application ID: Application State: {}", ar.getName(), ar.getApplicationId().toString(), YarnApplicationState.FINISHED); return ar; } } return null; }
Source:
<code>private static String stripCommentLines(String commitMessage) { StringBuilder result = new StringBuilder(); for (String line : commitMessage.split("\n")) { <START> if (!line.trim().startsWith("#")) { END> result.append(line).append("\n"); } } if (!commitMessage.endsWith("\n")) { result.deleteCharAt(result.length() - 1); } return result.toString(); }</code><technical_language>style nit: braces single line block</technical_language>

Target:
private static String stripCommentLines(String commitMessage) { StringBuilder result = new StringBuilder(); for (String line : commitMessage.split("\n")) { if (!line.trim().startsWith("#")) result.append(line).append("\n"); } if (!commitMessage.endsWith("\n")) result.deleteCharAt(result.length() - 1); return result.toString(); }
Source:
<code><START> } catch (Exception e) { <END> throw new RuntimeException("Cannot access Unsafe methods", e); }</code><technical_language>catch block needs moved line below</technical_language>

Target:
catch (Exception e) { throw new RuntimeException("Cannot access Unsafe methods", e); }
Source:
<code>public void testSemiJoin() { ExecutionContext<Object[]> ctx = executionContext(F.first(nodes()), UUID.randomUUID(), 0); ScanNode<Object[]> persons = new ScanNode<>(ctx, Arrays.asList( new Object[]{0, "Igor", 1}, new Object[]{1, "Roman", 2}, new Object[]{2, "Ivan", null}, new Object[]{3, "Alexey", 1} )); ScanNode<Object[]> deps = new ScanNode<>(ctx, Arrays.asList( new Object[]{1, "Core"}, <START> new Object[]{2, "SQL"} <END> )); SemiJoinNode<Object[]> join = new SemiJoinNode<>( ctx, r -> r[0] == r[4] ); join.register(F.asList(deps, persons)); ProjectNode<Object[]> project = new ProjectNode<>(ctx, r -> new Object[]{r[1]}); project.register(join); RootNode<Object[]> node = new RootNode<>(ctx, r -> {}); node.register(project); assert node.hasNext(); ArrayList<Object[]> rows = new ArrayList<>(); while (node.hasNext()) rows.add(node.next()); assertEquals(2, rows.size()); Assert.assertArrayEquals(new Object[]{"Core"}, rows.get(0)); Assert.assertArrayEquals(new Object[]{"SQL"}, rows.get(1)); }</code><technical_language>add new Object[]{3, "QA"} ensure a part of output</technical_language>

Target:
public void testSemiJoin() { ExecutionContext<Object[]> ctx = executionContext(F.first(nodes()), UUID.randomUUID(), 0); ScanNode<Object[]> persons = new ScanNode<>(ctx, Arrays.asList( new Object[]{0, "Igor", 1}, new Object[]{1, "Roman", 2}, new Object[]{2, "Ivan", null}, new Object[]{3, "Alexey", 1} )); ScanNode<Object[]> deps = new ScanNode<>(ctx, Arrays.asList( new Object[]{1, "Core"}, new Object[]{2, "SQL"}, new Object[]{3, "QA"} )); SemiJoinNode<Object[]> join = new SemiJoinNode<>( ctx, r -> r[0] == r[4] ); join.register(F.asList(deps, persons)); ProjectNode<Object[]> project = new ProjectNode<>(ctx, r -> new Object[]{r[1]}); project.register(join); RootNode<Object[]> node = new RootNode<>(ctx, r -> {}); node.register(project); assert node.hasNext(); ArrayList<Object[]> rows = new ArrayList<>(); while (node.hasNext()) rows.add(node.next()); assertEquals(2, rows.size()); Assert.assertArrayEquals(new Object[]{"Core"}, rows.get(0)); Assert.assertArrayEquals(new Object[]{"SQL"}, rows.get(1)); }
Source:
<code>private HostVO getHost(Long zoneId, boolean computeClusterMustSupportResign) { if (zoneId == null) { throw new CloudRuntimeException("Zone ID cannot be null."); } <START> List<? extends Cluster> clusters = _mgr.searchForClusters(zoneId, new Long(0), Long.MAX_VALUE, HypervisorType.XenServer.toString()); <END> if (clusters == null) { clusters = new ArrayList<>(); } Collections.shuffle(clusters, new Random(System.nanoTime())); clusters: for (Cluster cluster : clusters) { if (cluster.getAllocationState() == AllocationState.Enabled) { List<HostVO> hosts = _hostDao.findByClusterId(cluster.getId()); if (hosts != null) { Collections.shuffle(hosts, new Random(System.nanoTime())); for (HostVO host : hosts) { if (host.getResourceState() == ResourceState.Enabled) { if (computeClusterMustSupportResign) { if (computeClusterSupportsResign(cluster.getId())) { return host; } else { continue clusters; } } else { return host; } } } } } } return null; }</code><technical_language>new Long(0) avoids constant pool -- placing unnecessary pressure garbage collector. autoboxing, 0L accomplish skipping constant pool</technical_language>

Target:
private HostVO getHost(Long zoneId, boolean computeClusterMustSupportResign) { Preconditions.checkArgument(zoneId != null, "Zone ID cannot be null."); List<HostVO> hosts = _hostDao.listByDataCenterIdAndHypervisorType(zoneId, HypervisorType.XenServer); if (hosts == null) { return null; } List<Long> clustersToSkip = new ArrayList<>(); Collections.shuffle(hosts, RANDOM); for (HostVO host : hosts) { if (computeClusterMustSupportResign) { long clusterId = host.getClusterId(); if (clustersToSkip.contains(clusterId)) { continue; } if (clusterDao.getSupportsResigning(clusterId)) { return host; } else { clustersToSkip.add(clusterId); } } else { return host; } } return null; }
Source:
<code><START> protected int handlePriority(ReaderWay way, int priorityFromRelation) { <END> TreeMap<Double, Integer> weightToPrioMap = new TreeMap<>(); if (priorityFromRelation == 0) { weightToPrioMap.put(0d, UNCHANGED.getValue()); } else { weightToPrioMap.put(110d, priorityFromRelation); } super.collect(way, weightToPrioMap); return weightToPrioMap.lastEntry().getValue(); }</code><technical_language>this method removed? identical..</technical_language>

Target:
protected int handlePriority(ReaderWay way, int priorityFromRelation) { TreeMap<Double, Integer> weightToPrioMap = new TreeMap<>(); weightToPrioMap.put(100d, super.handlePriority(way, priorityFromRelation)); if (way.hasTag("wheelchair", "designated")) { weightToPrioMap.put(102d, VERY_NICE.getValue()); } else if (way.hasTag("wheelchair", "limited")) { weightToPrioMap.put(102d, REACH_DEST.getValue()); } return weightToPrioMap.lastEntry().getValue(); }
Source:
<code>private Consumer<String> transmitConsumer(String wsPath) { return id -> { try { RegisteredProject project = projectManager .getClosest(wsPath) .orElseThrow(() -> new NotFoundException("Can't find a project")); String projectFsPath = pathTransformer.transform(project.getPath()).toString(); GitConnection connection = gitConnectionFactory.getConnection(projectFsPath); Status status = connection.status(emptyList()); Status statusDto = newDto(Status.class); statusDto.setAdded(status.getAdded()); statusDto.setUntracked(status.getUntracked()); statusDto.setChanged(status.getChanged()); statusDto.setModified(status.getModified()); statusDto.setMissing(status.getMissing()); statusDto.setRemoved(status.getRemoved()); statusDto.setConflicting(status.getConflicting()); Map<String, List<EditedRegion>> modifiedFiles = new HashMap<>(); for (String file : status.getChanged()) { modifiedFiles.put(file, connection.getEditedRegions(file)); } StatusChangedEventDto statusChangeEventDto = newDto(StatusChangedEventDto.class) .withProjectName(connection.getWorkingDir().getName()) .withStatus(status) .withModifiedFiles(modifiedFiles); transmit(statusChangeEventDto, id); } catch (ServerException | NotFoundException e) { String errorMessage = e.getMessage(); <START> if (!(COMMIT_IN_PROGRESS_ERROR.equals(errorMessage)) <END> && !(NOT_A_GIT_REPOSITORY_ERROR.equals(errorMessage))) { LOG.error(errorMessage); } } }; }</code><technical_language>introduce a new exception</technical_language>

Target:
private Consumer<String> transmitConsumer(String wsPath) { return id -> { try { RegisteredProject project = projectManager .getClosest(wsPath) .orElseThrow(() -> new NotFoundException("Can't find a project")); String projectFsPath = pathTransformer.transform(project.getPath()).toString(); GitConnection connection = gitConnectionFactory.getConnection(projectFsPath); Status status = connection.status(emptyList()); Status statusDto = newDto(Status.class); statusDto.setAdded(status.getAdded()); statusDto.setUntracked(status.getUntracked()); statusDto.setChanged(status.getChanged()); statusDto.setModified(status.getModified()); statusDto.setMissing(status.getMissing()); statusDto.setRemoved(status.getRemoved()); statusDto.setConflicting(status.getConflicting()); Map<String, List<EditedRegion>> modifiedFiles = new HashMap<>(); for (String file : status.getChanged()) { modifiedFiles.put(file, connection.getEditedRegions(file)); } StatusChangedEventDto statusChangeEventDto = newDto(StatusChangedEventDto.class) .withProjectName(connection.getWorkingDir().getName()) .withStatus(status) .withModifiedFiles(modifiedFiles); transmit(statusChangeEventDto, id); } catch (GitCommitInProgressException | GitInvalidRepositoryException e) { } catch (ServerException | NotFoundException e) { LOG.error(e.getMessage()); } }; }
Source:
<code>private String appendIgnoresToFilter(String filterString) { if (filterString != null && !filterString.isEmpty()) { filterString += ","; } filterString += "!" + storeAndForwardPrefix; filterString += ",!" + managementAddress; filterString += ",!" + managementNotificationAddress; <START> filterString += ",!" + ADVISORY_TOPIC_PREFIX; <END> return filterString; }</code><technical_language>This is Openwire specific, avoid pushing protocol specifics core. another protocol needs address clustered? design this in agnostic way, a flag address queue, cluster bridge, protocol managers set creating</technical_language>

Target:
private String appendIgnoresToFilter(String filterString) { if (filterString != null && !filterString.isEmpty()) { filterString += ","; } filterString += "!" + storeAndForwardPrefix; filterString += ",!" + managementAddress; filterString += ",!" + managementNotificationAddress; final String originalFilterString = filterString; for (String ignoredPrefix : clusterManager.getIgnoredAddressPrefixes()) { final String ignoredPrefixPredicate = "!" + ignoredPrefix; if (!originalFilterString.contains(ignoredPrefixPredicate)) { if (originalFilterString.contains(ignoredPrefix)) { logger.warnf("%s will be ignored even if configured differently: please consider removing it from cluster configuration", ignoredPrefix); } filterString += "," + ignoredPrefixPredicate; } } return filterString; }
Source:
<code>private synchronized void setComplete() { cancelIfNotDone(mutateRowsFuture); cancelIfNotDone(stalenessFuture); mutateRowsFuture = null; for(Future<?> future: futures) { if (!future.isDone()) { <START> future.cancel(true); <END> } } futures.clear(); if (!completionFuture.isDone()) { completionFuture.set(""); } }</code><technical_language>I easier debug if instead of cancelling future, set a custom exception instead. future.setException(new MissingBulkResponseEntry(entry))</technical_language>

Target:
private synchronized void setComplete() { cancelIfNotDone(stalenessFuture); cancelIfNotDone(mutateRowsFuture); mutateRowsFuture = null; for (SettableFuture<?> future : futures) { if (!future.isDone()) { future.setException(MISSING_ENTRY_EXCEPTION); } } futures.clear(); if (!completionFuture.isDone()) { completionFuture.set(""); } }