auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public JobSpecification( @JsonProperty("commandArgs") @Nullable final List<String> commandArgs, @JsonProperty(value = "job", required = true) final ExecutionResource job, @JsonProperty(value = "cluster", required = true) final ExecutionResource cluster, @JsonProperty(value = "command", required = true) final ExecutionResource command, @JsonProperty("applications") @Nullable final List<ExecutionResource> applications, @JsonProperty("environmentVariables") @Nullable final Map<String, String> environmentVariables, @JsonProperty(value = "interactive", required = true) final boolean interactive, @JsonProperty(value = "jobDirectoryLocation", required = true) final File jobDirectoryLocation, @JsonProperty(value = "archiveLocation") @Nullable final String archiveLocation ) { this.commandArgs = commandArgs == null ? ImmutableList.of() : ImmutableList.copyOf( commandArgs .stream() .filter(StringUtils::isNotBlank) .collect(Collectors.toList()) ); this.job = job; this.cluster = cluster; this.command = command; this.applications = applications == null ? ImmutableList.of() : ImmutableList.copyOf(applications); this.environmentVariables = environmentVariables == null ? ImmutableMap.of() : ImmutableMap.copyOf(environmentVariables); this.interactive = interactive; this.jobDirectoryLocation = jobDirectoryLocation; this.archiveLocation = StringUtils.isBlank(archiveLocation) ? StringUtils.EMPTY : archiveLocation; }

Target:
public JobSpecification( @JsonProperty("commandArgs") @Nullable final List<String> commandArgs, @JsonProperty(value = "job", required = true) final ExecutionResource job, @JsonProperty(value = "cluster", required = true) final ExecutionResource cluster, @JsonProperty(value = "command", required = true) final ExecutionResource command, @JsonProperty("applications") @Nullable final List<ExecutionResource> applications, @JsonProperty("environmentVariables") @Nullable final Map<String, String> environmentVariables, @JsonProperty(value = "interactive", required = true) final boolean interactive, @JsonProperty(value = "jobDirectoryLocation", required = true) final File jobDirectoryLocation, @JsonProperty(value = "archiveLocation") @Nullable final String archiveLocation ) { this.commandArgs = commandArgs == null ? ImmutableList.of() : ImmutableList.copyOf( commandArgs .stream() .filter(StringUtils::isNotBlank) .collect(Collectors.toList()) ); this.job = job; this.cluster = cluster; this.command = command; this.applications = applications == null ? ImmutableList.of() : ImmutableList.copyOf(applications); this.environmentVariables = environmentVariables == null ? ImmutableMap.of() : ImmutableMap.copyOf(environmentVariables); this.interactive = interactive; this.jobDirectoryLocation = jobDirectoryLocation; this.archiveLocation = archiveLocation; }
Source:
private void populateDropDown() { CertificateImportWizard certImportWizard = (CertificateImportWizard) getWizard(); if (certImportWizard.selectedImportFile == null) return; if (certDropDown.getItemCount() > 0) certDropDown.removeAll(); try { certList = new ArrayList<>(); for (Certificate certificate : certFact.generateCertificates(new FileInputStream(certImportWizard.selectedImportFile))) { certList.add(certificate); } } catch (CertificateException e) { setErrorMessage(e.getMessage()); } catch (FileNotFoundException e) { setErrorMessage(e.getMessage()); } for (Certificate element : certList) { X509Certificate x509Cert = (X509Certificate) element; String subjectDN = x509Cert.getSubjectDN().getName(); certDropDown.add(subjectDN); } certDropDown.addListener(SWT.Selection, this); }

Target:
private void populateDropDown() { CertificateImportWizard certImportWizard = (CertificateImportWizard) getWizard(); if (certImportWizard.selectedImportFile == null) return; if (certDropDown.getItemCount() > 0) certDropDown.removeAll(); try { certList = new ArrayList<>(); for (Certificate certificate : certFact.generateCertificates(new FileInputStream(certImportWizard.selectedImportFile))) { certList.add(certificate); } } catch (CertificateException e) { setErrorMessage(e.getMessage()); } catch (FileNotFoundException e) { setErrorMessage(e.getMessage()); } for (Certificate certificate : certList) { X509Certificate x509Cert = (X509Certificate) certificate; String subjectDN = x509Cert.getSubjectDN().getName(); certDropDown.add(subjectDN); } certDropDown.addListener(SWT.Selection, this); }
Source:
public void testLong() throws Throwable { final String LINE = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASDSSSSSSSSSSSSSSSSSSSSSSSDDDDDD"; final int NUM = 10000; final int FACTOR = 5; StringBuilder longText = new StringBuilder(""); for (int i=0;i<NUM/FACTOR;i++) { longText.append(LINE).append("\n"); } List<String> expect = new LinkedList<String>(); expect.add("start"); for (int i=0;i<NUM;i++) { expect.add(LINE); } List<String> send = new LinkedList<String>(); for (int i=0;i<NUM;i++) { if (i % (NUM/FACTOR) == 0) { send.add(longText.toString()); } else { send.add(null); } } Sink sink = new Sink( expect.toArray(new String[0]), send.toArray(new String[0]) ); _sshdialog.connect(); _sshdialog.authenticate(); _sshdialog.executeCommand( sink, "echo start && sleep 4 && cat", null ); sink.exception(); }

Target:
public void testLong() throws Throwable { final String LINE = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASDSSSSSSSSSSSSSSSSSSSSSSSDDDDDD"; final int NUM = 10000; final int FACTOR = 5; StringBuilder longText = new StringBuilder(); for (int i=0;i<NUM/FACTOR;i++) { longText.append(LINE).append("\n"); } List<String> expect = new LinkedList<String>(); expect.add("start"); for (int i=0;i<NUM;i++) { expect.add(LINE); } List<String> send = new LinkedList<String>(); for (int i=0;i<NUM;i++) { if (i % (NUM/FACTOR) == 0) { send.add(longText.toString()); } else { send.add(null); } } Sink sink = new Sink( expect.toArray(new String[0]), send.toArray(new String[0]) ); _sshdialog.connect(); _sshdialog.authenticate(); _sshdialog.executeCommand( sink, "echo start && sleep 4 && cat", null ); sink.exception(); }
Source:
public void run() { setPriority(Thread.NORM_PRIORITY); try { while ((currentJob = pool.startJob(this)) != null) { IStatus result = Status.OK_STATUS; IProgressMonitor monitor = currentJob.getProgressMonitor(); try { String currentName = currentJob.getName(); if (currentName != null) { setName(generalName + ": " + currentJob.getName()); } result = currentJob.run(monitor); } catch (OperationCanceledException e) { result = Status.CANCEL_STATUS; } catch (Exception e) { result = handleException(currentJob, e); } catch (ThreadDeath e) { result = handleException(currentJob, e); throw e; } catch (Error e) { result = handleException(currentJob, e); } finally { if (result != Job.ASYNC_FINISH && monitor != null) { monitor.done(); } Thread.interrupted(); if (result == null) { String message = NLS.bind(JobMessages.jobs_returnNoStatus, currentJob.getClass().getName()); result = handleException(currentJob, new NullPointerException(message)); } pool.endJob(currentJob, result); currentJob = null; setName(generalName); setPriority(Thread.NORM_PRIORITY); } } } catch (Throwable t) { RuntimeLog .log(new Status(IStatus.ERROR, JobManager.PI_JOBS, JobManager.PLUGIN_ERROR, "Unhandled error", t)); } finally { currentJob = null; pool.endWorker(this); } }

Target:
public void run() { setPriority(Thread.NORM_PRIORITY); try { while ((currentJob = pool.startJob(this)) != null) { IStatus result = Status.OK_STATUS; IProgressMonitor monitor = currentJob.getProgressMonitor(); try { setName(getJobName()); result = currentJob.run(monitor); } catch (OperationCanceledException e) { result = Status.CANCEL_STATUS; } catch (Exception e) { result = handleException(currentJob, e); } catch (ThreadDeath e) { result = handleException(currentJob, e); throw e; } catch (Error e) { result = handleException(currentJob, e); } finally { if (result != Job.ASYNC_FINISH && monitor != null) { monitor.done(); } Thread.interrupted(); if (result == null) { String message = NLS.bind(JobMessages.jobs_returnNoStatus, currentJob.getClass().getName()); result = handleException(currentJob, new NullPointerException(message)); } pool.endJob(currentJob, result); currentJob = null; setName(generalName); setPriority(Thread.NORM_PRIORITY); } } } catch (Throwable t) { RuntimeLog.log(new Status(IStatus.ERROR, JobManager.PI_JOBS, JobManager.PLUGIN_ERROR, "Unhandled error", t)); } finally { currentJob = null; pool.endWorker(this); } }
Source:
public ZipInputStream apply(VPNConfig input) { try { byte[] decoded = base64().decode(input.content()); ZipInputStream zipStream = new ZipInputStream(new ByteArrayInputStream(decoded)); return zipStream; } catch (Exception ex) { Logger.getLogger(VPNConfigParser.class.getName()).log(Level.SEVERE, null, ex); return null; } }

Target:
public ZipInputStream apply(VPNConfig input) { byte[] decoded = base64().decode(input.content()); ZipInputStream zipStream = new ZipInputStream(new ByteArrayInputStream(decoded)); return zipStream; }
Source:
@Override public void finish() { if (fileToWrite == null) return; try { fileToWrite.force(); fileToWrite.close(); } catch (IOException ex) { throw new IgniteException(ex); } }

Target:
@Override public void finish() { if (fileToWrite == null) return; try { try { fileToWrite.force(); } finally { fileToWrite.close(); } } catch (IOException ex) { throw new IgniteException(ex); } }
Source:
public <T> T createProxy(Optional<SSLSocketFactory> sslSocketFactory, String uri, Class<T> type) { return Feign.builder() .contract(contract) .encoder(encoder) .decoder(decoder) .errorDecoder(errorDecoder) .client(clientSupplier.apply(sslSocketFactory)) .options(options) .logger(new Slf4jLogger(FeignClientFactory.class)) .logLevel(Level.BASIC) .target(type, uri); }

Target:
public <T> T createProxy(Optional<SSLSocketFactory> sslSocketFactory, String uri, Class<T> type) { return Feign.builder() .contract(contract) .encoder(encoder) .decoder(decoder) .errorDecoder(errorDecoder) .client(clientSupplier.apply(sslSocketFactory)) .options(options) .logger(new Slf4jLogger(FeignClients.class)) .logLevel(Level.BASIC) .target(type, uri); }
Source:
public EntityHttpClient responseSuccess(Predicate<Integer> responseSuccess) { responseSuccess = checkNotNull(responseSuccess, "responseSuccess"); return this; }

Target:
public EntityHttpClient responseSuccess(Predicate<Integer> responseSuccess) { this.responseSuccess = checkNotNull(responseSuccess, "responseSuccess"); return this; }
Source:
protected void executeVmCommand() { getParameters().getDiskInfo().setId(Guid.newGuid()); getParameters().setEntityInfo(new EntityInfo(VdcObjectType.Disk, getParameters().getDiskInfo().getId())); ImagesHandler.setDiskAlias(getParameters().getDiskInfo(), getVm()); if (DiskStorageType.IMAGE == getParameters().getDiskInfo().getDiskStorageType()) { createDiskBasedOnImage(); } if (DiskStorageType.LUN == getParameters().getDiskInfo().getDiskStorageType()) { createDiskBasedOnLun(); } }

Target:
protected void executeVmCommand() { getParameters().getDiskInfo().setId(Guid.newGuid()); getParameters().setEntityInfo(new EntityInfo(VdcObjectType.Disk, getParameters().getDiskInfo().getId())); ImagesHandler.setDiskAlias(getParameters().getDiskInfo(), getVm()); if (DiskStorageType.IMAGE == getParameters().getDiskInfo().getDiskStorageType()) { createDiskBasedOnImage(); } else { createDiskBasedOnLun(); } }
Source:
public File resolveFile(String fileName) { File file = new File(fileName); if (cwd != null && !file.isAbsolute()) { file = new File(cwd, fileName); } if (!ENABLE_CP_RESOLVING) { return file; } synchronized (this) { if (!file.exists()) { File cacheFile = new File(cacheDir, fileName); if (enableCaching && cacheFile.exists()) { return cacheFile; } ClassLoader cl = getClassLoader(); if (NON_UNIX_FILE_SEP) { fileName = fileName.replace(FILE_SEP, "/"); } if (file.getParent() != null) { URL directoryContents = cl.getResource(file.getParent()); if (directoryContents != null) { unpackUrlResource(directoryContents, file.getParent()); } } URL url = cl.getResource(fileName); if (url != null) { return unpackUrlResource(url, fileName); } } } return file; }

Target:
public File resolveFile(String fileName) { File file = new File(fileName); if (cwd != null && !file.isAbsolute()) { file = new File(cwd, fileName); } if (!ENABLE_CP_RESOLVING) { return file; } synchronized (this) { if (!file.exists()) { File cacheFile = new File(cacheDir, fileName); if (enableCaching && cacheFile.exists()) { return cacheFile; } ClassLoader cl = getClassLoader(); if (NON_UNIX_FILE_SEP) { fileName = fileName.replace(FILE_SEP, "/"); } String parentFileName = file.getParent(); if (parentFileName != null) { URL directoryContents = cl.getResource(parentFileName); if (directoryContents != null) { unpackUrlResource(directoryContents, parentFileName, cl); } } URL url = cl.getResource(fileName); if (url != null) { return unpackUrlResource(url, fileName, cl); } } } return file; }
Source:
public Uris(String scheme, String host) { this.scheme = scheme; this.host = host; this.port = 0; this.rcnamespace = "0|120"; }

Target:
public Uris(String scheme, String host) { this.scheme = scheme; this.host = host; this.port = 0; }
Source:
public Record beforeAppend(Record record) { if (filters.isEmpty()) { return record; } for (RecordFilter filter : filters) { if (record != null) { record = filter.beforeAppend(record); } } return record; }

Target:
public Record beforeAppend(Record record) { for (Iterator iterator = filters.iterator(); record != null && iterator.hasNext();) { RecordFilter filter = (RecordFilter) iterator.next(); record = filter.beforeAppend(record); } return record; }
Source:
protected void removeColumn(ColumnListMutation<String> mutation, String column) { mutation.deleteColumn(column); }

Target:
private void removeColumn(ColumnListMutation<String> mutation, String column) { mutation.deleteColumn(column); }
Source:
public void setData(@Nullable ISegmentStoreProvider provider) { fSegmentProvider = provider; if (provider == null) { updateModel(null); return; } createProviderColumns(); ISegmentStore<ISegment> segStore = provider.getSegmentStore(); Map<@NonNull Integer, @NonNull Predicate<@NonNull Map<@NonNull String, @NonNull String>>> predicates = computeRegexPredicate(); Predicate<ISegment> predicate = (segment) -> { if (!predicates.isEmpty()) { Map<@NonNull String, @NonNull String> input = getFilterInput(segment, provider); for (Map.Entry<Integer, Predicate<Map<String, String>>> mapEntry : predicates.entrySet()) { Predicate<Map<String, String>> value = Objects.requireNonNull(mapEntry.getValue()); boolean status = value.test(input); Integer property = Objects.requireNonNull(mapEntry.getKey()); if (status && (property != IFilterProperty.DIMMED || property != IFilterProperty.EXCLUDE)) { return true; } } return false; } return true; }; if (segStore != null) { Collection<ISegment> segStore2 = predicates.isEmpty() ? segStore : segStore.stream().filter(predicate).collect(Collectors.toList()); updateModel(segStore2); return; } updateModel(null); SegmentStoreProviderProgressListener listener = fListener; if (listener != null) { provider.addListener(listener); } if (provider instanceof IAnalysisModule) { ((IAnalysisModule) provider).schedule(); } }

Target:
public void setData(@Nullable ISegmentStoreProvider provider) { fSegmentProvider = provider; if (provider == null) { updateModel(null); return; } createProviderColumns(); ISegmentStore<ISegment> segStore = provider.getSegmentStore(); Map<@NonNull Integer, @NonNull Predicate<@NonNull Map<@NonNull String, @NonNull String>>> predicates = computeRegexPredicate(); Predicate<ISegment> predicate = (segment) -> { if (!predicates.isEmpty()) { Map<@NonNull String, @NonNull String> input = getFilterInput(segment, provider); boolean r = false; for (Map.Entry<Integer, Predicate<Map<String, String>>> mapEntry : predicates.entrySet()) { Integer property = Objects.requireNonNull(mapEntry.getKey()); Predicate<Map<String, String>> value = Objects.requireNonNull(mapEntry.getValue()); if (property == IFilterProperty.DIMMED) { boolean status = value.test(input); r |= status; } } return r; } return true; }; if (segStore != null) { Collection<ISegment> filtered = Collections2.filter(segStore, seg -> predicate.test(seg)); ISegmentStore<ISegment> segStore2 = new ArrayListStore<>(filtered.toArray(new ISegment[filtered.size()])); updateModel(segStore2); return; } updateModel(null); SegmentStoreProviderProgressListener listener = fListener; if (listener != null) { provider.addListener(listener); } if (provider instanceof IAnalysisModule) { ((IAnalysisModule) provider).schedule(); } }
Source:
protected boolean setupForDestroy (TileAbstractBuilder builder, IBuilderContext context, BuildingSlotBlock slot) { LinkedList<ItemStack> result = new LinkedList<ItemStack>(); int hardness = (int) context .world() .getBlock(slot.x, slot.y, slot.z) .getBlockHardness(context.world(), slot.x, slot.y, slot.z); if(hardness == 0){ hardness = 1; } if (builder.energyAvailable() < hardness * TileAbstractBuilder.BREAK_ENERGY) { return false; } else { builder.consumeEnergy(hardness * TileAbstractBuilder.BREAK_ENERGY); for (int i = 0; i < hardness; ++i) { slot.addStackConsumed(new ItemStack(BuildCraftBuilders.buildToolBlock)); } return true; } }

Target:
protected boolean setupForDestroy (TileAbstractBuilder builder, IBuilderContext context, BuildingSlotBlock slot) { LinkedList<ItemStack> result = new LinkedList<ItemStack>(); int hardness = (int) context .world() .getBlock(slot.x, slot.y, slot.z) .getBlockHardness(context.world(), slot.x, slot.y, slot.z)+1; if (builder.energyAvailable() < hardness * TileAbstractBuilder.BREAK_ENERGY) { return false; } else { builder.consumeEnergy(hardness * TileAbstractBuilder.BREAK_ENERGY); for (int i = 0; i < hardness; ++i) { slot.addStackConsumed(new ItemStack(BuildCraftBuilders.buildToolBlock)); } return true; } }
Source:
default <U> Validation<E,U> map(Function<? super T, ? extends U> f) { if(isInvalid()) { return (Invalid<E,U>) this; } else { T v = this.get(); return Validation.valid(f.apply(v)); } }

Target:
default <U> Validation<E,U> map(Function<? super T, ? extends U> f) { Objects.requireNonNull(f, "function f is null"); if(isInvalid()) { return Validation.invalid(this.getError()); } else { T value = this.get(); return Validation.valid(f.apply(value)); } }
Source:
public static void refreshVmsToolsVersion(Guid poolId, Set<String> isoList) { String latestVersion = getLatestGuestToolsVersion(isoList); if (latestVersion == null) { return; } List<VM> vms = DbFacade.getInstance().getVmDao().getAllForStoragePool(poolId); for (VM vm : vms) { if (vm.getAppList() != null && vm.getAppList().toLowerCase().contains("rhev-tools")) { Matcher m = TOOLS_PATTERN.matcher(vm.getAppList().toLowerCase()); if (m.matches() && m.groupCount() > 0) { String toolsVersion = m.group(1); if (toolsVersion.compareTo(latestVersion) < 0 && vm.getGuestAgentStatus() != GuestAgentStatus.UpdateNeeded) { updateGetsAgentStatus(vm, GuestAgentStatus.UpdateNeeded); } else { updateGetsAgentStatus(vm, GuestAgentStatus.Exists); } } } else { updateGetsAgentStatus(vm, GuestAgentStatus.DoesntExist); } } }

Target:
public static void refreshVmsToolsVersion(Guid poolId, Set<String> isoList) { String latestVersion = getLatestGuestToolsVersion(isoList); if (latestVersion == null) { return; } List<VM> vms = DbFacade.getInstance().getVmDao().getAllForStoragePool(poolId); for (VM vm : vms) { if (vm.getAppList() != null && vm.getAppList().toLowerCase().contains("rhev-tools")) { Matcher m = TOOLS_PATTERN.matcher(vm.getAppList().toLowerCase()); if (m.matches() && m.groupCount() > 0) { String toolsVersion = m.group(1); if (toolsVersion.compareTo(latestVersion) < 0) { updateGetsAgentStatus(vm, GuestAgentStatus.UpdateNeeded); } else { updateGetsAgentStatus(vm, GuestAgentStatus.Exists); } } } else { updateGetsAgentStatus(vm, GuestAgentStatus.DoesntExist); } } }
Source:
public void execute(SensorContext context) { this.context = context; failFast = context.config().getBoolean("sonar.internal.analysis.failFast").orElse(false); try { eslintBridgeServer.startServerLazily(context); analyzeFiles(); } catch (CancellationException e) { LOG.debug(e.toString()); } catch (ServerAlreadyFailedException e) { LOG.debug("Skipping start of eslint-bridge server due to the failure during first analysis"); LOG.debug("Skipping execution of eslint-based rules due to the problems with eslint-bridge server"); } catch (NodeCommandException e) { LOG.error(e.getMessage(), e); if (analysisWarnings != null) { analysisWarnings.addUnique("Eslint-based rules were not executed. " + e.getMessage()); } if (failFast) { throw new IllegalStateException("Analysis failed (\"sonar.internal.analysis.failFast\"=true)", e); } } catch (Exception e) { LOG.error("Failure during analysis, " + eslintBridgeServer.getCommandInfo(), e); if (failFast) { throw new IllegalStateException("Analysis failed (\"sonar.internal.analysis.failFast\"=true)", e); } } }

Target:
public void execute(SensorContext context) { this.context = context; failFast = context.config().getBoolean("sonar.internal.analysis.failFast").orElse(false); try { eslintBridgeServer.startServerLazily(context); analyzeFiles(); } catch (CancellationException e) { LOG.info(e.toString()); } catch (ServerAlreadyFailedException e) { LOG.debug("Skipping start of eslint-bridge server due to the failure during first analysis"); LOG.debug("Skipping execution of eslint-based rules due to the problems with eslint-bridge server"); } catch (NodeCommandException e) { LOG.error(e.getMessage(), e); if (analysisWarnings != null) { analysisWarnings.addUnique("Eslint-based rules were not executed. " + e.getMessage()); } if (failFast) { throw new IllegalStateException("Analysis failed (\"sonar.internal.analysis.failFast\"=true)", e); } } catch (Exception e) { LOG.error("Failure during analysis, " + eslintBridgeServer.getCommandInfo(), e); if (failFast) { throw new IllegalStateException("Analysis failed (\"sonar.internal.analysis.failFast\"=true)", e); } } }
Source:
public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; DeallocateVmVspCommand that = (DeallocateVmVspCommand) o; if (_isExpungingState != that._isExpungingState) return false; if (_isL3Network != that._isL3Network) return false; if (_isSharedNetwork != that._isSharedNetwork) return false; if (_networkUuid != null ? !_networkUuid.equals(that._networkUuid) : that._networkUuid != null) return false; if (_networksDomainUuid != null ? !_networksDomainUuid.equals(that._networksDomainUuid) : that._networksDomainUuid != null) return false; if (_nicFromDdUuid != null ? !_nicFromDdUuid.equals(that._nicFromDdUuid) : that._nicFromDdUuid != null) return false; if (_nicIp4Address != null ? !_nicIp4Address.equals(that._nicIp4Address) : that._nicIp4Address != null) return false; if (_nicMacAddress != null ? !_nicMacAddress.equals(that._nicMacAddress) : that._nicMacAddress != null) return false; if (_vmInstanceName != null ? !_vmInstanceName.equals(that._vmInstanceName) : that._vmInstanceName != null) return false; if (_vmUuid != null ? !_vmUuid.equals(that._vmUuid) : that._vmUuid != null) return false; if (_vpcUuid != null ? !_vpcUuid.equals(that._vpcUuid) : that._vpcUuid != null) return false; return true; }

Target:
public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof DeallocateVmVspCommand)) return false; if (!super.equals(o)) return false; DeallocateVmVspCommand that = (DeallocateVmVspCommand) o; if (_isExpungingState != that._isExpungingState) return false; if (_isL3Network != that._isL3Network) return false; if (_isSharedNetwork != that._isSharedNetwork) return false; if (_networkUuid != null ? !_networkUuid.equals(that._networkUuid) : that._networkUuid != null) return false; if (_networksDomainUuid != null ? !_networksDomainUuid.equals(that._networksDomainUuid) : that._networksDomainUuid != null) return false; if (_nicFromDdUuid != null ? !_nicFromDdUuid.equals(that._nicFromDdUuid) : that._nicFromDdUuid != null) return false; if (_nicIp4Address != null ? !_nicIp4Address.equals(that._nicIp4Address) : that._nicIp4Address != null) return false; if (_nicMacAddress != null ? !_nicMacAddress.equals(that._nicMacAddress) : that._nicMacAddress != null) return false; if (_vmInstanceName != null ? !_vmInstanceName.equals(that._vmInstanceName) : that._vmInstanceName != null) return false; if (_vmUuid != null ? !_vmUuid.equals(that._vmUuid) : that._vmUuid != null) return false; if (_vpcUuid != null ? !_vpcUuid.equals(that._vpcUuid) : that._vpcUuid != null) return false; return true; }
Source:
public void run() { try { JMeterContextService.getContext().setVariables(this.context.getVariables()); long endtime = 0; final boolean usingScheduler = getScheduler(); if (usingScheduler) { if (getDelay() > 0) { delayBy(getDelay() * 1000); } endtime = getDuration(); if (endtime > 0) { endtime = endtime *1000 + System.currentTimeMillis(); } } final int numThreads = getNumThreads(); final float rampUpOriginInMillis = (float) getRampUp() * 1000; final long startTimeInMillis = System.currentTimeMillis(); final boolean isSameUser = isSameUserOnNextIteration(); for (int threadNumber = 0; running && threadNumber < numThreads; threadNumber++) { if (threadNumber > 0) { long elapsedInMillis = System.currentTimeMillis() - startTimeInMillis; final int perThreadDelayInMillis = Math.round((rampUpOriginInMillis - elapsedInMillis) / (float) (numThreads - threadNumber)); pause(Math.max(0, perThreadDelayInMillis)); } if (usingScheduler && System.currentTimeMillis() > endtime) { break; } JMeterThread jmThread = makeThread(notifier, threadGroupTree, engine, threadNumber, context, isSameUser); jmThread.setInitialDelay(0); if (usingScheduler) { jmThread.setScheduled(true); jmThread.setEndTime(endtime); } Thread newThread = new Thread(jmThread, jmThread.getThreadName()); newThread.setDaemon(false); registerStartedThread(jmThread, newThread); newThread.start(); } } catch (Exception ex) { log.error("An error occurred scheduling delay start of threads for Thread Group: {}", getName(), ex); } }

Target:
public void run() { try { JMeterContextService.getContext().setVariables(this.context.getVariables()); long endtime = 0; final boolean usingScheduler = getScheduler(); if (usingScheduler) { if (getDelay() > 0) { delayBy(getDelay() * 1000); } endtime = getDuration(); if (endtime > 0) { endtime = endtime *1000 + System.currentTimeMillis(); } } final int numThreads = getNumThreads(); final float rampUpOriginInMillis = (float) getRampUp() * 1000; final long startTimeInMillis = System.currentTimeMillis(); final boolean isSameUserOnNextIteration = isSameUserOnNextIteration(); for (int threadNumber = 0; running && threadNumber < numThreads; threadNumber++) { if (threadNumber > 0) { long elapsedInMillis = System.currentTimeMillis() - startTimeInMillis; final int perThreadDelayInMillis = Math.round((rampUpOriginInMillis - elapsedInMillis) / (float) (numThreads - threadNumber)); pause(Math.max(0, perThreadDelayInMillis)); } if (usingScheduler && System.currentTimeMillis() > endtime) { break; } JMeterThread jmThread = makeThread(notifier, threadGroupTree, engine, threadNumber, context, isSameUserOnNextIteration); jmThread.setInitialDelay(0); if (usingScheduler) { jmThread.setScheduled(true); jmThread.setEndTime(endtime); } Thread newThread = new Thread(jmThread, jmThread.getThreadName()); newThread.setDaemon(false); registerStartedThread(jmThread, newThread); newThread.start(); } } catch (Exception ex) { log.error("An error occurred scheduling delay start of threads for Thread Group: {}", getName(), ex); } }
Source:
public ModelAndView getRssFeedView(@SiteParam Site site, @PathVariable String feedType) throws IOException { ArticleSearchQuery.Builder query = ArticleSearchQuery.builder() .setStart(0) .setRows(15) .setSortOrder(SolrSearchServiceImpl.SolrSortOrder.DATE_NEWEST_FIRST) .setJournalKeys(ImmutableList.of(site.getJournalKey())) .setDateRange(SolrSearchServiceImpl.SolrEnumeratedDateRange.ALL_TIME) .setIsRssSearch(true); Map<String, ?> recentArticles = solrSearchService.search(query.build()); ModelAndView mav = new ModelAndView(); mav.addObject("site", site); mav.addObject("solrResults", recentArticles.get("docs")); if (feedType.equalsIgnoreCase(FeedType.ATOM.name())) { mav.setView(articleFeedView.getArticleAtomView()); } else { mav.setView(articleFeedView.getArticleRssView()); } return mav; }

Target:
public ModelAndView getRssFeedView(@SiteParam Site site, @PathVariable String feedType) throws IOException { ArticleSearchQuery.Builder query = ArticleSearchQuery.builder() .setStart(0) .setRows(30) .setSortOrder(SolrSearchServiceImpl.SolrSortOrder.DATE_NEWEST_FIRST) .setJournalKeys(ImmutableList.of(site.getJournalKey())) .setDateRange(SolrSearchServiceImpl.SolrEnumeratedDateRange.ALL_TIME) .setIsRssSearch(true); Map<String, ?> recentArticles = solrSearchService.search(query.build()); ModelAndView mav = new ModelAndView(); mav.addObject("site", site); mav.addObject("solrResults", recentArticles.get("docs")); if (feedType.equalsIgnoreCase(FeedType.ATOM.name())) { mav.setView(articleFeedView.getArticleAtomView()); } else { mav.setView(articleFeedView.getArticleRssView()); } return mav; }
Source:
public int getRunningTaskCount() { if (subGroups().isEmpty()) { return runningQueries.stream() .filter(query -> query instanceof SqlQueryExecution) .mapToInt(query -> ((SqlQueryExecution) query).getRunningTaskCount()) .sum(); } int taskCount = 0; for (InternalResourceGroup subGroup : subGroups()) { taskCount += subGroup.getRunningTaskCount(); } return taskCount; }

Target:
public int getRunningTaskCount() { if (subGroups().isEmpty()) { return runningQueries.stream() .filter(SqlQueryExecution.class::isInstance) .mapToInt(query -> ((SqlQueryExecution) query).getRunningTaskCount()) .sum(); } int taskCount = 0; for (InternalResourceGroup subGroup : subGroups()) { taskCount += subGroup.getRunningTaskCount(); } return taskCount; }
Source:
public void networkInUse() throws Exception { Nameable nameable = new VM(); List<Nameable> nameables = new ArrayList<Nameable>(); nameables.add(nameable); networkNotUsedTest(new ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_NETWORK_IN_USE), nameables); }

Target:
public void networkInUse() throws Exception { Nameable nameable = new Nameable() { @Override public String getName() { return ""; } }; networkNotUsedTest(new ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_NETWORK_IN_USE), Collections.singletonList(nameable)); }
Source:
protected void registerVersioningRestriction(VersioningRestrictionDescriptor contrib) { versioningRestrictionsRegistry.addContribution(contrib); log.info("Registered versioning filter: " + contrib.getType()); recompute(); }

Target:
protected void registerVersioningRestriction(VersioningRestrictionDescriptor contrib) { versioningRestrictionsRegistry.addContribution(contrib); log.info("Registered versioning restriction: " + contrib.getType()); recompute(); }
Source:
public Builder quantile(double quantile, double error) { if (quantile < 0.0 || quantile > 1.0) { throw new IllegalArgumentException("Quantile " + quantile + " invalid: Expected percentage between 0.0 and 1.0."); } if (error < 0.0 || error > 1.0) { throw new IllegalArgumentException("Error " + error + " invalid: Expected percentage between 0.0 and 1.0."); } quantiles.add(new Quantile(quantile, error)); return this; }

Target:
public Builder quantile(double quantile, double error) { if (quantile < 0.0 || quantile > 1.0) { throw new IllegalArgumentException("Quantile " + quantile + " invalid: Expected number between 0.0 and 1.0."); } if (error < 0.0 || error > 1.0) { throw new IllegalArgumentException("Error " + error + " invalid: Expected number between 0.0 and 1.0."); } quantiles.add(new Quantile(quantile, error)); return this; }
Source:
private List<String> getRollingOperationIds(final ZooKeeperClient client, final String groupName) throws DeploymentGroupDoesNotExistException { try { final Node node = client.getNode(Paths.statusDeploymentGroupRollingOps(groupName)); return Json.read(node.getBytes(), new TypeReference<List<String>>() {}); } catch (JsonMappingException e) { return emptyList(); } catch (NoNodeException e) { throw new DeploymentGroupDoesNotExistException(groupName, e); } catch (KeeperException | IOException e) { throw new HeliosRuntimeException("getting deployment group rolling-operations failed", e); } }

Target:
private List<String> getRollingOperationIds(final ZooKeeperClient client, final String groupName) throws DeploymentGroupDoesNotExistException { try { final Node node = client.getNode(Paths.statusDeploymentGroupRollingOps(groupName)); return Json.read(node.getBytes(), new TypeReference<List<String>>() {}); } catch (JsonMappingException e) { return emptyList(); } catch (NoNodeException e) { throw new DeploymentGroupDoesNotExistException(groupName, e); } catch (KeeperException | IOException e) { throw new HeliosRuntimeException( "getting rolling-operations for deployment group " + groupName + " failed", e); } }
Source:
public void onUsernameChanged(OnUsernameChanged event) { if (event.isError()) { AnalyticsTracker.track(mIsEmailSignup ? AnalyticsTracker.Stat.SIGNUP_EMAIL_EPILOGUE_UPDATE_USERNAME_FAILED : AnalyticsTracker.Stat.SIGNUP_SOCIAL_EPILOGUE_UPDATE_USERNAME_FAILED); AppLog.e(T.API, "SignupEpilogueFragment.onUsernameChanged: " + event.error.type + " - " + event.error.message); endProgress(); showErrorDialog(getString(R.string.signup_epilogue_error_generic)); } else if (mSignupEpilogueListener != null) { mHasMadeUpdates = true; AnalyticsTracker.track(mIsEmailSignup ? AnalyticsTracker.Stat.SIGNUP_EMAIL_EPILOGUE_UPDATE_USERNAME_SUCCEEDED : AnalyticsTracker.Stat.SIGNUP_SOCIAL_EPILOGUE_UPDATE_USERNAME_SUCCEEDED); updateAccountOrContinue(); } }

Target:
public void onUsernameChanged(OnUsernameChanged event) { if (event.isError()) { AnalyticsTracker.track(mIsEmailSignup ? AnalyticsTracker.Stat.SIGNUP_EMAIL_EPILOGUE_UPDATE_USERNAME_FAILED : AnalyticsTracker.Stat.SIGNUP_SOCIAL_EPILOGUE_UPDATE_USERNAME_FAILED); AppLog.e(T.API, "SignupEpilogueFragment.onUsernameChanged: " + event.error.type + " - " + event.error.message); endProgress(); showErrorDialog(getString(R.string.signup_epilogue_error_generic)); } else { mHasMadeUpdates = true; AnalyticsTracker.track(mIsEmailSignup ? AnalyticsTracker.Stat.SIGNUP_EMAIL_EPILOGUE_UPDATE_USERNAME_SUCCEEDED : AnalyticsTracker.Stat.SIGNUP_SOCIAL_EPILOGUE_UPDATE_USERNAME_SUCCEEDED); updateAccountOrContinue(); } }
Source:
public InputVFile getInputVFile(@Nonnull VPath path) throws NotFileOrDirectoryException, NoSuchFileException { Iterator<String> iterator = path.split().iterator(); String firstElement = iterator.next(); InputVElement ive = subs.get(firstElement); String pathAsString = path.getPathAsString(IN_ZIP_SEPARATOR); if (ive == null) { throw new NoSuchFileException(new FileLocation(pathAsString)); } if (iterator.hasNext()) { if (ive instanceof InputVDir) { ive = ((InputVDir) ive).getInputVFile(new VPath( pathAsString.substring(pathAsString.indexOf(IN_ZIP_SEPARATOR) + 1), IN_ZIP_SEPARATOR)); } } if (!(ive instanceof InputVFile)) { throw new NoSuchFileException(new FileLocation(pathAsString)); } return (InputVFile) ive; }

Target:
public InputVFile getInputVFile(@Nonnull VPath path) throws NotFileOrDirectoryException, NoSuchFileException { Iterator<String> iterator = path.split().iterator(); String firstElement = iterator.next(); InputVElement ive = subs.get(firstElement); String pathAsString = path.getPathAsString(IN_ZIP_SEPARATOR); if (ive == null) { throw new NoSuchFileException(new FileLocation(pathAsString)); } if (iterator.hasNext()) { if (ive instanceof InputVDir) { ive = ((InputVDir) ive).getInputVFile(new VPath( pathAsString.substring(pathAsString.indexOf(IN_ZIP_SEPARATOR) + 1), IN_ZIP_SEPARATOR)); } } if (ive.isVDir()) { throw new NotFileOrDirectoryException(new DirectoryLocation(pathAsString)); } return (InputVFile) ive; }
Source:
protected void processMultiValuedEReference(EReference eReference, PageDescription processedDescription, PageDescription currentDescription, TransformationCache cache) { if (!eReference.equals(PropertiesPackage.Literals.ABSTRACT_PAGE_DESCRIPTION__GROUPS)) { super.processMultiValuedEReference(eReference, processedDescription, currentDescription, cache); } else { currentDescription.getGroups().forEach(groupDescription -> { Optional<Object> inputDescription = cache.getInput(processedDescription); Optional<PageDescription> inputPageDescription = inputDescription.filter(PageDescription.class::isInstance).map(PageDescription.class::cast); if (inputPageDescription.isPresent() && !groupDescription.eResource().equals(inputPageDescription.get().eResource())) { IDescriptionPreprocessor descriptionPreprocessor = SiriusPropertiesCorePlugin.getPlugin().getDescriptionPreprocessor(groupDescription); if (descriptionPreprocessor != null) { EObject processedGroup = descriptionPreprocessor.convert(groupDescription, cache); processedDescription.getGroups().add((GroupDescription) processedGroup); } } else { processedDescription.getGroups().add(groupDescription); } }); } }

Target:
protected void processMultiValuedEReference(EReference eReference, PageDescription processedDescription, PageDescription currentDescription, TransformationCache cache) { if (!eReference.equals(PropertiesPackage.Literals.ABSTRACT_PAGE_DESCRIPTION__GROUPS)) { super.processMultiValuedEReference(eReference, processedDescription, currentDescription, cache); } else { processGroups(processedDescription, currentDescription, cache); } }
Source:
public ZkJobCoordinator(String processorId, Config config, ScheduleAfterDebounceTime debounceTimer, SamzaContainerController containerController) { this.debounceTimer = debounceTimer; this.containerController = containerController; this.config = config; this.processorId = processorId; JobConfig jobConfig = new JobConfig(config); this.coordinationUtils = Util. <CoordinationServiceFactory>getObj( new JobCoordinatorConfig(config) .getJobCoordinationServiceFactoryClassName()) .getCoordinationService(new ApplicationConfig(config).getGlobalAppId(), String.valueOf(processorId), config); this.zkUtils = ((ZkCoordinationUtils) coordinationUtils).getZkUtils(); this.keyBuilder = zkUtils.getKeyBuilder(); this.zkController = new ZkControllerImpl(processorId, zkUtils, debounceTimer, this); streamMetadataCache = getStreamMetadataCache(); }

Target:
public ZkJobCoordinator(String processorId, Config config, ScheduleAfterDebounceTime debounceTimer, SamzaContainerController containerController) { this.debounceTimer = debounceTimer; this.containerController = containerController; this.config = config; this.processorId = processorId; this.coordinationUtils = Util. <CoordinationServiceFactory>getObj( new JobCoordinatorConfig(config) .getJobCoordinationServiceFactoryClassName()) .getCoordinationService(new ApplicationConfig(config).getGlobalAppId(), String.valueOf(processorId), config); this.zkUtils = ((ZkCoordinationUtils) coordinationUtils).getZkUtils(); this.keyBuilder = zkUtils.getKeyBuilder(); this.zkController = new ZkControllerImpl(processorId, zkUtils, debounceTimer, this); streamMetadataCache = getStreamMetadataCache(); }
Source:
public NullScoreAwareAveragingCombiner() { ignoreNullScoringContent = false; }

Target:
public NullScoreAwareAveragingCombiner() { this.ignoreNullScoringCandidate = false; }
Source:
protected void migrateData(ReviewDb db, UpdateUI ui) throws OrmException { Pattern patternA = Pattern.compile("Patch Set ([0-9]+):.*", Pattern.DOTALL); Pattern patternB = Pattern.compile("Uploaded patch set ([0-9]+)."); ResultSet<ChangeMessage> results = db.changeMessages().all(); List<ChangeMessage> updates = new LinkedList<ChangeMessage>(); for (ChangeMessage cm : results) { Change.Id id = cm.getKey().getParentKey(); String msg = cm.getMessage(); Matcher matcherA = patternA.matcher(msg); Matcher matcherB = patternB.matcher(msg); PatchSet.Id newId = null; if (matcherA.matches()) { int patchSetNum = Integer.parseInt(matcherA.group(1)); newId = new PatchSet.Id(id, patchSetNum); } else if (matcherB.matches()) { int patchSetNum = Integer.parseInt(matcherB.group(1)); newId = new PatchSet.Id(id, patchSetNum); } if (newId == null) { newId = db.changes().get(id).currentPatchSetId(); } cm.setPatchSetId(newId); updates.add(cm); if (updates.size() >= 100) { db.changeMessages().update(updates); updates.clear(); } } if (!updates.isEmpty()) { db.changeMessages().update(updates); } }

Target:
protected void migrateData(ReviewDb db, UpdateUI ui) throws OrmException { Pattern patternA = Pattern.compile("Patch Set ([0-9]+):.*", Pattern.DOTALL); Pattern patternB = Pattern.compile("Uploaded patch set ([0-9]+)."); ResultSet<ChangeMessage> results = db.changeMessages().all(); List<ChangeMessage> updates = new LinkedList<ChangeMessage>(); for (ChangeMessage cm : results) { Change.Id id = cm.getKey().getParentKey(); String msg = cm.getMessage(); Matcher matcherA = patternA.matcher(msg); Matcher matcherB = patternB.matcher(msg); PatchSet.Id newId = null; if (matcherA.matches()) { int patchSetNum = Integer.parseInt(matcherA.group(1)); newId = new PatchSet.Id(id, patchSetNum); } else if (matcherB.matches()) { int patchSetNum = Integer.parseInt(matcherB.group(1)); newId = new PatchSet.Id(id, patchSetNum); } if (newId != null) { cm.setPatchSetId(newId); updates.add(cm); } if (updates.size() >= 100) { db.changeMessages().update(updates); updates.clear(); } } if (!updates.isEmpty()) { db.changeMessages().update(updates); } }
Source:
public void updateUnauthorized() throws Exception { context.turnOffAuthorisationSystem(); MetadataSchema metadataSchema = MetadataSchemaBuilder.createMetadataSchema(context, TEST_NAME, TEST_NAMESPACE) .build(); MetadataSchemaRest metadataSchemaRest = new MetadataSchemaRest(); metadataSchemaRest.setId(metadataSchema.getID()); metadataSchemaRest.setPrefix(TEST_NAME_UPDATED); metadataSchemaRest.setNamespace(TEST_NAMESPACE_UPDATED); getClient() .perform(put("/api/core/metadataschemas/" + metadataSchema.getID()) .content(new ObjectMapper().writeValueAsBytes(metadataSchemaRest)) .contentType(contentType)) .andExpect(status().isUnauthorized()); getClient().perform(get("/api/core/metadataschemas/" + metadataSchema.getID())) .andExpect(status().isOk()) .andExpect(jsonPath("$", MetadataschemaMatcher .matchEntry(TEST_NAME, TEST_NAMESPACE))); }

Target:
public void updateUnauthorized() throws Exception { context.turnOffAuthorisationSystem(); MetadataSchema metadataSchema = MetadataSchemaBuilder.createMetadataSchema(context, TEST_NAME, TEST_NAMESPACE) .build(); context.restoreAuthSystemState(); MetadataSchemaRest metadataSchemaRest = new MetadataSchemaRest(); metadataSchemaRest.setId(metadataSchema.getID()); metadataSchemaRest.setPrefix(TEST_NAME_UPDATED); metadataSchemaRest.setNamespace(TEST_NAMESPACE_UPDATED); getClient() .perform(put("/api/core/metadataschemas/" + metadataSchema.getID()) .content(new ObjectMapper().writeValueAsBytes(metadataSchemaRest)) .contentType(contentType)) .andExpect(status().isUnauthorized()); getClient().perform(get("/api/core/metadataschemas/" + metadataSchema.getID())) .andExpect(status().isOk()) .andExpect(jsonPath("$", MetadataschemaMatcher .matchEntry(TEST_NAME, TEST_NAMESPACE))); }
Source:
public int getGlobalMinimumClock() { return globalMinimumClock; }

Target:
int getGlobalMinimumClock() { return globalMinimumClock; }
Source:
public Icon toIcon(@Nullable Context context) { Icon icon; switch (mType) { case TYPE_UNKNOWN: return (Icon) mObj1; case TYPE_BITMAP: icon = Icon.createWithBitmap((Bitmap) mObj1); break; case TYPE_ADAPTIVE_BITMAP: if (Build.VERSION.SDK_INT >= 26) { icon = Icon.createWithAdaptiveBitmap((Bitmap) mObj1); } else { icon = Icon.createWithBitmap( createLegacyIconFromAdaptiveIcon((Bitmap) mObj1, false)); } break; case TYPE_RESOURCE: icon = Icon.createWithResource(getResPackage(), mInt1); break; case TYPE_DATA: icon = Icon.createWithData((byte[]) mObj1, mInt1, mInt2); break; case TYPE_URI: icon = Icon.createWithContentUri((String) mObj1); break; case TYPE_URI_ADAPTIVE_BITMAP: if (Build.VERSION.SDK_INT >= 30) { try { icon = (Icon) Icon.class.getMethod("createWithContentUriForAdaptiveBitmap") .invoke(mObj1); } catch (IllegalAccessException e) { throw new IllegalStateException( "Unable to resolve icon from uri:" + mObj1, e); } catch (InvocationTargetException e) { throw new IllegalStateException( "Unable to resolve icon from uri:" + mObj1, e); } catch (NoSuchMethodException e) { throw new IllegalStateException( "Unable to resolve icon from uri:" + mObj1, e); } } else if (Build.VERSION.SDK_INT >= 26) { icon = Icon.createWithAdaptiveBitmap(getBitmapFromUri(context)); } else { icon = Icon.createWithBitmap(getBitmapFromUri(context)); } break; default: throw new IllegalArgumentException("Unknown type"); } if (mTintList != null) { icon.setTintList(mTintList); } if (mTintMode != DEFAULT_TINT_MODE) { icon.setTintMode(mTintMode); } return icon; }

Target:
public Icon toIcon(@Nullable Context context) { Icon icon; switch (mType) { case TYPE_UNKNOWN: return (Icon) mObj1; case TYPE_BITMAP: icon = Icon.createWithBitmap((Bitmap) mObj1); break; case TYPE_ADAPTIVE_BITMAP: if (Build.VERSION.SDK_INT >= 26) { icon = Icon.createWithAdaptiveBitmap((Bitmap) mObj1); } else { icon = Icon.createWithBitmap( createLegacyIconFromAdaptiveIcon((Bitmap) mObj1, false)); } break; case TYPE_RESOURCE: icon = Icon.createWithResource(getResPackage(), mInt1); break; case TYPE_DATA: icon = Icon.createWithData((byte[]) mObj1, mInt1, mInt2); break; case TYPE_URI: icon = Icon.createWithContentUri((String) mObj1); break; case TYPE_URI_ADAPTIVE_BITMAP: InputStream is = getUriInputStream(context); if (is != null) { if (Build.VERSION.SDK_INT >= 26) { icon = Icon.createWithAdaptiveBitmap(BitmapFactory.decodeStream(is)); } else { icon = Icon.createWithBitmap(createLegacyIconFromAdaptiveIcon( BitmapFactory.decodeStream(is), false)); } } break; default: throw new IllegalArgumentException("Unknown type"); } if (mTintList != null) { icon.setTintList(mTintList); } if (mTintMode != DEFAULT_TINT_MODE) { icon.setTintMode(mTintMode); } return icon; }
Source:
public JwtAuthenticationToken(Jwt jwt) { super(jwt); this.name = this.getToken().getSubject(); }

Target:
public JwtAuthenticationToken(Jwt jwt) { super(jwt); this.name = jwt.getSubject(); }
Source:
public ClientCredentials getClientCredential() throws IOException { ClientCredentials credentials = new ClientCredentials(); Properties properties = getCredential(); mergeProperties(properties, configurationMap); credentials.setClientID(configurationMap.get(Constants.CLIENT_ID)); credentials.setClientSecret(configurationMap.get(Constants.CLIENT_SECRET)); return credentials; }

Target:
public ClientCredentials getClientCredential() { return PayPalResource.getCredential(); }
Source:
public void testFinishInitializeWhenDefaultThenRemoveCatroidNavigationItems() { presenter.removeMoreOptionsItems(menu); verify(topBarViewHolder).removeItem(R.id.pocketpaint_nav_export); verify(topBarViewHolder).removeItem(R.id.pocketpaint_nav_back_to_pocket_code); }

Target:
public void testFinishInitializeWhenDefaultThenRemoveCatroidNavigationItems() { presenter.removeMoreOptionsItems(menu); verify(topBarViewHolder).removeCatroidMenuItems(menu); }
Source:
public void fillContextMenu(final IMenuManager menu) { super.fillContextMenu(menu); final ISelection selection = getContext().getSelection(); if (selection.isEmpty()) { return; } try { Job.getJobManager().join(AbstractRepresentationsFileJob.FAMILY, new NullProgressMonitor()); } catch (InterruptedException e) { throw new RuntimeException(e); } contextMenuFiller.fillContextMenu(menu, selection); }

Target:
public void fillContextMenu(final IMenuManager menu) { super.fillContextMenu(menu); final ISelection selection = getContext().getSelection(); if (selection.isEmpty()) { return; } try { Job.getJobManager().join(AbstractRepresentationsFileJob.FAMILY, new NullProgressMonitor()); } catch (InterruptedException e) { } contextMenuFiller.fillContextMenu(menu, selection); }