auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
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; } OneSignal.onesignalLog(LOG_LEVEL.VERBOSE, "setAppContext(context) successful and appId is set, continuing OneSignal init..."); init(); }

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:
public boolean isAdvertiseSidebandAll() { return advertiseSidebandAll; }

Target:
public boolean isAdvertiseSidebandAll() { return advertiseSidebandAll && allowSidebandAll; }
Source:
public GoConfigHolder migrate() { try { return upgrade(); } catch (Exception e) { e.printStackTrace(); upgradeFailedHandler.handle(e); } return null; }

Target:
public GoConfigHolder migrate() { try { return upgrade(); } catch (Exception e) { upgradeFailedHandler.handle(e); } return null; }
Source:
public void iterateAssignees() throws Exception { final Repo repo = RtRepoITCase.repo(); Assume.assumeThat(repo, Matchers.notNullValue()); MatcherAssert.assertThat( repo.assignees().iterate(), Matchers.not(Matchers.emptyIterable()) ); }

Target:
public void iterateAssignees() throws Exception { final Repo repo = RtRepoITCase.repo(); MatcherAssert.assertThat( repo.assignees().iterate(), Matchers.not(Matchers.emptyIterable()) ); }
Source:
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()) { Config userDefinedConfig = new Gson().fromJson(IOUtils.toString(new FileInputStream(userConfiguredSslConfigFile)), Config.class); config.overrideWith(userDefinedConfig).setDefaults(); } } } catch (IOException e) { throw new RuntimeException(e.getMessage(), e); } }

Target:
public ConfigurableSSLSettings(SystemEnvironment systemEnvironment) { this.systemEnvironment = systemEnvironment; }
Source:
public String getExpression() { return "\"" + Generator.escape(toCss()) + "\""; }

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

Target:
static <T> T getRandomElementFromList(List<T> list) { if (list.isEmpty()) { return null; } return list.get(ThreadLocalRandom.current().nextInt(list.size())); }
Source:
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()); sessions.add(String.valueOf(sessionIdentifier)); 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()); }

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:
public PatronAccess getPatronAccess(PID target) { List<PID> pidPath = getPidPath(target); if (pidPath.size() < 3) { 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; }

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:
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(getType(Book.class)); dictionary.bindEntity(getType(Author.class)); dictionary.bindEntity(getType(Publisher.class)); dictionary.bindEntity(getType(Pseudonym.class)); dictionary.bindEntity(getType(Address.class)); }

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:
public DiagnosticMessage getUnresolvedProxyMessage(ILinkingDiagnosticContext context) { String message = "Could not find declaration of '" + context.getLinkText() + "'"; return new DiagnosticMessage(message, Severity.ERROR, Diagnostic.LINKING_DIAGNOSTIC); }

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:
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); 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); } }

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:
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(); log.warn("Request " + method + " " + uri + (query.isEmpty() ? "":("?" + query)) + " took: "+ duration + " ms, exceeds " + this.timeThreshold +" ms threshold"); } } finally { if (nextListener != null) { nextListener.proceed(); } } }

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:
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()) { if (commitError == null) { raft.getStateMachine().<Long>apply(entry.index()); } } }); }, raft.getThreadContext()); }

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:
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; databaseResetListener.onDatabaseReset(db); callResetListenerOnDatabaseReset = true; } }

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:
protected Datastore proxy(InvocationHandler handler) throws Exception { Class proxy = Proxy.getProxyClass(Datastore.class.getClassLoader(), Datastore.class); Constructor constructor = proxy.getConstructor(InvocationHandler.class); return (Datastore) constructor.newInstance(handler); }

Target:
protected Datastore proxy(InvocationHandler handler) throws Exception { return (Datastore) Proxy.newProxyInstance(Datastore.class.getClassLoader(), new Class<?>[]{ Datastore.class }, handler); }
Source:
protected 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; }

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:
public Dialog onCreateDialog(Bundle savedInstanceState) { Bundle args = getArguments(); 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; }

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:
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 (!requiredBindings.stream().allMatch(requiredBinding -> baseColumnNames.contains(requiredBinding))) { break; } correlatedBaseExpressions.add(lhsExpr); } else { findMappingFor = identifier; if (baseColumnNames.contains(identifier)) { correlatedBaseColumns.add(findMappingFor); } else { getCorrelationForRHSColumn( baseColumnNames, equiConditions, findMappingFor, correlatedBaseColumns, correlatedBaseExpressions ); } } } }

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:
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); int blockYMin = 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 = blockYMax; blockY >= blockYMin; --blockY) { pos.setY(blockY); if (!needsSkylightUpdate(blockAccess, pos)) { continue; } if (!world.checkLightFor(EnumSkyBlock.SKY, pos)) { return false; } } return true; }

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:
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()); }

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:
private 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); } }

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:
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 || Objects.isNull(getProcessDetailValue(detail)) || getProcessDetailValue(detail).isEmpty()) { 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()); } } } }

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:
public void beforeMigration(PartitionMigrationEvent event) { for (DelegatingWanReplicationScheme wanReplication : wanReplications.values()) { for (WanReplicationPublisher publisher : wanReplication.getPublishers()) { if (publisher instanceof MigrationAwareWanReplicationPublisher) { ((MigrationAwareWanReplicationPublisher) publisher).onMigrationStart(event); } } } }

Target:
public void beforeMigration(PartitionMigrationEvent event) { notifyMigrationAwarePublishers(p -> p.onMigrationStart(event)); }
Source:
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 = (BaseBackendResource)method.invoke(resource); } else { Method method = resource.getClass().getMethod(node.getGetter(), String.class); resource = (BaseBackendResource)method.invoke(resource, crawler.getCurrentPathSegment()); } } return resource; }

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:
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) : ""; responseKit.insertHTML(responseDoc, responseDoc.getLength(), "<font color=blue><b><br> > OOB: </b>" + filteredOOB, 0, 0, Tag.FONT); } catch (BadLocationException | IOException e) { log.error("ProgramAB onOOBText error : {}", e); } } }); }

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:
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)); }

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:
catch (Exception e) { throw new IncompatibleJvmException("LZ4 requires access to sum.misc.Unsafe"); }

Target:
catch (Exception e) { throw new IncompatibleJvmException("LZ4 requires access to sun.misc.Unsafe"); }
Source:
public static PriceDraftBuilder of(final Price template) { final CustomFieldsDraft customFieldsDraft = Optional.ofNullable(template.getCustom()) .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); }

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:
private static Changeset computeLatestChangeset(Map<Integer, Changeset> lineChangesets) { return lineChangesets.values().stream() .collect(Collectors.maxBy(Comparator.comparing(Changeset::getDate))) .orElse(null); }

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:
public ResultSegmentDruid<ListBlobItem> listBlobsWithPrefixInContainerSegmented( 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 )); }

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:
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.toString() + " that doesn't exist in the trackIdSet."); } return themeTrackSet; }

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:
private void validateGatewayMerchantId(JsonNode payload) { throwIfInvalidFieldOperation(payload, ADD_OP); throwIfNullFieldValue(payload.get(FIELD_VALUE)); }

Target:
private void validateGatewayMerchantId(JsonNode payload) { throwIfInvalidFieldOperation(payload, ADD_OP, REPLACE_OP); throwIfNullFieldValue(payload.get(FIELD_VALUE)); throwIfBlankFieldValue(payload.get(FIELD_VALUE)); }
Source:
private String getAppNameWithHash() { return (config.getAppName().hashCode() % 10000) + "_" + config.getAppName(); }

Target:
private String getAppNameWithHash() { return String.format("%d_%s", config.getAppName().hashCode() % 10000, config.getAppName()); }
Source:
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; } } assertTrue(foundVMResource); }

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:
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, "Invalid access token! Open LaTeX Studio has NOT been connected with Dropbox.\n Please try again and provide correct access token.", "Invalid token", JOptionPane.ERROR_MESSAGE); } } else { LOGGER.log("Dropbox account already disconnected."); } }

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:
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); String oldUrl = driver.getCurrentUrl(); ccp.clickOnCuratedContentElementByIndex(2); Assertion.assertTrue(mercuryAlert.isAlertMessageVisible()); ccp.waitForLoadingSpinnerToFinish(); Assertion.assertUrlEqualToCurrentUrl(driver, oldUrl); }

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:
@Override public IgniteInternalFuture<?> putAllAsync(final Map<? extends K, ? extends V> m) { if (F.isEmpty(m)) return new GridFinishedFuture<Object>(); if (keyCheck) validateCacheKeys(m.keySet()); checkKeysOrdered(m, "Put All"); return putAllAsync0(m); }

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); }
Source:
static BattleGroup createFirstStrike( final Collection<UnitType> unitTypes, final GameProperties properties) { final List<FiringSquadron> firingSquadrons = FiringSquadron.createWithTargetInformation(unitTypes).stream() .map( firingSquadron -> { return createFiringSquadron( firingSquadron, unitIsFirstStrike(properties), noDestroyerPresent()) .name(FIRST_STRIKE_UNITS) .build(); }) .collect(Collectors.toList()); final BattleGroup.BattleGroupBuilder battleGroupBuilder = BattleGroup.builder() .offenseSquadrons(firingSquadrons) .fireType(BattleState.FireType.NORMAL) .casualtiesOnDefenseReturnFire(false); if (Properties.getDefendingSubsSneakAttack(properties)) { battleGroupBuilder.defenseSquadrons(firingSquadrons).casualtiesOnOffenseReturnFire(false); } return battleGroupBuilder.build(); }

Target:
static BattleGroup createFirstStrike( final Collection<UnitType> unitTypes, final GameProperties properties) { final List<FiringSquadron> firingSquadrons = FiringSquadron.createWithTargetInformation(unitTypes).stream() .map( firingSquadron -> firingSquadron.toBuilder() .firingUnitsAnd(unitIsFirstStrike(properties)) .enemyUnitRequirements(noDestroyerPresent()) .name(FIRST_STRIKE_UNITS) .build()) .collect(Collectors.toList()); return BattleGroup.builder() .fireType(BattleState.FireType.NORMAL) .offenseSquadrons(firingSquadrons) .casualtiesOnDefenseReturnFire(false) .defenseSquadrons( Properties.getDefendingSubsSneakAttack(properties) ? firingSquadrons : List.of()) .casualtiesOnOffenseReturnFire(!Properties.getDefendingSubsSneakAttack(properties)) .build(); }
Source:
private String getSubmissionFormTableHeaderFragmentHtml(String questionNumberString, String responseNumberString) { StringBuilder tableHeaderFragmentHtml = new StringBuilder(); String tableHeaderFragmentTemplate = FeedbackQuestionFormTemplates.RUBRIC_SUBMISSION_FORM_HEADER_FRAGMENT; if(getChoiceAssginedWeight(rubricChoices) == null){ for(int i = 0 ; i < numOfRubricChoices ; i++) { String tableHeaderCell = FeedbackQuestionFormTemplates.populateTemplate(tableHeaderFragmentTemplate, "${qnIndex}", questionNumberString, "${respIndex}", responseNumberString, "${col}", Integer.toString(i), "${rubricChoiceValue}", (rubricChoices.get(i) + "(" + (numOfRubricChoices-i) + ")")); tableHeaderFragmentHtml.append(tableHeaderCell + Const.EOL); } }else{ for(int i = 0 ; i < numOfRubricChoices ; i++) { String tableHeaderCell = FeedbackQuestionFormTemplates.populateTemplate(tableHeaderFragmentTemplate, "${qnIndex}", questionNumberString, "${respIndex}", responseNumberString, "${col}", Integer.toString(i), "${rubricChoiceValue}", rubricChoices.get(i)); tableHeaderFragmentHtml.append(tableHeaderCell + Const.EOL); } } return tableHeaderFragmentHtml.toString(); }

Target:
private String getSubmissionFormTableHeaderFragmentHtml(String questionNumberString, String responseNumberString) { StringBuilder tableHeaderFragmentHtml = new StringBuilder(); String tableHeaderFragmentTemplate = FeedbackQuestionFormTemplates.RUBRIC_SUBMISSION_FORM_HEADER_FRAGMENT; for(int i = 0; i < numOfRubricChoices; i++) { String tableHeaderCell = FeedbackQuestionFormTemplates.populateTemplate(tableHeaderFragmentTemplate, "${qnIndex}", questionNumberString, "${respIndex}", responseNumberString, "${col}", Integer.toString(i), "${rubricChoiceValue}", (rubricChoices.get(i) + " (" + (i+1) + ")")); tableHeaderFragmentHtml.append(tableHeaderCell + Const.EOL); } return tableHeaderFragmentHtml.toString(); }
Source:
Loader( final TaskScheduler taskScheduler, final Environment environment, final GenieFileTransferService fileTransferService, final MeterRegistry registry ) { this.environment = environment; this.registry = registry; this.fileTransferService = fileTransferService; final long refreshRate = environment.getProperty( ScriptLoadBalancerProperties.REFRESH_RATE_PROPERTY, Long.class, 300_000L ); taskScheduler.scheduleWithFixedDelay(this::refresh, refreshRate); }

Target:
protected Loader( final TaskScheduler taskScheduler, final Environment environment, final GenieFileTransferService fileTransferService, final MeterRegistry registry ) { this.environment = environment; this.registry = registry; this.fileTransferService = fileTransferService; final long refreshRate = environment.getProperty( ScriptLoadBalancerProperties.REFRESH_RATE_PROPERTY, Long.class, 300_000L ); taskScheduler.scheduleWithFixedDelay(this::refresh, refreshRate); }
Source:
protected synchronized void forceStop() { System.out.println("Stopping in forcestop"); if( isProcessRunning()) { try { process.terminate(); addForceStopEvent(); } catch( DebugException e ) { addForceStopFailedEvent(e); } } process = null; getActualBehavior().setServerStopped(); nextStopRequiresForce = false; }

Target:
protected synchronized void forceStop() { if( isProcessRunning()) { try { process.terminate(); addForceStopEvent(); } catch( DebugException e ) { addForceStopFailedEvent(e); } } process = null; getActualBehavior().setServerStopped(); nextStopRequiresForce = false; }