auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public abstract void scheduleJob(Config config) throws JumbuneException; public void deleteCurrentJobEntryFromCron(String jobName) throws JumbuneException { InputStream cronInputStream; cronInputStream = getCurrentUserCronTabInfo(); try { if (cronInputStream != null && cronInputStream.available() != 0) { StringBuilder cronBuilder = new StringBuilder(); InputStreamReader isReader = new InputStreamReader( cronInputStream); BufferedReader br = new BufferedReader(isReader); do { String textinLine = br.readLine(); if (textinLine == null) break; if (!textinLine.contains(jobName+File.separator)){ cronBuilder.append(textinLine); cronBuilder.append("\n"); } } while (true); writeLatestCronTabToFile(cronBuilder.toString()); addUpdatedFileToCron(); } } catch (IOException ioe) { <START> LOGGER.info( <END> " Could not update crontab to remove entry of current job", ioe); throw new JumbuneException(ioe.getMessage()); } finally { if (cronInputStream != null) { try { cronInputStream.close(); } catch (IOException e) { LOGGER.error("could not close the cron file input stream ", e); throw new JumbuneException(e.getMessage()); } } } }</code><technical_language>Logger.warn</technical_language>

Target:
protected abstract void scheduleJob(Config config) throws JumbuneException; public void deleteCurrentJobEntryFromCron(String jobName) throws JumbuneException { InputStream cronInputStream; cronInputStream = getCurrentUserCronTabInfo(); BufferedReader br = null; try { if (cronInputStream != null && cronInputStream.available() != 0) { StringBuilder cronBuilder = new StringBuilder(); InputStreamReader isReader = new InputStreamReader( cronInputStream); br = new BufferedReader(isReader); do { String textinLine = br.readLine(); if (textinLine == null) break; if (!textinLine.contains(jobName+File.separator)){ cronBuilder.append(textinLine); cronBuilder.append("\n"); } } while (true); writeLatestCronTabToFile(cronBuilder.toString()); addUpdatedFileToCron(); } } catch (IOException ioe) { LOGGER.warn( " Could not update crontab to remove entry of current job", ioe); throw new JumbuneException(ioe.getMessage()); } finally { if (br != null) { try { br.close(); } catch (IOException e) { LOGGER.error("could not close the cron file input stream ", e); throw new JumbuneException(e.getMessage()); } } } }
Source:
<code>public static void setAppContext(@NonNull Context context) { OneSignal.onesignalLog(LOG_LEVEL.VERBOSE, "setAppContext(context) called!"); if (context == null) { Log(LOG_LEVEL.WARN, "context is null, ignoring!"); return; } boolean wasAppContextNull = (appContext == null); appContext = context.getApplicationContext(); setupActivityLifecycleListener(wasAppContextNull); setupPrivacyConsent(appContext); OneSignal.onesignalLog(LOG_LEVEL.VERBOSE, "setAppContext(context) finished, checking if appId has been set before proceeding..."); if (appId == null) { OneSignal.onesignalLog(LOG_LEVEL.WARN, "appContext set, but please call setAppId(appId) with a valid appId to complete OneSignal init!"); return; <START> } <END> OneSignal.onesignalLog(LOG_LEVEL.VERBOSE, "setAppContext(context) successful and appId is set, continuing OneSignal init..."); init(); }</code><technical_language>Attempt read appId shared perfs context is set. Wrapper SDK call setContext setAppId called wrapper env starts</technical_language>

Target:
public static void setAppContext(@NonNull Context context) { OneSignal.onesignalLog(LOG_LEVEL.VERBOSE, "setAppContext(context) called!"); if (context == null) { Log(LOG_LEVEL.WARN, "context is null, ignoring!"); return; } boolean wasAppContextNull = (appContext == null); appContext = context.getApplicationContext(); setupActivityLifecycleListener(wasAppContextNull); setupPrivacyConsent(appContext); OneSignal.onesignalLog(LOG_LEVEL.VERBOSE, "setAppContext(context) finished, checking if appId has been set before proceeding..."); appId = getSavedAppId(); if (appId == null) { OneSignal.onesignalLog(LOG_LEVEL.WARN, "appContext set, but please call setAppId(appId) with a valid appId to complete OneSignal init!"); return; } OneSignal.onesignalLog(LOG_LEVEL.VERBOSE, "setAppContext(context) successful and appId is set, continuing OneSignal init..."); init(); }
Source:
<code>public boolean isAdvertiseSidebandAll() { <START> return advertiseSidebandAll; <END> }</code><technical_language>If config options, do "return allowSidebandAll && advertiseSidebandAll" avoid advertising support lack</technical_language>

Target:
public boolean isAdvertiseSidebandAll() { return advertiseSidebandAll && allowSidebandAll; }
Source:
<code>public GoConfigHolder migrate() { try { return upgrade(); <START> } catch (Exception e) { <END> e.printStackTrace(); upgradeFailedHandler.handle(e); } return null; }</code><technical_language>Do want LOGGER well? other usages in this class both</technical_language>

Target:
public GoConfigHolder migrate() { try { return upgrade(); } catch (Exception e) { upgradeFailedHandler.handle(e); } return null; }
Source:
<code>public void iterateAssignees() throws Exception { final Repo repo = RtRepoITCase.repo(); <START> Assume.assumeThat(repo, Matchers.notNullValue()); <END> MatcherAssert.assertThat( repo.assignees().iterate(), Matchers.not(Matchers.emptyIterable()) ); }</code><technical_language>this line is for</technical_language>

Target:
public void iterateAssignees() throws Exception { final Repo repo = RtRepoITCase.repo(); MatcherAssert.assertThat( repo.assignees().iterate(), Matchers.not(Matchers.emptyIterable()) ); }
Source:
<code>public ConfigurableSSLSettings(SystemEnvironment systemEnvironment) { try { String systemConfiguredSslConfigFile = systemEnvironment.get(SystemEnvironment.GO_SSL_CONFIG_FILE_PATH); InputStream sslConfigStream = getClass().getResourceAsStream(systemConfiguredSslConfigFile); String json = IOUtils.toString(sslConfigStream); config = new Gson().fromJson(json, Config.class).setDefaults(); if (!StringUtil.isBlank(systemEnvironment.get(SystemEnvironment.USER_CONFIGURED_SSL_CONFIG_FILE_PATH))) { File userConfiguredSslConfigFile = new File(systemEnvironment.configDir(), systemEnvironment.get(SystemEnvironment.USER_CONFIGURED_SSL_CONFIG_FILE_PATH)); if (userConfiguredSslConfigFile.exists()) { <START> Config userDefinedConfig = new Gson().fromJson(IOUtils.toString(new FileInputStream(userConfiguredSslConfigFile)), Config.class); <END> config.overrideWith(userDefinedConfig).setDefaults(); } } } catch (IOException e) { throw new RuntimeException(e.getMessage(), e); } }</code><technical_language>Is reason this is read a config file instead of system properties? other populated system environments, this populated a json file. Is reason break consistency here? While I mind reading a config file, I consider "one file rule all" sort of a thing, drop this file (for current release) /cc @zabil @arvindsv</technical_language>

Target:
public ConfigurableSSLSettings(SystemEnvironment systemEnvironment) { this.systemEnvironment = systemEnvironment; }
Source:
<code>public String getExpression() { <START> return "\"" + Generator.escape(toCss()) + "\""; <END> }</code><technical_language>toCss() escape String, need escape again</technical_language>

Target:
public String getExpression() { return "\"" + toCss() + "\""; }
Source:
<code>static <T> T getRandomElementFromList(List<T> list) { <START> if (list.size() == 0) { <END> return null; } return list.get(ThreadLocalRandom.current().nextInt(list.size())); }</code><technical_language>Highly suggest isEmpty</technical_language>

Target:
static <T> T getRandomElementFromList(List<T> list) { if (list.isEmpty()) { return null; } return list.get(ThreadLocalRandom.current().nextInt(list.size())); }
Source:
<code>protected void addPersistedPage(String sessionIdentifier, IManageablePage page) { if (page instanceof SerializedPage == false) { throw new WicketRuntimeException("MemcachedDataStore works with serialized pages only"); } SerializedPage serializedPage = (SerializedPage)page; MemcachedSet pages = new MemcachedSet(client, makeKey(sessionIdentifier, SESSION_PAGES), settings.getExpirationTime()); if (pages.add(String.valueOf(page.getPageId()))) { MemcachedSet sessions = new MemcachedSet(client, makeKey(SESSIONS), settings.getExpirationTime()); <START> sessions.add(String.valueOf(sessionIdentifier)); <END> sessions.compact(); } int expirationTime = settings.getExpirationTime(); client.set(makeKey(sessionIdentifier, serializedPage.getPageId(), PAGE_DATA), expirationTime, serializedPage.getData()); client.set(makeKey(sessionIdentifier, serializedPage.getPageId(), PAGE_SIZE), expirationTime, serializedPage.getData().length); if (serializedPage.getPageType() != null) { client.set(makeKey(sessionIdentifier, serializedPage.getPageId(), PAGE_TYPE), expirationTime, serializedPage.getPageType()); } pages.compact(pageId -> client.get(makeKey(sessionIdentifier, pageId, PAGE_SIZE)) != null); LOG.debug("Stored data for session '{}' and page id '{}'", sessionIdentifier, page.getPageId()); }</code><technical_language>need of String.valueOf()</technical_language>

Target:
protected void addPersistedPage(String sessionIdentifier, IManageablePage page) { if (page instanceof SerializedPage == false) { throw new WicketRuntimeException("MemcachedDataStore works with serialized pages only"); } SerializedPage serializedPage = (SerializedPage)page; int expirationTime = settings.getExpirationTime(); MemcachedSet pages = new MemcachedSet(client, makeKey(sessionIdentifier, SESSION_PAGES), expirationTime); if (pages.add(String.valueOf(page.getPageId()))) { MemcachedSet sessions = new MemcachedSet(client, makeKey(SESSIONS), settings.getExpirationTime()); sessions.add(sessionIdentifier); sessions.compact(); } client.set(makeKey(sessionIdentifier, serializedPage.getPageId(), PAGE_DATA), expirationTime, serializedPage.getData()); client.set(makeKey(sessionIdentifier, serializedPage.getPageId(), PAGE_SIZE), expirationTime, serializedPage.getData().length); if (serializedPage.getPageType() != null) { client.set(makeKey(sessionIdentifier, serializedPage.getPageId(), PAGE_TYPE), expirationTime, serializedPage.getPageType()); } pages.compact(pageId -> client.get(makeKey(sessionIdentifier, pageId, PAGE_SIZE)) != null); LOG.debug("Stored data for session '{}' and page id '{}'", sessionIdentifier, page.getPageId()); }
Source:
<code>public PatronAccess getPatronAccess(PID target) { List<PID> pidPath = getPidPath(target); <START> if (pidPath.size() < 3) { <END> return null; } PatronAccess computedAccess = PatronAccess.parent; for (int i = CONTENT_STARTING_DEPTH; i < pidPath.size(); i++) { PID pathPid = pidPath.get(i); PatronAccess access = objectAclFactory.getPatronAccess(pathPid); if (PatronAccess.none.equals(access)) { return PatronAccess.none; } if (PatronAccess.authenticated.equals(access)) { computedAccess = access; } } return computedAccess; }</code><technical_language>remind 3 is magic number here</technical_language>

Target:
public PatronAccess getPatronAccess(PID target) { List<PID> pidPath = getPidPath(target); if (pidPath.size() <= CONTENT_STARTING_DEPTH) { return null; } PatronAccess computedAccess = PatronAccess.parent; for (int i = CONTENT_STARTING_DEPTH; i < pidPath.size(); i++) { PID pathPid = pidPath.get(i); PatronAccess access = objectAclFactory.getPatronAccess(pathPid); if (PatronAccess.none.equals(access)) { return PatronAccess.none; } if (PatronAccess.authenticated.equals(access)) { computedAccess = access; } } return computedAccess; }
Source:
<code>public GraphQLTest() { Map<String, Class<? extends Check>> checks = new HashMap<>(); checks.put("allow all", com.yahoo.elide.core.security.checks.prefab.Role.ALL.class); dictionary = new EntityDictionary(checks); <START> dictionary.bindEntity(getType(Book.class)); <END> dictionary.bindEntity(getType(Author.class)); dictionary.bindEntity(getType(Publisher.class)); dictionary.bindEntity(getType(Pseudonym.class)); dictionary.bindEntity(getType(Address.class)); }</code><technical_language>necessary</technical_language>

Target:
public GraphQLTest() { Map<String, Class<? extends Check>> checks = new HashMap<>(); checks.put("allow all", com.yahoo.elide.core.security.checks.prefab.Role.ALL.class); dictionary = new EntityDictionary(checks); dictionary.bindEntity(Book.class); dictionary.bindEntity(Author.class); dictionary.bindEntity(Publisher.class); dictionary.bindEntity(Pseudonym.class); dictionary.bindEntity(Address.class); }
Source:
<code>public DiagnosticMessage getUnresolvedProxyMessage(ILinkingDiagnosticContext context) { String message = "Could not find declaration of '" + context.getLinkText() + "'"; <START> return new DiagnosticMessage(message, Severity.ERROR, Diagnostic.LINKING_DIAGNOSTIC); <END> }</code><technical_language>Please add a copyright header</technical_language>

Target:
public DiagnosticMessage getUnresolvedProxyMessage(ILinkingDiagnosticContext context) { String linkText = ""; try { linkText = context.getLinkText(); } catch (IllegalNodeException e) { linkText = e.getNode().getText(); } String format = "Could not find declaration of %s '%s'"; String type = context.getReference().getEReferenceType().getName(); String message = String.format(format, "", linkText); if (!type.equals("EObject")) { message = String.format(format, type, linkText); } return new DiagnosticMessage(message, Severity.ERROR, Diagnostic.LINKING_DIAGNOSTIC); }
Source:
<code>private void updateEditLicenseText() { editLicenseText = (TextView) findViewById(R.id.edit_section_license_text); editLicenseText.setText(Html.fromHtml(getString(R.string.edit_save_action_license))); if (!app.getUserInfoStorage().isLoggedIn()) { String login = getString(R.string.menu_login); <START> String ipSave = " " + getString(R.string.edit_save_action_ip_edit, login); <END> SpannableStringBuilder s = new SpannableStringBuilder(ipSave); int loginIndex = ipSave.indexOf(login); ClickableSpan clickable = new ClickableSpan() { @Override public void onClick(View v) { funnel.logLoginAttempt(); Intent loginIntent = new Intent(EditSectionActivity.this, LoginActivity.class); loginIntent.putExtra(LoginActivity.LOGIN_REQUEST_SOURCE, LoginFunnel.SOURCE_EDIT); loginIntent.putExtra(LoginActivity.EDIT_SESSION_TOKEN, funnel.getEditSessionToken()); startActivityForResult(loginIntent, LoginActivity.REQUEST_LOGIN); } }; s.setSpan(clickable, loginIndex, loginIndex + login.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); editLicenseText.append(s); } }</code><technical_language>String concatenation work correctly for RTL languages</technical_language>

Target:
private void updateEditLicenseText() { editLicenseText = (TextView) findViewById(R.id.edit_section_license_text); editLicenseText.setText(Html.fromHtml(getString(R.string.edit_save_action_license))); if (Utils.isLangRTL(Utils.langCodeToWikiLang(Locale.getDefault().getLanguage()))) { editLicenseText.append(Html.fromHtml("<br/>")); } if (!app.getUserInfoStorage().isLoggedIn()) { String login = getString(R.string.menu_login); String ipSave = " " + getString(R.string.edit_save_action_ip_edit, login); SpannableStringBuilder s = new SpannableStringBuilder(ipSave); int loginIndex = ipSave.indexOf(login); ClickableSpan clickable = new ClickableSpan() { @Override public void onClick(View v) { funnel.logLoginAttempt(); Intent loginIntent = new Intent(EditSectionActivity.this, LoginActivity.class); loginIntent.putExtra(LoginActivity.LOGIN_REQUEST_SOURCE, LoginFunnel.SOURCE_EDIT); loginIntent.putExtra(LoginActivity.EDIT_SESSION_TOKEN, funnel.getEditSessionToken()); startActivityForResult(loginIntent, LoginActivity.REQUEST_LOGIN); } }; s.setSpan(clickable, loginIndex, loginIndex + login.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); editLicenseText.append(s); } }
Source:
<code>public void exchangeEvent(HttpServerExchange exchange, NextListener nextListener) { try { long end = System.currentTimeMillis(); long duration = end - start; if (duration > this.timeThreshold) { String method = exchange.getRequestMethod().toString(); String uri = exchange.getRequestURI(); String query = exchange.getQueryString(); <START> log.warn("Request " + method + " " + uri + (query.isEmpty() ? "":("?" + query)) + " took: "+ <END> duration + " ms, exceeds " + this.timeThreshold +" ms threshold"); } } finally { if (nextListener != null) { nextListener.proceed(); } } }</code><technical_language>warnf instead of warn get rid of string concatenation. Log Hawkular-Tenant header too</technical_language>

Target:
public void exchangeEvent(HttpServerExchange exchange, NextListener nextListener) { try { long end = System.currentTimeMillis(); long duration = end - start; if (duration > this.timeThreshold) { String method = exchange.getRequestMethod().toString(); String query = exchange.getQueryString(); String request_url = exchange.getRequestURI() + (query.isEmpty() ? "" : ("?" + query)); HeaderMap headers = exchange.getRequestHeaders(); if (headers.contains(tenantHeader)) { String tenantId = headers.get(tenantHeader, 0); log.warnf("Request %s %s took: %d ms, exceeds %d ms threshold, tenant-id: %s", method, request_url, duration, timeThreshold, tenantId); } else { log.warnf("Request %s %s took: %d ms, exceeds %d ms threshold, no tenant", method, request_url, duration, timeThreshold); } } } finally { if (nextListener != null) { nextListener.proceed(); } } }
Source:
<code>private void expireSession(RaftSessionContext session) { log.debug("Expiring session due to heartbeat failure: {}", session); appendAndCompact(new CloseSessionEntry(raft.getTerm(), System.currentTimeMillis(), session.sessionId().id(), true)) .whenCompleteAsync((entry, error) -> { if (error != null) { return; } log.trace("Appended {}", entry); appender.appendEntries(entry.index()).whenComplete((commitIndex, commitError) -> { raft.checkThread(); <START> if (isOpen()) { <END> if (commitError == null) { raft.getStateMachine().<Long>apply(entry.index()); } } }); }, raft.getThreadContext()); }</code><technical_language>combine if statements :)</technical_language>

Target:
private void expireSession(RaftSessionContext session) { log.debug("Expiring session due to heartbeat failure: {}", session); appendAndCompact(new CloseSessionEntry(raft.getTerm(), System.currentTimeMillis(), session.sessionId().id(), true)) .whenCompleteAsync((entry, error) -> { if (error != null) { return; } log.trace("Appended {}", entry); appender.appendEntries(entry.index()).whenComplete((commitIndex, commitError) -> { raft.checkThread(); if (isOpen() && commitError == null) { raft.getStateMachine().<Long>apply(entry.index()); } }); }, raft.getThreadContext()); }
Source:
<code>public void onCreate(SQLiteDatabase db) { db.execSQL(CREATE_STORE_TABLE); db.execSQL(CREATE_LONG_STORE_TABLE); db.execSQL(CREATE_EVENTS_TABLE); db.execSQL(CREATE_IDENTIFYS_TABLE); if (databaseResetListener != null && callResetListenerOnDatabaseReset) { callResetListenerOnDatabaseReset = false; <START> databaseResetListener.onDatabaseReset(db); <END> callResetListenerOnDatabaseReset = true; } }</code><technical_language>if onDatabaseReset fails, callResetListenerOnDatabaseReset get reset</technical_language>

Target:
public void onCreate(SQLiteDatabase db) { db.execSQL(CREATE_STORE_TABLE); db.execSQL(CREATE_LONG_STORE_TABLE); db.execSQL(CREATE_EVENTS_TABLE); db.execSQL(CREATE_IDENTIFYS_TABLE); if (databaseResetListener != null && callResetListenerOnDatabaseReset) { try { callResetListenerOnDatabaseReset = false; databaseResetListener.onDatabaseReset(db); } catch (SQLiteException e) { logger.e(TAG, String.format("databaseReset callback failed during onCreate"), e); Diagnostics.getLogger().logError( String.format("DB: Failed to run databaseReset callback during onCreate"), e ); } finally { callResetListenerOnDatabaseReset = true; } } }
Source:
<code>protected Datastore proxy(InvocationHandler handler) throws Exception { Class proxy = Proxy.getProxyClass(Datastore.class.getClassLoader(), Datastore.class); Constructor constructor = proxy.getConstructor(InvocationHandler.class); <START> return (Datastore) constructor.newInstance(handler); <END> }</code><technical_language>shorter pattern for this is: java (Datastore) Proxy.newProxyInstance(Datastore.class.getClassLoader(), new Class<?>[]{Datastore.class}, handler);</technical_language>

Target:
protected Datastore proxy(InvocationHandler handler) throws Exception { return (Datastore) Proxy.newProxyInstance(Datastore.class.getClassLoader(), new Class<?>[]{ Datastore.class }, handler); }
Source:
<code><START> protected boolean isJUnit3Class(ASTCompilationUnit node) { <END> ASTClassOrInterfaceDeclaration cid = node.getFirstDescendantOfType(ASTClassOrInterfaceDeclaration.class); if (cid == null) { return false; } if (node.getType() != null && TypeHelper.isA(node, JUNIT3_CLASS_NAME)) { return true; } else if (node.getType() == null) { ASTExtendsList extendsList = cid.getFirstChildOfType(ASTExtendsList.class); if (extendsList == null) { return false; } if (((ASTClassOrInterfaceType) extendsList.getChild(0)).getImage().endsWith("TestCase")) { return true; } String className = cid.getSimpleName(); return className.endsWith("Test"); } else if (hasImports(node, JUNIT3_CLASS_NAME)) { return cid.getSimpleName().endsWith("Test"); } return false; }</code><technical_language>expose methods. methods called visiting CompilationUnit result is stored in fields, lines 38-40 above. fields protected, in rule</technical_language>

Target:
private boolean isJUnit3Class(ASTCompilationUnit node) { ASTClassOrInterfaceDeclaration cid = node.getFirstDescendantOfType(ASTClassOrInterfaceDeclaration.class); if (cid == null) { return false; } if (node.getType() != null && TypeHelper.isA(node, JUNIT3_CLASS_NAME)) { return true; } else if (node.getType() == null) { ASTExtendsList extendsList = cid.getFirstChildOfType(ASTExtendsList.class); if (extendsList == null) { return false; } if (((ASTClassOrInterfaceType) extendsList.getChild(0)).getImage().endsWith("TestCase")) { return true; } String className = cid.getSimpleName(); return className.endsWith("Test"); } else if (hasImports(node, JUNIT3_CLASS_NAME)) { return cid.getSimpleName().endsWith("Test"); } return false; }
Source:
<code>public Dialog onCreateDialog(Bundle savedInstanceState) { <START> Bundle args = getArguments(); <END> int titleResId = args.getInt(ARG_TITLE_RES); int messageResId = args.getInt(ARG_MESSAGE_RES); CharSequence title = titleResId != 0 ? getText(titleResId) : args.getString(ARG_TITLE); CharSequence message = messageResId != 0 ? getText(messageResId) : args.getString(ARG_MESSAGE); ButtonAttribute positiveButtonAttr = getArguments().getParcelable(ARG_POSITIVE_ATTR); ButtonAttribute negativeButtonAttr = getArguments().getParcelable(ARG_NEGATIVE_ATTR); AlertDialog alertDialog = new AlertDialog.Builder(getContext()) .setMessage(message) .setPositiveButton(positiveButtonAttr.getText(), positiveButtonAttr.getOnClickListener()) .create(); alertDialog.setCanceledOnTouchOutside(false); if (title != null) { alertDialog.setTitle(title); } if (negativeButtonAttr != null) { alertDialog.setButton(DialogInterface.BUTTON_NEGATIVE, negativeButtonAttr.getText(), negativeButtonAttr.getOnClickListener()); } return alertDialog; }</code><technical_language>local variables this function deserves final</technical_language>

Target:
public Dialog onCreateDialog(Bundle savedInstanceState) { final Bundle args = getArguments(); final int titleResId = args.getInt(ARG_TITLE_RES); final int messageResId = args.getInt(ARG_MESSAGE_RES); final CharSequence title = titleResId != 0 ? getText(titleResId) : args.getString(ARG_TITLE); final CharSequence message = messageResId != 0 ? getText(messageResId) : args.getString(ARG_MESSAGE); final ButtonAttribute positiveButtonAttr = getArguments().getParcelable(ARG_POSITIVE_ATTR); final ButtonAttribute negativeButtonAttr = getArguments().getParcelable(ARG_NEGATIVE_ATTR); final AlertDialog alertDialog = new AlertDialog.Builder(getContext()) .setMessage(message) .setPositiveButton(positiveButtonAttr.getText(), positiveButtonAttr.getOnClickListener()) .create(); alertDialog.setCanceledOnTouchOutside(false); if (title != null) { alertDialog.setTitle(title); } if (negativeButtonAttr != null) { alertDialog.setButton(DialogInterface.BUTTON_NEGATIVE, negativeButtonAttr.getText(), negativeButtonAttr.getOnClickListener()); } return alertDialog; }
Source:
<code>private static void getCorrelationForRHSColumn( Set<String> baseColumnNames, Map<String, Set<Expr>> equiConditions, String rhsColumn, Set<String> correlatedBaseColumns, Set<Expr> correlatedBaseExpressions ) { String findMappingFor = rhsColumn; Set<Expr> lhsExprs = equiConditions.get(findMappingFor); if (lhsExprs == null) { return; } for (Expr lhsExpr : lhsExprs) { String identifier = lhsExpr.getBindingIfIdentifier(); if (identifier == null) { Expr.BindingDetails bindingDetails = lhsExpr.analyzeInputs(); Set<String> requiredBindings = bindingDetails.getRequiredBindings(); <START> if (!requiredBindings.stream().allMatch(requiredBinding -> baseColumnNames.contains(requiredBinding))) { <END> break; } correlatedBaseExpressions.add(lhsExpr); } else { findMappingFor = identifier; if (baseColumnNames.contains(identifier)) { correlatedBaseColumns.add(findMappingFor); } else { getCorrelationForRHSColumn( baseColumnNames, equiConditions, findMappingFor, correlatedBaseColumns, correlatedBaseExpressions ); } } } }</code><technical_language>suggestion if (!baseColumnNames.containsAll(requiredBindings)) {</technical_language>

Target:
private static void getCorrelationForRHSColumn( Set<String> baseColumnNames, Map<String, Set<Expr>> equiConditions, String rhsColumn, Set<String> correlatedBaseColumns, Set<Expr> correlatedBaseExpressions ) { String findMappingFor = rhsColumn; Set<Expr> lhsExprs = equiConditions.get(findMappingFor); if (lhsExprs == null) { return; } for (Expr lhsExpr : lhsExprs) { String identifier = lhsExpr.getBindingIfIdentifier(); if (identifier == null) { Expr.BindingDetails bindingDetails = lhsExpr.analyzeInputs(); Set<String> requiredBindings = bindingDetails.getRequiredBindings(); if (!baseColumnNames.containsAll(requiredBindings)) { break; } correlatedBaseExpressions.add(lhsExpr); } else { findMappingFor = identifier; if (baseColumnNames.contains(identifier)) { correlatedBaseColumns.add(findMappingFor); } else { getCorrelationForRHSColumn( baseColumnNames, equiConditions, findMappingFor, correlatedBaseColumns, correlatedBaseExpressions ); } } } }
Source:
<code>private boolean diffuseSkylightInBlockColumn(Cube cube, MutableBlockPos pos, int minBlockY, int maxBlockY, Int2ObjectMap<FastCubeBlockAccess> blockAccessMap) { ICubicWorld world = cube.getWorld(); int cubeMinBlockY = Coords.cubeToMinBlock(cube.getY()); int cubeMaxBlockY = Coords.cubeToMaxBlock(cube.getY()); int blockYMax = Math.min(cubeMaxBlockY, maxBlockY); <START> int blockYMin = Math.max(cubeMinBlockY, minBlockY); <END> FastCubeBlockAccess blockAccess = blockAccessMap.get(cube.getY()); if (blockAccess == null) { blockAccess = new FastCubeBlockAccess(this.cache, cube, UPDATE_BUFFER_RADIUS); blockAccessMap.put(cube.getY(), blockAccess); } for (int blockY = blockYMax; blockY >= blockYMin; --blockY) { pos.setY(blockY); if (!needsSkylightUpdate(blockAccess, pos)) { continue; } if (!world.checkLightFor(EnumSkyBlock.SKY, pos)) { return false; } } return true; }</code><technical_language>this is confusing. minBlockY blockYMin</technical_language>

Target:
private boolean diffuseSkylightInBlockColumn(Cube cube, MutableBlockPos pos, int minBlockY, int maxBlockY, Int2ObjectMap<FastCubeBlockAccess> blockAccessMap) { ICubicWorld world = cube.getWorld(); int cubeMinBlockY = cubeToMinBlock(cube.getY()); int cubeMaxBlockY = cubeToMaxBlock(cube.getY()); int maxBlockYInCube = Math.min(cubeMaxBlockY, maxBlockY); int minBlockYInCube = Math.max(cubeMinBlockY, minBlockY); FastCubeBlockAccess blockAccess = blockAccessMap.get(cube.getY()); if (blockAccess == null) { blockAccess = new FastCubeBlockAccess(this.cache, cube, UPDATE_BUFFER_RADIUS); blockAccessMap.put(cube.getY(), blockAccess); } for (int blockY = maxBlockYInCube; blockY >= minBlockYInCube; --blockY) { pos.setY(blockY); if (!needsSkylightUpdate(blockAccess, pos)) { continue; } if (!world.checkLightFor(EnumSkyBlock.SKY, pos)) { return false; } } return true; }
Source:
<code>public void shouldVoidACondition() throws Exception { Condition condition = conditionService.getConditionByUuid(getUuid()); Assert.assertFalse(condition.isVoided()); MockHttpServletRequest req = request(RequestMethod.DELETE, getURI() + "/" + getUuid()); req.addParameter("reason", "unit test"); handle(req); condition = conditionService.getConditionByUuid(getUuid()); Assert.assertTrue(condition.isVoided()); Assert.assertEquals("unit test", condition.getVoidReason()); Assert.assertNotNull(condition.getDateVoided()); <START> } <END></code><technical_language>assert voidedBy is equal currently authenticated user</technical_language>

Target:
public void shouldVoidACondition() throws Exception { Condition condition = conditionService.getConditionByUuid(getUuid()); Assert.assertFalse(condition.isVoided()); MockHttpServletRequest req = request(RequestMethod.DELETE, getURI() + "/" + getUuid()); req.addParameter("reason", "unit test"); handle(req); condition = conditionService.getConditionByUuid(getUuid()); Assert.assertEquals(Context.getAuthenticatedUser().getUuid(), condition.getVoidedBy().getUuid()); Assert.assertTrue(condition.isVoided()); Assert.assertEquals("unit test", condition.getVoidReason()); Assert.assertNotNull(condition.getDateVoided()); }
Source:
<code>private void validateZkVersion() { String rootPath = keyBuilder.getRootPath(); <START> if (!zkClient.exists(rootPath)) { <END> try { zkClient.createPersistent(rootPath, ZK_PROTOCOL_VERSION); LOG.info("Created zk root node: " + rootPath + " with zk version " + ZK_PROTOCOL_VERSION); return; } catch (ZkNodeExistsException e) { LOG.warn("root path " + rootPath + " already exists."); } } Stat stat = new Stat(); String version = (String) zkClient.readData(rootPath, stat); if (version == null) { try { zkClient.writeData(rootPath, "1.0", stat.getVersion()); } catch (ZkBadVersionException e) { } version = (String) zkClient.readData(rootPath); } LOG.info("Current version for zk root node: " + rootPath + " is " + version + ", expected version is " + ZK_PROTOCOL_VERSION); if (!version.equals(ZK_PROTOCOL_VERSION)) { throw new SamzaException("ZK Protocol mismatch. Expected " + ZK_PROTOCOL_VERSION + "; found " + version); } }</code><technical_language>I recommend moving Line 447-458 a separate function called validateRootPath this is for version validation. I is single responsibility for function</technical_language>

Target:
public void validateZkVersion() { String rootPath = keyBuilder.getRootPath(); if (!zkClient.exists(rootPath)) { try { zkClient.createPersistent(rootPath, ZK_PROTOCOL_VERSION); LOG.info("Created zk root node: " + rootPath + " with zk version " + ZK_PROTOCOL_VERSION); return; } catch (ZkNodeExistsException e) { LOG.warn("root path " + rootPath + " already exists."); } } Stat stat = new Stat(); String version = (String) zkClient.readData(rootPath, stat); if (version == null) { try { zkClient.writeData(rootPath, "1.0", stat.getVersion()); } catch (ZkBadVersionException e) { } version = (String) zkClient.readData(rootPath); } LOG.info("Current version for zk root node: " + rootPath + " is " + version + ", expected version is " + ZK_PROTOCOL_VERSION); if (!version.equals(ZK_PROTOCOL_VERSION)) { throw new SamzaException("ZK Protocol mismatch. Expected " + ZK_PROTOCOL_VERSION + "; found " + version); } }
Source:
<code>void fillProcessDetailsElements(List<ProcessDetail> processDetailList, NodeList nodes, boolean isChild) { for (int i = 0; i < nodes.getLength(); i++) { Node node = nodes.item(i); Element element = (Element) node; String nodeName = element.getAttribute("name"); boolean filled = false; for (ProcessDetail detail : processDetailList) { if (Objects.nonNull(detail.getMetadataID()) && detail.getMetadataID().equals(nodeName)) { <START> if (isChild || Objects.isNull(getProcessDetailValue(detail)) || getProcessDetailValue(detail).isEmpty()) { <END> filled = true; if (node.getLocalName().equals("metadataGroup") && detail instanceof ProcessFieldedMetadata) { fillProcessDetailsElements(((ProcessFieldedMetadata) detail).getRows(), element.getChildNodes(), true); } else if (node.getLocalName().equals("metadata")) { setProcessDetailValue(detail, element.getTextContent()); } } break; } } if (!filled) { try { ProcessDetail newDetail = addProcessDetail(nodeName); this.processDetails.getRows().add(newDetail); if (newDetail instanceof ProcessFieldedMetadata) { fillProcessDetailsElements(((ProcessFieldedMetadata) newDetail).getRows(), element.getChildNodes(), true); } else { setProcessDetailValue(newDetail, element.getTextContent()); } } catch (NoSuchMetadataFieldException e) { logger.error(e.getMessage()); } } } }</code><technical_language>StringUtils.isBlank() (this is checking for null empty)</technical_language>

Target:
void fillProcessDetailsElements(List<ProcessDetail> processDetailList, NodeList nodes, boolean isChild) { for (int i = 0; i < nodes.getLength(); i++) { Node node = nodes.item(i); Element element = (Element) node; String nodeName = element.getAttribute("name"); boolean filled = false; for (ProcessDetail detail : processDetailList) { if (Objects.nonNull(detail.getMetadataID()) && detail.getMetadataID().equals(nodeName)) { if (isChild || StringUtils.isBlank(getProcessDetailValue(detail))) { filled = true; if (node.getLocalName().equals("metadataGroup") && detail instanceof ProcessFieldedMetadata) { fillProcessDetailsElements(((ProcessFieldedMetadata) detail).getRows(), element.getChildNodes(), true); } else if (node.getLocalName().equals("metadata")) { setProcessDetailValue(detail, element.getTextContent()); } } break; } } if (!filled) { try { ProcessDetail newDetail = addProcessDetail(nodeName); this.processDetails.getRows().add(newDetail); if (newDetail instanceof ProcessFieldedMetadata) { fillProcessDetailsElements(((ProcessFieldedMetadata) newDetail).getRows(), element.getChildNodes(), true); } else { setProcessDetailValue(newDetail, element.getTextContent()); } } catch (NoSuchMetadataFieldException e) { logger.error(e.getMessage()); } } } }
Source:
<code>public void beforeMigration(PartitionMigrationEvent event) { <START> for (DelegatingWanReplicationScheme wanReplication : wanReplications.values()) { <END> for (WanReplicationPublisher publisher : wanReplication.getPublishers()) { if (publisher instanceof MigrationAwareWanReplicationPublisher) { ((MigrationAwareWanReplicationPublisher) publisher).onMigrationStart(event); } } } }</code><technical_language>streaming api candidates in this class</technical_language>

Target:
public void beforeMigration(PartitionMigrationEvent event) { notifyMigrationAwarePublishers(p -> p.onMigrationStart(event)); }
Source:
<code>public BaseBackendResource locateResource(String href) throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException { href = removePrefix(href); ServiceTreeCrawler crawler = new ServiceTreeCrawler(Arrays.asList(href.split("/"))); BaseBackendResource resource = BackendApiResource.getInstance(); ServiceTreeNode node = null; while (crawler.hasNext()) { node = crawler.next(); if (node.isCollection()) { Method method = resource.getClass().getMethod(node.getGetter()); resource = <START> (BaseBackendResource)method.invoke(resource); <END> } else { Method method = resource.getClass().getMethod(node.getGetter(), String.class); resource = (BaseBackendResource)method.invoke(resource, crawler.getCurrentPathSegment()); } } return resource; }</code><technical_language>Add space here, parenthesis</technical_language>

Target:
public BaseBackendResource locateResource(String href) throws Exception { href = removePrefix(href); ServiceTreeCrawler crawler = new ServiceTreeCrawler(Arrays.asList(href.split("/"))); BaseBackendResource resource = BackendApiResource.getInstance(); ServiceTreeNode node = null; while (crawler.hasNext()) { node = crawler.next(); if (node.isCollection()) { Method method = resource.getClass().getMethod(node.getGetter()); resource = (BaseBackendResource) method.invoke(resource); } else { Method method = resource.getClass().getMethod(node.getGetter(), String.class); resource = (BaseBackendResource) method.invoke(resource, crawler.getCurrentPathSegment()); } } return resource; }
Source:
<code>public void onOOBText(String text) { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { try { String filteredOOB = ""; Pattern oobPattern = Pattern.compile("<param>(.+?)</param>"); Matcher oobMatcher = oobPattern.matcher(text); filteredOOB = oobMatcher.find() ? filteredOOB = oobMatcher.group(1) : ""; <START> responseKit.insertHTML(responseDoc, responseDoc.getLength(), "<font color=blue><b><br> > OOB: </b>" + filteredOOB, 0, 0, Tag.FONT); <END> } catch (BadLocationException | IOException e) { log.error("ProgramAB onOOBText error : {}", e); } } }); }</code><technical_language>here, do close font tag? single &gt; floating there</technical_language>

Target:
public void onOOBText(String text) { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { try { responseKit.insertHTML(responseDoc, responseDoc.getLength(), "<font color=blue><b>&nbsp;&gt;&nbsp;OOB: </b>" + HtmlFilter.stripHtml(text).trim() + "</font>", 0, 0, null); } catch (BadLocationException | IOException e) { log.error("ProgramAB onOOBText error : {}", e); } } }); }
Source:
<code>public void shouldAlertOnceGivenMultipleMatchesHTML() throws HttpMalformedHeaderException, URIException { String body = "<h1>Some text <script>eval()</script></h1>\n" + "<p><b>Just some words going on</b>\n" + "<script>bypassSecurityTrustHtml()</script></p>\n"; HttpMessage msg = createHttpMessageWithRespBody(body, "text/html;charset=ISO-8859-1"); rule.scanHttpResponseReceive(msg, -1, createSource(msg)); <START> assertThat(alertsRaised, hasSize(1)); <END> }</code><technical_language>assert evidence (and test)</technical_language>

Target:
public void shouldAlertOnceGivenMultipleMatchesHTML() throws HttpMalformedHeaderException, URIException { String body = "<h1>Some text <script>eval()</script></h1>\n" + "<p><b>Just some words going on</b>\n" + "<script>bypassSecurityTrustHtml()</script></p>\n"; HttpMessage msg = createHttpMessageWithRespBody(body, "text/html;charset=ISO-8859-1"); rule.scanHttpResponseReceive(msg, -1, createSource(msg)); assertThat(alertsRaised, hasSize(1)); assertEquals("eval", alertsRaised.get(0).getEvidence()); }
Source:
<code>catch (Exception e) { <START> throw new IncompatibleJvmException("LZ4 requires access to sum.misc.Unsafe"); <END> }</code><technical_language>Typo: "su*m*.misc...."</technical_language>

Target:
catch (Exception e) { throw new IncompatibleJvmException("LZ4 requires access to sun.misc.Unsafe"); }
Source:
<code>public static PriceDraftBuilder of(final Price template) { <START> final CustomFieldsDraft customFieldsDraft = Optional.ofNullable(template.getCustom()) <END> .map(customFields -> CustomFieldsDraftBuilder.of(customFields).build()) .orElse(null); return of(template.getValue()) .country(template.getCountry()) .customerGroup(template.getCustomerGroup()) .channel(template.getChannel()) .validFrom(template.getValidFrom()) .validUntil(template.getValidUntil()) .custom(customFieldsDraft); }</code><technical_language>I meant (it's wrote, I a typo in line of method) java public PriceDraftBuilder custom(@Nullable final CustomFields custom) { this.custom = Optional.ofNullable(custom) .map(customFields -> CustomFieldsDraftBuilder.of(customFields).build()) .orElse(null); return this; } need override custom method here? add this logic existing one</technical_language>

Target:
public static PriceDraftBuilder of(final Price template) { return of(template.getValue()) .country(template.getCountry()) .customerGroup(template.getCustomerGroup()) .channel(template.getChannel()) .validFrom(template.getValidFrom()) .validUntil(template.getValidUntil()) .custom(copyCustom(template)); }
Source:
<code>private static Changeset computeLatestChangeset(Map<Integer, Changeset> lineChangesets) { return lineChangesets.values().stream() .collect(Collectors.maxBy(Comparator.comparing(Changeset::getDate))) <START> .orElse(null); <END> }</code><technical_language>ScmInfo#getLatestChangeset() return null, orElseNull() replaced orElseThrow(...)</technical_language>

Target:
private static Changeset computeLatestChangeset(Map<Integer, Changeset> lineChangesets) { return lineChangesets.values().stream().max(Comparator.comparingLong(Changeset::getDate)) .orElseThrow(() -> new IllegalStateException("Expecting at least one Changeset to be present")); }
Source:
<code><START> public ResultSegmentDruid<ListBlobItem> listBlobsWithPrefixInContainerSegmented( <END> final String containerName, final String prefix, ResultContinuation continuationToken, int maxResults ) throws StorageException, URISyntaxException { CloudBlobContainer cloudBlobContainer = cloudBlobClient.getContainerReference(containerName); return new ResultSegmentDruid<ListBlobItem>(cloudBlobContainer .listBlobsSegmented( prefix, USE_FLAT_BLOB_LISTING, EnumSet .noneOf(BlobListingDetails.class), maxResults, (ResultContinuation) null, (BlobRequestOptions) null, (OperationContext) null )); }</code><technical_language>Do want a unit test flat blob listing</technical_language>

Target:
ResultSegment<ListBlobItem> listBlobsWithPrefixInContainerSegmented( final String containerName, final String prefix, ResultContinuation continuationToken, int maxResults ) throws StorageException, URISyntaxException { CloudBlobContainer cloudBlobContainer = cloudBlobClient.getContainerReference(containerName); return cloudBlobContainer .listBlobsSegmented( prefix, USE_FLAT_BLOB_LISTING, EnumSet .noneOf(BlobListingDetails.class), maxResults, continuationToken, null, null ); }
Source:
<code>private Set<String> extractThemeTrackSet(JsonObject talkObject, String code, String title) { Set<String> themeTrackSet = new HashSet<>(Arrays.asList(talkObject.getJsonObject("track").getString("id"))); if (!trackIdSet.containsAll(themeTrackSet)) { throw new IllegalStateException("The talk (" + title + ") with id (" + code <START> + ") contains trackId " + themeTrackSet.toString() + " that doesn't exist in the trackIdSet."); <END> } return themeTrackSet; }</code><technical_language>toString() is obsolete () delimate start end of in other exceptions (even Set adding it), "... trackId (" + themeTrackSet + ") ..."</technical_language>

Target:
private Set<String> extractThemeTrackSet(JsonObject talkObject, String code, String title) { Set<String> themeTrackSet = new HashSet<>(Arrays.asList(talkObject.getJsonObject("track").getString("id"))); if (!trackIdSet.containsAll(themeTrackSet)) { throw new IllegalStateException("The talk (" + title + ") with id (" + code + ") contains trackId (" + themeTrackSet + ") that doesn't exist in the trackIdSet."); } return themeTrackSet; }
Source:
<code>private void validateGatewayMerchantId(JsonNode payload) { <START> throwIfInvalidFieldOperation(payload, ADD_OP); <END> throwIfNullFieldValue(payload.get(FIELD_VALUE)); }</code><technical_language>I need replace op for updating existing</technical_language>

Target:
private void validateGatewayMerchantId(JsonNode payload) { throwIfInvalidFieldOperation(payload, ADD_OP, REPLACE_OP); throwIfNullFieldValue(payload.get(FIELD_VALUE)); throwIfBlankFieldValue(payload.get(FIELD_VALUE)); }
Source:
<code>private String getAppNameWithHash() { <START> return (config.getAppName().hashCode() % 10000) + "_" + config.getAppName(); <END> }</code><technical_language>nit: I prefer String.format</technical_language>

Target:
private String getAppNameWithHash() { return String.format("%d_%s", config.getAppName().hashCode() % 10000, config.getAppName()); }
Source:
<code>public void testGetComputeProviderMetadata() { List<ResourceProviderMetaData> computeMetaData = api().get(PROVIDER); assertNotNull(computeMetaData); boolean foundVMResource = false; for (ResourceProviderMetaData m : computeMetaData) { if (m.resourceType().equals(VM_RESOURCE_TYPE)) { foundVMResource = true; break; } } <START> assertTrue(foundVMResource); <END> }</code><technical_language>iterables.any</technical_language>

Target:
public void testGetComputeProviderMetadata() { List<ResourceProviderMetaData> resourceProviderMetaDatas = api().get(PROVIDER); assertNotNull(resourceProviderMetaDatas); assertTrue(Iterables.any(resourceProviderMetaDatas, new Predicate<ResourceProviderMetaData>() { @Override public boolean apply(final ResourceProviderMetaData providerMetaData) { return providerMetaData.resourceType().equals(VM_RESOURCE_TYPE); } })); }
Source:
<code>public void actionPerformed(ActionEvent e) { DbxClient client = DbxUtil.getDbxClient(); if (client == null) { LOGGER.log("Dropbox account already disconnected."); return; } String userToken = client.getAccessToken(); if (userToken != null && !userToken.isEmpty()) { try { client.disableAccessToken(); drtc.updateRevisionsList(null); drtc.close(); ApplicationSettings appSettings = SettingsService.loadApplicationSettings(); appSettings.setDropboxToken(""); SettingsService.saveApplicationSettings(appSettings); LOGGER.log("Successfully disconnected from Dropbox account."); } catch (DbxException ex) { JOptionPane.showMessageDialog(null, <START> "Invalid access token! Open LaTeX Studio has NOT been connected with Dropbox.\n Please try again and provide correct access token.", <END> "Invalid token", JOptionPane.ERROR_MESSAGE); } } else { LOGGER.log("Dropbox account already disconnected."); } }</code><technical_language>This error message updated. I in code, zero chance for this catch hit. Perhaps, this happen in case of some connectivity issues Dropbox. I suppose advise user in this case try in message</technical_language>

Target:
public void actionPerformed(ActionEvent e) { DbxClient client = DbxUtil.getDbxClient(); if (client == null) { LOGGER.log("Dropbox account already disconnected."); return; } String userToken = client.getAccessToken(); if (userToken != null && !userToken.isEmpty()) { try { client.disableAccessToken(); drtc.updateRevisionsList(null); drtc.close(); ApplicationSettings appSettings = SettingsService.loadApplicationSettings(); appSettings.setDropboxToken(""); SettingsService.saveApplicationSettings(appSettings); LOGGER.log("Successfully disconnected from Dropbox account."); } catch (DbxException ex) { DbxUtil.showDbxAccessDeniedPrompt(); } } else { LOGGER.log("Dropbox account already disconnected."); } }
Source:
<code>public void MercuryCuratedMainPageTest_006_CheckWrongCategoryAlert() { CuratedContentPageObject ccp = new CuratedContentPageObject(driver); wikiURL = urlBuilder.getUrlForWiki(MercuryWikis.MERCURY_CC); ccp.openMercuryArticleByNameWithNoCacheBuster(wikiURL, MercurySubpages.CC_MAIN_PAGE); MercuryAlertComponentObject mercuryAlert = new MercuryAlertComponentObject( driver, Mercury.AlertMessage.NOT_EXISTING_CATEGORY); <START> <END> String oldUrl = driver.getCurrentUrl(); ccp.clickOnCuratedContentElementByIndex(2); Assertion.assertTrue(mercuryAlert.isAlertMessageVisible()); ccp.waitForLoadingSpinnerToFinish(); Assertion.assertUrlEqualToCurrentUrl(driver, oldUrl); }</code><technical_language>remove extra line</technical_language>

Target:
public void MercuryCuratedMainPageTest_006_CheckWrongCategoryAlert() { CuratedContentPageObject ccp = new CuratedContentPageObject(driver); wikiURL = urlBuilder.getUrlForWiki(MercuryWikis.MERCURY_CC); ccp.openMercuryArticleByNameWithNoCacheBuster(wikiURL, MercurySubpages.CC_MAIN_PAGE); MercuryAlertComponentObject mercuryAlert = new MercuryAlertComponentObject( driver, MercuryAlertComponentObject.AlertMessage.NOT_EXISTING_CATEGORY); String oldUrl = driver.getCurrentUrl(); ccp.clickOnCuratedContentElementByIndex(2); Assertion.assertTrue(mercuryAlert.isAlertMessageVisible()); ccp.waitForLoadingSpinnerToFinish(); Assertion.assertUrlEqualToCurrentUrl(driver, oldUrl); }
Source:
<code>@Override public IgniteInternalFuture<?> putAllAsync(final Map<? extends K, ? extends V> m) { if (F.isEmpty(m)) return new GridFinishedFuture<Object>(); if (keyCheck) validateCacheKeys(m.keySet()); <START> checkKeysOrdered(m, "Put All"); <END> return putAllAsync0(m); }</code><technical_language>"Put Async" used</technical_language>

Target:
@Override public IgniteInternalFuture<?> putAllAsync(final Map<? extends K, ? extends V> m) { if (F.isEmpty(m)) return new GridFinishedFuture<Object>(); if (keyCheck) validateCacheKeys(m.keySet()); warnIfUnordered(m, BulkOperation.PUT); return putAllAsync0(m); }