auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected boolean isSatisfiedByInternal(final Assertion assertion) { if (assertion.getChainedAuthentications().size() > 0) { final int index = assertion.getChainedAuthentications().size() - 1; final Authentication authToUse = assertion.getChainedAuthentications().get(index); final String authnMethodUsed = (String) authToUse.getAttributes() .get(MultiFactorAuthenticationSupportingWebApplicationService.CONST_PARAM_AUTHN_METHOD); if (!StringUtils.isBlank(getAuthenticationMethod())) { if (StringUtils.isBlank(authnMethodUsed)) { final String msg = String.format("Requested authentication method [%s] is not available", getAuthenticationMethod()); logger.debug(msg); throw new UnacceptableMultiFactorAuthenticationMethodException("UNACCEPTABLE_AUTHENTICATION_METHOD", msg, getAuthenticationMethod()); } if (!authnMethodUsed.equals(getAuthenticationMethod())) { final String msg = String.format("Requested authentication method [%s] does not " + "match the authentication method used [%s]", getAuthenticationMethod(), authnMethodUsed); logger.debug(msg); throw new UnrecognizedMultiFactorAuthenticationMethodException("UNRECOGNIZED_AUTHENTICATION_METHOD", msg, getAuthenticationMethod()); } } return true; } logger.debug("No authentication context is available"); return false; }

Target:
protected boolean isSatisfiedByInternal(final Assertion assertion) { if (assertion.getChainedAuthentications().size() > 0) { final int index = assertion.getChainedAuthentications().size() - 1; final Authentication authentication = assertion.getChainedAuthentications().get(index); final String authnMethodUsed = (String) authentication.getAttributes() .get(MultiFactorAuthenticationSupportingWebApplicationService.CONST_PARAM_AUTHN_METHOD); if (!StringUtils.isBlank(getAuthenticationMethod())) { if (StringUtils.isBlank(authnMethodUsed)) { final String msg = String.format("Requested authentication method [%s] is not available", getAuthenticationMethod()); logger.debug(msg); throw new UnacceptableMultiFactorAuthenticationMethodException("UNACCEPTABLE_AUTHENTICATION_METHOD", msg, getAuthenticationMethod()); } if (!authnMethodUsed.equals(getAuthenticationMethod())) { final String msg = String.format("Requested authentication method [%s] does not " + "match the authentication method used [%s]", getAuthenticationMethod(), authnMethodUsed); logger.debug(msg); throw new UnrecognizedMultiFactorAuthenticationMethodException("UNRECOGNIZED_AUTHENTICATION_METHOD", msg, getAuthenticationMethod()); } } return true; } logger.debug("No authentication context is available"); return false; }
Source:
onRadioAvailable() { PowerManager pm = (PowerManager)mContext.getSystemService(Context.POWER_SERVICE); boolean isScreenOn = pm.isScreenOn(); sendScreenState(isScreenOn); }

Target:
onRadioAvailable() { PowerManager pm = (PowerManager)mContext.getSystemService(Context.POWER_SERVICE); sendScreenState(pm.isScreenOn()); }
Source:
AsyncSession getSession() { return AsyncSession.this; }

Target:
protected AsyncSession getSession() { return AsyncSession.this; }
Source:
public void setIpAddress( String ipAddress ) { if(! Utils.isEmptyOrWhitespaces(ipAddress)) this.ipAddress = ipAddress; this.logger.finer( "New IP address set in the agent (if not empty): " + ipAddress ); }

Target:
public void setIpAddress( String ipAddress ) { if(! Utils.isEmptyOrWhitespaces(ipAddress)) { this.ipAddress = ipAddress; this.logger.finer( "New IP address set in the agent: " + ipAddress ); } }
Source:
public void addUserClaimValues(String userName, ClaimValue[] claims, String profileName) throws UserStoreException { String userAttributeSeparator = ","; String claimSeparator = super.getUserRealm().getRealmConfiguration().getUserStoreProperty( MULTI_ATTRIBUTE_SEPARATOR); if (claimSeparator != null && !claimSeparator.trim().isEmpty()) { userAttributeSeparator = claimSeparator; } for (ClaimValue claim : claims) { String existingClaimValue = getUserStoreManager().getUserClaimValue(userName, claim.getClaimURI(), profileName); if (existingClaimValue == null) { existingClaimValue = ""; } if (claim.getValue() != null && !"".equals(claim.getValue())) { boolean claimValueAlreadyExists = false; if (existingClaimValue.contains(userAttributeSeparator)) { StringTokenizer st = new StringTokenizer(existingClaimValue, userAttributeSeparator); while (st.hasMoreElements()) { String existingValue = st.nextElement().toString(); if (existingValue.equalsIgnoreCase(claim.getValue())) { claimValueAlreadyExists = true; } } } else if(existingClaimValue.equalsIgnoreCase(claim.getValue())) { claimValueAlreadyExists = true; } if(!claimValueAlreadyExists) { String claimValue; if (!"".equals(existingClaimValue)) { claimValue = existingClaimValue + userAttributeSeparator + claim.getValue(); } else { claimValue = claim.getValue(); } getUserStoreManager().setUserClaimValue(userName, claim.getClaimURI(), claimValue, profileName); } } } }

Target:
public void addUserClaimValues(String userName, ClaimValue[] claims, String profileName) throws UserStoreException { String userAttributeSeparator = ","; String claimSeparator = super.getUserRealm().getRealmConfiguration().getUserStoreProperty( MULTI_ATTRIBUTE_SEPARATOR); if (StringUtils.isNotBlank(claimSeparator)) { userAttributeSeparator = claimSeparator; } for (ClaimValue claim : claims) { String existingClaimValue = getUserStoreManager().getUserClaimValue(userName, claim.getClaimURI(), profileName); if (existingClaimValue == null) { existingClaimValue = ""; } if (StringUtils.isNotBlank(claim.getValue())) { boolean claimValueAlreadyExists = false; if (existingClaimValue.contains(userAttributeSeparator)) { StringTokenizer st = new StringTokenizer(existingClaimValue, userAttributeSeparator); while (st.hasMoreElements()) { String existingValue = st.nextElement().toString(); if (existingValue.equalsIgnoreCase(claim.getValue())) { claimValueAlreadyExists = true; } } } else if(existingClaimValue.equalsIgnoreCase(claim.getValue())) { claimValueAlreadyExists = true; } if(!claimValueAlreadyExists) { String claimValue; if (!"".equals(existingClaimValue)) { claimValue = existingClaimValue + userAttributeSeparator + claim.getValue(); } else { claimValue = claim.getValue(); } getUserStoreManager().setUserClaimValue(userName, claim.getClaimURI(), claimValue, profileName); } } } }
Source:
protected Set<Sensor<?>> getSensorsToTrack() { return MutableSet.<Sensor<?>>builder() .addAll(getRequiredConfig(SENSORS_TO_TRACK)) .add(Attributes.SERVICE_UP) .buildImmutable(); }

Target:
protected Set<Sensor<?>> getSensorsToTrack() { return ImmutableSet.<Sensor<?>>builder() .addAll(getRequiredConfig(SENSORS_TO_TRACK)) .add(Attributes.SERVICE_UP) .build(); }
Source:
private void deleteTableData(Path tablePath, boolean ifPurge, boolean shouldEnableCm) { if (tablePath != null) { try { wh.deleteDir(tablePath, true, ifPurge, shouldEnableCm); } catch (MetaException e) { LOG.error("Failed to delete table directory: " + tablePath + " " + e.getMessage()); } } }

Target:
private void deleteTableData(Path tablePath, boolean ifPurge, boolean shouldEnableCm) { if (tablePath != null) { try { if (shouldEnableCm) { FileStatus[] statuses = tablePath.getFileSystem(conf).listStatus(tablePath, ReplChangeManager.CMROOT_PATH_FILTER); for (final FileStatus status : statuses) { wh.deleteDir(status.getPath(), true, ifPurge, shouldEnableCm); } FileStatus[] statusWithoutFilter = tablePath.getFileSystem(conf).listStatus(tablePath); if (statusWithoutFilter.length == 0) { wh.deleteDir(tablePath, true, ifPurge, shouldEnableCm); } } else { wh.deleteDir(tablePath, true, ifPurge, shouldEnableCm); } } catch (Exception e) { LOG.error("Failed to delete table directory: " + tablePath + " " + e.getMessage()); } } }
Source:
public void register(final TopicPartition partition, final ProcessorStateManager stateManager) { final StateStoreMetadata storeMetadata = stateManager.storeMetadata(partition); if (storeMetadata == null) { throw new IllegalStateException("Cannot find the corresponding state store metadata for changelog " + partition); } final ChangelogMetadata changelogMetadata = new ChangelogMetadata(storeMetadata, stateManager); if (stateManager.taskType() == Task.TaskType.STANDBY && stateManager.changelogAsSource(partition)) { changelogMetadata.restoreEndOffset = 0L; } if (changelogs.putIfAbsent(partition, changelogMetadata) != null) { throw new IllegalStateException("There is already a changelog registered for " + partition + ", this should not happen: " + changelogs); } addChangelogsToRestoreConsumer(Collections.singleton(partition)); pauseChangelogsFromRestoreConsumer(Collections.singleton(partition)); }

Target:
public void register(final TopicPartition partition, final ProcessorStateManager stateManager) { final StateStoreMetadata storeMetadata = stateManager.storeMetadata(partition); if (storeMetadata == null) { throw new IllegalStateException("Cannot find the corresponding state store metadata for changelog " + partition); } final ChangelogMetadata changelogMetadata = new ChangelogMetadata(storeMetadata, stateManager); if (stateManager.taskType() == Task.TaskType.STANDBY && stateManager.changelogAsSource(partition)) { changelogMetadata.restoreEndOffset = 0L; } if (changelogs.putIfAbsent(partition, changelogMetadata) != null) { throw new IllegalStateException("There is already a changelog registered for " + partition + ", this should not happen: " + changelogs); } }
Source:
OutputStream storeFileStream(String relPath) throws IOException; default boolean features() throws IOException { return false; }

Target:
OutputStream storeFileStream(String relPath) throws IOException; default boolean getRemoteFtpFeatures() throws IOException { return false; }
Source:
private List<BrickProfileDetails> prepareBrickProfileDetails(GlusterVolumeEntity volume, Object[] brickProfileDetails) { List<BrickProfileDetails> brickProfileDetailsList = new ArrayList<BrickProfileDetails>(); for (Object brickProfileObj : brickProfileDetails) { BrickProfileDetails brickProfileDetail = new BrickProfileDetails(); Map<String, Object> brickProfile = (Map<String, Object>) brickProfileObj; Guid brickId = GlusterCoreUtil.getBrickByQualifiedName(volume.getBricks(), (String) brickProfile.get(BRICK)) .getId(); if (brickId != null) { brickProfileDetail.setBrickId(brickId); } List<StatsInfo> statsInfo = new ArrayList<StatsInfo>(); statsInfo.add(getStatInfo((Map<String, Object>) brickProfile.get(CUMULATIVE_STATS), CUMULATIVE_STATS)); statsInfo.add(getStatInfo((Map<String, Object>) brickProfile.get(INTERVAL_STATS), INTERVAL_STATS)); brickProfileDetail.setStatsInfo(statsInfo); brickProfileDetailsList.add(brickProfileDetail); } return brickProfileDetailsList; }

Target:
private List<BrickProfileDetails> prepareBrickProfileDetails(GlusterVolumeEntity volume, Object[] brickProfileDetails) { List<BrickProfileDetails> brickProfileDetailsList = new ArrayList<BrickProfileDetails>(); for (Object brickProfileObj : brickProfileDetails) { BrickProfileDetails brickProfileDetail = new BrickProfileDetails(); Map<String, Object> brickProfile = (Map<String, Object>) brickProfileObj; GlusterBrickEntity brick = GlusterCoreUtil.getBrickByQualifiedName(volume.getBricks(), (String) brickProfile.get(BRICK)); if (brick != null) { brickProfileDetail.setBrickId(brick.getId()); } List<StatsInfo> statsInfo = new ArrayList<StatsInfo>(); statsInfo.add(getStatInfo((Map<String, Object>) brickProfile.get(CUMULATIVE_STATS), CUMULATIVE_STATS)); statsInfo.add(getStatInfo((Map<String, Object>) brickProfile.get(INTERVAL_STATS), INTERVAL_STATS)); brickProfileDetail.setStatsInfo(statsInfo); brickProfileDetailsList.add(brickProfileDetail); } return brickProfileDetailsList; }
Source:
public CompletableFuture<Void> handleDefault(InvocationContext ctx, VisitableCommand command) throws Throwable { if (!ctx.isOriginLocal()) { return ctx.continueInvocation(); } Transaction tx; if (transactionManager.getTransaction() != null || (tx = batchContainer.getBatchTransaction()) == null) { return ctx.continueInvocation(); } try { transactionManager.resume(tx); InvocationContext invocationContext = ctx; if (!ctx.isInTxScope()) { log.tracef("Called with a non-tx invocation context: %s", ctx); invocationContext = invocationContextFactory.createInvocationContext(true, -1); } return ctx.shortCircuit(invoker.invoke(invocationContext, command)); } finally { if (transactionManager.getTransaction() != null && batchContainer.isSuspendTxAfterInvocation()) transactionManager.suspend(); } }

Target:
public CompletableFuture<Void> handleDefault(InvocationContext ctx, VisitableCommand command) throws Throwable { if (!ctx.isOriginLocal()) { return ctx.continueInvocation(); } Transaction tx; if (transactionManager.getTransaction() != null || (tx = batchContainer.getBatchTransaction()) == null) { return ctx.continueInvocation(); } try { transactionManager.resume(tx); InvocationContext txInvocationContext = ctx; if (!ctx.isInTxScope()) { log.tracef("Called with a non-tx invocation context: %s", ctx); txInvocationContext = invocationContextFactory.createInvocationContext(true, -1); } return ctx.shortCircuit(invoker.invoke(txInvocationContext, command)); } finally { if (transactionManager.getTransaction() != null && batchContainer.isSuspendTxAfterInvocation()) transactionManager.suspend(); } }
Source:
public boolean getFlag(String flag) { String[] flags = getFlags(); for (String flag2 : flags) { if (flag2.equals(flag)) return true; } return false; }

Target:
public boolean getFlag(String flag) { for (String f : getFlags()) { if (f.equals(flag)) return true; } return false; }
Source:
protected RepositoryInfo createConfigGroup(String alias, Map<String, Object> env) { RepositoryConfiguration configuration = new RepositoryConfiguration(env); configuration.add(EnvironmentParameters.AVOID_INDEX, true); configuration.add(EnvironmentParameters.SPACE, "system"); RepositoryInfo repositoryConfig = new RepositoryInfo(alias, false, configuration); return repositoryConfig; }

Target:
protected RepositoryInfo createConfigGroup(String alias, Map<String, Object> env) { RepositoryConfiguration configuration = new RepositoryConfiguration(env); configuration.add(EnvironmentParameters.AVOID_INDEX, true); configuration.add(EnvironmentParameters.SPACE, SYSTEM); RepositoryInfo repositoryConfig = new RepositoryInfo(alias, false, configuration); return repositoryConfig; }
Source:
private void writeRawBodyToStream(Cursor cursor, SQLiteDatabase db, OutputStream outputStream) throws IOException, MessagingException { long partId = cursor.getLong(ATTACH_PART_ID_INDEX); String rootPart = cursor.getString(ATTACH_ROOT_INDEX); LocalMessage message = loadLocalMessageByRootPartId(db, rootPart); if (message == null) { throw new MessagingException("Unable to find message for attachment!"); } if (message.getMessagePartId() == partId) { message.writeTo(outputStream); } else if (MimeUtility.isMultipart(message.getMimeType())) { Part part = findPartById((Multipart) message.getBody(), partId); if (part == null) { throw new MessagingException("Unable to find attachment part in loaded message!"); } Body body = part.getBody(); if (body == null) { throw new MessagingException("Attachment part isn't available!"); } body.writeTo(outputStream); } }

Target:
private void writeRawBodyToStream(Cursor cursor, SQLiteDatabase db, OutputStream outputStream) throws IOException, MessagingException { long partId = cursor.getLong(ATTACH_PART_ID_INDEX); String rootPart = cursor.getString(ATTACH_ROOT_INDEX); LocalMessage message = loadLocalMessageByRootPartId(db, rootPart); if (message == null) { throw new MessagingException("Unable to find message for attachment!"); } Part part = findPartById(message, partId); if (part == null) { throw new MessagingException("Unable to find attachment part in associated message (db integrity error?)"); } Body body = part.getBody(); if (body == null) { throw new MessagingException("Attachment part isn't available!"); } body.writeTo(outputStream); }
Source:
private void readExistingFile(Path path) { if (preferences != null) { throw new IllegalStateException("Preferences have already been initialized"); } try (Reader reader = Files.newBufferedReader(path, CHARSET)) { logger.debug("Reading preferences file {}", preferencesFilePath.toAbsolutePath()); preferences = gson.fromJson(reader, Preferences.class); } catch (Exception e) { logger.warn("Preferences file " + path.toAbsolutePath() + " could not be read", e); CountDownLatch waitForUser = new CountDownLatch(1); Platform.runLater(() -> { Alert errorReading = new Alert(AlertType.ERROR, "Error reading setting. Reset settings? ", ButtonType.YES, ButtonType.CANCEL); errorReading.showAndWait(); if (errorReading.getResult() == ButtonType.YES) { try { Files.delete(path); preferences = new Preferences(); waitForUser.countDown(); } catch (Exception ex) { Alert errorDeleting = new Alert(AlertType.ERROR, "Error deleting setting. Please delete them yourself. You find them under C:\\Users\\[username]\\AppData\\Roaming\\Forged Alliance Forever\\client.prefs .", ButtonType.OK); errorDeleting.showAndWait(); preferences = new Preferences(); waitForUser.countDown(); } } }); noCatch((NoCatchRunnable) waitForUser::await); } migratePreferences(preferences); }

Target:
private void readExistingFile(Path path) { if (preferences != null) { throw new IllegalStateException("Preferences have already been initialized"); } try (Reader reader = Files.newBufferedReader(path, CHARSET)) { logger.debug("Reading preferences file {}", preferencesFilePath.toAbsolutePath()); preferences = gson.fromJson(reader, Preferences.class); } catch (Exception e) { logger.warn("Preferences file " + path.toAbsolutePath() + " could not be read", e); CountDownLatch waitForUser = new CountDownLatch(1); Platform.runLater(() -> { Alert errorReading = new Alert(AlertType.ERROR, "Error reading setting. Reset settings? ", ButtonType.YES, ButtonType.CANCEL); errorReading.showAndWait(); if (errorReading.getResult() == ButtonType.YES) { try { Files.delete(path); preferences = new Preferences(); waitForUser.countDown(); } catch (Exception ex) { logger.error("Error deleting settings file", ex); Alert errorDeleting = new Alert(AlertType.ERROR, MessageFormat.format("Error deleting setting. Please delete them yourself. You find them under .", preferencesFilePath.toAbsolutePath()), ButtonType.OK); errorDeleting.showAndWait(); preferences = new Preferences(); waitForUser.countDown(); } } }); noCatch((NoCatchRunnable) waitForUser::await); } migratePreferences(preferences); }
Source:
public Map<String, ContextSensitiveTokenType> getAdditionalContextSensitiveKeywords() { Map<String, ContextSensitiveTokenType> result = super.getAdditionalContextSensitiveKeywords(); result.put(new String(GCCKeywords.cp__FINAL), ContextSensitiveTokenType.FINAL); return result; }

Target:
public Map<String, ContextSensitiveTokenType> getAdditionalContextSensitiveKeywords() { Map<String, ContextSensitiveTokenType> result = new HashMap<>(super.getAdditionalContextSensitiveKeywords()); result.put(GCCKeywords.__FINAL, ContextSensitiveTokenType.FINAL); return result; }
Source:
public final Map<K, V> getAndPutAll(Map<? extends K, ? extends V> map) { return getAndPutAll(map, defaultMetadata, EnumUtil.EMPTY_BIT_SET, () -> getInvocationContextWithImplicitTransaction(map.size())); }

Target:
public final Map<K, V> getAndPutAll(Map<? extends K, ? extends V> map) { return getAndPutAll(map, defaultMetadata, EnumUtil.EMPTY_BIT_SET, contextBuilder); }
Source:
public void bind(UserFeed feed, String avatarUrl, boolean isFirst, boolean isLast) { setAvatar(avatarUrl); name.setText(feed.getLogin()); topLine.setVisibility(isFirst ? View.INVISIBLE : View.VISIBLE); bottomLine.setVisibility(isLast ? View.INVISIBLE : View.VISIBLE); divider.setVisibility(isLast ? View.GONE : View.VISIBLE); Action feedAction = feed.getAction(); actionIcon.setImageResource(feedAction.getDrawableId()); setActionIconBackground(itemView.getResources().getColor(feedAction.getColor())); switch (feedAction) { case WATCH: setWatchAction(feed); break; case NEW: setNewAction(feed); break; case WATCH_LATER: setWatchLaterAction(feed); break; case RATING: setRatingAction(feed); break; case STOP_WATCH: setStopWatchAction(feed); break; case ACHIEVEMENT: setAchievementAction(feed); break; } }

Target:
public void bind(UserFeed feed, String avatarUrl, boolean isFirst, boolean isLast) { setAvatar(avatarUrl); name.setText(feed.getLogin()); topLine.setVisibility(isFirst ? View.INVISIBLE : View.VISIBLE); bottomLine.setVisibility(isLast ? View.INVISIBLE : View.VISIBLE); divider.setVisibility(isLast ? View.GONE : View.VISIBLE); Action feedAction = feed.getAction(); actionIcon.setImageResource(feedAction.getDrawableId()); setActionIconBackground(resources.getColor(feedAction.getColor())); switch (feedAction) { case WATCH: setWatchAction(feed); break; case NEW: case WATCH_LATER: case RATING: case STOP_WATCH: case ACHIEVEMENT: } }
Source:
public static EntityColumn from(Method getter) { checkGetter(getter); String nameForQuery = nameFromGetter(getter); Method annotatedVersion = retrieveAnnotatedVersion(getter); String nameForStore = nameFromAnnotation(annotatedVersion).or(nameForQuery); boolean nullable = getter.getAnnotatedReturnType() .isAnnotationPresent(Nullable.class); return new EntityColumn(getter, nameForQuery, nameForStore, nullable); }

Target:
public static EntityColumn from(Method getter) { checkGetter(getter); Method annotatedVersion = retrieveAnnotatedVersion(getter); String nameForQuery = nameFromGetter(getter); String nameForStore = nameFromAnnotation(annotatedVersion).or(nameForQuery); boolean nullable = mayReturnNull(getter); return new EntityColumn(getter, nameForQuery, nameForStore, nullable); }
Source:
private TaskLockPosse createOrFindLockPosse(Task task, TaskLock taskLock) { giant.lock(); try { Preconditions.checkArgument( task.getGroupId().equals(taskLock.getGroupId()), "lock groupId[%s] is different from task groupId[%s]", taskLock.getGroupId(), task.getGroupId() ); Preconditions.checkArgument( task.getDataSource().equals(taskLock.getDataSource()), "lock dataSource[%s] is different from task dataSource[%s]", taskLock.getDataSource(), task.getDataSource() ); final int priority; if (task.getPriority() == taskLock.getPriority()) { priority = task.getPriority(); } else { if (task.getContextValue(Tasks.PRIORITY_KEY) == null && task.getDefaultPriority() == taskLock.getPriority()) { log.warn("Task priority is missing. Using taskLock priority[%d] instead.", taskLock.getPriority()); priority = taskLock.getPriority(); } else { throw new ISE( "lock priority[%s] is different from task priority[%s]", taskLock.getPriority(), task.getPriority() ); } } return createOrFindLockPosse( taskLock.getType(), task.getId(), taskLock.getGroupId(), taskLock.getDataSource(), taskLock.getInterval(), taskLock.getVersion(), priority, taskLock.isRevoked() ); } finally { giant.unlock(); } }

Target:
private TaskLockPosse createOrFindLockPosse(Task task, TaskLock taskLock) { giant.lock(); try { Preconditions.checkArgument( task.getGroupId().equals(taskLock.getGroupId()), "lock groupId[%s] is different from task groupId[%s]", taskLock.getGroupId(), task.getGroupId() ); Preconditions.checkArgument( task.getDataSource().equals(taskLock.getDataSource()), "lock dataSource[%s] is different from task dataSource[%s]", taskLock.getDataSource(), task.getDataSource() ); final int taskPriority = task.getPriority(); final int lockPriority = taskLock.getNonNullPriority(); Preconditions.checkArgument( lockPriority == taskPriority, "lock priority[%s] is different from task priority[%s]", lockPriority, taskPriority ); return createOrFindLockPosse( taskLock.getType(), task.getId(), taskLock.getGroupId(), taskLock.getDataSource(), taskLock.getInterval(), taskLock.getVersion(), taskPriority, taskLock.isRevoked() ); } finally { giant.unlock(); } }
Source:
public String getFullDisplayName() { StringBuilder transformedName = new StringBuilder(TestNameTransformer.getTransformedName(getFullName())); if (this.archiveId != null) { transformedName.insert(0, "[" + this.archiveId + "]"); } return transformedName.toString(); }

Target:
public String getFullDisplayName() { String archiveId = this.parent != null ? Util.fixEmptyAndTrim(parent.getArchiveId()) : null; if (archiveId == null) { return TestNameTransformer.getTransformedName(getFullName()); } else { return "[" + archiveId + "] " + TestNameTransformer.getTransformedName(getFullName()); } }
Source:
public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; RMNodeData other = (RMNodeData) obj; return other.getName().equals(name) && other.getNodeUrl().equals(nodeUrl); }

Target:
public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } if (obj instanceof RMNodeData) { RMNodeData other = (RMNodeData) obj; return other.getName().equals(name) && other.getNodeUrl().equals(nodeUrl); } else { return false; } }
Source:
private void setWidgetsEnabled(final boolean enabled, final Control... controls) { for (Control control : controls) { control.setEnabled(enabled); } if (controls.length > 0 && enabled) { for (Control control : controls) { if (control instanceof Text) { control.setFocus(); break; } } } }

Target:
private void setWidgetsEnabled(final boolean enabled, final Control... controls) { for (Control control : controls) { control.setEnabled(enabled); } if (enabled) { for (Control control : controls) { if (control instanceof Text) { control.setFocus(); break; } } } }
Source:
public ActionResult execute() { String courseId = getNonNullRequestParamValue(Const.ParamsNames.COURSE_ID); InstructorAttributes instructorToAdd = extractCompleteInstructor(courseId); try { logic.createInstructor(instructorToAdd); taskQueuer.scheduleCourseRegistrationInviteToInstructor( userInfo.id, instructorToAdd.email, instructorToAdd.courseId, null, false); } catch (EntityAlreadyExistsException e) { return new JsonResult("An instructor with the same email address already exists in the course.", HttpStatus.SC_BAD_REQUEST); } catch (InvalidParametersException e) { return new JsonResult(e.getMessage(), HttpStatus.SC_BAD_REQUEST); } return new JsonResult("The instructor " + instructorToAdd.name + " has been added successfully. " + "An email containing how to 'join' this course will be sent to " + instructorToAdd.email + " in a few minutes.", HttpStatus.SC_OK); }

Target:
public ActionResult execute() { String courseId = getNonNullRequestParamValue(Const.ParamsNames.COURSE_ID); InstructorAttributes instructorToAdd = extractCompleteInstructor(courseId); try { logic.createInstructor(instructorToAdd); taskQueuer.scheduleCourseRegistrationInviteToInstructor( userInfo.id, instructorToAdd.email, instructorToAdd.courseId, null, false); } catch (EntityAlreadyExistsException e) { return new JsonResult("An instructor with the same email address already exists in the course.", HttpStatus.SC_CONFLICT); } catch (InvalidParametersException e) { return new JsonResult(e.getMessage(), HttpStatus.SC_BAD_REQUEST); } return new JsonResult("The instructor " + instructorToAdd.name + " has been added successfully. " + "An email containing how to 'join' this course will be sent to " + instructorToAdd.email + " in a few minutes.", HttpStatus.SC_OK); }
Source:
public void zeroColOperations() { Table tableZeroCols = new Table(); try { tableZeroCols.add("val"); fail("No columns in table"); } catch (IndexOutOfBoundsException ignored) try { tableZeroCols.addEmptyRow(true); fail("No columns in table"); } catch (IndexOutOfBoundsException ignored) try { tableZeroCols.addEmptyRows(10); fail("No columns in table"); } catch (IndexOutOfBoundsException ignored) try { tableZeroCols.removeColumn(0); fail("No columns in table"); } catch (ArrayIndexOutOfBoundsException ignored) try { tableZeroCols.renameColumn(0, "newName"); fail("No columns in table"); } catch (ArrayIndexOutOfBoundsException ignored) try { tableZeroCols.removeColumn(10); fail("No columns in table"); } catch (ArrayIndexOutOfBoundsException ignored) try { tableZeroCols.renameColumn(10, "newName"); fail("No columns in table"); } catch (ArrayIndexOutOfBoundsException ignored) }

Target:
public void zeroColOperations() { Table tableZeroCols = new Table(); try { tableZeroCols.add("val"); fail("No columns in table"); } catch (IndexOutOfBoundsException ignored) try { tableZeroCols.addEmptyRow(); fail("No columns in table"); } catch (IndexOutOfBoundsException ignored) try { tableZeroCols.addEmptyRows(10); fail("No columns in table"); } catch (IndexOutOfBoundsException ignored) try { tableZeroCols.removeColumn(0); fail("No columns in table"); } catch (ArrayIndexOutOfBoundsException ignored) try { tableZeroCols.renameColumn(0, "newName"); fail("No columns in table"); } catch (ArrayIndexOutOfBoundsException ignored) try { tableZeroCols.removeColumn(10); fail("No columns in table"); } catch (ArrayIndexOutOfBoundsException ignored) try { tableZeroCols.renameColumn(10, "newName"); fail("No columns in table"); } catch (ArrayIndexOutOfBoundsException ignored) }
Source:
protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if(requestCode == CALLOUT_ZPL) { Intent response = new Intent(); if(resultCode != Activity.RESULT_CANCELED) { response.putExtra(IntentCallout.INTENT_RESULT_VALUE, ""); } this.setResult(resultCode, response); this.finish(); return; } }

Target:
protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if(requestCode == CALLOUT_ZPL) { Intent response = new Intent(); if(resultCode != Activity.RESULT_CANCELED) { response.putExtra(IntentCallout.INTENT_RESULT_VALUE, ""); } this.setResult(resultCode, response); this.finish(); } }
Source:
private void setupTypesHyperlink() { this.fullListOfTypesHyperlink.setForeground(Color.BLUE.darker()); this.fullListOfTypesHyperlink.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); this.fullListOfTypesHyperlink.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { try { Desktop.getDesktop().browse(new URI(PHOTOREC_TYPES_URL)); } catch (IOException | URISyntaxException ex) { logger.log(Level.WARNING, "There was an error going to types huperlink: " + PHOTOREC_TYPES_URL, ex); } } }); }

Target:
private void setupTypesHyperlink() { this.fullListOfTypesHyperlink.setForeground(Color.BLUE.darker()); this.fullListOfTypesHyperlink.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); this.fullListOfTypesHyperlink.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { try { Desktop.getDesktop().browse(new URI(PHOTOREC_TYPES_URL)); } catch (IOException | URISyntaxException ex) { logger.log(Level.WARNING, "There was an error going to types hyperlink: " + PHOTOREC_TYPES_URL, ex); } } }); }
Source:
private void filterNestedTargetIgnores( Map<String, List<Mapping>> mappings) { Set<String> ignoreList = new HashSet<String>(); for ( Map.Entry<String, List<Mapping>> mappingEntry : mappings.entrySet() ) { Mapping mapping = first( mappingEntry.getValue() ); if ( mapping.isIgnored() && mapping.getTargetReference().isValid() ) { ignoreList.add( mapping.getTargetName() ); } } Set<String> removeList = new HashSet<String>(); for ( Map.Entry<String, List<Mapping>> mappingEntry : mappings.entrySet() ) { Mapping mapping = first( mappingEntry.getValue() ); TargetReference targetReference = mapping.getTargetReference(); if ( targetReference.isValid() && targetReference.getPropertyEntries().size() > 1 && ignoreList.contains( first( targetReference.getPropertyEntries() ).getName() ) ) { removeList.add( mappingEntry.getKey() ); } } for ( String entryToRemove : removeList ) { mappings.remove( entryToRemove ); } }

Target:
private void filterNestedTargetIgnores( Map<String, List<Mapping>> mappings) { Set<String> ignored = new HashSet<String>(); for ( Map.Entry<String, List<Mapping>> mappingEntry : mappings.entrySet() ) { Mapping mapping = first( mappingEntry.getValue() ); if ( mapping.isIgnored() && mapping.getTargetReference().isValid() ) { ignored.add( mapping.getTargetName() ); } } Set<String> toBeRemoved = new HashSet<String>(); for ( Map.Entry<String, List<Mapping>> mappingEntry : mappings.entrySet() ) { Mapping mapping = first( mappingEntry.getValue() ); TargetReference targetReference = mapping.getTargetReference(); if ( targetReference.isValid() && targetReference.getPropertyEntries().size() > 1 && ignored.contains( first( targetReference.getPropertyEntries() ).getName() ) ) { toBeRemoved.add( mappingEntry.getKey() ); } } mappings.keySet().removeAll( toBeRemoved ); }
Source:
Pop3Connection(Pop3Settings settings, TrustedSocketFactory trustedSocketFactory) throws MessagingException { try { this.settings = settings; SocketAddress socketAddress = new InetSocketAddress(settings.getHost(), settings.getPort()); if (settings.getConnectionSecurity() == ConnectionSecurity.SSL_TLS_REQUIRED) { socket = trustedSocketFactory.createSocket(null, settings.getHost(), settings.getPort(), settings.getClientCertificateAlias()); } else { socket = new Socket(); } socket.connect(socketAddress, RemoteStore.SOCKET_CONNECT_TIMEOUT); in = new BufferedInputStream(socket.getInputStream(), 1024); out = new BufferedOutputStream(socket.getOutputStream(), 512); socket.setSoTimeout(RemoteStore.SOCKET_READ_TIMEOUT); if (!isOpen()) { throw new MessagingException("Unable to connect socket"); } String serverGreeting = executeSimpleCommand(null); capabilities = getCapabilities(); if (settings.getConnectionSecurity() == ConnectionSecurity.STARTTLS_REQUIRED) { performStartTlsUpgrade(trustedSocketFactory, settings.getHost(), settings.getPort(), settings.getClientCertificateAlias()); } performAuthentication(settings.getAuthType(), serverGreeting); } catch (SSLException e) { if (e.getCause() instanceof CertificateException) { throw new CertificateValidationException(e.getMessage(), e); } else { throw new MessagingException("Unable to connect", e); } } catch (GeneralSecurityException gse) { throw new MessagingException( "Unable to open connection to POP server due to security error.", gse); } catch (IOException ioe) { throw new MessagingException("Unable to open connection to POP server.", ioe); } }

Target:
Pop3Connection(Pop3Settings settings, TrustedSocketFactory trustedSocketFactory) { this.settings = settings; this.trustedSocketFactory = trustedSocketFactory; }
Source:
private static int zzUnpackAction() { return new int[184]; }

Target:
private static int zzUnpackAction() { int result = new int[184]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; }
Source:
public Object apply(GroupResource resource, PutMember.Input input) throws AuthException, BadRequestException, ResourceConflictException, Exception { return put.get().apply(resource, new PutMembers.Input(id)); }

Target:
public Object apply(GroupResource resource, PutMember.Input input) throws AuthException, MethodNotAllowedException, BadRequestException, OrmException { PutMembers.Input in = new PutMembers.Input(); in._oneMember = id; return put.get().apply(resource, in); }
Source:
public ReassignmentFinder(List<IdentifierTree> usages) { this.usages = usages; this.reassignments = Lists.newLinkedList(); }

Target:
public ReassignmentFinder(List<IdentifierTree> usages) { this.usages = usages; this.reassignments = new LinkedList<>(); }
Source:
private ViewInteraction onEmailView() { return onView(withTagValue(Matchers.is((Object) "email"))); }

Target:
private ViewInteraction onEmailView() { return onView(withTagValue(is((Object) "email"))); }
Source:
public boolean equals(Object obj) { if (!(obj instanceof Cell)) { return false; } Cell other = (Cell) obj; return hasEqualKeys(other) && Objects.equal(value, other.value) && Objects.equal(labels, other.labels); }

Target:
public boolean equals(Object obj) { if (!(obj instanceof Cell)) { return false; } Cell other = (Cell) obj; return equalFamilyQualifierAndTimestamp(other) && Objects.equal(value, other.value) && Objects.equal(labels, other.labels); }
Source:
private static String transform(String value) { LOGGER.debug("Transforming tag key/value for GCP."); if (Crn.isCrn(value)) { try { Crn crn = Crn.fromString(value); value = crn == null ? value : crn.getResource(); } catch (Exception e) { LOGGER.debug("Ignoring CRN ({}) parse error during tag value generation : {}", value, e.getMessage()); } } String sanitized = value.split("@")[0].toLowerCase().replaceAll("[^\\w]", "-"); return StringUtils.right(sanitized, GCP_MAX_TAG_LEN); }

Target:
private static String transform(String value) { LOGGER.debug("Transforming tag key/value for GCP."); if (Crn.isCrn(value)) { try { Crn crn = Crn.fromString(value); value = crn == null ? value : crn.getResource(); } catch (Exception e) { LOGGER.debug("Ignoring CRN ({}) parse error during tag value generation : {}", value, e.getMessage()); } } String sanitized = value.split("@")[0].toLowerCase().replaceAll("[^\\w]", "-"); String shortenedValue = StringUtils.right(sanitized, GCP_MAX_TAG_LEN); LOGGER.debug("GCP label element has been transformed from '{}' to '{}'", value, shortenedValue); return shortenedValue; }
Source:
private ResultScanner<Row> streamRows(ReadRowsRequest request) { expandPoolIfNecessary(this.bigtableOptions.getChannelCount()); ClientCall<ReadRowsRequest, ReadRowsResponse> readRowsCall = channelPool.newCall(BigtableServiceGrpc.METHOD_READ_ROWS, CallOptions.DEFAULT); CancellationToken cancellationToken = createCancellationToken(readRowsCall); int timeout = retryOptions.getReadPartialRowTimeoutMillis(); ResponseQueueReader responseQueueReader = new ResponseQueueReader(timeout); StreamingBigtableResultScanner resultScanner = new StreamingBigtableResultScanner(responseQueueReader, cancellationToken); ReadRowsResponseListener listener = new ReadRowsResponseListener(responseQueueReader, readRowsCall); asyncUtilities.asyncServerStreamingCall(readRowsCall, request, listener); return resultScanner; }

Target:
private ResultScanner<Row> streamRows(ReadRowsRequest request) { expandPoolIfNecessary(this.bigtableOptions.getChannelCount()); boolean isGet = request.getTargetCase() == ReadRowsRequest.TargetCase.ROW_KEY; int streamingBufferSize; int batchRequestSize; if (isGet) { batchRequestSize = 1; streamingBufferSize = 10; } else { batchRequestSize = retryOptions.getStreamingBatchSize(); streamingBufferSize = retryOptions.getStreamingBufferSize(); } ClientCall<ReadRowsRequest, ReadRowsResponse> readRowsCall = channelPool.newCall(BigtableServiceGrpc.METHOD_READ_ROWS, CallOptions.DEFAULT); int timeout = retryOptions.getReadPartialRowTimeoutMillis(); AtomicInteger outstandingRequestCount = new AtomicInteger(batchRequestSize); ResponseQueueReader responseQueueReader = new ResponseQueueReader(timeout, streamingBufferSize, outstandingRequestCount, batchRequestSize, readRowsCall); ReadRowsResponseListener listener = new ReadRowsResponseListener(responseQueueReader, outstandingRequestCount); asyncUtilities.asyncServerStreamingCall(readRowsCall, request, listener); CancellationToken cancellationToken = createCancellationToken(readRowsCall); return new StreamingBigtableResultScanner(responseQueueReader, cancellationToken); }
Source:
public MassIndexerImpl(SessionFactoryImplementor sessionFactory, String tenantIdentifier, Class<?>... entities) { this.sessionFactory = sessionFactory; this.tenantIdentifier = tenantIdentifier; HibernateSearchContextService searchContextService = sessionFactory.getServiceRegistry().getService( HibernateSearchContextService.class ); this.mapping = searchContextService.getMapping(); this.rootEntities = toRootEntities( mapping, entities ); ConfigurationService configurationService = sessionFactory.getServiceRegistry().getService( ConfigurationService.class ); HibernateOrmConfigurationPropertySource propertySource = new HibernateOrmConfigurationPropertySource( configurationService ); Boolean jmxEnabled = JMX_ENABLED.get( propertySource ); this.monitor = ( jmxEnabled ) ? new JMXRegistrar.IndexingProgressMonitor() : new SimpleIndexingProgressMonitor(); }

Target:
public MassIndexerImpl(SessionFactoryImplementor sessionFactory, String tenantIdentifier, Class<?>... entities) { this.sessionFactory = sessionFactory; this.mapping = sessionFactory.getServiceRegistry().getService( HibernateSearchContextService.class ).getMapping(); this.tenantIdentifier = tenantIdentifier; this.rootEntities = toRootEntities( mapping, entities ); this.monitor = new SimpleIndexingProgressMonitor(); }
Source:
protected synchronized @Nonnull String getUniqueId() { int result = 0; if (rules != null) { Set<String> col = rules.keySet(); if (col != null) { for (Iterator<String> it = col.iterator(); it.hasNext();) { String rUID = it.next(); if (rUID != null && rUID.startsWith(ID_PREFIX)) { String sNum = rUID.substring(ID_PREFIX.length()); int i; try { i = Integer.parseInt(sNum); result = i > result ? i : result; } catch (NumberFormatException e) { } } } } } if (result > ruleMaxID) { ruleMaxID = result + 1; } else { ++ruleMaxID; } return ID_PREFIX + ruleMaxID; }

Target:
protected synchronized @NonNull String getUniqueId() { int result = 0; if (rules != null) { Set<String> col = rules.keySet(); if (col != null) { for (Iterator<String> it = col.iterator(); it.hasNext();) { String rUID = it.next(); if (rUID != null && rUID.startsWith(ID_PREFIX)) { String sNum = rUID.substring(ID_PREFIX.length()); int i; try { i = Integer.parseInt(sNum); result = i > result ? i : result; } catch (NumberFormatException e) { } } } } } if (result > ruleMaxID) { ruleMaxID = result + 1; } else { ++ruleMaxID; } return ID_PREFIX + ruleMaxID; }
Source:
public void run() { PrivilegedExceptionAction<Object> doAsAction = new PrivilegedExceptionAction<Object>() { @Override public Object run() throws HiveSQLException { Hive.set(parentHive); SessionState.setCurrentSessionState(parentSessionState); PerfLogger.setPerfLogger(SessionState.getPerfLogger()); LogUtils.registerLoggingContext(queryState.getConf()); ShimLoader.getHadoopShims().setHadoopQueryContext(queryState.getQueryId()); try { if (asyncPrepare) { prepare(queryState); } runQuery(); } catch (HiveSQLException e) { setOperationException(e); LOG.error("Error running hive query: ", e); } finally { LogUtils.unregisterLoggingContext(); Hive.closeCurrent(); } return null; } }; try { currentUGI.doAs(doAsAction); } catch (Exception e) { setOperationException(new HiveSQLException(e)); LOG.error("Error running hive query as user : " + currentUGI.getShortUserName(), e); } finally { if (ThreadWithGarbageCleanup.currentThread() instanceof ThreadWithGarbageCleanup) { ThreadWithGarbageCleanup currentThread = (ThreadWithGarbageCleanup) ThreadWithGarbageCleanup.currentThread(); currentThread.cacheThreadLocalRawStore(); } } }

Target:
public void run() { PrivilegedExceptionAction<Object> doAsAction = new PrivilegedExceptionAction<Object>() { @Override public Object run() throws HiveSQLException { Hive.set(parentHive, false); SessionState.setCurrentSessionState(parentSessionState); PerfLogger.setPerfLogger(SessionState.getPerfLogger()); LogUtils.registerLoggingContext(queryState.getConf()); ShimLoader.getHadoopShims().setHadoopQueryContext(queryState.getQueryId()); try { if (asyncPrepare) { prepare(queryState); } runQuery(); } catch (HiveSQLException e) { setOperationException(e); LOG.error("Error running hive query: ", e); } finally { LogUtils.unregisterLoggingContext(); Hive hiveDb = Hive.getThreadLocal(); if (hiveDb != null && hiveDb != parentHive) { Hive.closeCurrent(); } } return null; } }; try { currentUGI.doAs(doAsAction); } catch (Exception e) { setOperationException(new HiveSQLException(e)); LOG.error("Error running hive query as user : " + currentUGI.getShortUserName(), e); } finally { if (ThreadWithGarbageCleanup.currentThread() instanceof ThreadWithGarbageCleanup) { ThreadWithGarbageCleanup currentThread = (ThreadWithGarbageCleanup) ThreadWithGarbageCleanup.currentThread(); currentThread.cacheThreadLocalRawStore(); } } }
Source:
private void pollDownloadStatus(StateContext context) { ActionReturnValue returnValue = runInternalAction(ActionType.TransferImageStatus, new TransferImageStatusParameters(getCommandId())); if (returnValue != null && returnValue.getSucceeded()) { ImageTransfer imageTransfer = returnValue.getActionReturnValue(); if (imageTransfer.getBytesTotal() != null && imageTransfer.getBytesTotal().equals(imageTransfer.getBytesSent()) && !imageTransfer.getActive()) { if (!context.entity.getActive()) { ImageTransfer updates = new ImageTransfer(); updates.setPhase(ImageTransferPhase.FINALIZING_SUCCESS); TransferImageStatusParameters parameters = new TransferImageStatusParameters(getCommandId()); parameters.setUpdates(updates); runInternalAction(ActionType.TransferImageStatus, parameters); } } } }

Target:
private void pollDownloadStatus(StateContext context) { ActionReturnValue returnValue = runInternalAction(ActionType.TransferImageStatus, new TransferImageStatusParameters(getCommandId())); if (returnValue == null || !returnValue.getSucceeded()) { log.debug("Failed to poll download status."); return; } ImageTransfer imageTransfer = returnValue.getActionReturnValue(); if (imageTransfer.getBytesTotal() != null && imageTransfer.getBytesTotal().equals(imageTransfer.getBytesSent()) && !imageTransfer.getActive()) { if (!context.entity.getActive()) { ImageTransfer updates = new ImageTransfer(); updates.setPhase(ImageTransferPhase.FINALIZING_SUCCESS); TransferImageStatusParameters parameters = new TransferImageStatusParameters(getCommandId()); parameters.setUpdates(updates); runInternalAction(ActionType.TransferImageStatus, parameters); } } }
Source:
FactoryBean<MessageHandler> aggregatorFactoryBean(MessageChannel toSink, MessageGroupStore messageGroupStore) { AggregatorFactoryBean aggregatorFactoryBean = new AggregatorFactoryBean(); aggregatorFactoryBean.setCorrelationStrategy( new ExpressionEvaluatingCorrelationStrategy("payload.getClass().name")); String releaseStrategyExpression = "size() == " + properties.getBatchSize(); aggregatorFactoryBean.setReleaseStrategy( new ExpressionEvaluatingReleaseStrategy(releaseStrategyExpression)); aggregatorFactoryBean.setMessageStore(messageGroupStore); aggregatorFactoryBean.setProcessorBean(new DefaultAggregatingMessageGroupProcessor()); aggregatorFactoryBean.setExpireGroupsUponCompletion(true); aggregatorFactoryBean.setSendPartialResultOnExpiry(true); aggregatorFactoryBean.setOutputChannel(toSink); return aggregatorFactoryBean; }

Target:
FactoryBean<MessageHandler> aggregatorFactoryBean(MessageChannel toSink, MessageGroupStore messageGroupStore) { AggregatorFactoryBean aggregatorFactoryBean = new AggregatorFactoryBean(); aggregatorFactoryBean.setCorrelationStrategy( new ExpressionEvaluatingCorrelationStrategy("payload.getClass().name")); aggregatorFactoryBean.setReleaseStrategy(new MessageCountReleaseStrategy(properties.getBatchSize())); aggregatorFactoryBean.setMessageStore(messageGroupStore); aggregatorFactoryBean.setProcessorBean(new DefaultAggregatingMessageGroupProcessor()); aggregatorFactoryBean.setExpireGroupsUponCompletion(true); aggregatorFactoryBean.setSendPartialResultOnExpiry(true); aggregatorFactoryBean.setOutputChannel(toSink); return aggregatorFactoryBean; }