auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public VM update(VM incoming) { if (incoming.isSetCluster() && (incoming.getCluster().isSetId() || incoming.getCluster().isSetName())) { Guid clusterId = lookupClusterId(incoming); if(!clusterId.toString().equals(get().getCluster().getId())){ performAction(VdcActionType.ChangeVMCluster, new ChangeVMClusterParameters(clusterId, guid)); } } if (incoming.isSetPlacementPolicy() && incoming.getPlacementPolicy().isSetHost() && incoming.getPlacementPolicy().getHost().isSetName() && !incoming.getPlacementPolicy().getHost().isSetId()) { incoming.getPlacementPolicy().getHost().setId(getHostId(incoming.getPlacementPolicy().getHost().getName())); } VM retVal = performUpdate(incoming, new QueryIdResolver(VdcQueryType.GetVmByVmId, GetVmByVmIdParameters.class), VdcActionType.UpdateVm, new UpdateParametersProvider()); return retVal; }

Target:
public VM update(VM incoming) { if (incoming.isSetCluster() && (incoming.getCluster().isSetId() || incoming.getCluster().isSetName())) { Guid clusterId = lookupClusterId(incoming); if(!clusterId.toString().equals(get().getCluster().getId())){ performAction(VdcActionType.ChangeVMCluster, new ChangeVMClusterParameters(clusterId, guid)); } } if (incoming.isSetPlacementPolicy() && incoming.getPlacementPolicy().isSetHost() && incoming.getPlacementPolicy().getHost().isSetName() && !incoming.getPlacementPolicy().getHost().isSetId()) { incoming.getPlacementPolicy().getHost().setId(getHostId(incoming.getPlacementPolicy().getHost().getName())); } return performUpdate(incoming, new QueryIdResolver(VdcQueryType.GetVmByVmId, GetVmByVmIdParameters.class), VdcActionType.UpdateVm, new UpdateParametersProvider()); }
Source:
protected Function<Object, IterableWithMarker<OperatingSystem>> markerToNextForArg0( final Optional<Object> arg) { return new Function<Object, IterableWithMarker<OperatingSystem>>() { @Override public IterableWithMarker<OperatingSystem> apply(Object input) { PaginationOptions paginationOptions = PaginationOptions.class.cast(input); return api.getInfrastructureApi().listOperatingSystems(arg.toString(), paginationOptions); } }; }

Target:
protected Function<Object, IterableWithMarker<OperatingSystem>> markerToNextForArg0( final Optional<Object> arg) { return new Function<Object, IterableWithMarker<OperatingSystem>>() { @Override public IterableWithMarker<OperatingSystem> apply(Object input) { PaginationOptions paginationOptions = PaginationOptions.class.cast(input); return api.getInfrastructureApi().listOperatingSystems(arg.get().toString(), paginationOptions); } }; }
Source:
public Optional<Git> execute() { try { final org.eclipse.jgit.api.Git _git = org.eclipse.jgit.api.Git.init().setBare(true).setDirectory(repoDir).call(); if (leaders != null) { new WriteConfiguration(_git.getRepository(), cfg -> { cfg.setInt("core", null, "repositoryformatversion", 1); cfg.setString("extensions", null, "refsStorage", "reftree"); }).execute(); } final Repository repo = new FileRepositoryBuilder() .setGitDir(repoDir) .build(); final org.eclipse.jgit.api.Git git = new org.eclipse.jgit.api.Git(repo); String ssl = System.getProperty("org.uberfire.nio.git.http.sslVerify"); if(null != ssl) { boolean sslVerify = Boolean.valueOf(ssl); if(!sslVerify) { StoredConfig config = repo.getConfig(); config.setBoolean( "http", null, "sslVerify", false ); config.save(); } } if (hookDir != null) { final File repoHookDir = new File(repoDir, "hooks"); try { FileUtils.copyDirectory(hookDir, repoHookDir); } catch (final Exception ex) { throw new RuntimeException(ex); } for (final File file : repoHookDir.listFiles()) { if (file != null && file.isFile()) { file.setExecutable(true); } } } return Optional.of(new GitImpl(git, leaders)); } catch (final Exception ex) { throw new IOException(ex); } }

Target:
public Optional<Git> execute() { try { final org.eclipse.jgit.api.Git _git = org.eclipse.jgit.api.Git.init().setBare(true).setDirectory(repoDir).call(); if (leaders != null) { new WriteConfiguration(_git.getRepository(), cfg -> { cfg.setInt("core", null, "repositoryformatversion", 1); cfg.setString("extensions", null, "refsStorage", "reftree"); }).execute(); } final Repository repo = new FileRepositoryBuilder() .setGitDir(repoDir) .build(); final org.eclipse.jgit.api.Git git = new org.eclipse.jgit.api.Git(repo); setSSLVerify(repo); if (hookDir != null) { final File repoHookDir = new File(repoDir, "hooks"); try { FileUtils.copyDirectory(hookDir, repoHookDir); } catch (final Exception ex) { throw new RuntimeException(ex); } for (final File file : repoHookDir.listFiles()) { if (file != null && file.isFile()) { file.setExecutable(true); } } } return Optional.of(new GitImpl(git, leaders)); } catch (final Exception ex) { throw new IOException(ex); } }
Source:
RemoteReadListener(final RemoteConnectionHandler handler, final RemoteConnection connection) { synchronized (connection.getLock()) { connection.getChannel().getCloseSetter().set(new ChannelListener<java.nio.channels.Channel>() { public void handleEvent(final java.nio.channels.Channel channel) { try { connection.getExecutor().execute(new Runnable() { public void run() { handler.handleConnectionClose(); } }); } catch (RejectedExecutionException re) { log.trace("Conenction already closing."); } } }); } this.handler = handler; this.connection = connection; }

Target:
RemoteReadListener(final RemoteConnectionHandler handler, final RemoteConnection connection) { synchronized (connection.getLock()) { connection.getChannel().getCloseSetter().set(new ChannelListener<java.nio.channels.Channel>() { public void handleEvent(final java.nio.channels.Channel channel) { handler.handleSocketChannelClose(); } }); } this.handler = handler; this.connection = connection; }
Source:
public void testMultiGet() { timestampMappingStore.put(defaultNamespace, KEY, VALUE); timestampMappingStore.put(defaultNamespace, KEY2, VALUE2); assertThat(timestampMappingStore.multiGet(defaultNamespace, ImmutableList.of(KEY, KEY2, "random".getBytes()))) .containsExactlyInAnyOrderEntriesOf(ImmutableMap.of( KEY, VALUE, KEY2, VALUE2) ); }

Target:
public void testMultiGet() { timestampMappingStore.put(defaultNamespace, KEY, VALUE); timestampMappingStore.put(defaultNamespace, KEY2, VALUE2); assertThat( timestampMappingStore.get(defaultNamespace, ImmutableList.of(KEY, KEY2, ByteString.encodeUtf8("bla")))) .containsExactlyInAnyOrderEntriesOf(ImmutableMap.of( KEY, VALUE, KEY2, VALUE2) ); }
Source:
public long getRetainedSizeInBytes() { return INSTANCE_SIZE + SizeOf.sizeOf(nullVector); }

Target:
public long getRetainedSizeInBytes() { return INSTANCE_SIZE + sizeOf(nullVector); }
Source:
public CommandImpl(String name, String commandLine, String type) { this.name = name; this.commandLine = commandLine; this.type = type; }

Target:
public CommandImpl(String name, String commandLine, String type) { this(name, commandLine, type, Collections.<String, String>emptyMap()); }
Source:
public ValidationResult rngSourcesAllowed() { return ValidationResult.failWith(EngineMessage.ACTION_TYPE_FAILED_RANDOM_RNG_SOURCE_CANT_BE_ADDED_TO_CLUSTER_ADDITIONAL_RNG_SOURCES) .unless(Collections.singleton(VmRngDevice.Source.HWRNG).containsAll(cluster.getAdditionalRngSources())); }

Target:
public ValidationResult rngSourcesAllowed() { return ValidationResult.failWith(EngineMessage.ACTION_TYPE_FAILED_RANDOM_RNG_SOURCE_CANT_BE_ADDED_TO_CLUSTER_ADDITIONAL_RNG_SOURCES) .unless(ALLOWED_ADDITIONAL_RNG_SOURCES.containsAll(cluster.getAdditionalRngSources())); }
Source:
public SeenExchanges visitExchange(ExchangeNode node, Void context) { SeenExchanges seenExchanges = aggregatedSeenExchanges(node.getSources()); if (node.getType().equals(REPARTITION)) { if (node.getScope().equals(REMOTE)) { return new SeenExchanges(false, true); } return new SeenExchanges(true, seenExchanges.remoteRepartitionExchange); } return seenExchanges; }

Target:
public Optional<SeenExchanges> visitExchange(ExchangeNode node, Void context) { Optional<SeenExchanges> seenExchangesOptional = aggregatedSeenExchanges(node.getSources()); if (!seenExchangesOptional.isPresent()) { return Optional.empty(); } if (!node.getType().equals(REPARTITION)) { return seenExchangesOptional; } SeenExchanges seenExchanges = seenExchangesOptional.get(); if (node.getScope().equals(REMOTE)) { return Optional.of(new SeenExchanges(false, true)); } return Optional.of(new SeenExchanges(true, seenExchanges.remoteRepartitionExchange)); }
Source:
public void waitCreateWorkspaceButtonEnabled() { webDriverWaitFactory .get() .until((ExpectedCondition<Boolean>) driver -> isCreateWorkspaceButtonEnabled()); }

Target:
public void waitCreateWorkspaceButtonEnabled() { seleniumWebDriverHelper.waitAttributeEqualsTo( By.xpath(BOTTOM_CREATE_BUTTON_XPATH), "aria-disabled", "false"); }
Source:
TokenCacheItem(final TokenCacheItem tokenCacheItem) { this.mAuthority = tokenCacheItem.getAuthority(); this.mResource = tokenCacheItem.getResource(); this.mClientId = tokenCacheItem.getClientId(); this.mAccessToken = tokenCacheItem.getAccessToken(); this.mRefreshtoken = tokenCacheItem.getRefreshToken(); this.mRawIdToken = tokenCacheItem.getRawIdToken(); this.mUserInfo = tokenCacheItem.getUserInfo(); this.mExpiresOn = tokenCacheItem.getExpiresOn(); this.mIsMultiResourceRefreshToken = tokenCacheItem.getIsMultiResourceRefreshToken(); this.mTenantId = tokenCacheItem.getTenantId(); this.mFamilyClientId = tokenCacheItem.getFamilyClientId(); if (tokenCacheItem.isExtendedLifetimeValid()) { this.mExtendedExpiresOn = tokenCacheItem.getExtendedExpiresOn(); } }

Target:
TokenCacheItem(final TokenCacheItem tokenCacheItem) { this.mAuthority = tokenCacheItem.getAuthority(); this.mResource = tokenCacheItem.getResource(); this.mClientId = tokenCacheItem.getClientId(); this.mAccessToken = tokenCacheItem.getAccessToken(); this.mRefreshtoken = tokenCacheItem.getRefreshToken(); this.mRawIdToken = tokenCacheItem.getRawIdToken(); this.mUserInfo = tokenCacheItem.getUserInfo(); this.mExpiresOn = tokenCacheItem.getExpiresOn(); this.mIsMultiResourceRefreshToken = tokenCacheItem.getIsMultiResourceRefreshToken(); this.mTenantId = tokenCacheItem.getTenantId(); this.mFamilyClientId = tokenCacheItem.getFamilyClientId(); this.mExtendedExpiresOn = tokenCacheItem.getExtendedExpiresOn(); }
Source:
String generateHeaderOnlyOutputFileName(@NonNull Entity entity) { val fname = entity.getFileName(); val extensionPos = fname.toLowerCase().indexOf(".bam"); val left = StringUtils.left(fname, extensionPos); val extension = StringUtils.right(fname, fname.length() - extensionPos); String fullName = String.format("%s.%s%s", left, "header", extension); return addOutputPath(fullName); }

Target:
String generateHeaderOnlyOutputFileName(@NonNull Entity entity) { return addOutputPath(injectFileNameModifier(entity, "header")); }
Source:
public void phaseOriginal() { EntitySelectorConfig entitySelectorConfig = new EntitySelectorConfig(); entitySelectorConfig.setCacheType(SelectionCacheType.PHASE); entitySelectorConfig.setSelectionOrder(SelectionOrder.ORIGINAL); EntitySelector entitySelector = entitySelectorConfig.buildEntitySelector( buildHeuristicConfigPolicy(), SelectionCacheType.JUST_IN_TIME, SelectionOrder.RANDOM); assertThat((Object) entitySelector) .isInstanceOf(FromSolutionEntitySelector.class); assertThat((Object) entitySelector) .isNotInstanceOf(ShufflingEntitySelector.class); assertThat(entitySelector.getCacheType()).isEqualTo(SelectionCacheType.PHASE); }

Target:
public void phaseOriginal() { EntitySelectorConfig entitySelectorConfig = new EntitySelectorConfig(); entitySelectorConfig.setCacheType(SelectionCacheType.PHASE); entitySelectorConfig.setSelectionOrder(SelectionOrder.ORIGINAL); EntitySelector entitySelector = entitySelectorConfig.buildEntitySelector( buildHeuristicConfigPolicy(), SelectionCacheType.JUST_IN_TIME, SelectionOrder.RANDOM); assertThat(entitySelector) .isInstanceOf(FromSolutionEntitySelector.class); assertThat(entitySelector) .isNotInstanceOf(ShufflingEntitySelector.class); assertThat(entitySelector.getCacheType()).isEqualTo(SelectionCacheType.PHASE); }
Source:
protected void executeVdsBrokerCommand() { String volumeName = getParameters().getVolumeName(); if (globalVolumeOptionsList.isEmpty()) { globalVolumeOptionsList = getBroker().glusterVolumeGlobalOptionsGet().globalOptionList(); } else { for (String option : globalVolumeOptionsList) { if (option.equalsIgnoreCase(getParameters().getVolumeOption().getKey())) { volumeName = "all"; break; } } } status = getBroker().glusterVolumeSet(volumeName, getParameters().getVolumeOption().getKey(), getParameters().getVolumeOption().getValue()); proceedProxyReturnValue(); }

Target:
protected void executeVdsBrokerCommand() { String volumeName = getParameters().getVolumeName(); VDS vds = vdsDao.get(getParameters().getVdsId()); List<GlusterGlobalVolumeOptionEntity> globalVolumeOptionsList = glusterOptionDao.getGlobalVolumeOptions(vds.getClusterId()); if (!globalVolumeOptionsList.isEmpty()) { for (GlusterGlobalVolumeOptionEntity option : globalVolumeOptionsList) { if (option.getKey().equalsIgnoreCase(getParameters().getVolumeOption().getKey())) { volumeName = "all"; break; } } } status = getBroker().glusterVolumeSet(volumeName, getParameters().getVolumeOption().getKey(), getParameters().getVolumeOption().getValue()); proceedProxyReturnValue(); }
Source:
public void showNfsProfileStats(GlusterVolumeProfileInfo entity) { List<GlusterVolumeProfileStats> nfsProfileDetails = entity.getNfsProfileDetails(); getNfsServers().setItems(nfsProfileDetails); getNfsServers().setSelectedItem(nfsProfileDetails.get(0)); }

Target:
public void showNfsProfileStats(GlusterVolumeProfileInfo entity) { if(entity != null) { List<GlusterVolumeProfileStats> nfsProfileDetails = entity.getNfsProfileDetails(); getNfsServers().setItems(nfsProfileDetails); if(nfsProfileDetails.size() > 0) { getNfsServers().setSelectedItem(nfsProfileDetails.get(0)); } } }
Source:
public void close() throws Exception { ensureStarted(); LOG.info("Closing SourceCoordinator."); enumerator.close(); coordinatorExecutor.shutdown(); LOG.info("Source coordinator closed."); }

Target:
public void close() throws Exception { LOG.info("Closing SourceCoordinator for source {}.", operatorName); boolean successfullyClosed = false; try { if (started) { enumerator.close(); } } finally { coordinatorExecutor.shutdownNow(); successfullyClosed = coordinatorExecutor.awaitTermination(10, TimeUnit.SECONDS); } if (!successfullyClosed) { throw new TimeoutException("The source coordinator failed to close before timeout."); } LOG.info("Source coordinator for source closed.", operatorName); }
Source:
public MbusChannelElementsResponseDto execute(final DlmsConnectionHolder conn, final DlmsDevice device, final MbusChannelElementsDto requestDto) throws ProtocolAdapterException, FunctionalException { LOGGER.debug("retrieving mbus info on e-meter"); final MbusChannelElementsResponseDto responseDto = new MbusChannelElementsResponseDto(requestDto); for (int c = FIRST_CHANNEL; c < FIRST_CHANNEL + NR_OF_CHANNELS; c++) { final AttributeAddress[] attrAddresses = this.makeAttributeAddresses(c); conn.getDlmsMessageListener().setDescription("CoupleMBusDevice, retrieve attribute: " + JdlmsObjectToStringUtil.describeAttributes(attrAddresses)); final List<GetResult> resultList = this.dlmsHelper.getWithList(conn, device, attrAddresses); final ChannelElementValues channelValues = this.makeChannelElementValues(c, resultList); responseDto.addChannelElements(channelValues); if (this.mbusChannelMatches(c, channelValues, requestDto)) { responseDto.setChannel(c); break; } } return responseDto; }

Target:
public MbusChannelElementsResponseDto execute(final DlmsConnectionHolder conn, final DlmsDevice device, final MbusChannelElementsDto requestDto) throws ProtocolAdapterException { LOGGER.debug("retrieving mbus info on e-meter"); ChannelElementValuesDto bestMatch = null; final List<ChannelElementValuesDto> channelElements = new ArrayList<>(); for (short channel = FIRST_CHANNEL; channel < FIRST_CHANNEL + NR_OF_CHANNELS; channel++) { final List<GetResult> resultList = this.getMBusClientAttributeValues(conn, device, channel); final ChannelElementValuesDto channelValues = this.makeChannelElementValues(channel, resultList); channelElements.add(channelValues); if (FindMatchingChannelHelper.matches(requestDto, channelValues)) { bestMatch = channelValues; break; } } if (bestMatch == null) { bestMatch = FindMatchingChannelHelper.bestMatch(requestDto, channelElements); } return new MbusChannelElementsResponseDto(requestDto, bestMatch == null ? null : bestMatch.getChannel(), channelElements); }
Source:
public ApiKey newKey(final PlayerName playerName, final InetAddress ip) { Preconditions.checkArgument(playerName != null); Preconditions.checkArgument(ip != null); final ApiKey key = keyMaker.get(); userJdbiDao .lookupUserRoleByName(playerName.getValue()) .ifPresentOrElse( userRoleLookup -> { insertKey( userRoleLookup.getUserId(), playerName.getValue(), key, ip, userRoleLookup.getUserRoleId()); }, () -> { final int anonymousUserRoleId = userRoleDao.lookupAnonymousRoleId(); insertKey(null, playerName.getValue(), key, ip, anonymousUserRoleId); }); return key; }

Target:
public ApiKey newKey(final PlayerName playerName, final InetAddress ip) { Preconditions.checkNotNull(playerName); Preconditions.checkNotNull(ip); final ApiKey key = keyMaker.get(); userJdbiDao .lookupUserRoleByName(playerName.getValue()) .ifPresentOrElse( userRoleLookup -> { insertKey( userRoleLookup.getUserId(), playerName.getValue(), key, ip, userRoleLookup.getUserRoleId()); }, () -> { final int anonymousUserRoleId = userRoleDao.lookupAnonymousRoleId(); insertKey(null, playerName.getValue(), key, ip, anonymousUserRoleId); }); return key; }
Source:
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { try { return method.invoke(mDelegate, args); } catch (InvocationTargetException delegateException) { try { LOG.info("Couldn't invoke method {}", method.toGenericString()); if (mCompat != null && delegateException.getCause().getClass() .isAssignableFrom(TApplicationException.class)) { LOG.info("Attempting to invoke with {}", mCompat.getClass().getName()); return invokeCompatibility(method, args); } } catch (InvocationTargetException compatibilityException) { if (compatibilityException.getCause().getClass() .isAssignableFrom(TApplicationException.class)) { LOG.warn("Invocation of compatibility for metastore client method failed.", method.getName(), compatibilityException); } else { throw compatibilityException.getCause(); } } catch (Throwable t) { LOG.warn( "Unable to invoke compatibility for metastore client method {}.", method.getName(), t); } throw delegateException.getCause(); } }

Target:
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { try { return method.invoke(mDelegate, args); } catch (InvocationTargetException delegateException) { try { if (mCompat != null && delegateException.getCause().getClass() .isAssignableFrom(TApplicationException.class)) { LOG.debug("Attempting to call hive metastore with compatibility class {}", mCompat.getClass().getName()); return invokeCompatibility(method, args); } } catch (InvocationTargetException compatibilityException) { if (compatibilityException.getCause().getClass() .isAssignableFrom(TApplicationException.class)) { LOG.warn("Invocation of compatibility for metastore client method failed.", method.getName(), compatibilityException); } else { throw compatibilityException.getCause(); } } catch (Throwable t) { LOG.warn( "Unable to invoke compatibility for metastore client method {}.", method.getName(), t); } throw delegateException.getCause(); } }
Source:
private boolean isManagementToken(String lockToken) { logger.verbose("!!!! This token is management token ? ", managementNodeLocks.contains(lockToken)); return managementNodeLocks.contains(lockToken); }

Target:
private boolean isManagementToken(String lockToken) { return managementNodeLocks.contains(lockToken); }
Source:
public void before() { eventCache = createEventCache(3); part = 1; }

Target:
public void before() { eventCache = createEventCache(5); part = 1; }
Source:
CastResolver(DataType type, String name) { super(FuncParams.builder().withIndependentVarArgs(Param.ANY).build()); this.type = type; this.name = name; }

Target:
CastResolver(DataType type, String name) { super(FuncParams.builder(Param.ANY) .withVarArgs(Param.ANY) .limitVarArgOccurrences(1) .build()); this.type = type; this.name = name; }
Source:
public void testApikeyValidate() throws BugzillaRestException { RepositoryLocation location = new RepositoryLocation(); location.setUrl(actualFixture.getRepositoryUrl()); location.setProxy(null); location.setCredentialsStore(new InMemoryCredentialsStore()); location.setCredentials(AuthenticationType.REPOSITORY, new UserCredentials("tests@mylyn.eclipse.org", "")); location.setProperty(IBugzillaRestConstants.REPOSITORY_USE_API_KEY, Boolean.toString(true)); location.setProperty(IBugzillaRestConstants.REPOSITORY_API_KEY, "wvkz2SoBMBQEKv6ishp1j7NY1R9l711g5w2afXc6"); BugzillaRestClient client; client = new BugzillaRestClient(location, connector); assertNotNull(client.getClient()); if (!Boolean.parseBoolean(actualFixture.getProperty("api_key_enabled"))) { thrown.expect(BugzillaRestException.class); thrown.expectMessage("The API key you specified is invalid"); client.validate(new NullOperationMonitor()); } else { assertEquals(true, client.validate(new NullOperationMonitor())); } }

Target:
public void testApikeyValidate() throws BugzillaRestException { RepositoryLocation location = new RepositoryLocation(); location.setUrl(actualFixture.getRepositoryUrl()); location.setProxy(null); location.setCredentialsStore(new InMemoryCredentialsStore()); location.setCredentials(AuthenticationType.REPOSITORY, new UserCredentials("tests@mylyn.eclipse.org", "")); location.setProperty(IBugzillaRestConstants.REPOSITORY_USE_API_KEY, Boolean.toString(true)); location.setProperty(IBugzillaRestConstants.REPOSITORY_API_KEY, "wvkz2SoBMBQEKv6ishp1j7NY1R9l711g5w2afXc6"); BugzillaRestClient client; client = new BugzillaRestClient(location, connector); assertNotNull(client.getClient()); if (!Boolean.parseBoolean(actualFixture.getProperty(IBugzillaRestConstants.API_KEY_ENABLED_PROPERTY))) { thrown.expect(BugzillaRestException.class); thrown.expectMessage("The API key you specified is invalid"); client.validate(new NullOperationMonitor()); } else { assertEquals(true, client.validate(new NullOperationMonitor())); } }
Source:
public void delete(Iterable<SystemStreamPartition> systemStreamPartitions) { for (SystemStreamPartition systemStreamPartition : systemStreamPartitions) { LOG.info("Deleting the partition: from store.", systemStreamPartition); String sspKey = getKey(systemStreamPartition); metadataStore.delete(sspKey); } }

Target:
public void delete(Iterable<SystemStreamPartition> systemStreamPartitions) { for (SystemStreamPartition systemStreamPartition : systemStreamPartitions) { LOG.info("Deleting the partition: from store.", systemStreamPartition); String serializedSSPAsJson = serializeSSPToJson(systemStreamPartition); metadataStore.delete(serializedSSPAsJson); } }
Source:
protected void index(PartialDeploy config) { if (config == null) { return; } partialBundles.putIfAbsent(config.bundle(), new HashSet<>()); Set<TargetExtensions> pairs = partialBundles.get(config.bundle()); Arrays.stream(config.features()).map(c -> { try { return c.newInstance(); } catch (InstantiationException | IllegalAccessException e) { throw new IllegalStateException(e); } }).forEach(pairs::add); }

Target:
protected void index(PartialDeploy config) { if (config == null) { return; } Set<TargetExtensions> pairs = partialBundles.computeIfAbsent(config.bundle(), key -> new HashSet<>()); Arrays.stream(config.features()).map(c -> { try { return c.newInstance(); } catch (ReflectiveOperationException e) { throw new IllegalStateException(e); } }).forEach(pairs::add); }
Source:
private long getColumnIndexForSort(String fieldName) { if (fieldName == null || fieldName.isEmpty()) { throw new IllegalArgumentException("Non-empty field name required."); } if (fieldName.contains(".")) { throw new IllegalArgumentException("Sorting using child object fields is not supported: " + fieldName); } long columnIndex = collection.getTable().getColumnIndex(fieldName); if (columnIndex < 0) { throw new IllegalArgumentException(String.format("Field '%s' does not exist.", fieldName)); } return columnIndex; }

Target:
private long getColumnIndexForSort(String fieldName) { if (fieldName == null || fieldName.isEmpty()) { throw new IllegalArgumentException("Non-empty field name required."); } if (fieldName.contains(".")) { throw new IllegalArgumentException("Aggregates on child object fields are not supported: " + fieldName); } long columnIndex = collection.getTable().getColumnIndex(fieldName); if (columnIndex < 0) { throw new IllegalArgumentException(String.format("Field '%s' does not exist.", fieldName)); } return columnIndex; }
Source:
public Mono<AccessToken> authenticateWithPfxCertificate(String pfxCertificatePath, String pfxCertificatePassword, TokenRequestContext request) { String authorityUrl = options.getAuthorityHost().replaceAll("/+$", "") + "/" + tenantId; return Mono.fromCallable(() -> { ConfidentialClientApplication.Builder applicationBuilder = ConfidentialClientApplication.builder(clientId, ClientCredentialFactory.createFromCertificate( new FileInputStream(pfxCertificatePath), pfxCertificatePassword)) .httpClient(new HttpPipelineAdapter(options.getHttpPipeline())) .authority(authorityUrl); if (options.getProxyOptions() != null) { applicationBuilder.proxy(proxyOptionsToJavaNetProxy(options.getProxyOptions())); } if (options.getHttpPipeline() != null) { applicationBuilder.httpClient(new HttpPipelineAdapter(options.getHttpPipeline())); } return applicationBuilder.build(); }).flatMap(application -> Mono.fromFuture(application.acquireToken( ClientCredentialParameters.builder(new HashSet<>(request.getScopes())).build()))) .map(ar -> new AccessToken(ar.accessToken(), OffsetDateTime.ofInstant(ar.expiresOnDate().toInstant(), ZoneOffset.UTC))); }

Target:
public Mono<AccessToken> authenticateWithPfxCertificate(String pfxCertificatePath, String pfxCertificatePassword, TokenRequestContext request) { String authorityUrl = options.getAuthorityHost().replaceAll("/+$", "") + "/" + tenantId; return Mono.fromCallable(() -> { ConfidentialClientApplication.Builder applicationBuilder = ConfidentialClientApplication.builder(clientId, ClientCredentialFactory.createFromCertificate( new FileInputStream(pfxCertificatePath), pfxCertificatePassword)) .authority(authorityUrl); if (options.getProxyOptions() != null) { applicationBuilder.proxy(proxyOptionsToJavaNetProxy(options.getProxyOptions())); } if (options.getHttpPipeline() != null) { applicationBuilder.httpClient(new HttpPipelineAdapter(options.getHttpPipeline())); } return applicationBuilder.build(); }).flatMap(application -> Mono.fromFuture(application.acquireToken( ClientCredentialParameters.builder(new HashSet<>(request.getScopes())).build()))) .map(ar -> new AccessToken(ar.accessToken(), OffsetDateTime.ofInstant(ar.expiresOnDate().toInstant(), ZoneOffset.UTC))); }
Source:
public <T> ListGauge newListGauge(String name) { return registry.newListGauge(groupName, new ListGauge(name)); }

Target:
public <T> ListGauge<T> newListGauge(String name) { return registry.newListGauge(groupName, new ListGauge(name)); }
Source:
public void stop() { log.info("Stopping announcer"); synchronized (toAnnounce) { if (!started) { return; } started = false; Closer closer = Closer.create(); for (NodeCache cache : listeners.values()) { closer.register(cache); } CloseQuietly.close(closer); for (String announcementPath : announcements.keySet()) { unannounce(announcementPath); } if (!parentsIBuilt.isEmpty()) { CuratorTransaction transaction = curator.inTransaction(); for (String parent : parentsIBuilt) { try { transaction = transaction.delete().forPath(parent).and(); } catch (Exception e) { log.info(e, "Unable to delete parent[%s], boooo.", parent); } } try { ((CuratorTransactionFinal) transaction).commit(); } catch (Exception e) { log.info(e, "Unable to commit transaction. Please feed the hamsters"); } } } }

Target:
public void stop() { log.info("Stopping announcer"); synchronized (toAnnounce) { if (!started) { return; } started = false; Closer closer = Closer.create(); for (NodeCache cache : listeners.values()) { closer.register(cache); } CloseQuietly.close(closer); for (String announcementPath : announcedPaths.keySet()) { unannounce(announcementPath); } if (!parentsIBuilt.isEmpty()) { CuratorTransaction transaction = curator.inTransaction(); for (String parent : parentsIBuilt) { try { transaction = transaction.delete().forPath(parent).and(); } catch (Exception e) { log.error(e, "Unable to delete parent[%s].", parent); } } try { ((CuratorTransactionFinal) transaction).commit(); } catch (Exception e) { log.error(e, "Unable to commit transaction."); } } } }
Source:
public void commit(final Xid xid, final boolean onePhase) throws XAException { try { if (commitToEnlistment()) lookup(xid).commit(onePhase); } catch (XAException | RuntimeException exception) { if (!onePhase && resourceRegistry != null) resourceRegistry.resourceInDoubt(this); throw exception; } if (resourceRegistry != null) resourceRegistry.removeResource(this); }

Target:
public void commit(final Xid xid, final boolean onePhase) throws XAException { try { if (commitToEnlistment()) lookup(xid).commit(onePhase); } catch (XAException | RuntimeException exception) { if (resourceRegistry != null) resourceRegistry.resourceInDoubt(this); throw exception; } if (resourceRegistry != null) resourceRegistry.removeResource(this); }
Source:
public KscDashlet(String name, DashletSpec dashletSpec, NodeDao nodeDao, ResourceDao resourceDao, TransactionOperations transactionOperations, final TimeformatService timeformatService) { super(name, dashletSpec); m_nodeDao = nodeDao; m_resourceDao = resourceDao; m_transactionOperations = transactionOperations; this.timeformatService = timeformatService; this.userTimezoneId = TimeformatHelper.extractUserTimeZoneId().orElse(null); }

Target:
public KscDashlet(String name, DashletSpec dashletSpec, NodeDao nodeDao, ResourceDao resourceDao, TransactionOperations transactionOperations, final TimeformatService timeformatService) { super(name, dashletSpec); m_nodeDao = nodeDao; m_resourceDao = resourceDao; m_transactionOperations = transactionOperations; m_timeformatService = timeformatService; m_userTimezoneId = UserTimeZoneExtractor.extractUserTimeZoneIdOrNull(); }
Source:
public void testGetMasterStorageDomainIdForPool() { Guid result = dao.getMasterStorageDomainIdForPool(Guid.createGuidFromString("6d849ebf-755f-4552-ad09-9a090cda105d")); assertNotNull(result); assertEquals(EXISTING_DOMAIN_ID, result); }

Target:
public void testGetMasterStorageDomainIdForPool() { Guid result = dao.getMasterStorageDomainIdForPool(new Guid("6d849ebf-755f-4552-ad09-9a090cda105d")); assertNotNull(result); assertEquals(EXISTING_DOMAIN_ID, result); }
Source:
private FormValidation doCheckCpus(@QueryParameter String value) { boolean valid = true; String errorMessage = "Invalid CPUs value, it should be a positive decimal."; if (StringUtils.isBlank(value)) { valid = false; } else { try { if (Double.parseDouble(value.trim()) < 0) { valid = false; } } catch (NumberFormatException e) { valid = false; } } return valid ? FormValidation.ok() : FormValidation.error(errorMessage); }

Target:
private FormValidation doCheckCpus(@QueryParameter String value) { boolean valid = true; String errorMessage = "Invalid CPUs value, it should be a positive decimal."; if (StringUtils.isBlank(value)) { valid = false; } else { try { if (Double.parseDouble(value) < 0) { valid = false; } } catch (NumberFormatException e) { valid = false; } } return valid ? FormValidation.ok() : FormValidation.error(errorMessage); }
Source:
public void processPacket(final Stanza packet) { if (packet instanceof org.jivesoftware.smack.packet.Message) { org.jivesoftware.smack.packet.Message xmppMessage = (org.jivesoftware.smack.packet.Message) packet; Map<String, ?> mappedHeaders = headerMapper.toHeadersFromRequest(xmppMessage); Object messageBody = xmppMessage.getBody(); if (ChatMessageListeningEndpoint.this.payloadExpression != null) { messageBody = ChatMessageListeningEndpoint.this.payloadExpression .getValue(ChatMessageListeningEndpoint.this.evaluationContext, xmppMessage); } if (messageBody != null) { sendMessage(getMessageBuilderFactory() .withPayload(messageBody) .copyHeaders(mappedHeaders).build()); } } }

Target:
public void processPacket(final Stanza packet) { if (packet instanceof org.jivesoftware.smack.packet.Message) { org.jivesoftware.smack.packet.Message xmppMessage = (org.jivesoftware.smack.packet.Message) packet; Map<String, ?> mappedHeaders = headerMapper.toHeadersFromRequest(xmppMessage); Object messageBody = xmppMessage.getBody(); if (ChatMessageListeningEndpoint.this.payloadExpression != null) { EvaluationContext evaluationContext = ChatMessageListeningEndpoint.this.evaluationContext; List<ExtensionElement> extensions = xmppMessage.getExtensions(); if (extensions.size() == 1) { ExtensionElement extension = extensions.get(0); evaluationContext = ExpressionUtils.createStandardEvaluationContext(getBeanFactory()); evaluationContext.setVariable("extension", extension); } messageBody = ChatMessageListeningEndpoint.this.payloadExpression .getValue(evaluationContext, xmppMessage); } if (messageBody != null) { sendMessage(getMessageBuilderFactory() .withPayload(messageBody) .copyHeaders(mappedHeaders).build()); } else if (logger.isInfoEnabled()) { if (ChatMessageListeningEndpoint.this.payloadExpression != null) { logger.info("The 'payloadExpression' [" + ChatMessageListeningEndpoint.this.payloadExpression.getExpressionString() + "] has been evaluated to 'null'. The XMPP Message [" + xmppMessage + "] is ignored."); } else { logger.info("The XMPP Message [" + xmppMessage + "] with empty body is ignored."); } } } }
Source:
private RecordWriter createWriter(int index) throws Exception { File file = temp.newFile(String.valueOf(index) + ".parquet"); file.delete(); RecordWriter writer = parquetOutputFormat.getRecordWriter( conf, new Path(file.toString()), CompressionCodecName.UNCOMPRESSED); return writer; }

Target:
private RecordWriter createWriter(int index) throws Exception { File file = temp.newFile(String.valueOf(index) + ".parquet"); if (!file.delete()) { throw new RuntimeException("Could not delete file: " + file); } RecordWriter writer = parquetOutputFormat.getRecordWriter( conf, new Path(file.toString()), CompressionCodecName.UNCOMPRESSED); return writer; }
Source:
public static String description(int[] hashes) { assert(hashes != null); assert(hashes.length >= 3); StringBuilder sb = new StringBuilder(); sb.append("Full Hash ").append(hashes[0]); sb.append(", Catalog Version ").append(hashes[1]); sb.append(", Statement Count ").append(hashes[2]); int includedStmts = Math.min(hashes[2], MAX_STATEMENTS_WITH_DETAIL); for (int i = 0; i < includedStmts; ++i) { sb.append("\n Ran Statement ").append(hashes[i * 2 + HEADER_OFFSET]); sb.append(" with Parameters ").append(hashes[i * 2 + HEADER_OFFSET + 1]); } if (hashes[2] > MAX_STATEMENTS_WITH_DETAIL) { sb.append("\n Additional SQL statements truncated"); } return sb.toString(); }

Target:
public static String description(int[] hashes) { assert(hashes != null); assert(hashes.length >= 3); StringBuilder sb = new StringBuilder(); sb.append("Full Hash ").append(hashes[0]); sb.append(", Catalog Version ").append(hashes[1]); sb.append(", Statement Count ").append(hashes[2] / 2); int includedHashes = Math.min(hashes[2], MAX_HASHES_COUNT); for (int i = HEADER_OFFSET; i < HEADER_OFFSET + includedHashes; i += 2) { sb.append("\n Ran Statement ").append(hashes[i]); sb.append(" with Parameters ").append(hashes[i + 1]); } if (hashes[2] > MAX_HASHES_COUNT) { sb.append("\n Additional SQL statements truncated"); } return sb.toString(); }
Source:
if (PlatformDependent.javaVersion() >= 11) { Object maybeException = AccessController.doPrivileged(new PrivilegedAction<Object>() { @Override public Object run() { try { return Deflater.class.getDeclaredMethod("setInput", ByteBuffer.class); } catch (NoSuchMethodException e) { return e; } catch (SecurityException e) { return e; } } }); if (maybeException instanceof Method) { logger.debug("Deflater.setInput(ByteBuffer): available"); deflaterSetInput = (Method) maybeException; } else { logger.debug("Deflater.setInput(ByteBuffer): unavailable"); } maybeException = AccessController.doPrivileged(new PrivilegedAction<Object>() { @Override public Object run() { try { return Deflater.class.getDeclaredMethod("deflate", ByteBuffer.class, int.class); } catch (NoSuchMethodException e) { return e; } catch (SecurityException e) { return e; } } }); if (maybeException instanceof Method) { logger.debug("Deflater.deflate(ByteBuffer, int): available"); deflaterDeflate = (Method) maybeException; } else { logger.debug("Deflater.deflate(ByteBuffer, int): unavailable"); } maybeException = AccessController.doPrivileged(new PrivilegedAction<Object>() { @Override public Object run() { try { return CRC32.class.getDeclaredMethod("update", ByteBuffer.class); } catch (NoSuchMethodException e) { return e; } catch (SecurityException e) { return e; } } }); if (maybeException instanceof Method) { logger.debug("CRC32.update(ByteBuffer): available"); crc32Update = (Method) maybeException; } else { logger.debug("CRC32.update(ByteBuffer): unavailable"); } }

Target:
if (PlatformDependent.javaVersion() >= 11) { Object maybeException = AccessController.doPrivileged(new PrivilegedAction<Object>() { @Override public Object run() { try { return Deflater.class.getDeclaredMethod("setInput", ByteBuffer.class); } catch (NoSuchMethodException e) { return e; } catch (SecurityException e) { return e; } } }); if (maybeException instanceof Method) { logger.debug("Deflater.setInput(ByteBuffer): available"); deflaterSetInput = (Method) maybeException; } else { logger.debug("Deflater.setInput(ByteBuffer): unavailable", maybeException); } maybeException = AccessController.doPrivileged(new PrivilegedAction<Object>() { @Override public Object run() { try { return Deflater.class.getDeclaredMethod("deflate", ByteBuffer.class, int.class); } catch (NoSuchMethodException e) { return e; } catch (SecurityException e) { return e; } } }); if (maybeException instanceof Method) { logger.debug("Deflater.deflate(ByteBuffer, int): available"); deflaterDeflate = (Method) maybeException; } else { logger.debug("Deflater.deflate(ByteBuffer, int): unavailable", maybeException); } }
Source:
public void testGetChildrenFromEmptyDB() { spanService.getChildren(null, "id"); }

Target:
public void testGetChildrenFromEmptyDB() throws StoreException, InterruptedException { List<Span> spans = spanService.getChildren(null, "id"); Assert.assertTrue(spans.isEmpty()); }
Source:
private void initializeSSLContext(SSLChannelMode preferredChannelMode) throws NoSuchAlgorithmException, KeyManagementException { switch (preferredChannelMode) { case Default: if (!openSSLProviderRegistered) { OpenSSLProvider.register(); openSSLProviderRegistered = true; } try { java.util.logging.Logger logger = java.util.logging.Logger.getLogger( SSL.class.getName()); logger.setLevel(Level.WARNING); ctx = SSLContext.getInstance("openssl.TLS"); ctx.init(null, null, null); logger.setLevel(Level.INFO); channelMode = SSLChannelMode.OpenSSL; } catch (NoSuchAlgorithmException e) { LOG.warn("Failed to load OpenSSL. Falling back to the JSSE default."); ctx = SSLContext.getDefault(); channelMode = SSLChannelMode.Default_JSSE; } break; case OpenSSL: if (!openSSLProviderRegistered) { OpenSSLProvider.register(); openSSLProviderRegistered = true; } ctx = SSLContext.getInstance("openssl.TLS"); ctx.init(null, null, null); channelMode = SSLChannelMode.OpenSSL; break; case Default_JSSE: ctx = SSLContext.getDefault(); channelMode = SSLChannelMode.Default_JSSE; break; case Default_JSSE_with_GCM: ctx = SSLContext.getDefault(); channelMode = SSLChannelMode.Default_JSSE_with_GCM; break; default: throw new AssertionError("Unknown channel mode: " + preferredChannelMode); } }

Target:
private void initializeSSLContext(SSLChannelMode preferredChannelMode) throws NoSuchAlgorithmException, KeyManagementException { switch (preferredChannelMode) { case Default: if (!openSSLProviderRegistered) { OpenSSLProvider.register(); openSSLProviderRegistered = true; } try { java.util.logging.Logger logger = java.util.logging.Logger.getLogger( SSL.class.getName()); logger.setLevel(Level.WARNING); ctx = SSLContext.getInstance("openssl.TLS"); ctx.init(null, null, null); logger.setLevel(Level.INFO); channelMode = SSLChannelMode.OpenSSL; } catch (NoSuchAlgorithmException e) { LOG.debug("Failed to load OpenSSL. Falling back to the JSSE default."); ctx = SSLContext.getDefault(); channelMode = SSLChannelMode.Default_JSSE; } break; case OpenSSL: if (!openSSLProviderRegistered) { OpenSSLProvider.register(); openSSLProviderRegistered = true; } ctx = SSLContext.getInstance("openssl.TLS"); ctx.init(null, null, null); channelMode = SSLChannelMode.OpenSSL; break; case Default_JSSE: ctx = SSLContext.getDefault(); channelMode = SSLChannelMode.Default_JSSE; break; case Default_JSSE_with_GCM: ctx = SSLContext.getDefault(); channelMode = SSLChannelMode.Default_JSSE_with_GCM; break; default: throw new NoSuchAlgorithmException("Unknown channel mode: " + preferredChannelMode); } }
Source:
private void startMachine(String name, DockerContainerConfig containerConfig) throws InfrastructureException, InterruptedException { InternalMachineConfig machineCfg = getContext().getMachineConfigs().get(name); DockerMachine machine = containerStarter.startContainer(getContext().getDockerEnvironment().getNetwork(), name, containerConfig, getContext().getIdentity(), getContext().getDevMachineName().equals(name), new AbnormalMachineStopHandlerImpl()); try { checkInterruption(); startSynchronizer.addMachine(name, machine); } catch (InfrastructureException e) { destroyMachineQuietly(name, machine); throw e; } if (!machineCfg.getInstallers().isEmpty()) { bootstrapperFactory.create(name, getContext().getIdentity(), machineCfg.getInstallers(), machine) .bootstrap(); } checkInterruption(); ServersReadinessChecker readinessChecker = new ServersReadinessChecker(name, machine.getServers(), serverCheckerFactory); readinessChecker.startAsync(new ServerReadinessHandler(name)); readinessChecker.await(); }

Target:
private void startMachine(String name, DockerContainerConfig containerConfig) throws InfrastructureException, InterruptedException { InternalMachineConfig machineCfg = getContext().getMachineConfigs().get(name); DockerMachine machine = containerStarter.startContainer(getContext().getDockerEnvironment().getNetwork(), name, containerConfig, getContext().getIdentity(), getContext().getDevMachineName().equals(name), new AbnormalMachineStopHandlerImpl()); try { startSynchronizer.addMachine(name, machine); } catch (InfrastructureException e) { destroyMachineQuietly(name, machine); throw e; } if (!machineCfg.getInstallers().isEmpty()) { bootstrapperFactory.create(name, getContext().getIdentity(), machineCfg.getInstallers(), machine) .bootstrap(); } checkInterruption(); ServersReadinessChecker readinessChecker = new ServersReadinessChecker(name, machine.getServers(), serverCheckerFactory); readinessChecker.startAsync(new ServerReadinessHandler(name)); readinessChecker.await(); }
Source:
protected ConnectionFactory getConnectionFactory() { logger.debug("connectionFactoryBuilder connectionFactoryClass properties {}", "" + connectionFactoryBuilder, connectionFactoryClass, connectionFactoryProperties); ConnectionFactory cf; try { if (connectionFactoryBuilder != null) { cf = connectionFactoryBuilder.buildConnectionFactory(); } else if (connectionFactoryClass != null) { @SuppressWarnings("unchecked") Class<ConnectionFactory> clazz = (Class<ConnectionFactory>)Class.forName(connectionFactoryClass); cf = clazz.newInstance(); } else { cf = new org.apache.activemq.ActiveMQConnectionFactory(); } BeanUtils.populate(cf, connectionFactoryProperties); logger.debug("creation successful."); return cf; } catch (Exception e) { throw new RuntimeException("Failed to create connection factory.", e); } }

Target:
protected ConnectionFactory getConnectionFactory() { logger.debug("connectionFactoryBuilder {}", "" + connectionFactoryBuilder); return connectionFactoryBuilder.buildConnectionFactory(); }
Source:
public Response findTechnologiesByFilter(TechnologyFilter techFilter, User user) throws InternalServerErrorException, NotFoundException, BadRequestException { validateUser(user); if (techFilter.getRecommendationIs() != null && techFilter.getRecommendationIs().equals(RecommendationEnums.UNINFORMED.message())) { techFilter.setRecommendationIs(""); } List<Technology> completeList = technologyDAO.findAllActives(); completeList = filterByLastActivityDate(techFilter, completeList); List<Technology> filteredList = new ArrayList<>(); if ((techFilter.getTitleContains() == null || techFilter.getTitleContains().isEmpty()) && (techFilter.getRecommendationIs() == null || techFilter.getRecommendationIs().isEmpty())) { filteredList.addAll(completeList); } else { verifyFilters(techFilter, completeList, filteredList); } if (filteredList.isEmpty()) { return new TechnologiesResponse(); } else { if (techFilter.getOrderOptionIs() != null && !techFilter.getOrderOptionIs().isEmpty()) { filteredList = sortTechnologies(filteredList, TechnologyOrderOptionEnum.fromString(techFilter.getOrderOptionIs())); } else { sortTechnologiesDefault(filteredList); } TechnologiesResponse response = new TechnologiesResponse(); response.setTechnologies(filteredList); return response; } }

Target:
public Response findTechnologiesByFilter(TechnologyFilter techFilter, User user) throws InternalServerErrorException, NotFoundException, BadRequestException { validateUser(user); if (techFilter.getRecommendationIs() != null && techFilter.getRecommendationIs().equals(RecommendationEnums.UNINFORMED.message())) { techFilter.setRecommendationIs(""); } List<Technology> completeList = technologyDAO.findAllActives(); completeList = filterByLastActivityDate(techFilter, completeList); List<Technology> filteredList = new ArrayList<>(); if (StringUtils.isBlank(techFilter.getTitleContains()) && StringUtils.isBlank(techFilter.getRecommendationIs())) { filteredList.addAll(completeList); } else { verifyFilters(techFilter, completeList, filteredList); } if (filteredList.isEmpty()) { return new TechnologiesResponse(); } else { if (techFilter.getOrderOptionIs() != null && !techFilter.getOrderOptionIs().isEmpty()) { filteredList = Technology.sortTechnologies(filteredList, TechnologyOrderOptionEnum.fromString(techFilter.getOrderOptionIs())); } else { Technology.sortTechnologiesDefault(filteredList); } TechnologiesResponse response = new TechnologiesResponse(); response.setTechnologies(filteredList); return response; } }