auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void handleResponse(final DeviceResponse deviceResponse, final SetScheduleDeviceRequest deviceRequest) { final ScheduleMessageTypeDto scheduleMessageTypeDto = deviceRequest.getScheduleMessageDataContainer() .getScheduleMessageType(); switch (scheduleMessageTypeDto) { case RETRIEVE_CONFIGURATION: final GetConfigurationDeviceResponse response = (GetConfigurationDeviceResponse) deviceResponse; this.handleGetConfigurationBeforeSetScheduleResponse(deviceRequest, response); break; case SET_ASTRONOMICAL_OFFSETS: this.handleSetScheduleAstronomicalOffsetsResponse(deviceRequest); break; <START> default: <END> this.handleEmptyDeviceResponse(deviceResponse, this.responseMessageSender, deviceRequest.getDomain(), deviceRequest.getDomainVersion(), deviceRequest.getMessageType(), deviceRequest.getRetryCount()); } }</code><technical_language>Replace this a "case SET_SCHEDULE". a bit more defensive explains is happening</technical_language>

Target:
private void handleResponse(final DeviceResponse deviceResponse, final SetScheduleDeviceRequest deviceRequest) { final ScheduleMessageTypeDto scheduleMessageTypeDto = deviceRequest.getScheduleMessageDataContainer() .getScheduleMessageType(); switch (scheduleMessageTypeDto) { case RETRIEVE_CONFIGURATION: final GetConfigurationDeviceResponse response = (GetConfigurationDeviceResponse) deviceResponse; this.handleGetConfigurationBeforeSetScheduleResponse(deviceRequest, response); break; case SET_ASTRONOMICAL_OFFSETS: this.handleSetScheduleAstronomicalOffsetsResponse(deviceRequest); break; case SET_SCHEDULE: default: this.handleEmptyDeviceResponse(deviceResponse, this.responseMessageSender, deviceRequest.getDomain(), deviceRequest.getDomainVersion(), deviceRequest.getMessageType(), deviceRequest.getRetryCount()); } }
Source:
<code>private Boolean isConditionOnRuntimeVariableMet(final ExecutableNode node) { final String condition = node.getCondition(); if (condition == null) { return true; } String replaced = condition; Matcher matcher = CONDITION_ON_JOB_STATUS_PATTERN.matcher(condition); if (matcher.find()) { replaced = condition.replace(matcher.group(1), "true"); } <START> matcher = CONDITION_VARIABLE_REPLACEMENT_PATTERN.matcher(replaced); <END> while (matcher.find()) { final String value = findValueForJobVariable(node, matcher.group(1), matcher.group(2)); if (value != null) { replaced = replaced.replace(matcher.group(), "'" + value + "'"); } this.logger.info("Resolved condition of " + node.getId() + " is " + replaced); } return evaluateExpression(replaced); }</code><technical_language>Minor clearer a name for matchers here, allowing variables final</technical_language>

Target:
private Boolean isConditionOnRuntimeVariableMet(final ExecutableNode node) { final String condition = node.getCondition(); if (condition == null) { return true; } String replaced = condition; final Matcher jobStatusMatcher = CONDITION_ON_JOB_STATUS_PATTERN.matcher (condition); if (jobStatusMatcher.find()) { replaced = condition.replace(jobStatusMatcher.group(1), "true"); } final Matcher variableMatcher = CONDITION_VARIABLE_REPLACEMENT_PATTERN.matcher(replaced); while (variableMatcher.find()) { final String value = findValueForJobVariable(node, variableMatcher.group(1), variableMatcher.group(2)); if (value != null) { replaced = replaced.replace(variableMatcher.group(), "'" + value + "'"); } this.logger.info("Resolved condition of " + node.getId() + " is " + replaced); } return evaluateExpression(replaced); }
Source:
<code>public MigrateBrokerVDSCommand(P parameters) { super(parameters); String migMethod = VdsProperties.MigrationMethostoString(parameters.getMigrationMethod()); log.infoFormat("VdsBroker::migrate::Entered (vm_guid='{0}', srcHost='{1}', dstHost='{2}', method='{3}'", parameters.getVmId().toString(), parameters.getSrcHost(), parameters.getDstHost(), migMethod); migrationInfo = new HashMap<String, String>(); migrationInfo.put(VdsProperties.vm_guid, parameters.getVmId().toString()); migrationInfo.put(VdsProperties.src, String.format("%1$s", parameters.getSrcHost())); migrationInfo.put(VdsProperties.dst, String.format("%1$s", parameters.getDstHost())); migrationInfo.put(VdsProperties.method, migMethod); if (parameters.getTunnelMigration() != null) { migrationInfo.put(VdsProperties.TUNNELED, parameters.getTunnelMigration().toString()); } <START> if (parameters.getDstQemu() != null && !parameters.getDstQemu().trim().equals("")) { <END> migrationInfo.put(VdsProperties.dstQemu, parameters.getDstQemu()); } }</code><technical_language>StringUtils.isNotBlank(parameters.getDstQemu())</technical_language>

Target:
public MigrateBrokerVDSCommand(P parameters) { super(parameters); String migMethod = VdsProperties.MigrationMethostoString(parameters.getMigrationMethod()); log.infoFormat("VdsBroker::migrate::Entered (vm_guid='{0}', srcHost='{1}', dstHost='{2}', method='{3}'", parameters.getVmId().toString(), parameters.getSrcHost(), parameters.getDstHost(), migMethod); migrationInfo = new HashMap<String, String>(); migrationInfo.put(VdsProperties.vm_guid, parameters.getVmId().toString()); migrationInfo.put(VdsProperties.src, String.format("%1$s", parameters.getSrcHost())); migrationInfo.put(VdsProperties.dst, String.format("%1$s", parameters.getDstHost())); migrationInfo.put(VdsProperties.method, migMethod); if (parameters.getTunnelMigration() != null) { migrationInfo.put(VdsProperties.TUNNELED, parameters.getTunnelMigration().toString()); } if (StringUtils.isNotBlank(parameters.getDstQemu())) { migrationInfo.put(VdsProperties.DST_QEMU, parameters.getDstQemu()); } }
Source:
<code>public FileHandle[] list () { if (type == FileType.Classpath) throw new GdxRuntimeException("Cannot list a classpath directory: " + file); if (type == FileType.Internal){ if(!Gdx.files.internal("assets.index").exists()) <START> System.out.println("Asset index not found, please update your gradle configuration " + <END> "according to: <LINK_0>"); else { String[] filePaths = Gdx.files.internal("assets.index").readString().split("\n"); FileHandle[] files = new FileHandle[filePaths.length]; for(int i = 0; i < filePaths.length; i++){ files[i] = Gdx.files.internal(filePaths[i]); } return files; } } String[] relativePaths = file().list(); if (relativePaths == null) return new FileHandle[0]; FileHandle[] handles = new FileHandle[relativePaths.length]; for (int i = 0, n = relativePaths.length; i < n; i++) handles[i] = child(relativePaths[i]); return handles; }</code><technical_language>This Gdx.app.log</technical_language>

Target:
public FileHandle[] list () { if (type == FileType.Classpath) throw new GdxRuntimeException("Cannot list a classpath directory: " + file); if (type == FileType.Internal) { if (!Gdx.files.internal("assets.index").exists()) Gdx.app.log("FileHandle", "Asset index not found, listing content of internal directories will not be" + " possible. Check the documentation for more details."); else { if (assetIndex.size == 0) loadAssetIndex(); if (isDirectory()) { Array<String> children = assetIndex.get(path()); if (children != null) { FileHandle[] handles = new FileHandle[children.size]; for (int i = 0; i < handles.length; i++) { handles[i] = new FileHandle(children.get(i)); } return handles; } } } } String[] relativePaths = file().list(); if (relativePaths == null) return new FileHandle[0]; FileHandle[] handles = new FileHandle[relativePaths.length]; for (int i = 0, n = relativePaths.length; i < n; i++) handles[i] = child(relativePaths[i]); return handles; }
Source:
<code>protected String getLocaleStringFromReferer(final HttpServletRequest request) { final URI refererURL; String result = null; try { String referer = request.getHeader(REFERER); <START> if (null != referer) { <END> refererURL = new URI(referer); String query = refererURL.getQuery(); if (query != query) { String[] parameters = query.split("&"); for (int i = 0; i < parameters.length; i++) { String[] keyValues = parameters[i].split("="); if (LOCALE.equalsIgnoreCase(keyValues[0])) { result = keyValues[1]; break; } } } } } catch (URISyntaxException e) { log.error("Unable to determine referer URI", e); } return result; }</code><technical_language>Minor thing: "referer != null"</technical_language>

Target:
protected String getLocaleStringFromReferer(final HttpServletRequest request) { final URI refererURL; String result = null; try { String referer = request.getHeader(REFERER); if (referer != null) { refererURL = new URI(referer); String query = refererURL.getQuery(); if (query != null) { String[] parameters = query.split("&"); for (int i = 0; i < parameters.length; i++) { String[] keyValues = parameters[i].split("="); if (LOCALE.equalsIgnoreCase(keyValues[0])) { result = keyValues[1]; break; } } } } } catch (URISyntaxException e) { log.error("Unable to determine referer URI", e); } return result; }
Source:
<code>public boolean handlePost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { final String pathInfo = req.getPathInfo(); final Matcher matcher = PATTERN_UNLOAD_ADAPTER_RESOURCE_PATH.matcher(pathInfo); if (!matcher.matches()) { return false; } final String uiSessionId = matcher.group(1); <START> if (StringUtility.hasText(uiSessionId)) { <END> handleUnloadRequest(req, resp, uiSessionId); return true; } else { return false; } }</code><technical_language>Check necessary if regex is changed proposed above</technical_language>

Target:
public boolean handlePost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { final String pathInfo = req.getPathInfo(); final Matcher matcher = UNLOAD_PATH_PATTERN.matcher(pathInfo); if (!matcher.matches()) { return false; } final String uiSessionId = matcher.group(1); handleUnloadRequest(req, resp, uiSessionId); return true; }
Source:
<code>public void delete(PushApplication pushApplication) { PushApplication entity = entityManager.find(PushApplication.class, pushApplication.getId()); final List<Variant> variants = entity.getVariants(); if (variants != null && !variants.isEmpty()) { final List<Installation> resultList = entityManager.createQuery("from Installation i where i.variant = :variant", Installation.class) .setParameter("variant", variants).getResultList(); for (Installation installation : resultList) { <START> entityManager.remove(installation); <END> } } remove(entity); }</code><technical_language>extremely slow</technical_language>

Target:
public void delete(PushApplication pushApplication) { PushApplication entity = entityManager.find(PushApplication.class, pushApplication.getId()); final List<Variant> variants = entity.getVariants(); if (variants != null && !variants.isEmpty()) { final List<Installation> resultList = entityManager.createQuery("from Installation i where i.variant in :variants", Installation.class) .setParameter("variants", variants).getResultList(); for (Installation installation : resultList) { entityManager.remove(installation); } } remove(entity); }
Source:
<code>private String validate(Details details) { final DetailAST rcurly = details.rcurly; final DetailAST lcurly = details.lcurly; final DetailAST nextToken = details.nextToken; final boolean shouldCheckLastRcurly = details.shouldCheckLastRcurly; String violation = ""; String targetSourceLine = ""; if (shouldStartLine) { targetSourceLine = getLines()[rcurly.getLineNo() - 1]; } if (option == RightCurlyOption.SAME && !hasLineBreakBefore(rcurly) && lcurly.getLineNo() != rcurly.getLineNo()) { violation = MSG_KEY_LINE_BREAK_BEFORE; } else if (shouldCheckLastRcurly) { if (rcurly.getLineNo() == nextToken.getLineNo()) { violation = MSG_KEY_LINE_ALONE; } } else if (shouldBeOnSameLine(option, details)) { violation = MSG_KEY_LINE_SAME; } else if (shouldBeAloneOnLine(option, details)) { violation = MSG_KEY_LINE_ALONE; } <START> else if (shouldStartLine && !isOnStartOfLine(details, targetSourceLine)) { <END> violation = MSG_KEY_LINE_NEW; } return violation; }</code><technical_language>I this else if (shouldStartLine) { move variable declaration of targetSourceLine next line right if (isOnStartOfLine(</technical_language>

Target:
private String validate(Details details) { final DetailAST rcurly = details.rcurly; final DetailAST lcurly = details.lcurly; final DetailAST nextToken = details.nextToken; final boolean shouldCheckLastRcurly = details.shouldCheckLastRcurly; String violation = ""; if (option == RightCurlyOption.SAME && !hasLineBreakBefore(rcurly) && lcurly.getLineNo() != rcurly.getLineNo()) { violation = MSG_KEY_LINE_BREAK_BEFORE; } else if (shouldCheckLastRcurly) { if (rcurly.getLineNo() == nextToken.getLineNo()) { violation = MSG_KEY_LINE_ALONE; } } else if (shouldBeOnSameLine(option, details)) { violation = MSG_KEY_LINE_SAME; } else if (shouldBeAloneOnLine(option, details)) { violation = MSG_KEY_LINE_ALONE; } else if (shouldStartLine) { final String targetSourceLine = getLines()[rcurly.getLineNo() - 1]; if (!isOnStartOfLine(details, targetSourceLine)) { violation = MSG_KEY_LINE_NEW; } } return violation; }
Source:
<code>public void testRequeueWithNoAcknowledgementCallback() { TestChannelBinder binder = createBinder(); MessageConverterConfigurer configurer = this.context .getBean(MessageConverterConfigurer.class); DefaultPollableMessageSource pollableSource = new DefaultPollableMessageSource( this.messageConverter); configurer.configurePolledMessageSource(pollableSource, "foo"); AcknowledgmentCallback callback = mock(AcknowledgmentCallback.class); pollableSource.addInterceptor(new ChannelInterceptor() { @Override public Message<?> preSend(Message<?> message, MessageChannel channel) { return MessageBuilder.fromMessage(message) .build(); } }); ExtendedConsumerProperties<Object> properties = new ExtendedConsumerProperties<>(null); properties.setMaxAttempts(2); properties.setBackOffInitialInterval(0); binder.bindPollableConsumer("foo", "bar", pollableSource, properties); final AtomicInteger count = new AtomicInteger(); try { assertThat(pollableSource.poll(received -> { count.incrementAndGet(); throw new RequeueCurrentMessageException("test retry"); })).isTrue(); } catch (Exception e) { <START> } <END> assertThat(count.get()).isEqualTo(2); }</code><technical_language>This test passes DPMS is reverted (ignores NPE). remove try/catch</technical_language>

Target:
public void testRequeueWithNoAcknowledgementCallback() { TestChannelBinder binder = createBinder(); MessageConverterConfigurer configurer = this.context .getBean(MessageConverterConfigurer.class); DefaultPollableMessageSource pollableSource = new DefaultPollableMessageSource( this.messageConverter); configurer.configurePolledMessageSource(pollableSource, "foo"); pollableSource.addInterceptor(new ChannelInterceptor() { @Override public Message<?> preSend(Message<?> message, MessageChannel channel) { return MessageBuilder.fromMessage(message) .build(); } }); ExtendedConsumerProperties<Object> properties = new ExtendedConsumerProperties<>(null); properties.setMaxAttempts(2); properties.setBackOffInitialInterval(0); binder.bindPollableConsumer("foo", "bar", pollableSource, properties); final AtomicInteger count = new AtomicInteger(); assertThat(pollableSource.poll(received -> { count.incrementAndGet(); throw new RequeueCurrentMessageException("test retry"); })).isTrue(); assertThat(count.get()).isEqualTo(2); }
Source:
<code>public List<Instance> getMachines(String workspaceId) throws NotFoundException { EnvironmentHolder environment; try (StripedLocks.ReadLock lock = stripedLocks.acquireReadLock(workspaceId)) { environment = environments.get(workspaceId); } if (environment == null) { throw new NotFoundException("Environment with ID " + workspaceId + " is not found"); } <START> return environment.machines.stream() <END> .collect(Collectors.toList()); }</code><technical_language>return new ArrayList<>(environment.machines) for</technical_language>

Target:
public List<Instance> getMachines(String workspaceId) throws EnvironmentNotRunningException { EnvironmentHolder environment; try (StripedLocks.ReadLock lock = stripedLocks.acquireReadLock(workspaceId)) { environment = environments.get(workspaceId); if (environment == null) { throw new EnvironmentNotRunningException("Environment with ID '" + workspaceId + "' is not found"); } return new ArrayList<>(environment.machines); } }
Source:
<code>public void testCreate() throws StripeException { Map<String, Object> params = new HashMap<String, Object>(); params.put("currency", "usd"); final Order order = Order.create(params); assertNotNull(order); verifyRequest( APIResource.RequestMethod.POST, <START> "/v1/orders", <END> params ); }</code><technical_language>called resource</technical_language>

Target:
public void testCreate() throws StripeException { final Map<String, Object> params = new HashMap<String, Object>(); params.put("currency", "usd"); final Order order = Order.create(params); assertNotNull(order); verifyRequest( APIResource.RequestMethod.POST, "/v1/orders", params ); }
Source:
<code>protected String loadStyleSheet() { <START> return styleSheetProvider.getCSS(); <END> }</code><technical_language>styleSheetProvider null injection is optional</technical_language>

Target:
protected String loadStyleSheet() { if (styleSheetProvider == null) { return null; } else { return styleSheetProvider.getCSS(); } }
Source:
<code>public void execute(CommandContext context) { <START> setIncrementalMode(context.getAppConfig().getIncrementalDeploy()); <END> for (File resourceDir : getResourceDirs(context)) { processExecuteOnResourceDir(context, resourceDir); } }</code><technical_language>I problem for roles - DeployRolesCommand calls super.execute, this get set "true" for deployment. if do this - a "protected boolean isIncrementalDeployEnable(CommandContext)" method, defaults "return context.getAppConfig().isIncrementalDeploy()". DeployRolesCommand override this method - if pass, return false here</technical_language>

Target:
public void execute(CommandContext context) { setIncrementalMode(context.getAppConfig().isIncrementalDeploy()); for (File resourceDir : getResourceDirs(context)) { processExecuteOnResourceDir(context, resourceDir); } }
Source:
<code>public synchronized void updateAck(long zxid) { if (currentZxid == zxid) { currentTime = nextTime; currentZxid = nextZxid; nextTime = 0; nextZxid = 0; } else if (nextZxid == zxid) { <START> LOG.warn("ACK for received before ACK for {}!!!!", zxid, currentZxid); <END> nextTime = 0; nextZxid = 0; } }</code><technical_language>Add "0x"s for hex? (and Long.toHexString)</technical_language>

Target:
public synchronized void updateAck(long zxid) { if (currentZxid == zxid) { currentTime = nextTime; currentZxid = nextZxid; nextTime = 0; nextZxid = 0; } else if (nextZxid == zxid) { LOG.warn( "ACK for 0x{} received before ACK for 0x{}", Long.toHexString(zxid), Long.toHexString(currentZxid)); nextTime = 0; nextZxid = 0; } }
Source:
<code>protected void ExecuteVdsBrokerCommand() { <START> getBroker().diskReplicateFinsih(getParameters().getVmId().toString(), getSrcDiskXmlRpc(), getDstDiskXmlRpc()); <END> }</code><technical_language>Finsih</technical_language>

Target:
protected void ExecuteVdsBrokerCommand() { getBroker().diskReplicateFinish(getParameters().getVmId().toString(), getSrcDiskXmlRpc(), getDstDiskXmlRpc()); }
Source:
<code>public Object get(DataFetchingEnvironment env) { Object source = env.getSource(); if (source == null) return null; Field field; try { field = source.getClass().getField(fieldName); } catch (NoSuchFieldException e) { return null; } <START> try { <END> return field.get(source); } catch (IllegalAccessException e) { throw new RuntimeException(e); } }</code><technical_language>need a MapDataFetcher</technical_language>

Target:
public Object get(DataFetchingEnvironment env) { Object source = env.getSource(); if (source == null) return null; return getField(source); }
Source:
<code>private static Constraint extendSignatureArgumentConstraint(Constraint constraint) { if (Constraint.REGEXP.isStricterOrEqualTo(constraint)) { return constraint.or(Constraint.ANY_STRING); } else if (Constraint.STRING_PRIMITIVE.isStricterOrEqualTo(constraint)) { return constraint.or(Constraint.ANY_NUMBER).or(Constraint.DATE); } else if (Constraint.NUMBER_PRIMITIVE.isStricterOrEqualTo(constraint)) { <START> return constraint.or(Constraint.DATE); <END> } return constraint; }</code><technical_language>@vilchik-elena This is tested</technical_language>

Target:
private static Constraint extendSignatureArgumentConstraint(Constraint constraint) { if (Constraint.REGEXP.isStricterOrEqualTo(constraint)) { return constraint.or(Constraint.ANY_STRING).or(Constraint.ANY_NUMBER); } else if (Constraint.STRING_PRIMITIVE.isStricterOrEqualTo(constraint)) { return constraint.or(Constraint.ANY_NUMBER).or(Constraint.DATE); } else if (Constraint.NUMBER_PRIMITIVE.isStricterOrEqualTo(constraint)) { return constraint.or(Constraint.DATE); } return constraint; }
Source:
<code>public void unshareButtonPressed(OCShare share) { <START> Log_OC.d(TAG, "Unsharing " + share.getSharedWithDisplayName()); <END> mListener.removeShare(share); }</code><technical_language>Removing...</technical_language>

Target:
public void unshareButtonPressed(OCShare share) { Log_OC.d(TAG, "Removing private share with " + share.getSharedWithDisplayName()); mListener.removeShare(share); }
Source:
<code>protected AuditMessageType.ActiveParticipant getActiveParticipant(UserType oUserInfo) { AuditMessageType.ActiveParticipant participant = createActiveParticipantFromUser( <START> oUserInfo, Boolean.TRUE); <END> if (oUserInfo.getRoleCoded() != null) { participant.getRoleIDCode().add(AuditDataTransformHelper.createCodeValueType(oUserInfo.getRoleCoded().getCode(), "", oUserInfo.getRoleCoded().getCodeSystemName(), oUserInfo.getRoleCoded().getDisplayName())); } return participant; }</code><technical_language>line wrap a couple lines down; this wrap this line, wrapped earlier below</technical_language>

Target:
protected AuditMessageType.ActiveParticipant getActiveParticipant(UserType oUserInfo) { AuditMessageType.ActiveParticipant participant = createActiveParticipantFromUser(oUserInfo); if (oUserInfo.getRoleCoded() != null) { participant.getRoleIDCode().add(AuditDataTransformHelper.createCodeValueType(oUserInfo.getRoleCoded(). getCode(), "", oUserInfo.getRoleCoded().getCodeSystemName(), oUserInfo.getRoleCoded().getDisplayName())); } return participant; }
Source:
<code>private void deleteExpiredSuprevisorTaskPartitionsIfNotRunning() throws InterruptedException { final DateTime now = DateTimes.nowUtc(); final Set<String> expiredSupervisorTasks = new HashSet<>(); for (Entry<String, DateTime> entry : supervisorTaskCheckTimes.entrySet()) { final String supervisorTaskId = entry.getKey(); final DateTime checkTime = entry.getValue(); if (checkTime.isAfter(now)) { expiredSupervisorTasks.add(supervisorTaskId); } } LOG.info("Found [%s] expired supervisor tasks", expiredSupervisorTasks.size()); if (!expiredSupervisorTasks.isEmpty()) { final Map<String, TaskStatus> taskStatuses = indexingServiceClient.getTaskStatuses(expiredSupervisorTasks); for (Entry<String, TaskStatus> entry : taskStatuses.entrySet()) { final String supervisorTaskId = entry.getKey(); final TaskStatus status = entry.getValue(); if (status.getStatusCode().isComplete()) { try { deletePartitions(supervisorTaskId); } catch (IOException e) { LOG.warn(e, "Failed to delete partitions for task[%s]", supervisorTaskId); } } else { <START> supervisorTaskCheckTimes.put(supervisorTaskId, DateTimes.nowUtc()); <END> } } } }</code><technical_language>this possibly other access time updates DateTimes.nowUtc().plus(intermediaryPartitionTimeout) instead</technical_language>

Target:
private void deleteExpiredSuprevisorTaskPartitionsIfNotRunning() throws InterruptedException { final DateTime now = DateTimes.nowUtc(); final Set<String> expiredSupervisorTasks = new HashSet<>(); for (Entry<String, DateTime> entry : supervisorTaskCheckTimes.entrySet()) { final String supervisorTaskId = entry.getKey(); final DateTime checkTime = entry.getValue(); if (checkTime.isAfter(now)) { expiredSupervisorTasks.add(supervisorTaskId); } } LOG.info("Found [%s] expired supervisor tasks", expiredSupervisorTasks.size()); if (!expiredSupervisorTasks.isEmpty()) { final Map<String, TaskStatus> taskStatuses = indexingServiceClient.getTaskStatuses(expiredSupervisorTasks); for (Entry<String, TaskStatus> entry : taskStatuses.entrySet()) { final String supervisorTaskId = entry.getKey(); final TaskStatus status = entry.getValue(); if (status.getStatusCode().isComplete()) { try { deletePartitions(supervisorTaskId); } catch (IOException e) { LOG.warn(e, "Failed to delete partitions for task[%s]", supervisorTaskId); } } else { supervisorTaskCheckTimes.put(supervisorTaskId, getExpiryTimeFromNow()); } } } }
Source:
<code>public static void runTestListeners(ITestResult tr, List<ITestListener> listeners) { for (ITestListener itl : listeners) { <START> switch (tr.getStatus()) { <END> case ITestResult.SKIP: { itl.onTestSkipped(tr); break; } case ITestResult.SUCCESS_PERCENTAGE_FAILURE: { itl.onTestFailedButWithinSuccessPercentage(tr); break; } case ITestResult.FAILURE: { itl.onTestFailure(tr); break; } case ITestResult.SUCCESS: { itl.onTestSuccess(tr); break; } case ITestResult.STARTED: { itl.onTestStart(tr); break; } default: { assert false : "UNKNOWN STATUS:" + tr; } } } }</code><technical_language>Inconsistent style switch in previous method</technical_language>

Target:
public static void runTestListeners(ITestResult tr, List<ITestListener> listeners) { for (ITestListener itl : listeners) { switch (tr.getStatus()) { case ITestResult.SKIP: itl.onTestSkipped(tr); break; case ITestResult.SUCCESS_PERCENTAGE_FAILURE: itl.onTestFailedButWithinSuccessPercentage(tr); break; case ITestResult.FAILURE: itl.onTestFailure(tr); break; case ITestResult.SUCCESS: itl.onTestSuccess(tr); break; case ITestResult.STARTED: itl.onTestStart(tr); break; default: throw new AssertionError("Unknown status: " + tr.getStatus()); } } }
Source:
<code>public Optional<DefaultIdentifierBridgeExpectations<BigInteger>> getDefaultIdentifierBridgeExpectations() { return Optional.of( new DefaultIdentifierBridgeExpectations<BigInteger>() { @Override public List<BigInteger> getEntityIdentifierValues() { <START> return Arrays.asList( BigInteger.valueOf( -10000 ), BigInteger.valueOf( -1 ), BigInteger.ZERO, BigInteger.ONE, BigInteger.TEN, <END> BigInteger.valueOf( 10000 ) ); } @Override public List<String> getDocumentIdentifierValues() { return Arrays.asList( "-10000", "-1", "0", "1", "10", "10000" ); } @Override public Class<?> getTypeWithIdentifierBridge1() { return TypeWithIdentifierBridge1.class; } @Override public Object instantiateTypeWithIdentifierBridge1(BigInteger identifier) { TypeWithIdentifierBridge1 instance = new TypeWithIdentifierBridge1(); instance.id = identifier; return instance; } @Override public Class<?> getTypeWithIdentifierBridge2() { return TypeWithIdentifierBridge2.class; } } ); }</code><technical_language>here, values represented a BigInteger sense. new BigInteger(String), for example</technical_language>

Target:
public Optional<DefaultIdentifierBridgeExpectations<BigInteger>> getDefaultIdentifierBridgeExpectations() { return Optional.of( new DefaultIdentifierBridgeExpectations<BigInteger>() { @Override public List<BigInteger> getEntityIdentifierValues() { return takeBigIntegerSequence(); } @Override public List<String> getDocumentIdentifierValues() { return Arrays.asList( "-10000", "-1", "0", "1", "10", "10000", "9223372036854775807000" ); } @Override public Class<?> getTypeWithIdentifierBridge1() { return TypeWithIdentifierBridge1.class; } @Override public Object instantiateTypeWithIdentifierBridge1(BigInteger identifier) { TypeWithIdentifierBridge1 instance = new TypeWithIdentifierBridge1(); instance.id = identifier; return instance; } @Override public Class<?> getTypeWithIdentifierBridge2() { return TypeWithIdentifierBridge2.class; } } ); }
Source:
<code>public MulePackageBuilder withPackagingOptions(PackagingOptions packagingOptions) { <START> checkNotNull(packagingOptions, "The PackagingOptions must not be null"); <END> this.packagingOptions = packagingOptions; return this; }</code><technical_language>please change checkArgument? this is method throw a NP</technical_language>

Target:
public MulePackageBuilder withPackagingOptions(PackagingOptions packagingOptions) { checkArgument(packagingOptions != null, "The PackagingOptions must not be null"); this.packagingOptions = packagingOptions; return this; }
Source:
<code>public Iterator<Collection<Object>> splitRelationshipTypesIntoRounds( Iterator<Entry<Object,MutableLong>> allTypes, long freeMemoryForDenseNodeCache ) { PrefetchingIterator<Entry<Object,MutableLong>> peekableAllTypes = new PrefetchingIterator<Entry<Object,MutableLong>>() { @Override protected Entry<Object,MutableLong> fetchNextOrNull() { return allTypes.hasNext() ? allTypes.next() : null; } }; long numberOfDenseNodes = calculateNumberOfDenseNodes(); return new PrefetchingIterator<Collection<Object>>() { @Override protected Collection<Object> fetchNextOrNull() { long currentSetOfRelationshipsMemoryUsage = 0; Set<Object> typesToImportThisRound = new HashSet<>(); while ( peekableAllTypes.hasNext() ) { Map.Entry<Object,MutableLong> type = peekableAllTypes.peek(); long relationshipCountForThisType = type.getValue().longValue(); long maxDenseNodesForThisType = min( numberOfDenseNodes, relationshipCountForThisType * 2 ); long memoryUsageForThisType = maxDenseNodesForThisType * NodeRelationshipCache.GROUP_ENTRY_SIZE; <START> if ( currentSetOfRelationshipsMemoryUsage + memoryUsageForThisType > freeMemoryForDenseNodeCache && <END> currentSetOfRelationshipsMemoryUsage > 0 ) { break; } peekableAllTypes.next(); typesToImportThisRound.add( type.getKey() ); currentSetOfRelationshipsMemoryUsage += memoryUsageForThisType; } return typesToImportThisRound.isEmpty() ? null : typesToImportThisRound; } }; }</code><technical_language>nice clarifying parenthesis</technical_language>

Target:
public Iterator<Collection<Object>> splitRelationshipTypesIntoRounds( Iterator<Entry<Object,MutableLong>> allTypes, long freeMemoryForDenseNodeCache ) { PrefetchingIterator<Entry<Object,MutableLong>> peekableAllTypes = new PrefetchingIterator<Entry<Object,MutableLong>>() { @Override protected Entry<Object,MutableLong> fetchNextOrNull() { return allTypes.hasNext() ? allTypes.next() : null; } }; long numberOfDenseNodes = calculateNumberOfDenseNodes(); return new PrefetchingIterator<Collection<Object>>() { @Override protected Collection<Object> fetchNextOrNull() { long currentSetOfRelationshipsMemoryUsage = 0; Set<Object> typesToImportThisRound = new HashSet<>(); while ( peekableAllTypes.hasNext() ) { Map.Entry<Object,MutableLong> type = peekableAllTypes.peek(); long relationshipCountForThisType = type.getValue().longValue(); long maxDenseNodesForThisType = min( numberOfDenseNodes, relationshipCountForThisType * 2 ); long memoryUsageForThisType = maxDenseNodesForThisType * NodeRelationshipCache.GROUP_ENTRY_SIZE; long memoryUsageUpToAndIncludingThisType = currentSetOfRelationshipsMemoryUsage + memoryUsageForThisType; if ( memoryUsageUpToAndIncludingThisType > freeMemoryForDenseNodeCache && currentSetOfRelationshipsMemoryUsage > 0 ) { break; } peekableAllTypes.next(); typesToImportThisRound.add( type.getKey() ); currentSetOfRelationshipsMemoryUsage += memoryUsageForThisType; } return typesToImportThisRound.isEmpty() ? null : typesToImportThisRound; } }; }
Source:
<code>public MetaMessage build() { publishedAt = clock.instant(); <START> Long durationMs = publishedAt.toEpochMilli() - this.createdAt.toEpochMilli(); <END> return new MetaMessage(ttl, createdAt, publishedAt, durationMs, serviceDetails); }</code><technical_language>get rid of subtraction [Duration](<LINK_0> instead</technical_language>

Target:
public MetaMessage build() { publishedAt = clock.instant(); Long durationMs = Duration.between(publishedAt, this.createdAt).toMillis();; return new MetaMessage(ttl, createdAt, publishedAt, durationMs, serviceDetails); }
Source:
<code>public Status(Collection<DruidModule> modules) { <START> this.version = "0.9.2"; <END> this.modules = getExtensionVersions(modules); this.memory = new Memory(Runtime.getRuntime()); }</code><technical_language>unrelated change</technical_language>

Target:
public Status(Collection<DruidModule> modules) { this.version = getDruidVersion(); this.modules = getExtensionVersions(modules); this.memory = new Memory(Runtime.getRuntime()); }
Source:
<code>public void handleTasksOfCommandWithEmptyVdsmId(final List<AsyncTasks> tasks) { ThreadPoolUtil.execute(new Runnable() { @SuppressWarnings("synthetic-access") @Override public void run() { TransactionSupport.executeInNewTransaction(new TransactionMethod<Object>() { @Override public Object runInTransaction() { boolean isPartiallySubmittedCommand = isPartiallySubmittedCommand(tasks); for (AsyncTasks task : tasks) { handleTaskOfCommandWithEmptyVdsmId(isPartiallySubmittedCommand, task); } <START> irsBrokerLatch.countDown(); <END> return null; } }); } }); }</code><technical_language>I is do this in finally block, in case exception is thrown in previous methods</technical_language>

Target:
public void handleTasksOfCommandWithEmptyVdsmId(final List<AsyncTasks> tasks) { ThreadPoolUtil.execute(new Runnable() { @SuppressWarnings("synthetic-access") @Override public void run() { TransactionSupport.executeInNewTransaction(new TransactionMethod<Object>() { @Override public Object runInTransaction() { try { boolean isPartiallySubmittedCommand = isPartiallySubmittedCommand(tasks); for (AsyncTasks task : tasks) { handleTaskOfCommandWithEmptyVdsmId(isPartiallySubmittedCommand, task); } return null; } finally { irsBrokerLatch.countDown(); } } }); } }); }
Source:
<code>public void testSTArea() { assertArea("POLYGON ((2 2, 2 6, 6 6, 6 2))", 16.0); assertArea("POLYGON EMPTY", 0.0); assertArea("LINESTRING (1 4, 2 5)", 0.0); assertArea("LINESTRING EMPTY", 0.0); assertArea("POINT (1 4)", 0.0); assertArea("POINT EMPTY", 0.0); assertArea("GEOMETRYCOLLECTION (POINT (8 8), LINESTRING (5 5, 6 6), POLYGON ((1 1, 3 1, 3 4, 1 4, 1 1)))", 6.0); assertArea("GEOMETRYCOLLECTION (POLYGON ((0 0, 2 0, 2 2, 0 2, 0 0)), POLYGON ((1 1, 3 1, 3 3, 1 3, 1 1)))", 8.0); assertArea("GEOMETRYCOLLECTION (POLYGON ((0 0, 2 0, 2 2, 0 2, 0 0)), POLYGON ((1 1, 3 1, 3 3, 1 3, 1 1)), GEOMETRYCOLLECTION (POINT (8 8), LINESTRING (5 5, 6 6), POLYGON ((1 1, 3 1, 3 4, 1 4, 1 1))))", 14.0); <START> <END> }</code><technical_language>remove extra empty line</technical_language>

Target:
public void testSTArea() { assertArea("POLYGON ((2 2, 2 6, 6 6, 6 2))", 16.0); assertArea("POLYGON EMPTY", 0.0); assertArea("LINESTRING (1 4, 2 5)", 0.0); assertArea("LINESTRING EMPTY", 0.0); assertArea("POINT (1 4)", 0.0); assertArea("POINT EMPTY", 0.0); assertArea("GEOMETRYCOLLECTION EMPTY", 0.0); assertArea("GEOMETRYCOLLECTION (POINT (8 8), LINESTRING (5 5, 6 6), POLYGON ((1 1, 3 1, 3 4, 1 4, 1 1)))", 6.0); assertArea("GEOMETRYCOLLECTION (POLYGON ((0 0, 2 0, 2 2, 0 2, 0 0)), POLYGON ((1 1, 3 1, 3 3, 1 3, 1 1)))", 8.0); assertArea("GEOMETRYCOLLECTION (POLYGON ((0 0, 2 0, 2 2, 0 2, 0 0)), POLYGON ((1 1, 3 1, 3 3, 1 3, 1 1)), GEOMETRYCOLLECTION (POINT (8 8), LINESTRING (5 5, 6 6), POLYGON ((1 1, 3 1, 3 4, 1 4, 1 1))))", 14.0); }
Source:
<code>public VehicleLocationRecordBean getVehicleLocationRecordForVehicleId( AgencyAndId vehicleId, long targetTime) { TargetTime target = new TargetTime(targetTime, targetTime); <START> if (_blockLocationService == null) { <END> _log.error("blocklocationservice is null"); return null; } BlockLocation blockLocation = _blockLocationService.getLocationForVehicleAndTime( vehicleId, target); if (blockLocation == null) return null; return getBlockLocationAsVehicleLocationRecord(blockLocation); }</code><technical_language>added setBlockLocationService(...) @Autowired remove this null check, null</technical_language>

Target:
public VehicleLocationRecordBean getVehicleLocationRecordForVehicleId( AgencyAndId vehicleId, long targetTime) { TargetTime target = new TargetTime(targetTime, targetTime); BlockLocation blockLocation = _blockLocationService.getLocationForVehicleAndTime( vehicleId, target); if (blockLocation == null) return null; return getBlockLocationAsVehicleLocationRecord(blockLocation); }
Source:
<code>private void parse(File targetFile) throws IOException { <START> if (!targetFile.exists()) { <END> return; } BufferedReader br = new BufferedReader(new FileReader(targetFile)); String txt; while ((txt = br.readLine()) != null) { txt = txt.trim(); if (txt.length() > 0 && !txt.startsWith("#")) { rules.add(new IgnoreRule(txt)); } } }</code><technical_language>style: curly braces for single line statement</technical_language>

Target:
private void parse(File targetFile) throws IOException { BufferedReader br = new BufferedReader(new FileReader(targetFile)); String txt; while ((txt = br.readLine()) != null) { txt = txt.trim(); if (txt.length() > 0 && !txt.startsWith("#")) { rules.add(new IgnoreRule(txt)); } } }
Source:
<code>protected boolean canEdit(ClusterNetworkModel clusterNetworkModel) { Version clusterVersion = clusterNetworkModel.getCluster().getCompatibilityVersion(); <START> boolean defaultRouteSupported = Version.v4_2.lessOrEquals(clusterVersion); <END> return defaultRouteSupported && clusterNetworkModel.isAttached() && !clusterNetworkModel.isExternal() && (!isMultipleSelectionAllowed() || !clusterNetworkModel.isManagement() || !clusterNetworkModel.getOriginalNetworkCluster().isDefaultRoute()); }</code><technical_language>Please a configValue a hardcoded version</technical_language>

Target:
protected boolean canEdit(ClusterNetworkModel clusterNetworkModel) { return clusterNetworkModel.isAttached() && !clusterNetworkModel.isExternal() && (!isMultipleSelectionAllowed() || !clusterNetworkModel.isManagement() || !clusterNetworkModel.getOriginalNetworkCluster().isDefaultRoute()); }
Source:
<code>public void closeInterstitial() throws InterruptedException { boolean isMercury = false; try { isMercury = interstitialCloseButtonWrapperMercury.isDisplayed(); Log.log("Interstitial Mercury", "Yes", true); } catch (NoSuchElementException e) { Log.log("Interstitial Mercury", "No", true); } <START> <END> if (isMercury) { String closeButtonText = interstitialCloseButtonWrapperMercury.getText(); Log.log("Wait time for close button", String.valueOf(WAIT_BUTTON_DELAY_TOLERANCE), true); Thread.sleep((WAIT_BUTTON_DELAY_TOLERANCE) * 1000); interstitialCloseButtonMercury.click(); } else { wait.forElementVisible(interstitialCloseButton); interstitialCloseButton.click(); } }</code><technical_language>I need this if statement (there is close button delay)</technical_language>

Target:
public void closeInterstitial() { boolean isMercury = false; try { isMercury = interstitialCloseButtonWrapperMercury.isDisplayed(); Log.log("Interstitial Mercury", "Yes", true); } catch (NoSuchElementException e) { Log.log("Interstitial Mercury", "No", true); } if (isMercury) { wait.forElementVisible(interstitialCloseButtonMercury); interstitialCloseButtonMercury.click(); } else { wait.forElementVisible(interstitialCloseButton); interstitialCloseButton.click(); } }
Source:
<code>public List<PropertyEditorCategory> getLayoutDragComponentProperties() { List<PropertyEditorCategory> result = getLayoutDragComponent().getPropertyCategories(layoutComponent); Map<String,String> propertyMap = layoutComponent.getProperties(); <START> PropertyEditorCategory category = layoutCssHelper.createCategory(LayoutEditorCssHelper.CSS_CATEGORY_PANEL); <END> category.withField(layoutCssHelper.createField(propertyMap, CssProperty.WIDTH)); category.withField(layoutCssHelper.createField(propertyMap, CssProperty.HEIGHT)); category.withField(layoutCssHelper.createField(propertyMap, CssProperty.BACKGROUND_COLOR)); result.add(0, category); category = layoutCssHelper.createCategory(LayoutEditorCssHelper.CSS_CATEGORY_MARGIN); category.withField(layoutCssHelper.createField(propertyMap, CssProperty.MARGIN_TOP)); category.withField(layoutCssHelper.createField(propertyMap, CssProperty.MARGIN_BOTTOM)); category.withField(layoutCssHelper.createField(propertyMap, CssProperty.MARGIN_LEFT)); category.withField(layoutCssHelper.createField(propertyMap, CssProperty.MARGIN_RIGHT)); result.add(1, category); category = layoutCssHelper.createCategory(LayoutEditorCssHelper.CSS_CATEGORY_PADDING); category.withField(layoutCssHelper.createField(propertyMap, CssProperty.PADDING_TOP)); category.withField(layoutCssHelper.createField(propertyMap, CssProperty.PADDING_BOTTOM)); category.withField(layoutCssHelper.createField(propertyMap, CssProperty.PADDING_LEFT)); category.withField(layoutCssHelper.createField(propertyMap, CssProperty.PADDING_RIGHT)); result.add(2, category); return result; }</code><technical_language>please move this</technical_language>

Target:
public List<PropertyEditorCategory> getLayoutDragComponentProperties() { List<PropertyEditorCategory> result = layoutCssHelper.getComponentPropertyCategories(layoutComponent); result.addAll(getLayoutDragComponent().getPropertyCategories(layoutComponent)); return result; }
Source:
<code>public Enumeration<URL> getResources(String name) throws IOException { for (String mask : masksResources) { if(name.startsWith(mask)) <START> return null; <END> } return super.getResources(name); }</code><technical_language>Is this legal? Safer return empty enumeration</technical_language>

Target:
public Enumeration<URL> getResources(String name) throws IOException { if (isMasked(name)) return Collections.emptyEnumeration(); return super.getResources(name); }
Source:
<code>public void run() { while (!Thread.currentThread().isInterrupted()) { try { final OperatorChain query = operatorChainManager.pickOperatorChain(); if (query != null) { query.processNextEvent(); if (!query.isQueueEmpty()) { <START> operatorChainManager.insert(query); <END> } } } catch (final Exception t) { throw t; } } }</code><technical_language>I is a concurrency issue. Multiple threads insert query in this line DefaultOperatorChainImpl 145 line</technical_language>

Target:
public void run() { while (!Thread.currentThread().isInterrupted()) { try { final OperatorChain query = operatorChainManager.pickOperatorChain(); if (query != null) { query.processNextEvent(); } } catch (final Exception t) { throw t; } } }
Source:
<code>public GroupResource parse(TopLevelResource parent, IdString id) throws AuthException, ResourceNotFoundException { final CurrentUser user = self.get(); if (user instanceof AnonymousUser) { throw new AuthException("Authentication required"); } else if(!(user.isIdentifiedUser())) { throw new ResourceNotFoundException(id); } GroupDescription.Basic group = parseId(id.get()); if (group == null) { throw new ResourceNotFoundException(id.get()); } GroupControl ctl = groupControlFactory.controlFor(group); <START> if (group.getClass().getEnclosingClass().equals(LdapGroupBackend.class)) { if (!ctl.isVisible(groupBackend)) { throw new ResourceNotFoundException(id); } } else { <END> if (!ctl.isVisible()) { throw new ResourceNotFoundException(id); } } return new GroupResource(ctl); }</code><technical_language>LDAP-specific code of LdapGroupBackend</technical_language>

Target:
public GroupResource parse(TopLevelResource parent, IdString id) throws AuthException, ResourceNotFoundException { final CurrentUser user = self.get(); if (user instanceof AnonymousUser) { throw new AuthException("Authentication required"); } else if(!(user.isIdentifiedUser())) { throw new ResourceNotFoundException(id); } GroupDescription.Basic group = parseId(id.get()); if (group == null) { throw new ResourceNotFoundException(id.get()); } GroupControl ctl = groupControlFactory.controlFor(group); if (!ctl.isVisible()) { throw new ResourceNotFoundException(id); } return new GroupResource(ctl); }
Source:
<code>private static void validateDescriptionSection(String fileName, String sectionName, Node subSection) { if ("config_filters.xml".equals(fileName) && "SuppressionXpathFilter".equals(sectionName)) { <START> validateSuppressionXpathFilterIncompatibleChecksList(subSection); <END> } }</code><technical_language>Is this right issue number? issue is ensure checks test showcase xpath support</technical_language>

Target:
private static void validateDescriptionSection(String fileName, String sectionName, Node subSection) { if ("config_filters.xml".equals(fileName) && "SuppressionXpathFilter".equals(sectionName)) { validateListOfSuppressionXpathFilterIncompatibleChecks(subSection); } }
Source:
<code>public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws IOException, AccumuloException, AccumuloSecurityException, TableNotFoundException { <START> boolean tableOptPassed = cl.hasOption(OptUtil.tableOpt().getOpt()); <END> final String tableName; if (tableOptPassed) { tableName = OptUtil.getTableOpt(cl, shellState); } else { tableName = shellState.getTableName(); shellState.checkTableState(); } String dir = cl.getArgs()[0]; String failureDir = cl.getArgs()[1]; final boolean setTime = Boolean.parseBoolean(cl.getArgs()[2]); shellState.getConnector().tableOperations().importDirectory(tableName, dir, failureDir, setTime); return 0; }</code><technical_language>I OptUtil.getTableOpt() is supposed do of this logic. in: java String tableName = OptUtil.getTableOpt(cl, shellState); way, need declare option in getOptions method, like: java @Override public Options getOptions() { Options o = new Options(); o.addOption(OptUtil.tableOpt("name of table import files into")); return o; }</technical_language>

Target:
public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws IOException, AccumuloException, AccumuloSecurityException, TableNotFoundException { final String tableName = OptUtil.getTableOpt(cl, shellState); String dir = cl.getArgs()[0]; String failureDir = cl.getArgs()[1]; final boolean setTime = Boolean.parseBoolean(cl.getArgs()[2]); shellState.getConnector().tableOperations().importDirectory(tableName, dir, failureDir, setTime); return 0; }
Source:
<code><START> public void testStreamWithoutTotalReads() throws IOException, NoSuchFieldException, IllegalAccessException { <END> final String tmpDir = IOUtil.getDefaultTmpDir().getAbsolutePath(); final String[] args = new String[]{ "INPUT=/dev/stdin", "SPLIT_TO_N_READS=5", "OUTPUT=" + tmpDir }; final int rc = runPicardCommandLine(args); Assert.assertEquals(rc, 1); }</code><technical_language>longer throws NoSuchFieldException</technical_language>

Target:
public void testStreamWithoutTotalReads() throws IOException { final String tmpDir = IOUtil.getDefaultTmpDir().getAbsolutePath(); final String[] args = new String[]{ "INPUT=/dev/stdin", "SPLIT_TO_N_READS=5", "OUTPUT=" + tmpDir }; final int rc = runPicardCommandLine(args); Assert.assertEquals(rc, 1); }
Source:
<code>protected static <SelfT extends AbstractCommitSessionValve<?>> void commitSession( final Request request) { final Context context = request.getContext(); final Manager manager = context.getManager(); if (manager instanceof DeltaSessionManager) { final DeltaSessionFacade session = (DeltaSessionFacade) request.getSession(false); if (session != null) { final DeltaSessionManager<SelfT> deltaSessionManager = uncheckedCast(manager); <START> final Log contextLogger = context.getLogger(); <END> if (session.isValid()) { deltaSessionManager.removeTouchedSession(session.getId()); session.commit(); if (contextLogger.isDebugEnabled()) { contextLogger.debug(session + ": Committed."); } } else { if (contextLogger.isDebugEnabled()) { contextLogger.debug(session + ": Not valid so not committing."); } } } } }</code><technical_language>change this AbstractCommitSessionValve's Logger (the static log variable) instead of Context's logger? this, if AbstractCommitSessionValve's Logger, 1 line in logging.properties is necessary debug this class 2: org.apache.geode.modules.session.level = FINE</technical_language>

Target:
protected static <SelfT extends AbstractCommitSessionValve<?>> void commitSession( final Request request) { final Context context = request.getContext(); final Manager manager = context.getManager(); if (manager instanceof DeltaSessionManager) { final DeltaSessionFacade session = (DeltaSessionFacade) request.getSession(false); if (session != null) { final DeltaSessionManager<SelfT> deltaSessionManager = uncheckedCast(manager); if (session.isValid()) { deltaSessionManager.removeTouchedSession(session.getId()); session.commit(); if (log.isDebugEnabled()) { log.debug(session + ": Committed."); } } else { if (log.isDebugEnabled()) { log.debug(session + ": Not valid so not committing."); } } } } }
Source:
<code><START> public TmfStateValue getValue() { <END> return fValue; }</code><technical_language>JDT puts there, @NonNull type line</technical_language>

Target:
public @NonNull TmfStateValue getValue() { return fValue; }