auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public StoreConfiguration processConfiguration(StoreConfiguration storeConfiguration) { if(storeConfiguration instanceof DeployedStoreConfiguration) { DeployedStoreConfiguration deployedConfiguration = (DeployedStoreConfiguration) storeConfiguration; PersistenceConfigurationBuilder replacedBuilder = deployedConfiguration.getPersistenceConfigurationBuilder(); try { DeployedCacheStoreMetadata deployedCacheStoreMetadata = getPromise(deployedConfiguration.getCustomStoreClassName()).get(TIMEOUT_SECONDS, TimeUnit.SECONDS); StoreConfigurationBuilder replacedStoreBuilder = replacedBuilder.addStore(deployedCacheStoreMetadata.getStoreBuilderClass()); replacedStoreBuilder.fetchPersistentState(deployedConfiguration.fetchPersistentState()); replacedStoreBuilder.ignoreModifications(deployedConfiguration.ignoreModifications()); replacedStoreBuilder.preload(deployedConfiguration.preload()); replacedStoreBuilder.purgeOnStartup(deployedConfiguration.purgeOnStartup()); replacedStoreBuilder.shared(deployedConfiguration.shared()); replacedStoreBuilder.withProperties(deployedConfiguration.properties()); StoreConfiguration replacedConfiguration = (StoreConfiguration) replacedStoreBuilder.create(); return replacedConfiguration; } catch (Exception e) { InfinispanLogger.ROOT_LOGGER.error("Could not get Custom Cache Store metadata (" + deployedConfiguration.getCustomStoreClassName() + ") within given time.", e); } } return null; }

Target:
public StoreConfiguration processConfiguration(StoreConfiguration storeConfiguration) { if (storeConfiguration instanceof DeployedStoreConfiguration) { DeployedStoreConfiguration deployedConfiguration = (DeployedStoreConfiguration) storeConfiguration; PersistenceConfigurationBuilder replacedBuilder = deployedConfiguration.getPersistenceConfigurationBuilder(); try { DeployedCacheStoreMetadata deployedCacheStoreMetadata = getPromise(deployedConfiguration.getCustomStoreClassName()).get(TIMEOUT_SECONDS, TimeUnit.SECONDS); StoreConfigurationBuilder replacedStoreBuilder = replacedBuilder.addStore(deployedCacheStoreMetadata.getStoreBuilderClass()); replacedStoreBuilder.fetchPersistentState(deployedConfiguration.fetchPersistentState()); replacedStoreBuilder.ignoreModifications(deployedConfiguration.ignoreModifications()); replacedStoreBuilder.preload(deployedConfiguration.preload()); replacedStoreBuilder.purgeOnStartup(deployedConfiguration.purgeOnStartup()); replacedStoreBuilder.shared(deployedConfiguration.shared()); replacedStoreBuilder.withProperties(deployedConfiguration.properties()); return (StoreConfiguration) replacedStoreBuilder.create(); } catch (InterruptedException | ExecutionException e) { throw new IllegalStateException("An error occurred while processing the deployment", e); } catch (TimeoutException e) { InfinispanLogger.ROOT_LOGGER.error("Could not get Custom Cache Store metadata (" + deployedConfiguration.getCustomStoreClassName() + ") within given time.", e); } } return null; }
Source:
public List<ServerResponse> processAndComputeServerResponses( final Session session, final ChatParticipant sender, final ClientMessageEnvelope clientMessageEnvelope) { final Optional<ChatClientEnvelopeType> chatClientEnvelopeType = parseType(clientMessageEnvelope); if (chatClientEnvelopeType.isEmpty()) { return List.of(); } switch (chatClientEnvelopeType.get()) { case CONNECT: chatters.put(session, sender); return List.of( ServerResponse.backToClient( ChatServerEnvelopeFactory.newPlayerListing( new ArrayList<>(chatters.getAllParticipants()))), ServerResponse.broadcast(ChatServerEnvelopeFactory.newPlayerJoined(sender))); case SLAP: final PlayerName slapped = PlayerName.of(clientMessageEnvelope.getPayload()); return List.of( ServerResponse.broadcast( ChatServerEnvelopeFactory.newSlap( PlayerSlapped.builder() .slapper(sender.getPlayerName()) .slapped(slapped) .build()))); case MESSAGE: return List.of( ServerResponse.broadcast( ChatServerEnvelopeFactory.newChatMessage( new ChatMessage(sender.getPlayerName(), clientMessageEnvelope.getPayload())))); case UPDATE_MY_STATUS: return List.of( ServerResponse.broadcast( ChatServerEnvelopeFactory.newStatusUpdate( new StatusUpdate(sender.getPlayerName(), clientMessageEnvelope.getPayload())))); default: throw new UnsupportedOperationException( "Unhandled message type: " + chatClientEnvelopeType); } }

Target:
public List<ServerResponse> processAndComputeServerResponses( final Session session, final ChatParticipant sender, final ClientMessageEnvelope clientMessageEnvelope) { final Optional<ChatClientEnvelopeType> chatClientEnvelopeType = parseType(clientMessageEnvelope); if (chatClientEnvelopeType.isEmpty()) { return List.of(); } switch (chatClientEnvelopeType.get()) { case CONNECT: chatters.put(session, sender); return playerConnectedMessages(sender); case SLAP: return List.of(playerSlappedMessage(sender, clientMessageEnvelope)); case MESSAGE: return List.of(chatMessage(sender, clientMessageEnvelope)); case UPDATE_MY_STATUS: return List.of(statusUpdateMessage(sender, clientMessageEnvelope)); default: throw new UnsupportedOperationException( "Unhandled message type: " + chatClientEnvelopeType); } }
Source:
public SWTBotSiriusDiagramEditor(final IEditorReference reference, final SWTWorkbenchBot bot) throws WidgetNotFoundException { super(reference, bot); GraphicalViewer graphicalViewer = UIThreadRunnable.syncExec(new Result<GraphicalViewer>() { @Override public GraphicalViewer run() { final IEditorPart editor = partReference.getEditor(true); return editor.getAdapter(GraphicalViewer.class); } }); ReflectionHelper.setFieldValueWithoutException(this, "viewer", new SWTBotSiriusGefViewer(graphicalViewer), this.getClass().getSuperclass()); }

Target:
public SWTBotSiriusDiagramEditor(final IEditorReference reference, final SWTWorkbenchBot bot) throws WidgetNotFoundException { super(reference, bot); GraphicalViewer graphicalViewer = UIThreadRunnable.syncExec(new Result<GraphicalViewer>() { @Override public GraphicalViewer run() { final IEditorPart editor = partReference.getEditor(true); return (GraphicalViewer) editor.getAdapter(GraphicalViewer.class); } }); ReflectionHelper.setFieldValueWithoutException(this, "viewer", new SWTBotSiriusGefViewer(graphicalViewer), this.getClass().getSuperclass()); }
Source:
private void buildChildrenEntries(ThreadNode threadNode) { FlamegraphDepthEntry threadEntry = new FlamegraphDepthEntry(threadNode.getSymbol().toString(), 0, 0, fFlameGraphEntries.size(), threadNode.getId()); List<FlamegraphDepthEntry> childrenEntries = new ArrayList<>(); Deque<Long> timestampStack = new ArrayDeque<>(); timestampStack.push(0L); threadNode.getChildren().stream() .sorted(Comparator.comparingLong(AggregatedCalledFunction::getDuration)) .forEach(rootFunction -> { setData(rootFunction, childrenEntries, timestampStack); long currentThreadDuration = timestampStack.pop() + rootFunction.getDuration(); timestampStack.push(currentThreadDuration); }); childrenEntries.forEach(child -> { if (child != null) { threadEntry.addChild(child); } }); threadEntry.updateEndTime(timestampStack.pop()); fFlameGraphEntries.add(threadEntry); }

Target:
private void buildChildrenEntries(ThreadNode threadNode) { FlamegraphDepthEntry threadEntry = new FlamegraphDepthEntry("", 0, 0, fFlameGraphEntries.size(), threadNode.getId()); List<FlamegraphDepthEntry> childrenEntries = new ArrayList<>(); Deque<Long> timestampStack = new ArrayDeque<>(); timestampStack.push(0L); threadNode.getChildren().stream() .sorted(Comparator.comparingLong(AggregatedCalledFunction::getDuration)) .forEach(rootFunction -> { setData(rootFunction, childrenEntries, timestampStack); long currentThreadDuration = timestampStack.pop() + rootFunction.getDuration(); timestampStack.push(currentThreadDuration); }); childrenEntries.forEach(child -> { if (child != null) { threadEntry.addChild(child); } }); threadEntry.updateEndTime(timestampStack.pop()); threadEntry.setName(threadNode.getSymbol().toString()); fFlameGraphEntries.add(threadEntry); }
Source:
public ModelValidatorContext(TaskFlowJob job) { Map<String, Serializable> jobVariablesValues = new LinkedHashMap<>(); for (JobVariable jobVariable : job.getVariables().values()) { jobVariablesValues.put(jobVariable.getName(), jobVariable.getValue()); } spELVariables = new SpELVariables(jobVariablesValues); spelContext = new StandardEvaluationContext(spELVariables); spelContext.setTypeLocator(new RestrictedTypeLocator()); }

Target:
public ModelValidatorContext(TaskFlowJob job) { this(job.getVariables().values().stream().collect(HashMap<String, Serializable>::new, (m, v) -> m.put(v.getName(), v.getValue()), HashMap<String, Serializable>::putAll)); }
Source:
public void evaluate() throws Throwable { CallableStatement callable = new CallableStatement(); FutureTask<Throwable> task = new FutureTask<Throwable>(callable); ThreadGroup threadGroup = new ThreadGroup("FailOnTimeoutGroup"); Thread thread = new Thread(threadGroup, task, "Time-limited test"); try { thread.setDaemon(true); thread.start(); callable.awaitStarted(); Throwable throwable = getResult(task, thread); if (throwable != null) { throw throwable; } } finally { thread.join(100); try { threadGroup.destroy(); } catch (IllegalThreadStateException e) { } } }

Target:
public void evaluate() throws Throwable { CallableStatement callable = new CallableStatement(); FutureTask<Throwable> task = new FutureTask<Throwable>(callable); ThreadGroup threadGroup = new ThreadGroup("FailOnTimeoutGroup"); Thread thread = new Thread(threadGroup, task, "Time-limited test"); try { thread.setDaemon(true); thread.start(); callable.awaitStarted(); Throwable throwable = getResult(task, thread); if (throwable != null) { throw throwable; } } finally { try { thread.join(1); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } try { threadGroup.destroy(); } catch (IllegalThreadStateException e) { } } }
Source:
public void start() { if (!started.compareAndSet(false, true)) { LOG.warn("attempting to start the consumer for the second (or more) time."); return; } if (stopped.get()) { LOG.warn("attempting to start a stopped consumer"); return; } startSubscription(); setFetchThresholds(); startConsumer(); LOG.info("consumer started", this); }

Target:
public void start() { if (!started.compareAndSet(false, true)) { LOG.warn("{}: Attempting to start the consumer for the second (or more) time.", this); return; } if (stopped.get()) { LOG.error("{}: Attempting to start a stopped consumer", this); return; } startSubscription(); setFetchThresholds(); startConsumer(); LOG.info("{}: Consumer started", this); }
Source:
private static Map<String, ?> copyConfig(Map<String,?> entries, LocationDetailLevel level) { ImmutableMap.Builder<String, Object> builder = ImmutableMap.builder(); if (level!=LocationDetailLevel.NONE) { for (Object entryO : entries.entrySet()) { @SuppressWarnings("unchecked") Map.Entry<String, ?> entry = (Map.Entry<String, ?>) entryO; if (level==LocationDetailLevel.FULL_INCLUDING_SECRET || !Entities.isSecret(entry.getKey())) { builder.put(entry.getKey(), WebResourceUtils.getValueForDisplay(entry.getValue(), true, false)); } } } return builder.build(); }

Target:
private static Map<String, ?> copyConfig(Map<String,?> entries, LocationDetailLevel level) { ImmutableMap.Builder<String, Object> builder = ImmutableMap.builder(); if (level!=LocationDetailLevel.NONE) { for (Map.Entry<String,?> entry : entries.entrySet()) { if (level==LocationDetailLevel.FULL_INCLUDING_SECRET || !Entities.isSecret(entry.getKey())) { builder.put(entry.getKey(), WebResourceUtils.getValueForDisplay(entry.getValue(), true, false)); } } } return builder.build(); }
Source:
public void init(ByteBuffer buf, int position) { NativeMemory nativeMemory = getNativeMemory(buf); Memory mem = new MemoryRegion(nativeMemory, position, maxIntermediateSize); unions.put(position, (Union) SetOperation.builder().initMemory(mem).build(size, Family.UNION)); }

Target:
public void init(ByteBuffer buf, int position) { createNewUnion(buf, position, false); }
Source:
protected boolean canDoAction() { Map<Guid, StorageDomain> domainsMap = new HashMap<Guid, StorageDomain>(); if (!canDoActionBeforeCloneVm(domainsMap)) { return false; } if (getParameters().isImportAsNewEntity()) { initImportClonedVm(); if (getVm().getInterfaces().size() > MacPoolManager.getInstance().getAvailableMacsCount()) { addCanDoActionMessage(VdcBllMessages.MAC_POOL_NOT_ENOUGH_MAC_ADDRESSES); return false; } } if (getVdsGroup() != null && getVm().isBalloonEnabled() && !getVdsGroup().isBalloonSupported()) { return failCanDoAction(VdcBllMessages.BALLOON_REQUESTED_ON_NOT_SUPPORTED_ARCH, String.format("$clusterArch %1$s", getVdsGroup().getArchitecture())); } return canDoActionAfterCloneVm(domainsMap); }

Target:
protected boolean canDoAction() { Map<Guid, StorageDomain> domainsMap = new HashMap<Guid, StorageDomain>(); if (!canDoActionBeforeCloneVm(domainsMap)) { return false; } if (getParameters().isImportAsNewEntity()) { initImportClonedVm(); if (getVm().getInterfaces().size() > MacPoolManager.getInstance().getAvailableMacsCount()) { addCanDoActionMessage(VdcBllMessages.MAC_POOL_NOT_ENOUGH_MAC_ADDRESSES); return false; } } if (getVm().isBalloonEnabled() && !getVdsGroup().isBalloonSupported()) { return failCanDoAction(VdcBllMessages.BALLOON_REQUESTED_ON_NOT_SUPPORTED_ARCH, String.format("$clusterArch %1$s", getVdsGroup().getArchitecture())); } return canDoActionAfterCloneVm(domainsMap); }
Source:
public Statement apply(final Statement statement, Description description) { Set<Long> enabled = new HashSet<>(); Set<Long> disabled = new HashSet<>(); EnableCompatChanges enableCompatChanges = description.getAnnotation( EnableCompatChanges.class); DisableCompatChanges disableCompatChanges = description.getAnnotation( DisableCompatChanges.class); if (enableCompatChanges != null) { enabled.addAll(Longs.asList(enableCompatChanges.value())); } if (disableCompatChanges != null) { disabled.addAll(Longs.asList(disableCompatChanges.value())); } ArraySet<Long> intersection = new ArraySet<>(enabled); intersection.retainAll(disabled); if (!intersection.isEmpty()) { throw new IllegalArgumentException( "Changes " + intersection + " are both enabled and disabled."); } if (enabled.isEmpty() && disabled.isEmpty()) { throw new IllegalStateException("Added a CompatChangeRule without specifying any " + "@EnableCompatChanges or @DisableCompatChanges !"); } return new CompatChangeStatement(statement, enabled, disabled); }

Target:
public Statement apply(final Statement statement, Description description) { Set<Long> enabled = new HashSet<>(); Set<Long> disabled = new HashSet<>(); EnableCompatChanges enableCompatChanges = description.getAnnotation( EnableCompatChanges.class); DisableCompatChanges disableCompatChanges = description.getAnnotation( DisableCompatChanges.class); if (enableCompatChanges != null) { enabled.addAll(Longs.asList(enableCompatChanges.value())); } if (disableCompatChanges != null) { disabled.addAll(Longs.asList(disableCompatChanges.value())); } ArraySet<Long> intersection = new ArraySet<>(enabled); intersection.retainAll(disabled); if (!intersection.isEmpty()) { throw new IllegalArgumentException( "Changes " + intersection + " are both enabled and disabled."); } if (enabled.isEmpty() && disabled.isEmpty()) { throw new IllegalStateException("Added a CompatChangeRule without specifying any " + "@EnableCompatChanges or @DisableCompatChanges !"); } return new CompatChangeStatement(statement, new ChangeConfig(enabled, disabled)); }
Source:
public void handleCommand(ChannelUID channelUID, Command command) { switch (channelUID.getId()) { case CHANNEL_MUTE: if (command instanceof OnOffType) { isMuted = ((OnOffType) command).equals(OnOffType.ON); } else { logger.warn("command not supported in channel {}:mute", command.getClass(), this.thing.getUID()); } break; default: logger.warn("Channel not supported in bridge {}", channelUID.getId(), this.thing.getUID()); } }

Target:
public void handleCommand(ChannelUID channelUID, Command command) { switch (channelUID.getId()) { case CHANNEL_MUTE: if (command instanceof OnOffType) { isMuted = ((OnOffType) command).equals(OnOffType.ON); } else { logger.debug("command not supported in channel {}:mute", command.getClass(), this.thing.getUID()); } break; default: logger.warn("Channel not supported in bridge {}", channelUID.getId(), this.thing.getUID()); } }
Source:
public void handleEvent(ITmfEvent event) { final String eventName = event.getName(); if (!eventName.equals(QemuKvmStrings.VMSYNC_GH_HOST)) { return; } final ITmfEventField content = event.getContent(); final long ts = event.getTimestamp().getValue(); final String hostId = event.getTrace().getHostId(); final Integer cpu = TmfTraceUtils.resolveIntEventAspectOfClassForEvent(event.getTrace(), TmfCpuAspect.class, event); if (cpu == null) { return; } ITmfEventField data = content.getField(QemuKvmStrings.VM_UID_PAYLOAD); if (data == null) { return; } long vmUid = (Long) data.getValue(); for (Entry<String, VirtualMachine> entry : fKnownMachines.entrySet()) { if (entry.getValue().getVmUid() == vmUid) { KernelAnalysisModule module = getLttngKernelModuleFor(hostId); if (module == null) { break; } Integer tid = KernelThreadInformationProvider.getThreadOnCpu(module, cpu, ts); if (tid == null) { break; } HostThread ht = new HostThread(hostId, tid); fTidToVm.put(ht, entry.getValue()); Integer ppid = KernelThreadInformationProvider.getParentPid(module, tid, ts); if (ppid != null) { HostThread parentHt = new HostThread(hostId, ppid); fTidToVm.put(parentHt, entry.getValue()); } } } }

Target:
public void handleEvent(ITmfEvent event) { final String eventName = event.getName(); if (!eventName.equals(QemuKvmStrings.VMSYNC_GH_HOST)) { return; } final ITmfEventField content = event.getContent(); final long ts = event.getTimestamp().toNanos(); final String hostId = event.getTrace().getHostId(); final Integer cpu = TmfTraceUtils.resolveIntEventAspectOfClassForEvent(event.getTrace(), TmfCpuAspect.class, event); if (cpu == null) { return; } ITmfEventField data = content.getField(QemuKvmStrings.VM_UID_PAYLOAD); if (data == null) { return; } long vmUid = (Long) data.getValue(); for (Entry<String, VirtualMachine> entry : fKnownMachines.entrySet()) { if (entry.getValue().getVmUid() == vmUid) { KernelAnalysisModule module = getLttngKernelModuleFor(hostId); if (module == null) { break; } Integer tid = KernelThreadInformationProvider.getThreadOnCpu(module, cpu, ts); if (tid == null) { break; } HostThread ht = new HostThread(hostId, tid); fTidToVm.put(ht, entry.getValue()); Integer ppid = KernelThreadInformationProvider.getParentPid(module, tid, ts); if (ppid != null) { HostThread parentHt = new HostThread(hostId, ppid); fTidToVm.put(parentHt, entry.getValue()); } } } }
Source:
private void addAdditionalHeaderFields(VCFHeader header) { header.addMetaDataLine(new VCFHeaderLine(InfiniumVcfFields.ZCALL_VERSION, ZCALL_VERSION)); header.addMetaDataLine(new VCFHeaderLine(InfiniumVcfFields.ZCALL_THRESHOLDS, ZCALL_THRESHOLDS_FILE.getName())); header.addMetaDataLine(new VCFFilterHeaderLine(InfiniumVcfFields.ZCALL_DIFF)); header.addMetaDataLine(new VCFInfoHeaderLine(InfiniumVcfFields.ZTHRESH_X, 1, VCFHeaderLineType.Float, "zCall X threshold")); header.addMetaDataLine(new VCFInfoHeaderLine(InfiniumVcfFields.ZTHRESH_Y, 1, VCFHeaderLineType.Float, "zCall Y threshold")); header.addMetaDataLine(new VCFFormatHeaderLine(InfiniumVcfFields.GTA, 1, VCFHeaderLineType.String, "Illumina Autocall Genotype")); header.addMetaDataLine(new VCFFormatHeaderLine(InfiniumVcfFields.GTZ, 1, VCFHeaderLineType.String, "zCall Genotype")); }

Target:
private void addAdditionalHeaderFields(VCFHeader header) { header.addMetaDataLine(new VCFHeaderLine(InfiniumVcfFields.ZCALL_VERSION, ZCALL_VERSION)); header.addMetaDataLine(new VCFHeaderLine(InfiniumVcfFields.ZCALL_THRESHOLDS, ZCALL_THRESHOLDS_FILE.getName())); header.addMetaDataLine(new VCFInfoHeaderLine(InfiniumVcfFields.ZTHRESH_X, 1, VCFHeaderLineType.Float, "zCall X threshold")); header.addMetaDataLine(new VCFInfoHeaderLine(InfiniumVcfFields.ZTHRESH_Y, 1, VCFHeaderLineType.Float, "zCall Y threshold")); header.addMetaDataLine(new VCFFormatHeaderLine(InfiniumVcfFields.GTA, 1, VCFHeaderLineType.String, "Illumina Autocall Genotype")); header.addMetaDataLine(new VCFFormatHeaderLine(InfiniumVcfFields.GTZ, 1, VCFHeaderLineType.String, "zCall Genotype")); }
Source:
protected boolean validateAndAddListenerInvocations(Object listener, AbstractInvocationBuilder builder) { Listener l = testListenerClassValidity(listener.getClass()); boolean foundMethods = false; builder.setTarget(listener); builder.setSubject(Security.getSubject()); builder.setSync(l.sync()); Map<Class<? extends Annotation>, Class<?>> allowedListeners = getAllowedMethodAnnotations(l); for (Method m : listener.getClass().getMethods()) { if (!m.isSynthetic() || !m.isBridge()) { for (Map.Entry<Class<? extends Annotation>, Class<?>> annotationEntry : allowedListeners.entrySet()) { final Class<? extends Annotation> annotationClass = annotationEntry.getKey(); if (m.isAnnotationPresent(annotationClass)) { final Class<?> eventClass = annotationEntry.getValue(); testListenerMethodValidity(m, eventClass, annotationClass.getName()); if (System.getSecurityManager() == null) { m.setAccessible(true); } else { AccessController.doPrivileged((PrivilegedAction<Void>) () -> { m.setAccessible(true); return null; }); } builder.setMethod(m); builder.setAnnotation(annotationClass); L invocation = builder.build(); if (log.isTraceEnabled()) log.tracef("Add listener invocation %s for %s", invocation, annotationClass); getListenerCollectionForAnnotation(annotationClass).add(invocation); foundMethods = true; } } } } if (!foundMethods) getLog().noAnnotateMethodsFoundInListener(listener.getClass()); return foundMethods; }

Target:
protected boolean validateAndAddListenerInvocations(Object listener, AbstractInvocationBuilder builder) { Listener l = testListenerClassValidity(listener.getClass()); boolean foundMethods = false; builder.setTarget(listener); builder.setSubject(Security.getSubject()); builder.setSync(l.sync()); Map<Class<? extends Annotation>, Class<?>> allowedListeners = getAllowedMethodAnnotations(l); for (Method m : listener.getClass().getMethods()) { if (!m.isSynthetic() || !m.isBridge()) { for (Map.Entry<Class<? extends Annotation>, Class<?>> annotationEntry : allowedListeners.entrySet()) { final Class<? extends Annotation> annotationClass = annotationEntry.getKey(); if (m.isAnnotationPresent(annotationClass)) { final Class<?> eventClass = annotationEntry.getValue(); testListenerMethodValidity(m, eventClass, annotationClass.getName()); if (System.getSecurityManager() == null) { m.setAccessible(true); } else { AccessController.doPrivileged((PrivilegedAction<Void>) () -> { m.setAccessible(true); return null; }); } builder.setMethod(m); builder.setAnnotation(annotationClass); L invocation = builder.build(); if (trace) log.tracef("Add listener invocation %s for %s", invocation, annotationClass); getListenerCollectionForAnnotation(annotationClass).add(invocation); foundMethods = true; } } } } if (!foundMethods) getLog().noAnnotateMethodsFoundInListener(listener.getClass()); return foundMethods; }
Source:
public static String getVersion() { Properties prop = new Properties(); try (InputStream versionfile = GPSession.class.getResourceAsStream("git.properties")) { try { prop.load(versionfile); return prop.getProperty("git.commit.id.describe"); } catch (IOException e){ return "unknown-development"; } } catch (IOException e) { return "unknown-error"; } }

Target:
public static String getVersion() { Properties prop = new Properties(); try (InputStream versionfile = GPSession.class.getResourceAsStream("git.properties")) { prop.load(versionfile); return prop.getProperty("git.commit.id.describe", "unknown-development"); } catch (IOException e) { return "unknown-error"; } }
Source:
public String getRequestURI() { String uri = contextPath + servletPath + path; if (!parameters.isEmpty()) { uri += "?" + GitilesView.paramsToString(parameters); } return uri; }

Target:
public String getRequestURI() { return contextPath + servletPath + path; }
Source:
public void prepareForWrite(RecordConsumer recordConsumer) { final MessageColumnIO columnIO = new ColumnIOFactory().getColumnIO(schema); this.parquetWriteProtocol = new ParquetWriteProtocol( this.configuration, recordConsumer, columnIO, thriftStruct); thriftWriteSupport.prepareForWrite(recordConsumer); }

Target:
public void prepareForWrite(RecordConsumer recordConsumer) { final MessageColumnIO columnIO = new ColumnIOFactory().getColumnIO(schema); parquetWriteProtocol = new ParquetWriteProtocol( configuration, recordConsumer, columnIO, thriftStruct); thriftWriteSupport.prepareForWrite(recordConsumer); }
Source:
private static void aliasedDiscoveryConfigsGenerator(XmlGenerator gen, List<AliasedDiscoveryConfig<?>> configs) { if (configs == null) { return; } for (AliasedDiscoveryConfig<?> c : configs) { gen.open(AliasedDiscoveryConfigUtils.tagFor(c), "enabled", c.isEnabled()); for (String key : c.getProperties().keySet()) { gen.node(key, c.getProperties().get(key)); } gen.close(); } }

Target:
private static void aliasedDiscoveryConfigsGenerator(XmlGenerator gen, List<AliasedDiscoveryConfig<?>> configs) { if (configs == null) { return; } for (AliasedDiscoveryConfig<?> c : configs) { gen.open(AliasedDiscoveryConfigUtils.tagFor(c), "enabled", c.isEnabled()); if (c.isUsePublicIp()) { gen.node("use-public-ip", "true"); } for (String key : c.getProperties().keySet()) { gen.node(key, c.getProperties().get(key)); } gen.close(); } }
Source:
public void removeWorkspace(String workspaceId) throws ConflictException, ServerException { requireNonNull(workspaceId, "Required non-null workspace id"); if (runtimes.hasRuntime(workspaceId)) { throw new ConflictException("The workspace '" + workspaceId + "' is currently running and cannot be removed."); } workspaceProjectStorageCleaner.remove(workspaceId); workspaceDao.remove(workspaceId); eventService.publish(new WorkspaceRemovedEvent(workspaceId)); LOG.info("Workspace '{}' removed by user '{}'", workspaceId, sessionUserNameOr("undefined")); }

Target:
public void removeWorkspace(String workspaceId) throws ConflictException, ServerException { requireNonNull(workspaceId, "Required non-null workspace id"); if (runtimes.hasRuntime(workspaceId)) { throw new ConflictException("The workspace '" + workspaceId + "' is currently running and cannot be removed."); } workspaceDao.remove(workspaceId); LOG.info("Workspace '{}' removed by user '{}'", workspaceId, sessionUserNameOr("undefined")); }
Source:
public void installVerb(String engineId, String container, String verbId, Runnable doneCallback, Consumer<Exception> errorCallback) { final InteractiveScriptSession interactiveScriptSession = scriptInterpreter.createInteractiveSession(); interactiveScriptSession.eval( "include([\"engines\", \"" + engineId + "\", \"verbs\", \"" + verbId + "\"]);", ignored -> interactiveScriptSession.eval("new Verb()", output -> { final Verb verbObject = (Verb) output; verbObject.install(container, ""); doneCallback.run(); }, errorCallback), errorCallback); }

Target:
public void installVerb(String engineId, String container, String verbId, Runnable doneCallback, Consumer<Exception> errorCallback) { final InteractiveScriptSession interactiveScriptSession = scriptInterpreter.createInteractiveSession(); interactiveScriptSession.eval( "include([\"engines\", \"" + engineId + "\", \"verbs\", \"" + verbId + "\"]);", ignored -> interactiveScriptSession.eval("new Verb()", output -> { final Verb verbObject = (Verb) output; verbObject.install(container); doneCallback.run(); }, errorCallback), errorCallback); }
Source:
public void onVisible(IObservableValue detailsViewModel, DataBindingContext dbc) { bindWidgetsToInternalModel(dbc); rememberTokenCheckbox.setText("&Save token (could trigger secure storage login)"); setCheckboxVisible(true); rememberTokenCheckbox.getParent().update(); rememberTokenCheckbox.getParent().layout(true); }

Target:
public void onVisible(IObservableValue detailsViewModel, DataBindingContext dbc) { bindWidgetsToInternalModel(dbc); this.rememberTokenBinding = ValueBindingBuilder .bind(WidgetProperties.selection().observe(rememberTokenCheckbox)) .to(rememberTokenObservable) .in(dbc); }
Source:
public static <T extends org.eclipse.swt.widgets.Widget> org.hamcrest.Matcher<T> withId(java.lang.String key, java.lang.String value) { return org.eclipse.swtbot.swt.finder.matchers.WithId.withId(key, value); }

Target:
public static <T extends org.eclipse.swt.widgets.Widget> org.hamcrest.Matcher<T> withId(java.lang.String key, java.lang.String value) { return org.eclipse.swtbot.swt.finder.matchers.WithId.withId(key, (Object)value); }
Source:
public TaskActivityRecords getTaskActivities(@PathVariable Long taskId, GridSettings settings) { if (settings != null) { QueryParams params = settings.isLastExecution() ? new QueryParams(settings.getPage(), 1, new Order("date", Order.Direction.DESC)) : new QueryParams(settings.getPage(), settings.getRows(), new Order("date", Order.Direction.DESC)); Set<TaskActivityType> types = settings.getTypesFromString(); Range<DateTime> dateTimeRange = settings.convertToDateRange(settings.getDateTimeFrom(), settings.getDateTimeTo()); List<TaskActivityDto> activities; long count; if (dateTimeRange != null) { activities = taskWebService.getTaskActivities(taskId, types, dateTimeRange, params); count = settings.isLastExecution() ? 1 : activityService.getTaskActivitiesCount(taskId, types, dateTimeRange); } else { activities = taskWebService.getTaskActivities(taskId, types, params); count = settings.isLastExecution() ? 1 : activityService.getTaskActivitiesCount(taskId, types); } int totalPages = (int) Math.ceil((double) count / settings.getRows()); return new TaskActivityRecords(settings.getPage(), totalPages, count, activities); } else { return null; } }

Target:
public TaskActivityRecords getTaskActivities(@PathVariable Long taskId, GridSettings settings) { if (settings != null) { QueryParams params = getParams(settings); Set<TaskActivityType> types = settings.getTypesFromString(); Range<DateTime> dateTimeRange = settings.convertToDateRange(settings.getDateTimeFrom(), settings.getDateTimeTo()); List<TaskActivityDto> activities; long count; if (dateTimeRange != null) { activities = taskWebService.getTaskActivities(taskId, types, dateTimeRange, params, settings.isLastExecution()); count = activityService.getTaskActivitiesCount(taskId, types, dateTimeRange, settings.isLastExecution()); } else { activities = taskWebService.getTaskActivities(taskId, types, params, settings.isLastExecution()); count = activityService.getTaskActivitiesCount(taskId, types, settings.isLastExecution()); } int totalPages = (int) Math.ceil((double) count / settings.getRows()); return new TaskActivityRecords(settings.getPage(), totalPages, count, activities); } else { return null; } }
Source:
public InstallModel() { setUserPassword(new EntityModel<String>()); setOVirtISO(new ListModel<RpmVersion>()); setHostVersion(new EntityModel<String>()); setOverrideIpTables(new EntityModel<Boolean>()); setActivateHostAfterInstall(new EntityModel<Boolean>()); setReconfigureGluster(new EntityModel<Boolean>()); getOverrideIpTables().setEntity(false); getActivateHostAfterInstall().setEntity(false); getReconfigureGluster().setEntity(true); getReconfigureGluster().getEntityChangedEvent().addListener((ev, sender, args) -> { if(getReconfigureGluster().getEntity()) { getReconfigureGluster().setEntity(false); } else { getReconfigureGluster().setEntity(true); } }); setUserName(new EntityModel<String>()); getUserName().setEntity(HostModel.RootUserName); getUserName().setIsChangeable(false); setPublicKey(new EntityModel<String>()); getPublicKey().setEntity(""); setValidationFailed(new EntityModel<Boolean>()); fetchEngineSshPublicKey(); setHostedEngineHostModel(new HostedEngineHostModel()); }

Target:
public InstallModel() { setUserPassword(new EntityModel<String>()); setOVirtISO(new ListModel<RpmVersion>()); setHostVersion(new EntityModel<String>()); setOverrideIpTables(new EntityModel<Boolean>()); setActivateHostAfterInstall(new EntityModel<Boolean>()); setReconfigureGluster(new EntityModel<Boolean>()); getOverrideIpTables().setEntity(false); getActivateHostAfterInstall().setEntity(false); getReconfigureGluster().setEntity(true); setUserName(new EntityModel<String>()); getUserName().setEntity(HostModel.RootUserName); getUserName().setIsChangeable(false); setPublicKey(new EntityModel<String>()); getPublicKey().setEntity(""); setValidationFailed(new EntityModel<Boolean>()); fetchEngineSshPublicKey(); setHostedEngineHostModel(new HostedEngineHostModel()); }
Source:
@Override public void addSelect(List<SqlNode> selectList, SqlNode node, RelDataType rowType) { String name = rowType.getFieldNames().get(selectList.size()); String alias = SqlValidatorUtil.getAlias(node, -1); final String lowerName = name.toLowerCase(Locale.ROOT); if (lowerName.startsWith("expr$")) { if (stack.size() != 1) { node = as(node, name); } else { ordinalMap.put(lowerName, node); } } else if (alias == null || !alias.equals(name)) { node = as(node, name); } selectList.add(node); }

Target:
@Override public void addSelect(List<SqlNode> selectList, SqlNode node, RelDataType rowType) { String name = rowType.getFieldNames().get(selectList.size()); String alias = SqlValidatorUtil.getAlias(node, -1); final String lowerName = name.toLowerCase(Locale.ROOT); if (lowerName.startsWith("expr$")) { final RelNode current = stack.peek().r; if (stack.size() != 1 && current instanceof Aggregate) { node = as(node, name); } else { ordinalMap.put(lowerName, node); } } else if (alias == null || !alias.equals(name)) { node = as(node, name); } selectList.add(node); }
Source:
@Override public Pair<RelTraitSet, List<RelTraitSet>> passThroughTraits( final RelTraitSet required) { if (!isSimple(this)) { return null; } RelTraitSet inputTraits = getInput().getTraitSet(); RelCollation collation = required.getTrait(RelCollationTraitDef.INSTANCE); ImmutableBitSet requiredKeys = ImmutableBitSet.of(RelCollations.ordinals(collation)); ImmutableBitSet groupKeys = ImmutableBitSet.range(groupSet.cardinality()); if (!groupKeys.contains(requiredKeys)) { return null; } Mappings.TargetMapping mapping = Mappings.source(groupSet.toList(), input.getRowType().getFieldCount()); if (requiredKeys.equals(groupKeys)) { RelCollation inputCollation = RexUtil.apply(mapping, collation); return Pair.of(required, ImmutableList.of(inputTraits.replace(inputCollation))); } else if (groupKeys.contains(requiredKeys)) { List<RelFieldCollation> list = new ArrayList<>(collation.getFieldCollations()); groupKeys.except(requiredKeys).forEach(k -> list.add(new RelFieldCollation(k))); RelCollation aggCollation = RelCollations.of(list); RelCollation inputCollation = RexUtil.apply(mapping, aggCollation); return Pair.of(traitSet.replace(aggCollation), ImmutableList.of(inputTraits.replace(inputCollation))); } return null; }

Target:
@Override public Pair<RelTraitSet, List<RelTraitSet>> passThroughTraits( final RelTraitSet required) { if (!isSimple(this)) { return null; } RelTraitSet inputTraits = getInput().getTraitSet(); RelCollation collation = required.getTrait(RelCollationTraitDef.INSTANCE); ImmutableBitSet requiredKeys = ImmutableBitSet.of(RelCollations.ordinals(collation)); ImmutableBitSet groupKeys = ImmutableBitSet.range(groupSet.cardinality()); Mappings.TargetMapping mapping = Mappings.source(groupSet.toList(), input.getRowType().getFieldCount()); if (requiredKeys.equals(groupKeys)) { RelCollation inputCollation = RexUtil.apply(mapping, collation); return Pair.of(required, ImmutableList.of(inputTraits.replace(inputCollation))); } else if (groupKeys.contains(requiredKeys)) { List<RelFieldCollation> list = new ArrayList<>(collation.getFieldCollations()); groupKeys.except(requiredKeys).forEach(k -> list.add(new RelFieldCollation(k))); RelCollation aggCollation = RelCollations.of(list); RelCollation inputCollation = RexUtil.apply(mapping, aggCollation); return Pair.of(traitSet.replace(aggCollation), ImmutableList.of(inputTraits.replace(inputCollation))); } return null; }
Source:
public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable { if (command.hasFlag(Flag.PUT_FOR_EXTERNAL_READ)) { return super.visitPutKeyValueCommand(ctx, command); } SingleKeyRecipientGenerator skrg = new SingleKeyRecipientGenerator(command.getKey()); Object returnValue = handleWriteCommand(ctx, command, skrg, command.hasFlag(Flag.PUT_FOR_STATE_TRANSFER), false); if (ignorePreviousValueOnBackup(command, ctx)) { command.setPutIfAbsent(false); } if (isL1CacheEnabled && !ctx.isOriginLocal() && !skrg.generateRecipients().contains(ctx.getOrigin())) l1Manager.addRequestor(command.getKey(), ctx.getOrigin()); return returnValue; }

Target:
public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable { if (command.hasFlag(Flag.PUT_FOR_EXTERNAL_READ)) { return handleNonTxWriteCommand(ctx, command); } SingleKeyRecipientGenerator skrg = new SingleKeyRecipientGenerator(command.getKey()); Object returnValue = handleTxWriteCommand(ctx, command, skrg, command.hasFlag(Flag.PUT_FOR_STATE_TRANSFER)); if (ignorePreviousValueOnBackup(command, ctx)) { command.setPutIfAbsent(false); } if (isL1CacheEnabled && !ctx.isOriginLocal() && !skrg.generateRecipients().contains(ctx.getOrigin())) l1Manager.addRequestor(command.getKey(), ctx.getOrigin()); return returnValue; }
Source:
public ClassLoader getClassLoader() { return this.getClassLoader(); }

Target:
public ClassLoader getClassLoader() { return this.getClass().getClassLoader(); }
Source:
protected Set<Value.Immutable<?>> api$getVanillaValues() { Set<Value.Immutable<?>> vanillaValues = super.api$getVanillaValues(); vanillaValues.add(this.angry().asImmutable()); vanillaValues.add(this.collarColor().asImmutable()); return vanillaValues; }

Target:
protected Set<Value.Immutable<?>> api$getVanillaValues() { final Set<Value.Immutable<?>> values = super.api$getVanillaValues(); values.add(this.sitting().asImmutable()); values.add(this.angry().asImmutable()); values.add(this.collarColor().asImmutable()); values.add(this.beggingForFood().asImmutable()); return values; }
Source:
protected static void leech(Card card, Activity activity) { if (activity != null) { Resources res = activity.getResources(); final String leechMessage; if (card.getQueue() < 0) { leechMessage = res.getString(R.string.leech_suspend_notification); } else { leechMessage = res.getString(R.string.leech_notification); } activity.runOnUiThread(new Runnable() { @Override public void run() { Toast.makeText(activity, leechMessage, Toast.LENGTH_SHORT).show(); } }); } else { Timber.e("LeechHook :: could not show leech toast as activity was null"); } }

Target:
protected static void leech(Card card, Activity activity) { if (activity != null) { Resources res = activity.getResources(); final String leechMessage; if (card.getQueue() < 0) { leechMessage = res.getString(R.string.leech_suspend_notification); } else { leechMessage = res.getString(R.string.leech_notification); } activity.runOnUiThread(new Runnable() { @Override public void run() { Toast.makeText(activity, leechMessage, Toast.LENGTH_SHORT).show(); } }); } else { Timber.w("LeechHook :: could not show leech toast as activity was null"); } }
Source:
public void apply(OnlineCommandContext ctx) throws Exception { if (assignGroups != null) { if (ctx.version.lessThan(ServerVersion.VERSION_3_0_0) && !ctx.version.equalTo(ServerVersion.VERSION_1_7_0)) { throw new AssertionError("Option assign-groups is available since WildFly 9 or in EAP 6.4.x."); } } Operations ops = new Operations(ctx.client); Address securityRealmJaasAuthnAddress = securityRealmAddress.and("authentication", "jaas"); if (replaceExisting) { ops.removeIfExists(securityRealmJaasAuthnAddress); new Administration(ctx.client).reloadIfRequired(); } ops.add(securityRealmJaasAuthnAddress, Values.empty() .andOptional("name", name) .andOptional("assign-groups", assignGroups)); }

Target:
public void apply(OnlineCommandContext ctx) throws Exception { if (assignGroups != null) { if (ctx.version.lessThan(ServerVersion.VERSION_1_7_0) || ctx.version.inRange(ServerVersion.VERSION_2_0_0, ServerVersion.VERSION_2_2_0)) { throw new AssertionError("Option assign-groups is available since WildFly 9 or in EAP 6.4.x."); } } Operations ops = new Operations(ctx.client); Address securityRealmJaasAuthnAddress = securityRealmAddress.and("authentication", "jaas"); if (replaceExisting) { ops.removeIfExists(securityRealmJaasAuthnAddress); new Administration(ctx.client).reloadIfRequired(); } ops.add(securityRealmJaasAuthnAddress, Values.empty() .andOptional("name", name) .andOptional("assign-groups", assignGroups)); }
Source:
public List<InputStream> getStreamingPropertyValueInputStreams(List<StreamingPropertyValue> streamingPropertyValues) { List<InputStream> results = new ArrayList<>(); for (StreamingPropertyValue streamingPropertyValue : streamingPropertyValues) { results.add(streamingPropertyValue.getInputStream()); } return results; }

Target:
public List<InputStream> getStreamingPropertyValueInputStreams(List<StreamingPropertyValue> streamingPropertyValues) { return streamingPropertyValues.stream() .map(StreamingPropertyValue::getInputStream) .collect(Collectors.toList()); }
Source:
public ResultIterator iterator(String query, int fetchSize, int readTimeoutOverride) throws DatabaseEngineException { try { getConnection(); Statement stmt = createSelectStatement(readTimeoutOverride); stmt.setFetchSize(fetchSize); logger.trace(query); return createResultIterator(stmt, query); } catch (final DatabaseEngineTimeoutException e) { throw e; } catch (final Exception e) { throw new DatabaseEngineException("Error querying", e); } }

Target:
public synchronized ResultIterator iterator(String query, int fetchSize, int readTimeoutOverride) throws DatabaseEngineException { try { getConnection(); Statement stmt = createSelectStatement(readTimeoutOverride); stmt.setFetchSize(fetchSize); logger.trace(query); return createResultIterator(stmt, query); } catch (final DatabaseEngineTimeoutException e) { throw e; } catch (final Exception e) { throw new DatabaseEngineException("Error querying", e); } }
Source:
private KafkaAdminClient(AdminClientConfig config, String clientId, Time time, AdminMetadataManager metadataManager, Metrics metrics, KafkaClient client, TimeoutProcessorFactory timeoutProcessorFactory, LogContext logContext) { this.defaultTimeoutMs = config.getInt(AdminClientConfig.DEFAULT_API_TIMEOUT_MS_CONFIG); this.requestTimeoutMs = Math.min(defaultTimeoutMs, config.getInt(AdminClientConfig.REQUEST_TIMEOUT_MS_CONFIG)); this.clientId = clientId; this.log = logContext.logger(KafkaAdminClient.class); this.time = time; this.metadataManager = metadataManager; this.metrics = metrics; this.client = client; this.runnable = new AdminClientRunnable(); String threadName = NETWORK_THREAD_PREFIX + " | " + clientId; this.thread = new KafkaThread(threadName, runnable, true); this.timeoutProcessorFactory = (timeoutProcessorFactory == null) ? new TimeoutProcessorFactory() : timeoutProcessorFactory; this.maxRetries = config.getInt(AdminClientConfig.RETRIES_CONFIG); this.retryBackoffMs = config.getLong(AdminClientConfig.RETRY_BACKOFF_MS_CONFIG); config.logUnused(); AppInfoParser.registerAppInfo(JMX_PREFIX, clientId, metrics, time.milliseconds()); log.debug("Kafka admin client initialized"); thread.start(); }

Target:
private KafkaAdminClient(AdminClientConfig config, String clientId, Time time, AdminMetadataManager metadataManager, Metrics metrics, KafkaClient client, TimeoutProcessorFactory timeoutProcessorFactory, LogContext logContext) { this.clientId = clientId; this.log = logContext.logger(KafkaAdminClient.class); configureDefaultApiTimeoutMsAndRequestTimeoutMs(config); this.time = time; this.metadataManager = metadataManager; this.metrics = metrics; this.client = client; this.runnable = new AdminClientRunnable(); String threadName = NETWORK_THREAD_PREFIX + " | " + clientId; this.thread = new KafkaThread(threadName, runnable, true); this.timeoutProcessorFactory = (timeoutProcessorFactory == null) ? new TimeoutProcessorFactory() : timeoutProcessorFactory; this.maxRetries = config.getInt(AdminClientConfig.RETRIES_CONFIG); this.retryBackoffMs = config.getLong(AdminClientConfig.RETRY_BACKOFF_MS_CONFIG); config.logUnused(); AppInfoParser.registerAppInfo(JMX_PREFIX, clientId, metrics, time.milliseconds()); log.debug("Kafka admin client initialized"); thread.start(); }
Source:
public void setAttributes(PerunSession sess, Facility facility, List<Attribute> attributes) throws InternalErrorException, WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException { List<Attribute> attributesToRemove = new ArrayList<>(); List<Attribute> attributesToSet = new ArrayList<>(); convertEmptyAttrValueToNull(attributes); for (Attribute attribute : attributes) { if (attribute.getValue() == null) { attributesToRemove.add(attribute); } else { attributesToSet.add(attribute); } } removeAttributes(sess, facility, attributesToRemove); for (Attribute attribute : attributesToSet) { if (!isCoreAttribute(sess, attribute)) { if (isVirtAttribute(sess, attribute)) { throw new InternalErrorException("Virtual attribute can't be set this way yet. Please set physical attribute."); } else { setAttributeWithoutCheck(sess, facility, attribute); } } } checkAttributesSyntax(sess, facility, attributesToSet); checkAttributesSemantics(sess, facility, attributesToSet); log.debug("IMPORTANT: ENTERING CHECK ATTRIBUTES DEPENDENCIES"); checkAttributesDependencies(sess, facility, null, attributesToSet); log.debug("IMPORTANT: EXITING CHECK ATTRIBUTES DEPENDENCIES"); }

Target:
public void setAttributes(PerunSession sess, Facility facility, List<Attribute> attributes) throws InternalErrorException, WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException { List<Attribute> attributesToRemove = new ArrayList<>(); List<Attribute> attributesToSet = new ArrayList<>(); convertEmptyAttrValueToNull(attributes); for (Attribute attribute : attributes) { if (attribute.getValue() == null) { attributesToRemove.add(attribute); } else { attributesToSet.add(attribute); } } removeAttributes(sess, facility, attributesToRemove); checkAttributesSyntax(sess, facility, attributesToSet); for (Attribute attribute : attributesToSet) { if (!isCoreAttribute(sess, attribute)) { if (isVirtAttribute(sess, attribute)) { throw new InternalErrorException("Virtual attribute can't be set this way yet. Please set physical attribute."); } else { setAttributeWithoutCheck(sess, facility, attribute); } } } checkAttributesSemantics(sess, facility, attributesToSet); checkAttributesDependencies(sess, facility, null, attributesToSet); }
Source:
public void queue( TileCanvasViewGroup viewGroup, LinkedList<Tile> tiles ) { if( tiles != null && tiles.size() > 0) { mViewGroup = new WeakReference<>( viewGroup ); viewGroup.onRenderTaskPreExecute(); int size = tiles.size(); for( int i = 0 ; i < size ; i++ ) { mFutureList.add( mExecutor.submit( new TileRenderRunnable( viewGroup, tiles.get( i ) ) ) ); } } }

Target:
public void queue( TileCanvasViewGroup viewGroup, LinkedList<Tile> tiles ) { if( tiles != null && tiles.size() > 0) { mViewGroup = new WeakReference<>( viewGroup ); viewGroup.onRenderTaskPreExecute(); for ( Tile tile : tiles ){ mFutureList.add( mExecutor.submit( new TileRenderRunnable( viewGroup, tile ) ) ); } } }
Source:
public void setManagementNetwork(String managementNetwork) { this._managementNetwork = managementNetwork; }

Target:
public void setManagementNetwork(String managementNetwork) { _managementNetwork = managementNetwork; }