auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public StringBuffer format(@Nullable Object obj, @Nullable StringBuffer toAppendTo, @Nullable FieldPosition pos) { if (!(obj instanceof Number) || toAppendTo == null) { throw new IllegalArgumentException("Cannot format given Object as a Number: " + obj); } Number number = (Number) obj; if (fRangeMap == null) { StringBuffer buffer = super.format(number, toAppendTo, pos); return (buffer == null ? new StringBuffer() : buffer); } <START> ChartRange internalRange = checkNotNull(fRangeMap).getInternal(); <END> ChartRange externalRange = checkNotNull(fRangeMap).getExternal(); if (internalRange.isDeltaNull() || externalRange.isDeltaNull()) { StringBuffer buffer = super.format(externalRange.getMinimum().doubleValue(), toAppendTo, pos); return (buffer == null ? new StringBuffer() : buffer); } Double externalValue = checkNotNull(fRangeMap).getExternalValue(number).doubleValue(); StringBuffer buffer = super.format(externalValue, toAppendTo, pos); return (buffer == null ? new StringBuffer() : buffer); }</code><technical_language>extract local variable avoid null checking (since null check anyway)</technical_language>

Target:
public StringBuffer format(@Nullable Object obj, @Nullable StringBuffer toAppendTo, @Nullable FieldPosition pos) { if (!(obj instanceof Number) || toAppendTo == null) { throw new IllegalArgumentException("Cannot format given Object as a Number: " + obj); } Number number = (Number) obj; ChartRangeMap rangeMap = fRangeMap; if (rangeMap == null) { StringBuffer buffer = super.format(number, toAppendTo, pos); return (buffer == null ? new StringBuffer() : buffer); } ChartRange internalRange = rangeMap.getInternal(); ChartRange externalRange = rangeMap.getExternal(); if (internalRange.isDeltaNull() || externalRange.isDeltaNull()) { StringBuffer buffer = super.format(externalRange.getMinimum().doubleValue(), toAppendTo, pos); return (buffer == null ? new StringBuffer() : buffer); } Double externalValue = checkNotNull(fRangeMap).getExternalValue(number).doubleValue(); StringBuffer buffer = super.format(externalValue, toAppendTo, pos); return (buffer == null ? new StringBuffer() : buffer); }
Source:
<code>protected void executeCommand() { <START> setPrestartedToZero(); <END> stopVms(); setCommandShouldBeLogged(false); setSucceeded(true); }</code><technical_language>set prestarted zero VMs start stopping right? need lock pool stopping VMs some time user update prestarted VMs count in</technical_language>

Target:
protected void executeCommand() { setPoolBeingDestroyed(); setPrestartedToZero(); setSucceeded(stopVms() && removeVmsInPool() && removeVmPool()); }
Source:
<code>public Factory saveFactory(Factory factory) throws ApiException { final User user = EnvironmentContext.getCurrent().getUser(); <START> if (user == null || user.getName() == null || user.getId() == null) { <END> throw new ServerException("Unable to identify user from context"); } if (factory == null) { throw new BadRequestException("Not null factory required"); } processDefaults(factory); createValidator.validateOnCreate(factory); final String factoryId = factoryStore.saveFactory(factory, null); try { return factory.withLinks(linksHelper.createLinks(factoryStore.getFactory(factoryId), uriInfo)); } catch (UnsupportedEncodingException e) { throw new ServerException(e.getLocalizedMessage(), e); } }</code><technical_language>User null long @RollesAllowed("user") is present top of this method</technical_language>

Target:
public Factory saveFactory(Factory factory) throws ApiException { if (factory == null) { throw new BadRequestException("Not null factory required"); } processDefaults(factory); createValidator.validateOnCreate(factory); final String factoryId = factoryStore.saveFactory(factory, null); try { return factory.withLinks(linksHelper.createLinks(factoryStore.getFactory(factoryId), uriInfo)); } catch (UnsupportedEncodingException e) { throw new ServerException(e.getLocalizedMessage(), e); } }
Source:
<code>public void loadKnownHosts(){ Preferences preferences=JSchCorePlugin.getPlugin().getPluginPreferences(); String ssh_home=preferences.getString(IConstants.KEY_SSH2HOME); if(ssh_home.length()==0) ssh_home=PreferenceInitializer.SSH_HOME_DEFAULT; java.io.File file=new java.io.File(ssh_home, "known_hosts"); <START> if (file.exists()) { try{ getJSch().setKnownHosts(file.getPath()); <END> } catch(JSchException e){ JSchCorePlugin.log(IStatus.ERROR, NLS.bind( "An error occurred while loading the know hosts file {0}", file .getAbsolutePath()), e); } } needToLoadKnownHosts=false; }</code><technical_language>Is implement this code a race condition checking for file existence potential (but unlikely) deletion of file Eclipse</technical_language>

Target:
public void loadKnownHosts(){ Preferences preferences=JSchCorePlugin.getPlugin().getPluginPreferences(); String ssh_home=preferences.getString(IConstants.KEY_SSH2HOME); if(ssh_home.length()==0) ssh_home=PreferenceInitializer.SSH_HOME_DEFAULT; java.io.File file=new java.io.File(ssh_home, "known_hosts"); try{ getJSch().setKnownHosts(file.getPath()); } catch(JSchException e){ if (!(e.getCause() instanceof FileNotFoundException)) { JSchCorePlugin.log(IStatus.ERROR, NLS.bind( "An error occurred while loading the know hosts file {0}", file .getAbsolutePath()), e); } } needToLoadKnownHosts=false; }
Source:
<code>public void setSelection(int index) { <START> if (index >= mOriginalText.length()) { <END> index = mOriginalText.length() - 1; } int spacesUpToIndex; if (index == 0) { spacesUpToIndex = 0; } else { spacesUpToIndex = index - 1; } try { super.setSelection(index + spacesUpToIndex); } catch (IndexOutOfBoundsException e) { throw new IndexOutOfBoundsException(e.getMessage() + ", requestedIndex=" + index + ", spacesUpToIndex=" + spacesUpToIndex + ", originalText=" + mOriginalText); } }</code><technical_language>I work: index 11 (should 10) in crash, original text is 5 chars long. TBH, confused of this works... is span 21 characters long? a ugly solution, catch block call super index 0. multiply mOriginalText.length() 2</technical_language>

Target:
public void setSelection(int index) { int newIndex = (index * 2) - 1; newIndex = Math.max(newIndex, 0); newIndex = Math.min(newIndex, (mOriginalText.length() * 2) - 1); try { super.setSelection(newIndex); } catch (IndexOutOfBoundsException e) { throw new IndexOutOfBoundsException(e.getMessage() + ", requestedIndex=" + index + ", newIndex= " + newIndex + ", originalText=" + mOriginalText); } }
Source:
<code>private void newPost() { if (!isAdded()) { return; } <START> ActivityLauncher.addNewPostOrPageForResult(getActivity(), mSite, false, false); <END> }</code><technical_language>This method is called isPage = true, modified for posts</technical_language>

Target:
private void newPost() { if (!isAdded()) { return; } ActivityLauncher.addNewPostForResult(getActivity(), mSite, false); }
Source:
<code>public RangerCloudIdentitySyncStatus getRangerCloudIdentitySyncStatus(String envCrn, long commandId) { Optional<SdxCluster> sdxCluster = getSdxCluster(envCrn); if (sdxCluster.isEmpty()) { <START> return sucessfulCloudIdSyncStatus("No datlakes associated with the environment."); <END> } try { ApiCommand apiCommand = clouderaManagerRangerUtil.getApiCommand(sdxCluster.get().getStackCrn(), commandId); return toRangerCloudIdentitySyncStatus(apiCommand); } catch (ApiException e) { LOGGER.error("Encountered cloudera manager api exception", e); return failedRangerCloudIdentitySyncStatus("Encountered cloudera manager api exception"); } }</code><technical_language>typo: datalakes also, this feel a successful condition. NOT_APPLICABLE sense for this case case CM support this feature</technical_language>

Target:
public RangerCloudIdentitySyncStatus getRangerCloudIdentitySyncStatus(String envCrn, long commandId) { Optional<SdxCluster> sdxCluster = getSdxCluster(envCrn); if (sdxCluster.isEmpty()) { return newSyncStatus(RangerCloudIdentitySyncState.NOT_APPLICABLE, "No datalakes associated with the environment."); } try { ApiCommand apiCommand = clouderaManagerRangerUtil.getApiCommand(sdxCluster.get().getStackCrn(), commandId); return toRangerCloudIdentitySyncStatus(apiCommand); } catch (ApiException e) { LOGGER.error("Encountered cloudera manager api exception", e); return newSyncStatus(RangerCloudIdentitySyncState.FAILED, "Encountered cloudera manager api exception"); } }
Source:
<code><START> public UsageVO(Long zoneId, Long accountId, Long domainId, String description, String usageDisplay, int usageType, Double rawUsage, Long vmId, String vmName, <END> Long offeringId, Long templateId, Long usageId, Long size, Long virtualSize, Date startDate, Date endDate) { this.zoneId = zoneId; this.accountId = accountId; this.domainId = domainId; this.description = description; this.usageDisplay = usageDisplay; this.usageType = usageType; this.rawUsage = rawUsage; this.vmInstanceId = vmId; this.vmName = vmName; this.offeringId = offeringId; this.templateId = templateId; this.usageId = usageId; this.size = size; this.virtualSize = virtualSize; this.startDate = startDate; this.endDate = endDate; }</code><technical_language>extends this instead of creating a new constructor</technical_language>

Target:
public UsageVO(Long zoneId, Long accountId, Long domainId, String description, String usageDisplay, int usageType, Double rawUsage, Long vmId, String vmName, Long offeringId, Long templateId, Long usageId, Long size, Long virtualSize, Date startDate, Date endDate) { this.zoneId = zoneId; this.accountId = accountId; this.domainId = domainId; this.description = description; this.usageDisplay = usageDisplay; this.usageType = usageType; this.rawUsage = rawUsage; this.vmInstanceId = vmId; this.vmName = vmName; this.offeringId = offeringId; this.templateId = templateId; this.usageId = usageId; this.size = size; this.virtualSize = virtualSize; this.startDate = startDate == null ? null : new Date(startDate.getTime()); this.endDate = endDate == null ? null : new Date(endDate.getTime()); }
Source:
<code>public void testReplace() throws Exception{ boolean removedValue = store.replace(file1, file1Id, "4567"); assertFalse(removedValue); <START> <END> String fileID = store.putIfAbsent(file1, file1Id); assertNull(fileID); removedValue = store.replace(file1, file1Id, "4567"); assertTrue(removedValue); }</code><technical_language>I store.get(file1) replace affected collection</technical_language>

Target:
public void testReplace() throws Exception { boolean removedValue = store.replace(file1, file1Id, "4567"); assertFalse(removedValue); String fileID = store.get(file1); assertNull(fileID); fileID = store.putIfAbsent(file1, file1Id); assertNull(fileID); removedValue = store.replace(file1, file1Id, "4567"); assertTrue(removedValue); fileID = store.get(file1); assertNotNull(fileID); assertEquals("4567", fileID); }
Source:
<code>public CPPASTLiteralExpression copy(CopyStyle style) { CPPASTLiteralExpression copy = new CPPASTLiteralExpression(fKind, <START> getValue().clone(), fNumericCompilerSuffixes); <END> copy.fStringLiteralSize = fStringLiteralSize; copy.fEvaluation = fEvaluation; copy.fUserDefinedLiteralOperator = fUserDefinedLiteralOperator; copy.fImplicitNames = fImplicitNames; return copy(copy, style); }</code><technical_language>need clone contents of array modified</technical_language>

Target:
public CPPASTLiteralExpression copy(CopyStyle style) { CPPASTLiteralExpression copy = new CPPASTLiteralExpression(fKind, getValue(), fNumericCompilerSuffixes); copy.fStringLiteralSize = fStringLiteralSize; copy.fEvaluation = fEvaluation; copy.fUserDefinedLiteralOperator = fUserDefinedLiteralOperator; copy.fImplicitNames = fImplicitNames; return copy(copy, style); }
Source:
<code>public void testSomethingByArrayWithNonEmptyArray() { final SomethingByVarargs s = handle.attach(SomethingByVarargs.class); final List<Something> out = s.get( new SomethingKey(1, "1"), new SomethingKey(2, "2")); <START> assertThat(out).hasSize(2); <END> }</code><technical_language>check results here, size</technical_language>

Target:
public void testSomethingByArrayWithNonEmptyArray() { final SomethingByVarargs s = handle.attach(SomethingByVarargs.class); final List<Something> out = s.get( new SomethingKey(1, "1"), new SomethingKey(2, "2")); assertThat(out).hasSameElementsAs(expectedSomethings); }
Source:
<code>private void handleSingleRpcCommand(SingleRpcCommand command, Reply reply, DeliverOrder order) { if (executeOnExecutorService(order, command)) { int commandTopologyId = extractCommandTopologyId(command); <START> BlockingRunnable runnable = createReadyActionRunnable(command, reply, commandTopologyId, order.preserveOrder(), <END> null); remoteCommandsExecutor.execute(runnable); } else { createDefaultRunnable(command, reply, extractCommandTopologyId(command), TopologyMode.WAIT_TX_DATA, order.preserveOrder()).run(); } }</code><technical_language>replaced createDefaultRunnable() TopologyMode.READY_TX_DATA</technical_language>

Target:
private void handleSingleRpcCommand(SingleRpcCommand command, Reply reply, DeliverOrder order) { if (executeOnExecutorService(order, command)) { int commandTopologyId = extractCommandTopologyId(command); BlockingRunnable runnable = createDefaultRunnable(command, reply, commandTopologyId, TopologyMode.READY_TX_DATA, order.preserveOrder()); remoteCommandsExecutor.execute(runnable); } else { createDefaultRunnable(command, reply, extractCommandTopologyId(command), TopologyMode.WAIT_TX_DATA, order.preserveOrder()).run(); } }
Source:
<code>public Capabilities getCapabilities(WebDriverConfiguration configuration, boolean performValidations) { DesiredCapabilities capabilities = new DesiredCapabilities(configuration.getCapabilities()); String binary = (String) capabilities.getCapability("chrome.binary"); new ChromeDriverBinaryHandler(capabilities).checkAndSetBinary(performValidations); ChromeOptions chromeOptions = new ChromeOptions(); <START> if (capabilities.getBrowserName().equals("chromeHeadless")) { <END> chromeOptions.addArguments("--headless"); } CapabilitiesOptionsMapper.mapCapabilities(chromeOptions, capabilities, BROWSER_CAPABILITIES); if (Validate.nonEmpty(binary)) { if (performValidations) { Validate.isExecutable(binary, "Chrome binary must point to an executable file, " + binary); } chromeOptions.setBinary(binary); } capabilities.setCapability(ChromeOptions.CAPABILITY, chromeOptions); String printChromeOptions = (String) capabilities.getCapability(CHROME_PRINT_OPTIONS); if (Validate.nonEmpty(printChromeOptions) && Boolean.valueOf(printChromeOptions.trim())) { try { StringBuffer chromeOptionsLog = new StringBuffer("\n"); chromeOptionsLog.append("======== Chrome options =========").append("\n"); chromeOptionsLog.append(chromeOptions.toJson().toString()).append("\n"); chromeOptionsLog.append("===== End of Chrome options ====="); log.info(chromeOptionsLog.toString()); } catch (IOException e) { log.warning("Something bad happened during printing chrome options: "); log.warning(e.getMessage()); } } return capabilities; }</code><technical_language>Drone configuration is case sensitive chromeheadless is valid</technical_language>

Target:
public Capabilities getCapabilities(WebDriverConfiguration configuration, boolean performValidations) { DesiredCapabilities capabilities = new DesiredCapabilities(configuration.getCapabilities()); String binary = (String) capabilities.getCapability("chrome.binary"); new ChromeDriverBinaryHandler(capabilities).checkAndSetBinary(performValidations); if (Validate.nonEmpty(binary)) { if (performValidations) { Validate.isExecutable(binary, "Chrome binary must point to an executable file, " + binary); } } setChromeOptions(configuration, capabilities); return capabilities; }
Source:
<code>public synchronized String createNonce(Repository repo, long timestamp) throws IllegalStateException { String path; if (repo instanceof DfsRepository) path = ((DfsRepository) repo).getDescription().getRepositoryName(); else if (repo.getDirectory() != null) path = repo.getDirectory().getPath(); else throw new IllegalStateException(); String input = path + ":" + String.valueOf(timestamp); byte[] rawHmac; try { rawHmac = mac.doFinal(input.getBytes("UTF-8")); } catch (UnsupportedEncodingException e) { throw new IllegalStateException(e); } <START> return String.format("%d-%s", Long.valueOf(timestamp), toHex(rawHmac)); END> }</code><technical_language>Optional: a StringBuilder avoid String.format entirely, pass StringBuilder argument toHex</technical_language>

Target:
public synchronized String createNonce(Repository repo, long timestamp) throws IllegalStateException { String path; if (repo instanceof DfsRepository) path = ((DfsRepository) repo).getDescription().getRepositoryName(); else if (repo.getDirectory() != null) path = repo.getDirectory().getPath(); else throw new IllegalStateException(); String input = path + ":" + String.valueOf(timestamp); byte[] rawHmac; try { rawHmac = mac.doFinal(input.getBytes("UTF-8")); } catch (UnsupportedEncodingException e) { throw new IllegalStateException(e); } return Long.toString(timestamp) + "-" + toHex(rawHmac); }
Source:
<code>static public Class<? extends Type> toTypeClass(String dptId) { Class<? extends Type> ohClass = dptTypeMap.get(dptId); if (ohClass == null) { int mainNumber = getMainNumber(dptId); if (mainNumber == -1) { <START> logger.debug("toType: couldn't convert dptID toTypeClass: {}.", dptId); <END> return null; } ohClass = dptMainTypeMap.get(mainNumber); } return ohClass; }</code><technical_language>This confusing if I in output. expect end a 'TypeClass' value, a 'dptID'</technical_language>

Target:
public Class<? extends Type> toTypeClass(String dptId) { Class<? extends Type> ohClass = dptTypeMap.get(dptId); if (ohClass == null) { int mainNumber = getMainNumber(dptId); if (mainNumber == -1) { logger.debug("Couldn't convert KNX datapoint type id into openHAB type class for dptId: {}.", dptId); return null; } ohClass = dptMainTypeMap.get(mainNumber); } return ohClass; }
Source:
<code>public void onError(Throwable t) { String errorFormat = getString(R.string.error_format); <START> String PREFIX = "OldJobError"; <END> if(t instanceof ParseException) { ParseException e = (ParseException) t; if (e.getCode() == ParseException.OBJECT_NOT_FOUND) { Log.e(PREFIX, "No results found for query...ignoring."); return; } } Log.e(PREFIX, getLocalClassName(), t); showMessage(String.format(errorFormat, t.getLocalizedMessage())); if (t instanceof IllegalStateException) { refreshState(); } }</code><technical_language>I assume meant OddJobError? name this ParseError more descriptive for error type</technical_language>

Target:
public void onError(Throwable t) { String errorFormat = getString(R.string.error_format); String PREFIX = "OddJobError"; if(t instanceof ParseException) { ParseException e = (ParseException) t; if (e.getCode() == ParseException.OBJECT_NOT_FOUND) { Log.e(PREFIX, "No results found for query...ignoring."); return; } } Log.e(PREFIX, getLocalClassName(), t); showMessage(String.format(errorFormat, t.getLocalizedMessage())); if (t instanceof IllegalStateException) { refreshState(); } }
Source:
<code>public HomeModel get(ProfilePreferences profilePreferences) { this.profilePreferences = profilePreferences; final HomeModel model = new HomeModel(translationService.format(Constants.Heading), translationService.format(Constants.SubHeading), "images/product_home_bg.png"); <START> if(profilePreferences.isRulesAndPlanner()) { <END> addProfileRulesPlannerShortcuts(model); } else if(profilePreferences.isFull()) { addProfileFullShortcuts(model); } return model; }</code><technical_language>Formatting issue (missing space if) multiple times in this PR (ctrl+f "if(" )</technical_language>

Target:
public HomeModel get(ProfilePreferences profilePreferences) { this.profilePreferences = profilePreferences; HomeModel model = new HomeModel(translationService.format(Constants.Heading), translationService.format(Constants.SubHeading), "images/product_home_bg.png"); switch (profilePreferences.getProfile()) { case FULL: addProfileFullShortcuts(model); break; case PLANNER_AND_RULES: model = new HomeModel(translationService.format(Constants.HeadingDecisionManager), translationService.format(Constants.SubHeadingDecisionManager), "images/product_home_bg.png"); addProfileRulesPlannerShortcuts(model); break; } return model; }
Source:
<code>RequestStatus getStatus() { FreenetURI finalURI = getFinalURI(); InsertExceptionMode failureCode = null; String failureReasonShort = null; String failureReasonLong = null; if(putFailedMessage != null) { failureCode = putFailedMessage.code; failureReasonShort = putFailedMessage.getShortFailedMessage(); failureReasonShort = putFailedMessage.getLongFailedMessage(); } int total=0, min=0, fetched=0, fatal=0, failed=0; <START> Date latestSuccess = CurrentTimeUTC.get(), latestFailure = null; <END> boolean totalFinalized = false; if(progressMessage != null) { if(progressMessage instanceof SimpleProgressMessage) { SimpleProgressMessage msg = (SimpleProgressMessage)progressMessage; total = (int) msg.getTotalBlocks(); min = (int) msg.getMinBlocks(); fetched = (int) msg.getFetchedBlocks(); latestSuccess = msg.getLatestSuccess(); fatal = (int) msg.getFatalyFailedBlocks(); failed = (int) msg.getFailedBlocks(); latestFailure = msg.getLatestFailure(); totalFinalized = msg.isTotalFinalized(); } } return new UploadDirRequestStatus( identifier, persistence, started, finished, succeeded, total, min, fetched, latestSuccess, fatal, failed, latestFailure, totalFinalized, priorityClass, finalURI, uri, failureCode, failureReasonShort, failureReasonLong, totalSize, numberOfFiles); }</code><technical_language>Multiple declarations too</technical_language>

Target:
RequestStatus getStatus() { FreenetURI finalURI = getFinalURI(); InsertExceptionMode failureCode = null; String failureReasonShort = null; String failureReasonLong = null; if(putFailedMessage != null) { failureCode = putFailedMessage.code; failureReasonShort = putFailedMessage.getShortFailedMessage(); failureReasonShort = putFailedMessage.getLongFailedMessage(); } int total=0, min=0, fetched=0, fatal=0, failed=0; Date latestSuccess = CurrentTimeUTC.get(); Date latestFailure = null; boolean totalFinalized = false; if(progressMessage != null) { if(progressMessage instanceof SimpleProgressMessage) { SimpleProgressMessage msg = (SimpleProgressMessage)progressMessage; total = (int) msg.getTotalBlocks(); min = (int) msg.getMinBlocks(); fetched = (int) msg.getFetchedBlocks(); latestSuccess = msg.getLatestSuccess(); fatal = (int) msg.getFatalyFailedBlocks(); failed = (int) msg.getFailedBlocks(); latestFailure = msg.getLatestFailure(); totalFinalized = msg.isTotalFinalized(); } } return new UploadDirRequestStatus( identifier, persistence, started, finished, succeeded, total, min, fetched, latestSuccess, fatal, failed, latestFailure, totalFinalized, priorityClass, finalURI, uri, failureCode, failureReasonShort, failureReasonLong, totalSize, numberOfFiles); }
Source:
<code>public static ProxySelector createProxySelector(ProxyConfiguration proxyConfig) { switch (proxyConfig.type()) { case DIRECT: return fixedProxySelectorFor(Proxy.NO_PROXY); case FROM_ENVIRONMENT: String defaultEnvProxy = System.getenv(ENV_HTTPS_PROXY); <START> Preconditions.checkNotNull( <END> defaultEnvProxy, "Missing environment variable", SafeArg.of("name", ENV_HTTPS_PROXY)); HostAndPort defaultHostAndPort = HostAndPort.fromString(defaultEnvProxy); InetSocketAddress address = new InetSocketAddress(defaultHostAndPort.getHost(), defaultHostAndPort.getPort()); return fixedProxySelectorFor(new Proxy(Proxy.Type.HTTP, address)); case HTTP: HostAndPort hostAndPort = HostAndPort.fromString(proxyConfig .hostAndPort() .orElseThrow(() -> new SafeIllegalArgumentException( "Expected to find proxy hostAndPort configuration for HTTP proxy"))); InetSocketAddress addr = new InetSocketAddress(hostAndPort.getHost(), hostAndPort.getPort()); return fixedProxySelectorFor(new Proxy(Proxy.Type.HTTP, addr)); case MESH: return ProxySelector.getDefault(); default: } throw new IllegalStateException("Failed to create ProxySelector for proxy configuration: " + proxyConfig); }</code><technical_language>Put this line String defaultEnvProxy = Preconditions.checkNotNull..</technical_language>

Target:
public static ProxySelector createProxySelector(ProxyConfiguration proxyConfig) { switch (proxyConfig.type()) { case DIRECT: return fixedProxySelectorFor(Proxy.NO_PROXY); case FROM_ENVIRONMENT: String defaultEnvProxy = Preconditions.checkNotNull( System.getenv(ENV_HTTPS_PROXY), "Missing environment variable", SafeArg.of("name", ENV_HTTPS_PROXY)); HostAndPort defaultHostAndPort = HostAndPort.fromString(defaultEnvProxy); InetSocketAddress address = new InetSocketAddress(defaultHostAndPort.getHost(), defaultHostAndPort.getPort()); return fixedProxySelectorFor(new Proxy(Proxy.Type.HTTP, address)); case HTTP: HostAndPort hostAndPort = HostAndPort.fromString(proxyConfig .hostAndPort() .orElseThrow(() -> new SafeIllegalArgumentException( "Expected to find proxy hostAndPort configuration for HTTP proxy"))); InetSocketAddress addr = new InetSocketAddress(hostAndPort.getHost(), hostAndPort.getPort()); return fixedProxySelectorFor(new Proxy(Proxy.Type.HTTP, addr)); case MESH: return ProxySelector.getDefault(); default: } throw new IllegalStateException("Failed to create ProxySelector for proxy configuration: " + proxyConfig); }
Source:
<code>public void evaluate() throws Throwable { try ( CompatibilityOverride co = new CompatibilityOverride(config); PlatformCompatOverride pco = new <START> PlatformCompatOverride(hostOnly, config) <END> ) { testStatement.evaluate(); } }</code><technical_language>do work in ctor. create instance config, call init(hostOnly) later</technical_language>

Target:
public void evaluate() throws Throwable { try ( CompatibilityOverride co = new CompatibilityOverride(config); PlatformCompatOverride pco = new PlatformCompatOverride(config); ) { co.init(); pco.init(testType); testStatement.evaluate(); } }
Source:
<code><START> private View.OnClickListener getClickListener(final ConfigurationItem item) { <END> return new View.OnClickListener() { @Override public void onClick(View view) { FragmentManager fm = getFragmentManager(); if (fm != null && !fm.isStateSaved()) { switch (item) { case ZOOM_LEVELS: InputZoomLevelsBottomSheet.showInstance( fm, EditMapSourceDialogFragment.this, R.string.map_source_zoom_levels, R.string.map_source_zoom_levels_descr, minZoom, maxZoom ); break; case EXPIRE_TIME: ExpireTimeBottomSheet.showInstance(fm, EditMapSourceDialogFragment.this, expireTimeMinutes); break; case MERCATOR_PROJECTION: MercatorProjectionBottomSheet.showInstance(fm, EditMapSourceDialogFragment.this, elliptic); break; case STORAGE_FORMAT: TileStorageFormatBottomSheet.showInstance(fm, EditMapSourceDialogFragment.this, sqliteDB); break; } } } }; }</code><technical_language>Import View</technical_language>

Target:
private OnClickListener getClickListener(final ConfigurationItem item) { return new View.OnClickListener() { @Override public void onClick(View view) { FragmentManager fm = getFragmentManager(); if (fm != null && !fm.isStateSaved()) { switch (item) { case ZOOM_LEVELS: InputZoomLevelsBottomSheet.showInstance( fm, EditMapSourceDialogFragment.this, R.string.map_source_zoom_levels, R.string.map_source_zoom_levels_descr, minZoom, maxZoom ); break; case EXPIRE_TIME: ExpireTimeBottomSheet.showInstance(fm, EditMapSourceDialogFragment.this, expireTimeMinutes); break; case MERCATOR_PROJECTION: MercatorProjectionBottomSheet.showInstance(fm, EditMapSourceDialogFragment.this, elliptic); break; case STORAGE_FORMAT: TileStorageFormatBottomSheet.showInstance(fm, EditMapSourceDialogFragment.this, sqliteDB); break; } } } }; }
Source:
<code>public boolean nameMatches(String propertyName, String sqlColumnName) { <START> return sqlColumnName.replace("_", "").toLowerCase(locale).equals(propertyName.toLowerCase(locale)); <END> }</code><technical_language>simpler (and faster) if used: return sqlColumnName.replace("_", "").equalsIgnoreCase(propertyName);</technical_language>

Target:
public boolean nameMatches(String propertyName, String sqlColumnName) { return sqlColumnName.replace("_", "").equalsIgnoreCase(propertyName); }
Source:
<code>private void addIfMatches(AppPattern appPattern, String content) { List<String> results = appPattern.findInString(content); if (results != null) { <START> System.out.println(content); <END> this.appMatch = getAppMatch(); results.forEach(appMatch::addVersion); if (LOGGER.isDebugEnabled()) { LOGGER.debug( appPattern.getType() + " matched " + appMatch.getApplication().getName()); } } }</code><technical_language>Remove</technical_language>

Target:
private void addIfMatches(AppPattern appPattern, String content) { List<String> results = appPattern.findInString(content); if (results != null) { this.appMatch = getAppMatch(); results.forEach(appMatch::addVersion); if (LOGGER.isDebugEnabled()) { LOGGER.debug( appPattern.getType() + " matched " + appMatch.getApplication().getName()); } } }
Source:
<code>public NatMicroserviceClient(String microserviceUri, JcloudsLocation loc) { <START> String tenantAndIdentity = checkNotNull(loc.getIdentity(), "identity"); <END> this.microserviceUri = checkNotNull(microserviceUri, "microserviceUri"); endpoint = NatDirectClient.transformEndpoint(loc.getEndpoint(), Iterables.get(Splitter.on("@").split(tenantAndIdentity), 1)); this.identity = Iterables.get(Splitter.on("@").split(tenantAndIdentity), 0); this.credential = checkNotNull(loc.getCredential(), "credential"); }</code><technical_language>Is tenant terminology in vcloud director? I thought vOrg vDC. (Looking for educate that, sure!) I thought user@vDC@vOrg, expecting "@" here. if username contains "@". it? e-mail address</technical_language>

Target:
public NatMicroserviceClient(String microserviceUri, JcloudsLocation loc) { String identityAtVOrg = checkNotNull(loc.getIdentity(), "identity"); checkArgument(identityAtVOrg.contains("@")); String vOrg = identityAtVOrg.substring(identityAtVOrg.lastIndexOf("@") + 1); String identity = identityAtVOrg.substring(0, identityAtVOrg.lastIndexOf("@")); this.microserviceUri = checkNotNull(microserviceUri, "microserviceUri"); endpoint = NatDirectClient.transformEndpoint(loc.getEndpoint(), vOrg); this.identity = identity; this.credential = checkNotNull(loc.getCredential(), "credential"); }
Source:
<code>private void run() { try { enforceAttemptTTLs(); } catch (Throwable t) { <START> logger.error("Uncaught exception", t); <END> } try { enforceTaskTTLs(); } catch (Throwable t) { logger.error("Uncaught exception", t); } }</code><technical_language>including Loop retried in message (like WorkflowExecutorLoop's Uncaught error executing workflow state machine. Ignoring. Loop retried.) shocked server shows this message</technical_language>

Target:
private void run() { try { enforceAttemptTTLs(); } catch (Throwable t) { logger.error("Uncaught exception when enforcing attempt TTLs. Ignoring. Loop will be retried.", t); } try { enforceTaskTTLs(); } catch (Throwable t) { logger.error("Uncaught exception when enforcing task TTLs. Ignoring. Loop will be retried.", t); } }
Source:
<code>public ByteBuf readLineBuf(AtomicInteger reads) throws IOException { int readBytes = 0; int newlineLength = 0; int readable; this.startIndex = buffer.readerIndex(); loop: while (true) { readable = buffer.readableBytes(); if (readable <= 0) { buffer.readerIndex(this.startIndex); fillBuffer(); if (!buffer.isReadable() && buffer.writerIndex() == 0) { reads.set(0); return null; } else { if (processor.isPrevCharCR() && buffer.getByte(buffer.readerIndex()) == LineSplitProcessor.LF) { buffer.skipBytes(1); if(eof && !buffer.isReadable()) { reads.set(1); return null; } newlineLength++; readBytes++; startIndex = buffer.readerIndex(); } } readable = buffer.readableBytes(); } int endIndex = buffer.forEachByte(buffer.readerIndex(), readable, processor); if (endIndex < 0) { buffer.readerIndex(buffer.writerIndex()); if(eof){ readBytes += (buffer.readerIndex() - startIndex); break loop; } } else { buffer.readerIndex(endIndex + 1); readBytes += (buffer.readerIndex() - startIndex); if (processor.isPrevCharCR() && buffer.isReadable() && buffer.getByte(buffer.readerIndex()) == LineSplitProcessor.LF) { buffer.skipBytes(1); readBytes++; newlineLength += 2; } else { newlineLength += 1; } break loop; } } reads.set(readBytes); <START> return buffer.slice(startIndex, readBytes - newlineLength).retain(); <END> }</code><technical_language>This buffer is shared closing ByteBufLineReader. if want sliced buffer, copy new buffer</technical_language>

Target:
public ByteBuf readLineBuf(AtomicInteger reads) throws IOException { int readBytes = 0; int newlineLength = 0; int readable; this.startIndex = buffer.readerIndex(); loop: while (true) { readable = buffer.readableBytes(); if (readable <= 0) { buffer.readerIndex(this.startIndex); fillBuffer(); if (!buffer.isReadable() && buffer.writerIndex() == 0) { reads.set(0); return null; } else { if (processor.isPrevCharCR() && buffer.getByte(buffer.readerIndex()) == LineSplitProcessor.LF) { buffer.skipBytes(1); if(eof && !buffer.isReadable()) { reads.set(1); return null; } newlineLength++; readBytes++; startIndex = buffer.readerIndex(); } } readable = buffer.readableBytes(); } int endIndex = buffer.forEachByte(buffer.readerIndex(), readable, processor); if (endIndex < 0) { buffer.readerIndex(buffer.writerIndex()); if(eof){ readBytes += (buffer.readerIndex() - startIndex); break loop; } } else { buffer.readerIndex(endIndex + 1); readBytes += (buffer.readerIndex() - startIndex); if (processor.isPrevCharCR() && buffer.isReadable() && buffer.getByte(buffer.readerIndex()) == LineSplitProcessor.LF) { buffer.skipBytes(1); readBytes++; newlineLength += 2; } else { newlineLength += 1; } break loop; } } reads.set(readBytes); return buffer.slice(startIndex, readBytes - newlineLength); }
Source:
<code>public Multimap<String, NotificationChannel> findSubscribedRecipientsForDispatcher(NotificationDispatcher dispatcher, String projectUuid) { <START> checkArgument(projectUuid != null, "ProjectUUID is mandatory"); <END> String dispatcherKey = dispatcher.getKey(); SetMultimap<String, NotificationChannel> recipients = HashMultimap.create(); for (NotificationChannel channel : notificationChannels) { String channelKey = channel.getKey(); List<String> subscribedUsers = dbClient.propertiesDao().findUsersForNotification(dispatcherKey, channelKey, projectUuid); try (DbSession dbSession = dbClient.openSession(false)) { Set<String> filteredSubscribedUsers = dbClient.authorizationDao().keepAuthorizedLoginsOnProject(dbSession, subscribedUsers, projectUuid, UserRole.USER); addUsersToRecipientListForChannel(filteredSubscribedUsers, recipients, channel); } } return recipients; }</code><technical_language>Objects.requireNonNull check nulls, throws NPE throwing IllegalArgumentException</technical_language>

Target:
public Multimap<String, NotificationChannel> findSubscribedRecipientsForDispatcher(NotificationDispatcher dispatcher, String projectUuid) { requireNonNull(projectUuid, "ProjectUUID is mandatory"); String dispatcherKey = dispatcher.getKey(); SetMultimap<String, NotificationChannel> recipients = HashMultimap.create(); for (NotificationChannel channel : notificationChannels) { String channelKey = channel.getKey(); Set<String> subscribedUsers = dbClient.propertiesDao().findUsersForNotification(dispatcherKey, channelKey, projectUuid); if (!subscribedUsers.isEmpty()) { try (DbSession dbSession = dbClient.openSession(false)) { Set<String> filteredSubscribedUsers = dbClient.authorizationDao().keepAuthorizedLoginsOnProject(dbSession, subscribedUsers, projectUuid, UserRole.USER); addUsersToRecipientListForChannel(filteredSubscribedUsers, recipients, channel); } } } return recipients; }
Source:
<code>public List<Cookie> getCookieInHeaders(String url) { <START> return stringToCookie(cookieInHeaders,url); <END> }</code><technical_language>Missing space ,</technical_language>

Target:
public List<Cookie> getCookieInHeaders(String url) { return Collections.unmodifiableList(stringToCookie(cookieInHeaders, url)); }
Source:
<code>public TypeEditorViewModel(Field field, SuggestionProvider<?> suggestionProvider, FieldCheckers fieldCheckers) { super(field, suggestionProvider, fieldCheckers); itemMap.put("mathesis", Localization.lang("Master's thesis")); itemMap.put("phdthesis", Localization.lang("PhD thesis")); itemMap.put("candthesis", Localization.lang("Candidate thesis")); itemMap.put("techreport", Localization.lang("Technical report")); itemMap.put("resreport", Localization.lang("Research report")); itemMap.put("software", Localization.lang("Software")); itemMap.put("datacd", Localization.lang("Data CD")); itemMap.put("audiocd", Localization.lang("Audio CD")); <START> itemMap.put("inproceedings", Localization.lang("InProceedings")); <END> }</code><technical_language>need add here. This class is for field type in entry editor, predefined values for this field</technical_language>

Target:
public TypeEditorViewModel(Field field, SuggestionProvider<?> suggestionProvider, FieldCheckers fieldCheckers) { super(field, suggestionProvider, fieldCheckers); itemMap.put("mathesis", Localization.lang("Master's thesis")); itemMap.put("phdthesis", Localization.lang("PhD thesis")); itemMap.put("candthesis", Localization.lang("Candidate thesis")); itemMap.put("techreport", Localization.lang("Technical report")); itemMap.put("resreport", Localization.lang("Research report")); itemMap.put("software", Localization.lang("Software")); itemMap.put("datacd", Localization.lang("Data CD")); itemMap.put("audiocd", Localization.lang("Audio CD")); }
Source:
<code>public static <T> Stream<T> stream(Optional<T> optional) { <START> if (optional.isPresent()) { <END> return Stream.of(optional.get()); } else { return Stream.empty(); } }</code><technical_language>return optional.isPresent() ? Stream.of(optional.get()) : Stream.empty();</technical_language>

Target:
public static <T> Stream<T> stream(Optional<T> optional) { return optional.isPresent() ? Stream.of(optional.get()) : Stream.empty(); }
Source:
<code>public boolean isInterpolated() { <START> return index != null && indexInterpolated != null && !index.equals(indexInterpolated); <END> }</code><technical_language>circumstances (given validation do) index.equals(indexInterpolated) true</technical_language>

Target:
public boolean isInterpolated() { return index != null && indexInterpolated != null; }
Source:
<code>public void get(@SpringBean PageModel pageModel, @RequestParam(value = "breadcrumbOverride",required = false) String breadcrumbOverride, @RequestParam("patientId") String patientId) { PatientService patientService = Context.getPatientService(); String conceptId = Context.getAdministrationService().getGlobalProperty("concept.causeOfDeath"); Patient patient = patientService.getPatientByUuid(patientId); <START> pageModel.put("person", patient.getPerson()); <END> pageModel.put("birthDate",patient.getBirthdate()); pageModel.put("patient", patient); pageModel.put("patientId", patientId); pageModel.put("breadcrumbOverride", breadcrumbOverride); if (conceptId != null && !conceptId.contains("[a-zA-Z]+")) { pageModel.put("conceptAnswers", getConceptAnswerByConcept(Integer.parseInt(conceptId))); } }</code><technical_language>@slubwama put a person int page model a patient, get a person patient</technical_language>

Target:
public void get(@SpringBean PageModel pageModel, @RequestParam(value = "breadcrumbOverride", required = false) String breadcrumbOverride, @RequestParam("patientId") String patientId) { PatientService patientService = Context.getPatientService(); String conceptId = Context.getAdministrationService().getGlobalProperty("concept.causeOfDeath"); Patient patient = patientService.getPatientByUuid(patientId); pageModel.put("birthDate", patient.getBirthdate()); pageModel.put("patient", patient); pageModel.put("patientId", patientId); pageModel.put("breadcrumbOverride", breadcrumbOverride); if (conceptId != null && !conceptId.contains("[a-zA-Z]+")) { pageModel.put("conceptAnswers", getConceptAnswerByConcept(Integer.parseInt(conceptId))); } }
Source:
<code>public void visitAssignmentExpression(AssignmentExpressionTree tree) { if (tree.variable().is(Tree.Kind.IDENTIFIER)) { IdentifierTree variable = (IdentifierTree) tree.variable(); <START> JavaSymbol symbol = (JavaSymbol) variable.symbol(); <END> String nonNullAnnotation = nonNullAnnotation(symbol); if (nonNullAnnotation != null) { List<SymbolicValue> values = programState.peekValues(2); SymbolicValue assignedValue = values.get(1); Constraint constraint = programState.getConstraint(assignedValue); if (constraint != null && constraint.isNull()) { reportIssue(tree, "\"{0}\" is marked \"{1}\" but is set to null.", symbol.name(), nonNullAnnotation); } } } }</code><technical_language>need JavaSymbol</technical_language>

Target:
public void visitAssignmentExpression(AssignmentExpressionTree tree) { if (tree.variable().is(Tree.Kind.IDENTIFIER)) { IdentifierTree variable = (IdentifierTree) tree.variable(); Symbol symbol = variable.symbol(); String nonNullAnnotation = nonNullAnnotation(symbol); if (nonNullAnnotation != null) { List<SymbolicValue> values = programState.peekValues(2); SymbolicValue assignedValue = values.get(1); Constraint constraint = programState.getConstraint(assignedValue); if (constraint != null && constraint.isNull()) { reportIssue(tree, "\"{0}\" is marked \"{1}\" but is set to null.", symbol.name(), nonNullAnnotation); } } } }
Source:
<code>protected void testAccessControl_testStudentAccess_shouldPass() { StudentAttributes student1InCourse1 = typicalBundle.students.get("student1InCourse1"); String[] submissionParams = new String[] { Const.ParamsNames.COURSE_ID, student1InCourse1.getCourse(), Const.ParamsNames.ENTITY_TYPE, Const.EntityType.STUDENT, }; verifyAccessibleForStudentsOfTheSameCourse(submissionParams); verifyInaccessibleWithoutLogin(submissionParams); verifyInaccessibleForUnregisteredUsers(submissionParams); verifyInaccessibleForInstructors(submissionParams); <START> } <END></code><technical_language>change verifyAccessibleForAdmin</technical_language>

Target:
protected void testAccessControl_testStudentAccess_shouldPass() { StudentAttributes student1InCourse1 = typicalBundle.students.get("student1InCourse1"); String[] submissionParams = new String[] { Const.ParamsNames.COURSE_ID, student1InCourse1.getCourse(), Const.ParamsNames.ENTITY_TYPE, Const.EntityType.STUDENT, }; verifyAccessibleForStudentsOfTheSameCourse(submissionParams); verifyAccessibleForAdmin(submissionParams); verifyInaccessibleWithoutLogin(submissionParams); verifyInaccessibleForUnregisteredUsers(submissionParams); verifyInaccessibleForInstructors(submissionParams); }
Source:
<code>public void areMoreMessagesAvailable_withIndexOf1_shouldReturnFalseWithoutPerformingSearch() throws Exception { ImapFolder folder = createFolder("Folder"); prepareImapFolderForOpen(OPEN_MODE_RW); folder.open(OPEN_MODE_RW); boolean result = folder.areMoreMessagesAvailable(1, null); verify(imapConnection, times(1)).executeSimpleCommand(anyString()); <START> assertFalse(result); <END> }</code><technical_language>assertFalse(folder.areMoreMessagesAvailable(1, null))</technical_language>

Target:
public void areMoreMessagesAvailable_withIndexOf1_shouldReturnFalseWithoutPerformingSearch() throws Exception { ImapFolder folder = createFolder("Folder"); prepareImapFolderForOpen(OPEN_MODE_RW); folder.open(OPEN_MODE_RW); assertFalse(folder.areMoreMessagesAvailable(1, null)); verify(imapConnection, times(1)).executeSimpleCommand(anyString()); }
Source:
<code>boolean setErrorFor(final SObjectNode node, final String referenceId, final List<RestError> errors) { <START> final org.apache.camel.component.salesforce.api.dto.Attributes attributes = <END> node.getObject().getAttributes(); final String attributesReferenceId = attributes.getReferenceId(); if (Objects.equals(attributesReferenceId, referenceId)) { node.setErrors(errors); return true; } return StreamSupport.stream(node.getChildNodes().spliterator(), false) .anyMatch(n -> setErrorFor(n, referenceId, errors)); }</code><technical_language>Nitpicking: suggestion final Attributes attributes =</technical_language>

Target:
boolean setErrorFor(final SObjectNode node, final String referenceId, final List<RestError> errors) { final Attributes attributes = node.getObject().getAttributes(); final String attributesReferenceId = attributes.getReferenceId(); if (Objects.equals(attributesReferenceId, referenceId)) { node.setErrors(errors); return true; } return StreamSupport.stream(node.getChildNodes().spliterator(), false) .anyMatch(n -> setErrorFor(n, referenceId, errors)); }
Source:
<code>public void run() { if (isDisposing) { return; } if (validationIcon == null || validationIcon.isDisposed()) { return; } if (getVElement().getDiagnostic() == null) { return; } final VTableDomainModelReference tableDMR = (VTableDomainModelReference) getVElement() .getDomainModelReference(); Optional<Setting> setting; if (tableDMR.getDomainModelReference() != null) { setting = getSettingFromObservable(tableDMR.getDomainModelReference(), getViewModelContext().getDomainModel()); } else { setting = getSettingFromObservable(tableDMR, getViewModelContext().getDomainModel()); } <START> if (!setting.isPresent()) { <END> return; } validationIcon.setImage(getValidationIcon(getVElement().getDiagnostic().getHighestSeverity())); showValidationSummaryTooltip(setting.get(), showValidationSummaryTooltip); final Collection<?> collection = (Collection<?>) setting.get().get(true); if (!collection.isEmpty()) { for (final Object object : collection) { getTableViewer().update(object, null); } } }</code><technical_language>this line is gone, why</technical_language>

Target:
public void run() { if (isDisposing) { return; } if (validationIcon == null || validationIcon.isDisposed()) { return; } if (getVElement().getDiagnostic() == null) { return; } final TableConfiguration tableConfiguration = customization.getTableConfiguration(); final Setting setting = tableConfiguration.getContext().getSetting(); validationIcon.setImage(getValidationIcon(getVElement().getDiagnostic().getHighestSeverity())); showValidationSummaryTooltip(setting, showValidationSummaryTooltip); final Collection<?> collection = (Collection<?>) setting.get(true); if (!collection.isEmpty()) { for (final Object object : collection) { getTableViewer().update(object, null); } } }
Source:
<code>List<String> getJsFiles() throws IOException { final Set<String> allJsInputs = Sets.newLinkedHashSet(); List<String> patterns = Lists.newArrayList(); patterns.addAll(js); patterns.addAll(arguments); for (String pattern : patterns) { <START> if (pattern.indexOf("*") == -1 && pattern.indexOf("!") != 0) { <END> allJsInputs.add(pattern); } else { FileSystem fs = FileSystems.getDefault(); final boolean remove = pattern.indexOf("!") == 0; if (remove) pattern = pattern.substring(1); final PathMatcher matcher = fs.getPathMatcher("glob:" + pattern); java.nio.file.Files.walkFileTree( fs.getPath("."), new SimpleFileVisitor<Path>() { @Override public FileVisitResult visitFile( Path p, BasicFileAttributes attrs) { if (matcher.matches(p)) { if (remove) { allJsInputs.remove(p.toString()); } else { allJsInputs.add(p.toString()); } } return FileVisitResult.CONTINUE; } }); } } return Lists.newArrayList(allJsInputs); }</code><technical_language>nit: I pattern.contains() for "*" case pattern.startsWith() for "!" case</technical_language>

Target:
List<String> getJsFiles() throws CmdLineException, IOException { final Set<String> allJsInputs = new LinkedHashSet<>(); List<String> patterns = new ArrayList<>(); patterns.addAll(js); patterns.addAll(arguments); for (String pattern : patterns) { if (!pattern.contains("*") && !pattern.startsWith("!")) { allJsInputs.add(pattern); } else { FileSystem fs = FileSystems.getDefault(); final boolean remove = pattern.indexOf("!") == 0; if (remove) pattern = pattern.substring(1); final PathMatcher matcher = fs.getPathMatcher("glob:" + pattern); java.nio.file.Files.walkFileTree( fs.getPath("."), new SimpleFileVisitor<Path>() { @Override public FileVisitResult visitFile( Path p, BasicFileAttributes attrs) { if (matcher.matches(p)) { if (remove) { allJsInputs.remove(p.toString()); } else { allJsInputs.add(p.toString()); } } return FileVisitResult.CONTINUE; } }); } } if (!patterns.isEmpty() && allJsInputs.isEmpty()) { throw new CmdLineException("No inputs matched"); } return new ArrayList<>(allJsInputs); }
Source:
<code>BackgroundDeleter() throws IOException { super("backgroundDeleter"); <START> super.putManager.close(); <END> }</code><technical_language>minor: do need super qualifier here</technical_language>

Target:
BackgroundDeleter() throws IOException { super("backgroundDeleter"); putManager.close(); }