auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void testGetAllStoreSomeMatchLoaderNoMatchSomeFailWithBulkCacheLoadingException() throws Exception { final FakeStore fakeStore = new FakeStore(getEntryMap(KEY_SET_A, KEY_SET_B)); this.store = spy(fakeStore); <START> final FakeCacheLoaderWriter fakeLoader = new FakeCacheLoaderWriter(getEntryMap(KEY_SET_F), KEY_SET_C, true); <END> this.loaderWriter = spy(fakeLoader); final Ehcache<String, String> ehcache = this.getEhcache(this.loaderWriter); final Set<String> fetchKeys = fanIn(KEY_SET_A, KEY_SET_C, KEY_SET_D); try { ehcache.getAll(fetchKeys); fail(); } catch (BulkCacheLoadingException e) { assertThat(e.getSuccesses(), Matchers.<Map<?,?>>equalTo(union(getEntryMap(KEY_SET_A), getNullEntryMap(KEY_SET_C)))); assertThat(e.getFailures().keySet(), Matchers.<Set<?>>equalTo(KEY_SET_D)); } verify(this.store).bulkComputeIfAbsent(eq(fetchKeys), getAnyIterableFunction()); verify(this.loaderWriter, atLeast(1)).loadAll(this.loadAllCaptor.capture()); assertThat(this.getLoadAllArgs(), equalTo(copyWithout(fetchKeys, KEY_SET_A))); verifyZeroInteractions(this.spiedResilienceStrategy); validateStats(ehcache, EnumSet.noneOf(CacheOperationOutcomes.GetOutcome.class)); validateStats(ehcache, EnumSet.noneOf(CacheOperationOutcomes.CacheLoadingOutcome.class)); }</code><technical_language>Do start in inconsistent state: loader needs a super set of store knows. If test a duplicate, delete it</technical_language>

Target:
public void testGetAllStoreSomeMatchLoaderNoMatchSomeFailWithBulkCacheLoadingException() throws Exception { final FakeStore fakeStore = new FakeStore(getEntryMap(KEY_SET_A, KEY_SET_B)); this.store = spy(fakeStore); final FakeCacheLoaderWriter fakeLoader = new FakeCacheLoaderWriter(TEST_ENTRIES, KEY_SET_D, true); this.loaderWriter = spy(fakeLoader); final Ehcache<String, String> ehcache = this.getEhcache(this.loaderWriter); final Set<String> fetchKeys = fanIn(KEY_SET_A, KEY_SET_C, KEY_SET_D); try { ehcache.getAll(fetchKeys); fail(); } catch (BulkCacheLoadingException e) { assertThat(e.getSuccesses(), Matchers.<Map<?,?>>equalTo(union(getEntryMap(KEY_SET_A), getNullEntryMap(KEY_SET_C)))); assertThat(e.getFailures().keySet(), Matchers.<Set<?>>equalTo(KEY_SET_D)); } verify(this.store).bulkComputeIfAbsent(eq(fetchKeys), getAnyIterableFunction()); verify(this.loaderWriter, atLeast(1)).loadAll(this.loadAllCaptor.capture()); assertThat(this.getLoadAllArgs(), equalTo(copyWithout(fetchKeys, KEY_SET_A))); verifyZeroInteractions(this.spiedResilienceStrategy); validateStats(ehcache, EnumSet.noneOf(CacheOperationOutcomes.GetOutcome.class)); validateStats(ehcache, EnumSet.noneOf(CacheOperationOutcomes.CacheLoadingOutcome.class)); }
Source:
<code>public void execute(final OperationContext context, final ModelNode operation) throws OperationFailedException { final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR)); ModelNode model = context.readResourceFromRoot(address).getModel(); if(model.has(CONTENT)) { <START> contentRepository.removeContent(ModelContentReference.fromModelAddress(address, model.get(CONTENT).asBytes())); <END> } super.execute(context, operation); }</code><technical_language>Do this in a ResultHandler</technical_language>

Target:
public void execute(final OperationContext context, final ModelNode operation) throws OperationFailedException { final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR)); ModelNode model = context.readResourceFromRoot(address, false).getModel(); final byte[] hash; if (model.has(CONTENT)) { hash = model.get(CONTENT).asBytes(); } else { hash = null; } context.removeResource(PathAddress.EMPTY_ADDRESS); context.completeStep(new OperationContext.ResultHandler() { @Override public void handleResult(OperationContext.ResultAction resultAction, OperationContext context, ModelNode operation) { if (resultAction != OperationContext.ResultAction.ROLLBACK) { if (hash != null) { final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR)); contentRepository.removeContent(ModelContentReference.fromModelAddress(address, hash)); } } } }); }
Source:
<code>public String call(String serviceToCall, long serverStartTime) throws Exception { setState(); if (state == State.OPEN) { return "This is stale response from API"; } else { if (serviceToCall.equals("delayedService")) { <START> DelayedService delayedService = new DelayedService(20); String response = delayedService.response(serverStartTime); <END> if (response.split(" ")[3].equals("working")) { reset(); return response; } else { recordFailure(); throw new Exception("Remote service not responding"); } } else { throw new Exception("Unknown Service Name"); } } }</code><technical_language>local-variable type inference (var)</technical_language>

Target:
public String call(String serviceToCall, long serverStartTime) throws Exception { setState(); if (state == State.OPEN) { return "This is stale response from API"; } else { if (serviceToCall.equals("delayedService")) { var delayedService = new DelayedService(20); var response = delayedService.response(serverStartTime); if (response.split(" ")[3].equals("working")) { reset(); return response; } else { recordFailure(); throw new Exception("Remote service not responding"); } } else { throw new Exception("Unknown Service Name"); } } }
Source:
<code>public Set<Integer> getCpusOfProcessors() { <START> if(processors.isEmpty()) return ImmutableSet.of(); <END> return Sets.newHashSet(Iterables.transform(processors, new Function<ContainerVirtualGuestConfigurationOption, Integer>() { @Override public Integer apply(ContainerVirtualGuestConfigurationOption input) { return input.getTemplate().getStartCpus(); } })); }</code><technical_language>this returning immutable set if processors, a mutable if is some. behavior? remove this line, transform do if processors set is empty</technical_language>

Target:
public Set<Integer> getCpusOfProcessors() { return Sets.newHashSet(Iterables.transform(processors, new Function<ContainerVirtualGuestConfigurationOption, Integer>() { @Override public Integer apply(ContainerVirtualGuestConfigurationOption input) { return input.getTemplate().getStartCpus(); } })); }
Source:
<code>public void assertChangedResources(String[] expected) { IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); <START> for (String file: expected) { <END> assertTrue(changedResources.contains(root.findMember(file))); } assertTrue(changedResources.size()==expected.length); }</code><technical_language>style nit: braces single line blocks</technical_language>

Target:
public void assertChangedResources(String[] expected) { IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); for (String file : expected) assertTrue(changedResources.contains(root.findMember(file))); assertTrue(changedResources.size() == expected.length); }
Source:
<code>private TimeoutDuration processGetTimeout(Element parentElement, Node timeoutNode) { <START> TimeoutDuration getTimeout; <END> try { JAXBContext context = JAXBContext.newInstance(TimeType.class.getPackage().getName()); Unmarshaller unmarshaller = context.createUnmarshaller(); JAXBElement<TimeType> jaxbElement = unmarshaller.unmarshal(timeoutNode, TimeType.class); TimeType timeType = jaxbElement.getValue(); BigInteger amount = timeType.getValue(); if (amount.compareTo(BigInteger.valueOf(Long.MAX_VALUE)) > 0) { throw new XmlConfigurationException( String.format("Value of XML configuration element <%s> in <%s> exceeds allowed value - %s", timeoutNode.getNodeName(), parentElement.getTagName(), amount)); } getTimeout = TimeoutDuration.of(amount.longValue(), toJavaTimeUnit(timeType.getUnit())); } catch (JAXBException e) { throw new XmlConfigurationException(e); } return getTimeout; }</code><technical_language>need for this local variable</technical_language>

Target:
private TimeoutDuration processGetTimeout(Element parentElement, Node timeoutNode) { TimeoutDuration getTimeout; try { JAXBContext context = JAXBContext.newInstance(TimeType.class.getPackage().getName()); Unmarshaller unmarshaller = context.createUnmarshaller(); JAXBElement<TimeType> jaxbElement = unmarshaller.unmarshal(timeoutNode, TimeType.class); TimeType timeType = jaxbElement.getValue(); BigInteger amount = timeType.getValue(); if (amount.compareTo(BigInteger.valueOf(Long.MAX_VALUE)) > 0) { throw new XmlConfigurationException( String.format("Value of XML configuration element <%s> in <%s> exceeds allowed value - %s", timeoutNode.getNodeName(), parentElement.getTagName(), amount)); } getTimeout = TimeoutDuration.of(amount.longValue(), convertToJavaTimeUnit(timeType.getUnit())); } catch (JAXBException e) { throw new XmlConfigurationException(e); } return getTimeout; }
Source:
<code>public void transmit(String remote, String button) { <START> <END> int repeats = 0; String[] parts = button.split(" "); if (parts.length > 1) { button = parts[0]; repeats = Integer.parseInt(parts[1]); } transmit(remote, button, repeats); }</code><technical_language>blank line</technical_language>

Target:
public void transmit(String remote, String button) { int timesToSend = 1; String[] parts = button.split(" "); if (parts.length > 1) { button = parts[0]; timesToSend = Integer.parseInt(parts[1]); } transmit(remote, button, timesToSend); }
Source:
<code>private <R extends PersistableBusinessObject> void writeResultDetailToReport(RassBusinessObjectUpdateResult<R> result) { String reportMessage = StringUtils.EMPTY; switch (result.getResultCode()) { case SUCCESS_NEW: reportMessage = result.getBusinessObjectClass().getSimpleName() + " #: " + result.getPrimaryKey() + " created by document #: " + result.getDocumentId(); break; case SUCCESS_EDIT: reportMessage = result.getBusinessObjectClass().getSimpleName() + " #: " + result.getPrimaryKey() + " updated by document #: " + result.getDocumentId(); break; case ERROR: reportMessage = result.getBusinessObjectClass().getSimpleName() + " #: " + result.getPrimaryKey() + " resulted in error. \n Error(s): " + result.getErrorMessage(); break; case SKIPPED: reportMessage = result.getBusinessObjectClass().getSimpleName() + " #: " + result.getPrimaryKey() + " skipped."; break; <START> } <END> reportWriterService.writeFormattedMessageLine(reportMessage); }</code><technical_language>Another switch block helpful a "default" case. Also, of cases duplicating prefix. want generate common part of message of switch block concatenate accordingly</technical_language>

Target:
private <R extends PersistableBusinessObject> void writeResultDetailToReport(RassBusinessObjectUpdateResult<R> result) { String reportMessage; String messagePrefix = result.getBusinessObjectClass().getSimpleName() + " #: " + result.getPrimaryKey(); switch (result.getResultCode()) { case SUCCESS_NEW: reportMessage = messagePrefix + " created by document #: " + result.getDocumentId(); break; case SUCCESS_EDIT: reportMessage = messagePrefix + " updated by document #: " + result.getDocumentId(); break; case ERROR: reportMessage = messagePrefix + " resulted in error. \n Error(s): " + result.getErrorMessage(); break; case SKIPPED: reportMessage = messagePrefix + " skipped."; break; default: reportMessage = StringUtils.EMPTY; break; } reportWriterService.writeFormattedMessageLine(reportMessage); }
Source:
<code>private void waitUntilNodeIsCleaned() throws NodeException { long timeout = PAResourceManagerProperties.RM_SELECT_SCRIPT_TIMEOUT.getValueAsLong(); int sleepTime = 100; int waitNumber = Math.round(((float) timeout) / sleepTime); try { int numberOfActiveObjects = node.getNumberOfActiveObjects(); <START> int i = 0; <END> while (numberOfActiveObjects > 0 && i < waitNumber) { Thread.sleep(sleepTime); i++; numberOfActiveObjects = node.getNumberOfActiveObjects(); } if (i >= waitNumber) { logger.error("Node " + nodeName + "could not be cleaned after " + timeout + " ms."); } } catch (InterruptedException e) { logger.warn("Interrupted while cleaning node " + nodeName, e); } }</code><technical_language>u change i numberOfAttempts</technical_language>

Target:
private void waitUntilNodeIsCleaned() throws NodeException { long timeout = PAResourceManagerProperties.RM_SELECT_SCRIPT_TIMEOUT.getValueAsLong(); int sleepTime = 100; int maximumNumberOfWait = Math.round(((float) timeout) / sleepTime); try { int numberOfActiveObjects = node.getNumberOfActiveObjects(); int numberOfWait = 0; while (numberOfActiveObjects > 0 && numberOfWait < maximumNumberOfWait) { Thread.sleep(sleepTime); numberOfWait++; numberOfActiveObjects = node.getNumberOfActiveObjects(); } if (numberOfWait >= maximumNumberOfWait) { logger.error("Node " + nodeName + "could not be cleaned after " + timeout + " ms."); } } catch (InterruptedException e) { logger.warn("Interrupted while cleaning node " + nodeName, e); } }
Source:
<code>private <T extends Message> CompletableFuture<T> call(Callable<T> callable, <START> Predicate<T> isValidResp, String debug) { <END> CompletableFuture<T> future = new CompletableFuture<>(); ConcurrentLinkedQueue<Throwable> errors = new ConcurrentLinkedQueue<>(); groupCall(future, 0, callable, isValidResp, debug, errors); return future; }</code><technical_language>nit: technically retries right? Instead wrap errors in MasterRegistryFetch..</technical_language>

Target:
private <T extends Message> CompletableFuture<T> call(Callable<T> callable, Predicate<T> isValidResp, String debug) { List<ClientMetaService.Interface> masterStubs = new ArrayList<>(masterAddr2Stub.values()); Collections.shuffle(masterStubs, ThreadLocalRandom.current()); CompletableFuture<T> future = new CompletableFuture<>(); groupCall(future, masterStubs, 0, callable, isValidResp, debug, new ConcurrentLinkedQueue<>()); return future; }
Source:
<code>public void shouldBeAbleToReplaceLoggingHandler() { CollectingHandler collectingHandler = new CollectingHandler(); ExecuteJobHelper.LOGGING_HANDLER = collectingHandler; BpmnModelInstance modelInstance = Bpmn.createExecutableProcess("failingDelegate") .startEvent() .serviceTask() .camundaClass("org.camunda.bpm.engine.test.jobexecutor.FailingDelegate") .camundaAsyncBefore() .done(); testRule.deploy(modelInstance); engineRule.getRuntimeService().startProcessInstanceByKey("failingDelegate"); final String jobId = engineRule.getManagementService().createJobQuery().singleResult().getId(); processEngineConfiguration.getJobExecutor().start(); testRule.waitForJobExecutorToProcessAllJobs(); processEngineConfiguration.getJobExecutor().shutdown(); Throwable collectedException = collectingHandler.collectedExceptions.get(jobId); assertTrue(collectedException instanceof RuntimeException); assertThat(collectedException.getMessage(), is("Expected Exception")); <START> ExecuteJobHelper.LOGGING_HANDLER = originalHandler; <END> }</code><technical_language>a separate @After method for this test fail originalHandler is set. like: java @After public void tearDown() { ExecuteJobHelper.LOGGING_HANDLER = originalHandler; }</technical_language>

Target:
public void shouldBeAbleToReplaceLoggingHandler() { CollectingHandler collectingHandler = new CollectingHandler(); ExecuteJobHelper.LOGGING_HANDLER = collectingHandler; BpmnModelInstance modelInstance = Bpmn.createExecutableProcess("failingDelegate") .startEvent() .serviceTask() .camundaClass("org.camunda.bpm.engine.test.jobexecutor.FailingDelegate") .camundaAsyncBefore() .done(); testRule.deploy(modelInstance); engineRule.getRuntimeService().startProcessInstanceByKey("failingDelegate"); final String jobId = engineRule.getManagementService().createJobQuery().singleResult().getId(); processEngineConfiguration.getJobExecutor().start(); testRule.waitForJobExecutorToProcessAllJobs(); processEngineConfiguration.getJobExecutor().shutdown(); Throwable collectedException = collectingHandler.collectedExceptions.get(jobId); assertTrue(collectedException instanceof RuntimeException); assertThat(collectedException.getMessage(), is("Expected Exception")); }
Source:
<code>public void checkLanguageServerInitialized() { ide.waitOpenedWorkspaceIsReadyToUse(); menu.runCommand(WORKSPACE, CREATE_PROJECT); wizard.selectProjectAndCreate(CONSOLE_PYTHON3_SIMPLE, PROJECT_NAME); projectExplorer.waitItem(PROJECT_NAME); projectExplorer.openItemByPath(PROJECT_NAME); <START> projectExplorer.openItemByPath(PROJECT_NAME + "/main.py"); <END> editor.waitTabIsPresent(PYTHON_FILE_NAME); consoles.selectProcessByTabName("dev-machine"); consoles.waitExpectedTextIntoConsole(LS_INIT_MESSAGE); }</code><technical_language>Please, replace main.py PYTHON_FILE_NAME here</technical_language>

Target:
public void checkLanguageServerInitialized() { ide.waitOpenedWorkspaceIsReadyToUse(); menu.runCommand(WORKSPACE, CREATE_PROJECT); wizard.selectProjectAndCreate(CONSOLE_PYTHON3_SIMPLE, PROJECT_NAME); projectExplorer.waitAndSelectItem(PROJECT_NAME); projectExplorer.openItemByPath(PROJECT_NAME); projectExplorer.openItemByPath(PATH_TO_PYTHON_FILE); editor.waitTabIsPresent(PYTHON_FILE_NAME); consoles.selectProcessByTabName("dev-machine"); consoles.waitExpectedTextIntoConsole(LS_INIT_MESSAGE); }
Source:
<code>public void onPlayerDeathEvent(final PlayerDeathEvent event) { Entity entity = event.getEntity(); if (entity.hasMetadata("NPC")) { return; } final User user = ess.getUser(event.getEntity()); if (user.isAuthorized("essentials.back.ondeath") && !ess.getSettings().isCommandDisabled("back")) { user.setLastLocation(); user.sendMessage(tl("backAfterDeath")); } if (!ess.getSettings().areDeathMessagesEnabled()) { event.setDeathMessage(""); } if (ess.getSettings().infoAfterDeath()) { final Location loc = user.getLocation(); <START> user.sendMessage(tl("infoAfterDeath", loc.getWorld().getName(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ())); <END> } }</code><technical_language>This is a tiny nitpick IMO send this message *before* /back message, it</technical_language>

Target:
public void onPlayerDeathEvent(final PlayerDeathEvent event) { Entity entity = event.getEntity(); if (entity.hasMetadata("NPC")) { return; } final User user = ess.getUser(event.getEntity()); if (ess.getSettings().infoAfterDeath()) { final Location loc = user.getLocation(); user.sendMessage(tl("infoAfterDeath", loc.getWorld().getName(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ())); } if (user.isAuthorized("essentials.back.ondeath") && !ess.getSettings().isCommandDisabled("back")) { user.setLastLocation(); user.sendMessage(tl("backAfterDeath")); } if (!ess.getSettings().areDeathMessagesEnabled()) { event.setDeathMessage(""); } }
Source:
<code>public void create_instance() { final StringValue failure = newStringValue(newUuid()); final FailureThrowable failureThrowable = new TestFailure(failure); assertEquals(failure, failureThrowable.getFailure()); <START> Timestamps.isValid(failureThrowable.getTimestamp()); <END> }</code><technical_language>This method returns a value, throws exception</technical_language>

Target:
public void create_instance() { final StringValue failure = newStringValue(newUuid()); final FailureThrowable failureThrowable = new TestFailure(failure); assertEquals(failure, failureThrowable.getFailure()); assertTrue(Timestamps.isValid(failureThrowable.getTimestamp())); }
Source:
<code>public <START> CustomTabsSession newSession(@Nullable <END> final CustomTabsCallback callback) { return newSessionInternal(callback, null); }</code><technical_language>@Nullable</technical_language>

Target:
public @Nullable CustomTabsSession newSession(@Nullable final CustomTabsCallback callback) { return newSessionInternal(callback, null); }
Source:
<code>private StoreKey getKeyAt(ByteBuffer mmap, int index) throws IOException { <START> mmap.position(VERSION_FIELD_LENGTH + KEY_SIZE_FIELD_LENGTH + VALUE_SIZE_FIELD_LENGTH + LOG_END_OFFSET_FIELD_LENGTH + <END> ((version == (short) 1) ? (LAST_MODIFIED_TIME_FIELD_LENGTH + resetKey.getFirst().sizeInBytes() + RESET_KEY_TYPE_FIELD_LENGTH) : 0) + (index * (keySize + valueSize))); return factory.getStoreKey(new DataInputStream(new ByteBufferInputStream(mmap))); }</code><technical_language>this a class variable also</technical_language>

Target:
private StoreKey getKeyAt(ByteBuffer mmap, int index) throws IOException { mmap.position(firstKeyRelativeOffset + (index * (keySize + valueSize))); return factory.getStoreKey(new DataInputStream(new ByteBufferInputStream(mmap))); }
Source:
<code>public void dispose() { logger.debug("Handler disposed."); if (devStatMan != null) { devStatMan.unregisterTotalPowerConsumptionListener(); devStatMan.unregisterStatusListener(); this.devStatMan.stop(); } if (connMan != null) { connMan.unregisterConnectionListener(); } if (this.getThing().getStatus().equals(ThingStatus.ONLINE)) { <START> updateStatus(ThingStatus.OFFLINE); <END> } }</code><technical_language>do status updates in dispose method</technical_language>

Target:
public void dispose() { logger.debug("Handler disposed"); if (devStatMan != null) { devStatMan.unregisterTotalPowerConsumptionListener(); devStatMan.unregisterStatusListener(); this.devStatMan.stop(); } if (connMan != null) { connMan.unregisterConnectionListener(); } }
Source:
<code>public boolean canSwitchToBroker() { return verifyBroker() <START> && verifyAuthenticator(mAcctManager) <END> && !mContext.getPackageName().equalsIgnoreCase( AuthenticationSettings.INSTANCE.getBrokerPackageName()); }</code><technical_language>change order</technical_language>

Target:
public boolean canSwitchToBroker() { return !mContext.getPackageName().equalsIgnoreCase( AuthenticationSettings.INSTANCE.getBrokerPackageName()) && verifyBroker() && verifyAuthenticator(mAcctManager); }
Source:
<code>public Group takeGroup(PerunSessionImpl sess) throws InterruptedException, InternalErrorException { while(true) { notEmptyGroupsPoolSemaphore.acquire(); try { poolAccessLock.lock(); boolean removedGroup = false; for (Group group : poolOfGroupsToBeSynchronized.getWaitingJobs()) { boolean allowed = true; List<Group> groupStructureJobs = poolOfGroupsStructuresToBeSynchronized.getWaitingJobs(); groupStructureJobs.addAll(poolOfGroupsStructuresToBeSynchronized.getRunningJobs()); for (Group groupStructure : groupStructureJobs) { List<Group> allSubGroups = sess.getPerunBl().getGroupsManagerBl().getAllSubGroups(sess, groupStructure); if (allSubGroups.contains(group)) { allowed = false; } } <START> if (allowed) { <END> poolOfGroupsToBeSynchronized.putJobIfAbsent(group, true); try { sess.getPerunBl().getGroupsManagerBl().checkGroupExists(sess, group); } catch (GroupNotExistsException e) { log.warn("Group was removed from a Vo while it was waiting for a synchronization.", group); poolOfGroupsToBeSynchronized.removeJob(poolOfGroupsToBeSynchronized.takeJob()); removedGroup = true; break; } return poolOfGroupsToBeSynchronized.takeJob(); } } if (!removedGroup) notEmptyGroupsPoolSemaphore.release(); } finally { poolAccessLock.unlock(); } Thread.sleep(10000); } }</code><technical_language>break for cycle immediately</technical_language>

Target:
public Group takeGroup(PerunSessionImpl sess) throws InterruptedException, InternalErrorException { while(true) { notEmptyGroupsPoolSemaphore.acquire(); try { poolAccessLock.lock(); boolean removedGroup = false; for (Group group : poolOfGroupsToBeSynchronized.getWaitingJobs()) { boolean allowed = true; List<Group> groupStructureJobs = poolOfGroupsStructuresToBeSynchronized.getWaitingJobs(); groupStructureJobs.addAll(poolOfGroupsStructuresToBeSynchronized.getRunningJobs()); for (Group groupStructure : groupStructureJobs) { List<Group> allSubGroups = sess.getPerunBl().getGroupsManagerBl().getAllSubGroups(sess, groupStructure); if (allSubGroups.contains(group)) { allowed = false; break; } } if (allowed) { poolOfGroupsToBeSynchronized.putJobIfAbsent(group, true); try { sess.getPerunBl().getGroupsManagerBl().checkGroupExists(sess, group); } catch (GroupNotExistsException e) { log.warn("Group was removed from a Vo while it was waiting for a synchronization.", group); poolOfGroupsToBeSynchronized.removeJob(poolOfGroupsToBeSynchronized.takeJob()); removedGroup = true; break; } return poolOfGroupsToBeSynchronized.takeJob(); } } if (!removedGroup) notEmptyGroupsPoolSemaphore.release(); } finally { poolAccessLock.unlock(); } Thread.sleep(1000 + random.nextInt(1001)); } }
Source:
<code>private void onError() throws StoreException { int count = errorCount.incrementAndGet(); if (count == config.storeIOErrorCountToTriggerShutdown) { <START> logger.info("Shutting down BlobStore because IO error count exceeds threshold", storeId); <END> shutdown(); } }</code><technical_language>Add a metric alter report it</technical_language>

Target:
private void onError() throws StoreException { int count = errorCount.incrementAndGet(); if (count == config.storeIoErrorCountToTriggerShutdown) { logger.error("Shutting down BlobStore because IO error count exceeds threshold", storeId); shutdown(); metrics.storeIoErrorTriggeredShutdownCount.inc(); } }
Source:
<code>public Message(int sequence, Map map) { <START> setSequence(sequence); <END> setData(map); }</code><technical_language>I do setSequence setData set in constructor</technical_language>

Target:
public Message(int sequence, Map map) { this.sequence = sequence; this.data = map; identityStream = extractIdentityStream(); }
Source:
<code>private void loadItemHandlers() { for (ItemHandler handler : itemhandlers.values()) { Optional<IncompatibleItemHandlerException> exception = handler.validate(this); if (exception.isPresent()) { throw exception.get(); } if (!handler.isPrivate()) { Set<ItemHandler> handlerset = getPublicItemHandlers(handler.getIdentifier()); handlerset.add(handler); <START> SlimefunPlugin.getRegistry().getPublicItemHandlers().replace(handler.getIdentifier(), handlerset); <END> } } }</code><technical_language>even? This method literally nothing</technical_language>

Target:
private void loadItemHandlers() { for (ItemHandler handler : itemhandlers.values()) { Optional<IncompatibleItemHandlerException> exception = handler.validate(this); if (exception.isPresent()) { throw exception.get(); } else { checkForDeprecations(handler.getClass()); } if (!handler.isPrivate()) { Set<ItemHandler> handlerset = getPublicItemHandlers(handler.getIdentifier()); handlerset.add(handler); } } }
Source:
<code>private EventData createEventData(Object value) { byte[] eventBinaryData; if (value instanceof IndexedRecord) { IndexedRecord payloadRecord = (IndexedRecord) value; try { eventBinaryData = AvroUtils.encodeAvroIndexedRecord(payloadRecord.getSchema(), payloadRecord); } catch (IOException e) { String msg = "Failed to encode event in Avro, event=" + payloadRecord; LOG.error(msg, e); throw new DatastreamRuntimeException(msg, e); } } else if (value instanceof String) { eventBinaryData = ((String) value).getBytes(); } else { <START> throw new DatastreamRuntimeException("Transport provider supports payloads of type String or AvroRecords"); <END> } return new EventData(eventBinaryData); }</code><technical_language>print actual type of "value" here</technical_language>

Target:
private EventData createEventData(Object value) { byte[] eventBinaryData; if (value instanceof IndexedRecord) { IndexedRecord payloadRecord = (IndexedRecord) value; try { eventBinaryData = AvroUtils.encodeAvroIndexedRecord(payloadRecord.getSchema(), payloadRecord); } catch (IOException e) { String msg = "Failed to encode event in Avro, event=" + payloadRecord; LOG.error(msg, e); throw new DatastreamRuntimeException(msg, e); } } else if (value instanceof String) { eventBinaryData = ((String) value).getBytes(); } else { String msg = String.format( "Transport provider supports payloads of type String or AvroRecords, Record {%s} is of type: %s", value.toString(), value.getClass().toString()); LOG.error(msg); throw new DatastreamRuntimeException(msg); } return new EventData(eventBinaryData); }
Source:
<code>public void processQualifier_useValidUsername_noUsernameWarning() { TurboUser user = new TurboUser(REPO, "fox", "charlie"); IModel model = TestUtils.singletonModel(new Model(REPO, new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), <START> new ArrayList<>(Arrays.asList(user)))); <END> verifyUserWarning(model, "involves:fOX", new ArrayList<>()); verifyUserWarning(model, "assignee:FOX", new ArrayList<>()); verifyUserWarning(model, "assignee:CHAR", new ArrayList<>()); }</code><technical_language>Line wrapping indentation better</technical_language>

Target:
public void processQualifier_useValidUsername_noUsernameWarning() { TurboUser user = new TurboUser(REPO, "fox", "charlie"); IModel model = TestUtils.singletonModel(createModelFromUsers(REPO, user)); verifyUserWarning(model, "involves:fOX", new ArrayList<>()); verifyUserWarning(model, "assignee:FOX", new ArrayList<>()); verifyUserWarning(model, "assignee:CHAR", new ArrayList<>()); }
Source:
<code>public void testGetContent_gzipEncoding_finishReadingWithDifferentDefaultLocaleAndUppercaseContentEncoding() throws IOException { Locale originalDefaultLocale = Locale.getDefault(); Locale.setDefault(Locale.JAPAN); do_testGetContent_gzipEncoding_finishReading("GZIP"); <START> Locale.setDefault(originalDefaultLocale); <END> }</code><technical_language>this in a finally block reset if test fails</technical_language>

Target:
public void testGetContent_gzipEncoding_finishReadingWithDifferentDefaultLocaleAndUppercaseContentEncoding() throws IOException { Locale originalDefaultLocale = Locale.getDefault(); try { Locale.setDefault(Locale.forLanguageTag("tr-TR")); do_testGetContent_gzipEncoding_finishReading("GZIP"); } finally { Locale.setDefault(originalDefaultLocale); } }
Source:
<code>public float getPrefWidth() { <START> return Editor.getWidth() * PREF_WIDTH; <END> }</code><technical_language>getStage().getWidth()</technical_language>

Target:
public float getPrefWidth() { return this.viewport == null ? 0 : this.viewport.x * PREF_WIDTH; }
Source:
<code>private boolean isValidationNecessaryOnReads(TableReference tableRef) { <START> return validateLocksOnReads && isThoroughSwept(tableRef); <END> }</code><technical_language>if set a convention this, isThoroughlySwept reads</technical_language>

Target:
private boolean isValidationNecessaryOnReads(TableReference tableRef) { return validateLocksOnReads && isThoroughlySwept(tableRef); }
Source:
<code>static PemObject loadPemResource(String resource) throws IOException { <START> try (InputStream s = new FileInputStream(resource)) { <END> PemReader p = new PemReader(new InputStreamReader(s)); PemObject o = p.readPemObject(); p.close(); return o; } }</code><technical_language>Pay attention PemObject is Reader monitoring, readPemObject throws Exception! <LINK_0> a Reader implementation, means is Closeable. try-with-resources. Also, check if IOException needs propagated</technical_language>

Target:
static PemObject loadPemResource(String resource) throws IOException { InputStream s = new FileInputStream(resource); try (PemReader p = new PemReader(new InputStreamReader(s))) { PemObject o = p.readPemObject(); return o; } }
Source:
<code>public Member expireMember(PerunSession sess, Member member) throws InternalErrorException, MemberNotValidYetException, WrongReferenceAttributeValueException, WrongAttributeValueException { if(this.haveStatus(sess, member, Status.EXPIRED)) { log.debug("Trying to set member expired but he's already expired. " + member); return member; } if(this.haveStatus(sess, member, Status.INVALID)) throw new MemberNotValidYetException(member); Status oldStatus = member.getStatus(); getMembersManagerImpl().setStatus(sess, member, Status.EXPIRED); member.setStatus(Status.EXPIRED); getPerunBl().getAuditer().log(sess, new MemberExpired(member)); <START> if(oldStatus.equals(Status.INVALID) || oldStatus.equals(Status.DISABLED)) { <END> getPerunBl().getAttributesManagerBl().doTheMagic(sess, member); } return member; }</code><technical_language>get Status.INVALID here, checked exception is thrown. expected destination invalid state is valid</technical_language>

Target:
public Member expireMember(PerunSession sess, Member member) throws InternalErrorException, WrongReferenceAttributeValueException, WrongAttributeValueException { if(this.haveStatus(sess, member, Status.EXPIRED)) { log.debug("Trying to set member expired but he's already expired. " + member); return member; } Status oldStatus = member.getStatus(); getMembersManagerImpl().setStatus(sess, member, Status.EXPIRED); member.setStatus(Status.EXPIRED); getPerunBl().getAuditer().log(sess, new MemberExpired(member)); if(oldStatus.equals(Status.INVALID) || oldStatus.equals(Status.DISABLED)) { try { getPerunBl().getAttributesManagerBl().doTheMagic(sess, member); } catch (Exception ex) { member.setStatus(oldStatus); throw ex; } } return member; }
Source:
<code>public boolean accept(Key k, Value v) { if(v.get().length > 0) { Map<String, Object> metadata = metadataSerDe.deserialize(v.get()); if(metadata != null && metadata.containsKey(EXPIRATION)) { <START> long threshold = (Long)metadata.get(EXPIRATION); <END> long currentTime = currentTimeMillis(); if (k.getTimestamp() > currentTime || currentTime - k.getTimestamp() > threshold) return false; return true; } } return true; }</code><technical_language>static utility method in Metadata for this</technical_language>

Target:
public boolean accept(Key k, Value v) { if (v.get().length > 0) { Map<String, Object> metadata = metadataSerDe.deserialize(v.get()); if (metadata != null) { long threshold = getExpiration(metadata, -1); if (threshold > -1) { long currentTime = currentTimeMillis(); if (k.getTimestamp() > currentTime || currentTime - k.getTimestamp() > threshold) return false; } return true; } } return true; }
Source:
<code>public void removeCapabilityRequirement(RuntimeRequirementRegistration requirementRegistration) { try { <START> writeLock.lock(); <END> removeRequirement(requirementRegistration, false); removeRequirement(requirementRegistration, true); } finally { writeLock.unlock(); } }</code><technical_language>lock acquisitions need moved try/finally releases them. Java Concurrency in Practice listing 13.2, - 13.5</technical_language>

Target:
public void removeCapabilityRequirement(RuntimeRequirementRegistration requirementRegistration) { writeLock.lock(); try { removeRequirement(requirementRegistration, false); removeRequirement(requirementRegistration, true); } finally { writeLock.unlock(); } }
Source:
<code>public void testNetworkBlocked() throws Exception { assertEquals(VPN_PACKAGE, mDevicePolicyManager.getAlwaysOnVpnPackage( ADMIN_RECEIVER_COMPONENT)); for(int <START> i=0; i <END> < MAX_NUMBER_OF_ATTEMPT && VpnTestHelper.isNetworkVpn(mContext); ++i) { Thread.sleep(1000); } assertFalse(VpnTestHelper.isNetworkVpn(mContext)); try { VpnTestHelper.tryPosixConnect(TEST_ADDRESS); fail("sendIcmpMessage doesn't throw Exception during network lockdown"); } catch (ErrnoException e) { assertTrue((e.errno == OsConstants.ENETUNREACH) || (e.errno == OsConstants.EACCES)); } }</code><technical_language>nit: add space = sign</technical_language>

Target:
public void testNetworkBlocked() throws Exception { assertEquals(VPN_PACKAGE, mDevicePolicyManager.getAlwaysOnVpnPackage( ADMIN_RECEIVER_COMPONENT)); for(int i = 0; i < MAX_NUMBER_OF_ATTEMPTS && VpnTestHelper.isNetworkVpn(mContext); ++i) { Thread.sleep(TimeUnit.SECONDS.toMillis(1)); } assertFalse(VpnTestHelper.isNetworkVpn(mContext)); try { VpnTestHelper.tryPosixConnect(TEST_ADDRESS); fail("sendIcmpMessage doesn't throw Exception during network lockdown"); } catch (ErrnoException e) { assertTrue((e.errno == OsConstants.ENETUNREACH) || (e.errno == OsConstants.EACCES)); } }
Source:
<code><START> default String getApplicationTargetName() { <END> return ""; }</code><technical_language>This Optional<String>. in this PR returning null in DummyClusterClientServiceLoader, Optional.empty()</technical_language>

Target:
default Optional<String> getApplicationTargetName() { return Optional.empty(); }
Source:
<code>public void check(CoreEvent event) throws FlowBackPressureException { <START> if (abstractPipeline.getSource().getBackPressureStrategy() == MessageSource.BackPressureStrategy.WAIT) { <END> checkWithWaitStrategy(event); } else { checkWithFailDropStrategy(event); } }</code><technical_language>static import</technical_language>

Target:
public void check(CoreEvent event) throws FlowBackPressureException { if (abstractPipeline.getSource().getBackPressureStrategy() == WAIT) { checkWithWaitStrategy(event); } else { checkWithFailDropStrategy(event); } }
Source:
<code>private Manager getManager(ServletContext servletContext) { try { ApplicationContextFacade acf = (ApplicationContextFacade) servletContext; Field privateField = ApplicationContextFacade.class.getDeclaredField("context"); privateField.setAccessible(true); ApplicationContext appContext = (ApplicationContext) privateField.get(acf); <START> Field privateField2 = ApplicationContext.class.getDeclaredField("context"); <END> privateField2.setAccessible(true); StandardContext stdContext = (StandardContext) privateField2.get(appContext); return stdContext.getManager(); } catch (Exception e) { LOG.error(e.getMessage(), e); } return null; }</code><technical_language>privateField, privateField2 self-explained variables names ;)</technical_language>

Target:
private Manager getManager(ServletContext servletContext) { try { ApplicationContextFacade acf = (ApplicationContextFacade) servletContext; Field applicationContextFacadeField = ApplicationContextFacade.class.getDeclaredField("context"); applicationContextFacadeField.setAccessible(true); ApplicationContext appContext = (ApplicationContext) applicationContextFacadeField.get(acf); Field applicationContextField = ApplicationContext.class.getDeclaredField("context"); applicationContextField.setAccessible(true); StandardContext stdContext = (StandardContext) applicationContextField.get(appContext); return stdContext.getManager(); } catch (Exception e) { LOG.error("Unable to get catalina manager. Cause: {}", e.getMessage(), e); throw new RuntimeException(e.getMessage(), e); } }
Source:
<code>private BsonDocument getCommand() { <START> BsonDocument cursorDocument = batchSize == null ? new BsonDocument() : new BsonDocument("batchSize", new BsonInt32(batchSize)); <END> BsonDocument command = new BsonDocument("listCollections", new BsonInt32(1)).append("cursor", cursorDocument); if (filter != null) { command.append("filter", filter); } return command; }</code><technical_language>abstract this line a static method in CursorHelper</technical_language>

Target:
private BsonDocument getCommand() { BsonDocument command = new BsonDocument("listCollections", new BsonInt32(1)) .append("cursor", getCursorDocumentFromBatchSize(batchSize)); if (filter != null) { command.append("filter", filter); } if (maxTimeMS > 0) { command.put("maxTimeMS", new BsonInt64(maxTimeMS)); } return command; }
Source:
<code>public void read(CorfuPayloadMsg<ReadRequest> msg, ChannelHandlerContext ctx, IServerRouter r) { long address = msg.getPayload().getAddress(); boolean cacheable = msg.getPayload().isCacheReadResult(); log.trace("read: {}, cacheable: {}", msg.getPayload().getAddress(), cacheable); ReadResponse rr = new ReadResponse(); try { ILogData logData; <START> if (config.isMemoryMode()) { <END> logData = dataCache.get(address, false); } else { logData = dataCache.get(address, cacheable); } if (logData == null) { rr.put(address, LogData.getEmpty(address)); } else { rr.put(address, (LogData) logData); } r.sendResponse(ctx, msg, CorfuMsgType.READ_RESPONSE.payloadMsg(rr)); } catch (DataCorruptionException e) { r.sendResponse(ctx, msg, CorfuMsgType.ERROR_DATA_CORRUPTION.msg()); } }</code><technical_language>simplify this block to: java ILogData logData = dataCache.get(address, cacheable && !config.isMemoryMode());</technical_language>

Target:
public void read(CorfuPayloadMsg<ReadRequest> msg, ChannelHandlerContext ctx, IServerRouter r) { long address = msg.getPayload().getAddress(); boolean cacheable = msg.getPayload().isCacheReadResult(); log.trace("read: {}, cacheable: {}", msg.getPayload().getAddress(), cacheable); ReadResponse rr = new ReadResponse(); try { ILogData logData; if (config.isMemoryMode()) { logData = dataCache.get(address, false); } else { logData = dataCache.get(address, cacheable); } if (logData == null) { rr.put(address, LogData.getEmpty(address)); } else { rr.put(address, (LogData) logData); } r.sendResponse(ctx, msg, CorfuMsgType.READ_RESPONSE.payloadMsg(rr)); } catch (DataCorruptionException e) { log.error("Data corruption exception while reading address {}", address, e); r.sendResponse(ctx, msg, CorfuMsgType.ERROR_DATA_CORRUPTION.payloadMsg(address)); } }
Source:
<code>public String promptForJdkPath(Server server) { List<String> paths = new ArrayList<>(); paths.add("JAVA_HOME (currently: " + System.getProperty("java.home") + ")"); try { paths.addAll(getJdkPathsFromProperties(getSdkProperties())); } catch (IOException e) { e.printStackTrace(); } if (!interactiveMode) { return paths.get(0); } String path = promptForMissingValueWithOptions(SDKConstants.OPENMRS_SDK_JDK_OPTION, server.getJdkPath(), "path", paths, SDKConstants.OPENMRS_SDK_JDK_CUSTOM, null); if (path.equals(paths.get(0))) { <START> server.setJdkPath(System.getProperty("java.home")); <END> } if (!isThereJdkUnderPath(path)) { System.out.println(SDKConstants.OPENMRS_SDK_JDK_CUSTOM_INVALID); server.setJdkPath(promptForJdkPath(server)); } else { if (!isPathLineDuplicated(paths, path)) { try { addJdkPathToSdkProperties(path); } catch (IOException e) { e.printStackTrace(); } } return path; } return null; }</code><technical_language>Do in a case actual java.home system property is setup</technical_language>

Target:
public String promptForJdkPath(Server server) { List<String> paths = new ArrayList<>(); paths.add("JAVA_HOME (currently: " + System.getProperty("java.home") + ")"); paths.addAll(getJdkPaths()); if (!interactiveMode) { return paths.get(0); } String javaHome = server.getJavaHome(); if (javaHome.equals(System.getProperty("java.home"))) { javaHome = null; } String path = promptForMissingValueWithOptions(SDKConstants.OPENMRS_SDK_JDK_OPTION, javaHome, "path", paths, SDKConstants.OPENMRS_SDK_JDK_CUSTOM, null); if (path.equals(paths.get(0))) { return null; } if (!isThereJdkUnderPath(path)) { System.out.println(SDKConstants.OPENMRS_SDK_JDK_CUSTOM_INVALID); server.setJavaHome(promptForJdkPath(server)); } else { if (!isPathLineDuplicated(paths, path)) { addJdkPathToSdkProperties(path); } return path; } return null; }
Source:
<code>public synchronized void updateCommittedTail(long newCommittedTail) { if (committedTail.get() >= newCommittedTail) { log.trace("New committed tail less than or equals to the old one. Ignore", newCommittedTail); return; } <START> log.debug("Update committed tail to: {}, current: ", newCommittedTail, committedTail.get()); <END> dataStore.put(COMMITTED_TAIL_RECORD, newCommittedTail); committedTail.set(newCommittedTail); }</code><technical_language>missing {}</technical_language>

Target:
public synchronized void updateCommittedTail(long newCommittedTail) { if (committedTail.get() >= newCommittedTail) { log.trace("New committed tail less than or equals to the old one. Ignore", newCommittedTail); return; } log.debug("Update committed tail to: {}, current: {}", newCommittedTail, committedTail.get()); dataStore.put(COMMITTED_TAIL_RECORD, newCommittedTail); committedTail.set(newCommittedTail); }
Source:
<code><START> private void handleQxlClusterLevel() { <END> boolean isQxl = getDisplayType() == DisplayType.qxl; getBehavior().enableSinglePCI(getDefalutQxlValue()); if (getSelectedCluster() != null) { boolean spiceFileTransferToggle = isQxl && AsyncDataProvider.isSpiceFileTransferToggleSupported(getSelectedCluster().getcompatibility_version().toString()); if (!spiceFileTransferToggle) { handleQxlChangeProhibitionReason(getSpiceFileTransferEnabled(), getSelectedCluster().getcompatibility_version().toString(), isQxl); } getSpiceFileTransferEnabled().setIsChangable(spiceFileTransferToggle); boolean spiceCopyPasteToggle = isQxl && AsyncDataProvider.isSpiceCopyPasteToggleSupported(getSelectedCluster().getcompatibility_version().toString()); if (!spiceCopyPasteToggle) { handleQxlChangeProhibitionReason(getSpiceCopyPasteEnabled(), getSelectedCluster().getcompatibility_version().toString(), isQxl); } getSpiceCopyPasteEnabled().setIsChangable(spiceCopyPasteToggle); } }</code><technical_language>need for line</technical_language>

Target:
private void handleQxlClusterLevel() { getBehavior().enableSinglePCI(getDefalutQxlValue()); if (getSelectedCluster() != null) { boolean isQxl = getDisplayType() == DisplayType.qxl; boolean spiceFileTransferToggle = isQxl && AsyncDataProvider.isSpiceFileTransferToggleSupported(getSelectedCluster().getcompatibility_version().toString()); if (!spiceFileTransferToggle) { handleQxlChangeProhibitionReason(getSpiceFileTransferEnabled(), getSelectedCluster().getcompatibility_version().toString(), isQxl); } getSpiceFileTransferEnabled().setIsChangable(spiceFileTransferToggle); boolean spiceCopyPasteToggle = isQxl && AsyncDataProvider.isSpiceCopyPasteToggleSupported(getSelectedCluster().getcompatibility_version().toString()); if (!spiceCopyPasteToggle) { handleQxlChangeProhibitionReason(getSpiceCopyPasteEnabled(), getSelectedCluster().getcompatibility_version().toString(), isQxl); } getSpiceCopyPasteEnabled().setIsChangable(spiceCopyPasteToggle); } }
Source:
<code>public void jobToBeExecuted(JobExecutionContext context) { String name = String.format("Job: %s; Trigger: %s", context.getTrigger().getJobKey(), context.getTrigger().getKey()); Span span = tracer.nextSpan().name(name); <START> jobSpans.put(context.getFireInstanceId(), span); <END> tracer.withSpanInScope(span.start()); }</code><technical_language>Instead of a map in this class I put method JobExecutionContext attach objects need quartz context</technical_language>

Target:
public void jobToBeExecuted(JobExecutionContext context) { }
Source:
<code>MappedServlet(PathSpec pathSpec, ServletHolder servletHolder) { super(pathSpec, servletHolder); _pathSpec = pathSpec; _servletHolder = servletHolder; if (pathSpec instanceof ServletPathSpec) { switch (pathSpec.getGroup()) { case EXACT: case DEFAULT: case ROOT: _httpServletMapping = getServletMapping(pathSpec, pathSpec.getDeclaration(), servletHolder.getName()); break; default: _httpServletMapping = null; break; } } <START> else <END> { _httpServletMapping = null; } }</code><technical_language>if pathSpec is null this is a named dispatch create a _httpServletMapping well</technical_language>

Target:
MappedServlet(PathSpec pathSpec, ServletHolder servletHolder) { _pathSpec = pathSpec; _servletHolder = servletHolder; if (pathSpec instanceof ServletPathSpec) { switch (pathSpec.getGroup()) { case EXACT: case ROOT: _servletPathMapping = new ServletPathMapping(_pathSpec, _servletHolder.getName(), _pathSpec.getPrefix()); break; default: _servletPathMapping = null; break; } } else { _servletPathMapping = null; } }
Source:
<code><START> public static Collection<Integer> getSupportedCountryCodes() <END> { final Set<Integer> supportedCountryCodes = new HashSet<>(); final PhoneNumberUtil pnUtil = PhoneNumberUtil.getInstance(); for (final String region : pnUtil.getSupportedRegions()) { supportedCountryCodes.add(pnUtil.getCountryCodeForRegion(region)); } return supportedCountryCodes; }</code><technical_language>Semantic change! do want duplicates here</technical_language>

Target:
public static Collection<Integer> getSupportedCountryCodes() { final Collection<Integer> supportedCountryCodes = new HashSet<>(); final PhoneNumberUtil pnUtil = PhoneNumberUtil.getInstance(); for (final String region : pnUtil.getSupportedRegions()) { supportedCountryCodes.add(pnUtil.getCountryCodeForRegion(region)); } return supportedCountryCodes; }
Source:
<code><START> public default <E2> GraphTraversal<S, Map<Object, E2>> valueMap(final String... propertyKeys) { <END> this.asAdmin().getBytecode().addStep(Symbols.valueMap, propertyKeys); return this.asAdmin().addStep(new PropertyMapStep<>(this.asAdmin(), false, PropertyType.VALUE, propertyKeys)); }</code><technical_language>Actually, this Map<String,E2>. a boolean "includeTokens" Map<Object,Object></technical_language>

Target:
public default <E2> GraphTraversal<S, Map<String, E2>> valueMap(final String... propertyKeys) { this.asAdmin().getBytecode().addStep(Symbols.valueMap, propertyKeys); return this.asAdmin().addStep(new PropertyMapStep<>(this.asAdmin(), false, PropertyType.VALUE, propertyKeys)); }