auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>@Test public void test2() { driver.setConnection(new ConnectionStateBuilder() .withAirplaneModeDisabled() .build()); ConnectionState state = driver.getConnection(); <START> assertTrue(!state.isAirplaneModeEnabled() && !state.isWiFiEnabled() && !state.isDataEnabled()); <END> driver.setConnection(new ConnectionStateBuilder() .withAirplaneModeEnabled() .build()); state = driver.getConnection(); assertTrue(state.isAirplaneModeEnabled() && !state.isWiFiEnabled() && !state.isDataEnabled()); }</code><technical_language>check for wifi data is necessary i disabling airplane mode disable airplane mode incase if enabled leave's rest of connection is. it? Enabling airplane mode disable data wifi disabling airplane disable/enable rest. Correct if wrong</technical_language>

Target:
public void test2() { ConnectionState state = driver.setConnection(new ConnectionStateBuilder() .withAirplaneModeDisabled() .build()); assertFalse(state.isAirplaneModeEnabled()); assertFalse(state.isWiFiEnabled()); assertFalse(state.isDataEnabled()); state = driver.setConnection(new ConnectionStateBuilder(state) .withAirplaneModeEnabled() .build()); assertTrue(state.isAirplaneModeEnabled()); }
Source:
<code>private void deleteGeneratedMaps() { log.info("Deleting leftover generated maps..."); if (customMapsDirectory != null && customMapsDirectory.toFile().exists()) { try { <START> Files.list(customMapsDirectory) <END> .filter(Files::isDirectory) .filter(p -> GENERATED_MAP_PATTERN.matcher(p.getFileName().toString()).matches()) .forEach(p -> noCatch(() -> FileUtils.deleteRecursively(p))); } catch (IOException e) { log.error("Could not list custom maps directory for deleting leftover generated maps.", e); } } }</code><technical_language>Files.list in try-with-resources block stream closed</technical_language>

Target:
private void deleteGeneratedMaps() { log.info("Deleting leftover generated maps..."); if (customMapsDirectory != null && customMapsDirectory.toFile().exists()) { try (Stream<Path> listOfMapFiles = Files.list(customMapsDirectory)) { listOfMapFiles .filter(Files::isDirectory) .filter(p -> GENERATED_MAP_PATTERN.matcher(p.getFileName().toString()).matches()) .forEach(p -> noCatch(() -> FileUtils.deleteRecursively(p))); } catch (IOException e) { log.error("Could not list custom maps directory for deleting leftover generated maps.", e); } } }
Source:
<code><START> public List<CaptureConfig> onPresetSession() { <END> return new ArrayList<>(); }</code><technical_language>Is a reason this is a list instead of a CaptureConfig? a usage perspective, sense issue a single config</technical_language>

Target:
public CaptureConfig onPresetSession() { return null; }
Source:
<code>public void shouldFailRequestingARefund_whenAPartialRefundMakesTotalRefundedAmountBiggerThanChargeAmount() { Long firstRefundAmount = 80L; Long secondRefundAmount = 30L; ValidatableResponse validatableResponse = postRefundFor(defaultTestCharge.getExternalChargeId(), firstRefundAmount, defaultTestCharge.getAmount()); String firstRefundId = assertRefundResponseWith(firstRefundAmount, validatableResponse, ACCEPTED.getStatusCode()); List<Map<String, Object>> refundsFoundByChargeId = databaseTestHelper.getRefundsByChargeId(defaultTestCharge.getChargeId()); assertThat(refundsFoundByChargeId.size(), is(1)); assertThat(refundsFoundByChargeId, hasItems(aRefundMatching(firstRefundId, is(notNullValue()), defaultTestCharge.getChargeId(), firstRefundAmount, "REFUNDED"))); postRefundFor(defaultTestCharge.getExternalChargeId(), secondRefundAmount, defaultTestCharge.getAmount() - firstRefundAmount) .statusCode(400) .body("reason", is("amount_not_available")) .body("message", is("Not sufficient amount available for refund")); List<Map<String, Object>> refundsFoundByChargeId1 = databaseTestHelper.getRefundsByChargeId(defaultTestCharge.getChargeId()); assertThat(refundsFoundByChargeId1.size(), is(1)); assertThat(refundsFoundByChargeId1, hasItems(aRefundMatching(firstRefundId, is(notNullValue()), defaultTestCharge.getChargeId(), firstRefundAmount, "REFUNDED"))); <START> assertRefundsHistoryInDBForSuccessfulOrPartialRefund(defaultTestCharge); <END> }</code><technical_language>need this assertion tested</technical_language>

Target:
public void shouldFailRequestingARefund_whenAPartialRefundMakesTotalRefundedAmountBiggerThanChargeAmount() { Long firstRefundAmount = 80L; Long secondRefundAmount = 30L; ValidatableResponse validatableResponse = postRefundFor(defaultTestCharge.getExternalChargeId(), firstRefundAmount, defaultTestCharge.getAmount()); String firstRefundId = assertRefundResponseWith(firstRefundAmount, validatableResponse, ACCEPTED.getStatusCode()); List<Map<String, Object>> refundsFoundByChargeId = databaseTestHelper.getRefundsByChargeId(defaultTestCharge.getChargeId()); assertThat(refundsFoundByChargeId.size(), is(1)); assertThat(refundsFoundByChargeId, hasItems(aRefundMatching(firstRefundId, is(notNullValue()), defaultTestCharge.getChargeId(), firstRefundAmount, "REFUNDED"))); postRefundFor(defaultTestCharge.getExternalChargeId(), secondRefundAmount, defaultTestCharge.getAmount() - firstRefundAmount) .statusCode(400) .body("reason", is("amount_not_available")) .body("message", is("Not sufficient amount available for refund")); List<Map<String, Object>> refundsFoundByChargeId1 = databaseTestHelper.getRefundsByChargeId(defaultTestCharge.getChargeId()); assertThat(refundsFoundByChargeId1.size(), is(1)); assertThat(refundsFoundByChargeId1, hasItems(aRefundMatching(firstRefundId, is(notNullValue()), defaultTestCharge.getChargeId(), firstRefundAmount, "REFUNDED"))); assertRefundsHistoryInOrderInDBForSuccessfulOrPartialRefund(defaultTestCharge); }
Source:
<code>public Ds3DocSpecParserImpl(final NameMapper nameMapper) { <START> this.objectMapper = initDs3DocSpec(); <END> this.nameMapper = nameMapper; }</code><technical_language>this is created a static method, is thread safe, create objectMapper in a static constructor, objectMapper static</technical_language>

Target:
public Ds3DocSpecParserImpl(final NameMapper nameMapper) { this.nameMapper = nameMapper; }
Source:
<code>public void issuerWhenTokenEndpointAuthMethodsNoneThenMethodIsNone() throws Exception { this.response.put("token_endpoint_auth_methods_supported", Arrays.asList("none")); ClientRegistration registration = registration("") <START> .clientAuthenticationMethod(ClientAuthenticationMethod.NONE) <END> .build(); assertThat(registration.getClientAuthenticationMethod()).isEqualTo(ClientAuthenticationMethod.NONE); }</code><technical_language>This line removed ensure clientAuthenticationMethod is ClientAuthenticationMethod.NONE</technical_language>

Target:
public void issuerWhenTokenEndpointAuthMethodsNoneThenMethodIsNone() throws Exception { this.response.put("token_endpoint_auth_methods_supported", Arrays.asList("none")); ClientRegistration registration = registration("").build(); assertThat(registration.getClientAuthenticationMethod()).isEqualTo(ClientAuthenticationMethod.NONE); }
Source:
<code>void initializeNewTasks() { if (!created.isEmpty()) { log.debug("Initializing {}s {}", taskTypeName, created.keySet()); } for (final Iterator<Map.Entry<TaskId, T>> it = created.entrySet().iterator(); it.hasNext(); ) { final Map.Entry<TaskId, T> entry = it.next(); try { if (!entry.getValue().initializeStateStores()) { <START> log.debug("Transitioning to created", taskTypeName, entry.getKey()); <END> ((AssignedStreamsTasks) this).addToRestoring((StreamTask) entry.getValue()); } else { transitionToRunning(entry.getValue()); } it.remove(); } catch (final LockException e) { log.trace("Could not create due to {}; will retry", taskTypeName, entry.getKey(), e.toString()); } } }</code><technical_language>Is this intentional</technical_language>

Target:
void initializeNewTasks() { if (!created.isEmpty()) { log.debug("Initializing {}s {}", taskTypeName, created.keySet()); } for (final Iterator<Map.Entry<TaskId, T>> it = created.entrySet().iterator(); it.hasNext(); ) { final Map.Entry<TaskId, T> entry = it.next(); try { if (!entry.getValue().initializeStateStores()) { log.debug("Transitioning to restoring", taskTypeName, entry.getKey()); ((AssignedStreamsTasks) this).addToRestoring((StreamTask) entry.getValue()); } else { transitionToRunning(entry.getValue()); } it.remove(); } catch (final LockException e) { log.debug("Could not create due to {}; will retry", taskTypeName, entry.getKey(), e.toString()); } } }
Source:
<code>public void shouldRaiseAlertIfRequestParamsAppearAsCookieValue() throws URIException, NullPointerException { HttpMessage msg = createMessage(); msg.getRequestHeader().setURI(new URI("<LINK_0>", false)); msg.getResponseHeader().setHeader(HttpResponseHeader.SET_COOKIE, "Set-Cookie: aCookie=fred; Secure"); rule.scanHttpResponseReceive(msg, -1, createSource(msg)); <START> assertThat(alertsRaised.size(), equalTo(1)); <END> }</code><technical_language>assert alert's param (same for tests)</technical_language>

Target:
public void shouldRaiseAlertIfRequestParamsAppearAsCookieValue() throws Exception { HttpMessage msg = createMessage(); msg.getRequestHeader().setURI(new URI("<LINK_0>", false)); msg.getResponseHeader().setHeader(HttpResponseHeader.SET_COOKIE, "Set-Cookie: aCookie=fred; Secure"); rule.scanHttpResponseReceive(msg, -1, createSource(msg)); assertThat(alertsRaised.size(), equalTo(1)); assertThat(alertsRaised.get(0).getParam(), equalTo("name")); }
Source:
<code>public static Object[] setUpLayoutElements(Context context, FormEntryPrompt prompt) { View answerView; CustomRangeSlider slider; TextView currentValue; TextView minValue; TextView maxValue; String appearance = prompt.getQuestion().getAppearanceAttr(); if (appearance != null && appearance.contains(VERTICAL_APPEARANCE)) { RangeWidgetVerticalBinding rangeWidgetVerticalBinding = RangeWidgetVerticalBinding .inflate(((Activity) context).getLayoutInflater()); answerView = rangeWidgetVerticalBinding.getRoot(); slider = rangeWidgetVerticalBinding.slider; currentValue = rangeWidgetVerticalBinding.currentValue; minValue = rangeWidgetVerticalBinding.minValue; maxValue = rangeWidgetVerticalBinding.maxValue; } else { RangeWidgetHorizontalBinding rangeWidgetHorizontalBinding = RangeWidgetHorizontalBinding .inflate(((Activity) context).getLayoutInflater()); answerView = rangeWidgetHorizontalBinding.getRoot(); slider = rangeWidgetHorizontalBinding.slider; currentValue = rangeWidgetHorizontalBinding.currentValue; minValue = rangeWidgetHorizontalBinding.minValue; maxValue = rangeWidgetHorizontalBinding.maxValue; } setUpWidgetParameters((RangeQuestion) prompt.getQuestion(), minValue, maxValue); if (prompt.isReadOnly()) { slider.setEnabled(false); } <START> return new Object[] {answerView, slider, currentValue}; <END> }</code><technical_language>This return a custom class array. nest in called RangeWidgetLayoutElements</technical_language>

Target:
public static RangeWidgetLayoutElements setUpLayoutElements(Context context, FormEntryPrompt prompt) { View answerView; TrackingTouchSlider slider; TextView currentValue; TextView minValue; TextView maxValue; String appearance = prompt.getQuestion().getAppearanceAttr(); if (appearance != null && appearance.contains(VERTICAL_APPEARANCE)) { RangeWidgetVerticalBinding rangeWidgetVerticalBinding = RangeWidgetVerticalBinding .inflate(((Activity) context).getLayoutInflater()); answerView = rangeWidgetVerticalBinding.getRoot(); slider = rangeWidgetVerticalBinding.slider; currentValue = rangeWidgetVerticalBinding.currentValue; minValue = rangeWidgetVerticalBinding.minValue; maxValue = rangeWidgetVerticalBinding.maxValue; } else { RangeWidgetHorizontalBinding rangeWidgetHorizontalBinding = RangeWidgetHorizontalBinding .inflate(((Activity) context).getLayoutInflater()); answerView = rangeWidgetHorizontalBinding.getRoot(); slider = rangeWidgetHorizontalBinding.slider; currentValue = rangeWidgetHorizontalBinding.currentValue; minValue = rangeWidgetHorizontalBinding.minValue; maxValue = rangeWidgetHorizontalBinding.maxValue; } setUpWidgetParameters((RangeQuestion) prompt.getQuestion(), minValue, maxValue); if (prompt.isReadOnly()) { slider.setEnabled(false); } return new RangeWidgetLayoutElements(answerView, slider, currentValue); }
Source:
<code>public IBigtableDataClient getClientWrapper() { if(options.useGCJClient()){ return dataGCJClient; <START> } <END> return new BigtableDataClientWrapper(dataClient, getDataRequestContext()); }</code><technical_language>Please else here</technical_language>

Target:
public IBigtableDataClient getClientWrapper() { if (options.useGCJClient()) { if (this.dataGCJClient == null) { synchronized (BigtableSession.this) { try { if (dataGCJClient == null) { BigtableDataSettings dataSettings = BigtableVeneerSettingsFactory.createBigtableDataSettings(options); this.dataGCJClient = new BigtableDataGCJClient( com.google.cloud.bigtable.data.v2.BigtableDataClient.create(dataSettings)); } } catch (IOException ioException) { throw new RuntimeException(ioException); } } } return dataGCJClient; } else { return new BigtableDataClientWrapper(dataClient, getDataRequestContext()); } }
Source:
<code>public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception { final ItemStack stack = user.getBase().getItemInHand(); if (stack == null) { throw new Exception(tl("cantSpawnItem", "Air")); } if (stack.getAmount() >= ((user.isAuthorized("essentials.oversizedstacks")) ? ess.getSettings().getOversizedStackSize() : stack.getMaxStackSize())) { throw new Exception(tl("fullStack")); } final String itemname = stack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", ""); if (!user.canSpawnItem(stack.getType())) { throw new Exception(tl("cantSpawnItem", itemname)); } if (args.length > 1) { int newAmount = stack.getAmount(); try { newAmount += Integer.parseInt(ChatColor.stripColor(args[1])); <START> } catch(Exception e) { <END> throw new Exception(tl("numberRequired")); } if (!user.isAuthorized("essentials.oversizedstacks")) { newAmount = stack.getMaxStackSize(); } else { if (newAmount > ess.getSettings().getOversizedStackSize()) { newAmount = ess.getSettings.getOversizedStackSize(); } } stack.setAmount(newAmount); } else { if (user.isAuthorized("essentials.oversizedstacks")) { stack.setAmount(ess.getSettings().getOversizedStackSize()); } else { stack.setAmount(stack.getMaxStackSize()); } } user.getBase().updateInventory(); }</code><technical_language>NumberFormatException</technical_language>

Target:
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception { final ItemStack stack = user.getBase().getItemInHand(); if (stack == null) { throw new Exception(tl("cantSpawnItem", "Air")); } if (stack.getAmount() >= ((user.isAuthorized("essentials.oversizedstacks")) ? ess.getSettings().getOversizedStackSize() : stack.getMaxStackSize())) { throw new Exception(tl("fullStack")); } final String itemname = stack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", ""); if (!user.canSpawnItem(stack.getType())) { throw new Exception(tl("cantSpawnItem", itemname)); } if (args.length > 1) { int newAmount = stack.getAmount(); try { newAmount += Integer.parseInt(args[1]); } catch(NumberFormatException e) { throw new Exception(tl("numberRequired")); } if (!user.isAuthorized("essentials.oversizedstacks")) { newAmount = stack.getMaxStackSize(); } else { if (newAmount > ess.getSettings().getOversizedStackSize()) { newAmount = ess.getSettings().getOversizedStackSize(); } } stack.setAmount(newAmount); } else { if (user.isAuthorized("essentials.oversizedstacks")) { stack.setAmount(ess.getSettings().getOversizedStackSize()); } else { stack.setAmount(stack.getMaxStackSize()); } } user.getBase().updateInventory(); }
Source:
<code>public void exportDataset(DatasetVersion version, JsonObject json, OutputStream outputStream) throws ExportException { try { <START> Path cachedMetadataFilePath = Paths.get(version.getDataset().getFileSystemDirectory().toString(), "export_ddi" + ".cached"); <END> File datafile = cachedMetadataFilePath.toFile(); DdiExportUtil.datasetHtmlDDI(datafile, outputStream); } catch (XMLStreamException xse) { throw new ExportException ("Caught XMLStreamException performing DDI export"); } }</code><technical_language>getFileSystemDirectory suspect this work S3 Swift</technical_language>

Target:
public void exportDataset(DatasetVersion version, JsonObject json, OutputStream outputStream) throws ExportException { try { InputStream ddiInputStream; try { ddiInputStream = ExportService.getInstance(null).getExport(version.getDataset(), "ddi"); } catch(ExportException | IOException e) { throw new ExportException ("Cannot open export_ddi cached file"); } DdiExportUtil.datasetHtmlDDI(ddiInputStream, outputStream); } catch (XMLStreamException xse) { throw new ExportException ("Caught XMLStreamException performing DDI export"); } }
Source:
<code>public Response performRemove(String id) { RemoveVmFromImportExportParamenters params = new RemoveVmFromImportExportParamenters( <START> Guid.createGuidFromStringDefaultEmpty(id), <END> storageDomainId, getDataCenterId(storageDomainId)); return performAction(VdcActionType.RemoveVmFromImportExport, params); }</code><technical_language>this is a code this call is dispatched get(), please asGuid(id) returns BAD_REQUEST while Guid.createGuidFromString() throws IllegalArgumentException string is convertible UUID</technical_language>

Target:
public Response performRemove(String id) { RemoveVmFromImportExportParamenters params = new RemoveVmFromImportExportParamenters( GuidUtils.asGuid(id), storageDomainId, getDataCenterId(storageDomainId)); return performAction(VdcActionType.RemoveVmFromImportExport, params); }
Source:
<code>public void testNodes() throws Exception { try(IgniteEx g1 = startGrid(0)) { <START> SystemView<ClusterNodeView> nodes = g1.context().systemView().view(NODES_SYS_VIEW); <END> assertEquals(1, nodes.size()); checkNodeView(nodes.iterator().next(), g1.localNode(), true); try(IgniteEx g2 = startGrid(1)) { awaitPartitionMapExchange(); assertEquals(2, nodes.size()); boolean found = false; for (ClusterNodeView node : nodes) { if (!node.nodeId().equals(g2.localNode().id())) continue; checkNodeView(node, g2.localNode(), false); found = true; break; } assertTrue(found); SystemView<ClusterNodeView> nodes2 = g2.context().systemView().view(NODES_SYS_VIEW); assertEquals(2, nodes2.size()); for (ClusterNodeView node : nodes2) { if(node.nodeId().equals(g2.localNode().id())) checkNodeView(node, g2.localNode(), true); else checkNodeView(node, g1.localNode(), false); } } } }</code><technical_language>rename nodes -> views</technical_language>

Target:
public void testNodes() throws Exception { try(IgniteEx g1 = startGrid(0)) { SystemView<ClusterNodeView> views = g1.context().systemView().view(NODES_SYS_VIEW); assertEquals(1, views.size()); try(IgniteEx g2 = startGrid(1)) { awaitPartitionMapExchange(); checkViewsState(views, g1.localNode(), g2.localNode()); checkViewsState(g2.context().systemView().view(NODES_SYS_VIEW), g2.localNode(), g1.localNode()); } assertEquals(1, views.size()); } }
Source:
<code>public static void waitForBlocksToBeFreed(final BlockWorker bw, final Long... blockIds) throws TimeoutException { try { <START> Whitebox.getInternalState(bw, BlockMasterSync.class).heartbeat(); <END> CommonUtils.waitFor("blocks to be removed", () -> { if (blockIds.length == 0) { return true; } Set<Long> blocks = bw.getBlockStore().getBlockStoreMetaFull() .getBlockListByStorageLocation().values().stream().flatMap(List::stream) .collect(Collectors.toSet()); List<Long> bids = Lists.newArrayList(blockIds); return bids.stream().map(id -> !blocks.contains(id)).reduce((s1, s2) -> s1 && s2) .orElse(false); }, WaitForOptions.defaults().setTimeoutMs(100 * Constants.SECOND_MS)); Whitebox.getInternalState(bw, BlockMasterSync.class).heartbeat(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new RuntimeException(e); } }</code><technical_language>do whitebox these</technical_language>

Target:
public static void waitForBlocksToBeFreed(final BlockWorker bw, final Long... blockIds) throws TimeoutException { try { Whitebox.getInternalState(bw, BlockMasterSync.class).heartbeat(); CommonUtils.waitFor("blocks to be removed", () -> { Set<Long> blocks = bw.getBlockStore().getBlockStoreMetaFull() .getBlockListByStorageLocation().values().stream().flatMap(List::stream) .collect(Collectors.toSet()); blocks.retainAll(Sets.newHashSet(blockIds)); return blocks.isEmpty(); }, WaitForOptions.defaults().setTimeoutMs(100 * Constants.SECOND_MS)); Whitebox.getInternalState(bw, BlockMasterSync.class).heartbeat(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new RuntimeException(e); } }
Source:
<code>private ConnectionCheck(String host, int port) { <START> this.host = "127.0.0.1"; END> this.port = port; }</code><technical_language>This work if Jenkins is running host docker daemon. work in general case Jenkins is a separate host docker hosts/swarms talking to</technical_language>

Target:
private ConnectionCheck(String host, int port) { this.host = host; this.port = port; }
Source:
<code><START> protected @Nullable String generateStringOfCFGWithoutAnalysis( <END> String inputFile, String method, String clas, boolean verbose) { @Nullable Map<String, Object> res = generateStringOfCFG(inputFile, method, clas, verbose, null); if (res != null) { return (String) res.get("stringGraph"); } else { return "null"; } }</code><technical_language>non-null</technical_language>

Target:
protected String generateStringOfCFGWithoutAnalysis( String inputFile, String method, String clas, boolean verbose) { @Nullable Map<String, Object> res = generateStringOfCFG(inputFile, method, clas, verbose, null); if (res != null) { String stringGraph = (String) res.get("stringGraph"); if (stringGraph == null) { return "Unexpected output from generating string control flow graph, shouldn't be null."; } return stringGraph; } else { return "Unexpected output from generating string control flow graph, shouldn't be null."; } }
Source:
<code>private static int largestNPandigitalPrime() { return Stream.rangeClosedBy(9, 1, -1) .flatMap(n -> nDigitPandigitalNumbers(n) .filter(Utils::isPrime) .sorted() <START> .reverse()) <END> .head(); }</code><technical_language>omit reverse providing a comparator: java sorted(Comparator.reverseOrder()) (does compile?)</technical_language>

Target:
private static int largestNPandigitalPrime() { return Stream.rangeClosedBy(9, 1, -1) .flatMap(n -> nDigitPandigitalNumbers(n) .filter(Utils::isPrime) .sorted(reverseOrder())) .head(); }
Source:
<code>ExecutionContextBuilder(ExecutionContext other) { instrumentation = other.getInstrumentation(); executionId = other.getExecutionId(); instrumentationState = other.getInstrumentationState(); graphQLSchema = other.getGraphQLSchema(); queryStrategy = other.getQueryStrategy(); mutationStrategy = other.getMutationStrategy(); subscriptionStrategy = other.getSubscriptionStrategy(); context = other.getContext(); root = other.getRoot(); document = other.getDocument(); operationDefinition = other.getOperationDefinition(); variables = new LinkedHashMap<>(other.getVariables()); fragmentsByName = new LinkedHashMap<>(other.getFragmentsByName()); dataLoaderRegistry = other.getDataLoaderRegistry(); cacheControl = other.getCacheControl(); locale = other.getLocale(); errors = new ArrayList<>(other.getErrors()); valueUnboxer = other.getValueUnboxer(); <START> this.executionInput = other.getExecutionInput(); <END> }</code><technical_language>nit: this other assignments for consistency</technical_language>

Target:
ExecutionContextBuilder(ExecutionContext other) { instrumentation = other.getInstrumentation(); executionId = other.getExecutionId(); instrumentationState = other.getInstrumentationState(); graphQLSchema = other.getGraphQLSchema(); queryStrategy = other.getQueryStrategy(); mutationStrategy = other.getMutationStrategy(); subscriptionStrategy = other.getSubscriptionStrategy(); context = other.getContext(); localContext = other.getLocalContext(); root = other.getRoot(); document = other.getDocument(); operationDefinition = other.getOperationDefinition(); variables = new LinkedHashMap<>(other.getVariables()); fragmentsByName = new LinkedHashMap<>(other.getFragmentsByName()); dataLoaderRegistry = other.getDataLoaderRegistry(); cacheControl = other.getCacheControl(); locale = other.getLocale(); errors = new ArrayList<>(other.getErrors()); valueUnboxer = other.getValueUnboxer(); executionInput = other.getExecutionInput(); }
Source:
<code>public static ScheduledThreadPoolExecutor newScheduledThreadPoolExecutor(int corePoolSize, ThreadFactory threadFactory, RejectedExecutionHandler handler) { int positiveCorePoolSize = corePoolSize > 0 ? corePoolSize : 1; ScheduledThreadPoolExecutor ret = new ScheduledThreadPoolExecutor(positiveCorePoolSize, threadFactory, <START> handler) { <END> @Override public void execute(Runnable command) { super.execute(wrap(command)); } }; ret.setKeepAliveTime(DEFAULT_THREAD_POOL_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS); return ret; }</code><technical_language>I this change behaviour (if passed in negative values before, ScheduledThreadPoolExecutor constructor throw, while silently set 1) - widely this class is prefer for change this much</technical_language>

Target:
public static ScheduledThreadPoolExecutor newScheduledThreadPoolExecutor(int corePoolSize, ThreadFactory threadFactory, RejectedExecutionHandler handler) { Preconditions.checkArgument(corePoolSize >= 0, "Cannot create a ScheduledThreadPoolExecutor with threads - thread count must not be negative!", SafeArg.of("corePoolSize", corePoolSize)); int positiveCorePoolSize = corePoolSize > 0 ? corePoolSize : 1; ScheduledThreadPoolExecutor ret = new ScheduledThreadPoolExecutor(positiveCorePoolSize, threadFactory, handler) { @Override public void execute(Runnable command) { super.execute(wrap(command)); } }; ret.setKeepAliveTime(DEFAULT_THREAD_POOL_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS); return ret; }
Source:
<code>private synchronized void scheduleUpdate() { scheduledFuture = updateScheduledExecutor.scheduleWithFixedDelay(() -> { synchronized (this) { if (future != null && !future.isDone()) { return; } } <START> long count = infoUpdateExponentialWait ? min(abs(updateCount.get()), 10) : 1; <END> if (nanosSince(lastUpdateNanos.get()).toMillis() >= updateIntervalMillis * count) { sendNextRequest(); } }, 0, 100, MILLISECONDS); }</code><technical_language>remove abs updateCount long</technical_language>

Target:
private synchronized void scheduleUpdate() { scheduledFuture = updateScheduledExecutor.scheduleWithFixedDelay(() -> { synchronized (this) { if (future != null && !future.isDone()) { return; } } if (nanosSince(lastUpdateNanos.get()).toMillis() >= updateIntervalMillis) { sendNextRequest(); } }, 0, 100, MILLISECONDS); }
Source:
<code>private void updateDiseaseOccurrenceValidationWeighting(DiseaseOccurrence occurrence, Set<DiseaseOccurrence> pendingSave) { Double expertWeighting = occurrence.getExpertWeighting(); double systemWeighting = occurrence.getSystemWeighting(); double weighting = (expertWeighting != null) ? expertWeighting : systemWeighting; <START> if (occurrence.getValidationWeighting() == null || occurrence.getValidationWeighting() != weighting) { <END> pendingSave.add(occurrence); occurrence.setValidationWeighting(weighting); } }</code><technical_language>extracting this expression a method called hasWeightingChanged, in updateDiseaseOccurrenceFinalWeighting method</technical_language>

Target:
private void updateDiseaseOccurrenceValidationWeighting(DiseaseOccurrence occurrence, Set<DiseaseOccurrence> pendingSave) { Double expertWeighting = occurrence.getExpertWeighting(); double systemWeighting = occurrence.getSystemWeighting(); double weighting = (expertWeighting != null) ? expertWeighting : systemWeighting; if (hasWeightingChanged(occurrence.getValidationWeighting(), weighting)) { pendingSave.add(occurrence); occurrence.setValidationWeighting(weighting); } }
Source:
<code>public void notifyEvents(Collection<Event> events) { if (distributed) { NotifyData nEvent = new NotifyData(currentNode, events, Event.class); Integer key = nEvent.hashCode(); if (log.isDebugEnabled()) { log.debugf("Sending events [%s]", nEvent); <START> } <END> dataCache.getAdvancedCache().withFlags(Flag.IGNORE_RETURN_VALUES) .putAsync(key, nEvent, LIFESPAN, TimeUnit.MILLISECONDS); } }</code><technical_language>for repetition, same..</technical_language>

Target:
public void notifyEvents(Collection<Event> events) { if (distributed) { NotifyData nEvent = new NotifyData(currentNode, events, Event.class); Integer key = nEvent.hashCode(); log.debugf("Sending events [%s]", nEvent); dataCache.getAdvancedCache().withFlags(Flag.IGNORE_RETURN_VALUES) .putAsync(key, nEvent, LIFESPAN, TimeUnit.MILLISECONDS); } }
Source:
<code>public void executeCommand(UICommand command) { if (command.getName().equalsIgnoreCase("export_to_pdf")) { GlusterVolumeProfileInfo profileInfo = getProfileInfo(); <START> GlusterVolumeCreatePdfParameters pdfParameters = new GlusterVolumeCreatePdfParameters(profileInfo, "", "admin"); END> Frontend.getInstance().runAction(VdcActionType.GlusterVolumeProfilePdfExport, pdfParameters, true); } }</code><technical_language>User id hard coded ?</technical_language>

Target:
public void executeCommand(UICommand command) { if (command.getName().equalsIgnoreCase("export_to_pdf")) { GlusterVolumeProfileInfo profileInfo = getProfileInfo(); GlusterVolumeCreatePdfParameters pdfParameters = new GlusterVolumeCreatePdfParameters(profileInfo, "", "admin"); Frontend.getInstance().runAction(VdcActionType.GlusterVolumeProfilePdfExport, pdfParameters, new IFrontendActionAsyncCallback() { @Override public void executed(FrontendActionAsyncResult result) { VdcReturnValueBase returnValue = result.getReturnValue(); setWindow(null); ConfirmationModel cModel = new ConfirmationModel(); cModel.setMessage(returnValue.getDescription()); } }); } }
Source:
<code>public Transformer<String, String, KeyValue<String, String>> get() { return new Transformer<String, String, KeyValue<String, String>>() { private ProcessorContext context; private KeyValueStore<String, Integer> kvStore; @Override @SuppressWarnings("unchecked") public void init(final ProcessorContext context) { this.context = context; this.context.schedule(Duration.ofSeconds(1), PunctuationType.STREAM_TIME, timestamp -> { try (final KeyValueIterator<String, Integer> iter = kvStore.all()) { System.out.println("----------- " + timestamp + " ----------- "); while (iter.hasNext()) { final KeyValue<String, Integer> entry = iter.next(); System.out.println("[" + entry.key + ", " + entry.value + "]"); context.forward(entry.key, entry.value.toString()); } } }); this.kvStore = (KeyValueStore<String, Integer>) context.getStateStore("Counts"); } @Override public KeyValue<String, String> transform(final String dummy, final String line) { final String[] words = line.toLowerCase(Locale.getDefault()).split(" "); for (final String word : words) { final Integer oldValue = this.kvStore.get(word); if (oldValue == null) { this.kvStore.put(word, 1); } else { this.kvStore.put(word, oldValue + 1); } } <START> context.commit(); <END> return null; } @Override public void close() }; }</code><technical_language>I remove context.commit(); (Can remove in WordCountProcessorDemo?)</technical_language>

Target:
public Transformer<String, String, KeyValue<String, String>> get() { return new Transformer<String, String, KeyValue<String, String>>() { private ProcessorContext context; private KeyValueStore<String, Integer> kvStore; @Override @SuppressWarnings("unchecked") public void init(final ProcessorContext context) { this.context = context; this.context.schedule(Duration.ofSeconds(1), PunctuationType.STREAM_TIME, timestamp -> { try (final KeyValueIterator<String, Integer> iter = kvStore.all()) { System.out.println("----------- " + timestamp + " ----------- "); while (iter.hasNext()) { final KeyValue<String, Integer> entry = iter.next(); System.out.println("[" + entry.key + ", " + entry.value + "]"); context.forward(entry.key, entry.value.toString()); } } }); this.kvStore = (KeyValueStore<String, Integer>) context.getStateStore("Counts"); } @Override public KeyValue<String, String> transform(final String dummy, final String line) { final String[] words = line.toLowerCase(Locale.getDefault()).split(" "); for (final String word : words) { final Integer oldValue = this.kvStore.get(word); if (oldValue == null) { this.kvStore.put(word, 1); } else { this.kvStore.put(word, oldValue + 1); } } return null; } @Override public void close() }; }
Source:
<code>static String generateKey(BibEntry entry, String pattern, BibDatabase database) { GlobalBibtexKeyPattern keyPattern = new GlobalBibtexKeyPattern(Collections.emptyList()); keyPattern.setDefaultValue("[" + pattern + "]"); <START> String unwantedCharacters = "-`ʹ:!;?^+"; <END> return new BibtexKeyGenerator(keyPattern, database, new BibtexKeyPatternPreferences("", "", false, true, keyPattern, ',', false, unwantedCharacters)) .generateKey(entry); }</code><technical_language>a bit ugly, I guess ok leave static methods anyway. If nice, please add a @Deprecated annotation them</technical_language>

Target:
static String generateKey(BibEntry entry, String pattern, BibDatabase database) { GlobalBibtexKeyPattern keyPattern = new GlobalBibtexKeyPattern(Collections.emptyList()); keyPattern.setDefaultValue("[" + pattern + "]"); return new BibtexKeyGenerator(keyPattern, database, new BibtexKeyPatternPreferences("", "", false, true, keyPattern, ',', false, DEFAULT_UNWANTED_CHARACTERS)) .generateKey(entry); }
Source:
<code>public static PaymentRequestEntity from(ChargeEntity chargeEntity) { PaymentRequestEntity paymentEntity = new PaymentRequestEntity(); <START> paymentEntity.setId(chargeEntity.getId()); <END> paymentEntity.setAmount(chargeEntity.getAmount()); paymentEntity.setCreatedDate(chargeEntity.getCreatedDate()); paymentEntity.setDescription(chargeEntity.getDescription()); paymentEntity.setExternalId(chargeEntity.getExternalId()); paymentEntity.setGatewayAccount(chargeEntity.getGatewayAccount()); paymentEntity.setReference(chargeEntity.getReference()); paymentEntity.setReturnUrl(chargeEntity.getReturnUrl()); return paymentEntity; }</code><technical_language>hand, I some sense in keeping IDs same. other hand, risk overlapping IDs generated database sequence. totally liquibase creates a sequence automatically for primary key fields? Another option allow paymentrequest natural PK generated sequence rely fact external IDs charge PaymentRequest</technical_language>

Target:
public static PaymentRequestEntity from(ChargeEntity chargeEntity) { PaymentRequestEntity paymentEntity = new PaymentRequestEntity(); paymentEntity.setAmount(chargeEntity.getAmount()); paymentEntity.setCreatedDate(chargeEntity.getCreatedDate()); paymentEntity.setDescription(chargeEntity.getDescription()); paymentEntity.setExternalId(chargeEntity.getExternalId()); paymentEntity.setGatewayAccount(chargeEntity.getGatewayAccount()); paymentEntity.setReference(chargeEntity.getReference()); paymentEntity.setReturnUrl(chargeEntity.getReturnUrl()); return paymentEntity; }
Source:
<code>private boolean isExpressionPrefix(String entry) { <START> char first = entry.length() == 0 ? ' ' : entry.charAt(0); <END> return first == '=' || first == '+' || first == '-' || first == '@'; }</code><technical_language>Feels odd assigning empty char empty char return false in subsequent check. Admittedly alternatives require more code this is abit random IMO</technical_language>

Target:
private boolean isExpressionPrefix(String entry) { if (entry.isEmpty()) { return false; } char first = entry.charAt(0); return first == '=' || first == '+' || first == '-' || first == '@'; }
Source:
<code>public void updateInPerspective(ActionEvent e) { final Resource[] resources = appContext.getResources(); if (resources != null && resources.length == 1) { final Resource selectedResource = resources[0]; if (Resource.FILE == selectedResource.getResourceType()) { final String fileExtension = ((File)selectedResource).getExtension(); <START> if (pngFile.getExtension().equals(fileExtension) || <END> bmpFile.getExtension().equals(fileExtension) || gifFile.getExtension().equals(fileExtension) || iconFile.getExtension().equals(fileExtension) || svgFile.getExtension().equals(fileExtension) || jpeFile.getExtension().equals(fileExtension) || jpegFile.getExtension().equals(fileExtension) || jpgFile.getExtension().equals(fileExtension)) { e.getPresentation().setEnabledAndVisible(true); return; } } } e.getPresentation().setEnabledAndVisible(false); }</code><technical_language>replace this regexp /\.(gif|jpg|jpeg|tiff|png)</technical_language>

Target:
public void updateInPerspective(ActionEvent e) { final Resource[] resources = appContext.getResources(); if (resources != null && resources.length == 1) { final Resource selectedResource = resources[0]; if (Resource.FILE == selectedResource.getResourceType()) { final String fileExtension = ((File)selectedResource).getExtension(); e.getPresentation().setEnabledAndVisible(extensions.contains(fileExtension)); return; } } e.getPresentation().setEnabledAndVisible(false); }
Source:
<code>public Component buildPageComponent() { final Action authAction = new AbstractAction() { { <START> putValue(Action.NAME, GanttLanguage.getInstance().getText("googleAuth")); <END> } @Override public void actionPerformed(ActionEvent ev) { try { googleAuth.someSampleWork(); } catch(IOException e) {getUiFacade().showErrorDialog(e);}; } }; JPanel result = new JPanel(new BorderLayout()); result.setBorder(new EmptyBorder(5, 5, 5, 5)); JButton testConnectionButton = new JButton(authAction); result.add(testConnectionButton,BorderLayout.NORTH); return result; }</code><technical_language>if plan this action in real code, need i18n. If do plan a button in production UI, GPAction class. constructor takes i18n key fetches required messages automatically</technical_language>

Target:
public Component buildPageComponent() { JPanel result = new JPanel(new BorderLayout()); result.setBorder(new EmptyBorder(5, 5, 5, 5)); JButton testConnectionButton = new JButton(new GPAction("googleConnect") { @Override public void actionPerformed(ActionEvent e) { try { myAuth.someSampleWork(myAuth.getCalendarService(myAuth.authorize())); } catch (Exception e1) { GPLogger.getLogger(GoogleExportOptionPageProvider.class).log(Level.WARNING, "Something went wrong", e1); } } }); result.add(testConnectionButton, BorderLayout.SOUTH); return result; }
Source:
<code>private Optional<Cache<Object, Person>> findCache(Ownership ownership, Object key) { List<Cache<Object, Person>> caches = caches(); ClusteringDependentLogic cdl = cache1.getAdvancedCache().getComponentRegistry().getComponent(ClusteringDependentLogic.class); DistributionInfo distribution = cdl.getCacheTopology().getDistribution(key); Predicate<Cache<?, ?>> predicate = null; switch (ownership) { case PRIMARY: predicate = c -> c.getAdvancedCache().getRpcManager().getAddress().equals(distribution.primary()); break; case BACKUP: predicate = c -> { Address address = c.getAdvancedCache().getRpcManager().getAddress(); return distribution.writeOwners().contains(address) && !distribution.primary().equals(address); }; break; case NON_OWNER: predicate = c -> { Address address = c.getAdvancedCache().getRpcManager().getAddress(); <START> return !distribution.writeOwners().contains(address) && !distribution.primary().equals(address); <END> }; } return caches.stream().filter(predicate).findFirst(); }</code><technical_language>primary is writeOwners, need test separately</technical_language>

Target:
private Optional<Cache<Object, Person>> findCache(Ownership ownership, Object key) { List<Cache<Object, Person>> caches = caches(); ClusteringDependentLogic cdl = cache1.getAdvancedCache().getComponentRegistry().getComponent(ClusteringDependentLogic.class); DistributionInfo distribution = cdl.getCacheTopology().getDistribution(key); Predicate<Cache<?, ?>> predicate = null; switch (ownership) { case PRIMARY: predicate = c -> c.getAdvancedCache().getRpcManager().getAddress().equals(distribution.primary()); break; case BACKUP: predicate = c -> distribution.writeBackups().contains(c.getAdvancedCache().getRpcManager().getAddress()); break; case NON_OWNER: predicate = c -> !distribution.writeOwners().contains(c.getAdvancedCache().getRpcManager().getAddress()); } return caches.stream().filter(predicate).findFirst(); }
Source:
<code>protected void updateVolumeType(StorageType storageType) { <START> isInStorageDomainUpdate = true; <END> if (!isUserSelectVolumeType) { getVolumeType().setSelectedItem(storageType.isBlockDomain() ? VolumeType.Preallocated : VolumeType.Sparse); } isInStorageDomainUpdate = false; }</code><technical_language>this latch done in 'storageDomain_SelectedItemChanged', this 'updateVolumeType' method potentially invoked other flows</technical_language>

Target:
protected void updateVolumeType(StorageType storageType) { if (!isUserSelectedVolumeType) { getVolumeType().setSelectedItem(storageType.isBlockDomain() ? VolumeType.Preallocated : VolumeType.Sparse); } }
Source:
<code>public OptionSet(OptionSet origin) { if (origin == null) throw new NullPointerException(); if_match_list = copyList(origin.if_match_list); uri_host = origin.uri_host; etag_list = copyList(origin.etag_list); if_none_match = origin.if_none_match; uri_port = origin.uri_port; location_path_list = copyList(origin.location_path_list); uri_path_list = copyList(origin.uri_path_list); content_format = origin.content_format; max_age = origin.max_age; uri_query_list = copyList(origin.uri_query_list); accept = origin.accept; location_query_list = copyList(origin.location_query_list); proxy_uri = origin.proxy_uri; proxy_scheme = origin.proxy_scheme; if (origin.block1 != null) block1 = new BlockOption(origin.block1); if (origin.block2 != null) block2 = new BlockOption(origin.block2); observe = origin.observe; if(origin.oscore != null) <START> oscore = origin.oscore.clone(); <END> others = copyList(origin.others); }</code><technical_language>Please, try omit changing files for formatting</technical_language>

Target:
public OptionSet(OptionSet origin) { if (origin == null) { throw new NullPointerException("option set must not be null!"); } if_match_list = copyList(origin.if_match_list); uri_host = origin.uri_host; etag_list = copyList(origin.etag_list); if_none_match = origin.if_none_match; uri_port = origin.uri_port; location_path_list = copyList(origin.location_path_list); uri_path_list = copyList(origin.uri_path_list); content_format = origin.content_format; max_age = origin.max_age; uri_query_list = copyList(origin.uri_query_list); accept = origin.accept; location_query_list = copyList(origin.location_query_list); proxy_uri = origin.proxy_uri; proxy_scheme = origin.proxy_scheme; if (origin.block1 != null) block1 = new BlockOption(origin.block1); if (origin.block2 != null) block2 = new BlockOption(origin.block2); observe = origin.observe; if(origin.oscore != null) oscore = origin.oscore.clone(); others = copyList(origin.others); }
Source:
<code>public MethodOutcome updatePatient(@ResourceParam Patient patient, @IdParam IdType theId) { MethodOutcome retVal = new MethodOutcome(); OperationOutcome outcome = new OperationOutcome(); patientResource.updatePatient(patient, theId.getIdPart()); CodeableConcept concept = new CodeableConcept(); Coding coding = concept.addCoding(); <START> coding.setDisplay("Patient is successfully updated"); <END> outcome.addIssue().setDetails(concept); retVal.setOperationOutcome(outcome); return retVal; }</code><technical_language>move messages constants</technical_language>

Target:
public MethodOutcome updatePatient(@ResourceParam Patient patient, @IdParam IdType theId) { MethodOutcome retVal = new MethodOutcome(); OperationOutcome outcome = new OperationOutcome(); patientResource.updatePatient(patient, theId.getIdPart()); CodeableConcept concept = new CodeableConcept(); Coding coding = concept.addCoding(); coding.setDisplay("Patient is successfully updated with id " + patient.getId()); outcome.addIssue().setDetails(concept); retVal.setOperationOutcome(outcome); return retVal; }
Source:
<code>protected void cleanup(Context context) throws IOException { <START> checkState(mProducerContext != null); <END> mProducer.cleanup(mProducerContext); mProducerContext = null; super.cleanup(context); }</code><technical_language>here. I mProducerContext != null a precondition -- setup() thrown exception want do effort cleanup allowing super.cleanup(context) called</technical_language>

Target:
protected void cleanup(Context context) throws IOException { Preconditions.checkState(mProducerContext != null); mProducer.cleanup(mProducerContext); mProducerContext = null; super.cleanup(context); }
Source:
<code>public void handleProfileGenericDataResponse(final DeviceMessageMetadata deviceMessageMetadata, final ResponseMessageResultType deviceResult, final OsgpException exception, final ProfileGenericDataResponseDto profileGenericDataResponseDto) { LOGGER.info("handleProfileGenericDataResponse for MessageType: {}", deviceMessageMetadata.getMessageType()); ResponseMessageResultType result = deviceResult; if (exception != null) { LOGGER.error(DEVICE_RESPONSE_NOT_OK_LOG_MSG, exception); result = ResponseMessageResultType.NOT_OK; } final ProfileGenericDataResponse profileGenericDataResponse = this.monitoringMapper .map(profileGenericDataResponseDto, ProfileGenericDataResponse.class); <START> this.webServiceResponseMessageSender.send( <END> ResponseMessage.newResponseMessageBuilder() .withCorrelationUid(deviceMessageMetadata.getCorrelationUid()) .withOrganisationIdentification(deviceMessageMetadata.getOrganisationIdentification()) .withDeviceIdentification(deviceMessageMetadata.getDeviceIdentification()).withResult(result) .withOsgpException(exception).withDataObject(profileGenericDataResponse) .withMessagePriority(deviceMessageMetadata.getMessagePriority()).build(), deviceMessageMetadata.getMessageType()); }</code><technical_language>Extract building of ResponseMessage variable (in eclipse, select text, right-click > refactor > extract local variable / select code + shift+alt+L). This code a bit more readable, especially passing in other besides ResponseMessage</technical_language>

Target:
public void handleProfileGenericDataResponse(final DeviceMessageMetadata deviceMessageMetadata, final ResponseMessageResultType deviceResult, final OsgpException exception, final ProfileGenericDataResponseDto profileGenericDataResponseDto) { LOGGER.info("handleProfileGenericDataResponse for MessageType: {}", deviceMessageMetadata.getMessageType()); ResponseMessageResultType result = deviceResult; if (exception != null) { LOGGER.error(DEVICE_RESPONSE_NOT_OK_LOG_MSG, exception); result = ResponseMessageResultType.NOT_OK; } final ProfileGenericDataResponse profileGenericDataResponse = this.monitoringMapper .map(profileGenericDataResponseDto, ProfileGenericDataResponse.class); final ResponseMessage responseMessage = ResponseMessage.newResponseMessageBuilder() .withCorrelationUid(deviceMessageMetadata.getCorrelationUid()) .withOrganisationIdentification(deviceMessageMetadata.getOrganisationIdentification()) .withDeviceIdentification(deviceMessageMetadata.getDeviceIdentification()).withResult(result) .withOsgpException(exception).withDataObject(profileGenericDataResponse) .withMessagePriority(deviceMessageMetadata.getMessagePriority()).build(); this.webServiceResponseMessageSender.send(responseMessage, deviceMessageMetadata.getMessageType()); }
Source:
<code>private void checkTableName(TableReference tableRef) { SweepStrategy sweepStrategy = sweepStrategies.get(tableRef); if (sweepStrategy.mustCheckImmutableLockAfterReads()) { throw new SafeIllegalStateException( "Cannot read from a table with a thorough sweep strategy in a read only transaction."); <START> } <END> }</code><technical_language>change message - "Can read a table a no/conservative sweep strategy in a read transaction."</technical_language>

Target:
private void checkTableName(TableReference tableRef) { SweepStrategy sweepStrategy = sweepStrategies.get(tableRef); Preconditions.checkState(!sweepStrategy.mustCheckImmutableLockAfterReads(), "This table cannot be read from a read-only transaction, because its " + "sweep strategy is neither NOTHING nor CONSERVATIVE", LoggingArgs.tableRef(tableRef)); }
Source:
<code><START> public void waitUntilLeaderIsElected() { <END> waitUntilLeaderIsElected(defaultClient); }</code><technical_language>I get rid of this, force agent</technical_language>

Target:
public void waitUntilLeaderIsElected() { waitUntilLeaderIsElected(ImmutableList.of()); }