auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private Locale determineLocale(final HttpServletRequest request) { Locale locale = LocaleUtils.getLocaleFromString(request.getParameter(LOCALE)); if (locale == null) { locale = getLocaleFromCookies(request.getCookies()); } if (locale == null) { locale = request.getLocale(); } if (locale == null) { locale = Locale.US; } log.debug("Filter determined locale to be: " + locale.toLanguageTag()); <START> return lookupSupportedLocale(locale, getLocaleKeys()); <END> }</code><technical_language>I suggest improve debug message in this case, mention in returned of "lookupSupportedLocale(locale, getLocaleKeys())", especially if is != locale</technical_language>

Target:
private Locale determineLocale(final HttpServletRequest request) { Locale locale = LocaleUtils.getLocaleFromString(request.getParameter(LOCALE)); if (locale == null) { locale = getLocaleFromCookies(request.getCookies()); } if (locale == null) { locale = request.getLocale(); } if (locale == null) { locale = Locale.US; } locale = lookupSupportedLocale(locale, getLocaleKeys()); log.debug("Filter determined locale to be: " + locale.toLanguageTag()); return locale; }
Source:
<code>private void validateDiscardAfterDelete() { if (getDiscardAfterDelete().getIsAvailable() && getDiscardAfterDelete().getEntity()) { SanStorageModelBase sanStorageModel = (SanStorageModelBase) getCurrentStorageItem(); Collection<LunModel> luns = sanStorageModel.getAddedLuns(); if (luns != null && !storageDomainSupportsDiscard(luns)) { getDiscardAfterDelete().setIsValid(false); <START> getDiscardAfterDelete().getInvalidityReasons().add( <END> constants.discardIsNotSupportedByUnderlyingStorage()); return; } } getDiscardAfterDelete().setIsValid(true); }</code><technical_language>Try moving previous line. I solve tool-tip issue</technical_language>

Target:
private void validateDiscardAfterDelete() { if (getDiscardAfterDelete().getIsAvailable() && getDiscardAfterDelete().getEntity()) { SanStorageModelBase sanStorageModel = (SanStorageModelBase) getCurrentStorageItem(); Collection<LunModel> luns = sanStorageModel.getAddedLuns(); if (luns != null && !storageDomainSupportsDiscard(luns)) { getDiscardAfterDelete().getInvalidityReasons().add( constants.discardIsNotSupportedByUnderlyingStorage()); getDiscardAfterDelete().setIsValid(false); return; } } getDiscardAfterDelete().setIsValid(true); }
Source:
<code>public static void main(String[] args) { Options options = configureCommandLineParser(); try { CommandLineParser parser = new BasicParser(); CommandLine commandLine = parser.parse(options, args); if (commandLine.hasOption(HELP)) { usage(options); return; } String propertiesFileName = commandLine.getOptionValue("p"); String testFileName = commandLine.getOptionValue("s"); SqlResultGenerator resultGenerator = new SqlResultGenerator(testFileName, propertiesFileName); resultGenerator.generateExpectedResults(); } catch (ParseException e) { usage(options); <START> System.exit(99); <END> } catch (Exception e) { LOGGER.error("Caught exception in main", e); System.exit(99); } System.exit(0); }</code><technical_language>do System.exit()..</technical_language>

Target:
public static void main(String[] args) { Options options = configureCommandLineParser(); try { CommandLineParser parser = new BasicParser(); CommandLine commandLine = parser.parse(options, args); if (commandLine.hasOption(HELP)) { usage(options); return; } String propertiesFileName = commandLine.getOptionValue("p"); String testFileName = commandLine.getOptionValue("s"); SqlResultGenerator resultGenerator = new SqlResultGenerator(testFileName, propertiesFileName); resultGenerator.generateExpectedResults(); } catch (ParseException e) { usage(options); } catch (Exception e) { LOGGER.error("Caught exception in main", e); } }
Source:
<code>public Intent getIntentForBrokerActivity(final AuthenticationRequest request, final BrokerEvent brokerEvent) <START> throws AuthenticationException { <END> final Bundle requestBundle = getBrokerOptions(request); final Intent intent; if (isBrokerAccountServiceSupported()) { intent = BrokerAccountServiceHandler.getInstance().getIntentForInteractiveRequest(mContext, brokerEvent); intent.putExtras(requestBundle); } else { intent = getIntentForBrokerActivityFromAccountManager(requestBundle); } if (intent != null) { intent.putExtra(AuthenticationConstants.Broker.BROKER_REQUEST, AuthenticationConstants.Broker.BROKER_REQUEST); if (!isBrokerWithPRTSupport(intent) && PromptBehavior.FORCE_PROMPT == request.getPrompt()) { Logger.v(TAG, "FORCE_PROMPT is set for broker auth via old version of broker app, reset to ALWAYS."); intent.putExtra(AuthenticationConstants.Broker.ACCOUNT_PROMPT, PromptBehavior.Always.name()); } } return intent; }</code><technical_language>add a null check in 597</technical_language>

Target:
public Intent getIntentForBrokerActivity(final AuthenticationRequest request, final BrokerEvent brokerEvent) throws AuthenticationException { final Bundle requestBundle = getBrokerOptions(request); final Intent intent; if (isBrokerAccountServiceSupported()) { intent = BrokerAccountServiceHandler.getInstance().getIntentForInteractiveRequest(mContext, brokerEvent); if (intent == null) { Logger.e(TAG, "Received null intent from broker interactive request.", null, ADALError.BROKER_AUTHENTICATOR_NOT_RESPONDING); throw new AuthenticationException(ADALError.BROKER_AUTHENTICATOR_NOT_RESPONDING, "Received null intent from broker interactive request."); } else { intent.putExtras(requestBundle); } } else { intent = getIntentForBrokerActivityFromAccountManager(requestBundle); } if (intent != null) { intent.putExtra(AuthenticationConstants.Broker.BROKER_REQUEST, AuthenticationConstants.Broker.BROKER_REQUEST); if (!isBrokerWithPRTSupport(intent) && PromptBehavior.FORCE_PROMPT == request.getPrompt()) { Logger.v(TAG, "FORCE_PROMPT is set for broker auth via old version of broker app, reset to ALWAYS."); intent.putExtra(AuthenticationConstants.Broker.ACCOUNT_PROMPT, PromptBehavior.Always.name()); } } return intent; }
Source:
<code>public void close() { state = State.DISPOSED; try (Closer closer = Closer.create()) { closer.register(index::clear); spiller.ifPresent(closer::register); <START> } <END> catch (IOException e) { throw new RuntimeException(e); } }</code><technical_language>change memory reservation here</technical_language>

Target:
public void close() { lookupSourceSupplier = null; state = State.DISPOSED; finishMemoryRevoke = finishMemoryRevoke.map(ifPresent -> () -> {}); try (Closer closer = Closer.create()) { closer.register(index::clear); spiller.ifPresent(closer::register); closer.register(() -> operatorContext.setMemoryReservation(0)); closer.register(() -> operatorContext.setRevocableMemoryReservation(0)); } catch (IOException e) { throw new RuntimeException(e); } }
Source:
<code>public void saveLocationsToDatabase(List<Location> locationList, String selectedLocation) { mOpenMRS.setLocation(selectedLocation); locationDAO.deleteAllLocations(); for (int i = 0; i < locationList.size(); i++) { locationDAO.saveLocation(locationList.get(i)) .observeOn(AndroidSchedulers.mainThread()) <START> .subscribe(); <END> } }</code><technical_language>I need AndroidScheduler.mainThread() here, updating UI in subscribe</technical_language>

Target:
public void saveLocationsToDatabase(List<Location> locationList, String selectedLocation) { mOpenMRS.setLocation(selectedLocation); locationDAO.deleteAllLocations(); for (int i = 0; i < locationList.size(); i++) { locationDAO.saveLocation(locationList.get(i)) .observeOn(Schedulers.io()) .subscribe(); } }
Source:
<code>public void testEventStreamingWithEventTypeFilter() throws Exception { assumeNotSwarm("", dockerRule); String startTime = getEpochTime(); int expectedEvents = 1; EventsTestCallback eventCallback = new EventsTestCallback(expectedEvents); dockerRule.getClient().eventsCmd() .withSince(startTime) .withEventTypeFilter(EventType.CONTAINER) <START> .withEventFilter("start") <END> .exec(eventCallback); generateEvents(); List<Event> events = eventCallback.awaitExpectedEvents(30, TimeUnit.SECONDS); for (Event event : events) { assertThat("Received event: " + event, event.getAction(), is("start")); } }</code><technical_language>testing eventType filter, I filter out specific events</technical_language>

Target:
public void testEventStreamingWithEventTypeFilter() throws Exception { assumeNotSwarm("", dockerRule); String startTime = getEpochTime(); generateEvents(); String endTime = getEpochTime(); for (EventType eventType : EventType.values()) { List<Event> events = new CopyOnWriteArrayList<>(); try ( ResultCallback.Adapter<?> eventCallback = dockerRule.getClient().eventsCmd() .withSince(startTime) .withUntil(endTime) .withEventTypeFilter(eventType) .exec(new ResultCallback.Adapter<Event>() { @Override public void onNext(Event event) { events.add(event); } }) ) { eventCallback.awaitCompletion(30, TimeUnit.SECONDS); for (Event event : events) { assertThat("Received event: " + event, event.getType(), is(eventType)); } } } }
Source:
<code>public SizeCachedNoTagsByteBufferKeyValue(ByteBuffer buf, int offset, int length, long seqId, int keyLen) { <START> super(buf, offset, length); <END> rowLen = super.getRowLength(); this.keyLen = keyLen; setSequenceId(seqId); }</code><technical_language>Call next constructor this()</technical_language>

Target:
public SizeCachedNoTagsByteBufferKeyValue(ByteBuffer buf, int offset, int length, long seqId, int keyLen) { super(buf, offset, length); this.rowLen = super.getRowLength(); this.keyLen = keyLen; setSequenceId(seqId); }
Source:
<code>public URL create(final String key, final int value) { <START> return create(key, ""+ value); <END> }</code><technical_language>I prefer String.valueOf(value)</technical_language>

Target:
public URL create(final String key, final int value) { return create(key, String.valueOf(value)); }
Source:
<code>public void testRemoteOutdatedSnapshot() throws Exception { IgniteEx ig0 = startGrids(2); ig0.cluster().active(true); for (int i = 0; i < CACHE_KEYS_RANGE; i++) ig0.cache(DEFAULT_CACHE_NAME).put(i, i); awaitPartitionMapExchange(); <START> for (int i = 0; i < 2; i++) { <END> grid(i). context() .cache() .context() .database() .forceCheckpoint("the next one") .futureFor(CheckpointState.FINISHED) .get(); } TestRecordingCommunicationSpi.spi(ig0) .blockMessages((node, msg) -> msg instanceof SnapshotRequestMessage); UUID rmtNodeId = grid(1).localNode().id(); IgniteSnapshotManager mgr0 = ig0.context() .cache() .context() .snapshotMgr(); IgniteInternalFuture<?> snpFut = mgr0.createRemoteSnapshot(rmtNodeId, owningParts(ig0, new HashSet<>(Collections.singletonList(CU.cacheId(DEFAULT_CACHE_NAME))), rmtNodeId), (part, grp) -> {}); TestRecordingCommunicationSpi.spi(ig0) .waitForBlocked(); startGrid(2); ig0.cluster().setBaselineTopology(ig0.cluster().forServers().nodes()); awaitPartitionMapExchange(); stopGrid(2); TestRecordingCommunicationSpi.spi(grid(1)) .blockMessages((node, msg) -> msg instanceof GridDhtPartitionDemandMessage); ig0.cluster().setBaselineTopology(ig0.cluster().forServers().nodes()); TestRecordingCommunicationSpi.spi(ig0) .stopBlock(true, obj -> obj.get2().message() instanceof SnapshotRequestMessage); snpFut.get(); }</code><technical_language>forceCheckpoint()</technical_language>

Target:
public void testRemoteOutdatedSnapshot() throws Exception { IgniteEx ig0 = startGrids(2); ig0.cluster().state(ClusterState.ACTIVE); for (int i = 0; i < CACHE_KEYS_RANGE; i++) ig0.cache(DEFAULT_CACHE_NAME).put(i, i); awaitPartitionMapExchange(); forceCheckpoint(); TestRecordingCommunicationSpi.spi(ig0) .blockMessages((node, msg) -> msg instanceof SnapshotRequestMessage); UUID rmtNodeId = grid(1).localNode().id(); IgniteSnapshotManager mgr0 = snp(ig0); IgniteInternalFuture<?> snpFut = mgr0.createRemoteSnapshot(rmtNodeId, owningParts(ig0, new HashSet<>(Collections.singletonList(CU.cacheId(DEFAULT_CACHE_NAME))), rmtNodeId), (part, grp) -> {}); TestRecordingCommunicationSpi.spi(ig0) .waitForBlocked(); startGrid(2); ig0.cluster().setBaselineTopology(ig0.cluster().forServers().nodes()); awaitPartitionMapExchange(); stopGrid(2); TestRecordingCommunicationSpi.spi(grid(1)) .blockMessages((node, msg) -> msg instanceof GridDhtPartitionDemandMessage); ig0.cluster().setBaselineTopology(ig0.cluster().forServers().nodes()); TestRecordingCommunicationSpi.spi(ig0) .stopBlock(true, obj -> obj.get2().message() instanceof SnapshotRequestMessage); snpFut.get(); }
Source:
<code><START> private void updateMap(Map map, ServerLocation location, String memberId, float load, <END> float loadPerConnection) { Map groupMap = (Map) map.get(null); ServerLocationAndMemberId locationAndMemberId = new ServerLocationAndMemberId(location, memberId); LoadHolder holder = (LoadHolder) groupMap.get(locationAndMemberId); if (holder != null) { holder.setLoad(load, loadPerConnection); } }</code><technical_language>This is a new method be, leat, unit tested. package private, annotate @VisibleForTesting access LocatorLoadSnapshotJUnitTest and/or LocatorLoadSnapshotIntegrationTest</technical_language>

Target:
void updateMap(Map map, ServerLocation location, String memberId, float load, float loadPerConnection) { Map groupMap = (Map) map.get(null); LoadHolder holder; if (memberId.equals("")) { holder = (LoadHolder) groupMap.get(location); } else { ServerLocationAndMemberId locationAndMemberId = new ServerLocationAndMemberId(location, memberId); holder = (LoadHolder) groupMap.get(locationAndMemberId); } if (holder != null) { holder.setLoad(load, loadPerConnection); } }
Source:
<code>public String[] splitArguments(String s) { if (s == null || s.isEmpty()) { return NO_ARGS; } int state = NORMAL; String delimiter = DOUBLE_QUOTE + SINGLE_QUOTE + SPACE; <START> StringTokenizer tokenizer = new StringTokenizer(s, delimiter, true); <END> List<String> args = new ArrayList<String>(); StringBuilder current = new StringBuilder(); boolean lastTokenInQuotes = false; while (tokenizer.hasMoreTokens()) { String token = tokenizer.nextToken(); switch (state) { case IN_SINGLE_QUOTE: if (SINGLE_QUOTE.equals(token)) { lastTokenInQuotes = true; state = NORMAL; } else { current.append(token); } break; case IN_DOUBLE_QUOTE: if (DOUBLE_QUOTE.equals(token)) { lastTokenInQuotes = true; state = NORMAL; } else { current.append(token); } break; default: if (SINGLE_QUOTE.equals(token)) { state = IN_SINGLE_QUOTE; } else if (DOUBLE_QUOTE.equals(token)) { state = IN_DOUBLE_QUOTE; } else if (SPACE.equals(token)) { if (lastTokenInQuotes || current.length() != 0) { args.add(current.toString()); current = new StringBuilder(); } } else { current.append(token); } lastTokenInQuotes = false; break; } } if (lastTokenInQuotes || current.length() != 0) { args.add(current.toString()); } if (state == IN_SINGLE_QUOTE || state == IN_DOUBLE_QUOTE) { throw new IllegalArgumentException("Unbalanced quotes in " + s); } return args.toArray(new String[args.size()]); }</code><technical_language>Please replace StringTokenizer simple iteration characters</technical_language>

Target:
public String[] splitArguments(String s) { if (s == null || s.isEmpty()) { return NO_ARGS; } ParserState state = ParserState.NORMAL; StringBuilder current = new StringBuilder(); List<String> args = new ArrayList<String>(); boolean lastTokenInQuotes = false; char previous = 0; for (char c : s.toCharArray()) { switch (state) { case IN_SINGLE_QUOTE: if (previous != BACKSLASH && c == SINGLE_QUOTE) { lastTokenInQuotes = true; state = ParserState.NORMAL; } else { previous = c; current.append(c); } break; case IN_DOUBLE_QUOTE: if (previous != BACKSLASH && c == DOUBLE_QUOTE) { lastTokenInQuotes = true; state = ParserState.NORMAL; } else { previous = c; current.append(c); } break; default: switch (c) { case SINGLE_QUOTE: if (previous != BACKSLASH) { state = ParserState.IN_SINGLE_QUOTE; } break; case DOUBLE_QUOTE: if (previous != BACKSLASH) { state = ParserState.IN_DOUBLE_QUOTE; } break; case SPACE: if (lastTokenInQuotes || current.length() != 0) { args.add(current.toString()); current.setLength(0); } break; default: previous = c; current.append(c); } lastTokenInQuotes = false; break; } } if (lastTokenInQuotes || current.length() != 0) { args.add(current.toString()); } if (state != ParserState.NORMAL) { throw new IllegalArgumentException("Unbalanced quotes in " + s); } return args.toArray(new String[args.size()]); }
Source:
<code>private void startReencryption(Collection<Integer> grpIds) throws IgniteCheckedException { if (pageScanner.disabled()) return; for (int grpId : grpIds) { <START> IgniteInternalFuture<?> fut = pageScanner.schedule(grpId); <END> fut.listen(f -> { try { f.get(); synchronized (metaStorageMux) { cleanupKeys(grpId); reencryptGroups.remove(grpId); } } catch (IgniteFutureCancelledCheckedException e) { log.warning("Reencryption cancelled [grp=" + grpId + "]"); } catch (IgniteCheckedException e) { log.warning("Reencryption failed [grp=" + grpId + "]", e); } }); } }</code><technical_language>if (f.isCancelled()) {...} else if (f.error() != null) {...} else {...}</technical_language>

Target:
private void startReencryption(Collection<Integer> grpIds) throws IgniteCheckedException { for (int grpId : grpIds) { IgniteInternalFuture<?> fut = pageScanner.schedule(grpId); fut.listen(f -> { if (f.isCancelled() || f.error() != null) { log.warning("Reencryption " + (f.isCancelled() ? "cancelled" : "failed") + " [grp=" + grpId + "]", f.error()); return; } withMasterKeyChangeReadLock(() -> { synchronized (metaStorageMux) { cleanupKeys(grpId); reencryptGroups.remove(grpId); } return null; }); }); } }
Source:
<code>private static int scaleSimpleTextLines(TextView tv) { SharedPreferences mPrefs = PreferenceManager.getDefaultSharedPreferences(tv.getContext()); float scalingFactor = Float.parseFloat(mPrefs.getString(SettingsActivity.SP_FONT_SIZE, "1.0")); int numLines = 5; if(scalingFactor < 0.9) { <START> numLines = 7; <END> } else if (scalingFactor < 1.1 ) { numLines = 5; } else if (scalingFactor < 1.3 ) { numLines = 4; } else if (scalingFactor < 1.5 ) { numLines = 3; } return numLines; }</code><technical_language>some of text (last line) cut for "small" font, I suggest 6 lines here? work for properly? :) suggestion numLines = 6;</technical_language>

Target:
private static int scaleSimpleTextLines(TextView tv) { SharedPreferences mPrefs = PreferenceManager.getDefaultSharedPreferences(tv.getContext()); float scalingFactor = Float.parseFloat(mPrefs.getString(SettingsActivity.SP_FONT_SIZE, "1.0")); return Math.round((scalingFactor*-5)+10); }
Source:
<code>private List<EurekaEndpoint> getHostCandidates() { List<EurekaEndpoint> candidateHosts = clusterResolver.getClusterEndpoints(); quarantineSet.retainAll(candidateHosts); int threshold = candidateHosts.size() * transportConfig.getRetryableClientQuarantineRefreshPercentage() / 100; if (quarantineSet.isEmpty()) { <START> } else if (quarantineSet.size() >= threshold) { <END> logger.debug("Clearing quarantined list of size {}", quarantineSet.size()); quarantineSet.clear(); } else { List<EurekaEndpoint> remainingHosts = new ArrayList<>(candidateHosts.size()); for (EurekaEndpoint endpoint : candidateHosts) { if (!quarantineSet.contains(endpoint)) { remainingHosts.add(endpoint); } } candidateHosts = remainingHosts; } return candidateHosts; }</code><technical_language>I if this is good approach. If 50% servers down, threshold is 50%, client able connect healthy instance, quarantine set live instance reset zero</technical_language>

Target:
private List<EurekaEndpoint> getHostCandidates() { List<EurekaEndpoint> candidateHosts = clusterResolver.getClusterEndpoints(); quarantineSet.retainAll(candidateHosts); int threshold = (int) (candidateHosts.size() * transportConfig.getRetryableClientQuarantineRefreshPercentage()); if (quarantineSet.isEmpty()) { } else if (quarantineSet.size() >= threshold) { logger.debug("Clearing quarantined list of size {}", quarantineSet.size()); quarantineSet.clear(); } else { List<EurekaEndpoint> remainingHosts = new ArrayList<>(candidateHosts.size()); for (EurekaEndpoint endpoint : candidateHosts) { if (!quarantineSet.contains(endpoint)) { remainingHosts.add(endpoint); } } candidateHosts = remainingHosts; } return candidateHosts; }
Source:
<code>void emit(double tot_distance) { double avg_time = sum_time; double avg_dist = sum_distance; double avg_hr = calculateAverageHr(hr); { double max_pace[] = { 0, 0, 0 }; double min_pace[] = { Double.MAX_VALUE, 0, 0 }; for (int i = 0; i < this.time.length; i++) { double pace = this.time[i] / this.distance[i]; if (pace > max_pace[0]) { max_pace[0] = pace; max_pace[1] = this.time[i]; max_pace[2] = this.distance[i]; } if (pace < min_pace[0]) { min_pace[0] = pace; min_pace[1] = this.time[i]; min_pace[2] = this.distance[i]; } } } if (avg_dist > 0) { <START> double pace = 0.0; <END> switch(this.preferred_speedunit){ case PACE: pace = avg_time / avg_dist / 1000.0; break; case SPEED: pace = avg_dist / avg_time / 1000.0; break; } if (first) { paceList.add(new DataPoint(0, pace)); hrList.add(new DataPoint(0, Math.round(avg_hr))); first = false; } paceList.add(new DataPoint(tot_distance, pace)); hrList.add(new DataPoint(tot_distance, Math.round(avg_hr))); acc_time = 0; tot_avg_hr += avg_hr; avg_pace += pace; min_pace = Math.min(min_pace, pace); max_pace = Math.max(max_pace, pace); } }</code><technical_language>please rename variable change check for dist for pace, a similar for speed time</technical_language>

Target:
void emit(double tot_distance) { double avg_time = sum_time; double avg_dist = sum_distance; double avg_hr = calculateAverageHr(hr); { double max_velocity[] = { 0, 0, 0 }; double min_velocity[] = { Double.MAX_VALUE, 0, 0 }; for (int i = 0; i < this.time.length; i++) { double velocity = this.time[i] / this.distance[i]; if (velocity > max_velocity[0]) { max_velocity[0] = velocity; max_velocity[1] = this.time[i]; max_velocity[2] = this.distance[i]; } if (velocity < min_velocity[0]) { min_velocity[0] = velocity; min_velocity[1] = this.time[i]; min_velocity[2] = this.distance[i]; } } } double velocity = 0.0; switch (this.preferred_speedunit) { case PACE: if (avg_dist > 0) { velocity = avg_time / avg_dist / 1000.0; } break; case SPEED: if (avg_time > 0) { velocity = avg_dist / avg_time * 1000.0; } break; } if (first) { velocityList.add(new DataPoint(0, velocity)); hrList.add(new DataPoint(0, Math.round(avg_hr))); first = false; } velocityList.add(new DataPoint(tot_distance, velocity)); hrList.add(new DataPoint(tot_distance, Math.round(avg_hr))); acc_time = 0; tot_avg_hr += avg_hr; avg_velocity += velocity; min_velocity = Math.min(min_velocity, velocity); max_velocity = Math.max(max_velocity, velocity); }
Source:
<code><START> public void setActionParameters(ArrayList<ActionParameter> actionParameters) { <END> var newParameters = new ArrayList<ActionParameter>(); for (ActionParameter actionParameter : actionParameters) { newParameters.add(actionParameter); } scriptGeneratorTable.setActionParameters(newParameters); scriptGeneratorTable.clearActions(); }</code><technical_language>This in this class, private</technical_language>

Target:
private void setActionParameters(ArrayList<ActionParameter> actionParameters) { scriptGeneratorTable.setActionParameters(actionParameters); scriptGeneratorTable.clearActions(); }
Source:
<code><START> public void close() <END> { LOGGER.info("Closing PollingLookup [%s]", id); synchronized (isOpen) { isOpen.getAndSet(false); if (pollFuture != null) { pollFuture.cancel(true); scheduledExecutorService.shutdown(); } CacheRefKeeper cacheRefKeeper = refOfCacheKeeper.getAndSet(null); if (cacheRefKeeper != null) { cacheRefKeeper.doneWithIt(); } } }</code><technical_language>of this stuff in constructor feels in factory instead of here. Is a reason in factory, lifecycle assumptions built it</technical_language>

Target:
public void close() { LOGGER.info("Closing polling lookup [%s]", id); synchronized (isOpen) { isOpen.getAndSet(false); if (pollFuture != null) { pollFuture.cancel(true); scheduledExecutorService.shutdown(); } CacheRefKeeper cacheRefKeeper = refOfCacheKeeper.getAndSet(null); if (cacheRefKeeper != null) { cacheRefKeeper.doneWithIt(); } } }
Source:
<code>private void setupLookAndFeel() { String lookAndFeelClassnameFromCommandline = System.getProperty("swing.defaultlaf"); String lookAndFeelClassnameFromOptions = null; <START> OptionsParam options = Model.getSingleton().getOptionsParam();; <END> String lookAndFeelOptions = options.getViewParam().getLookAndFeel(); if(lookAndFeelClassnameFromCommandline == null) { if(lookAndFeelOptions.contains("Native")) { lookAndFeelClassnameFromOptions = UIManager.getSystemLookAndFeelClassName(); } else if(lookAndFeelOptions.contains("Cross")) { lookAndFeelClassnameFromOptions = UIManager.getCrossPlatformLookAndFeelClassName(); } else if(lookAndFeelOptions.contains("Default")) { lookAndFeelClassnameFromOptions = System.getProperty("swing.defaultlaf"); } } if ( lookAndFeelClassnameFromCommandline!= null) { try{ UIManager.setLookAndFeel(lookAndFeelClassnameFromCommandline); return; } catch (final UnsupportedLookAndFeelException | ClassNotFoundException | ClassCastException | InstantiationException | IllegalAccessException e) { logger.warn("Failed to set the specified look and feel:" + e.getMessage()); } } if (lookAndFeelClassnameFromOptions != null) { try { UIManager.setLookAndFeel(lookAndFeelClassnameFromOptions); return; } catch (final UnsupportedLookAndFeelException | ClassNotFoundException | ClassCastException | InstantiationException | IllegalAccessException e) { logger.warn("Failed to set the specified look and feel: " + e.getMessage()); } } try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); if (Constant.isMacOsX()) { OsXGui.setup(); } else { for (final LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { UIManager.setLookAndFeel(info.getClassName()); break; } } } } catch (final UnsupportedLookAndFeelException | ClassNotFoundException | InstantiationException | IllegalAccessException e) { logger.warn("Failed to set the \"default\" look and feel: " + e.getMessage()); } }</code><technical_language>of semi-colons removed</technical_language>

Target:
private void setupLookAndFeel() { if (lookAndFeelSet) { return; } lookAndFeelSet = true; if (setLookAndFeel(System.getProperty("swing.defaultlaf"))) { return; } OptionsParam options = Model.getSingleton().getOptionsParam(); if (setLookAndFeel(getLookAndFeelClassname(options.getViewParam().getLookAndFeel()))) { return; } if (Constant.isMacOsX()) { OsXGui.setup(); } else if (setLookAndFeel(getLookAndFeelClassname("Nimbus"))) { return; } setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); }
Source:
<code>public ArchiveList listArchives(String sessionId) throws OpenTokException { if (sessionId == null || sessionId.isEmpty() ) { <START> throw new InvalidArgumentException("Session string null or empty"); <END> } return listArchives(sessionId, 0, 1000); }</code><technical_language>This message Session Id is null empty</technical_language>

Target:
public ArchiveList listArchives(String sessionId) throws OpenTokException { if (sessionId == null || sessionId.isEmpty() ) { throw new InvalidArgumentException("Session Id cannot be null or empty"); } return listArchives(sessionId, 0, 1000); }
Source:
<code><START> public static Object createNullValue() { <END> return SPLNullValue.asJSON(); }</code><technical_language>createNull</technical_language>

Target:
public static Object createNullValue() { JsonObject jo = new JsonObject(); jo.addProperty("type", JParamTypes.TYPE_SPL_EXPRESSION); jo.addProperty("value", "null"); return jo; }
Source:
<code>public void run() { while (true) { logger.info("Job janitor daemon waking up"); if (stop) { logger.info("Job janitor stopping as per request"); return; } try { int numRowsUpdated = markZombies(); logger.info("Total jobs marked as zombies: " + numRowsUpdated); } catch (Exception e) { logger.error(e.getMessage()); } long minSleepTime = conf.getLong( <START> "netflix.genie.server.janitor.min.sleep.ms", 300000); <END> long maxSleepTime = conf.getLong( "netflix.genie.server.janitor.max.sleep.ms", 600000); Random randomGenerator = new Random(); long randomSleepTime = randomGenerator.nextInt((int) (maxSleepTime - minSleepTime)) + minSleepTime; logger.info("Job janitor daemon going to sleep for " + randomSleepTime / 1000 + " seconds."); try { Thread.sleep(randomSleepTime); } catch (InterruptedException e) { logger.warn(e.getMessage()); continue; } } }</code><technical_language>numbers constants</technical_language>

Target:
public void run() { while (true) { logger.info("Job janitor daemon waking up"); if (stop) { logger.info("Job janitor stopping as per request"); return; } try { int numRowsUpdated = markZombies(); logger.info("Total jobs marked as zombies: " + numRowsUpdated); } catch (Exception e) { logger.error(e.getMessage()); } final long minSleepTime = conf.getLong( "netflix.genie.server.janitor.min.sleep.ms", 300000); final long maxSleepTime = conf.getLong( "netflix.genie.server.janitor.max.sleep.ms", 600000); Random randomGenerator = new Random(); long randomSleepTime = randomGenerator.nextInt((int) (maxSleepTime - minSleepTime)) + minSleepTime; logger.info("Job janitor daemon going to sleep for " + randomSleepTime / 1000 + " seconds."); try { Thread.sleep(randomSleepTime); } catch (InterruptedException e) { logger.warn(e.getMessage()); continue; } } }
Source:
<code>public void should_pass_if_difference_is_less_than_given_percentage() { bigDecimals.assertIsCloseToPercentage(someInfo(), ONE, ONE, withPercentage(valueOf(1))); <START> bigDecimals.assertIsCloseToPercentage(someInfo(), ONE, TWO, withPercentage(valueOf(50))); <END> }</code><technical_language>If wrong, difference = 1 allowed margin is 2*50%=1, difference == allowed margin < margin. need move this should_pass_if_difference_is_equal_to_given_percentage</technical_language>

Target:
public void should_pass_if_difference_is_less_than_given_percentage() { bigDecimals.assertIsCloseToPercentage(someInfo(), ONE, ONE, withPercentage(valueOf(1))); bigDecimals.assertIsCloseToPercentage(someInfo(), ONE, TWO, withPercentage(valueOf(100))); }
Source:
<code>public void display(OutputStream out) { final PrintWriter stdout; try { stdout = new PrintWriter(new BufferedWriter(new OutputStreamWriter(out, "UTF-8"))); } catch (UnsupportedEncodingException e) { throw new RuntimeException("JVM lacks UTF-8 encoding", e); } Map<String, PluginInfo> output = Maps.newTreeMap(); List<Plugin> plugins = Lists.newArrayList(pluginLoader.getPlugins(all)); Collections.sort(plugins, new Comparator<Plugin>() { @Override public int compare(Plugin a, Plugin b) { return a.getName().compareTo(b.getName()); } }); if (!format.isJson()) { stdout.format("%-30s %-10s\n", "Name", "Version"); stdout .print("----------------------------------------------------------------------\n"); } for (Plugin p : plugins) { PluginInfo info = new PluginInfo(); info.version = p.getVersion(); info.isDisabled = p.isDisabled(); if (format.isJson()) { output.put(p.getName(), info); } else { stdout.format("%-30s %-10s\n", p.getName() <START> + (info.isDisabled ? " (DISABLED)" : ""), <END> Strings.nullToEmpty(info.version)); } } if (format.isJson()) { format.newGson().toJson(output, new TypeToken<Map<String, PluginInfo>>() {}.getType(), stdout); stdout.print('\n'); } stdout.flush(); }</code><technical_language>I put this column. 41 characters defined a line, 80 character wide terminal</technical_language>

Target:
public void display(OutputStream out) { final PrintWriter stdout; try { stdout = new PrintWriter(new BufferedWriter(new OutputStreamWriter(out, "UTF-8"))); } catch (UnsupportedEncodingException e) { throw new RuntimeException("JVM lacks UTF-8 encoding", e); } Map<String, PluginInfo> output = Maps.newTreeMap(); List<Plugin> plugins = Lists.newArrayList(pluginLoader.getPlugins(all)); Collections.sort(plugins, new Comparator<Plugin>() { @Override public int compare(Plugin a, Plugin b) { return a.getName().compareTo(b.getName()); } }); if (!format.isJson()) { stdout.format("%-30s %-10s %-8s\n", "Name", "Version", "Status"); stdout .print("-------------------------------------------------------------------------------\n"); } for (Plugin p : plugins) { PluginInfo info = new PluginInfo(); info.version = p.getVersion(); info.disabled = p.isDisabled(); if (format.isJson()) { output.put(p.getName(), info); } else { stdout.format("%-30s %-10s %-8s\n", p.getName(), Strings.nullToEmpty(info.version), info.disabled ? "DISABLED" : ""); } } if (format.isJson()) { format.newGson().toJson(output, new TypeToken<Map<String, PluginInfo>>() {}.getType(), stdout); stdout.print('\n'); } stdout.flush(); }
Source:
<code>public void testCacheIdleVerifyDumpForCorruptedDataOnNonePersistenceClientCache() throws Exception { int parts = 32; dataRegionConfiguration = new DataRegionConfiguration() .setName("none-persistence-region"); IgniteEx ignite = (IgniteEx)startGrids(3); ignite.cluster().active(true); IgniteCache<Object, Object> cache = ignite.createCache(new CacheConfiguration<>() .setAffinity(new RendezvousAffinityFunction(false, parts)) .setBackups(2) .setName(DEFAULT_CACHE_NAME) .setDataRegionName("none-persistence-region")); for (int i = 0; i < 100; i++) cache.put(i, i); injectTestSystemOut(); GridCacheContext<Object, Object> cacheCtx = ignite.cachex(DEFAULT_CACHE_NAME).context(); corruptDataEntry(cacheCtx, 0, true, false); corruptDataEntry(cacheCtx, parts / 2, false, true); <START> assertEquals(EXIT_CODE_OK, execute("--cache", "idle_verify", "--dump", "--cacheKind", "NOT_PERSISTENT")); <END> Matcher fileNameMatcher = dumpFileNameMatcher(); if (fileNameMatcher.find()) { String dumpWithConflicts = new String(Files.readAllBytes(Paths.get(fileNameMatcher.group(1)))); assertTrue(dumpWithConflicts.contains("found 1 conflict partitions: [counterConflicts=0, " + "hashConflicts=1]")); } else fail("Should be found dump with conflicts"); }</code><technical_language>enum instead of String</technical_language>

Target:
public void testCacheIdleVerifyDumpForCorruptedDataOnNonePersistenceClientCache() throws Exception { int parts = 32; dataRegionConfiguration = new DataRegionConfiguration() .setName("none-persistence-region"); IgniteEx ignite = (IgniteEx)startGrids(3); ignite.cluster().active(true); IgniteCache<Object, Object> cache = ignite.createCache(new CacheConfiguration<>() .setAffinity(new RendezvousAffinityFunction(false, parts)) .setBackups(2) .setName(DEFAULT_CACHE_NAME) .setDataRegionName("none-persistence-region")); for (int i = 0; i < 100; i++) cache.put(i, i); injectTestSystemOut(); GridCacheContext<Object, Object> cacheCtx = ignite.cachex(DEFAULT_CACHE_NAME).context(); corruptDataEntry(cacheCtx, 0, true, false); corruptDataEntry(cacheCtx, parts / 2, false, true); assertEquals(EXIT_CODE_OK, execute("--cache", "idle_verify", "--dump", "--cacheFilter", CacheFilterEnum .NOT_PERSISTENT.toString())); Matcher fileNameMatcher = dumpFileNameMatcher(); if (fileNameMatcher.find()) { String dumpWithConflicts = new String(Files.readAllBytes(Paths.get(fileNameMatcher.group(1)))); assertTrue(dumpWithConflicts.contains("found 1 conflict partitions: [counterConflicts=0, " + "hashConflicts=1]")); } else fail("Should be found dump with conflicts"); }
Source:
<code>public void canTakeBlockageIsDisplayed() throws Exception { FreeStyleProject project = r.createFreeStyleProject(); r.jenkins.getQueue().schedule(project); Queue.Item item = null; long timeout = TimeUnit.MINUTES.toMillis(1); long started = System.currentTimeMillis(); while (System.currentTimeMillis() - started < timeout) { item = r.jenkins.getQueue().getItem(project); <START> if (item.isBuildable() && item.getCauseOfBlockage().getShortDescription().contains("blocked by canTake")) { <END> break; } Thread.sleep(100); } assertNotNull(item); CauseOfBlockage cob = item.getCauseOfBlockage(); assertNotNull(cob); assertThat(cob.getShortDescription(), containsString("blocked by canTake")); StringWriter w = new StringWriter(); TaskListener l = new StreamTaskListener(w); cob.print(l); l.getLogger().flush(); assertThat(w.toString(), containsString("blocked by canTake")); }</code><technical_language>Ideally a null check of getCauseOfBlockage()</technical_language>

Target:
public void canTakeBlockageIsDisplayed() throws Exception { FreeStyleProject project = r.createFreeStyleProject(); r.jenkins.getQueue().schedule(project, 0); r.getInstance().getQueue().maintain(); Queue.Item item = r.jenkins.getQueue().getItem(project); assertNotNull(item); CauseOfBlockage cob = item.getCauseOfBlockage(); assertNotNull(cob); assertThat(cob.getShortDescription(), containsString("blocked by canTake")); StringWriter w = new StringWriter(); TaskListener l = new StreamTaskListener(w); cob.print(l); l.getLogger().flush(); assertThat(w.toString(), containsString("blocked by canTake")); }
Source:
<code>protected synchronized MantaObjectInputStream connectOrGetResponse() throws IOException { if (responseStream.get() != null) { return responseStream.get(); } final HttpUriRequest request = connectionFactory.get(path); final MantaHttpHeaders headers = new MantaHttpHeaders(); <START> headers.setRange(String.format("bytes=%d-", position)); <END> this.requestRef.set(request); MantaObjectInputStream stream = httpHelper.httpRequestAsInputStream( request, headers); responseStream.compareAndSet(null, stream); final String contentType = stream.getContentType(); if (MantaObjectResponse.DIRECTORY_RESPONSE_CONTENT_TYPE.equals(contentType)) { MantaClientException e = new MantaClientException( "Can't get SeekableByteChannel for directory objects"); @SuppressWarnings("unchecked") HttpResponse response = (HttpResponse)stream.getHttpResponse(); HttpHelper.annotateContextedException(e, request, response); throw e; } return stream; }</code><technical_language>I this new, is this method reading current position end of file (and "the next megabyte current position" that)</technical_language>

Target:
protected synchronized MantaObjectInputStream connectOrGetResponse() throws IOException { if (responseStream.get() != null) { return responseStream.get(); } final HttpUriRequest request = connectionFactory.get(path); final MantaHttpHeaders headers = new MantaHttpHeaders(); headers.setRange(String.format("bytes=%d-", position.get())); this.requestRef.set(request); MantaObjectInputStream stream = httpHelper.httpRequestAsInputStream( request, headers); responseStream.compareAndSet(null, stream); final String contentType = stream.getContentType(); if (MantaObjectResponse.DIRECTORY_RESPONSE_CONTENT_TYPE.equals(contentType)) { MantaClientException e = new MantaClientException( "Can't get SeekableByteChannel for directory objects"); @SuppressWarnings("unchecked") HttpResponse response = (HttpResponse)stream.getHttpResponse(); HttpHelper.annotateContextedException(e, request, response); throw e; } return stream; }
Source:
<code>public static XBeeProtocol get(int id) { <START> return lookupTable.get(id); <END> }</code><technical_language>Here, return XBeeProtocol.UNKNOWN if protocol id is in table</technical_language>

Target:
public static XBeeProtocol get(int id) { if (!lookupTable.containsKey(id)) return UNKNOWN; return lookupTable.get(id); }
Source:
<code>public CacheConfigurationBuilder<K, V> add(ServiceConfiguration<?> configuration) { <START> CacheConfigurationBuilder<K, V> otherBuilder = new CacheConfigurationBuilder<K, V>(expiry, classLoader, evictionPrioritizer, evictionVeto, resourcePools, serviceConfigurations); <END> otherBuilder.serviceConfigurations.add(configuration); return otherBuilder; }</code><technical_language>I personally prefer add a 'copy constructor' takes a CacheConfigurationBuilder parameter. a huge problem I find approach a bit simpler</technical_language>

Target:
public CacheConfigurationBuilder<K, V> add(ServiceConfiguration<?> configuration) { CacheConfigurationBuilder<K, V> otherBuilder = new CacheConfigurationBuilder<K, V>(this); otherBuilder.serviceConfigurations.add(configuration); return otherBuilder; }
Source:
<code>protected void onHandleIntent(Intent intent) { mContext = getApplicationContext(); prefs = PreferenceManager.getDefaultSharedPreferences(mContext); bg_missed_alerts = prefs.getBoolean("bg_missed_alerts", false); bg_missed_minutes = Integer.parseInt(prefs.getString("bg_missed_minutes", "30")); otherAlertSnooze = Integer.parseInt(prefs.getString("other_alerts_snooze", "20")); if (bg_missed_alerts && BgReading.getTimeSinceLastReading() > (bg_missed_minutes * 1000 * 60) && prefs.getLong("alerts_disabled_until", 0) < new Date().getTime()) { Notifications.bgMissedAlert(mContext); checkBackAfterSnoozeTime(); } else { <START> long alarmIn = (prefs.getLong("alerts_disabled_until", 0) - new Date().getTime()) * 1000 * 60; <END> if (alarmIn <= 0) { alarmIn = Long.parseLong(prefs.getString("bg_missed_minutes", "30")); } checkBackAfterMissedTime(alarmIn); } }</code><technical_language>I tested work. I * 1000 * 600 is needed bring alarmIn future</technical_language>

Target:
protected void onHandleIntent(Intent intent) { mContext = getApplicationContext(); prefs = PreferenceManager.getDefaultSharedPreferences(mContext); bg_missed_alerts = prefs.getBoolean("bg_missed_alerts", false); bg_missed_minutes = Integer.parseInt(prefs.getString("bg_missed_minutes", "30")); otherAlertSnooze = Integer.parseInt(prefs.getString("other_alerts_snooze", "20")); if (bg_missed_alerts && BgReading.getTimeSinceLastReading() > (bg_missed_minutes * 1000 * 60) && prefs.getLong("alerts_disabled_until", 0) < new Date().getTime()) { Notifications.bgMissedAlert(mContext); checkBackAfterSnoozeTime(); } else { long alarmIn = prefs.getLong("alerts_disabled_until", 0) - new Date().getTime(); if (alarmIn <= 0) { alarmIn = Long.parseLong(prefs.getString("bg_missed_minutes", "30"))* 1000 * 60; } checkBackAfterMissedTime(alarmIn); } }
Source:
<code>private synchronized CompletableFuture<Boolean> ensureUptodate(NetworkAccess network) { return network.retrieveEntryPoint(sharedDir) .thenCompose(sharedDirOpt -> { if (!sharedDirOpt.isPresent()) return CompletableFuture.completedFuture(true); return CapabilityStore.getReadOnlyCapabilityFileSize(sharedDirOpt.get(), network) <START> .thenCompose(count -> { <END> if (count == capCountReadOnly) { return addEditableCapabilities(sharedDirOpt, network); } else { return CapabilityStore.loadReadAccessSharingLinksFromIndex(homeDirSupplier, sharedDirOpt.get(), ownerName, network, random, hasher, capCountReadOnly, true) .thenCompose(newReadCaps -> { capCountReadOnly += newReadCaps.getBytesRead(); root = newReadCaps.getRetrievedCapabilities().stream() .reduce(root, (root, cap) -> root.put(trimOwner(cap.path), new EntryPoint(cap.cap, ownerName)), (a, b) -> a); return addEditableCapabilities(sharedDirOpt, network); }); } }); }); }</code><technical_language>rename count -> offset</technical_language>

Target:
private synchronized CompletableFuture<Boolean> ensureUptodate(NetworkAccess network) { return network.retrieveEntryPoint(sharedDir) .thenCompose(sharedDirOpt -> { if (!sharedDirOpt.isPresent()) return CompletableFuture.completedFuture(true); return CapabilityStore.getReadOnlyCapabilityFileSize(sharedDirOpt.get(), network) .thenCompose(bytes -> { if (bytes == byteOffsetReadOnly) { return addEditableCapabilities(sharedDirOpt, network); } else { return CapabilityStore.loadReadAccessSharingLinksFromIndex(homeDirSupplier, sharedDirOpt.get(), ownerName, network, random, hasher, byteOffsetReadOnly, true) .thenCompose(newReadCaps -> { byteOffsetReadOnly += newReadCaps.getBytesRead(); root = newReadCaps.getRetrievedCapabilities().stream() .reduce(root, (root, cap) -> root.put(trimOwner(cap.path), new EntryPoint(cap.cap, ownerName)), (a, b) -> a); return addEditableCapabilities(sharedDirOpt, network); }); } }); }); }
Source:
<code>public void testUnitPath() throws Exception { List<PID> pids = makePidList(1); when(pathFactory.getAncestorPids(pid)).thenReturn(pids); filter.filter(dip); <START> verify(idb, never()).setParentUnit(anyString()); <END> verify(idb, never()).setParentCollection(anyString()); }</code><technical_language>Please verify ancestorPath is set</technical_language>

Target:
public void testUnitPath() throws Exception { List<PID> pids = makePidList(1); when(pathFactory.getAncestorPids(pid)).thenReturn(pids); filter.filter(dip); verify(idb).setAncestorPath(listCaptor.capture()); List<String> ancestorPath = listCaptor.getValue(); ancestorPathCheck(ancestorPath, pids); assertEquals(1, ancestorPath.size()); verify(idb, never()).setParentUnit(anyString()); verify(idb, never()).setParentCollection(anyString()); }
Source:
<code>public void prepareRun(StageSubmitterContext context) throws Exception { super.prepareRun(context); init(); if (fields != null) { <START> FieldOperation operation = new FieldTransformOperation("CSV Parse", "Parsing the field.", <END> Collections.singletonList(config.field), fields.stream().map(Schema.Field::getName) .collect(Collectors.toList())); context.record(Collections.singletonList(operation)); } }</code><technical_language>do guidelines thinking want name operations. For example, 'CSV Parse' instead of 'Parse', 'Read' instead of 'TPFS Read' 'TPFS Avro Read'</technical_language>

Target:
public void prepareRun(StageSubmitterContext context) throws Exception { super.prepareRun(context); init(); if (fields != null) { FieldOperation operation = new FieldTransformOperation("Parse", "Parsed field", Collections.singletonList(config.field), fields.stream().map(Schema.Field::getName) .collect(Collectors.toList())); context.record(Collections.singletonList(operation)); } }
Source:
<code>public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; State state = (State) o; <START> if (!nt.equals(state.nt)) return false; <END> if (!stateId.equals(state.stateId)) return false; return true; }</code><technical_language>I need this state ids supposed unique</technical_language>

Target:
public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; State state = (State) o; if (unique != state.unique) return false; return true; }
Source:
<code>public static H2Config.Builder initial() { return new Builder() .setHeaderTableSize(INIT_HEADER_TABLE_SIZE) .setPushEnabled(INIT_ENABLE_PUSH) .setMaxConcurrentStreams(Integer.MAX_VALUE) .setMaxFrameSize(INIT_MAX_FRAME_SIZE) <START> .setInitialWindowSize(INIT_WINDOW_SIZE); <END> }</code><technical_language>@rschmitt .setHeaderTableSize(Integer.MAX_VALUE); // unlimited .setMaxHeaderListSize(Integer.MAX_VALUE); // unlimited Mea culpa</technical_language>

Target:
public static H2Config.Builder initial() { return new Builder() .setHeaderTableSize(INIT_HEADER_TABLE_SIZE) .setPushEnabled(INIT_ENABLE_PUSH) .setMaxConcurrentStreams(Integer.MAX_VALUE) .setMaxFrameSize(INIT_MAX_FRAME_SIZE) .setInitialWindowSize(INIT_WINDOW_SIZE) .setMaxHeaderListSize(Integer.MAX_VALUE); }