auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void testForceDeleteArtifactNotAllowed(@MavenRepository(repositoryId = REPOSITORY_WITH_TRASH_1) @RepositoryAttributes(trashEnabled = true) Repository repository, @MavenTestArtifact(repositoryId = REPOSITORY_WITH_TRASH_1, id = "org.carlspring.strongbox:test-artifact-to-trash", versions = "1.0") Path artifactPath) throws IOException { final String storageId = repository.getStorage().getId(); final String repositoryId = repository.getId(); final RootRepositoryPath repositoryPath = repositoryPathResolver.resolve(repository); final String artifactPathStr = repositoryPath.relativize(artifactPath).toString(); <START> final RepositoryPath artifactRepositoryPath = repositoryPathResolver.resolve(repository, artifactPathStr); <END> client.delete(storageId, repositoryId, artifactPathStr, false); final Path artifactFile = RepositoryFiles.trash(artifactRepositoryPath); logger.debug("Artifact file: {}", artifactFile.toAbsolutePath()); assertTrue(Files.exists(artifactFile), "Should have moved the artifact to the trash during a force delete operation, " + "when allowsForceDeletion is not enabled!"); final Path repositoryIndexDir = repositoryPath.resolve(".index"); assertTrue(Files.exists(repositoryIndexDir), "Should not have deleted .index directory!"); }</code><technical_language>@ptirador injected artifactPath here</technical_language>

Target:
public void testForceDeleteArtifactNotAllowed(@MavenRepository(repositoryId = REPOSITORY_WITH_TRASH_1) @RepositoryAttributes(trashEnabled = true) Repository repository, @MavenTestArtifact(repositoryId = REPOSITORY_WITH_TRASH_1, id = "org.carlspring.strongbox:test-artifact-to-trash", versions = "1.0") Path artifactPath) throws IOException { final String storageId = repository.getStorage().getId(); final String repositoryId = repository.getId(); final RepositoryPath artifactRepositoryPath = (RepositoryPath) artifactPath.normalize(); final String artifactRepositoryPathStr = RepositoryFiles.relativizePath(artifactRepositoryPath); client.delete(storageId, repositoryId, artifactRepositoryPathStr, false); final Path artifactFile = RepositoryFiles.trash(artifactRepositoryPath); logger.debug("Artifact file: {}", artifactFile.toAbsolutePath()); assertTrue(Files.exists(artifactFile), "Should have moved the artifact to the trash during a force delete operation, " + "when allowsForceDeletion is not enabled!"); final RootRepositoryPath repositoryPath = repositoryPathResolver.resolve(repository); final Path repositoryIndexDir = repositoryPath.resolve(LayoutFileSystem.INDEX); assertTrue(Files.exists(repositoryIndexDir), "Should not have deleted .index directory!"); }
Source:
<code>public ProductBodyguard() { <START> super("SoapUIOSPluginSignChecker", 1.0, "The new plugin framework restriction"); <END> }</code><technical_language>"The new plugin framework restriction" replaced "Plugin signature validity checker", I think. new for long, restriction there, really, technically</technical_language>

Target:
public ProductBodyguard() { super("SoapUIOSPluginSignChecker", 1.0, "Plugin signature validity checker"); }
Source:
<code>private static ImmutableList<Arguments> getRequiredArgs(final Ds3Request ds3Request) { final ImmutableList.Builder<Arguments> requiredArgsBuilder = ImmutableList.builder(); LOG.debug("Getting required args..."); if (ds3Request.getBucketRequirement() == Requirement.REQUIRED) { LOG.debug("bucket name REQUIRED."); requiredArgsBuilder.add(new Arguments("String", "bucketName")); if (ds3Request.getObjectRequirement() == Requirement.REQUIRED) { LOG.debug("object name REQUIRED."); requiredArgsBuilder.add(new Arguments("String", "objectName")); } } LOG.debug("Getting required query params..."); if (ds3Request.getRequiredQueryParams() != null) { for (final Ds3Param ds3Param : ds3Request.getRequiredQueryParams()) { if (ds3Param == null) { break; } <START> LOG.debug(indent(1) + "query param " + ds3Param.getType().toString()); <END> final String paramType = ds3Param.getType().substring(ds3Param.getType().lastIndexOf(".") + 1); LOG.debug("param " + paramType + " is required."); requiredArgsBuilder.add(new Arguments(paramType, ds3Param.getName())); } } return requiredArgsBuilder.build(); }</code><technical_language>indenting in logs</technical_language>

Target:
private static ImmutableList<Arguments> getRequiredArgs(final Ds3Request ds3Request) { final ImmutableList.Builder<Arguments> requiredArgsBuilder = ImmutableList.builder(); LOG.debug("Getting required args..."); if (ds3Request.getBucketRequirement() == Requirement.REQUIRED) { LOG.debug("bucket name REQUIRED."); requiredArgsBuilder.add(new Arguments("String", "bucketName")); if (ds3Request.getObjectRequirement() == Requirement.REQUIRED) { LOG.debug("object name REQUIRED."); requiredArgsBuilder.add(new Arguments("String", "objectName")); } } LOG.debug("Getting required query params..."); if (ds3Request.getRequiredQueryParams() != null) { for (final Ds3Param ds3Param : ds3Request.getRequiredQueryParams()) { if (ds3Param == null) { break; } LOG.debug("query param " + ds3Param.getType().toString()); final String paramType = ds3Param.getType().substring(ds3Param.getType().lastIndexOf(".") + 1); LOG.debug("param " + paramType + " is required."); requiredArgsBuilder.add(new Arguments(paramType, ds3Param.getName())); } } return requiredArgsBuilder.build(); }
Source:
<code>public void endWindow() { HashMap<K, Integer> tuple = new HashMap<>(); for (Map.Entry<K, MutableInt> e : map.entrySet()) { if (tuple == null) { tuple = new HashMap<>(); } if (!oldMap.containsKey(e.getKey())) { tuple.put(e.getKey(), e.getValue().toInteger()); <START> oldMap.put(e.getKey(), e.getValue().toInteger()); <END> } else { tuple.put(e.getKey(), e.getValue().toInteger()); oldMap.put(e.getKey(), e.getValue().toInteger() + oldMap.get(e.getKey())); } } count.emit(tuple); }</code><technical_language>is purpose of cumulative this change? is map cleared</technical_language>

Target:
public void endWindow() { HashMap<K, Integer> tuple = new HashMap<>(); for (K key: inputSet) { tuple.put(key, map.get(key).toInteger()); } count.emit(tuple); if (!cumulative) { map.clear(); } inputSet.clear(); }
Source:
<code>public void run() { thread = Thread.currentThread(); while (shouldKeepRunning()) { long startRun = System.currentTimeMillis(); poll(); boolean rejected = false; while (context.hasScheduled() && !rejected && active) { final SlotKey slotKey = context.getNextScheduled(); if (slotKey == null) { continue; } try { UpdateStamp stamp = shardStateManager.getUpdateStamp(slotKey); long currentTimeMillis = context.getCurrentTimeMillis(); final long timeElapsedSinceLastRollup = currentTimeMillis - stamp.getLastRollupTimestamp(); <START> boolean isReroll = timeElapsedSinceLastRollup < ShardStateManager.DELAYED_METRICS_MAX_ALLOWED_DELAY; <END> log.info("Scheduling slotKey @ last ingest: last rollup time: isReroll: {}", new Object[]{slotKey, currentTimeMillis, stamp.getTimestamp(), stamp.getLastRollupTimestamp(), isReroll}); locatorFetchExecutors.execute(new LocatorFetchRunnable(context, slotKey, rollupReadExecutors, rollupWriteExecutors, enumValidatorExecutor)); } catch (RejectedExecutionException ex) { rejectedSlotChecks.mark(); context.pushBackToScheduled(slotKey, true); rejected = true; } } long endRun = System.currentTimeMillis(); if (endRun - startRun > pollerPeriod) log.error("It took longer than to poll for rollups.", pollerPeriod); else try { thread.sleep(Math.max(0, pollerPeriod - endRun + startRun)); } catch (Exception ex) { log.debug("RollupService poller woke up"); } } }</code><technical_language>"premature rollups" condition in test get logged a reroll</technical_language>

Target:
public void run() { thread = Thread.currentThread(); while (shouldKeepRunning()) { long startRun = System.currentTimeMillis(); poll(); boolean rejected = false; while (context.hasScheduled() && !rejected && active) { final SlotKey slotKey = context.getNextScheduled(); if (slotKey == null) { continue; } try { UpdateStamp stamp = shardStateManager.getUpdateStamp(slotKey); long currentTimeMillis = context.getCurrentTimeMillis(); final long timeElapsedSinceLastRollup = currentTimeMillis - stamp.getLastRollupTimestamp(); boolean isReroll = timeElapsedSinceLastRollup < ShardStateManager.REROLL_TIME_SPAN_ASSUMED_VALUE; log.info("Scheduling slotKey @ last ingest: last rollup time: isReroll: {}", new Object[]{slotKey, currentTimeMillis, stamp.getTimestamp(), stamp.getLastRollupTimestamp(), isReroll}); locatorFetchExecutors.execute(new LocatorFetchRunnable(context, slotKey, rollupReadExecutors, rollupWriteExecutors, enumValidatorExecutor)); } catch (RejectedExecutionException ex) { rejectedSlotChecks.mark(); context.pushBackToScheduled(slotKey, true); rejected = true; } } long endRun = System.currentTimeMillis(); if (endRun - startRun > pollerPeriod) log.error("It took longer than to poll for rollups.", pollerPeriod); else try { thread.sleep(Math.max(0, pollerPeriod - endRun + startRun)); } catch (Exception ex) { log.debug("RollupService poller woke up"); } } }
Source:
<code>public void testFilteringNonVisible() throws Exception { when(cqlClient.executeQuery(any())) .thenReturn(Futures.immediateFuture(Optional.empty())) .thenReturn(Futures.immediateFuture(Optional.of(Value.create(PtBytes.toBytes("dummy"), 13)))); <START> Map<Cell, Long> request = ImmutableMap.of(NON_VISIBLE_CELL, TIMESTAMP, VISIBLE_CELL_1, TIMESTAMP); <END> AsyncCellLoader asyncCellLoader = AsyncCellLoader.create(cqlClient, testExecutor, DEFAULT_KEYSPACE); Map<Cell, Value> result = asyncCellLoader.loadAllWithTimestamp(DEFAULT_TABLE, request).get(); assertThat(result.isEmpty()).isFalse(); assertThat(result.containsKey(VISIBLE_CELL_1)).isTrue(); assertThat(result.containsKey(NON_VISIBLE_CELL)).isFalse(); }</code><technical_language>if this form, i.e. java ImmutableMap.of( NON_VISIBLE_CELL, TIMESTAMP, VISIBLE_CELL_1, TIMESTAMP); immutable map builder itself</technical_language>

Target:
public void testFilteringNonVisible() throws Exception { setUpVisibleCells(VISIBLE_CELL_1); setUpNonVisibleCells(NON_VISIBLE_CELL); Map<Cell, Long> request = ImmutableMap.of( NON_VISIBLE_CELL, TIMESTAMP, VISIBLE_CELL_1, TIMESTAMP); Map<Cell, Value> result = asyncCellLoader.loadAllWithTimestamp(TABLE, request).get(); assertThat(result) .containsOnlyKeys(VISIBLE_CELL_1); }
Source:
<code>public static Collection<InetAddress> toInetAddresses(Collection<String> addrs, Collection<String> hostNames) throws IgniteCheckedException { Set<InetAddress> res = new HashSet<>(addrs.size()); Iterator<String> hostNamesIt = hostNames.iterator(); for (String addr : addrs) { String hostName = hostNamesIt.hasNext() ? hostNamesIt.next() : null; InetAddress inetAddr = null; if (!F.isEmpty(hostName)) { try { if (IgniteSystemProperties.getBoolean(IgniteSystemProperties.IGNITE_TEST_ENV)) { <START> String ipString = hostName.substring(0, hostName.length() - ".hostname".length()); <END> inetAddr = InetAddress.getByAddress(hostName, InetAddress.getByName(ipString).getAddress()); } else inetAddr = InetAddress.getByName(hostName); } catch (UnknownHostException ignored) { } } if (inetAddr == null || inetAddr.isLoopbackAddress()) { try { if (IgniteSystemProperties.getBoolean(IgniteSystemProperties.IGNITE_TEST_ENV)) inetAddr = InetAddress.getByAddress(addr + ".hostname", InetAddress.getByName(addr).getAddress()); else inetAddr = InetAddress.getByName(addr); } catch (UnknownHostException ignored) { } } if (inetAddr != null) res.add(inetAddr); } if (res.isEmpty()) throw new IgniteCheckedException("Addresses can not be resolved [addr=" + addrs + ", hostNames=" + hostNames + ']'); return res; }</code><technical_language>ipString - Abbreviation install pearl of GridGain - abbreviation plugin</technical_language>

Target:
public static Collection<InetAddress> toInetAddresses(Collection<String> addrs, Collection<String> hostNames) throws IgniteCheckedException { Set<InetAddress> res = new HashSet<>(addrs.size()); Iterator<String> hostNamesIt = hostNames.iterator(); for (String addr : addrs) { String hostName = hostNamesIt.hasNext() ? hostNamesIt.next() : null; InetAddress inetAddr = null; if (!F.isEmpty(hostName)) { try { inetAddr = InetAddress.getByName(hostName); } catch (UnknownHostException ignored) { } } if (inetAddr == null || inetAddr.isLoopbackAddress()) { try { inetAddr = InetAddress.getByName(addr); } catch (UnknownHostException ignored) { } } if (inetAddr != null) res.add(inetAddr); } if (res.isEmpty()) throw new IgniteCheckedException("Addresses can not be resolved [addr=" + addrs + ", hostNames=" + hostNames + ']'); return res; }
Source:
<code>public RTrim() { super(new Column[] { <START> new Column("org/apache/tajo/storage/text", TajoDataTypes.Type.TEXT), <END> }); }</code><technical_language>This changed while refactor 'text'</technical_language>

Target:
public RTrim() { super(new Column[] { new Column("text", TajoDataTypes.Type.TEXT), }); }
Source:
<code>protected void postExecute(IRequest request, Object[] targets) { super.postExecute(request, targets); new WorkbenchJob("") { @Override public IStatus runInUIThread(IProgressMonitor monitor) { ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class); if (commandService != null) { <START> commandService.refreshElements(REVERSE_TOGGLE_COMMAND_ID, null); <END> } return Status.OK_STATUS; } }.schedule(); }</code><technical_language>This change work. idea is soon user presses 'toggle reverse' button, other reverse button appear. change is made, this longer works. Note 4.2, this is broken altogether, in 3.8 works this proposed change. Bug 290572</technical_language>

Target:
protected void postExecute(IRequest request, Object[] targets) { super.postExecute(request, targets); new WorkbenchJob("") { @Override public IStatus runInUIThread(IProgressMonitor monitor) { IEvaluationService exprService = (IEvaluationService) PlatformUI.getWorkbench().getService(IEvaluationService.class); if (exprService != null) { exprService.requestEvaluation("org.eclipse.cdt.debug.ui.isReverseDebuggingEnabled"); } ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class); if (commandService != null) { commandService.refreshElements(REVERSE_TOGGLE_COMMAND_ID, null); } return Status.OK_STATUS; } }.schedule(); }
Source:
<code>void reportInternal(ReportPoint point) { if (validationConfig.get() == null) { validatePoint(point, handle, Validation.Level.NUMERIC_ONLY); } else { validatePoint(point, validationConfig.get()); } if (DeltaCounter.isDelta(point.getMetric())) { refreshValidPointsLoggerState(); if ((logData || logPointsFlag) && (logSampleRate >= 1.0d || (logSampleRate > 0.0d && RANDOM.nextDouble() < logSampleRate))) { String strPoint = serializer.apply(point); validPointsLogger.info(strPoint); } getReceivedCounter().inc(); <START> double pvalue = Double.parseDouble(String.valueOf(point.getValue())); <END> receivedPointLag.update(Clock.now() - point.getTimestamp()); HostMetricTagsPair hostMetricTagsPair = new HostMetricTagsPair(point.getHost(), point.getMetric(), point.getAnnotations()); metricCache.get(hostMetricTagsPair, key -> new AtomicDouble(0)).getAndAdd(pvalue); getReceivedCounter().inc(); } else { reject(point, "Port is not configured to accept non-delta counter data!"); } }</code><technical_language>Is a specific reason convert a numeric string back</technical_language>

Target:
void reportInternal(ReportPoint point) { if (validationConfig.get() == null) { validatePoint(point, handle, Validation.Level.NUMERIC_ONLY); } else { validatePoint(point, validationConfig.get()); } if (DeltaCounter.isDelta(point.getMetric())) { refreshValidPointsLoggerState(); if ((logData || logPointsFlag) && (logSampleRate >= 1.0d || (logSampleRate > 0.0d && RANDOM.nextDouble() < logSampleRate))) { String strPoint = serializer.apply(point); validPointsLogger.info(strPoint); } getReceivedCounter().inc(); double deltaValue = (double) point.getValue(); receivedPointLag.update(Clock.now() - point.getTimestamp()); HostMetricTagsPair hostMetricTagsPair = new HostMetricTagsPair(point.getHost(), point.getMetric(), point.getAnnotations()); aggregatedDeltas.get(hostMetricTagsPair, key -> new AtomicDouble(0)).getAndAdd(deltaValue); getReceivedCounter().inc(); } else { reject(point, "Port is not configured to accept non-delta counter data!"); } }
Source:
<code>private void runChildren(final RunNotifier notifier) { <START> final RunnerScheduler scheduler = this.scheduler; <END> try { for (final T each : getFilteredChildren()) { scheduler.schedule(new Runnable() { public void run() { ParentRunner.this.runChild(each, notifier); } }); } } finally { scheduler.finished(); } }</code><technical_language>Please change name of scheduler currentScheduler in order avoid mistakes for this.scheduler</technical_language>

Target:
private void runChildren(final RunNotifier notifier) { final RunnerScheduler currentScheduler = scheduler; try { for (final T each : getFilteredChildren()) { currentScheduler.schedule(new Runnable() { public void run() { ParentRunner.this.runChild(each, notifier); } }); } } finally { currentScheduler.finished(); } }
Source:
<code>public void <START> testMmsDelete() <END> { final ContentValues mmsValues = new ContentValues(2); mmsValues.put(Telephony.Mms.TEXT_ONLY, 1); mmsValues.put(Telephony.Mms.MESSAGE_TYPE, 128); mmsValues.put(Telephony.Mms.SUBJECT, mmsSubject); final Uri mmsUri = mContentResolver.insert(Telephony.Mms.CONTENT_URI, mmsValues); assertThat(mmsUri).isNotNull(); final long mmsId = ContentUris.parseId(mmsUri); final String srcName = String.format("text.%06d.txt", 0); final Uri partUri = Telephony.Mms.CONTENT_URI.buildUpon() .appendPath(String.valueOf(mmsId)).appendPath("part").build(); final ContentValues values = new ContentValues(8); values.put(Telephony.Mms.Part.MSG_ID, mmsId); values.put(Telephony.Mms.Part.SEQ, 0); values.put(Telephony.Mms.Part.CONTENT_TYPE, TEXT_PLAIN); values.put(Telephony.Mms.Part.NAME, srcName); values.put(Telephony.Mms.Part.CONTENT_ID, "<"+srcName+">"); values.put(Telephony.Mms.Part.CONTENT_LOCATION, srcName); values.put(Telephony.Mms.Part.CHARSET, 111); values.put(Telephony.Mms.Part.TEXT, mmsBody); Uri insertPartUri = mContentResolver.insert(partUri, values); assertThat(insertPartUri).isNotNull(); int deletedRows = mContentResolver.delete(partUri, null, null); assertThat(deletedRows).isEqualTo(1); int deletedRow = mContentResolver.delete(mmsUri, null, null); assertThat(deletedRow).isEqualTo(1); }</code><technical_language>split multiple tests for Mms table Part table, part tests in part test module</technical_language>

Target:
public void testMmsDelete() { cleanup(); Uri mmsUri = insertInToMmsTable(false, MMS_SUBJECT_ONE); assertThat(mmsUri).isNotNull(); int deletedRow = mContentResolver.delete(mmsUri, null, null); assertThat(deletedRow).isEqualTo(1); }
Source:
<code>public void doPolling(Guid cmdId, List<Guid> childCmdIds) { super.doPolling(cmdId, childCmdIds); if (!getCinderBroker().isSnapshotExist(getDiskId())) { getCommand().setCommandStatus(CommandStatus.SUCCEEDED); return; } ImageStatus imageStatus = getCinderBroker().getSnapshotStatus(getDiskId()); DiskImage disk = getDisk(); if (imageStatus != null && imageStatus != disk.getImageStatus()) { switch (imageStatus) { case ILLEGAL: <START> getCommand().getParameters().setShouldBeLogged(true); <END> getCommand().setCommandStatus(CommandStatus.FAILED); break; } } }</code><technical_language>check if needed</technical_language>

Target:
public void doPolling(Guid cmdId, List<Guid> childCmdIds) { super.doPolling(cmdId, childCmdIds); if (!getCinderBroker().isSnapshotExist(getDiskId())) { getCommand().setCommandStatus(CommandStatus.SUCCEEDED); return; } ImageStatus imageStatus = getCinderBroker().getSnapshotStatus(getDiskId()); DiskImage disk = getDisk(); if (imageStatus != null && imageStatus != disk.getImageStatus()) { switch (imageStatus) { case ILLEGAL: getCommand().setCommandStatus(CommandStatus.FAILED); break; } } }
Source:
<code>public void onEntityDamageByEntity(EntityDamageByEntityEvent event) { if (event.getEntity() instanceof Player) { if (event.getDamager() instanceof Player) { Player player = (Player) event.getDamager(); if (player.getGameMode() == GameMode.CREATIVE) { <START> TFM_Util.playerMsg(player, "NO GM / GOD PVP!", ChatColor.DARK_RED); <END> event.setCancelled(true); } } if (event.getDamager() instanceof Arrow) { Arrow arrow = (Arrow) event.getDamager(); if (arrow.getShooter() instanceof Player) { Player player = (Player) arrow.getShooter(); if (player.getGameMode() == GameMode.CREATIVE) { TFM_Util.playerMsg(player, "NO GM / GOD PVP!", ChatColor.DARK_RED); event.setCancelled(true); } } } } }</code><technical_language>I "Creative (gm) PVP is allowed"</technical_language>

Target:
public void onEntityDamageByEntity(EntityDamageByEntityEvent event) { if (event.getEntity() instanceof Player) { if (event.getDamager() instanceof Player) { Player player = (Player) event.getDamager(); if (player.getGameMode() == GameMode.CREATIVE) { TFM_Util.playerMsg(player, "Creative pvp is prohibited!", ChatColor.DARK_RED); event.setCancelled(true); } } if (event.getDamager() instanceof Arrow) { Arrow arrow = (Arrow) event.getDamager(); if (arrow.getShooter() instanceof Player) { Player player = (Player) arrow.getShooter(); if (player.getGameMode() == GameMode.CREATIVE) { TFM_Util.playerMsg(player, "Creative pvp is prohibited!", ChatColor.DARK_RED); event.setCancelled(true); } } } } }
Source:
<code>static boolean recentlyModified(Item item, int days) { <START> String accDate = itemService.getMetadata(item, "dc.date.accessioned"); <END> if (accDate == null) { return false; } Calendar cal = Calendar.getInstance(); cal.add(Calendar.DATE, -days); SimpleDateFormat sdf = new SimpleDateFormat("YYYY-MM-dd"); String cmp = sdf.format(cal.getTime()); return accDate.compareTo(cmp) >= 0; }</code><technical_language>modified is stored in database default a column item, in dc.date.accessioned metadata field</technical_language>

Target:
static boolean recentlyModified(Item item, int days) { Calendar cal = Calendar.getInstance(); cal.add(Calendar.DATE, -days); return cal.getTime().before(item.getLastModified()); }
Source:
<code>@Override protected void onPreExecute() { super.onPreExecute(); <START> if (getActivity() != null) <END> getActivity().getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); }</code><technical_language>I a pattern is Java try { getActivity().getWindow().addFlags( /* ... */ ); } catch (NullPointerException exc) { // Suppress } Checking activity is null activity is subject a race condition guarantee code possibly stops activity this code in mutual exclusion. pattern in other places in this file. (If agree this analysis, opening issue change other occurrences of this pattern.)</technical_language>

Target:
@Override protected void onPreExecute() { super.onPreExecute(); A activity = getActivity(); if (activity != null) activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); }
Source:
<code>public boolean equals(Object obj) { return (obj instanceof SetFboWriteMask) <START> && fbo == ((SetFboWriteMask) obj).fbo <END> && renderToColorBuffer == ((SetFboWriteMask) obj).renderToColorBuffer && renderToDepthBuffer == ((SetFboWriteMask) obj).renderToDepthBuffer && renderToLightBuffer == ((SetFboWriteMask) obj).renderToLightBuffer; }</code><technical_language>wondering this change. closes door FBOs id GPU-side. is if impossible case Terasology. wonder</technical_language>

Target:
public boolean equals(Object obj) { return (obj instanceof SetFboWriteMask) && fbo.equals(((SetFboWriteMask) obj).fbo) && renderToColorBuffer == ((SetFboWriteMask) obj).renderToColorBuffer && renderToDepthBuffer == ((SetFboWriteMask) obj).renderToDepthBuffer && renderToLightBuffer == ((SetFboWriteMask) obj).renderToLightBuffer; }
Source:
<code>public TestUser(String name) { <START> super(new Principal() { @Override public String getName() { return name; } }); <END> }</code><technical_language>suggestion super(() -> name);</technical_language>

Target:
public TestUser(String name) { super(() -> name); }
Source:
<code>public void compareTimeZone() throws SQLException { TimeZone serverTimeZone = null; try { serverTimeZone = getServerTimeZone(); } catch (SQLException ex) { <START> logger.error(String.format(Locale.ENGLISH, "SQLException raised %s", ex.toString())); <END> } if (serverTimeZone == null) { logger.warn("Can't get server TimeZone."); return; } TimeZone clientTimeZone = TimeZone.getDefault(); Date today = new Date(); int clientOffset = clientTimeZone.getRawOffset(); if (clientTimeZone.inDaylightTime(today)) { clientOffset += clientTimeZone.getDSTSavings(); } if (clientOffset != serverTimeZone.getRawOffset()) { logger.warn(String.format(Locale.ENGLISH, "The client timezone(%s) is different from the server timezone(%s). The plugin will fetch wrong datetime values.", clientTimeZone.getID(), serverTimeZone.getID())); logger.warn(String.format(Locale.ENGLISH, "Use You may need to set options `useLegacyDatetimeCode` and `serverTimeZone`")); logger.warn(String.format(Locale.ENGLISH, "Ex. `options: { useLegacyDatetimeCode: false, serverTimeZone: UTC }`")); } logger.warn(String.format(Locale.ENGLISH, "The plugin will set `useLegacyDatetimeCode=false` by default in future.")); }</code><technical_language>logger.warn is fatal if timezone checking fails</technical_language>

Target:
public void compareTimeZone() throws SQLException { TimeZone serverTimeZone = null; try { serverTimeZone = getServerTimeZone(); } catch (SQLException ex) { logger.warn("Can't get server TimeZone."); logger.warn(String.format(Locale.ENGLISH, "SQLException raised %s", ex.toString())); } TimeZone clientTimeZone = TimeZone.getDefault(); Date today = new Date(); int clientOffset = clientTimeZone.getRawOffset(); if (clientTimeZone.inDaylightTime(today)) { clientOffset += clientTimeZone.getDSTSavings(); } if (clientOffset != serverTimeZone.getRawOffset()) { logger.warn(String.format(Locale.ENGLISH, "The client timezone(%s) is different from the server timezone(%s). The plugin will fetch wrong datetime values.", clientTimeZone.getID(), serverTimeZone.getID())); logger.warn(String.format(Locale.ENGLISH, "You may need to set options `useLegacyDatetimeCode` and `serverTimezone`")); logger.warn(String.format(Locale.ENGLISH, "Example. `options: { useLegacyDatetimeCode: false, serverTimezone: UTC }`")); } logger.warn(String.format(Locale.ENGLISH, "The plugin will set `useLegacyDatetimeCode=false` by default in future.")); }
Source:
<code>protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception { final S3Configuration configuration = this.configuration.copy(); setProperties(configuration, parameters); if (remaining == null || remaining.trim().length() == 0) { throw new IllegalArgumentException("Bucket name must be specified."); } if (remaining.startsWith("arn:")) { remaining = remaining.substring(remaining.lastIndexOf(":") + 1, remaining.length()); } configuration.setBucketName(remaining); if (ObjectHelper.isEmpty(configuration.getAccessKey())) { setAccessKey(accessKey); } if (ObjectHelper.isEmpty(configuration.getSecretKey())) { setSecretKey(secretKey); } if (ObjectHelper.isEmpty(configuration.getRegion())) { setRegion(region); } if (configuration.isUseIAMCredentials() == false && configuration.getAmazonS3Client() == null && (configuration.getAccessKey() == null || configuration.getSecretKey() == null)) { <START> throw new IllegalArgumentException("useIAMCredentials is set to false, AmazonS3Client or accessKey and secretKey must be specified"); <END> } S3Endpoint endpoint = new S3Endpoint(uri, this, configuration); setProperties(endpoint, parameters); return endpoint; }</code><technical_language>useIAMCredentials is mandatory, sense log set false</technical_language>

Target:
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception { final S3Configuration configuration = this.configuration.copy(); setProperties(configuration, parameters); if (remaining == null || remaining.trim().length() == 0) { throw new IllegalArgumentException("Bucket name must be specified."); } if (remaining.startsWith("arn:")) { remaining = remaining.substring(remaining.lastIndexOf(":") + 1, remaining.length()); } configuration.setBucketName(remaining); if (ObjectHelper.isEmpty(configuration.getAccessKey())) { setAccessKey(accessKey); } if (ObjectHelper.isEmpty(configuration.getSecretKey())) { setSecretKey(secretKey); } if (ObjectHelper.isEmpty(configuration.getRegion())) { setRegion(region); } if (!configuration.isUseIAMCredentials() && configuration.getAmazonS3Client() == null && (configuration.getAccessKey() == null || configuration.getSecretKey() == null)) { throw new IllegalArgumentException("useIAMCredentials is set to false, AmazonS3Client or accessKey and secretKey must be specified"); } S3Endpoint endpoint = new S3Endpoint(uri, this, configuration); setProperties(endpoint, parameters); return endpoint; }
Source:
<code><START> private void getChildrenImpl() { <END> ObjectWalk ow = new ObjectWalk(repo); List<GitModelCommit> result = new ArrayList<GitModelCommit>(); try { RevCommit ancestorCommit = RevUtils.getCommonAncestor(repo, srcRev, dstRev); ow.parseAny(ancestorCommit); ow.reset(); ow.markStart(ow.parseAny(dstRev)); RevCommit remoteCommit = ow.next(); ow.reset(); ow.markStart(ow.parseAny(srcRev)); RevCommit baseCommit = ow.next(); ow.reset(); ow.setRevFilter(getRevFilter(ancestorCommit, baseCommit, remoteCommit)); ow.markStart(ancestorCommit); ow.markStart(baseCommit); ow.markStart(remoteCommit); RevCommit commit; while ((commit = ow.next()) != null) result.add(new GitModelCommit(this, commit)); } catch (IOException e) { Activator.logError(e.getMessage(), e); } childrens = result.toArray(new GitModelCommit[result.size()]); }</code><technical_language>This implementation is complicated level JGit features. API log command instead, for incoming for outgoing changes: Git git = new Git(repo); = git.log().addRange(ancestorCommit, srcRev).call().iterator() ..</technical_language>

Target:
private void getChildrenImpl() { List<GitModelCommit> result = new ArrayList<GitModelCommit>(); try { RevCommit ancestorCommit = RevUtils.getCommonAncestor(repo, srcRev, dstRev); RevCommitList<RevCommit> commits = getRevCommits(ancestorCommit, dstRev); commits.addAll(getRevCommits(ancestorCommit, srcRev)); for (RevCommit commit : commits) result.add(new GitModelCommit(this, commit)); } catch (IOException e) { Activator.logError(e.getMessage(), e); } childrens = result.toArray(new GitModelCommit[result.size()]); }
Source:
<code>public void onFailure(WorkflowExecutionContext context) throws FalconException{ <START> onSuccess(context); <END> }</code><technical_language>odd call onSuccess method in onFailure. a method called onEnd is called onSuccess onFailure</technical_language>

Target:
public void onFailure(WorkflowExecutionContext context) throws FalconException{ onEnd(context); }
Source:
<code>public static Map<String, IAnalysisModuleHelper> getAnalysisModules() { synchronized (fAnalysisModules) { if (fAnalysisModules.isEmpty()) { for (IAnalysisModuleSource source : fSources) { <START> fAnalysisModules.putAll(source.getAnalysisModules()); <END> } } } return Collections.unmodifiableMap(fAnalysisModules); }</code><technical_language>If change IAnalysisModuleSource.getAnalysisModules(), this work anymore. this exposing map directly, instead exposing a get(String key) Iterable (and single-getter all, if needed)</technical_language>

Target:
public static Map<String, IAnalysisModuleHelper> getAnalysisModules() { synchronized (fAnalysisModules) { if (fAnalysisModules.isEmpty()) { for (IAnalysisModuleSource source : fSources) { for (IAnalysisModuleHelper helper : source.getAnalysisModules()) { fAnalysisModules.put(helper.getId(), helper); } } } } return Collections.unmodifiableMap(fAnalysisModules); }
Source:
<code>private void cleanupOldBundles(File bundleDir, File justGenerated) { thread.setName(String.format("%s periodic bundle generator: tidying old bundles since %s", SupportPlugin.class.getSimpleName(), new Date())); File[] files = bundleDir.listFiles(new FilenameFilter() { public boolean accept(File dir, String name) { <START> return name.startsWith(SupportPlugin.getBundlePrefix()) && name.endsWith(".zip"); <END> } }); long pivot = System.currentTimeMillis(); for (long l = 1; l * 2 > 0; l *= 2) { boolean seen = false; for (File f : files) { if (!f.isFile() || f == justGenerated) { continue; } long age = pivot - f.lastModified(); if (l <= age && age < l * 2) { if (seen) { f.delete(); } else { seen = true; } } } } }</code><technical_language>this fail clean bundles if provider is changed. check for "support*.zip"</technical_language>

Target:
private void cleanupOldBundles(File bundleDir, File justGenerated) { thread.setName(String.format("%s periodic bundle generator: tidying old bundles since %s", SupportPlugin.class.getSimpleName(), new Date())); File[] files = bundleDir.listFiles(new FilenameFilter() { public boolean accept(File dir, String name) { return name.endsWith(".zip"); } }); long pivot = System.currentTimeMillis(); for (long l = 1; l * 2 > 0; l *= 2) { boolean seen = false; for (File f : files) { if (!f.isFile() || f == justGenerated) { continue; } long age = pivot - f.lastModified(); if (l <= age && age < l * 2) { if (seen) { f.delete(); } else { seen = true; } } } } }
Source:
<code>public List<MentionNotificationParameters> analyze(XWikiDocument doc, DocumentReference documentReference, String version, String authorReference) { Syntax syntax = doc.getSyntax(); List<MentionNotificationParameters> ret = new ArrayList<>(); <START> handleContentOnCreate(doc.getXDOM(), documentReference, version, authorReference, DOCUMENT) <END> .ifPresent(ret::add); ret.addAll(traverseXObjectsOnCreate(doc.getXObjects(), version, authorReference, syntax)); return ret; }</code><technical_language>Note simplify a lot code of analyzers, considering singleton: if a ComponentInstantiationStrategy.PER_LOOKUP explicitely call component manager initialize in consumer, consider ret (bad name btw ;) ) is a field instances. pass method. I impact memory footprint if consumer handle job once. I guess if pool of thread is limited issue, number of analyzer instance size of pool of threads for consumer</technical_language>

Target:
public List<MentionNotificationParameters> analyze(XWikiDocument doc, DocumentReference documentReference, String version, String authorReference) { Syntax syntax = doc.getSyntax(); List<MentionNotificationParameters> mentionNotificationParametersList = new ArrayList<>(); handleContentOnCreate(doc.getXDOM(), documentReference, version, authorReference, DOCUMENT) .ifPresent(mentionNotificationParametersList::add); mentionNotificationParametersList .addAll(traverseXObjectsOnCreate(doc.getXObjects(), version, authorReference, syntax)); return mentionNotificationParametersList; }
Source:
<code>WorkerPerformanceMonitor(Collection<TestContainer<TestContext>> testContainers) { <START> this(testContainers, 5); <END> }</code><technical_language>a detail: DEFAULT_MONITORING_INTERVAL_SECONDS nicer</technical_language>

Target:
WorkerPerformanceMonitor(Collection<TestContainer<TestContext>> testContainers) { this(testContainers, DEFAULT_MONITORING_INTERVAL_SECONDS); }
Source:
<code>private void initUsingAppLogMessage(String[] tokens) { servletName = tokens[1]; action = tokens[2]; toShow = Boolean.parseBoolean(tokens[3]); role = tokens[4]; name = tokens[5]; googleId = tokens[6]; email = tokens[7]; message = tokens[8]; url = tokens[9]; boolean isLogWithoutTimeTakenAndId = tokens.length < 11; <START> if (!isLogWithoutTimeTakenAndId) { <END> boolean isOldLog = !(tokens[10].contains(googleId) || tokens[10].contains("%")); if (isOldLog) { timeTaken = Long.parseLong(tokens[10].trim()); } else { id = tokens[10]; timeTaken = tokens.length == 12 ? Long.parseLong(tokens[11].trim()) : null; } } }</code><technical_language>A double negative. isLogWithTimeTakenAndId instead</technical_language>

Target:
private void initUsingAppLogMessage(String[] tokens) { servletName = tokens[POSITION_OF_SERVLETNAME]; action = tokens[POSITION_OF_ACTION]; toShow = Boolean.parseBoolean(tokens[POSITION_OF_TOSHOW]); role = tokens[POSITION_OF_ROLE]; name = tokens[POSITION_OF_NAME]; googleId = tokens[POSITION_OF_GOOGLEID]; email = tokens[POSITION_OF_EMAIL]; message = tokens[POSITION_OF_MESSAGE]; url = tokens[POSITION_OF_URL]; boolean isLogWithTimeTakenAndId = tokens.length >= (POSITION_OF_ID + 1); if (isLogWithTimeTakenAndId) { boolean isOldLog = !(tokens[POSITION_OF_ID].contains(googleId) || tokens[POSITION_OF_ID].contains("%")); if (isOldLog) { timeTaken = Long.parseLong(tokens[POSITION_OF_TIMETAKEN_IN_OLD_LOGS].trim()); } else { id = tokens[POSITION_OF_ID]; timeTaken = tokens.length == 12 ? Long.parseLong(tokens[POSITION_OF_TIMETAKEN].trim()) : null; } } }
Source:
<code>public boolean ceationCommandClassExists(DiagnosticChain diagnostics, Map<Object, Object> context) { if (creationCommandClass != null) { Class<?> theClass = ClassLoaderHelper.loadClass(creationCommandClass); if (theClass == null) { if (diagnostics != null) { diagnostics.add(new BasicDiagnostic(Diagnostic.ERROR, RepresentationValidator.DIAGNOSTIC_SOURCE, RepresentationValidator.PAPYRUS_DIAGRAM__CEATION_COMMAND_CLASS_EXISTS, EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { <START> "ceationCommandClassExists " <END> + creationCommandClass + " cannot be loaded", EObjectValidator.getObjectLabel(this, context) }), new Object[] { this })); } return false; } } return true; }</code><technical_language>missing r in creation</technical_language>

Target:
public boolean ceationCommandClassExists(DiagnosticChain diagnostics, Map<Object, Object> context) { if (creationCommandClass != null) { Class<?> theClass = ClassLoaderHelper.loadClass(creationCommandClass); if (theClass == null) { if (diagnostics != null) { diagnostics.add(new BasicDiagnostic(Diagnostic.ERROR, RepresentationValidator.DIAGNOSTIC_SOURCE, RepresentationValidator.PAPYRUS_DIAGRAM__CEATION_COMMAND_CLASS_EXISTS, EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "creationCommandClassExists " + creationCommandClass + " cannot be loaded", EObjectValidator.getObjectLabel(this, context) }), new Object[] { this })); } return false; } } return true; }
Source:
<code>private UserAttributes convertToUserAttributes(ReadableMap readableMap) { Map<String, Object> map = recursivelyDeconstructReadableMap(readableMap); UserAttributes.Builder builder = new UserAttributes.Builder(); for (Map.Entry<String, Object> entry : map.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); if (key.equals("email")) { builder.withEmail((String)value); } else if (key.equals("user_id")) { builder.withUserId((String)value); } else if (key.equals("name")) { builder.withName((String)value); } else if (key.equals("phone")) { builder.withPhone((String)value); } else if (key.equals("language_override")) { builder.withLanguageOverride((String)value); } else if (key.equals("signed_up_at")) { Date dateSignedUpAt = new Date((long)value); builder.withSignedUpAt(dateSignedUpAt); } else if (key.equals("unsubscribed_from_emails")) { builder.withUnsubscribedFromEmails((Boolean)value); } else if (key.equals("companies")) { Log.w(TAG, "Not implemented yet"); } <START> builder.withCustomAttribute(key, value); <END> } return builder.build(); }</code><technical_language>This adds attribute (including email, user_id etc.) a customer attribute. I mentioned above, custom attributes top level item. This line replaced with: ... } else if (key.equals("custom_attributes")) { // a Map builder.withCustomAttributes(value); }</technical_language>

Target:
private UserAttributes convertToUserAttributes(ReadableMap readableMap) { Map<String, Object> map = recursivelyDeconstructReadableMap(readableMap); UserAttributes.Builder builder = new UserAttributes.Builder(); for (Map.Entry<String, Object> entry : map.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); if (key.equals("email")) { builder.withEmail((String)value); } else if (key.equals("user_id")) { builder.withUserId((String)value); } else if (key.equals("name")) { builder.withName((String)value); } else if (key.equals("phone")) { builder.withPhone((String)value); } else if (key.equals("language_override")) { builder.withLanguageOverride((String)value); } else if (key.equals("signed_up_at")) { Date dateSignedUpAt = new Date((long)value); builder.withSignedUpAt(dateSignedUpAt); } else if (key.equals("unsubscribed_from_emails")) { builder.withUnsubscribedFromEmails((Boolean)value); } else if (key.equals("custom_attributes")) { builder.withCustomAttributes((Map)value); } else if (key.equals("companies")) { Log.w(TAG, "Not implemented yet"); } } return builder.build(); }
Source:
<code>public Image getColumnImage(Object element, int columnIndex) { if (columnIndex == 1 && element instanceof CounterTreeViewerEntry && fCheckboxTree.getChecked(element)) { Image image = new Image(Display.getDefault(), IMG_WIDTH, IMG_HEIGHT); GC gc = new GC(image); Color prevBackground = gc.getBackground(); <START> gc.setBackground(new Color(Display.getDefault(), 247, 247, 247)); <END> gc.fillRectangle(0, 0, IMG_WIDTH, IMG_HEIGHT); String seriesName = ((CounterTreeViewerEntry) element).getFullPath(); IYAppearance appearance = fPresentationProvider.getAppearance(seriesName, IYAppearance.Type.LINE); RGBColor rgb = appearance.getColor(); Color lineColor = new Color(Display.getDefault(), rgb.getRed(), rgb.getGreen(), rgb.getBlue()); Color prevForeground = gc.getForeground(); gc.setForeground(lineColor); gc.setLineWidth(LINE_WIDTH); gc.setLineStyle(SWT.LINE_SOLID); gc.drawLine(0, IMG_HEIGHT / 2, IMG_WIDTH, IMG_HEIGHT / 2); gc.setForeground(prevForeground); gc.setBackground(prevBackground); gc.dispose(); return image; } return null; }</code><technical_language>default background? Is OK? If not, want simply display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND). This is background set Chart</technical_language>

Target:
public Image getColumnImage(Object element, int columnIndex) { if (columnIndex == 1 && element instanceof CounterTreeViewerEntry && fCheckboxTree.getChecked(element)) { int imageWidth = getTreeViewer().getTree().getColumn(columnIndex).getWidth(); int imageHeight = getTreeViewer().getTree().getItemHeight(); Image image = new Image(Display.getDefault(), imageWidth, imageHeight); GC gc = new GC(image); gc.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND)); gc.fillRectangle(0, 0, imageWidth, imageHeight); String seriesName = ((CounterTreeViewerEntry) element).getFullPath(); IYAppearance appearance = fCounterChartViewer.getAppearance(Objects.requireNonNull(seriesName)); RGBColor rgb = appearance.getColor(); Color lineColor = new Color(Display.getDefault(), rgb.getRed(), rgb.getGreen(), rgb.getBlue()); gc.setForeground(lineColor); gc.setLineWidth(LINE_WIDTH); gc.setLineStyle(LineStyle.valueOf(appearance.getStyle()).ordinal()); gc.drawLine(0, imageHeight / 2, imageWidth, imageHeight / 2); gc.dispose(); lineColor.dispose(); return image; } return null; }
Source:
<code>private boolean branchExists(String branchName) throws GerritException { <START> assertTrue("Branch requests are not supported in this version of Gerrit", reviewHarness.getClient() <END> .isVersion29OrLater(new NullProgressMonitor())); BranchInfo[] branches = reviewHarness.getAdminClient().getRemoteProjectBranches("org.eclipse.mylyn.test", new NullProgressMonitor()); for (BranchInfo branch : branches) { String branchRef = StringUtils.trimToEmpty(StringUtils.substringAfterLast(branch.getRef(), "/")); if (branchRef.equals(branchName)) { return true; } } return false; }</code><technical_language>check this in client</technical_language>

Target:
private boolean branchExists(String branchName) throws GerritException { BranchInfo[] branches = reviewHarness.getAdminClient().getRemoteProjectBranches("org.eclipse.mylyn.test", new NullProgressMonitor()); for (BranchInfo branch : branches) { String branchRef = StringUtils.trimToEmpty(StringUtils.substringAfterLast(branch.getRef(), "/")); if (branchRef.equals(branchName)) { return true; } } return false; }
Source:
<code>public void onClick(View view){ switch(view.getId()){ case (R.id.field_report_button): <START> fieldReportButtonPressed(view); <END> } }</code><technical_language>forget default case</technical_language>

Target:
public void onClick(View view){ switch(view.getId()){ case (R.id.field_report_button): fieldReportButtonPressed(view); break; default: break; } }
Source:
<code>public IsNetworkOnInterfacePredicate(String networkName) { <START> this.networkName = networkName; <END> }</code><technical_language>adding constraint for assuring networkName null</technical_language>

Target:
public IsNetworkOnInterfacePredicate(String networkName) { Validate.notNull(networkName, "networkName can not be null"); this.networkName = networkName; }
Source:
<code>private void setClientCookies() { TimeSpan tsExpires = SessionCookieDataImpl.DEFAULT.getTimeout(); String domain = PageContextUtil.getCookieDomain(this); boolean httpOnly = SessionCookieDataImpl.DEFAULT.isHttpOnly(); boolean secure = SessionCookieDataImpl.DEFAULT.isSecure(); short samesite = SessionCookieDataImpl.DEFAULT.getSamesite(); String path = SessionCookieDataImpl.DEFAULT.getPath(); ApplicationContext ac = getApplicationContext(); if (ac instanceof ApplicationContextSupport) { ApplicationContextSupport acs = (ApplicationContextSupport) ac; SessionCookieData data = acs.getSessionCookie(); if (data != null) { TimeSpan ts = data.getTimeout(); if (ts != null) tsExpires = ts; httpOnly = data.isHttpOnly(); secure = data.isSecure(); String tmp = data.getDomain(); if (!StringUtil.isEmpty(tmp, true)) domain = tmp.trim(); samesite = data.getSamesite(); String tmp2 = data.getPath(); if (StringUtil.isEmpty(tmp2, true)) <START> path = "/"; <END> else path = tmp2.trim(); } } int expires; long tmp = tsExpires.getSeconds(); if (Integer.MAX_VALUE < tmp) expires = Integer.MAX_VALUE; else expires = (int) tmp; ((CookieImpl) cookieScope()).setCookieEL(KeyConstants._cfid, cfid, expires, secure, path, domain, httpOnly, true, false, samesite); ((CookieImpl) cookieScope()).setCookieEL(KeyConstants._cftoken, cftoken, expires, secure, path, domain, httpOnly, true, false, samesite); }</code><technical_language>in case "tmp2" is empty simply set line 2672</technical_language>

Target:
private void setClientCookies() { TimeSpan tsExpires = SessionCookieDataImpl.DEFAULT.getTimeout(); String domain = PageContextUtil.getCookieDomain(this); boolean httpOnly = SessionCookieDataImpl.DEFAULT.isHttpOnly(); boolean secure = SessionCookieDataImpl.DEFAULT.isSecure(); short samesite = SessionCookieDataImpl.DEFAULT.getSamesite(); String path = SessionCookieDataImpl.DEFAULT.getPath(); ApplicationContext ac = getApplicationContext(); if (ac instanceof ApplicationContextSupport) { ApplicationContextSupport acs = (ApplicationContextSupport) ac; SessionCookieData data = acs.getSessionCookie(); if (data != null) { TimeSpan ts = data.getTimeout(); if (ts != null) tsExpires = ts; httpOnly = data.isHttpOnly(); secure = data.isSecure(); String tmp = data.getDomain(); if (!StringUtil.isEmpty(tmp, true)) domain = tmp.trim(); samesite = data.getSamesite(); String tmp2 = data.getPath(); if (!StringUtil.isEmpty(tmp2, true)) path = tmp2.trim(); } } int expires; long tmp = tsExpires.getSeconds(); if (Integer.MAX_VALUE < tmp) expires = Integer.MAX_VALUE; else expires = (int) tmp; ((CookieImpl) cookieScope()).setCookieEL(KeyConstants._cfid, cfid, expires, secure, path, domain, httpOnly, true, false, samesite); ((CookieImpl) cookieScope()).setCookieEL(KeyConstants._cftoken, cftoken, expires, secure, path, domain, httpOnly, true, false, samesite); }