auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public DDF transformScaleMinMax(List<String> columns, Boolean inPlace) throws DDFException { Summary[] summaryArr = this.getDDF().getSummary(); StringBuilder sqlCmdBuffer = new StringBuilder("SELECT "); for (int colIndex = 0; colIndex < this.getDDF().getSchema().getNumColumns(); colIndex++) { Column col = this.getDDF().getSchema().getColumn(colIndex); <START> if (!col.isNumeric() || col.getColumnClass() == ColumnClass.FACTOR <END> || ((columns != null) && (!columns.isEmpty()) && (!columns.contains(col.getName()))) ) { sqlCmdBuffer.append(col.getName()).append(","); } else { if (summaryArr[colIndex] == null) { LOG.warn("Missing column summary. transformScaleMinMax ignored for column: " + col.getName()); sqlCmdBuffer.append(col.getName()).append(" "); } else if (Double.compare(summaryArr[colIndex].max(), summaryArr[colIndex].min()) == 0) { LOG.warn("max equals min. transformScaleMinMax ignored for column: " + col.getName()); sqlCmdBuffer.append(col.getName()).append(" "); } else { sqlCmdBuffer.append(String.format("((%s - %s) / %s) as %s ", col.getName(), summaryArr[colIndex].min(), (summaryArr[colIndex].max() - summaryArr[colIndex].min()), col.getName())); } sqlCmdBuffer.append(","); } } sqlCmdBuffer.setLength(sqlCmdBuffer.length() - 1); sqlCmdBuffer.append(" FROM ").append(this.getDDF().getTableName()); DDF newddf = this.getManager().sql2ddf(sqlCmdBuffer.toString(), this.getEngine()); newddf.getMetaDataHandler().copyFactor(this.getDDF()); return inPlace ? this.getDDF().updateInplace(newddf) : newddf; }</code><technical_language>this check a private method, dunno here.</technical_language>

Target:
public DDF transformScaleMinMax(List<String> columns, Boolean inPlace) throws DDFException { Summary[] summaryArr = this.getDDF().getSummary(); Schema schema = this.getDDF().getSchema(); StringBuilder sqlCmdBuffer = new StringBuilder("SELECT "); for (int colIndex = 0; colIndex < schema.getNumColumns(); colIndex++) { Column col = schema.getColumn(colIndex); String escapedColName = StringEscapeUtils.escapeJava(col.getName()); if (!isColumnEligibleToScale(col, columns)) { sqlCmdBuffer.append(escapedColName).append(","); } else { if (summaryArr[colIndex] == null) { LOG.warn("Missing column summary. transformScaleMinMax ignored for column: " + col.getName()); sqlCmdBuffer.append(escapedColName).append(" "); } else if (Double.compare(summaryArr[colIndex].max(), summaryArr[colIndex].min()) == 0) { LOG.warn("max equals min. transformScaleMinMax ignored for column: " + col.getName()); sqlCmdBuffer.append(escapedColName).append(" "); } else { sqlCmdBuffer.append(String.format("((%s - %s) / %s) as %s ", escapedColName, summaryArr[colIndex].min(), (summaryArr[colIndex].max() - summaryArr[colIndex].min()), escapedColName)); } sqlCmdBuffer.append(","); } } sqlCmdBuffer.setLength(sqlCmdBuffer.length() - 1); sqlCmdBuffer.append(" FROM ").append(StringEscapeUtils.escapeJava(schema.getTableName())); DDF newddf = this.getManager().sql2ddf(sqlCmdBuffer.toString(), this.getEngine()); newddf.getMetaDataHandler().copyFactor(this.getDDF()); return inPlace ? this.getDDF().updateInplace(newddf) : newddf; }
Source:
<code>private QueryBuilder buildPredicate(String columnName, Domain domain, Type type) { checkArgument(domain.getType().isOrderable(), "Domain type must be orderable"); BoolQueryBuilder boolQueryBuilder = new BoolQueryBuilder(); <START> if (domain.getValues().isNone() && domain.isNullAllowed()) { <END> boolQueryBuilder.mustNot(new ExistsQueryBuilder(columnName)); return boolQueryBuilder; } if (domain.getValues().isAll()) { boolQueryBuilder.must(new ExistsQueryBuilder(columnName)); return boolQueryBuilder; } return buildTermQuery(boolQueryBuilder, columnName, domain, type); }</code><technical_language>if (domain.getValues().isNone() && !domain.isNullAllowed())? This happen, do like: if (domain.getValues().isNone()) { verify(domain.isNullAllowed());</technical_language>

Target:
private QueryBuilder buildPredicate(String columnName, Domain domain, Type type) { checkArgument(domain.getType().isOrderable(), "Domain type must be orderable"); BoolQueryBuilder boolQueryBuilder = new BoolQueryBuilder(); if (domain.getValues().isNone()) { boolQueryBuilder.mustNot(new ExistsQueryBuilder(columnName)); return boolQueryBuilder; } if (domain.getValues().isAll()) { boolQueryBuilder.must(new ExistsQueryBuilder(columnName)); return boolQueryBuilder; } return buildTermQuery(boolQueryBuilder, columnName, domain, type); }
Source:
<code>public int hashCode() { <START> int result = EqualityUtils.hashCodeOf(_segmentsFrom); result = EqualityUtils.hashCodeOf(result, _segmentsTo); result = EqualityUtils.hashCodeOf(result, _state); result = EqualityUtils.hashCodeOf(result, _timestamp); return result; <END> }</code><technical_language>suggestion return Objects.hash(_segmentsFrom, _segmentsTo, _state, _timestamp);</technical_language>

Target:
public int hashCode() { return Objects.hash(_segmentsFrom, _segmentsTo, _state, _timestamp); }
Source:
<code>private static String generateRandomState() { byte[] randomState = new byte[32]; <START> new SecureRandom().nextBytes(randomState); <END> return Base64.encodeBase64URLSafeString(randomState); }</code><technical_language>This exhaust entropy local server login stalls general denial of service enough entropy builds start another RNG. create SecureRandom server startup retain long term a singleton. This helps avoid depleting local high quality entropy login request. In early early days of Gerrit issues SSH users login for hours days SSH server depleting entropy connection</technical_language>

Target:
static String generateRandomState() { byte[] state = new byte[32]; randomState.nextBytes(state); return Base64.encodeBase64URLSafeString(state); }
Source:
<code>public void onSaveInstanceState(Bundle savedInstanceState) { savedInstanceState.putBoolean(CONTAINS_HERE_FUNCTION, containsHereFunction); <START> super.onSaveInstanceState(savedInstanceState); <END> }</code><technical_language>Stylistically, I prefer calls super.currentMethod ordering important, this case</technical_language>

Target:
public void onSaveInstanceState(Bundle savedInstanceState) { super.onSaveInstanceState(savedInstanceState); savedInstanceState.putBoolean(CONTAINS_HERE_FUNCTION, containsHereFunction); savedInstanceState.putBoolean(LOCATION_CHANGED_WHILE_LOADING, locationChangedWhileLoading); }
Source:
<code>public void openRemoveServiceTaskConfirmPopup(ServiceTaskSummary serviceTaskSummary) { if (serviceTaskSummary.getInstalledOn().size() > 0) { confirmPopup.show(constants.RemoveServiceTaskTitle(), constants.Ok(), constants.CanNotRemoveServiceTaskMessage() + " " + serviceTaskSummary.getName(), null); } else { <START> confirmPopup.show(constants.RemoveServiceTaskTitle(), constants.Remove(), constants.RemoveServiceTaskConfirmMessage() <END> + " " + serviceTaskSummary.getName(), () -> refreshServiceTaskList(serviceTaskSummary)); } }</code><technical_language>suggestion confirmPopup.show(constants.RemoveServiceTaskTitle(), constants.Remove(), constants.RemoveServiceTaskConfirmMessage(serviceTaskSummary.getName()), () -> refreshServiceTaskList(serviceTaskSummary));</technical_language>

Target:
public void openRemoveServiceTaskConfirmPopup(ServiceTaskSummary serviceTaskSummary) { if (serviceTaskSummary.getInstalledOn().size() > 0) { cannotRemovePopup.alert(constants.RemoveServiceTaskTitle(), constants.CanNotRemoveServiceTaskMessage(serviceTaskSummary.getName())); } else { confirmPopup.show(constants.RemoveServiceTaskTitle(), constants.RemoveServiceTaskAction(), constants.RemoveServiceTaskConfirmMessage(serviceTaskSummary.getName()), () -> refreshServiceTaskList(serviceTaskSummary)); } }
Source:
<code>public void newQos() { if (getWindow() != null) { return; } final NewQosModel<T, P> newQosModel = getNewQosModel(); setWindow(newQosModel); <START> newQosModel.getDataCenters().setItems(Arrays.asList(getEntity())); <END> newQosModel.getDataCenters().setSelectedItem(getEntity()); }</code><technical_language>this signature: 'setItems(Collection<T> value, T selectedItem)'</technical_language>

Target:
public void newQos() { if (getWindow() != null) { return; } final NewQosModel<T, P> newQosModel = getNewQosModel(); setWindow(newQosModel); newQosModel.getDataCenters().setItems(Arrays.asList(getEntity()), getEntity()); }
Source:
<code>public RequestMatcherDelegatingAccessDeniedHandler( LinkedHashMap<RequestMatcher, AccessDeniedHandler> handlers, AccessDeniedHandler defaultHandler) { Assert.notEmpty(handlers, "handlers cannot be null or empty"); Assert.notNull(defaultHandler, "defaultHandler cannot be null"); <START> this.handlers = handlers; <END> this.defaultHandler = defaultHandler; }</code><technical_language>Do a defensive copy for handlers a new instance of Map</technical_language>

Target:
public RequestMatcherDelegatingAccessDeniedHandler( LinkedHashMap<RequestMatcher, AccessDeniedHandler> handlers, AccessDeniedHandler defaultHandler) { Assert.notEmpty(handlers, "handlers cannot be null or empty"); Assert.notNull(defaultHandler, "defaultHandler cannot be null"); this.handlers = new LinkedHashMap<>(handlers); this.defaultHandler = defaultHandler; }
Source:
<code>public void bind(UserShow show) { title.setText(show.getTitle()); int p = (int) Math.min(100, ((double) show.getWatchedEpisodes()) / show.getTotalEpisodes() * 100); progress.setProgress(p); if (subscription != null && !subscription.isUnsubscribed()) { subscription.unsubscribe(); } image.setImageResource(R.drawable.tmp_placeholder); subscription = show.requestImageUrl() .observeOn(AndroidSchedulers.mainThread()) .subscribe(url -> Glide.with(getContext()) .load(url) .centerCrop() .into(image)); <START> <END> }</code><technical_language>Extra line</technical_language>

Target:
public void bind(UserShow show) { title.setText(show.getTitle()); progress.setMax(show.getTotalEpisodes()); progress.setProgress(show.getWatchedEpisodes()); if (subscription != null && !subscription.isUnsubscribed()) { subscription.unsubscribe(); } image.setImageResource(R.drawable.tmp_placeholder); subscription = show.requestImageUrl() .observeOn(AndroidSchedulers.mainThread()) .subscribe(url -> Glide.with(getContext()) .load(url) .centerCrop() .into(image)); }
Source:
<code>public static IAnswerData getAnswerData(FormEntryPrompt formEntryPrompt, String data){ if(formEntryPrompt.getDataType() == Constants.DATATYPE_CHOICE){ int index = Integer.parseInt(data); SelectChoice ans = formEntryPrompt.getSelectChoices().get(index -1); return new SelectOneData(ans.selection()); } else if(formEntryPrompt.getDataType() == Constants.DATATYPE_CHOICE_LIST){ String[] split = parseMultiSelectString(data); Vector<Selection> ret = new Vector<>(); for (String s: split){ int index = Integer.parseInt(s); Selection ans = formEntryPrompt.getSelectChoices().get(index -1).selection(); ret.add(ans); } return new SelectMultiData(ret); } else if (formEntryPrompt.getDataType() == Constants.DATATYPE_GEOPOINT){ return AnswerDataFactory.template(formEntryPrompt.getControlType(), formEntryPrompt.getDataType()).cast( <START> new UncastData(data.replace(",", " ").replace("[","").replace("]", ""))); <END> } return data.equals("") ? null : AnswerDataFactory.template(formEntryPrompt.getControlType(), formEntryPrompt.getDataType()).cast(new UncastData(data)); }</code><technical_language>data.replace(",", " ").replace("[","").replace("]", "") lift this out intermediate var helper method provide a description this string manipulation is needed</technical_language>

Target:
public static IAnswerData getAnswerData(FormEntryPrompt formEntryPrompt, String data) { int index; switch(formEntryPrompt.getDataType()){ case Constants.DATATYPE_CHOICE: index = Integer.parseInt(data); SelectChoice selectChoiceAnswer = formEntryPrompt.getSelectChoices().get(index - 1); return new SelectOneData(selectChoiceAnswer.selection()); case Constants.DATATYPE_CHOICE_LIST: String[] split = parseMultiSelectString(data); Vector<Selection> ret = new Vector<>(); for (String s : split) { index = Integer.parseInt(s); Selection selection = formEntryPrompt.getSelectChoices().get(index - 1).selection(); ret.add(selection); } return new SelectMultiData(ret); case Constants.DATATYPE_GEOPOINT: return AnswerDataFactory.template(formEntryPrompt.getControlType(), formEntryPrompt.getDataType()).cast( new UncastData(convertTouchFormsGeoPointString(data))); } return data.equals("") ? null : AnswerDataFactory.template(formEntryPrompt.getControlType(), formEntryPrompt.getDataType()).cast(new UncastData(data)); }
Source:
<code>private EmpiTransactionContext createEmpiContext(ResourceModifiedMessage theMsg) { TransactionLogMessages transactionLogMessages = TransactionLogMessages.createFromTransactionGuid(theMsg.getTransactionId()); EmpiTransactionContext.OperationType empiOperation; switch (theMsg.getOperationType()) { case CREATE: empiOperation = EmpiTransactionContext.OperationType.CREATE_RESOURCE; break; case UPDATE: empiOperation = EmpiTransactionContext.OperationType.UPDATE_RESOURCE; break; case MANUALLY_TRIGGERED: <START> empiOperation = EmpiTransactionContext.OperationType.SUBMIT_RESOURCES_TO_EMPI; <END> break; case DELETE: default: ourLog.trace("Not creating an EmpiTransactionContext for {}", theMsg.getOperationType()); throw new InvalidRequestException("We can't handle non-update/create operations in EMPI"); } return new EmpiTransactionContext(transactionLogMessages, empiOperation); }</code><technical_language>SUBMIT_RESOURCE opposed RESOURCES a name here</technical_language>

Target:
private EmpiTransactionContext createEmpiContext(ResourceModifiedMessage theMsg) { TransactionLogMessages transactionLogMessages = TransactionLogMessages.createFromTransactionGuid(theMsg.getTransactionId()); EmpiTransactionContext.OperationType empiOperation; switch (theMsg.getOperationType()) { case CREATE: empiOperation = EmpiTransactionContext.OperationType.CREATE_RESOURCE; break; case UPDATE: empiOperation = EmpiTransactionContext.OperationType.UPDATE_RESOURCE; break; case MANUALLY_TRIGGERED: empiOperation = EmpiTransactionContext.OperationType.SUBMIT_RESOURCE_TO_EMPI; break; case DELETE: default: ourLog.trace("Not creating an EmpiTransactionContext for {}", theMsg.getOperationType()); throw new InvalidRequestException("We can't handle non-update/create operations in EMPI"); } return new EmpiTransactionContext(transactionLogMessages, empiOperation); }
Source:
<code>private String getBuildKey(final AbstractBuild<?, ?> build, BuildListener listener) { String overriddenKey = (projectKey != null && projectKey.trim().length() > 0) ? projectKey : getDescriptor().getProjectKey(); if (overriddenKey != null && overriddenKey.trim().length() > 0) { PrintStream logger = listener.getLogger(); try { EnvVars environment = build.getEnvironment(listener); return StringEscapeUtils.escapeJavaScript(environment.expand(projectKey)); } catch (IOException e) { logger.println("Unable to expand commit SHA value"); e.printStackTrace(logger); <START> return null; <END> } catch (InterruptedException e) { logger.println("Unable to expand commit SHA value"); e.printStackTrace(logger); return null; } } StringBuilder key = new StringBuilder(); if (prependParentProjectKey || getDescriptor().isPrependParentProjectKey()){ if (null != build.getParent().getParent()) { key.append(build.getParent().getParent().getFullName()).append('-'); } } key.append(build.getProject().getName()); if (includeBuildNumberInKey || getDescriptor().isIncludeBuildNumberInKey()) { key.append('-').append(build.getNumber()); } key.append('-').append(Jenkins.getInstance().getRootUrl()); return StringEscapeUtils.escapeJavaScript(key.toString()); }</code><technical_language>if return null here, set null of JSON key key in line 662 above, check for a null returned this method. Instead, I propose log error message do instead project name a default key</technical_language>

Target:
private String getBuildKey(final AbstractBuild<?, ?> build, BuildListener listener) { StringBuilder key = new StringBuilder(); if (prependParentProjectKey || getDescriptor().isPrependParentProjectKey()){ if (null != build.getParent().getParent()) { key.append(build.getParent().getParent().getFullName()).append('-'); } } String overriddenKey = (projectKey != null && projectKey.trim().length() > 0) ? projectKey : getDescriptor().getProjectKey(); if (overriddenKey != null && overriddenKey.trim().length() > 0) { PrintStream logger = listener.getLogger(); try { EnvVars environment = build.getEnvironment(listener); key.append(environment.expand(projectKey)); } catch (IOException e) { logger.println("Cannot expand build key from parameter. Processing with default build key"); e.printStackTrace(logger); key.append(getDefaultBuildKey(build)); } catch (InterruptedException e) { logger.println("Cannot expand build key from parameter. Processing with default build key"); e.printStackTrace(logger); key.append(getDefaultBuildKey(build)); } } else { key.append(getDefaultBuildKey(build)); } return StringEscapeUtils.escapeJavaScript(key.toString()); }
Source:
<code>protected void addStoragePermissionByQuotaMode(List<PermissionSubject> permsList, Guid storagePoolId, Guid StorageDomainId) { storage_pool storagePool = null; if (storagePoolId != null) { storagePool = getStoragePoolDAO().get(storagePoolId); if (storagePool != null) { if (storagePool.getQuotaEnforcementType() == QuotaEnforcementTypeEnum.DISABLED) { permsList.add(new PermissionSubject(StorageDomainId, VdcObjectType.Storage, ActionGroup.CREATE_DISK)); } } } <START> if (storagePool == null) { <END> permsList.add(new PermissionSubject(null, VdcObjectType.Storage, ActionGroup.CREATE_DISK)); } }</code><technical_language>i handling null SP part of this method</technical_language>

Target:
protected void addStoragePermissionByQuotaMode(List<PermissionSubject> permsList, Guid storagePoolId, Guid StorageDomainId) { storage_pool storagePool = null; if (storagePoolId != null) { storagePool = getStoragePoolDAO().get(storagePoolId); if (storagePool != null) { if (storagePool.getQuotaEnforcementType() == QuotaEnforcementTypeEnum.DISABLED) { permsList.add(new PermissionSubject(StorageDomainId, VdcObjectType.Storage, ActionGroup.CREATE_DISK)); } } } }
Source:
<code>private void waitForDeploy(StreamDefinition definition) { StreamNode stream = parser.parse(definition.getDefinition()); boolean deployed = false; streamDeployer.deploy(definition.getName()); final int MAX_TRIES = 10; int tries = 1; while (!deployed && tries <= MAX_TRIES) { deployed = true; int i = 0; for (ModuleNode module : stream.getModuleNodes()) { if (getModule(module.getName(), i++, moduleDeployer) == null) { deployed = false; break; } } if (!deployed) { try { Thread.sleep(1000); streamDeployer.undeploy(definition.getName()); Thread.sleep(1000); streamDeployer.deploy(definition.getName()); tries++; } catch (InterruptedException e) { <START> e.printStackTrace(); <END> } } } if (deployed) { System.out.println("deployed after " + tries + " tries"); } assertTrue("stream " + definition.getName() + " not deployed ", deployed); }</code><technical_language>remove printStackTrace, call Thread.currentThread().interrupt()</technical_language>

Target:
private void waitForDeploy(StreamDefinition definition) { StreamNode stream = parser.parse(definition.getDefinition()); boolean deployed = false; streamDeployer.deploy(definition.getName()); final int MAX_TRIES = 10; int tries = 1; while (!deployed && tries <= MAX_TRIES) { deployed = true; int i = 0; for (ModuleNode module : stream.getModuleNodes()) { if (getModule(module.getName(), i++, moduleDeployer) == null) { deployed = false; break; } } if (!deployed) { try { Thread.sleep(1000); streamDeployer.undeploy(definition.getName()); Thread.sleep(1000); streamDeployer.deploy(definition.getName()); tries++; } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } } if (deployed) { System.out.println("deployed after " + tries + " tries"); } assertTrue("stream " + definition.getName() + " not deployed ", deployed); }
Source:
<code><START> private <T, U extends CopyStrategy<?>> void registerCopyStrategy(CopyStrategyLibrary copyStrategyLibrary, Class<T> type, Class<U> strategy) { <END> try { copyStrategyLibrary.register(type, (CopyStrategy<T>) strategy.newInstance()); } catch (InstantiationException | IllegalAccessException e) { logger.error("Cannot register CopyStrategy '{}' - failed to instantiate", strategy, e); } }</code><technical_language>reason this needs moved function</technical_language>

Target:
private <T, U extends CopyStrategy<T>> void registerCopyStrategy(CopyStrategyLibrary copyStrategyLibrary, Class<T> type, Class<U> strategy) { try { copyStrategyLibrary.register(type, strategy.newInstance()); } catch (InstantiationException | IllegalAccessException e) { logger.error("Cannot register CopyStrategy '{}' - failed to instantiate", strategy, e); } }
Source:
<code>protected void doFilterHttp(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException { Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); <START> if (!systemEnvironment.isReAuthenticationEnabled()) { <END> chain.doFilter(request, response); return; } synchronized (request.getSession().getId().intern()) { Long lastAuthenticationTime = (Long) request.getSession().getAttribute(LAST_REAUTHENICATION_CHECK_TIME); if (lastAuthenticationTime == null) { request.getSession().setAttribute(LAST_REAUTHENICATION_CHECK_TIME, timeProvider.currentTimeMillis()); } else if (forceReAuthentication(lastAuthenticationTime)) { request.getSession().setAttribute(LAST_REAUTHENICATION_CHECK_TIME, timeProvider.currentTimeMillis()); authentication.setAuthenticated(false); } } chain.doFilter(request, response); }</code><technical_language>retain check for (authentication == null)</technical_language>

Target:
protected void doFilterHttp(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException { Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); if (!systemEnvironment.isReAuthenticationEnabled() || authentication == null) { chain.doFilter(request, response); return; } synchronized (request.getSession().getId().intern()) { Long lastAuthenticationTime = (Long) request.getSession().getAttribute(LAST_REAUTHENICATION_CHECK_TIME); if (lastAuthenticationTime == null) { request.getSession().setAttribute(LAST_REAUTHENICATION_CHECK_TIME, timeProvider.currentTimeMillis()); } else if (forceReAuthentication(lastAuthenticationTime)) { request.getSession().setAttribute(LAST_REAUTHENICATION_CHECK_TIME, timeProvider.currentTimeMillis()); authentication.setAuthenticated(false); } } chain.doFilter(request, response); }
Source:
<code>public void clearFolder(final Account account, final String folderName, final ActivityListener listener) { putBackground("clearFolder", listener, new Runnable() { @Override public void run() { LocalFolder localFolder = null; try { Store localStore = account.getLocalStore(); <START> localFolder = (LocalFolder) localStore.getFolder(account.getTrashFolderName()); <END> localFolder.open(Folder.OPEN_MODE_RW); localFolder = account.getLocalStore().getFolder(folderName); localFolder.open(Folder.OPEN_MODE_RW); localFolder.clearAllMessages(); } catch (UnavailableStorageException e) { Log.i(K9.LOG_TAG, "Failed to clear folder because storage is not available - trying again later."); throw new UnavailableAccountException(e); } catch (Exception e) { Log.e(K9.LOG_TAG, "clearFolder failed", e); addErrorMessage(account, null, e); } finally { closeFolder(localFolder); } listFoldersSynchronous(account, false, listener); } }); }</code><technical_language>do open Trash folder here</technical_language>

Target:
public void clearFolder(final Account account, final String folderName, final ActivityListener listener) { putBackground("clearFolder", listener, new Runnable() { @Override public void run() { clearFolderSynchronous(account, folderName, listener); } }); }
Source:
<code>public static Properties defaultProperties() { Properties properties = BaseHttpApiMetadata.defaultProperties(); properties.setProperty(Constants.PROPERTY_MAX_RETRIES, "15"); properties.setProperty("jclouds.ssh.retry-auth", "true"); properties.setProperty(Constants.PROPERTY_CONNECTION_TIMEOUT, "1200000"); <START> properties.setProperty("image.login-user", "root"); <END> properties.setProperty(ComputeServiceProperties.IMAGE_LOGIN_USER, "root:password"); properties.setProperty(TEMPLATE, "osFamily=UBUNTU,os64Bit=true,osVersionMatches=1[012].[01][04]"); return properties; }</code><technical_language>is this property (without jclouds prefix) used</technical_language>

Target:
public static Properties defaultProperties() { Properties properties = BaseHttpApiMetadata.defaultProperties(); properties.setProperty(Constants.PROPERTY_MAX_RETRIES, "15"); properties.setProperty("jclouds.ssh.retry-auth", "true"); properties.setProperty(Constants.PROPERTY_CONNECTION_TIMEOUT, "1200000"); properties.setProperty(ComputeServiceProperties.IMAGE_LOGIN_USER, "root:password"); properties.setProperty(TEMPLATE, "osFamily=UBUNTU,os64Bit=true,osVersionMatches=1[012].[01][04]"); return properties; }
Source:
<code>public static void httpsValidation(Object objectToCheck, String objectName, String endpoint, ClientLogger logger) { if (objectToCheck != null && !parseEndpoint(endpoint, logger).getScheme().equals(Constants.HTTPS)) { <START> throw new IllegalArgumentException("Using a(n) " + objectName + " requires https"); <END> } }</code><technical_language>logger.logAndThrow. other places</technical_language>

Target:
public static void httpsValidation(Object objectToCheck, String objectName, String endpoint, ClientLogger logger) { if (objectToCheck != null && !parseEndpoint(endpoint, logger).getScheme().equals(Constants.HTTPS)) { throw logger.logExceptionAsError(new IllegalArgumentException( "Using a(n) " + objectName + " requires https")); } }
Source:
<code>char[] executePasswordCommand(String passwordCommand) throws Throwable { final SecurityManager sm = System.getSecurityManager(); CmdRuntimeActions action; if (sm != null) { <START> sm.checkPermission(CredentialStorePermission.LOAD_EXTERNAL_STORE_PASSWORD); <END> action = CmdRuntimeActions.PRIVILEGED; } else { action = CmdRuntimeActions.NON_PRIVILEGED; } String passwordCmdType; String passwordCmdLine; if (passwordCommand.trim().startsWith("{" + SUPPORTED_CMD_TYPE)) { StringTokenizer tokenizer = new StringTokenizer(passwordCommand, "{}"); passwordCmdType = tokenizer.nextToken(); passwordCmdLine = tokenizer.nextToken(); } else { passwordCmdType = SUPPORTED_CMD_TYPE; passwordCmdLine = passwordCommand; } if (!passwordCmdType.equals(SUPPORTED_CMD_TYPE)) { throw log.cacheForExternalCommandsNotSupported(); } try { return action.execCmd(passwordCmdLine); } catch (Exception e) { throw log.passwordCommandExecutionProblem( getName(), e); } }</code><technical_language>I this credential store permission enables execute program system. safer a permission name is exact program name action is "execute" is checked? ExecutionPermission program name</technical_language>

Target:
char[] executePasswordCommand(String passwordCommand) throws Throwable { String passwordCmdType; String passwordCmdLine; if (passwordCommand.trim().startsWith("{" + SUPPORTED_CMD_TYPE)) { StringTokenizer tokenizer = new StringTokenizer(passwordCommand, "{}"); passwordCmdType = tokenizer.nextToken(); passwordCmdLine = tokenizer.nextToken(); } else { passwordCmdType = SUPPORTED_CMD_TYPE; passwordCmdLine = passwordCommand; } if (!passwordCmdType.equals(SUPPORTED_CMD_TYPE)) { throw log.cacheForExternalCommandsNotSupported(); } try { return execCmd(passwordCmdLine); } catch (Exception e) { throw log.passwordCommandExecutionProblem( getName(), e); } }
Source:
<code>public List<Variant> mapLine(String line, int lineNumber) throws Exception { <START> Assert.notNull(factory, "It is not allowed to use " + this.getClass().getSimpleName() <END> + " with non-aggregated VCFs (hint: do not set VariantSource.Aggregation to NONE"); return factory.create(source, line); }</code><technical_language>This imported Spock JUnit assertNotNull</technical_language>

Target:
public List<Variant> mapLine(String line, int lineNumber) throws Exception { assertNotNull(this.getClass().getSimpleName() + " should be used to read aggregated VCFs only " + "(hint: do not set VariantSource.Aggregation to NONE)", factory); return factory.create(source, line); }
Source:
<code>public static String toString(short ordinal) { <START> return "UNKNOWN[ordinal=" + ordinal + ']'; <END> }</code><technical_language>this find name of a Version it? Alternatively "VersionOrdinal" instead of "UNKNOWN"</technical_language>

Target:
public static String toString(short ordinal) { return "VersionOrdinal[ordinal=" + ordinal + ']'; }
Source:
<code>public static <T> FromIndexFieldValueConverter<T, ValueWrapper<T>> fromIndexFieldConverter() { <START> return new ValueWrapperFromIndexFieldValueConverter<>(); <END> }</code><technical_language>I anonymous classes :) I care way, toIndexFieldConverter fromIndexFieldConverter methods consistent other</technical_language>

Target:
public static <T> FromIndexFieldValueConverter<T, ValueWrapper<T>> fromIndexFieldConverter() { return new FromIndexFieldValueConverter<T, ValueWrapper<T>>() { @Override public boolean isConvertedTypeAssignableTo(Class<?> superTypeCandidate) { return superTypeCandidate.isAssignableFrom( ValueWrapper.class ); } @Override public ValueWrapper<T> convert(T indexedValue) { return new ValueWrapper<T>( indexedValue ); } }; }
Source:
<code>private String getTagsString() { StringBuilder sb = new StringBuilder(); Map<String, Ref> tagsMap = db.getTags(); for (String tagName : tagsMap.keySet()) { ObjectId peeledId = tagsMap.get(tagName).getPeeledObjectId(); if (peeledId != null && peeledId.equals(commit)) { <START> if (sb.length() > 0) { <END> sb.append(", "); } sb.append(tagName); } } return sb.toString(); }</code><technical_language>please remove brackets</technical_language>

Target:
private String getTagsString() { StringBuilder sb = new StringBuilder(); Map<String, Ref> tagsMap = db.getTags(); for (String tagName : tagsMap.keySet()) { ObjectId peeledId = tagsMap.get(tagName).getPeeledObjectId(); if (peeledId != null && peeledId.equals(commit)) { if (sb.length() > 0) sb.append(", "); sb.append(tagName); } } return sb.toString(); }
Source:
<code>public void setCallback(Callback callback) { <START> this.mCallback = callback; <END> }</code><technical_language>This this. longer necessary - please remove it</technical_language>

Target:
public void setCallback(Callback callback) { mCallback = callback; }
Source:
<code>private Condition generateFHIRConditionForOpenMRSObs(Obs openMrsObs) { ca.uhn.fhir.model.dstu2.resource.Condition fhirCondition = new ca.uhn.fhir.model.dstu2.resource.Condition(); IdDt id = new IdDt(); id.setValue(openMrsObs.getUuid()); fhirCondition.setId(id); if (openMrsObs.getPerson().isPatient()) { ResourceReferenceDt patient = FHIRUtils.buildPatientOrPersonResourceReference(openMrsObs.getPerson()); fhirCondition.setPatient(patient); } <START> <END> DateDt dateDt = new DateDt(); dateDt.setValue(openMrsObs.getDateCreated()); fhirCondition.setDateAsserted(dateDt); if (openMrsObs.getConcept() != null) { CodeableConceptDt conceptDt = fhirCondition.getCode(); Collection<ConceptMap> mappings = openMrsObs.getConcept().getConceptMappings(); List<CodingDt> dts = conceptDt.getCoding(); if (mappings != null && !mappings.isEmpty()) { for (ConceptMap map : mappings) { if (map.getConceptReferenceTerm() != null) { dts.add(FHIRUtils.getCodingDtByConceptMappings(map)); } } } if (openMrsObs.getConcept().getName() != null) { dts.add(new CodingDt().setCode(openMrsObs.getConcept().getUuid()).setDisplay( openMrsObs.getConcept().getName().getName()).setSystem(FHIRConstants.OPENMRS_URI)); } else { dts.add(new CodingDt().setCode(openMrsObs.getConcept().getUuid()).setSystem( FHIRConstants.OPENMRS_URI)); } conceptDt.setCoding(dts); fhirCondition.setCode(conceptDt); } fhirCondition.setNotes(openMrsObs.getComment()); return fhirCondition; }</code><technical_language>remove this more work done</technical_language>

Target:
private Condition generateFHIRConditionForOpenMRSObs(Obs openMrsObs) { ca.uhn.fhir.model.dstu2.resource.Condition fhirCondition = new ca.uhn.fhir.model.dstu2.resource.Condition(); IdDt id = new IdDt(); id.setValue(openMrsObs.getUuid()); fhirCondition.setId(id); if (openMrsObs.getPerson().isPatient()) { ResourceReferenceDt patient = FHIRUtils.buildPatientOrPersonResourceReference(openMrsObs.getPerson()); fhirCondition.setPatient(patient); if (openMrsObs.getEncounter() != null) { fhirCondition.setEncounter(buildPatientReference(openMrsObs.getEncounter())); } } DateDt dateDt = new DateDt(); dateDt.setValue(openMrsObs.getDateCreated()); fhirCondition.setDateAsserted(dateDt); if (openMrsObs.getConcept() != null) { CodeableConceptDt conceptDt = fhirCondition.getCode(); Collection<ConceptMap> mappings = openMrsObs.getConcept().getConceptMappings(); List<CodingDt> dts = conceptDt.getCoding(); if (mappings != null && !mappings.isEmpty()) { for (ConceptMap map : mappings) { if (map.getConceptReferenceTerm() != null) { dts.add(FHIRUtils.getCodingDtByConceptMappings(map)); } } } if (openMrsObs.getConcept().getName() != null) { dts.add(new CodingDt().setCode(openMrsObs.getConcept().getUuid()).setDisplay( openMrsObs.getConcept().getName().getName()).setSystem(FHIRConstants.OPENMRS_URI)); } else { dts.add(new CodingDt().setCode(openMrsObs.getConcept().getUuid()).setSystem( FHIRConstants.OPENMRS_URI)); } conceptDt.setCoding(dts); fhirCondition.setCode(conceptDt); } fhirCondition.setNotes(openMrsObs.getComment()); return fhirCondition; }
Source:
<code>public boolean equals(Object obj) { if (!(obj instanceof CorfuDynamicMessage)) { return false; } CorfuDynamicMessage other = (CorfuDynamicMessage) obj; if (payload == null && other.payload == null) return true; if (payload == null || other.payload == null) return false; if (payload.getAllFields().size() != other.payload.getAllFields().size()) { return false; } Iterator<Map.Entry<FieldDescriptor, Object>> thisMessage = payload.getAllFields().entrySet() .stream() .sorted() .collect(Collectors.toList()) .iterator(); Iterator<Map.Entry<FieldDescriptor, Object>> otherMessage = payload.getAllFields().entrySet() .stream() .sorted() .collect(Collectors.toList()) .iterator(); while (thisMessage.hasNext()) { if (!otherMessage.hasNext()) { <START> return false; <END> } Map.Entry<FieldDescriptor, Object> entry1 = thisMessage.next(); Map.Entry<FieldDescriptor, Object> entry2 = otherMessage.next(); if (!entry1.getKey().toProto().equals(entry2.getKey().toProto()) || !entry1.getValue().equals(entry2.getValue())) { return false; } } return true; }</code><technical_language>Is iteration ordered guaranteed for equivalent protos</technical_language>

Target:
public boolean equals(Object obj) { if (!(obj instanceof CorfuDynamicMessage)) { return false; } CorfuDynamicMessage other = (CorfuDynamicMessage) obj; if (payload == null && other.payload == null) return true; if (payload == null || other.payload == null) return false; if (payload.getAllFields().size() != other.payload.getAllFields().size()) { return false; } Iterator<Map.Entry<FieldDescriptor, Object>> thisMessage = new ArrayList<>(payload.getAllFields().entrySet()) .iterator(); Iterator<Map.Entry<FieldDescriptor, Object>> otherMessage = new ArrayList<>(payload.getAllFields().entrySet()) .iterator(); while (thisMessage.hasNext()) { if (!otherMessage.hasNext()) { return false; } Map.Entry<FieldDescriptor, Object> entry1 = thisMessage.next(); Map.Entry<FieldDescriptor, Object> entry2 = otherMessage.next(); if (!entry1.getKey().toProto().equals(entry2.getKey().toProto()) || !entry1.getValue().equals(entry2.getValue())) { return false; } } return true; }
Source:
<code>public synchronized Integer getResourceId(ResName resName) { Integer id = resourceTable.inverse().get(resName); <START> if (id == null && ("android".equals(resName.packageName) || "".equals(resName.packageName))) { <END> if (maxUsedInt == null) { maxUsedInt = resourceTable.isEmpty() ? 0 : Collections.max(resourceTable.keySet()); generatedIdStart = maxUsedInt; } id = ++maxUsedInt; resourceTable.put(id, resName); LOGGER.fine("no id mapping found for " + resName.getFullyQualifiedName() + "; assigning ID #0x" + Integer.toHexString(id)); } if (id == null) return 0; return id; }</code><technical_language>encapsulate a method ResName</technical_language>

Target:
public synchronized Integer getResourceId(ResName resName) { Integer id = resourceTable.inverse().get(resName); if (id == null && isAndroidPackage(resName)) { id = androidResourceIdGenerator.generate(resName.type, resName.name); resourceTable.put(id, resName); LOGGER.fine("no id mapping found for " + resName.getFullyQualifiedName() + "; assigning ID #0x" + Integer.toHexString(id)); } if (id == null) return 0; return id; }
Source:
<code>public byte[] getMetadataForTable(TableReference tableRef) { String lowerCaseTableName = tableRef.getQualifiedName().toLowerCase(); Map<Cell, Value> rows = getRows(AtlasDbConstants.DEFAULT_METADATA_TABLE, ImmutableSet.of(lowerCaseTableName.getBytes()), ColumnSelection.all(), Long.MAX_VALUE); if (!rows.isEmpty()) { return Iterables.getOnlyElement(rows.values()).getContents(); } java.util.Optional<Entry<TableReference, byte[]>> match = getMetadataForTables().entrySet().stream().filter( entry -> matchingIgnoreCase(entry.getKey(), tableRef)) .findFirst(); if (!match.isPresent()) { log.debug("Couldn't find table metadata for {}", LoggingArgs.tableRef(tableRef)); return AtlasDbConstants.EMPTY_TABLE_METADATA; } else { log.debug("Found table metadata for at matching name {}", LoggingArgs.tableRef(tableRef), LoggingArgs.tableRef("matchingTable", match.get().getKey())); <START> putMetadataAndMaybeAlterTables( <END> false, ImmutableMap.of(CassandraKeyValueServices.getMetadataCell(tableRef), match.get().getValue()), ImmutableSet.of()); return match.get().getValue(); } }</code><technical_language>delete versions, a future delete clean case version stale versions visible again</technical_language>

Target:
public byte[] getMetadataForTable(TableReference tableRef) { String lowerCaseTableName = tableRef.getQualifiedName().toLowerCase(); Map<Cell, Value> rows = getRows(AtlasDbConstants.DEFAULT_METADATA_TABLE, ImmutableSet.of(lowerCaseTableName.getBytes()), ColumnSelection.all(), Long.MAX_VALUE); if (!rows.isEmpty()) { return Iterables.getOnlyElement(rows.values()).getContents(); } java.util.Optional<Entry<TableReference, byte[]>> match = getMetadataForTables().entrySet().stream().filter( entry -> matchingIgnoreCase(entry.getKey(), tableRef)) .findFirst(); if (!match.isPresent()) { log.debug("Couldn't find table metadata for {}", LoggingArgs.tableRef(tableRef)); return AtlasDbConstants.EMPTY_TABLE_METADATA; } else { log.debug("Found table metadata for at matching name {}", LoggingArgs.tableRef(tableRef), LoggingArgs.tableRef("matchingTable", match.get().getKey())); return match.get().getValue(); } }
Source:
<code>public Mono<VoidResponse> deleteFile(String fileName) { String filePath = directoryName + "/" + fileName; <START> FileAsyncClient fileAsyncClient = new FileAsyncClient(azureFileStorageClient, shareName, filePath, snapshot); <END> return fileAsyncClient.delete().map(VoidResponse::new); }</code><technical_language>before. methods for this logic. for deleting directories</technical_language>

Target:
public Mono<VoidResponse> deleteFile(String fileName) { FileAsyncClient fileAsyncClient = getFileClient(fileName); return fileAsyncClient.delete().map(VoidResponse::new); }
Source:
<code>public AbstractOpenPgpIntegrationTest(SmackIntegrationTestEnvironment environment) throws XMPPException.XMPPErrorException, TestNotPossibleException, SmackException.NotConnectedException, InterruptedException, SmackException.NoResponseException { super(environment); throwIfPubSubNotSupported(conOne); throwIfPubSubNotSupported(conTwo); throwIfPubSubNotSupported(conThree); Security.removeProvider(BouncyCastleProvider.PROVIDER_NAME); Security.addProvider(new BouncyCastleProvider()); <START> this.aliceConnection = conOne; <END> this.bobConnection = conTwo; this.chloeConnection = conThree; this.alice = aliceConnection.getUser().asBareJid(); this.bob = bobConnection.getUser().asBareJid(); this.chloe = chloeConnection.getUser().asBareJid(); OpenPgpPubSubUtil.deletePubkeysListNode(aliceConnection); OpenPgpPubSubUtil.deletePubkeysListNode(bobConnection); OpenPgpPubSubUtil.deletePubkeysListNode(chloeConnection); }</code><technical_language>is reason for this dance</technical_language>

Target:
protected AbstractOpenPgpIntegrationTest(SmackIntegrationTestEnvironment environment) throws XMPPException.XMPPErrorException, TestNotPossibleException, SmackException.NotConnectedException, InterruptedException, SmackException.NoResponseException { super(environment); throwIfPubSubNotSupported(conOne); throwIfPubSubNotSupported(conTwo); throwIfPubSubNotSupported(conThree); this.aliceConnection = conOne; this.bobConnection = conTwo; this.chloeConnection = conThree; this.alice = aliceConnection.getUser().asBareJid(); this.bob = bobConnection.getUser().asBareJid(); this.chloe = chloeConnection.getUser().asBareJid(); OpenPgpPubSubUtil.deletePubkeysListNode(aliceConnection); OpenPgpPubSubUtil.deletePubkeysListNode(bobConnection); OpenPgpPubSubUtil.deletePubkeysListNode(chloeConnection); }
Source:
<code>ArrayResult aggregateData() { int rows = ((ArrayResult) this.getAllResultData().get(this.getAllResultData().keys().nextElement())).data.length; int columns = 0; for (Enumeration<Integer> e = this.getAllResultData().keys(); e.hasMoreElements();) { columns += ((ArrayResult) this.getAllResultData().get(e.nextElement())).data[0].length; } int[][] resultData = new int[rows][columns]; int columnsDone = 0; for (int i = 0; i < this.getExpectedNumResults(); i++) { int[][] work = ((ArrayResult) this.getAllResultData().get(this.getWorkers().get(i).getWorkerId())).data; for (int m = 0; m < work.length; m++) { for (int n = 0; n < work[0].length; n++) { resultData[m][columnsDone + n] = work[m][n]; } } columnsDone += work[0].length; } ArrayResult result = new ArrayResult(resultData); <START> return result; <END> }</code><technical_language>one-liner</technical_language>

Target:
ArrayResult aggregateData() { int rows = ((ArrayResult) this.getAllResultData().get(this.getAllResultData().keys().nextElement())).data.length; int columns = 0; for (Enumeration<Integer> e = this.getAllResultData().keys(); e.hasMoreElements();) { columns += ((ArrayResult) this.getAllResultData().get(e.nextElement())).data[0].length; } int[][] resultData = new int[rows][columns]; int columnsDone = 0; for (int i = 0; i < this.getExpectedNumResults(); i++) { int[][] work = ((ArrayResult) this.getAllResultData().get(this.getWorkers().get(i).getWorkerId())).data; for (int m = 0; m < work.length; m++) { for (int n = 0; n < work[0].length; n++) { resultData[m][columnsDone + n] = work[m][n]; } } columnsDone += work[0].length; } return new ArrayResult(resultData); }
Source:
<code>public void testRemoveAll() { List<Guid> hookIds = new ArrayList<Guid>(); hookIds.add(HOOK_ID); hookIds.add(HOOK_ID2); dao.removeAll(hookIds); List<GlusterHookEntity> hooks = dao.getByClusterId(CLUSTER_ID); <START> assertNotNull(hooks); <END> }</code><technical_language>check if result is empty</technical_language>

Target:
public void testRemoveAll() { List<Guid> hookIds = new ArrayList<Guid>(); hookIds.add(HOOK_ID); hookIds.add(HOOK_ID2); dao.removeAll(hookIds); List<GlusterHookEntity> hooks = dao.getByClusterId(CLUSTER_ID); assertNotNull(hooks); assertTrue(hooks.isEmpty()); }
Source:
<code><START> public final Observable<T> observeOn(Scheduler scheduler, int bufferSize) { <END> if (this instanceof ScalarSynchronousObservable) { return ((ScalarSynchronousObservable<T>)this).scalarScheduleOn(scheduler); } return lift(new OperatorObserveOn<T>(scheduler, false, bufferSize)); }</code><technical_language>Please add observeOn(Scheduler, boolean delayError, int bufferSize) overload well</technical_language>

Target:
public final Observable<T> observeOn(Scheduler scheduler, int bufferSize) { return observeOn(scheduler, false, bufferSize); }
Source:
<code>public void testUpdatingDefaultVersionHostedTool() { ApiClient webClient = getWebClient(); ContainersApi containersApi = new ContainersApi(webClient); HostedApi hostedApi = new HostedApi(webClient); DockstoreTool hostedTool = hostedApi.createHostedTool("awesomeTool", "cwl", "quay.io", "coolNamespace"); SourceFile descriptorFile = new SourceFile(); descriptorFile.setContent("cwlVersion: v1.0\\nclass: CommandLineTool\\nbaseCommand: echo\\ninputs:\\nmessage:\\ntype: string\\ninputBinding:\\nposition: 1\\noutputs: []"); descriptorFile.setType(SourceFile.TypeEnum.DOCKSTORE_CWL); descriptorFile.setPath("/Dockstore.cwl"); SourceFile dockerfile = new SourceFile(); dockerfile.setContent("FROM ubuntu:latest"); dockerfile.setType(SourceFile.TypeEnum.DOCKERFILE); dockerfile.setPath("/Dockerfile"); DockstoreTool dockstoreTool = hostedApi.editHostedTool(hostedTool.getId(), Lists.newArrayList(descriptorFile, dockerfile)); Optional<Tag> first = dockstoreTool.getTags().stream().max(Comparator.comparingInt((Tag t) -> Integer.parseInt(t.getName()))); Assert.assertEquals("correct number of source files", 2, first.get().getSourceFiles().size()); <START> if (first.isPresent()) { <END> containersApi.updateDefaultVersion(hostedTool.getId(), first.get().getName()); } }</code><technical_language>in this case, want fail if is present, bother this check</technical_language>

Target:
public void testUpdatingDefaultVersionHostedTool() { ApiClient webClient = getWebClient(); ContainersApi containersApi = new ContainersApi(webClient); HostedApi hostedApi = new HostedApi(webClient); DockstoreTool hostedTool = hostedApi.createHostedTool("awesomeTool", "cwl", "quay.io", "coolNamespace"); SourceFile descriptorFile = new SourceFile(); descriptorFile.setContent("cwlVersion: v1.0\\nclass: CommandLineTool\\nbaseCommand: echo\\ninputs:\\nmessage:\\ntype: string\\ninputBinding:\\nposition: 1\\noutputs: []"); descriptorFile.setType(SourceFile.TypeEnum.DOCKSTORE_CWL); descriptorFile.setPath("/Dockstore.cwl"); SourceFile dockerfile = new SourceFile(); dockerfile.setContent("FROM ubuntu:latest"); dockerfile.setType(SourceFile.TypeEnum.DOCKERFILE); dockerfile.setPath("/Dockerfile"); DockstoreTool dockstoreTool = hostedApi.editHostedTool(hostedTool.getId(), Lists.newArrayList(descriptorFile, dockerfile)); Optional<Tag> first = dockstoreTool.getTags().stream().max(Comparator.comparingInt((Tag t) -> Integer.parseInt(t.getName()))); Assert.assertEquals("correct number of source files", 2, first.get().getSourceFiles().size()); assertTrue(first.isPresent()); containersApi.updateToolDefaultVersion(hostedTool.getId(), first.get().getName()); }
Source:
<code>protected static ChannelHandler wrapChannelHandler(URL url, ChannelHandler handler) { url = ExecutorUtil.setThreadName(url, CLIENT_THREAD_POOL_NAME); String key = Constants.DEFAULT_KEY + Constants.HIDE_KEY_PREFIX + Constants.THREADPOOL_KEY; String threadpool = url.getParameter(key); if (StringUtils.isNotEmpty(threadpool)) { url = url.removeParameter(key); } <START> url = url.addParameterIfAbsent(Constants.THREADPOOL_KEY, StringUtils.isNotEmpty(threadpool) ? threadpool : Constants.DEFAULT_CLIENT_THREADPOOL); <END> return ChannelHandlers.wrap(handler, url); }</code><technical_language>Do need change code here? I default.threadpool key in automatically</technical_language>

Target:
protected static ChannelHandler wrapChannelHandler(URL url, ChannelHandler handler) { url = ExecutorUtil.setThreadName(url, CLIENT_THREAD_POOL_NAME); url = url.addParameterIfAbsent(Constants.THREADPOOL_KEY, Constants.DEFAULT_CLIENT_THREADPOOL); return ChannelHandlers.wrap(handler, url); }