auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void notifyAboutStartProcess(String id) { Long processInstanceId = Long.parseLong(id); newProcessInstanceEvent.fire(new NewProcessInstanceEvent(serverTemplateId, deploymentId, processInstanceId, processDefId, processName, 1)); final String message = Constants.INSTANCE.ProcessStarted(processInstanceId.longValue()); notificationEvent.fire(new NotificationEvent(message, NotificationEvent.NotificationType.SUCCESS)); close(); }

Target:
public void notifyAboutStartProcess(String id) { Long processInstanceId = Long.parseLong(id); newProcessInstanceEvent.fire(new NewProcessInstanceEvent(serverTemplateId, deploymentId, processInstanceId, processDefId, processName, null)); final String message = Constants.INSTANCE.ProcessStarted(processInstanceId.longValue()); notificationEvent.fire(new NotificationEvent(message, NotificationEvent.NotificationType.SUCCESS)); close(); }
Source:
public static void commitHeaders(BuiltResponse jaxrsResponse, HttpResponse response) { if (jaxrsResponse.getMetadata() != null) { List<Object> cookies = jaxrsResponse.getMetadata().get( HttpHeaderNames.SET_COOKIE); if (cookies != null) { Iterator<Object> it = cookies.iterator(); while (it.hasNext()) { Object next = it.next(); if (next instanceof NewCookie) { NewCookie cookie = (NewCookie) next; response.addNewCookie(cookie); it.remove(); } else if (next instanceof Object) { response.getOutputHeaders().add(javax.ws.rs.core.HttpHeaders.SET_COOKIE, next); it.remove(); } } jaxrsResponse.getMetadata().remove(HttpHeaderNames.SET_COOKIE); } } if (jaxrsResponse.getMetadata() != null && jaxrsResponse.getMetadata().size() > 0) { response.getOutputHeaders().putAll(jaxrsResponse.getMetadata()); } }

Target:
public static void commitHeaders(BuiltResponse jaxrsResponse, HttpResponse response) { if (jaxrsResponse.getMetadata() != null) { List<Object> cookies = jaxrsResponse.getMetadata().get( HttpHeaderNames.SET_COOKIE); if (cookies != null) { Iterator<Object> it = cookies.iterator(); while (it.hasNext()) { Object next = it.next(); if (next instanceof NewCookie) { NewCookie cookie = (NewCookie) next; response.addNewCookie(cookie); it.remove(); } else { response.getOutputHeaders().add(javax.ws.rs.core.HttpHeaders.SET_COOKIE, next); it.remove(); } } jaxrsResponse.getMetadata().remove(HttpHeaderNames.SET_COOKIE); } } if (jaxrsResponse.getMetadata() != null && jaxrsResponse.getMetadata().size() > 0) { response.getOutputHeaders().putAll(jaxrsResponse.getMetadata()); } }
Source:
protected boolean checkUserNameValid(String userName) throws UserStoreException { if (!isSecureCall.get()) { Class argTypes[] = new Class[]{String.class}; Object object = callSecure("checkUserNameValid", new Object[]{userName}, argTypes); return (Boolean) object; } if (userName == null || CarbonConstants.REGISTRY_SYSTEM_USERNAME.equals(userName)) { return false; } userName = userName.trim(); if (userName.length() < 1) { return false; } String regularExpression = realmConfig .getUserStoreProperty(UserCoreConstants.RealmConfig.PROPERTY_USER_NAME_JAVA_REG_EX); if (MultitenantUtils.isEmailUserName()) { regularExpression = realmConfig .getUserStoreProperty(UserCoreConstants.RealmConfig.PROPERTY_USER_NAME_WITH_EMAIL_JS_REG_EX); if (regularExpression == null) { regularExpression = UserCoreConstants.RealmConfig.EMAIL_VALIDATION_REGEX; } } if (regularExpression != null) { regularExpression = regularExpression.trim(); } if (regularExpression != null && !regularExpression.equals("")) { if (isFormatCorrect(regularExpression, userName)) { return true; } else { if (log.isDebugEnabled()) { log.debug("Username " + userName + " does not match with the regex " + regularExpression); } return false; } } return regularExpression == null || regularExpression.equals(""); }

Target:
protected boolean checkUserNameValid(String userName) throws UserStoreException { if (!isSecureCall.get()) { Class argTypes[] = new Class[]{String.class}; Object object = callSecure("checkUserNameValid", new Object[]{userName}, argTypes); return (Boolean) object; } if (userName == null || CarbonConstants.REGISTRY_SYSTEM_USERNAME.equals(userName)) { return false; } userName = userName.trim(); if (userName.length() < 1) { return false; } String regularExpression = realmConfig .getUserStoreProperty(UserCoreConstants.RealmConfig.PROPERTY_USER_NAME_JAVA_REG_EX); if (MultitenantUtils.isEmailUserName()) { regularExpression = realmConfig .getUserStoreProperty(UserCoreConstants.RealmConfig.PROPERTY_USER_NAME_WITH_EMAIL_JS_REG_EX); if (regularExpression == null) { regularExpression = UserCoreConstants.RealmConfig.EMAIL_VALIDATION_REGEX; } } if (regularExpression != null) { regularExpression = regularExpression.trim(); } if (StringUtils.isNotEmpty(regularExpression)) { if (isFormatCorrect(regularExpression, userName)) { return true; } else { if (log.isDebugEnabled()) { log.debug("Username " + userName + " does not match with the regex " + regularExpression); } return false; } } return true; }
Source:
private void handlePutManagerClosed(BlobProperties blobProperties, boolean stitchOperation, FutureResult<String> futureResult, Callback<String> callback) { RouterException routerException = new RouterException("Cannot accept operation because Router is closed", RouterErrorCode.RouterClosed); routerMetrics.operationDequeuingRate.mark(); routerMetrics.onPutBlobError(routerException, blobProperties != null && blobProperties.isEncrypted(), stitchOperation); completeOperation(futureResult, callback, null, routerException); close(); }

Target:
private void handlePutManagerClosed(BlobProperties blobProperties, boolean stitchOperation, FutureResult<String> futureResult, Callback<String> callback) { RouterException routerException = new RouterException("Cannot accept operation because Router is closed", RouterErrorCode.RouterClosed); routerMetrics.operationDequeuingRate.mark(); routerMetrics.onPutBlobError(routerException, blobProperties.isEncrypted(), stitchOperation); completeOperation(futureResult, callback, null, routerException); close(); }
Source:
private void setContextClassLoaderOnThread(CommandLine cl, final Shell shellState) throws IOException { final String contextName = cl.getOptionValue(context.getOpt()); ClassLoader classLoader; if (contextName != null && !contextName.equals("")) { try { AccumuloVFSClassLoader.getContextManager() .setContextConfig(new ContextManager.DefaultContextsConfig() { @Override public Map<String,String> getVfsContextClasspathProperties() { try { return shellState.getConnector().instanceOperations().getSystemConfiguration(); } catch (AccumuloException e) { throw new RuntimeException(e); } catch (AccumuloSecurityException e) { throw new RuntimeException(e); } } }); } catch (IllegalStateException e) { shellState.printException(e); } classLoader = AccumuloVFSClassLoader.getContextManager().getClassLoader(contextName); } else { classLoader = AccumuloVFSClassLoader.getClassLoader(); } Thread.currentThread().setContextClassLoader(classLoader); }

Target:
private void setContextClassLoaderOnThread(CommandLine cl, final Shell shellState) throws IOException { final String contextName = cl.getOptionValue(context.getOpt()); ClassLoader classLoader; if (contextName != null && !contextName.equals("")) { try { AccumuloVFSClassLoader.getContextManager() .setContextConfig(new ContextManager.DefaultContextsConfig() { @Override public Map<String,String> getVfsContextClasspathProperties() { try { return shellState.getConnector().instanceOperations().getSystemConfiguration(); } catch (AccumuloException e) { throw new IllegalStateException(e); } catch (AccumuloSecurityException e) { throw new IllegalStateException(e); } } }); } catch (IllegalStateException e) { shellState.printException(e); throw e; } classLoader = AccumuloVFSClassLoader.getContextManager().getClassLoader(contextName); } else { classLoader = AccumuloVFSClassLoader.getClassLoader(); } Thread.currentThread().setContextClassLoader(classLoader); }
Source:
public Deduplicator createDeduplicator(final NetworkConfig config) { String type = config.getString(NetworkConfig.Keys.DEDUPLICATOR, NetworkConfig.Keys.NO_DEDUPLICATOR); if (type.equals(NetworkConfig.Keys.DEDUPLICATOR_MARK_AND_SWEEP)) { return new SweepDeduplicator(config); } else if (type.equals(NetworkConfig.Keys.DEDUPLICATOR_CROP_ROTATION)) { return new CropRotation(config); } else if (type.equals(NetworkConfig.Keys.NO_DEDUPLICATOR)) { return new NoDeduplicator(); } else { LOGGER.warning("configuration contains unsupported deduplicator type, duplicate detection will be turned off"); return new NoDeduplicator(); } }

Target:
public Deduplicator createDeduplicator(final NetworkConfig config) { String type = config.getString(NetworkConfig.Keys.DEDUPLICATOR, NetworkConfig.Keys.NO_DEDUPLICATOR); switch(type) { case NetworkConfig.Keys.DEDUPLICATOR_MARK_AND_SWEEP: return new SweepDeduplicator(config); case NetworkConfig.Keys.DEDUPLICATOR_CROP_ROTATION: return new CropRotation(config); case NetworkConfig.Keys.NO_DEDUPLICATOR: return new NoDeduplicator(); default: LOGGER.warning("configuration contains unsupported deduplicator type, duplicate detection will be turned off"); return new NoDeduplicator(); } }
Source:
public static HostRequirement getTargetServerType(String targetServerType) { String allowSlave = targetServerType.replaceFirst("slave", targetServerType); return valueOf(allowSlave); }

Target:
public static HostRequirement getTargetServerType(String targetServerType) { String allowSlave = targetServerType.replace("lave", "econdary"); return valueOf(allowSlave); }
Source:
public SdxClusterDetailResponse(SdxClusterResponse sdxClusterResponse, StackV4Response stackV4Response) { super(sdxClusterResponse.getCrn(), sdxClusterResponse.getName(), sdxClusterResponse.getStatus(), sdxClusterResponse.getStatusReason(), sdxClusterResponse.getEnvironmentName(), sdxClusterResponse.getEnvironmentCrn(), sdxClusterResponse.getStackCrn(), sdxClusterResponse.getClusterShape(), sdxClusterResponse.getCloudStorageBaseLocation(), sdxClusterResponse.getCloudStorageFileSystemType(), sdxClusterResponse.getRuntime(), sdxClusterResponse.getRangerRazEnabled(), sdxClusterResponse.getMediumDutyHAEnabled()); this.stackV4Response = stackV4Response; }

Target:
public SdxClusterDetailResponse(SdxClusterResponse sdxClusterResponse, StackV4Response stackV4Response) { super(sdxClusterResponse.getCrn(), sdxClusterResponse.getName(), sdxClusterResponse.getStatus(), sdxClusterResponse.getStatusReason(), sdxClusterResponse.getEnvironmentName(), sdxClusterResponse.getEnvironmentCrn(), sdxClusterResponse.getStackCrn(), sdxClusterResponse.getClusterShape(), sdxClusterResponse.getCloudStorageBaseLocation(), sdxClusterResponse.getCloudStorageFileSystemType(), sdxClusterResponse.getRuntime(), sdxClusterResponse.getRangerRazEnabled()); this.stackV4Response = stackV4Response; }
Source:
private ShutdownThread() { super("ShutdownThread"); }

Target:
private ShutdownThread() { super("JettyShutdownThread"); }
Source:
public void pidWrite(double speed) { double newSpeed = speedModifier.modify(speed); lastSpeed = newSpeed; for (CustomSpeedController motor : motors) { motor.pidWrite(newSpeed); } }

Target:
public void pidWrite(double speed) { double newSpeed = speedModifier.modify(speed); lastSpeed = newSpeed; for (SpeedController motor : motors) { motor.set(newSpeed); } }
Source:
@Test public void malformedParameterRelativeUrlThrows() { class Example { @GET Call<ResponseBody> get(@Url String relativeUrl) { return null; } } try { buildRequest(Example.class, "ftp://example.org"); } catch (IllegalArgumentException e) { assertThat(e).hasMessage( "Malformed URL. Base: <LINK_0>, Relative: ftp://example.org"); } }

Target:
@Test public void malformedParameterRelativeUrlThrows() { class Example { @GET Call<ResponseBody> get(@Url String relativeUrl) { return null; } } try { buildRequest(Example.class, "ftp://example.org"); fail(); } catch (IllegalArgumentException e) { assertThat(e).hasMessage( "Malformed URL. Base: <LINK_0>, Relative: ftp://example.org"); } }
Source:
public void testSearchUserByVariable() { Map<String, OrganizationalEntity> roleAssignments = new HashMap<>(); roleAssignments.put("owner", new UserImpl(USER)); Map<String, Object> data = new HashMap<>(); data.put("name", "my first case"); CaseFileInstance caseFile = caseService.newCaseFileInstance(deploymentUnit.getIdentifier(), USER_TASK_CASE_P_ID, data, roleAssignments); String caseId = caseService.startCase(deploymentUnit.getIdentifier(), USER_TASK_CASE_P_ID, caseFile); List<UserTaskInstanceWithPotOwnerDesc> process = advanceCaseRuntimeDataService.queryUserTasksByVariables(emptyMap(), emptyMap(), emptyMap(), emptyList(), new QueryContext()); assertEquals(1, process.size()); assertEquals(process.get(0).getExtraData().get("name"), "my first case"); assertNotNull(caseId); assertEquals(HR_CASE_ID, caseId); if (caseId != null) { caseService.cancelCase(caseId); } }

Target:
public void testSearchUserByVariable() { Map<String, OrganizationalEntity> roleAssignments = new HashMap<>(); roleAssignments.put("owner", new UserImpl(USER)); Map<String, Object> data = new HashMap<>(); data.put("name", "my first case"); CaseFileInstance caseFile = caseService.newCaseFileInstance(deploymentUnit.getIdentifier(), USER_TASK_CASE_P_ID, data, roleAssignments); String caseId = caseService.startCase(deploymentUnit.getIdentifier(), USER_TASK_CASE_P_ID, caseFile); List<UserTaskInstanceWithPotOwnerDesc> process = advanceCaseRuntimeDataService.queryUserTasksByVariables(emptyList(), emptyList(), emptyList(), emptyList(), new QueryContext()); assertEquals(1, process.size()); assertEquals("my first case", process.get(0).getExtraData().get("name")); assertNotNull(caseId); assertEquals(HR_CASE_ID, caseId); caseService.cancelCase(caseId); }
Source:
public PBDSegmentReader openForRead(String cursorId) throws IOException { if (m_readCursors.containsKey(cursorId) || m_closedCursors.containsKey(cursorId)) { throw new IOException("Segment is already open for reading for cursor " + cursorId); } if (m_closed) { open(false, false); } SegmentReader reader = new SegmentReader(cursorId); m_readCursors.put(cursorId, reader); return reader; }

Target:
public PBDSegmentReader openForRead(String cursorId) throws IOException { Preconditions.checkNotNull(cursorId, "Reader id must be non-null"); if (m_readCursors.containsKey(cursorId) || m_closedCursors.containsKey(cursorId)) { throw new IOException("Segment is already open for reading for cursor " + cursorId); } if (m_closed) { open(false, false); } SegmentReader reader = new SegmentReader(cursorId); m_readCursors.put(cursorId, reader); return reader; }
Source:
public void unregSwitch(boolean synch) { super.unregisterDP(synch); }

Target:
protected void unregSwitch(boolean synch) { super.unregisterDP(synch); }
Source:
private String[] getInternalValues(String name) throws GitException { ConfigKey key = parseName(name); String[] values = repository.getConfig().getStringList(key.section, key.subsection, key.name); if (values == null || values.length == 0) { throw new GitException(""); } return values; }

Target:
private String[] getInternalValues(String name) throws GitException { ConfigKey key = parseName(name); String[] values = repository.getConfig().getStringList(key.section, key.subsection, key.name); if (values == null || values.length == 0) { throw new GitException("Can not find property '" + name + "' in repository configuration"); } return values; }
Source:
public void verifyMapOpened() { waitForElementVisibleByElement(mapFrame); scrollToElement(mapFrame); driver.switchTo().frame(mapFrame); driver.switchTo().defaultContent(); }

Target:
public void verifyMapOpened() { waitForElementVisibleByElement(mapFrame); scrollToElement(mapFrame); driver.switchTo().frame(mapFrame); driver.switchTo().defaultContent(); PageObjectLogging.log("verifyMapOpened", "Map was opened", true); }
Source:
protected @Nullable List<@NonNull ITimeGraphRowModel> getRowModel(@NonNull ITmfStateSystem ss, @NonNull SelectionTimeQueryFilter filter, @Nullable IProgressMonitor monitor) throws StateSystemDisposedException { try (ScopeLog scope = new ScopeLog(LOCAL_LOGGER, Level.FINE, "AbstractTimeGraphDataProvider#fetchRowModel", getClass().getSimpleName())) { Set<ITmfStateInterval> intervals = new HashSet<>(); Map<Integer, String[]> paths = new HashMap<>(); Collection<Long> times = getTimes(filter, ss.getStartTime(), ss.getCurrentEndTime()); Set<Integer> quarks = new HashSet<>(); for (Integer quark : getSelectedQuarks(filter)) { quarks.addAll(ss.getSubAttributes(quark, true)); } for (Integer quark : quarks) { paths.put(quark, ss.getFullAttributePathArray(quark)); } for (ITmfStateInterval interval : ss.query2D(quarks, times)) { if (monitor != null && monitor.isCanceled()) { return Collections.emptyList(); } if (interval.getValue() instanceof Integer) { intervals.add(interval); } } if (monitor != null && monitor.isCanceled()) { return Collections.emptyList(); } List<ITimeGraphState> markerList = new ArrayList<>(); for (ITmfStateInterval interval : intervals) { long startTime = interval.getStartTime(); long duration = interval.getEndTime() - startTime + 1; markerList.add(new MarkerModel(startTime, duration, paths.get(interval.getAttribute()))); } return Collections.singletonList(new TimeGraphRowModel(getId(ITmfStateSystem.ROOT_ATTRIBUTE), markerList)); } }

Target:
protected @Nullable List<@NonNull ITimeGraphRowModel> getRowModel(@NonNull ITmfStateSystem ss, @NonNull SelectionTimeQueryFilter filter, @Nullable IProgressMonitor monitor) throws StateSystemDisposedException { Map<Integer, String[]> paths = new HashMap<>(); List<ITimeGraphState> markerList = new ArrayList<>(); Collection<Long> times = getTimes(filter, ss.getStartTime(), ss.getCurrentEndTime()); Set<Integer> quarks = new HashSet<>(); for (Integer quark : getSelectedQuarks(filter)) { quarks.addAll(ss.getSubAttributes(quark, true)); } for (Integer quark : quarks) { paths.put(quark, ss.getFullAttributePathArray(quark)); } for (ITmfStateInterval interval : ss.query2D(quarks, times)) { if (monitor != null && monitor.isCanceled()) { return Collections.emptyList(); } if (interval.getValue() instanceof Integer) { long startTime = interval.getStartTime(); long duration = interval.getEndTime() - startTime + 1; markerList.add(new MarkerModel(startTime, duration, paths.get(interval.getAttribute()))); } } if (monitor != null && monitor.isCanceled()) { return Collections.emptyList(); } return Collections.singletonList(new TimeGraphRowModel(getId(ITmfStateSystem.ROOT_ATTRIBUTE), markerList)); }
Source:
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception { if (args.length < 1) { StringBuilder sb = new StringBuilder(); for (UUID uuid : user._getIgnoredPlayers()) { User curUser = ess.getUser(uuid); if (curUser != null && curUser.getName() != null && !curUser.getName().trim().isEmpty()) { sb.append(curUser.getName()).append(" "); } } String ignoredList = sb.toString().trim(); user.sendMessage(ignoredList.length() > 0 ? tl("ignoredList", ignoredList) : tl("noIgnored")); } else { User player; try { player = getPlayer(server, args, 0, true, true); } catch (PlayerNotFoundException ex) { player = ess.getOfflineUser(args[0]); } if (player == null) { throw new PlayerNotFoundException(); } if (player.isIgnoreExempt()) { user.sendMessage(tl("ignoreExempt")); } else if (user.isIgnoredPlayer(player)) { user.setIgnoredPlayer(player, false); user.sendMessage(tl("unignorePlayer", player.getName())); } else { user.setIgnoredPlayer(player, true); if (args.length > 1) { long ignoreTimestamp = 0; final String time = args[1]; ignoreTimestamp = DateUtil.parseDateDiff(time, true); user.setIgnoredPlayerTimeout(player, ignoreTimestamp); user.sendMessage(tl("ignorePlayerFor", player.getName(), time)); } else { user.sendMessage(tl("ignorePlayer", player.getName())); } } } }

Target:
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception { if (args.length < 1) { StringBuilder sb = new StringBuilder(); for (UUID uuid : user._getIgnoredPlayers()) { User curUser = ess.getUser(uuid); if (curUser != null && curUser.getName() != null && !curUser.getName().trim().isEmpty()) { sb.append(curUser.getName()).append(" "); } } String ignoredList = sb.toString().trim(); user.sendMessage(ignoredList.length() > 0 ? tl("ignoredList", ignoredList) : tl("noIgnored")); } else { User player; try { player = getPlayer(server, args, 0, true, true); } catch (PlayerNotFoundException ex) { player = ess.getOfflineUser(args[0]); } if (player == null) { throw new PlayerNotFoundException(); } if (player.isIgnoreExempt()) { user.sendMessage(tl("ignoreExempt")); } else if (user.isIgnoredPlayer(player)) { user.setIgnoredPlayer(player, false); user.sendMessage(tl("unignorePlayer", player.getName())); } else { user.setIgnoredPlayer(player, true); if (args.length > 1) { long ignoreTimestamp = DateUtil.parseDateDiff(args[1], true); user.setIgnoredPlayerTimeout(player, ignoreTimestamp); user.sendMessage(tl("ignorePlayerFor", player.getName(), DateUtil.formatDateDiff(ignoreTimestamp))); } else { user.sendMessage(tl("ignorePlayer", player.getName())); } } } }
Source:
public void performApply(ILaunchConfigurationWorkingCopy configuration) { configuration.setAttribute( IRunDockerImageLaunchConfigurationConstants.CONNECTION_NAME, connectionSelectionCombo.getText()); configuration.setAttribute( IRunDockerImageLaunchConfigurationConstants.IMAGE_NAME, imageSelectionCombo.getText()); configuration.setAttribute( IRunDockerImageLaunchConfigurationConstants.COMMAND, commandText.getText()); if (!entrypointText.getText().isEmpty()) configuration.setAttribute( IRunDockerImageLaunchConfigurationConstants.ENTRYPOINT, entrypointText.getText()); if (!containerNameText.getText().isEmpty()) configuration.setAttribute( IRunDockerImageLaunchConfigurationConstants.CONTAINER_NAME, containerNameText.getText()); configuration.setAttribute( IRunDockerImageLaunchConfigurationConstants.ALLOCATE_PSEUDO_CONSOLE, allocatePseudoTTY.getSelection()); configuration.setAttribute( IRunDockerImageLaunchConfigurationConstants.AUTO_REMOVE, removeWhenExitsButton.getSelection()); configuration.setAttribute( IRunDockerImageLaunchConfigurationConstants.INTERACTIVE, interactiveButton.getSelection()); }

Target:
public void performApply(ILaunchConfigurationWorkingCopy configuration) { configuration.setAttribute( IRunDockerImageLaunchConfigurationConstants.CONNECTION_NAME, model.getSelectedConnectionName()); configuration.setAttribute( IRunDockerImageLaunchConfigurationConstants.IMAGE_NAME, model.getSelectedImageName()); configuration.setAttribute( IRunDockerImageLaunchConfigurationConstants.COMMAND, model.getCommand()); configuration.setAttribute( IRunDockerImageLaunchConfigurationConstants.ENTRYPOINT, "".equals(model.getEntrypoint()) ? null : model.getEntrypoint()); configuration.setAttribute( IRunDockerImageLaunchConfigurationConstants.CONTAINER_NAME, "".equals(model.getContainerName()) ? null : model.getContainerName()); configuration.setAttribute( IRunDockerImageLaunchConfigurationConstants.ALLOCATE_PSEUDO_CONSOLE, model.isAllocatePseudoTTY()); configuration.setAttribute( IRunDockerImageLaunchConfigurationConstants.AUTO_REMOVE, model.isRemoveWhenExits()); configuration.setAttribute( IRunDockerImageLaunchConfigurationConstants.INTERACTIVE, model.isInteractiveMode()); }
Source:
public int compareTo(PhoenixJson o) { if (o == null) { return 1; } else if (this.equals(o)) { return 0; } else { return this.toString().compareTo(o.toString()); } }

Target:
public int compareTo(PhoenixJson o) { throw new EqualityNotSupportedException(PJson.INSTANCE); }
Source:
private void addWorkbenchDependencyIfRequired( WorkspaceBundlePluginModel fModel) throws CoreException { IPluginImport[] imports = fModel.getPluginBase().getImports(); final String WORKBENCH_IMPORT_ID = "org.eclipse.e4.ui.model.workbench"; for (IPluginImport iPluginImport : imports) { if (WORKBENCH_IMPORT_ID.equalsIgnoreCase(iPluginImport.getId())) return; } String version = ""; IPluginModelBase findModel = PluginRegistry .findModel(WORKBENCH_IMPORT_ID); if (findModel != null) { BundleDescription bundleDescription = findModel .getBundleDescription(); if (bundleDescription != null) version = bundleDescription.getVersion().toString(); } IPluginImport workbenchImport = fModel.getPluginFactory() .createImport(); workbenchImport.setId(WORKBENCH_IMPORT_ID); workbenchImport.setVersion(version); workbenchImport.setMatch(IMatchRules.GREATER_OR_EQUAL); fModel.getPluginBase().add(workbenchImport); fModel.save(); }

Target:
private void addWorkbenchDependencyIfRequired( WorkspaceBundlePluginModel fModel) throws CoreException { IPluginImport[] imports = fModel.getPluginBase().getImports(); final String WORKBENCH_IMPORT_ID = "org.eclipse.e4.ui.model.workbench"; for (IPluginImport iPluginImport : imports) { if (WORKBENCH_IMPORT_ID.equalsIgnoreCase(iPluginImport.getId())) return; } String version = ""; IPluginModelBase findModel = PluginRegistry .findModel(WORKBENCH_IMPORT_ID); if (findModel != null) { BundleDescription bundleDescription = findModel .getBundleDescription(); if (bundleDescription != null) version = bundleDescription.getVersion().toString() .replaceFirst("\\.qualifier$", ""); } IPluginImport workbenchImport = fModel.getPluginFactory() .createImport(); workbenchImport.setId(WORKBENCH_IMPORT_ID); workbenchImport.setVersion(version); workbenchImport.setMatch(IMatchRules.GREATER_OR_EQUAL); fModel.getPluginBase().add(workbenchImport); fModel.save(); }
Source:
public void addBreakpoint(final VirtualFile file, final int lineNumber) { if (isConnected()) { String fqn = pathToFqn(file); if (fqn == null) { return; } String fileProjectPath = file.getProject().getProjectConfig().getPath(); LocationDto locationDto = dtoFactory.createDto(LocationDto.class).withLineNumber(lineNumber + 1) .withTarget(fqn) .withResourcePath(file.getPath()) .withResourceProjectPath(fileProjectPath); BreakpointDto breakpointDto = dtoFactory.createDto(BreakpointDto.class).withLocation(locationDto).withEnabled(true); Promise<Void> promise = service.addBreakpoint(debugSessionDto.getId(), breakpointDto); promise.then(new Operation<Void>() { @Override public void apply(Void arg) throws OperationException { Breakpoint breakpoint = new Breakpoint(Breakpoint.Type.BREAKPOINT, lineNumber, file.getPath(), file, true); for (DebuggerObserver observer : observers) { observer.onBreakpointAdded(breakpoint); } } }).catchError(new Operation<PromiseError>() { @Override public void apply(PromiseError arg) throws OperationException { Log.error(AbstractDebugger.class, arg.getMessage()); } }); } else { Breakpoint breakpoint = new Breakpoint(Breakpoint.Type.BREAKPOINT, lineNumber, file.getPath(), file, false); for (DebuggerObserver observer : observers) { observer.onBreakpointAdded(breakpoint); } } }

Target:
public void addBreakpoint(final VirtualFile file, final int lineNumber) { if (isConnected()) { String fqn = pathToFqn(file); if (fqn == null) { return; } final String filePath = file.getLocation().toString(); LocationDto locationDto = dtoFactory.createDto(LocationDto.class) .withLineNumber(lineNumber + 1) .withTarget(fqn) .withResourcePath(filePath) .withResourceProjectPath(getProject(file).getPath()); BreakpointDto breakpointDto = dtoFactory.createDto(BreakpointDto.class).withLocation(locationDto).withEnabled(true); Promise<Void> promise = service.addBreakpoint(debugSessionDto.getId(), breakpointDto); promise.then(new Operation<Void>() { @Override public void apply(Void arg) throws OperationException { Breakpoint breakpoint = new Breakpoint(Breakpoint.Type.BREAKPOINT, lineNumber, filePath, file, true); for (DebuggerObserver observer : observers) { observer.onBreakpointAdded(breakpoint); } } }).catchError(new Operation<PromiseError>() { @Override public void apply(PromiseError arg) throws OperationException { Log.error(AbstractDebugger.class, arg.getMessage()); } }); } else { Breakpoint breakpoint = new Breakpoint(Breakpoint.Type.BREAKPOINT, lineNumber, file.getPath(), file, false); for (DebuggerObserver observer : observers) { observer.onBreakpointAdded(breakpoint); } } }
Source:
public void putAll(Map<? extends K, ? extends V> m) { }

Target:
public void putAll(Map<? extends K, ? extends V> m) { doWithWriteLock(c -> { c.putAll(m); return null; }); }
Source:
public void onEventMainThread(UploadService.UploadMediaSuccessEvent event) { AnalyticsTracker.track(Stat.MY_SITE_ICON_UPLOADED); EventBus.getDefault().removeStickyEvent(event); SiteModel site = getSelectedSite(); if (site != null) { if (isMediaUploadInProgress()) { if (event.mediaModelList.size() > 0) { MediaModel media = event.mediaModelList.get(0); mBlavatarImageView.setImageUrl(media.getUrl(), ImageType.BLAVATAR); mSiteSettings.setSiteIconMediaId((int) media.getMediaId()); mSiteSettings.saveSettings(); } } else { if (event.mediaModelList != null && !event.mediaModelList.isEmpty()) { UploadUtils.onMediaUploadedSnackbarHandler(getActivity(), getActivity().findViewById(R.id.coordinator), false, event.mediaModelList, site, event.successMessage); } } } }

Target:
public void onEventMainThread(UploadService.UploadMediaSuccessEvent event) { AnalyticsTracker.track(Stat.MY_SITE_ICON_UPLOADED); EventBus.getDefault().removeStickyEvent(event); SiteModel site = getSelectedSite(); if (site != null) { if (isMediaUploadInProgress()) { if (event.mediaModelList.size() > 0) { MediaModel media = event.mediaModelList.get(0); mBlavatarImageView.setImageUrl(PhotonUtils.getPhotonImageUrl( media.getUrl(), mBlavatarSz, mBlavatarSz, PhotonUtils.Quality.HIGH), ImageType.BLAVATAR); mSiteSettings.setSiteIconMediaId((int) media.getMediaId()); mSiteSettings.saveSettings(); } else { AppLog.w(T.MAIN, "Site icon upload completed, but mediaList is empty."); } showSiteIconProgressBar(false); } else { if (event.mediaModelList != null && !event.mediaModelList.isEmpty()) { UploadUtils.onMediaUploadedSnackbarHandler(getActivity(), getActivity().findViewById(R.id.coordinator), false, event.mediaModelList, site, event.successMessage); } } } }
Source:
private void registerJXPathPropertyHandlers() { EPackage[] packages = new EPackage[] { EcorePackage.eINSTANCE, ApplicationPackageImpl.eINSTANCE, CommandsPackageImpl.eINSTANCE, BasicPackageImpl.eINSTANCE, UiPackageImpl.eINSTANCE, AdvancedPackageImpl.eINSTANCE, org.eclipse.e4.ui.model.application.ui.basic.impl.BasicPackageImpl.eINSTANCE, MenuPackageImpl.eINSTANCE, FragmentPackageImpl.eINSTANCE }; for (EPackage ePackage : packages) { for (EClassifier eClassifier : ePackage.getEClassifiers()) { if (!(eClassifier instanceof EClass)) { continue; } EClass eClass = (EClass) eClassifier; if (eClass.isAbstract()) { continue; } EFactory eFactory = EPackage.Registry.INSTANCE.getEFactory(ePackage.getNsURI()); Class<? extends EObject> implClass = eFactory.create(eClass).getClass(); JXPathIntrospector.registerDynamicClass(implClass, EDynamicPropertyHandler.class); } } }

Target:
private static void registerJXPathPropertyHandlers() { EPackage[] packages = new EPackage[] { EcorePackage.eINSTANCE, ApplicationPackageImpl.eINSTANCE, CommandsPackageImpl.eINSTANCE, BasicPackageImpl.eINSTANCE, UiPackageImpl.eINSTANCE, AdvancedPackageImpl.eINSTANCE, org.eclipse.e4.ui.model.application.ui.basic.impl.BasicPackageImpl.eINSTANCE, MenuPackageImpl.eINSTANCE, FragmentPackageImpl.eINSTANCE }; for (EPackage ePackage : packages) { for (EClassifier eClassifier : ePackage.getEClassifiers()) { if (!(eClassifier instanceof EClass)) { continue; } EClass eClass = (EClass) eClassifier; if (eClass.isAbstract()) { continue; } EFactory eFactory = EPackage.Registry.INSTANCE.getEFactory(ePackage.getNsURI()); Class<? extends EObject> implClass = eFactory.create(eClass).getClass(); JXPathIntrospector.registerDynamicClass(implClass, EDynamicPropertyHandler.class); } } }
Source:
public HandlerResult handle(ProcessState state, ProcessInstance process) { Instance instance = (Instance)state.getResource(); if (!InstanceConstants.CONTAINER_LIKE.contains(instance.getKind())) { return null; } Image image = objectManager.loadResource(Image.class, instance.getImageId()); if (image == null) { dockerStorageDao.createImageForInstance(instance); } Map<Object, Object> data = new HashMap<>(); String mode = networkService.getNetworkMode(DataUtils.getFields(instance)); data.put(DockerInstanceConstants.FIELD_NETWORK_MODE, mode); Network network = networkService.resolveNetwork(instance.getAccountId(), mode); if (network != null) { data.put(InstanceConstants.FIELD_NETWORK_IDS, Arrays.asList(network.getId())); } Map<String, Object> labels = DataAccessor.fieldMap(instance, InstanceConstants.FIELD_LABELS); Object ip = labels.get(SystemLabels.LABEL_REQUESTED_IP); if (ip != null) { data.put(InstanceConstants.FIELD_REQUESTED_IP_ADDRESS, ip.toString()); } return new HandlerResult(data).withShouldContinue(true); }

Target:
public HandlerResult handle(ProcessState state, ProcessInstance process) { Instance instance = (Instance)state.getResource(); if (!InstanceConstants.CONTAINER_LIKE.contains(instance.getKind())) { return null; } Image image = objectManager.loadResource(Image.class, instance.getImageId()); if (image == null) { dockerStorageDao.createImageForInstance(instance); } Map<Object, Object> data = new HashMap<>(); String mode = networkService.getNetworkMode(DataUtils.getFields(instance)); data.put(DockerInstanceConstants.FIELD_NETWORK_MODE, mode); Network network = networkService.resolveNetwork(instance.getAccountId(), mode); if (network == null && StringUtils.isNotBlank(mode) && !instance.getNativeContainer()) { objectProcessManager.scheduleProcessInstance(InstanceConstants.PROCESS_REMOVE, instance, null); throw new ExecutionException(String.format("Failed to find network for networkMode %s", mode), null, state.getResource()); } if (network != null) { data.put(InstanceConstants.FIELD_NETWORK_IDS, Arrays.asList(network.getId())); } Map<String, Object> labels = DataAccessor.fieldMap(instance, InstanceConstants.FIELD_LABELS); Object ip = labels.get(SystemLabels.LABEL_REQUESTED_IP); if (ip != null) { data.put(InstanceConstants.FIELD_REQUESTED_IP_ADDRESS, ip.toString()); } return new HandlerResult(data).withShouldContinue(true); }
Source:
@Test public void testShardSyncIdempotency() throws Exception { shardSyncTaskManager.syncShardAndLeaseInfo(new ArrayList<>()); Thread.sleep(SHARDSYNCER_INVOCATION_WAIT_SLEEP_MILLIS); verify(mockShardSyncer, times(1)) .checkAndCreateLeasesForNewShards(Matchers.any(), Matchers.any(), Matchers.any(), anyBoolean(), anyBoolean(), Matchers.any()); int count = 0; while (count++ < 5) { shardSyncTaskManager.syncShardAndLeaseInfo(new ArrayList<>()); } verify(mockShardSyncer, times(1)) .checkAndCreateLeasesForNewShards(Matchers.any(), Matchers.any(), Matchers.any(), anyBoolean(), anyBoolean(), Matchers.any()); }

Target:
@Test public void testShardSyncIdempotency() throws Exception { shardSyncTaskManager.syncShardAndLeaseInfo(new ArrayList<>()); pausableNoOpShardSyncer.waitForShardSyncerInitializationLatch.await(); verify(mockShardSyncer, times(1)) .checkAndCreateLeasesForNewShards(Matchers.any(), Matchers.any(), Matchers.any(), anyBoolean(), anyBoolean(), Matchers.any()); int count = 0; while (count++ < 5) { shardSyncTaskManager.syncShardAndLeaseInfo(new ArrayList<>()); } verify(mockShardSyncer, times(1)) .checkAndCreateLeasesForNewShards(Matchers.any(), Matchers.any(), Matchers.any(), anyBoolean(), anyBoolean(), Matchers.any()); pausableNoOpShardSyncer.blockShardSyncLatch.countDown(); }
Source:
private void initialize() { initializeFields(); fAppearanceColorTableViewer.setContentProvider(ArrayContentProvider.getInstance()); fAppearanceColorTableViewer.setInput(fAppearanceColorTableModel); fAppearanceColorTable.getDisplay().asyncExec(() -> { if (fAppearanceColorTable != null && !fAppearanceColorTable.isDisposed()) { fAppearanceColorTable.select(0); handleAppearanceColorListSelection(); } }); }

Target:
private void initialize() { initializeFields(); fAppearanceColorTableViewer.setContentProvider(ArrayContentProvider.getInstance()); fAppearanceColorTableViewer.setInput(fAppearanceColorTableModel); fAppearanceColorTableViewer.setSelection(new StructuredSelection(fAppearanceColorTableViewer.getElementAt(0)), true); }
Source:
public void processRecords(ProcessRecordsInput records) { if (records.getRecords().isEmpty()) { return; } BigInteger seq = BigInteger.ZERO; m_gapTracker.allocate(records.getRecords().size()); int offset = 0; for (Record record : records.getRecords()) { m_submitCount.incrementAndGet(); BigInteger seqNum = new BigInteger(record.getSequenceNumber()); if (seqNum.compareTo(m_lastFetchCommittedSequenceNumber) < 0) { continue; } if (isDebugEnabled()) { debug(null, "last committed seq: %s, current seq:%s shard %s", m_lastFetchCommittedSequenceNumber.toString(), record.getSequenceNumber(), m_shardId); if (seqNum.compareTo(seq) < 0) { debug(null, "Record %d is out of sequence on shard %s", seqNum, m_shardId); } else { seq = seqNum; } } String data = null; try { data = new String(record.getData().array(), "UTF-8"); Invocation invocation = new Invocation(m_config.getProcedure(), m_formatter.transform(data)); StreamProcedureCallback cb = new StreamProcedureCallback(m_gapTracker, offset, seqNum, m_cbcnt); if (!callProcedure(invocation, cb)) { rateLimitedLog(Level.ERROR, null, "Call procedure error on shard %s", m_shardId); m_gapTracker.commit(offset, seqNum); } } catch (UnsupportedEncodingException | FormatException e) { rateLimitedLog(Level.ERROR, e, "Data error on shard %s, data: %s", m_shardId, data); m_gapTracker.commit(offset, seqNum); } catch (Exception e) { rateLimitedLog(Level.ERROR, e, "Call procedure error with data %s on shard %s", data, m_shardId); break; } if (!shouldRun()) { break; } offset++; } commitCheckPoint(records.getCheckpointer()); }

Target:
public void processRecords(ProcessRecordsInput records) { if (records.getRecords().isEmpty()) { return; } BigInteger seq = BigInteger.ZERO; m_gapTracker.allocate(records.getRecords().size()); int offset = 0; for (Record record : records.getRecords()) { m_submitCount.incrementAndGet(); BigInteger seqNum = new BigInteger(record.getSequenceNumber()); if (seqNum.compareTo(m_lastFetchCommittedSequenceNumber) < 0) { continue; } if (isDebugEnabled()) { debug(null, "last committed seq: %s, current seq:%s shard %s", m_lastFetchCommittedSequenceNumber.toString(), record.getSequenceNumber(), m_shardId); if (seqNum.compareTo(seq) < 0) { debug(null, "Record %d is out of sequence on shard %s", seqNum, m_shardId); } else { seq = seqNum; } } String data = null; try { data = new String(record.getData().array(), StandardCharsets.UTF_8); Invocation invocation = new Invocation(m_config.getProcedure(), m_formatter.transform(data)); StreamProcedureCallback cb = new StreamProcedureCallback(m_gapTracker, offset, seqNum, m_cbcnt); if (!callProcedure(invocation, cb)) { rateLimitedLog(Level.ERROR, null, "Call procedure error on shard %s", m_shardId); m_gapTracker.commit(offset, seqNum); } } catch (FormatException e) { rateLimitedLog(Level.ERROR, e, "Data error on shard %s, data: %s", m_shardId, data); m_gapTracker.commit(offset, seqNum); } if (!shouldRun()) { break; } offset++; } commitCheckPoint(records.getCheckpointer()); }
Source:
public void bridgeOverwriteConfig(int retries, int waitIntervalInMSecs) { logger.trace( "bridgeOverwriteConfig(): parameters requested: retries = times, initial wait interval = msecs.", retries, waitIntervalInMSecs); if ((retries < 0) || (waitIntervalInMSecs < 0)) { logger.info("bridgeOverwriteConfig(): settings ignore due to invalid values."); } else { this.bridgeInstance.veluxBridgeConfiguration().retries = retries; this.bridgeInstance.veluxBridgeConfiguration().timeoutMsecs = waitIntervalInMSecs; } logger.trace("bridgeOverwriteConfig(): config set to retries = times, initial wait interval = msecs.", this.bridgeInstance.veluxBridgeConfiguration().retries, this.bridgeInstance.veluxBridgeConfiguration().timeoutMsecs); }

Target:
public void bridgeOverwriteConfig(int retries, int waitIntervalInMSecs) { logger.trace( "bridgeOverwriteConfig(): parameters requested: retries = times, initial wait interval = msecs.", retries, waitIntervalInMSecs); if ((retries < 0) || (waitIntervalInMSecs < 0)) { logger.info("bridgeOverwriteConfig(): settings ignored due to invalid values."); VeluxBridgeConfiguration defaultConfiguration = new VeluxBridgeConfiguration(); bridgeInstance.veluxBridgeConfiguration().retries = defaultConfiguration.retries; bridgeInstance.veluxBridgeConfiguration().timeoutMsecs = defaultConfiguration.timeoutMsecs; } else { bridgeInstance.veluxBridgeConfiguration().retries = retries; bridgeInstance.veluxBridgeConfiguration().timeoutMsecs = waitIntervalInMSecs; } logger.trace("bridgeOverwriteConfig(): config set to retries = times, initial wait interval = ms.", bridgeInstance.veluxBridgeConfiguration().retries, bridgeInstance.veluxBridgeConfiguration().timeoutMsecs); }
Source:
private boolean isAustraliaFipsCountryCode (String countryCode) { return (StringUtils.isNotBlank(countryCode) && StringUtils.equalsIgnoreCase(countryCode, PaymentWorksConstants.COUNTRY_CODE_AUSTRALIA)); }

Target:
private boolean isAustraliaFipsCountryCode (String countryCode) { return (StringUtils.equalsIgnoreCase(countryCode, PaymentWorksConstants.FIPS_COUNTRY_CODE_AUSTRALIA)); }
Source:
public void should_create_AssertionError_if_created_ComparisonFailure_and_AssertionFailedError_is_null() throws Exception { when(constructorInvoker.newInstance(any(String.class), any(Class[].class), anyVararg())).thenReturn(null); AssertionError error = factory.newAssertionError(description, new StandardRepresentation()); check(error); }

Target:
public void should_create_AssertionError_if_created_ComparisonFailure_and_AssertionFailedError_is_null() throws Exception { when(constructorInvoker.newInstance(any(String.class), any(Class[].class), any(Object[].class))).thenReturn(null); AssertionError error = factory.newAssertionError(description, new StandardRepresentation()); check(error); }
Source:
public void addPeer(String peerId, ReplicationPeerConfig peerConfig, boolean enabled) throws ReplicationException { if (peers.containsKey(peerId)) { return; } ReplicationPeerConfig updatedPeerConfig = ReplicationPeerConfigUtil. addBasePeerConfigsIfNotPresent(conf,peerConfig); peerConfig = updatedPeerConfig; ReplicationPeerConfig copiedPeerConfig = ReplicationPeerConfig.newBuilder(peerConfig).build(); SyncReplicationState syncReplicationState = copiedPeerConfig.isSyncReplication() ? SyncReplicationState.DOWNGRADE_ACTIVE : SyncReplicationState.NONE; peerStorage.addPeer(peerId, copiedPeerConfig, enabled, syncReplicationState); peers.put(peerId, new ReplicationPeerDescription(peerId, enabled, copiedPeerConfig, syncReplicationState)); }

Target:
public void addPeer(String peerId, ReplicationPeerConfig peerConfig, boolean enabled) throws ReplicationException { if (peers.containsKey(peerId)) { return; } peerConfig = ReplicationPeerConfigUtil.addBasePeerConfigsIfNotPresent(conf, peerConfig); ReplicationPeerConfig copiedPeerConfig = ReplicationPeerConfig.newBuilder(peerConfig).build(); SyncReplicationState syncReplicationState = copiedPeerConfig.isSyncReplication() ? SyncReplicationState.DOWNGRADE_ACTIVE : SyncReplicationState.NONE; peerStorage.addPeer(peerId, copiedPeerConfig, enabled, syncReplicationState); peers.put(peerId, new ReplicationPeerDescription(peerId, enabled, copiedPeerConfig, syncReplicationState)); }
Source:
protected void run() throws Exception { if (all) { Map<String, Ref> allRefs = db.getRefDatabase().getRefs(ALL); for (final Ref r : allRefs.values()) outw.println(r.getObjectId().name()); } else { if(verify && commits.size() > 1) throw new CmdLineException(CLIText.get().needSingleRevision); for (final ObjectId o : commits) outw.println(o.name()); } }

Target:
protected void run() throws Exception { if (all) { Map<String, Ref> allRefs = db.getRefDatabase().getRefs(ALL); for (final Ref r : allRefs.values()) { outw.println(r.getObjectId().name()); } } else { if (verify && commits.size() > 1) { throw new CmdLineException(CLIText.get().needSingleRevision); } for (final ObjectId o : commits) { outw.println(o.name()); } } }
Source:
private static boolean isStar(ExpressionTree expressionTree) { String value = ExpressionsHelper.getConstantValueAsString(expressionTree).value(); return value != null && value.equals("*"); }

Target:
private static boolean isStar(ExpressionTree expressionTree) { if (expressionTree.is(Tree.Kind.NEW_ARRAY)) { return ((NewArrayTree) expressionTree).initializers().stream().anyMatch(CORSCheck::isStar); } else { String value = ExpressionsHelper.getConstantValueAsString(expressionTree).value(); return value != null && value.equals("*"); } }
Source:
public Set<Long> findChildTaskExecutionIds(Set<Long> taskExecutionIds) { final MapSqlParameterSource queryParameters = new MapSqlParameterSource() .addValue("parentTaskExecutionIds", taskExecutionIds); Set<Long> childTaskExecutionIds; try { childTaskExecutionIds = this.jdbcTemplate.query( getQuery(SELECT_CHILD_TASK_EXECUTION_IDS), queryParameters, new ResultSetExtractor<Set<Long>>() { @Override public Set<Long> extractData(ResultSet resultSet) throws SQLException, DataAccessException { Set<Long> jobExecutionIds = new TreeSet<>(); while (resultSet.next()) { jobExecutionIds .add(resultSet.getLong("TASK_EXECUTION_ID")); } return jobExecutionIds; } }); } catch (DataAccessException e) { childTaskExecutionIds = Collections.emptySet(); } if (!childTaskExecutionIds.isEmpty()) { childTaskExecutionIds.addAll(this.findChildTaskExecutionIds(childTaskExecutionIds)); } return childTaskExecutionIds; }

Target:
public Set<Long> findChildTaskExecutionIds(Set<Long> taskExecutionIds) { final MapSqlParameterSource queryParameters = new MapSqlParameterSource() .addValue("parentTaskExecutionIds", taskExecutionIds); Set<Long> childTaskExecutionIds; try { childTaskExecutionIds = this.jdbcTemplate.query( getQuery(SELECT_CHILD_TASK_EXECUTION_IDS), queryParameters, new ResultSetExtractor<Set<Long>>() { @Override public Set<Long> extractData(ResultSet resultSet) throws SQLException, DataAccessException { final Set<Long> taskExecutionIds = new TreeSet<>(); while (resultSet.next()) { taskExecutionIds .add(resultSet.getLong("TASK_EXECUTION_ID")); } return taskExecutionIds; } }); } catch (DataAccessException e) { childTaskExecutionIds = Collections.emptySet(); } if (!childTaskExecutionIds.isEmpty()) { childTaskExecutionIds.addAll(this.findChildTaskExecutionIds(childTaskExecutionIds)); } return childTaskExecutionIds; }