auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void testWriteAndReadVCFHeaderless(final String extension) throws IOException { final File fakeVCFFile = File.createTempFile("testWriteAndReadVCFHeaderless.", extension, tempDir); if (".vcf.gz".equals(extension)) { new File(fakeVCFFile.getAbsolutePath() + ".tbi"); } else { Tribble.indexFile(fakeVCFFile); <START> } <END> metaData = new HashSet<VCFHeaderLine>(); additionalColumns = new HashSet<String>(); final SAMSequenceDictionary sequenceDict = createArtificialSequenceDictionary(); final VCFHeader header = createFakeHeader(metaData, additionalColumns, sequenceDict); try (final VariantContextWriter writer = new VariantContextWriterBuilder() .setOutputFile(fakeVCFFile).setReferenceDictionary(sequenceDict) .setOptions(EnumSet.of(Options.ALLOW_MISSING_FIELDS_IN_HEADER, Options.INDEX_ON_THE_FLY)) .build()) { writer.setVCFHeader(header); writer.add(createVC(header)); writer.add(createVC(header)); } final VCFCodec codec = new VCFCodec(); codec.setVCFHeader(header, VCFHeaderVersion.VCF4_2); try (BlockCompressedInputStream bcis = new BlockCompressedInputStream(fakeVCFFile); FileInputStream fis = new FileInputStream(fakeVCFFile)) { AsciiLineReaderIterator iterator; if (".vcf.gz".equals(extension)) { iterator = new AsciiLineReaderIterator(new AsciiLineReader(bcis)); } else { iterator = new AsciiLineReaderIterator(new AsciiLineReader(fis)); } int counter = 0; while (iterator.hasNext()) { VariantContext context = codec.decode(iterator.next()); counter++; } Assert.assertEquals(counter, 2); } }</code><technical_language>fault - do need deleteOnExit, unset INDEX_ON_THE_FLY in test specifically for index case</technical_language>

Target:
public void testWriteAndReadVCFHeaderless(final String extension) throws IOException { final File fakeVCFFile = File.createTempFile("testWriteAndReadVCFHeaderless.", extension, tempDir); fakeVCFFile.deleteOnExit(); if (".vcf.gz".equals(extension)) { new File(fakeVCFFile.getAbsolutePath() + ".tbi"); } else { Tribble.indexFile(fakeVCFFile).deleteOnExit(); } metaData = new HashSet<>(); additionalColumns = new HashSet<>(); final SAMSequenceDictionary sequenceDict = createArtificialSequenceDictionary(); final VCFHeader header = createFakeHeader(metaData, additionalColumns, sequenceDict); try (final VariantContextWriter writer = new VariantContextWriterBuilder() .setOutputFile(fakeVCFFile).setReferenceDictionary(sequenceDict) .setOptions(EnumSet.of(Options.ALLOW_MISSING_FIELDS_IN_HEADER, Options.INDEX_ON_THE_FLY)) .build()) { writer.setVCFHeader(header); writer.add(createVC(header)); writer.add(createVC(header)); } final VCFCodec codec = new VCFCodec(); codec.setVCFHeader(header, VCFHeaderVersion.VCF4_2); try (BlockCompressedInputStream bcis = new BlockCompressedInputStream(fakeVCFFile); FileInputStream fis = new FileInputStream(fakeVCFFile)) { AsciiLineReaderIterator iterator = new AsciiLineReaderIterator(new AsciiLineReader(".vcf.gz".equals(extension) ? bcis : fis)); int counter = 0; while (iterator.hasNext()) { VariantContext context = codec.decode(iterator.next()); counter++; } Assert.assertEquals(counter, 2); } }
Source:
<code>public boolean hasPendingMigrationsWork(long vmId) { List<HaWorkVO> haWorks = _haDao.listPendingMigrationsForVm(vmId); for (HaWorkVO work : haWorks) { <START> if (work.getTimesTried() < _maxRetries) { <END> return true; } } return false; }</code><technical_language>this <=, check</technical_language>

Target:
public boolean hasPendingMigrationsWork(long vmId) { List<HaWorkVO> haWorks = _haDao.listPendingMigrationsForVm(vmId); for (HaWorkVO work : haWorks) { if (work.getTimesTried() <= _maxRetries) { return true; } else { s_logger.warn("HAWork Job of migration type " + work + " found in database which has max " + "retries more than " + _maxRetries + " but still not in Done, Cancelled, or Error State"); } } return false; }
Source:
<code><START> private Boolean isInMutualCategory(ThrottleJobProperty jobBeingChecked, ThrottleJobProperty executingJob) { <END> for (String category: jobBeingChecked.getCategories()) { if (executingJob.getCategories().contains(category)) { return true; } } return false; }</code><technical_language>boolean</technical_language>

Target:
private boolean isInMutualCategory(ThrottleJobProperty jobBeingChecked, ThrottleJobProperty executingJob) { if (jobBeingChecked != null && executingJob != null) { for (String category : jobBeingChecked.getCategories()) { if (executingJob.getCategories().contains(category)) { return true; } } } return false; }
Source:
<code><START> private static BuildConfig mergeConfig(BuildConfig primary, BuildConfig secondary) { <END> Map<String, List<BuildCommand>> cmds = primary.getCmds().isEmpty() ? secondary.getCmds() : primary.getCmds(); Map<String, String> env = new LinkedHashMap<>(); env.putAll(secondary.getEnv()); env.putAll(primary.getEnv()); List<String> buildDeps = Lists.newArrayList(Iterables.concat(secondary.getBuildDeps(), primary.getBuildDeps())); List<String> webhooks = Lists.newArrayList(Iterables.concat(secondary.getWebhooks(), primary.getWebhooks())); List<String> cache = Lists.newArrayList(Iterables.concat(secondary.getCache(), primary.getCache())); return new BuildConfig(cmds, env, buildDeps, webhooks, cache, Optional.<GitInfo>absent()); }</code><technical_language>if this mergeConfig() method, BuildConfig fields Optional<> merging easier</technical_language>

Target:
private static BuildConfig mergeConfig(BuildConfig primary, BuildConfig secondary) { List<BuildStep> steps = primary.getSteps().isEmpty() ? secondary.getSteps() : primary.getSteps(); Map<String, String> env = new LinkedHashMap<>(); env.putAll(secondary.getEnv()); env.putAll(primary.getEnv()); List<String> buildDeps = Lists.newArrayList(Iterables.concat(secondary.getBuildDeps(), primary.getBuildDeps())); List<String> webhooks = Lists.newArrayList(Iterables.concat(secondary.getWebhooks(), primary.getWebhooks())); List<String> cache = Lists.newArrayList(Iterables.concat(secondary.getCache(), primary.getCache())); return new BuildConfig(steps, env, buildDeps, webhooks, cache, Optional.<GitInfo>absent()); }
Source:
<code>public DefaultDevToolsFactory(final Config config) { _chromePath = config.getString("path"); _chromeArgs = ImmutableMap.copyOf(config.getObject("args").unwrapped()); _executor = createExecutorService(config.hasPath("executor") ? config.getConfig("executor") : ConfigFactory.empty()); _service = Suppliers.memoize(this::createService); try { <START> _originConfigs = ObjectMapperFactory.createInstance().readValue( <END> ConfigurationHelper.toJson(config, "origins"), ORIGIN_CONFIG_MAP_TYPE ); } catch (final IOException e) { throw new IllegalArgumentException(e); } }</code><technical_language>Missed this before: inject ObjectMapper creating one</technical_language>

Target:
DefaultDevToolsFactory(final Config config) { this(config, ObjectMapperFactory.createInstance()); }
Source:
<code>public static Properties readTDConf() { Properties p = new Properties(); File file = new File(System.getProperty("user.home", "./"), String.format(".td/td.conf")); if (!file.exists()) { <START> logger.debug(String.format("config file %s is not found", file)); <END> return p; } return readTDConf(file); }</code><technical_language>this method is designed read $HOME/.td/td.conf, is print warning in case of file found</technical_language>

Target:
public static Properties readTDConf() { Properties p = new Properties(); File file = new File(System.getProperty("user.home", "./"), String.format(".td/td.conf")); if (!file.exists()) { logger.warn(String.format("config file %s is not found", file)); return p; } return readTDConf(file); }
Source:
<code>public static QualifiedName create(NamespaceNameTree nameTree) { ImmutableList.Builder<String> newName = ImmutableList.builder(); nameTree.namespaces().stream().map(NameIdentifierTree::text).forEach(newName::add); newName.add(nameTree.name().text()); <START> return new QualifiedName(newName.build()); <END> }</code><technical_language>This change redundant other in file: constructors handle lowercase conversion</technical_language>

Target:
public static QualifiedName create(NamespaceNameTree nameTree) { List<String> namespaces = nameTree.namespaces().stream().map(NameIdentifierTree::text).collect(Collectors.toList()); return new QualifiedName(namespaces, nameTree.name().text()); }
Source:
<code>private static boolean expiring(Date expiry) { long timeRemaining = expiry.getTime() - System.currentTimeMillis(); <START> return timeRemaining < (60 * 1000); <END> }</code><technical_language>expring time a constant</technical_language>

Target:
private static boolean expiring(Date expiry) { long timeRemaining = expiry.getTime() - System.currentTimeMillis(); return timeRemaining < EXPIRY_TIME_MILLIS; }
Source:
<code>public <R extends PhotonRequest> R create(Request webRequest) throws BadRequestException { String language = webRequest.queryParams("lang"); language = language == null ? "en" : language; languageChecker.apply(language); String query = webRequest.queryParams("q"); if (query == null) throw new BadRequestException(400, "missing search term 'q': /?q=berlin"); Integer limit; try { limit = Integer.valueOf(webRequest.queryParams("limit")); } catch (NumberFormatException e) { limit = 15; } Point locationForBias = null; try { Double lon = Double.valueOf(webRequest.queryParams("lon")); Double lat = Double.valueOf(webRequest.queryParams("lat")); <START> locationForBias = new GeometryFactory(new PrecisionModel(), 4326).createPoint(new Coordinate(lon, lat)); <END> } catch (Exception nfe) { } QueryParamsMap tagFiltersQueryMap = webRequest.queryMap("osm_tag"); if (!new CheckIfFilteredRequest().execute(tagFiltersQueryMap)) { return (R) new PhotonRequest(query, limit, locationForBias, language); } FilteredPhotonRequest photonRequest = new FilteredPhotonRequest(query, limit, locationForBias, language); String[] tagFilters = tagFiltersQueryMap.values(); setUpTagFilters(photonRequest, tagFilters); return (R) photonRequest; }</code><technical_language>is need create a geometry factory for request, i a static final field</technical_language>

Target:
public <R extends PhotonRequest> R create(Request webRequest) throws BadRequestException { String language = webRequest.queryParams("lang"); language = language == null ? "en" : language; languageChecker.apply(language); String query = webRequest.queryParams("q"); if (query == null) throw new BadRequestException(400, "missing search term 'q': /?q=berlin"); Integer limit; try { limit = Integer.valueOf(webRequest.queryParams("limit")); } catch (NumberFormatException e) { limit = 15; } Point locationForBias = null; try { Double lon = Double.valueOf(webRequest.queryParams("lon")); Double lat = Double.valueOf(webRequest.queryParams("lat")); locationForBias = geometryFactory.createPoint(new Coordinate(lon, lat)); } catch (Exception nfe) { } QueryParamsMap tagFiltersQueryMap = webRequest.queryMap("osm_tag"); if (!new CheckIfFilteredRequest().execute(tagFiltersQueryMap)) { return (R) new PhotonRequest(query, limit, locationForBias, language); } FilteredPhotonRequest photonRequest = new FilteredPhotonRequest(query, limit, locationForBias, language); String[] tagFilters = tagFiltersQueryMap.values(); setUpTagFilters(photonRequest, tagFilters); return (R) photonRequest; }
Source:
<code><START> public void setInSlot(Object slot, PresenterWidget<?> content) { <END> super.setInSlot(slot, content); if (slot == tabContentSlot) { try { Presenter<?, ?> presenter = (Presenter<?, ?>) content; Proxy<?> proxy = (Proxy<?>) presenter.getProxy(); if (proxy instanceof TabContentProxy) { getView().setActiveTab(((TabContentProxy<?>) proxy).getTab()); getView().setActiveTabHistoryToken(((TabContentProxy<?>) proxy).getTargetHistoryToken()); } } catch (Exception e) { logger.log(Level.SEVERE, "Error while updating tab view", e); } } }</code><technical_language>This effectively overrides GWTP TabContainerPresenter#setInSlot(IsSlot<T>, T) method, this: ... try { Presenter<?, ?> presenter = (Presenter<?, ?>) child; TabContentProxy<?> proxy = (TabContentProxy<?>) presenter.getProxy(); getView().setActiveTab(proxy.getTab()); } catch (Exception e) { // cast, worry, highlight a tab } ... try/catch block catch java.lang.ClassCastException instanceof check is redundant here, recommend code before. typecast fail if a non-tab Presenter is revealed this (tab container) Presenter, a coding mistake</technical_language>

Target:
public void setInSlot(Object slot, PresenterWidget<?> content) { super.setInSlot(slot, content); if (slot == tabContentSlot) { try { Presenter<?, ?> presenter = (Presenter<?, ?>) content; TabContentProxy<?> proxy = (TabContentProxy<?>) presenter.getProxy(); getView().setActiveTab(proxy.getTab()); getView().setActiveTabHistoryToken(proxy.getTargetHistoryToken()); } catch (Exception e) { logger.log(Level.SEVERE, "Error while updating tab view", e); } } }
Source:
<code>public void stop(BundleContext bundleContext) throws Exception { logger.info("Stopping JigasiBundleActivator"); <START> sipGateway.stop(); <END> }</code><technical_language>I TranscriptionGateway#stop() do right now, I call anyway</technical_language>

Target:
public void stop(BundleContext bundleContext) throws Exception { logger.info("Stopping JigasiBundleActivator"); sipGateway.stop(); transcriptionGateway.stop(); }
Source:
<code>public void execute() throws Exception { if (backupRestoreConfig.getSnapshotMetaServiceCronExpression().equalsIgnoreCase("-1")) { logger.info( "Not executing the Verification Service for backups as V2 backups are not enabled."); return; } if (instanceState.getRestoreStatus() != null && instanceState.getRestoreStatus().getStatus() != null && instanceState.getRestoreStatus().getStatus() == Status.STARTED) { logger.info( "Not executing the Verification Service for backups as Priam is in restore mode."); return; } DateRange dateRange = new DateRange( DateUtil.getInstant() .minus( backupRestoreConfig.getBackupVerificationSLOInHours(), ChronoUnit.HOURS), DateUtil.getInstant()); List<BackupVerificationResult> verificationResults = backupVerification.verifyAllBackups( BackupVersion.SNAPSHOT_META_SERVICE, false, dateRange); if (verificationResults.isEmpty() || verificationResults .stream() .filter(r -> r.valid) .collect(Collectors.toList()) .isEmpty()) { logger.error( "Not able to find any snapshot which is valid in our SLO window: hours", backupRestoreConfig.getBackupVerificationSLOInHours()); backupMetrics.incrementBackupVerificationFailure(); } else { verificationResults .stream() .forEach( <START> r -> { <END> logger.info( "Sending message for backup: {}", AbstractBackupPath.BackupFileType.SNAPSHOT_VERIFIED, r.snapshotInstant); backupNotificationMgr.notify(r); }); } }</code><technical_language>nit: please pick more descriptive variable r</technical_language>

Target:
public void execute() throws Exception { if (backupRestoreConfig.getSnapshotMetaServiceCronExpression().equalsIgnoreCase("-1")) { logger.info( "Not executing the Verification Service for backups as V2 backups are not enabled."); return; } if (instanceState.getRestoreStatus() != null && instanceState.getRestoreStatus().getStatus() != null && instanceState.getRestoreStatus().getStatus() == Status.STARTED) { logger.info( "Not executing the Verification Service for backups as Priam is in restore mode."); return; } DateRange dateRange = new DateRange( DateUtil.getInstant() .minus( backupRestoreConfig.getBackupVerificationSLOInHours(), ChronoUnit.HOURS), DateUtil.getInstant()); List<BackupVerificationResult> verificationResults = backupVerification.verifyAllBackups(BackupVersion.SNAPSHOT_META_SERVICE, dateRange); if (verificationResults.isEmpty() || verificationResults .stream() .filter(backupVerificationResult -> backupVerificationResult.valid) .count() == 0) { logger.error( "Not able to find any snapshot which is valid in our SLO window: hours", backupRestoreConfig.getBackupVerificationSLOInHours()); backupMetrics.incrementBackupVerificationFailure(); } else { verificationResults .stream() .forEach( backupVerificationResult -> { logger.info( "Sending message for backup: {}", AbstractBackupPath.BackupFileType.SNAPSHOT_VERIFIED, backupVerificationResult.snapshotInstant); backupNotificationMgr.notify(backupVerificationResult); }); } }
Source:
<code>protected String getDataProfileFromNameSpace(NameSpace nameSpace) { switch (nameSpace) { case STATION: return Profile.STATION.toString(); case SIMPLE_STATION: case STATION_KML: return Profile.SIMPLE_STATION.toString(); case SUMMARY_STATION: return Profile.SUMMARY_STATION.toString(); case SUMMARY_ORGANIZATION: <START> return Profile.SUMMARY_STATION.toString(); <END> case PROJECT: return Profile.PROJECT.toString(); case PROJECT_MONITORING_LOCATION_WEIGHTING: return Profile.PROJECT_MONITORING_LOCATION_WEIGHTING.toString(); case ACTIVITY: return Profile.ACTIVITY.toString(); case ACTIVITY_METRIC: return Profile.ACTIVITY_METRIC.toString(); case RESULT: return Profile.PC_RESULT.toString(); case BIOLOGICAL_RESULT: return Profile.BIOLOGICAL.toString(); case NARROW_RESULT: return Profile.NARROW_RESULT.toString(); case RES_DETECT_QNT_LMT: return Profile.RES_DETECT_QNT_LMT.toString(); default: return null; } }</code><technical_language>return SUMMARY_ORGANIZATION profile SUMMARY_STATION profile</technical_language>

Target:
protected String getDataProfileFromNameSpace(NameSpace nameSpace) { switch (nameSpace) { case STATION: return Profile.STATION.toString(); case SIMPLE_STATION: case STATION_KML: return Profile.SIMPLE_STATION.toString(); case SUMMARY_STATION: return Profile.SUMMARY_STATION.toString(); case SUMMARY_ORGANIZATION: return Profile.SUMMARY_ORGANIZATION.toString(); case PROJECT: return Profile.PROJECT.toString(); case PROJECT_MONITORING_LOCATION_WEIGHTING: return Profile.PROJECT_MONITORING_LOCATION_WEIGHTING.toString(); case ACTIVITY: return Profile.ACTIVITY.toString(); case ACTIVITY_METRIC: return Profile.ACTIVITY_METRIC.toString(); case RESULT: return Profile.PC_RESULT.toString(); case BIOLOGICAL_RESULT: return Profile.BIOLOGICAL.toString(); case NARROW_RESULT: return Profile.NARROW_RESULT.toString(); case RES_DETECT_QNT_LMT: return Profile.RES_DETECT_QNT_LMT.toString(); default: return null; } }
Source:
<code>public void fromStream_providesToken() throws IOException { MockTokenServerTransportFactory transportFactory = new MockTokenServerTransportFactory(); transportFactory.transport.addServiceAccount(SA_CLIENT_EMAIL, ACCESS_TOKEN); InputStream serviceAccountStream = ServiceAccountCredentialsTest <START> .writeServiceAccountAccountStream( <END> SA_CLIENT_ID, SA_CLIENT_EMAIL, SA_PRIVATE_KEY_PKCS8, SA_PRIVATE_KEY_ID); GoogleCredentials credentials = ServiceAccountCredentials.fromStream(serviceAccountStream, transportFactory); assertNotNull(credentials); credentials = credentials.createScoped(SCOPES); Map<String, List<String>> metadata = credentials.getRequestMetadata(CALL_URI); TestUtils.assertContainsBearerToken(metadata, ACCESS_TOKEN); }</code><technical_language>1. this method's name is wrong (two "Account"s in it) 2. need qualify this class, right</technical_language>

Target:
public void fromStream_providesToken() throws IOException { MockTokenServerTransportFactory transportFactory = new MockTokenServerTransportFactory(); transportFactory.transport.addServiceAccount(SA_CLIENT_EMAIL, ACCESS_TOKEN); InputStream serviceAccountStream = writeServiceAccountStream( SA_CLIENT_ID, SA_CLIENT_EMAIL, SA_PRIVATE_KEY_PKCS8, SA_PRIVATE_KEY_ID); GoogleCredentials credentials = ServiceAccountCredentials.fromStream(serviceAccountStream, transportFactory); assertNotNull(credentials); credentials = credentials.createScoped(SCOPES); Map<String, List<String>> metadata = credentials.getRequestMetadata(CALL_URI); TestUtils.assertContainsBearerToken(metadata, ACCESS_TOKEN); }
Source:
<code>public void revealShroudFor(int x, int y, int range) { if (range < 1) return; float halfATile = TILE_SIZE / 2; Vector2D asPixelsCentered = getCellCoordinatesInAbsolutePixels(x, y). add(Vector2D.create(halfATile, halfATile)); double centerX = asPixelsCentered.getX(), centerY = asPixelsCentered.getY(); for (int rangeStep=0; rangeStep < range; rangeStep++) { for (int degrees=0; degrees < 360; degrees++) { float rangeInPixels = (rangeStep * TILE_SIZE); double radians = Math.toRadians(degrees); double circleX = (centerX + (Math.cos(radians) * rangeInPixels)); <START> double circleY = (centerY + (Math.sin(radians) * rangeInPixels)); <END> Cell cell = getCellByAbsolutePixelCoordinates((int) Math.ceil(circleX), (int) Math.ceil(circleY)); cell.setShrouded(false); } } }</code><technical_language>I feel a lookup table is justified here. generate lookup in a static constructor populate sine cosine values for 0-360 degrees. a simple optimization prevents a lot of heavy math</technical_language>

Target:
public void revealShroudFor(int x, int y, int range) { if (range < 1) return; float halfATile = TILE_SIZE / 2; Vector2D asPixelsCentered = getCellCoordinatesInAbsolutePixels(x, y). add(Vector2D.create(halfATile, halfATile)); double centerX = asPixelsCentered.getX(), centerY = asPixelsCentered.getY(); for (int rangeStep=0; rangeStep < range; rangeStep++) { for (int degrees=0; degrees < 360; degrees++) { float rangeInPixels = (rangeStep * TILE_SIZE); double circleX = (centerX + (Trigonometry.cos[degrees] * rangeInPixels)); double circleY = (centerY + (Trigonometry.sin[degrees] * rangeInPixels)); Cell cell = getCellByAbsolutePixelCoordinates((int) Math.ceil(circleX), (int) Math.ceil(circleY)); cell.setShrouded(false); } } }
Source:
<code>public void testListImages() { List<ImageSummary> listImages = api().listImages(); assertNotNull(listImages); ImageSummary taggedImage = Iterables.find(listImages, new Predicate<ImageSummary>() { @Override public boolean apply(ImageSummary input) { return input.repoTags().contains("jclouds:testTag"); } <START> }); <END> assertNotNull(taggedImage); }</code><technical_language>find method throw exception if found, assertion is redundant. tryFind if want explicit remove assertion</technical_language>

Target:
public void testListImages() { List<ImageSummary> listImages = api().listImages(); assertNotNull(listImages); Iterables.find(listImages, new Predicate<ImageSummary>() { @Override public boolean apply(ImageSummary input) { return input.repoTags().contains("jclouds:testTag"); } }); }
Source:
<code>protected void onPostExecute(File result) { Fragment prev = formEntryActivity.get().getSupportFragmentManager().findFragmentByTag(ProgressDialogFragment.COLLECT_PROGRESS_DIALOG_TAG); if (prev != null && !formEntryActivity.get().isInstanceStateSaved()) { ((DialogFragment) prev).dismiss(); } <START> ODKView odkView = formEntryActivity.get().getCurrentViewIfODKView(); <END> if (odkView != null) { formEntryActivity.get().setBinaryWidgetData(result); } }</code><technical_language>This null check unrelated data is set activity. FormEntryActivity.setBinaryWidgetData check I clearer remove it</technical_language>

Target:
protected void onPostExecute(File result) { Fragment prev = formEntryActivity.get().getSupportFragmentManager().findFragmentByTag(ProgressDialogFragment.COLLECT_PROGRESS_DIALOG_TAG); if (prev != null && !formEntryActivity.get().isInstanceStateSaved()) { ((DialogFragment) prev).dismiss(); } formEntryActivity.get().setBinaryWidgetData(result); }
Source:
<code>public String getHowTo() { <START> return "This action will destroy the content. Warning: this can't be undone!"; <END> }</code><technical_language>this destroy content in languages exist undone</technical_language>

Target:
public String getHowTo() { return "This will destroy the content in ALL languages that exist and cannot be undone"; }
Source:
<code>private String descForStatus(String str) { if (str.length() < 2) <START> return null; <END> String indexDesc = descForStatus(str.charAt(0)); String treeDesc = descForStatus(str.charAt(1)); if (indexDesc.length() > 0 && treeDesc.length() > 0) return indexDesc + "/" + treeDesc; else if (indexDesc.length() > 0) return indexDesc; else if (treeDesc.length() > 0) return treeDesc; else return ""; }</code><technical_language>nit: previously this function returned a string; returning null? safer change usages of .charAt() here</technical_language>

Target:
private String descForStatus(String str) { if (str.length() < 2) return ""; String indexDesc = descForStatus(str.charAt(0)); String treeDesc = descForStatus(str.charAt(1)); if (indexDesc.length() > 0 && treeDesc.length() > 0) return indexDesc + "/" + treeDesc; else if (indexDesc.length() > 0) return indexDesc; else if (treeDesc.length() > 0) return treeDesc; else return ""; }
Source:
<code>public void cleanupVirtualMachineNICs(VirtualMachine virtualMachine) { <START> for (NetworkInterface nicRef : virtualMachine.properties().networkProfile().networkInterfaces()) { <END> String nicResourceGroup = extractResourceGroup(nicRef.id()); String nicName = extractName(nicRef.id()); NetworkInterfaceCard nic = api.getNetworkInterfaceCardApi(nicResourceGroup).get(nicName); Iterable<IdReference> publicIps = getPublicIps(nic); logger.debug(">> destroying nic %s...", nicName); URI nicDeletionURI = api.getNetworkInterfaceCardApi(nicResourceGroup).delete(nicName); resourceDeleted.apply(nicDeletionURI); for (IdReference publicIp : publicIps) { String publicIpResourceGroup = publicIp.resourceGroup(); String publicIpName = publicIp.name(); logger.debug(">> deleting public ip nic %s...", publicIpName); api.getPublicIPAddressApi(publicIpResourceGroup).delete(publicIpName); } } }</code><technical_language>nic instead of nicRef</technical_language>

Target:
public void cleanupVirtualMachineNICs(VirtualMachine virtualMachine) { for (NetworkInterface nicRef : virtualMachine.properties().networkProfile().networkInterfaces()) { String nicResourceGroup = extractResourceGroup(nicRef.id()); String nicName = extractName(nicRef.id()); NetworkInterfaceCard nic = api.getNetworkInterfaceCardApi(nicResourceGroup).get(nicName); Iterable<IdReference> publicIps = getPublicIps(nic); logger.debug(">> destroying nic %s...", nicName); URI nicDeletionURI = api.getNetworkInterfaceCardApi(nicResourceGroup).delete(nicName); resourceDeleted.apply(nicDeletionURI); for (IdReference publicIp : publicIps) { String publicIpResourceGroup = publicIp.resourceGroup(); String publicIpName = publicIp.name(); PublicIPAddress ip = api.getPublicIPAddressApi(publicIpResourceGroup).get(publicIpName); if (ip.tags() != null && Boolean.parseBoolean(ip.tags().get(AUTOGENERATED_IP_KEY))) { logger.debug(">> deleting public ip %s...", publicIpName); api.getPublicIPAddressApi(publicIpResourceGroup).delete(publicIpName); } } } }
Source:
<code>private LeaderPingResult actuallyPingLeaderWithUuid( MultiplexingCompletionService<LeaderPingerContext<PingableLeader>, PingResult> multiplexingCompletionService, UUID uuid, LeaderPingerContext<PingableLeader> leader, Callable<PingResult> pingEndpoint) throws ExecutionException { try { multiplexingCompletionService.submit(leader, pingEndpoint); Future<Map.Entry<LeaderPingerContext<PingableLeader>, PingResult>> pingFuture = multiplexingCompletionService.poll(leaderPingResponseWait.toMillis(), TimeUnit.MILLISECONDS); return getLeaderPingResult(uuid, pingFuture, timeLockVersion); <START> } catch (InterruptedException exc) { <END> Thread.currentThread().interrupt(); return LeaderPingResults.pingCallFailure(exc); } catch (CheckedRejectedExecutionException e) { log.warn("Could not ping the leader, because the executor used to talk to that node is overloaded", e); return LeaderPingResults.pingCallFailure(e); } }</code><technical_language>nit: is a reason e</technical_language>

Target:
private LeaderPingResult actuallyPingLeaderWithUuid( MultiplexingCompletionService<LeaderPingerContext<PingableLeader>, PingResult> multiplexingCompletionService, UUID uuid, LeaderPingerContext<PingableLeader> leader, Callable<PingResult> pingEndpoint) { try { multiplexingCompletionService.submit(leader, pingEndpoint); Future<Map.Entry<LeaderPingerContext<PingableLeader>, PingResult>> pingFuture = multiplexingCompletionService.poll(leaderPingResponseWait.toMillis(), TimeUnit.MILLISECONDS); return getLeaderPingResult(uuid, pingFuture, timeLockVersion); } catch (InterruptedException e) { Thread.currentThread().interrupt(); return LeaderPingResults.pingCallFailure(e); } catch (CheckedRejectedExecutionException e) { log.warn("Could not ping the leader, because the executor used to talk to that node is overloaded", e); return LeaderPingResults.pingCallFailure(e); } }
Source:
<code>public void onRequestSuggestions(final Request req, final Callback callback) { RpcStatus.hide(new Runnable() { public void run() { <START> SuggestUtil.SVC.suggestAccount(req.getQuery(), new Boolean(true), <END> req.getLimit(), new GerritCallback<List<AccountInfo>>() { public void onSuccess(final List<AccountInfo> result) { final ArrayList<AccountSuggestion> r = new ArrayList<AccountSuggestion>(result.size()); for (final AccountInfo p : result) { r.add(new AccountSuggestion(p)); } callback.onSuggestionsReady(req, new Response(r)); } }); } }); }</code><technical_language>"true" Boolean.TRUE here</technical_language>

Target:
public void onRequestSuggestions(final Request req, final Callback callback) { RpcStatus.hide(new Runnable() { public void run() { SuggestUtil.SVC.suggestAccount(req.getQuery(), Boolean.TRUE, req.getLimit(), new GerritCallback<List<AccountInfo>>() { public void onSuccess(final List<AccountInfo> result) { final ArrayList<AccountSuggestion> r = new ArrayList<AccountSuggestion>(result.size()); for (final AccountInfo p : result) { r.add(new AccountSuggestion(p)); } callback.onSuggestionsReady(req, new Response(r)); } }); } }); }
Source:
<code>void cancel() { <START> if (callback != null) { <END> callback = null; } ImageView target = this.target.get(); if (target == null) { return; } ViewTreeObserver vto = target.getViewTreeObserver(); if (!vto.isAlive()) { return; } vto.removeOnPreDrawListener(this); }</code><technical_language>This check dropped</technical_language>

Target:
void cancel() { callback = null; ImageView target = this.target.get(); if (target == null) { return; } ViewTreeObserver vto = target.getViewTreeObserver(); if (!vto.isAlive()) { return; } vto.removeOnPreDrawListener(this); }
Source:
<code>protected Password engineGeneratePassword(final String algorithm, final KeySpec keySpec) throws InvalidKeySpecException { switch (algorithm) { case ALGORITHM_CLEAR: { if (keySpec instanceof ClearPasswordSpec) { return new ClearPasswordImpl(((ClearPasswordSpec)keySpec).getEncodedPassword().clone()); } else { break; } } <START> case ALGORITHM_SHACRYPT: { <END> if (keySpec instanceof UnixSHACryptPasswordSpec) { UnixSHACryptPasswordSpec spec = (UnixSHACryptPasswordSpec) keySpec; try { return new UnixSHACryptPasswordImpl(UnixSHACryptPasswordUtil.encode(spec)); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } } else { break; } } } throw new InvalidKeySpecException(); }</code><technical_language>key sizes, algorithms: "sha-256-crypt" "sha-512-crypt" names</technical_language>

Target:
protected Password engineGeneratePassword(final String algorithm, final KeySpec keySpec) throws InvalidKeySpecException { switch (algorithm) { case ALGORITHM_CLEAR: { if (keySpec instanceof ClearPasswordSpec) { return new ClearPasswordImpl(((ClearPasswordSpec)keySpec).getEncodedPassword().clone()); } else { break; } } case ALGORITHM_SHA256CRYPT: case ALGORITHM_SHA512CRYPT: { if (keySpec instanceof UnixSHACryptPasswordSpec) { UnixSHACryptPasswordSpec spec = (UnixSHACryptPasswordSpec) keySpec; try { return new UnixSHACryptPasswordImpl(UnixSHACryptPasswordUtil.encode(spec)); } catch (NoSuchAlgorithmException e) { throw new InvalidKeySpecException("Cannot read key spec", e); } } else { break; } } } throw new InvalidKeySpecException(); }
Source:
<code>protected void readInternal(ObjectDataInput in) throws IOException { super.readInternal(in); int s = in.readInt(); <START> keys = new ArrayList<Data>(); <END> while (s-- > 0) { keys.add(in.readData()); } expiryPolicy = in.readData(); }</code><technical_language>ArrayList constructor called initialCapacity</technical_language>

Target:
protected void readInternal(ObjectDataInput in) throws IOException { super.readInternal(in); int s = in.readInt(); keys = new ArrayList<Data>(s); while (s-- > 0) { keys.add(in.readData()); } expiryPolicy = in.readData(); }
Source:
<code>public void testFindCodeTypeById() throws Exception { ICodeService remoteService = createRemoteService(); CodeServiceClientProxy service = createServiceUnderTest(remoteService); List<ICodeType<?, ?>> codeTypes = service.getAllCodeTypes(""); assertEquals("size", 2, codeTypes.size()); ICodeType<Long, ?> companyTypeCodeType = service.findCodeTypeById(CompanyTypeCodeType.ID); assertEquals("CompanyTypeCodeType class", CompanyTypeCodeType.class, companyTypeCodeType.getClass()); ICodeType<Long, ?> companyRatingCodeType = service.findCodeTypeById(CompanyRatingCodeType.ID); assertEquals("CompanyRatingCodeType 2 class", CompanyRatingCodeType.class, companyRatingCodeType.getClass()); ICodeType<Long, ?> companyRatingCodeType2 = service.findCodeTypeById(CompanyRatingCodeType.ID); assertEquals("CompanyRatingCodeType class", CompanyRatingCodeType.class, companyRatingCodeType2.getClass()); <START> assertEquals("CompanyRatingCodeType classes are the same", true, companyRatingCodeType == companyRatingCodeType2); <END> verify(remoteService, times(1)).getAllCodeTypeClasses(""); verify(remoteService, times(1)).getCodeTypes(anyListOfCodeTypes()); verifyNoMoreInteractions(remoteService); }</code><technical_language>assertTrue</technical_language>

Target:
public void testFindCodeTypeById() throws Exception { List<ICodeType<?, ?>> codeTypes = m_service.getAllCodeTypes(""); assertEquals("size", 2, codeTypes.size()); ICodeType<Long, ?> companyTypeCodeType = m_service.findCodeTypeById(CompanyTypeCodeType.ID); assertEquals("CompanyTypeCodeType class", CompanyTypeCodeType.class, companyTypeCodeType.getClass()); ICodeType<Long, ?> companyRatingCodeType = m_service.findCodeTypeById(CompanyRatingCodeType.ID); assertEquals("CompanyRatingCodeType 2 class", CompanyRatingCodeType.class, companyRatingCodeType.getClass()); ICodeType<Long, ?> companyRatingCodeType2 = m_service.findCodeTypeById(CompanyRatingCodeType.ID); assertEquals("CompanyRatingCodeType class", CompanyRatingCodeType.class, companyRatingCodeType2.getClass()); assertTrue("CompanyRatingCodeType classes are the same", companyRatingCodeType == companyRatingCodeType2); verify(m_remoteService, times(1)).getAllCodeTypeClasses(""); verify(m_remoteService, times(1)).getCodeTypes(anyListOfCodeTypes()); verifyNoMoreInteractions(m_remoteService); }
Source:
<code>protected void executeRequest(OkHttpClient httpClient, Request request) { Object contentBody = null; long contentSize = 0; Throwable error = null; Response response = null; try { try { Log.v(TAG, "%s: RemoteRequest calling httpClient.execute, url: %s", this, url); call = httpClient.newCall(request); response = call.execute(); Log.v(TAG, "%s: RemoteRequest called httpClient.execute, url: %s", this, url); storeCookie(response); if (response.code() >= 300) { if (!dontLog404) Log.w(TAG, "%s: Got error status: %d for %s. Reason: %s", this, response.code(), url, response.message()); String authHeader = response.header("WWW-Authenticate"); Map<String, String> challenge = parseAuthHeader(authHeader); Map<String, Object> extra = null; if (challenge != null) { extra = new HashMap(); extra.put("AuthChallenge", challenge); } error = new RemoteRequestResponseException(response.code(), response.message(), extra); RequestUtils.closeResponseBody(response); } else { InputStream stream = response.body().byteStream(); try { if (Utils.isGzip(response)) stream = new GZIPInputStream(stream); contentBody = Manager.getObjectMapper().readValue(stream, Object.class); contentSize = response.body().contentLength(); } finally { try { stream.close(); } catch (IOException e) { } } } } catch (Exception e) { Log.w(TAG, "%s: executeRequest() Exception: %s. url: %s", e, this, e, url); error = e; } <START> respondWithResult(contentBody, contentSize, error, response); <END> } finally { RequestUtils.closeResponseBody(response); } }</code><technical_language>pass response object around, is get content size response object instead of passing contentSize</technical_language>

Target:
protected void executeRequest(OkHttpClient httpClient, Request request) { Object fullBody = null; Throwable error = null; Response response = null; try { try { Log.v(TAG, "%s: RemoteRequest calling httpClient.execute, url: %s", this, url); call = httpClient.newCall(request); response = call.execute(); Log.v(TAG, "%s: RemoteRequest called httpClient.execute, url: %s", this, url); storeCookie(response); if (response.code() >= 300) { if (!dontLog404) Log.w(TAG, "%s: Got error status: %d for %s. Reason: %s", this, response.code(), url, response.message()); String authHeader = response.header("WWW-Authenticate"); Map<String, String> challenge = parseAuthHeader(authHeader); Map<String, Object> extra = null; if (challenge != null) { extra = new HashMap(); extra.put("AuthChallenge", challenge); } error = new RemoteRequestResponseException(response.code(), response.message(), extra); RequestUtils.closeResponseBody(response); } else { InputStream stream = response.body().byteStream(); try { if (Utils.isGzip(response)) stream = new GZIPInputStream(stream); fullBody = Manager.getObjectMapper().readValue(stream, Object.class); } finally { try { stream.close(); } catch (IOException e) { } } } } catch (Exception e) { Log.w(TAG, "%s: executeRequest() Exception: %s. url: %s", e, this, e, url); error = e; } respondWithResult(fullBody, error, response); } finally { RequestUtils.closeResponseBody(response); } }
Source:
<code><START> public Activity(String appPackage, String appActivity) { <END> this.appPackage = appPackage; this.appActivity = appActivity; this.stopApp = true; }</code><technical_language>@email2vimalraj provide checkings: java import static com.google.common.base.Preconditions.checkArgument; import static org.apache.commons.lang3.StringUtils.isBlank; ... public Activity(String appPackage, String appActivity) { checkArgument(!isBlank(appPackage), "App package defined empty null string"); checkArgument(!isBlank(appActivity), "App activity defined empty null string"); ... }</technical_language>

Target:
public Activity(String appPackage, String appActivity) { checkArgument(!isBlank(appPackage), "App package should be defined as not empty or null string"); checkArgument(!isBlank(appActivity), "App activity should be defined as not empty or null string"); this.appPackage = appPackage; this.appActivity = appActivity; this.stopApp = true; }
Source:
<code>public void testImpsersonationServiceAccountUsed() throws Exception { Configuration config = new Configuration(); <START> config.set("fs.gs.auth.access.token.provider.impl", TestingAccessTokenProvider.class.getName()); <END> config.set( GCS_CONFIG_PREFIX + IMPERSONATION_SERVICE_ACCOUNT_SUFFIX.getKey(), "test-service-account"); URI gsUri = new URI("gs://foobar/"); GoogleHadoopFileSystem ghfs = new GoogleHadoopFileSystem(); assertThrows(GoogleJsonResponseException.class, () -> {ghfs.initialize(gsUri, config);}); }</code><technical_language>setClass method if possbile</technical_language>

Target:
public void testImpsersonationServiceAccountUsed() throws Exception { Configuration config = new Configuration(); config.setClass( "fs.gs.auth.access.token.provider.impl", TestingAccessTokenProvider.class, AccessTokenProvider.class); config.set( GCS_CONFIG_PREFIX + IMPERSONATION_SERVICE_ACCOUNT_SUFFIX.getKey(), "test-service-account"); URI gsUri = new URI("gs://foobar/"); GoogleHadoopFileSystem ghfs = new GoogleHadoopFileSystem(); Exception exception = assertThrows( GoogleJsonResponseException.class, () -> { ghfs.initialize(gsUri, config); }); assertThat(exception).hasMessageThat().startsWith("401 Unauthorized"); }
Source:
<code>public synchronized void write(Text key, CrawlDatum value) throws IOException { Map<String, Object> data = new LinkedHashMap<String, Object>(); data.put("url", key.toString()); <START> data.put("statusCode", Integer.toString(value.getStatus())); <END> data.put("statusName", CrawlDatum.getStatusName(value.getStatus())); data.put("fetchTime", new Date(value.getFetchTime()).toString()); data.put("modifiedTime", new Date(value.getModifiedTime()).toString()); data.put("retriesSinceFetch", Integer.toString(value.getRetriesSinceFetch())); data.put("retryIntervalSeconds", Float.toString(value.getFetchInterval())); data.put("retryIntervalDays", Float.toString( (value.getFetchInterval() / FetchSchedule.SECONDS_PER_DAY))); data.put("score", Float.toString(value.getScore())); data.put("signature", (value.getSignature() != null ? StringUtil.toHexString(value.getSignature()) : "null")); Map<String, String> metaData = null; if (value.getMetaData() != null) { metaData = new LinkedHashMap<String, String>(); for (Entry<Writable, Writable> e : value.getMetaData().entrySet()) { metaData.put(e.getKey().toString(), e.getValue().toString()); } } if (metaData != null) { data.put("metadata", metaData); } else { data.put("metadata", ""); } out.write(jsonWriter.writeValueAsBytes(data)); out.writeByte('\n'); }</code><technical_language>JSON supports int float number types, leave conversion strings away. This result in "statusCode": 1 instead of "statusCode": "1". a matter of taste</technical_language>

Target:
public synchronized void write(Text key, CrawlDatum value) throws IOException { Map<String, Object> data = new LinkedHashMap<String, Object>(); data.put("url", key.toString()); data.put("statusCode", value.getStatus()); data.put("statusName", CrawlDatum.getStatusName(value.getStatus())); data.put("fetchTime", new Date(value.getFetchTime()).toString()); data.put("modifiedTime", new Date(value.getModifiedTime()).toString()); data.put("retriesSinceFetch", value.getRetriesSinceFetch()); data.put("retryIntervalSeconds", value.getFetchInterval()); data.put("retryIntervalDays", (value.getFetchInterval() / FetchSchedule.SECONDS_PER_DAY)); data.put("score", value.getScore()); data.put("signature", (value.getSignature() != null ? StringUtil.toHexString(value.getSignature()) : "null")); Map<String, Object> metaData = null; if (value.getMetaData() != null) { metaData = new LinkedHashMap<String, Object>(); for (Entry<Writable, Writable> e : value.getMetaData().entrySet()) { metaData.put(e.getKey().toString(), e.getValue()); } } if (metaData != null) { data.put("metadata", metaData); } else { data.put("metadata", ""); } out.write(jsonWriter.writeValueAsBytes(data)); out.writeByte('\n'); }
Source:
<code>private Image getVerifiedStateImage(int verifiedState) { <START> switch (verifiedState) { <END> case 1: case 2: return CommonImages.getImage(ReviewsImages.GREEN_CHECK); case 0: break; case -1: case -2: return CommonImages.getImage(ReviewsImages.RED_NOT); } return null; }</code><technical_language>listing verified states enum enum values cases, instead of hard coded integers, easier read. For example, state in is '2'</technical_language>

Target:
private Image getVerifiedStateImage(int verifiedState) { if (verifiedState >= VERIFIED) { return CommonImages.getImage(ReviewsImages.GREEN_CHECK); } else { if (verifiedState <= NOT_VERIFIED) { return CommonImages.getImage(ReviewsImages.RED_NOT); } else { return null; } } }
Source:
<code>public <T> SafeHtml replaceAll(List<? extends FindReplace> findReplaceList) { if (findReplaceList == null) { return this; } StringBuilder pat = new StringBuilder(); Iterator<? extends FindReplace> it = findReplaceList.iterator(); for (int i = 0; i < findReplaceList.size(); i++) { FindReplace fr = it.next(); pat.append(fr.pattern().getSource()); <START> if (i != findReplaceList.size() - 1) { <END> pat.append('|'); } } StringBuilder result = new StringBuilder(); RegExp re = RegExp.compile(pat.toString(), "g"); String orig = asString(); int index = 0; MatchResult mat; while ((mat = re.exec(orig)) != null) { String g = mat.getGroup(0); for (FindReplace fr : findReplaceList) { if (fr.pattern().test(g)) { try { String repl = fr.replace(g); result.append(orig.substring(index, mat.getIndex())); result.append(repl); } catch (IllegalArgumentException e) { continue; } index = mat.getIndex() + g.length(); break; } } } result.append(orig.substring(index, orig.length())); return asis(result.toString()); }</code><technical_language>bad rebase</technical_language>

Target:
public <T> SafeHtml replaceAll(List<? extends FindReplace> findReplaceList) { if (findReplaceList == null) { return this; } StringBuilder pat = new StringBuilder(); Iterator<? extends FindReplace> it = findReplaceList.iterator(); while (it.hasNext()) { FindReplace fr = it.next(); pat.append(fr.pattern().getSource()); if (it.hasNext()) { pat.append('|'); } } StringBuilder result = new StringBuilder(); RegExp re = RegExp.compile(pat.toString(), "g"); String orig = asString(); int index = 0; MatchResult mat; while ((mat = re.exec(orig)) != null) { String g = mat.getGroup(0); for (FindReplace fr : findReplaceList) { if (fr.pattern().test(g)) { try { String repl = fr.replace(g); result.append(orig.substring(index, mat.getIndex())); result.append(repl); } catch (IllegalArgumentException e) { continue; } index = mat.getIndex() + g.length(); break; } } } result.append(orig.substring(index, orig.length())); return asis(result.toString()); }
Source:
<code>private void innerDelete(final Path path, boolean tombstone, ITtlTimeProvider ttlTimeProvider) throws IOException { checkPath(path); LOG.debug("Deleting from table in region {}: {}", tableName, region, path); if (path.isRoot()) { LOG.debug("Skip deleting root directory as it does not exist in table"); return; } boolean idempotent = S3AFileSystem.DELETE_CONSIDERED_IDEMPOTENT; if (tombstone) { final PathMetadata pmTombstone = PathMetadata.tombstone(path); pmTombstone.setLastUpdated(ttlTimeProvider.getNow()); Item item = PathMetadataDynamoDBTranslation.pathMetadataToItem( new DDBPathMetadata(pmTombstone)); writeOp.retry( <START> "Put tombstone", <END> path.toString(), idempotent, () -> table.putItem(item)); } else { PrimaryKey key = pathToKey(path); writeOp.retry( "Delete key", path.toString(), idempotent, () -> table.deleteItem(key)); } }</code><technical_language>insert a checkArgument(ttlTimeProvider != null, "ttlTimeProvider" )</technical_language>

Target:
private void innerDelete(final Path path, boolean tombstone, ITtlTimeProvider ttlTimeProvider) throws IOException { checkPath(path); LOG.debug("Deleting from table in region {}: {}", tableName, region, path); if (path.isRoot()) { LOG.debug("Skip deleting root directory as it does not exist in table"); return; } boolean idempotent = S3AFileSystem.DELETE_CONSIDERED_IDEMPOTENT; if (tombstone) { Preconditions.checkArgument(ttlTimeProvider != null, "ttlTimeProvider " + "must not be null"); final PathMetadata pmTombstone = PathMetadata.tombstone(path); pmTombstone.setLastUpdated(ttlTimeProvider.getNow()); Item item = PathMetadataDynamoDBTranslation.pathMetadataToItem( new DDBPathMetadata(pmTombstone)); writeOp.retry( "Put tombstone", path.toString(), idempotent, () -> table.putItem(item)); } else { PrimaryKey key = pathToKey(path); writeOp.retry( "Delete key", path.toString(), idempotent, () -> table.deleteItem(key)); } }
Source:
<code><START> private Platform getPlatform() throws LauncherStartFailedException { <END> logger.trace("Init Platform..."); updateMessage(BundleUtils.getLabel("splash_checkOS")); final Platform platform = Platform.getPlatform(); if (!platform.isLinux() && !platform.isMac() && !platform.isWindows()) { logger.warn("Detected unexpected platform: {}", platform); } logger.debug("Platform: {}", platform); return platform; }</code><technical_language>removed throw new LauncherStartFailedException(); this method throw exception anymore. suggestion private Platform getPlatform() {</technical_language>

Target:
private Platform getPlatform() { logger.trace("Init Platform..."); updateMessage(BundleUtils.getLabel("splash_checkOS")); final Platform platform = Platform.getPlatform(); if (!platform.isLinux() && !platform.isMac() && !platform.isWindows()) { logger.warn("Detected unexpected platform: {}", platform); } logger.debug("Platform: {}", platform); return platform; }