auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void start() { communicationFSMConsumer.submit(this::consume); router.connect(); }

Target:
public void start() { log.info("Start Log Replication Runtime to remote {}", remoteClusterId); communicationFSMConsumer.submit(this::consume); router.connect(); }
Source:
public static long calculateMaxMemoryFromPercent( int percent ) { if ( percent < 1 ) { throw new IllegalArgumentException( "Expected percentage to be > 0, was " + percent ); } if ( percent > 100 ) { throw new IllegalArgumentException( "Expected percentage to be < 100, was " + percent ); } long freePhysicalMemory = OsBeanUtil.getFreePhysicalMemory(); if ( freePhysicalMemory == OsBeanUtil.VALUE_UNAVAILABLE ) { throw new UnsupportedOperationException( "Unable to detect amount of free memory, so max memory has to be explicitly set" ); } double factor = percent / 100D; return round( (freePhysicalMemory - Runtime.getRuntime().maxMemory()) * factor ); }

Target:
static long calculateMaxMemoryFromPercent( int percent ) { if ( percent < 1 ) { throw new IllegalArgumentException( "Expected percentage to be > 0, was " + percent ); } if ( percent > 100 ) { throw new IllegalArgumentException( "Expected percentage to be < 100, was " + percent ); } long freePhysicalMemory = OsBeanUtil.getFreePhysicalMemory(); if ( freePhysicalMemory == OsBeanUtil.VALUE_UNAVAILABLE ) { throw new UnsupportedOperationException( "Unable to detect amount of free memory, so max memory has to be explicitly set" ); } double factor = percent / 100D; return round( (freePhysicalMemory - Runtime.getRuntime().maxMemory()) * factor ); }
Source:
private FilterValidation isFiltered(MessageContent message, List<MessageFilterSpecification> filterSpecifications) { final List<MessageFilter> filters = filterSpecifications.stream() .map(messageFilters::compile) .collect(toList()); final FilterResult result = new FilterChain(filters).apply(message); if(result.getCause().isPresent()) { throw new InvalidFilterTypeException("Filters don't match topic's content type"); } return new FilterValidation(result.isFiltered()); }

Target:
private FilterValidation isFiltered(MessageContent message, List<MessageFilterSpecification> filterSpecifications) { List<MessageFilter> filters; try { filters = filterSpecifications.stream() .map(messageFilters::compile) .collect(toList()); } catch (NoSuchFilterException ex) { throw new FilterValidationException(ex.getMessage(), ex); } FilterResult result = new FilterChain(filters).apply(message); if (result.getCause().isPresent()) { Exception exception = result.getCause().get(); throw new FilterValidationException(exception.getMessage(), exception); } return new FilterValidation(result.isFiltered()); }
Source:
private void reportError(BuildStep bs, Throwable e, BuildListener listener, boolean phase) { String msg = "Publisher " + bs.getClass().getName() + " aborted due to exception"; if (!(e instanceof AbortException)){ e.printStackTrace(listener.error(msg)); } LOGGER.log(WARNING, msg, e); if (phase) { setResult(Result.FAILURE); } }

Target:
private void reportError(BuildStep bs, Throwable e, BuildListener listener, boolean phase) { final String publisher = ((Publisher) bs).getDescriptor().getDisplayName(); if (e instanceof AbortException) { LOGGER.log(Level.FINE, "{0} : {1} failed", new Object[] {AbstractBuild.this, publisher}); listener.error("Publisher '" + publisher + "' failed: " + e.getMessage()); } else { String msg = "Publisher '" + publisher + "' aborted due to exception: "; e.printStackTrace(listener.error(msg)); LOGGER.log(WARNING, msg, e); } if (phase) { setResult(Result.FAILURE); } }
Source:
public Filter adapt(FilterAdapterContext context, BigtableFilter filter) throws IOException { return FILTERS.fromProto(filter.getRowFilter()); }

Target:
public Filter adapt(FilterAdapterContext context, BigtableFilter filter) throws IOException { return filter.getFilter(); }
Source:
private String getUsernameForUserId(int id) { if (id > 0) { String username = userIdentityStore.getPortalUserName(id); if (username != null) { return username; } logger.warn("Invalid userID found when exporting a portlet; return system username instead"); } return systemUsername; }

Target:
private String getUsernameForUserId(int id) { if (id > 0) { String username = userIdentityStore.getPortalUserName(id); if (username != null) { return username; } logger.warn("Invalid userID found when exporting a portlet; return system username instead", id); } return systemUsername; }
Source:
public WebElement getForm() { return getDriver().findElement(By.id("export-form")); }

Target:
public WebElement getForm() { return getDriver().findElement(By.id(FORM_ID)); }
Source:
private void setGutenbergEnabledIfNeeded() { boolean newSitePopupNeeded = AppPrefs.shouldShowGutenbergInfoPopup(mSite.getUrl()); if ((TextUtils.isEmpty(mSite.getMobileEditor()) && !mIsNewPost) || newSitePopupNeeded) { SiteUtils.enableBlockEditor(mDispatcher, mSite); Map<String, Object> properties = new HashMap<>(); if (!newSitePopupNeeded) { properties.put("source", BlockEditorEnabledSource.ON_BLOCK_POST_OPENING.name()); AnalyticsUtils.trackWithSiteDetails(Stat.EDITOR_GUTENBERG_ENABLED, mSite, properties); } showGutenbergInformativeDialog(); } }

Target:
private void setGutenbergEnabledIfNeeded() { boolean showPopup = AppPrefs.shouldShowGutenbergInfoPopup(mSite.getUrl()); if (TextUtils.isEmpty(mSite.getMobileEditor()) && !mIsNewPost) { SiteUtils.enableBlockEditor(mDispatcher, mSite); AnalyticsUtils.trackWithSiteDetails(Stat.EDITOR_GUTENBERG_ENABLED, mSite, BlockEditorEnabledSource.ON_BLOCK_POST_OPENING.asPropertyMap()); showPopup = true; } if (showPopup) { showGutenbergInformativeDialog(); } }
Source:
public Result execute(UIExecutionContext context) { AddonId addonId = CoordinateUtils.resolveCoordinate(named.getValue(),Versions.getSpecificationVersionFor(this),resolver); AddonId maxAddonId = addonId; try { Response<AddonId[]> resolveVersions = resolver.resolveVersions(addonId.getName()); for(AddonId id : resolveVersions.get()) { if(id.getVersion().compareTo(maxAddonId.getVersion()) > 0 ) { maxAddonId = id; } } addonManager.install(maxAddonId).perform(); return Results.success("Addon " + maxAddonId.toCoordinates() + " was installed successfully."); } catch (Throwable t) { return Results.fail("Addon " + maxAddonId.toCoordinates() + " could not be installed.", t); } }

Target:
public Result execute(UIExecutionContext context) { AddonId addonId = CoordinateUtils.resolveCoordinate(named.getValue(), Versions.getSpecificationVersionFor(this.getClass()), resolver); AddonId maxAddonId = addonId; try { Response<AddonId[]> resolveVersions = resolver.resolveVersions(addonId.getName()); for (AddonId id : resolveVersions.get()) { if (id.getVersion().compareTo(maxAddonId.getVersion()) > 0) { maxAddonId = id; } } for (AddonRepository r : furnace.getRepositories()) { List<AddonId> listEnabled = r.listEnabled(); for (AddonId id : listEnabled) { if (id.equals(maxAddonId)) { return Results.fail("Addon " + maxAddonId.toCoordinates() + " is already installed with the most updated version."); } } } InstallRequest installRequest = addonManager.install(maxAddonId); UIPrompt prompt = context.getPrompt(); if (prompt.promptBoolean(installRequest.toString() + "\n Do you want to proceed?")) { installRequest.perform(); return Results.success("Addon " + maxAddonId.toCoordinates() + " was installed successfully."); } else { return Results.fail("Addon update aborted."); } } catch (Throwable t) { return Results.fail("Addon " + maxAddonId.toCoordinates() + " could not be installed.", t); } }
Source:
public Response refreshRepo(){ AuthenticationInfo subject = new AuthenticationInfo(SecurityUtils.getPrincipal()); notebookWsServer.broadcastReloadedNoteList(subject, null); return new JsonResponse<>(Status.OK, "", null).build(); }

Target:
public Response refreshRepo(){ AuthenticationInfo subject = new AuthenticationInfo(SecurityUtils.getPrincipal()); LOG.info("Reloading notebook repository for user {}", subject.getUser()); notebookWsServer.broadcastReloadedNoteList(subject, null); return new JsonResponse<>(Status.OK, "", null).build(); }
Source:
public AclClassIdUtils(ConversionService conversionService) { if(conversionService != null) { this.conversionService = conversionService; } else { GenericConversionService genericConversionService = new GenericConversionService(); genericConversionService.addConverter(String.class, Long.class, new StringToLongConverter()); genericConversionService.addConverter(String.class, UUID.class, new StringToUUIDConverter()); this.conversionService = genericConversionService; } }

Target:
public AclClassIdUtils(ConversionService conversionService) { Assert.notNull(conversionService, "conversionService must not be null"); this.conversionService = conversionService; }
Source:
public OrcZlibDecompressor(OrcDataSourceId orcDataSourceId, int maxBufferSize) { this.orcDataSourceId = orcDataSourceId; this.maxBufferSize = maxBufferSize; }

Target:
public OrcZlibDecompressor(OrcDataSourceId orcDataSourceId, int maxBufferSize) { this.orcDataSourceId = requireNonNull(orcDataSourceId, "orcDataSourceId is null"); this.maxBufferSize = maxBufferSize; }
Source:
public Class<? extends AtomicKeySetImpl> getJavaClass() { return AtomicKeySetImpl.class; }

Target:
public Class<AtomicKeySetImpl> getJavaClass() { return AtomicKeySetImpl.class; }
Source:
public Future<Response> apply(Request request, Service<Request, Response> service) { System.out.println("Request host:" + request.host().getOrElse(() -> "")); System.out.println("Request params:"); request.getParams().forEach(entry -> System.out.println("\t" + entry.getKey() + " : " + entry.getValue())); return service.apply(request); }

Target:
public Future<Response> apply(Request request, Service<Request, Response> service) { logger.info("Request host:" + request.host().getOrElse(() -> "")); logger.info("Request params:"); request.getParams().forEach(entry -> logger.info("\t" + entry.getKey() + " : " + entry.getValue())); return service.apply(request); }
Source:
public Dialog onCreateDialog(Bundle savedInstanceState) { return new AlertDialog.Builder(getContext(), R.style.PocketPaintAlertDialog) .setIcon(permissionType.getIconResource()) .setMessage(R.string.permission_info_permanent_denial_text) .setPositiveButton("Settings", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { startActivity(new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS, Uri.parse("package:org.catrobat.paintroid"))); new Intent(); } }) .setNegativeButton(android.R.string.cancel, null) .create(); }

Target:
public Dialog onCreateDialog(Bundle savedInstanceState) { return new AlertDialog.Builder(getContext(), R.style.PocketPaintAlertDialog) .setMessage(R.string.permission_info_permanent_denial_text) .setPositiveButton(R.string.dialog_settings, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { startActivity(new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS, Uri.parse("package:" + context))); } }) .setNegativeButton(android.R.string.cancel, null) .create(); }
Source:
public String getContentType() { return "text/json"; }

Target:
public String getContentType() { return "text/gson"; }
Source:
public void updateIndex(Context context, boolean force, int type) { try { switch (type) { case Constants.ITEM: Iterator<Item> items = itemService.findAllUnfiltered(context); for (Item item : ImmutableList.copyOf(items)) { indexContent(context, item, force); } for (WorkspaceItem wsi : workspaceItemService.findAll(context)) { indexContent(context, wsi.getItem(), force); } for (WorkflowItem wfi : workflowItemService.findAll(context)) { indexContent(context, wfi.getItem(), force); } break; case Constants.COLLECTION: List<Collection> collections = collectionService.findAll(context); for (Collection collection : collections) { indexContent(context, collection, force); } break; case Constants.COMMUNITY: List<Community> communities = communityService.findAll(context); for (Community community : communities) { indexContent(context, community, force); } break; default: throw new IllegalArgumentException("No type known: " + type); } if (getSolr() != null) { getSolr().commit(); } } catch (Exception e) { log.error(e.getMessage(), e); } }

Target:
public void updateIndex(Context context, boolean force, int type) { try { switch (type) { case Constants.ITEM: Iterator<Item> items = itemService.findAllUnfiltered(context); for (Item item : ImmutableList.copyOf(items)) { indexContent(context, item, force); context.uncacheEntity(item); } for (WorkspaceItem wsi : workspaceItemService.findAll(context)) { indexContent(context, wsi.getItem(), force); context.uncacheEntity(wsi); } for (WorkflowItem wfi : workflowItemService.findAll(context)) { indexContent(context, wfi.getItem(), force); context.uncacheEntity(wfi); } break; case Constants.COLLECTION: List<Collection> collections = collectionService.findAll(context); for (Collection collection : collections) { indexContent(context, collection, force); } break; case Constants.COMMUNITY: List<Community> communities = communityService.findAll(context); for (Community community : communities) { indexContent(context, community, force); } break; default: throw new IllegalArgumentException("No type known: " + type); } if (getSolr() != null) { getSolr().commit(); } } catch (Exception e) { log.error(e.getMessage(), e); } }
Source:
private void saveUserIdFromAuthenticationResult(final AuthenticationResult authResult, final String authority) { mSharedPreference = getSharedPreferences(SHARED_PREFERENCE_STORE_USER_UNIQUEID, MODE_PRIVATE); if (null != authResult) { final SharedPreferences.Editor prefEditor = mSharedPreference.edit(); if (null != authResult.getAuthority()) { prefEditor.putString((authResult.getUserInfo().getDisplayableId().trim() + ":" + authority.trim() + ":authority").toLowerCase(), authResult.getAuthority().trim().toLowerCase()); } if (null != authResult.getUserInfo() && null != authResult.getUserInfo().getUserId()) { prefEditor.putString((authResult.getUserInfo().getDisplayableId().trim() + ":" + authority.trim() + ":userId").toLowerCase(), authResult.getUserInfo().getUserId().trim().toLowerCase()); } prefEditor.apply(); } }

Target:
private void saveUserIdFromAuthenticationResult(final AuthenticationResult authResult, final String authority) { mSharedPreference = getSharedPreferences(SHARED_PREFERENCE_STORE_USER_UNIQUEID, MODE_PRIVATE); if (null != authResult) { final SharedPreferences.Editor prefEditor = mSharedPreference.edit(); if (null != authResult.getAuthority()) { prefEditor.putString((authResult.getUserInfo().getDisplayableId().trim() + ":" + authority.trim() + ":authority").toLowerCase(), authResult.getAuthority().trim().toLowerCase()); } else { Logger.w(TAG, "The authority of " + "authentication result should not be null."); final Toast toast = Toast.makeText(mApplicationContext, "Warning: the result authority is null," + "Silent auth for Sovereign account will fail. ", Toast.LENGTH_SHORT); toast.show(); } if (null != authResult.getUserInfo() && null != authResult.getUserInfo().getUserId()) { prefEditor.putString((authResult.getUserInfo().getDisplayableId().trim() + ":" + authority.trim() + ":userId").toLowerCase(), authResult.getUserInfo().getUserId().trim().toLowerCase()); } else { Logger.w(TAG, "The userInfo of " + "authentication result should not be null."); final Toast toast = Toast.makeText(mApplicationContext, "Warning: the result userInfo is null. " + "Silent auth without userID will fail. ", Toast.LENGTH_SHORT); toast.show(); } prefEditor.apply(); } }
Source:
public void update(Observable o, Object arg) { log.warn("The Driver Station has been disconnected for greater than " + timeOut.get() + " Second(s)"); previousDisconnectionTimestamp = lastPacketReceivedTimestamp; }

Target:
public void update(Observable o, Object arg) { log.warn("Connection with Driver Station restored. " + "The Robot was disconnected from the driver station for at least " + timeOut.get() + " second(s)."); previousDisconnectionTimestamp = lastPacketReceivedTimestamp; }
Source:
public String processSubmit(@ModelAttribute("serviceRecord") SequencerServiceRecord record, ModelMap model, SessionStatus session) throws IOException { try { requestManager.saveSequencerServiceRecord(record); session.setComplete(); model.clear(); return "redirect:/miso/stats/sequencer/servicerecord/" + record.getId(); } catch (IOException ex) { log.debug("Failed to save Sequencer Service Record", ex); throw ex; } }

Target:
public String processSubmit(@ModelAttribute("serviceRecord") SequencerServiceRecord record, ModelMap model, SessionStatus session) throws IOException { requestManager.saveSequencerServiceRecord(record); session.setComplete(); model.clear(); return "redirect:/miso/stats/sequencer/servicerecord/" + record.getId(); }
Source:
public GetRecordsCache createRecordsFetcher(GetRecordsRetrievalStrategy getRecordsRetrievalStrategy, String shardId, IMetricsFactory metricsFactory) { if(dataFetchingStrategy.equals(DataFetchingStrategy.DEFAULT)) { return new BlockingGetRecordsCache(maxRecords, getRecordsRetrievalStrategy, idleMillisBetweenCalls); } else { return new PrefetchGetRecordsCache(maxPendingProcessRecordsInput, maxByteSize, maxRecordsCount, maxRecords, getRecordsRetrievalStrategy, Executors.newFixedThreadPool(1, new ThreadFactoryBuilder() .setDaemon(true) .setNameFormat("prefetch-cache-" + shardId + "-%04d") .build()), idleMillisBetweenCalls, metricsFactory, "processTask"); } }

Target:
public GetRecordsCache createRecordsFetcher(GetRecordsRetrievalStrategy getRecordsRetrievalStrategy, String shardId, IMetricsFactory metricsFactory) { if(dataFetchingStrategy.equals(DataFetchingStrategy.DEFAULT)) { return new BlockingGetRecordsCache(maxRecords, getRecordsRetrievalStrategy, idleMillisBetweenCalls); } else { return new PrefetchGetRecordsCache(maxPendingProcessRecordsInput, maxByteSize, maxRecordsCount, maxRecords, getRecordsRetrievalStrategy, Executors.newFixedThreadPool(1, new ThreadFactoryBuilder() .setDaemon(true) .setNameFormat("prefetch-cache-" + shardId + "-%04d") .build()), idleMillisBetweenCalls, metricsFactory, "ProcessTask"); } }
Source:
protected void addAuthenticationToGSon(JsonWriter out, RepositoryLocation location) { try { if (Boolean.parseBoolean(location.getProperty(IBugzillaRestConstants.REPOSITORY_USE_API_KEY))) { out.name("Bugzilla_api_key").value(location.getProperty(IBugzillaRestConstants.REPOSITORY_API_KEY)); } else { UserCredentials credentials = getClient().getLocation().getCredentials(AuthenticationType.REPOSITORY); if (credentials == null) { throw new IllegalStateException("Authentication requested without valid credentials"); } out.name("Bugzilla_login").value(credentials.getUserName()); out.name("Bugzilla_password").value(credentials.getPassword()); } } catch (IOException e) { throw new IllegalStateException("Authentication requested with IOException", e); } }

Target:
protected void addAuthenticationToGSon(JsonWriter out, RepositoryLocation location) { try { if (location.getBooleanPropery(IBugzillaRestConstants.REPOSITORY_USE_API_KEY)) { out.name("Bugzilla_api_key").value(location.getProperty(IBugzillaRestConstants.REPOSITORY_API_KEY)); } else { UserCredentials credentials = getClient().getLocation().getCredentials(AuthenticationType.REPOSITORY); if (credentials == null) { throw new IllegalStateException("Authentication requested without valid credentials"); } out.name("Bugzilla_login").value(credentials.getUserName()); out.name("Bugzilla_password").value(credentials.getPassword()); } } catch (IOException e) { throw new IllegalStateException("Authentication requested with IOException", e); } }
Source:
public FuzzyCMeansModel cluster(SparseDistributedMatrix points, int k) throws MathIllegalArgumentException, ConvergenceException { GridArgumentCheck.notNull(points, "points"); if (k < 2) { throw new MathIllegalArgumentException("The number of clusters is less than 2"); } Vector[] centers = initializeCenters(points, k); MembershipsAndSums membershipsAndSums = null; int iteration = 0; boolean finished = false; while (!finished && iteration < cMeansMaxIterations) { MembershipsAndSums newMembershipsAndSums = calculateMembership(points, centers); Vector[] newCenters = calculateNewCenters(points, newMembershipsAndSums, k); if (stopCondition == StopCondition.STABLE_CENTERS) { finished = isFinished(centers, newCenters); } else { finished = isFinished(membershipsAndSums, newMembershipsAndSums); } centers = newCenters; membershipsAndSums = newMembershipsAndSums; iteration++; } if (iteration == cMeansMaxIterations) { throw new ConvergenceException("Fuzzy C-Means algorithm has not converged after " + Integer.toString(iteration) + " iterations"); } return new FuzzyCMeansModel(centers, measure); }

Target:
@Override public FuzzyCMeansModel cluster(SparseDistributedMatrix points, int k) throws MathIllegalArgumentException, ConvergenceException { GridArgumentCheck.notNull(points, "points"); if (k < 2) throw new MathIllegalArgumentException("The number of clusters is less than 2"); Vector[] centers = initializeCenters(points, k); MembershipsAndSums membershipsAndSums = null; int iteration = 0; boolean finished = false; while (!finished && iteration < cMeansMaxIterations) { MembershipsAndSums newMembershipsAndSums = calculateMembership(points, centers); Vector[] newCenters = calculateNewCenters(points, newMembershipsAndSums, k); if (stopCond == StopCondition.STABLE_CENTERS) finished = isFinished(centers, newCenters); else finished = isFinished(membershipsAndSums, newMembershipsAndSums); centers = newCenters; membershipsAndSums = newMembershipsAndSums; iteration++; } if (iteration == cMeansMaxIterations) throw new ConvergenceException("Fuzzy C-Means algorithm has not converged after " + Integer.toString(iteration) + " iterations"); return new FuzzyCMeansModel(centers, measure); }
Source:
public Map<String, Object> listMyReports() { final Map<String, Object> response = new HashMap<String, Object>(); List<ReportDto> results = new ArrayList<ReportDto>(); List<Report> reports = reportDao.listAllByCurrentUser(); if (reports != null) { for (Report r : reports) { ReportDto dto = new ReportDto(); DtoMarshaller.copyToDto(r, dto); results.add(dto); } } response.put("reports", results); return response; }

Target:
public Map<String, Object> listMyReports() { final Map<String, Object> response = new HashMap<String, Object>(); List<ReportDto> results = new ArrayList<ReportDto>(); List<Report> reports = reportDao.listAllByCurrentUser(); if (reports != null) { for (Report r : reports) { ReportDto dto = new ReportDto(); BeanUtils.copyProperties(r, dto); dto.setKeyId(r.getKey().getId()); results.add(dto); } } response.put("reports", results); return response; }
Source:
public void validateInvalidDestinationDomain() { StorageDomain srcStorageDomain = initStorageDomain(srcStorageId); srcStorageDomain.setStatus(StorageDomainStatus.Active); StorageDomain dstStorageDomain = initStorageDomain(dstStorageId); dstStorageDomain.setStorageDomainType(StorageDomainType.ISO); initDiskImage(diskImageGroupId, diskImageId); initVm(VMStatus.Up, Guid.newGuid(), diskImageGroupId); ValidateTestUtils.runAndAssertValidateFailure(command, EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL); }

Target:
public void validateInvalidDestinationDomain() { StorageDomain srcStorageDomain = initStorageDomain(srcStorageId); StorageDomain dstStorageDomain = initStorageDomain(dstStorageId); dstStorageDomain.setStorageDomainType(StorageDomainType.ISO); initDiskImage(diskImageGroupId, diskImageId); initVm(VMStatus.Up, Guid.newGuid(), diskImageGroupId); ValidateTestUtils.runAndAssertValidateFailure(command, EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL); }
Source:
public ListObjectStream(List<T> items) { this.items = items; this.i = 0; }

Target:
ListObjectStream(List<T> items) { this.items = items; this.i = 0; }
Source:
private Protos.ExecutorInfo.Builder newExecutorInfo(Configuration configuration) { return Protos.ExecutorInfo.newBuilder() .setExecutorId(Protos.ExecutorID.newBuilder().setValue(UUID.randomUUID().toString())) .setFrameworkId(configuration.getFrameworkId()) .setName("elasticsearch-executor-" + UUID.randomUUID().toString()) .setCommand(newCommandInfo(configuration)) .setContainer(Protos.ContainerInfo.newBuilder() .setType(Protos.ContainerInfo.Type.DOCKER) .setDocker(Protos.ContainerInfo.DockerInfo.newBuilder().setImage("mesos/elasticsearch-executor")) .addVolumes(Protos.Volume.newBuilder().setContainerPath("/data").setHostPath("/var/lib/elasticsearch").setMode(Protos.Volume.Mode.RW).build()) .build()); }

Target:
private Protos.ExecutorInfo.Builder newExecutorInfo(Configuration configuration) { return Protos.ExecutorInfo.newBuilder() .setExecutorId(Protos.ExecutorID.newBuilder().setValue(UUID.randomUUID().toString())) .setFrameworkId(configuration.getFrameworkId()) .setName("elasticsearch-executor-" + UUID.randomUUID().toString()) .setCommand(newCommandInfo(configuration)) .setContainer(Protos.ContainerInfo.newBuilder() .setType(Protos.ContainerInfo.Type.DOCKER) .setDocker(Protos.ContainerInfo.DockerInfo.newBuilder().setImage(configuration.getEexecutorImage()).setForcePullImage(configuration.getExecutorForcePullImage())) .addVolumes(Protos.Volume.newBuilder().setHostPath(SETTINGS_PATH_VOLUME).setContainerPath(SETTINGS_PATH_VOLUME).setMode(Protos.Volume.Mode.RO)) .addVolumes(Protos.Volume.newBuilder().setContainerPath(SETTINGS_DATA_VOLUME_CONTAINER).setHostPath(SETTINGS_DATA_VOLUME_HOST).setMode(Protos.Volume.Mode.RW).build()) .build()); }
Source:
TypeScriptGenerator(Options opts) throws FileNotFoundException { this.opts = opts; this.compiler = new Compiler(); compiler.disableThreads(); this.errorManager = new GentsErrorManager(System.err, ErrorFormat.MULTILINE.toFormatter(compiler, true), opts.debug); compiler.setErrorManager(errorManager); this.pathUtil = new PathUtil(opts.root); this.nameUtil = new NameUtil(compiler); if (opts.externsMapFile != null) { Type mapType = new TypeToken<Map<String, String>>(){}.getType(); JsonReader reader = new JsonReader(new FileReader(opts.externsMapFile)); externsMap = new Gson().fromJson(reader, mapType); } else { externsMap = ImmutableMap.of(); } }

Target:
TypeScriptGenerator(Options opts) { this.opts = opts; this.compiler = new Compiler(); compiler.disableThreads(); this.errorManager = new GentsErrorManager(System.err, ErrorFormat.MULTILINE.toFormatter(compiler, true), opts.debug); compiler.setErrorManager(errorManager); this.pathUtil = new PathUtil(opts.root); this.nameUtil = new NameUtil(compiler); }
Source:
public static Filter convertToCNFFromQueryContext(Query query, Filter filter) { if (filter == null) { return null; } boolean useCNF = (Boolean) query.getContextValue(CTX_KEY_USE_FILTER_CNF, false); return useCNF ? convertToCNF(filter) : filter; }

Target:
public static Filter convertToCNFFromQueryContext(Query query, Filter filter) { if (filter == null) { return null; } boolean useCNF = query.getContextBoolean(CTX_KEY_USE_FILTER_CNF, false); return useCNF ? convertToCNF(filter) : filter; }
Source:
@Override public void setEnabled(boolean enabled) { label.setEnabled(enabled); if (contentWidget instanceof HasEnabled) { HasEnabled enableableWidget = (HasEnabled) this.contentWidget; enableableWidget.setEnabled(enabled); } }

Target:
public void setEnabled(boolean enabled) { label.setEnabled(enabled); if (contentWidget instanceof HasEnabled) { HasEnabled enableableWidget = (HasEnabled) this.contentWidget; enableableWidget.setEnabled(enabled); } }
Source:
private Flux<FeedResponse<T>> byPage(CosmosPagedFluxOptions pagedFluxOptions, Context context) { final AtomicReference<Context> parentContext = new AtomicReference<>(Context.NONE); return this.optionsFluxFunction.apply(pagedFluxOptions).doOnSubscribe(ignoredValue -> { if (pagedFluxOptions.getTracerProvider().isEnabled()) { reactor.util.context.Context reactorContext = FluxUtil.toReactorContext(context); Objects.requireNonNull(reactorContext.hasKey(TracerProvider.MASTER_CALL)); Optional<Object> callerFunc = reactorContext.getOrEmpty(TracerProvider.NESTED_CALL); if (!callerFunc.isPresent()) { parentContext.set(pagedFluxOptions.getTracerProvider().startSpan(pagedFluxOptions.getTracerSpanName(), context.addData(TracerProvider.ATTRIBUTE_MAP, pagedFluxOptions.getTracingAttributes()), ProcessKind.DATABASE)); } } }).doOnEach(responseSignal -> { if (pagedFluxOptions.getTracerProvider().isEnabled()) { pagedFluxOptions.getTracerProvider().endSpan(parentContext.get(), Signal.complete(), 200); } }).doOnError(throwable -> { if (pagedFluxOptions.getTracerProvider().isEnabled()) { pagedFluxOptions.getTracerProvider().endSpan(parentContext.get(), Signal.error(throwable), 0); } }); }

Target:
private Flux<FeedResponse<T>> byPage(CosmosPagedFluxOptions pagedFluxOptions, Context context) { final AtomicReference<Context> parentContext = new AtomicReference<>(Context.NONE); return this.optionsFluxFunction.apply(pagedFluxOptions).doOnSubscribe(ignoredValue -> { parentContext.set(pagedFluxOptions.getTracerProvider().startSpan(pagedFluxOptions.getTracerSpanName(), pagedFluxOptions.getDatabaseId(), pagedFluxOptions.getServiceEndpoint(), context)); }).doOnComplete(() -> { pagedFluxOptions.getTracerProvider().endSpan(parentContext.get(), Signal.complete(), HttpConstants.StatusCodes.OK); }).doOnError(throwable -> { pagedFluxOptions.getTracerProvider().endSpan(parentContext.get(), Signal.error(throwable), TracerProvider.ERROR_CODE); }); }
Source:
public void testGetReadOnlyWithReadOnlyValuesAndAllowOnlyVisualChangesNotSet() { drgElement.setAllowOnlyVisualChange(false); checkIfItIsNotSet("Name"); checkIfItIsNotSet("AllowedAnswers"); checkIfItIsNotSet("Description"); checkIfItIsNotSet("Question"); checkIfItIsNotSet("DataType"); checkIfItIsNotSet("SourceType"); checkIfItIsNotSet("LocationURI"); }

Target:
public void testGetReadOnlyWithReadOnlyValuesAndAllowOnlyVisualChangesNotSet() { drgElement.setAllowOnlyVisualChange(false); for (final String readonlyField : READONLY_FIELDS) { checkIfItIsNotSet(readonlyField); } }
Source:
public CreateChangeDialog(final FocusWidget enableOnFailure, Project.NameKey project) { super(enableOnFailure, true, "Create Inline Change", "Description"); ProjectApi.getBranches(project, new GerritCallback<JsArray<BranchInfo>>() { @Override public void onSuccess(JsArray<BranchInfo> result) { branches = Natives.asList(result); } }); newChange = new SuggestBox(new HighlightSuggestOracle() { @Override protected void onRequestSuggestions(Request request, Callback done) { LinkedList<BranchSuggestion> suggestions = new LinkedList<>(); for (BranchInfo b : branches) { if (b.ref().contains(request.getQuery())) { suggestions.add(new BranchSuggestion(b)); } } done.onSuggestionsReady(request, new Response(suggestions)); } }); newChange.setWidth("100%"); newChange.getElement().getStyle().setProperty("boxSizing", "border-box"); message.setCharacterWidth(70); FlowPanel mwrap = new FlowPanel(); mwrap.setStyleName(Gerrit.RESOURCES.css().commentedActionMessage()); mwrap.add(newChange); panel.insert(mwrap, 0); panel.insert(new SmallHeading("Select Branch for a new Change"), 0); }

Target:
public CreateChangeDialog(final FocusWidget enableOnFailure, Project.NameKey project) { super(enableOnFailure, true, "Create Inline Change", "Description"); ProjectApi.getBranches(project, new GerritCallback<JsArray<BranchInfo>>() { @Override public void onSuccess(JsArray<BranchInfo> result) { branches = Natives.asList(result); } }); newChange = new SuggestBox(new HighlightSuggestOracle() { @Override protected void onRequestSuggestions(Request request, Callback done) { List<BranchSuggestion> suggestions = new ArrayList<>(); for (BranchInfo b : branches) { if (b.ref().contains(request.getQuery())) { suggestions.add(new BranchSuggestion(b)); } } done.onSuggestionsReady(request, new Response(suggestions)); } }); newChange.setWidth("100%"); newChange.getElement().getStyle().setProperty("boxSizing", "border-box"); message.setCharacterWidth(70); FlowPanel mwrap = new FlowPanel(); mwrap.setStyleName(Gerrit.RESOURCES.css().commentedActionMessage()); mwrap.add(newChange); panel.insert(mwrap, 0); panel.insert(new SmallHeading("Select Branch for a new Change"), 0); }
Source:
private void validate() { if (isValidationRunning() && onBeforeValidate()) { loadingStarts(); sessionCommands.getValidateSessionCommand().execute(new ClientSessionCommand.Callback<Collection<DiagramElementViolation<RuleViolation>>>() { @Override public void onSuccess() { loadingCompleted(); endValidation(); } @Override public void onError(final Collection<DiagramElementViolation<RuleViolation>> violations) { AbstractDiagramEditorMenuSessionItems.this.onError(violations.toString()); endValidation(); } }); } }

Target:
private void validate() { validationAction.validate(); }
Source:
public FilteringXmlStreamWriter(XMLStreamWriter writer, String encoding) { this.writer = writer; this.encoding = encoding != null ? encoding.toUpperCase() : null; }

Target:
public FilteringXmlStreamWriter(XMLStreamWriter writer, String encoding) { this.writer = writer; this.encoding = encoding; }
Source:
public void init(Bundle savedInstanceState) { settings = getSharedPreferences("prefs", 0); firstRun = settings.getBoolean("firstRun", true); if (firstRun) { IntroActivity1 first_fragment = new IntroActivity1(); IntroActivity2 second_fragment = new IntroActivity2(); IntroActivity3 third_fragment = new IntroActivity3(); IntroActivity4 fourth_fragment = new IntroActivity4(); IntroActivity5 fifth_fragment = new IntroActivity5(); IntroActivity6 sixth_fragment = new IntroActivity6(); addSlide(first_fragment); addSlide(second_fragment); addSlide(third_fragment); addSlide(fourth_fragment); addSlide(fifth_fragment); addSlide(sixth_fragment); } else{ loadMainActivity(); } }

Target:
public void init(Bundle savedInstanceState) { sharedPreferences = getSharedPreferences("prefs", 0); isfirstRun = sharedPreferences.getBoolean("firstRun", true); if (isfirstRun) { addSlide(new IntroFragment(1)); addSlide(new IntroFragment(2)); addSlide(new IntroFragment(3)); addSlide(new IntroFragment(4)); addSlide(new IntroFragment(5)); addSlide(new IntroFragment(6)); } else { loadMainActivity(); } }
Source:
ApacheHttpClientBuilder() { this.socketTimeout = DEFAULT_CONNECTION_TIMEOUT; this.connectTimeout = DEFAULT_CONNECTION_TIMEOUT; this.connectionRequestTimeout = DEFAULT_CONNECTION_TIMEOUT; }

Target:
protected ApacheHttpClientBuilder() { this.socketTimeout = DEFAULT_CONNECTION_TIMEOUT; this.connectTimeout = DEFAULT_CONNECTION_TIMEOUT; this.connectionRequestTimeout = DEFAULT_CONNECTION_TIMEOUT; }
Source:
protected Class<?> findClass(String name) throws ClassNotFoundException { if (name.startsWith("org.modelmapper.internal.cglib")) return internalClassSpace.loadClass(name); for (ClassLoader additionalClassLoader : additionalClassLoaders) { try { return additionalClassLoader.loadClass(name); } catch (ClassNotFoundException e) } throw new ClassNotFoundException(); }

Target:
protected Class<?> findClass(String name) throws ClassNotFoundException { if (name.startsWith("org.modelmapper.internal.cglib")) return internalClassSpace.loadClass(name); for (ClassLoader additionalClassLoader : additionalClassLoaders) { try { return additionalClassLoader.loadClass(name); } catch (ClassNotFoundException e) { } } throw new ClassNotFoundException(name); }
Source:
public ChannelOutboundHandlerAdapter createHttpResponseHandler() { return new ChannelOutboundHandlerAdapter() { @Override public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception { HttpResponse response = (HttpResponse) msg; Span span = tracer.currentSpan(); if (span == null) return; tracer.withSpanInScope(span).close(); handler.handleSend(response, null, span); super.write(ctx, msg, promise); } }; }

Target:
public ChannelOutboundHandlerAdapter createHttpResponseHandler() { return new ChannelOutboundHandlerAdapter() { @Override public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception { HttpResponse response = (HttpResponse) msg; Span span = (Span) ctx.channel().attr(AttributeKey.valueOf(Span.class.getName())).get(); Throwable error = null; try (Tracer.SpanInScope ws = (Tracer.SpanInScope) ctx.channel() .attr(AttributeKey.valueOf(Tracer.SpanInScope.class.getName())) .get()) { ws.close(); super.write(ctx, msg, promise); } catch (Exception | Error e) { error = e; throw e; } finally { handler.handleSend(response, error, span); } } }; }
Source:
private Mono<AmqpSendLink> updatePublishingState(String partitionId, AmqpSendLink amqpSendLink) { if (this.isIdempotentPartitionPublishing) { return amqpSendLink.getRemoteProperties().map(properties -> { this.setPartitionPublishingState( partitionId, (Long) properties.get(SymbolConstants.PRODUCER_ID), (Short) properties.get(SymbolConstants.PRODUCER_EPOCH), (Integer) properties.get(SymbolConstants.PRODUCER_SEQUENCE_NUMBER) ); return amqpSendLink; }); } else { return Mono.just(amqpSendLink); } }

Target:
private Mono<AmqpSendLink> updatePublishingState(String partitionId, AmqpSendLink amqpSendLink) { if (isIdempotentPartitionPublishing) { return amqpSendLink.getRemoteProperties().map(properties -> { setPartitionPublishingState( partitionId, (Long) properties.get(ClientConstants.PRODUCER_ID), (Short) properties.get(ClientConstants.PRODUCER_EPOCH), (Integer) properties.get(ClientConstants.PRODUCER_SEQUENCE_NUMBER) ); return amqpSendLink; }); } else { return Mono.just(amqpSendLink); } }
Source:
public APIVersion getAPIVersion() { APIVersion apiVersion = getParameter(API_VERSION_ATTRIBUTE_NAME); return apiVersion != null ? apiVersion : APIVersion.latest(); }

Target:
public APIVersion getAPIVersion() { APIVersion apiVersion = getParameter(API_VERSION_ATTRIBUTE_NAME); return Objects.requireNonNullElseGet(apiVersion, APIVersion::latest); }
Source:
public AmmoStorage(int tonnage, EquipmentType et, int shots, Campaign c) { super(tonnage, et, -1, 1.0, c); this.shots = shots; if (type instanceof AmmoType) { this.munition = ((AmmoType) type).getMunitionType(); } }

Target:
public AmmoStorage(int tonnage, EquipmentType et, int shots, Campaign c) { super(tonnage, et, -1, 1.0, c); this.shots = shots; this.munition = getType().getMunitionType(); }
Source:
static int parseFastForwardLimit(String fastForwardLine) { String text = fastForwardLine.trim().substring(2, fastForwardLine.length() - 2).trim(); try { int limit = Integer.parseInt(text); condition(limit > 0, "fast-forward limit must be greater than zero, it is: " + limit); return limit; } catch (NumberFormatException e) { return Integer.MAX_VALUE; } }

Target:
static int parseFastForwardLimit(String fastForwardLine) { String text = fastForwardLine.trim().substring(2, fastForwardLine.length() - 2).trim(); try { int limit = Integer.parseInt(text); condition(limit > 0, () -> format("fast-forward(%d) limit must be greater than zero", limit)); return limit; } catch (NumberFormatException e) { return Integer.MAX_VALUE; } }
Source:
public String[] getExtensions() { return m_extensions; }

Target:
public List<String> getExtensions() { return CollectionUtility.unmodifiableList(m_extensions); }
Source:
public void testCompareMetrics(final Object value1, final Object value2, final boolean expectedEqual, final String expectedDescription, final Double marcValue) { final CompareMetrics compareMetrics = new CompareMetrics(); CompareMetrics.MetricToAllowableRelativeChange = new HashMap<>(); if (marcValue != null) { CompareMetrics.MetricToAllowableRelativeChange.put("M", marcValue); } final CompareMetrics.SimpleResult result = compareMetrics.compareMetricValues(value1, value2, "M"); Assert.assertEquals(result.equal, expectedEqual); Assert.assertEquals(result.description, expectedDescription); }

Target:
public void testCompareMetrics(final Object value1, final Object value2, final boolean expectedEqual, final String expectedDescription, final Double marcValue) { final CompareMetrics compareMetrics = new CompareMetrics(); CompareMetrics.MetricToAllowableRelativeChange.clear(); compareMetrics.METRIC_ALLOWABLE_RELATIVE_CHANGE = Collections.singletonList("M:" + marcValue); compareMetrics.customCommandLineValidation(); final CompareMetrics.SimpleResult result = compareMetrics.compareMetricValues(value1, value2, "M"); Assert.assertEquals(result.equal, expectedEqual); Assert.assertEquals(result.description, expectedDescription); }
Source:
public GraphQLRequestScope( DataStoreTransaction transaction, User user, ElideSettings elideSettings, GraphQLProjectionInfo projectionInfo ) { super("/", null, transaction, user, new MultivaluedHashMap<>(), elideSettings); this.projectionInfo = projectionInfo; if (projectionInfo.getProjections().size() > 0) { this.setEntityProjection(projectionInfo.getProjections().entrySet().iterator().next().getValue()); } }

Target:
public GraphQLRequestScope( DataStoreTransaction transaction, User user, ElideSettings elideSettings, GraphQLProjectionInfo projectionInfo ) { super("/", null, transaction, user, new MultivaluedHashMap<>(), elideSettings); this.projectionInfo = projectionInfo; this.setEntityProjection(null); }
Source:
public Optional<Map<String, String>> renderManifestMap(Formatter formatter, Submission submission) throws Exception { Map<String, String> renderMap = new HashMap<String, String>(); Context context = new Context(Locale.getDefault()); formatter.populateContext(context, submission); Optional<Map<String, String>> templates = Optional.of(formatter.getTemplates()); Optional<String> dcContent = Optional.empty(); if (templates.isPresent() && templates.get().size() > 0) { for (Map.Entry<String, String> template : templates.get().entrySet()) { dcContent = Optional.of(templateEngine.process(template.getValue(), context)); if (dcContent.isPresent()) { renderMap.put(template.getKey(), dcContent.get()); } } } return Optional.of(renderMap); }

Target:
public Map<String, String> renderManifestMap(Formatter formatter, Submission submission) throws Exception { Map<String, String> renderMap = new HashMap<String, String>(); Context context = new Context(Locale.getDefault()); formatter.populateContext(context, submission); Map<String, String> templates = formatter.getTemplates(); for (Map.Entry<String, String> template : templates.entrySet()) { renderMap.put(template.getKey(), templateEngine.process(template.getValue(), context)); } return renderMap; }
Source:
public AwayColoursManager(final DMDircMBassador eventBus, @GlobalConfig final AggregateConfigProvider config, @PluginDomain(AwayColoursPlugin.class) final String domain, @GlobalConfig final ColourManager colourManager) { this.eventBus = eventBus; this.colourManager = colourManager; binder = new ConfigBinder(config, domain); }

Target:
public AwayColoursManager(final DMDircMBassador eventBus, @GlobalConfig final AggregateConfigProvider config, @PluginDomain(AwayColoursPlugin.class) final String domain, @GlobalConfig final ColourManager colourManager) { this.eventBus = eventBus; this.colourManager = colourManager; binder = config.getBinder().withDefaultDomain(domain); }
Source:
public void registerColumns() { for (XViewerColumn xCol : Arrays.asList(Name, Method_Number, Execution_Number, Namespace, Coverage_Percent, Coverage_Method, Work_Product_Task, Coverage_Rationale, Coverage_Test_Units, Assignees_Col, Notes_Col, Parent_Coverage_Unit, Line_Number, Location, Full_Path)) { XViewerColumn newXCol = xCol.copy(); if (xCol.equals(CoverageXViewerFactory.Coverage_Rationale) || xCol.equals(CoverageXViewerFactory.Method_Number) || xCol.equals(CoverageXViewerFactory.Execution_Number) || xCol.equals(CoverageXViewerFactory.Coverage_Method) || xCol.equals(CoverageXViewerFactory.Coverage_Percent) || xCol.equals(CoverageXViewerFactory.Assignees_Col) || xCol.equals(CoverageXViewerFactory.Notes_Col)) { newXCol.setShow(true); } if (xCol.equals(CoverageXViewerFactory.Work_Product_Task)) { newXCol.setShow(false); } registerColumns(newXCol); } }

Target:
public void registerColumns() { for (XViewerColumn xCol : Arrays.asList(Name, Method_Number, Execution_Number, Namespace, Coverage_Percent, Coverage_Method, Work_Product_Task, Coverage_Rationale, Coverage_Test_Units, Assignees_Col, Notes_Col, Parent_Coverage_Unit, Line_Number, Location, Full_Path, Guid)) { XViewerColumn newXCol = xCol.copy(); if (xCol.equals(CoverageXViewerFactory.Coverage_Rationale) || xCol.equals(CoverageXViewerFactory.Method_Number) || xCol.equals(CoverageXViewerFactory.Execution_Number) || xCol.equals(CoverageXViewerFactory.Coverage_Method) || xCol.equals(CoverageXViewerFactory.Coverage_Percent) || xCol.equals(CoverageXViewerFactory.Assignees_Col) || xCol.equals(CoverageXViewerFactory.Notes_Col)) { newXCol.setShow(true); } if (xCol.equals(CoverageXViewerFactory.Work_Product_Task)) { newXCol.setShow(false); } registerColumns(newXCol); } }
Source:
public ExecutionResult execute(Item item) { final ProcessType processType = getProcessType(item); String[] compNames = { "tCreateTable", "tELTMSSqlMap", "tMSSqlBulkExec", "tMSSqlConnection", "tMSSqlInput", "tMSSqlOutput", "tMSSqlOutputBulkExec", "tMSSqlRow", "tMSSqlSCD", "tMSSqlSP", "tMSSqlCDC"}; IComponentConversion conversion = new IComponentConversion() { @Override public void transform(NodeType node) { if (node == null) { return; } ElementParameterType driverList = ComponentUtilities.getNodeProperty(node, "MSSQL_DRIVER"); if (driverList == null) { ComponentUtilities.addNodeProperty(node, "MSSQL_DRIVER", "CLOSED_LIST"); ComponentUtilities.setNodeValue(node, "MSSQL_DRIVER", "JTDS"); } } }; for (String name : compNames) { IComponentFilter filter = new NameComponentFilter(name); try { ModifyComponentsAction.searchAndModify(item, processType, filter, Arrays.<IComponentConversion> asList(conversion)); } catch (PersistenceException e) { ExceptionHandler.process(e); return ExecutionResult.FAILURE; } } return ExecutionResult.SUCCESS_NO_ALERT; }

Target:
public ExecutionResult execute(Item item) { final ProcessType processType = getProcessType(item); String[] compNames = { "tCreateTable", "tELTMSSqlMap", "tMSSqlBulkExec", "tMSSqlConnection", "tMSSqlInput", "tMSSqlOutput", "tMSSqlOutputBulkExec", "tMSSqlRow", "tMSSqlSCD", "tMSSqlSP", "tMSSqlCDC", "tMSSqlInvalidRows", "tMSSqlValidRows"}; IComponentConversion conversion = new IComponentConversion() { @Override public void transform(NodeType node) { if (node == null) { return; } ElementParameterType driverList = null; if ("tCreateTable".equals(node.getComponentName())) { driverList = ComponentUtilities.getNodeProperty(node, "MSSQL_DRIVER"); } else { driverList = ComponentUtilities.getNodeProperty(node, "DRIVER"); } if (driverList == null) { if ("tCreateTable".equals(node.getComponentName())) { ComponentUtilities.addNodeProperty(node, "MSSQL_DRIVER", "CLOSED_LIST"); ComponentUtilities.setNodeValue(node, "MSSQL_DRIVER", "JTDS"); } else { ComponentUtilities.addNodeProperty(node, "DRIVER", "CLOSED_LIST"); ComponentUtilities.setNodeValue(node, "DRIVER", "JTDS"); } } } }; for (String name : compNames) { IComponentFilter filter = new NameComponentFilter(name); try { ModifyComponentsAction.searchAndModify(item, processType, filter, Arrays.<IComponentConversion> asList(conversion)); } catch (PersistenceException e) { ExceptionHandler.process(e); return ExecutionResult.FAILURE; } } return ExecutionResult.SUCCESS_NO_ALERT; }