Diff
stringlengths 5
2k
| FaultInducingLabel
int64 0
1
|
---|---|
import org.apache.felix.dm.annotation.api.Inject;
@Inject | 0 |
bqOptions = TestPipeline.testingPipelineOptions().as(BigQueryOptions.class);
Pipeline p = TestPipeline.create(options); | 0 |
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License. | 0 |
import org.apache.beam.runners.core.metrics.MetricsContainerStepMap;
MetricsContainerStepMap metricsContainerRegistry = new MetricsContainerStepMap();
PCollectionConsumerRegistry pCollectionConsumerRegistry =
new PCollectionConsumerRegistry(metricsContainerRegistry);
PTransformFunctionRegistry startFunctionRegistry =
new PTransformFunctionRegistry(metricsContainerRegistry);
PTransformFunctionRegistry finishFunctionRegistry =
new PTransformFunctionRegistry(metricsContainerRegistry);
// There always needs to be a metricContainer in scope, not everything is calculated in the
// context of a PTransform. For example, element count metrics are calculated before entering
// a pTransform's context.
MetricsContainerImpl rootMetricsContainer = metricsContainerRegistry.getUnboundContainer();
try (Closeable closeable = MetricsEnvironment.scopedMetricsContainer(rootMetricsContainer)) {
}
for (MonitoringInfo mi : metricsContainerRegistry.getMonitoringInfos()) {
response.addMonitoringInfos(mi); | 0 |
import org.apache.mesos.Protos.TaskInfo;
private final MesosTaskFactory taskFactory;
* @param taskFactory Factory to contstruct mesos task objects.
QuotaManager quotaManager,
MesosTaskFactory taskFactory) {
this.taskFactory = checkNotNull(taskFactory);
public synchronized Optional<TaskInfo> createTask(Offer offer) {
private TaskInfo assignTask(Offer offer, ScheduledTask task) {
return taskFactory.createFrom(task.getAssignedTask(), offer.getSlaveId()); | 0 |
() -> {
takeCheckpointNow(); | 0 |
import org.apache.mesos.Protos.TaskState; | 0 |
* Unified interface for Flink batch and stream execution environments
public ExecutionEnvironment(Mode mode, boolean local) {
batchEnv = local ? org.apache.flink.api.java.ExecutionEnvironment.createLocalEnvironment() :
streamEnv = local ? StreamExecutionEnvironment.createLocalEnvironment() : | 0 |
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ambari.server.events;
import java.util.List;
import org.apache.ambari.server.actionmanager.HostRoleCommand;
/**
* The {@link TaskUpdateEvent} is to be fired every time
* when host role commands are merged to the database
*/
public class TaskUpdateEvent extends TaskEvent{
public TaskUpdateEvent(List<HostRoleCommand> hostRoleCommandList) {
super(hostRoleCommandList);
}
} | 1 |
import org.w3c.dom.svg.SVGSVGElement;
SVGSVGElement svgElement = (SVGSVGElement)
((SVGElement)element).getOwnerSVGElement();
if (svgElement == null)
svgElement = (SVGSVGElement)element;
String language = svgElement.getContentScriptType(); | 0 |
String type = (String) configMap.get(ConfigurationResourceProvider.TYPE);
String tag = (String) configMap.get(ConfigurationResourceProvider.TAG); | 0 |
import org.apache.accumulo.test.MiniAccumuloCluster;
ContinuousIngest.main(new String[] {"-i", instanceName, "-z", zookeepers, "-u", "root", "-p", rootPassword, "--table", "ci", "--num", "5000000",
"--batchMemory", "1000000"});
ContinuousVerify.main(new String[] {"-D", "mapred.job.tracker=local", "-D", "fs.default.name=file:///", "-i", instanceName, "-z", zookeepers, "-u",
"root", "-p", rootPassword, "--table", "ci", "--output", outputDir, "--maxMappers", "4", "--reducers", "1"}); | 0 |
* @version CVS $Id: SitemapRedirector.java,v 1.2 2003/09/05 11:40:41 cziegeler Exp $
| 0 |
Map<String,String> props = new HashMap<>(); | 1 |
* Gets the singleton builder.
*
* @return the singleton builder. | 0 |
as.addAttribute
(GVTAttributedCharacterIterator.TextAttribute.STROKE_PAINT, p); | 0 |
factory.setProperty(XMLInputFactory.SUPPORT_DTD, false);
factory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false); | 0 |
import org.apache.http.nio.impl.ContentInputBuffer; | 0 |
int numThreads = 100;
done.await();
Throwable actuallyThrown = thrown.get();
if (actuallyThrown != null) {
throw actuallyThrown; | 0 |
ABORT,
UPGRADE | 0 |
import org.apache.http.params.HttpConnectionParams;
private int maxLineLen = -1;
this.maxLineLen = params.getIntParameter(HttpConnectionParams.MAX_LINE_LENGTH, -1);
public int read() throws IOException {
return this.buffer.get() & 0xff;
if (this.maxLineLen > 0 && charbuffer.length() >= this.maxLineLen) {
throw new IOException("Maximum line length limit exceeded");
} | 0 |
* @version $Id$ | 0 |
final float[] kernelData = new float [len];
final int[] srcPixels = srcDB.getBankData()[0];
final int[] destPixels = dstDB.getBankData()[0];
final int[] srcPixels = srcDB.getBankData()[0];
final int[] destPixels = dstDB.getBankData()[0]; | 0 |
public long getRamGb() {
return ramMb / 1024;
public long getDiskGb() {
return diskMb / 1024; | 0 |
if (!isClosedInternal()) {
setClosedInternal(true);
if (isClosedInternal() && delegate != null) { | 0 |
* @version $Revision: 1.2 $ $Date: 2002/11/23 00:33:54 $ | 0 |
protected void onEntityEnclosed(
final HttpEntity entity, final ContentType contentType) throws IOException {
long len = entity.getContentLength();
if (len > Integer.MAX_VALUE) {
throw new ContentTooLongException("Entity content is too long: " + len);
}
if (len < 0) {
len = 4096;
}
this.buf = new SimpleInputBuffer((int) len, new HeapByteBufferAllocator());
this.response.setEntity(new ContentBufferEntity(entity, this.buf)); | 0 |
@Override
@Override | 1 |
import org.apache.commons.vfs.provider.VfsComponentContext;
* @version $Revision: 1.2 $ $Date: 2002/11/23 00:33:52 $ | 0 |
canvas.setPreferredSize(new Dimension(450, 500));
f.pack(); | 0 |
* @use org.apache.accumulo.core.iterators.user.SummingCombiner with SummingCombiner.Type.VARLEN | 0 |
* http://www.apache.org/licenses/LICENSE-2.0 | 0 |
new Field("avg_latency", Double.class),
if (metric.startsWith("avg_")) {
fields.add(new Field(metric, Double.class));
} else {
fields.add(new Field(metric, Long.class));
} | 0 |
* @version CVS $Id: EPCols.java,v 1.2 2003/03/11 19:05:01 vgritsenko Exp $ | 0 |
/**
* Get a true or false value specifying
* whether credential store is supported by this service.
* @return true or false
*/
boolean isCredentialStoreSupported();
/**
* Set a true or false value specifying if this
* service supports credential store.
*
* @param credentialStoreSupported - true or false
*/
void setCredentialStoreSupported(boolean credentialStoreSupported);
/**
* Get a true or false value specifying whether
* credential store use is enabled for this service.
*
* @return true or false
*/
boolean isCredentialStoreEnabled();
/**
* Set a true or false value specifying whether this
* service is to be enabled for credential store use.
*
* @param credentialStoreEnabled - true or false
*/
void setCredentialStoreEnabled(boolean credentialStoreEnabled);
| 0 |
for (@SuppressWarnings("unused")
Entry<Key,Value> unused : c.createScanner(MetadataTable.NAME, Authorizations.EMPTY))
final Map<String,Integer> counts = new HashMap<String,Integer>();
for (String tableName : new String[] {MetadataTable.NAME, RootTable.NAME}) {
// the replication table is expected to be offline for this test, so ignore it
if (offline > 1) {
| 0 |
public static final String NODE_SERVER_STATE_UP = "UP";
public static final String NODE_SERVER_STATE_DOWN = "DOWN";
/*
* name should be component name : role name
* TODO : May be we can have component and role as two separate attributes instead of name
*/
@XmlElement(name = "Name", required = true)
protected String name;
@XmlElement(name = "State", required = true)
protected String state; // UP/DOWN
@XmlElement(name = "LastStateUpdateTime", required = true)
/**
*
*/
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* @return the state
*/
public String getState() {
return state;
}
/**
* @param state the state to set
*/
public void setState(String state) {
this.state = state;
}
/**
* @return the lastStateUpdateTime
*/
public XMLGregorianCalendar getLastStateUpdateTime() {
return lastStateUpdateTime;
}
/**
* @param lastStateUpdateTime the lastStateUpdateTime to set
*/
public void setLastStateUpdateTime(XMLGregorianCalendar lastStateUpdateTime) {
this.lastStateUpdateTime = lastStateUpdateTime;
}
/**
* @param creationTime the creationTime to set
*/
protected void setLastUpdateTime(Date lastStateUpdateTime) throws Exception {
GregorianCalendar cal = new GregorianCalendar();
cal.setTime(lastStateUpdateTime);
this.lastStateUpdateTime = DatatypeFactory.newInstance().newXMLGregorianCalendar(cal);
} | 0 |
import java.util.Properties;
hostname,
port);
Properties config = new Properties();
//set StrictHostKeyChecking property
String strictHostKeyChecking = SftpFileSystemConfigBuilder.getInstance().getStrictHostKeyChecking(fileSystemOptions);
if (strictHostKeyChecking != null)
{
config.setProperty("StrictHostKeyChecking", strictHostKeyChecking);
}
//set compression property
String compression = SftpFileSystemConfigBuilder.getInstance().getCompression(fileSystemOptions);
if (compression != null)
{
config.setProperty("compression.s2c", strictHostKeyChecking);
config.setProperty("compression.c2s", strictHostKeyChecking);
}
//set properties for the session
if (config.size() > 0)
{
session.setConfig(config);
}
| 0 |
import org.apache.aurora.scheduler.TierManager.TierManagerImpl.TierConfig;
public static final TierConfig DEV_TIER_CONFIG =
new TierConfig(ImmutableMap.of("tier-dev", new TierInfo(false))); | 0 |
final HttpMessage message = new TestHttpMessage();
final Header[] headers = message.getAllHeaders();
final HttpMessage message = new TestHttpMessage();
final HttpMessage message = new TestHttpMessage();
} catch (final IllegalArgumentException ex) {
} catch (final IllegalArgumentException ex) { | 0 |
public static final DefaultEquator INSTANCE = new DefaultEquator<>(); | 1 |
private final Queue<Nio2DefaultIoWriteFuture> writes = new LinkedTransferQueue<Nio2DefaultIoWriteFuture>();
private final AtomicReference<Nio2DefaultIoWriteFuture> currentWrite = new AtomicReference<Nio2DefaultIoWriteFuture>();
final Nio2DefaultIoWriteFuture future = new Nio2DefaultIoWriteFuture(null, buf);
Nio2DefaultIoWriteFuture future = writes.poll();
final Nio2DefaultIoWriteFuture future = writes.peek();
final ByteBuffer buffer = future.getBuffer();
socket.write(buffer, null, new Nio2CompletionHandler<Integer, Object>() {
if (buffer.hasRemaining()) {
socket.write(buffer, null, this); | 0 |
* Copyright 2017 Seznam.cz, a.s. | 0 |
requestProps.put(UpgradeResourceProvider.UPGRADE_VERSION, "2.1.1.0");
List<UpgradeGroupEntity> groups = upgrade.getUpgradeGroups();
assertEquals("Downgrade groups reduced from 3 to 2", 1, groups.size());
group = upgrade.getUpgradeGroups().get(0);
assertEquals(repoVersionEntity2110.getVersion(), sch.getVersion());
assertEquals(repoVersionEntity2200, s.getDesiredRepositoryVersion());
assertEquals(repoVersionEntity2200, sc.getDesiredRepositoryVersion());
assertEquals(repoVersionEntity2110, component.getDesiredRepositoryVersion()); | 0 |
* Copyright 1999-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
* @version CVS $Id: XPathDirectoryGenerator.java,v 1.8 2004/03/05 13:02:55 bdelacretaz Exp $
* @version CVS $Id: XPathDirectoryGenerator.java,v 1.8 2004/03/05 13:02:55 bdelacretaz Exp $ | 1 |
final Map<String,Set<Text>> groups =
shellState.getConnector().tableOperations().getLocalityGroups(tableName); | 0 |
void validateTopology() throws InvalidTopologyException;
void validateRequiredProperties() throws InvalidTopologyException; | 0 |
* @author <a href="mailto:[email protected]">Felix Project Team</a>
} | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//dbutils/src/test/org/apache/commons/dbutils/handlers/ScalarHandlerTest.java,v 1.2 2004/01/11 22:30:38 dgraham Exp $
* $Revision: 1.2 $
* $Date: 2004/01/11 22:30:38 $
* Copyright (c) 2003-2004 The Apache Software Foundation. All rights | 0 |
class ServiceResourceProvider extends AbstractResourceProvider {
Set<ServiceResponse> responses = getResources(new Command<Set<ServiceResponse>>() {
Set<String> requestedIds = getRequestPropertyIds(request, predicate); | 0 |
/** The buffer containing the text node being read */
/** The stack of configuration nodes */
public void characters(char[] ch, int start, int length) throws SAXException | 0 |
metricsConf.set("timeline.metrics.transient.metric.patterns", "topology%");
byte[] uuid = metadataManager.getUuid(metric, true); | 0 |
super("ApacheXMLDSig", 2.12, INFO); | 0 |
package org.apache.felix.ipojo.test.scenarios.service.dependency.proxy;
import java.util.Properties;
import org.apache.felix.ipojo.test.scenarios.service.dependency.service.CheckService;
import org.apache.felix.ipojo.test.scenarios.service.dependency.service.FooService;
import org.osgi.framework.BundleContext;
public class CheckServiceGetAndDelegate implements CheckService {
private FooService fs;
private Helper helper;
public CheckServiceGetAndDelegate(BundleContext bc) {
helper = new Helper(bc, fs);
}
public boolean check() {
fs.foo();
return helper.check();
}
public Properties getProps() {
fs.getBoolean();
return helper.getProps();
}
} | 0 |
package org.apache.felix.ipojo.runtime.core.services;
public interface Service {
public int count();
} | 0 |
import com.google.inject.internal.Preconditions;
import javax.annotation.Nullable;
public class ThriftBinaryCodec<T extends TBase> implements Codec<T, byte[]>{
private final Class<T> thriftClassType;
public ThriftBinaryCodec(Class<T> thriftClassType) {
this.thriftClassType = Preconditions.checkNotNull(thriftClassType);
}
@Nullable
T t = null;
try {
t = thriftClassType.newInstance();
} catch (InstantiationException e) {
throw new CodingException("Failed to instantiate target type.", e);
} catch (IllegalAccessException e) {
throw new CodingException("Failed to access constructor for target type.", e);
}
@Nullable | 0 |
import org.apache.ambari.server.state.MaintenanceState;
sch.setMaintenanceState(MaintenanceState.ON);
LOG.info("Decommissioning " + slaveCompType + " and marking Maintenance=ON on " + sch.getHostName());
sch.setMaintenanceState(MaintenanceState.OFF);
LOG.info("Recommissioning " + slaveCompType + " and marking Maintenance=OFF on " + sch.getHostName());
execCmd.setPassiveInfo(MaintenanceStateHelper.getMaintenanceHostCompoments(clusters, cluster)); | 0 |
* Copyright (c) OSGi Alliance (2000, 2008). All Rights Reserved.
* @version $Revision: 5654 $
* @ThreadSafe
* <code>Device.MATCH_NONE</code> if the category of the Device service is
* not recognized.
* @param reference the <code>ServiceReference</code> object of the device
* to match
* Device service
* A return value of <code>null</code> indicates that this Driver service
* has successfully attached to the given Device service. If this Driver
* service is unable to attach to the given Device service, but knows of a
* more suitable Driver service, it must return the <code>DRIVER_ID</code>
* of that Driver service. This allows for the implementation of referring
* drivers whose only purpose is to refer to other drivers capable of
* handling a given Device service.
* @param reference the <code>ServiceReference</code> object of the device
* to attach to
* @return <code>null</code> if this Driver service has successfully
* attached to the given Device service, or the
* <code>DRIVER_ID</code> of a more suitable driver
* device and does not know of a more suitable driver | 0 |
import org.osgi.framework.ServiceRegistration;
public class OsgiProbes extends NotificationBroadcasterSupport implements BundleActivator, OsgiProbesMBean {
private static final String TAB_NAME_STRING = "TabUI:name=OsgiProbes";
private ServiceRegistration sr = null;
java.util.Properties p = new java.util.Properties();
p.put(org.apache.felix.mosgi.jmx.agent.Constants.OBJECTNAME, TAB_NAME_STRING);
this.sr = this.bc.registerService(OsgiProbesMBean.class.getName(), this, p);
this.version=(String)bc.getBundle().getHeaders().get(Constants.BUNDLE_VERSION);
this.sr.unregister(); | 0 |
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License. | 0 |
UserResponse resp = new UserResponse(u.getUserName(), u.getUserType(), u.isLdapUser(), u.isActive(), u
.isAdmin());
UserResponse resp = new UserResponse(u.getUserName(), u.getUserType(), u.isLdapUser(), u.isActive(), u
.isAdmin()); | 0 |
* using {@link java.util.Collections#synchronizedMap(Map)}. This class may throw
public class IdentityMap<K, V>
extends AbstractHashedMap<K, V> implements Serializable, Cloneable {
* Constructs a new, empty map with the specified initial capacity.
* load factor.
public IdentityMap(Map<K, V> map) {
*
*
*
*
protected IdentityEntry<K, V> createEntry(HashEntry<K, V> next, int hashCode, K key, V value) {
return new IdentityEntry<K, V>(next, hashCode, key, value);
protected static class IdentityEntry<K, V> extends HashEntry<K, V> {
protected IdentityEntry(HashEntry<K, V> next, int hashCode, K key, V value) {
Map.Entry<?, ?> other = (Map.Entry<?, ?>) obj;
public IdentityMap<K, V> clone() {
return (IdentityMap<K, V>) super.clone();
| 0 |
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ambari.server.controller;
import java.util.List;
import java.util.Map;
public class ServiceComponentHostResponse {
String clusterName; // REF
List<PerServiceComponentHostResponse> hostComponents;
public static class PerServiceComponentHostResponse {
String serviceName;
String componentName;
String hostname;
// Config type -> version mapping
Map<String, String> configVersions;
String liveState;
String stackVersion;
}
} | 0 |
import com.dataartisans.flink.dataflow.translation.types.KvCoderTypeInformation;
import com.google.cloud.dataflow.sdk.coders.KvCoder;
if (outputCoder instanceof KvCoder) {
return new KvCoderTypeInformation((KvCoder) outputCoder);
} else {
return new CoderTypeInformation(outputCoder);
} | 0 |
public abstract class AbstractContainerWidget extends AbstractWidget
implements ContainerWidget {
protected ValidationError validationError;
| 0 |
assertTrue(cardNumber.equals(cc)); | 0 |
log.verbose("Block urn: " + installBlock.getUrn()); | 0 |
* Returns 0 if the stream is at EOF, else the underlying inputStream will be queried.
* Get the number of bytes read by this input stream. | 0 |
* or more contributor license agreements. See the NOTICE file
* regarding copyright ownership. The ASF licenses this file
* with the License. You may obtain a copy of the License at
* KIND, either express or implied. See the License for the | 0 |
NtlmPasswordAuthentication auth = null;
if (authData != null)
{
auth = new NtlmPasswordAuthentication(
UserAuthenticatorUtils.toString(
UserAuthenticatorUtils.getData(authData, UserAuthenticationData.DOMAIN,
UserAuthenticatorUtils.toChar(smbFileName.getDomain()))),
UserAuthenticatorUtils.toString(
UserAuthenticatorUtils.getData(authData, UserAuthenticationData.USERNAME,
UserAuthenticatorUtils.toChar(smbFileName.getUserName()))),
UserAuthenticatorUtils.toString(
UserAuthenticatorUtils.getData(authData, UserAuthenticationData.PASSWORD,
UserAuthenticatorUtils.toChar(smbFileName.getPassword()))));
}
// if auth == null SmbFile uses default credentials
// ("jcifs.smb.client.domain", "?"), ("jcifs.smb.client.username", "GUEST"),
// ("jcifs.smb.client.password", BLANK);
// ANONYMOUS=("","","")
if (file.isDirectory() && !file.toString().endsWith("/"))
{
file = new SmbFile(path + "/", auth);
}
return file;
UserAuthenticatorUtils.cleanup(authData); // might be null | 0 |
import org.apache.sshd.common.session.ConnectionService;
private final ConnectionService service;
public AgentServerProxy(ConnectionService service) throws IOException {
this.service = service;
this.service.registerChannel(channel); | 0 |
import org.osgi.framework.Bundle;
final Method m = factory.getClass().getMethod("getLogger", new Class[] {Bundle.class, String.class, Class.class});
return m.invoke(factory, new Object[] {componentContext.getBundleContext().getBundle(), componentType, targetType}); | 0 |
if (option == null)
{
// reset the option previously selected
selected = null;
return;
}
if (selected == null || selected.equals(option.getKey()))
selected = option.getKey(); | 0 |
public E lower(final E e) {
public E floor(final E e) {
public E ceiling(final E e) {
public E higher(final E e) {
public NavigableSet<E> subSet(final E fromElement, final boolean fromInclusive, final E toElement, final boolean toInclusive) {
public NavigableSet<E> headSet(final E toElement, final boolean inclusive) {
public NavigableSet<E> tailSet(final E fromElement, final boolean inclusive) { | 0 |
public ClusterUpdate() {
}
| 0 |
* Copyright 2002,2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* @version $Id: Info.java,v 1.3 2004/02/28 13:45:21 yoavs Exp $ | 0 |
import org.apache.http.nio.reactor.IOReactorStatus;
if (this.ioreactor.getStatus().compareTo(IOReactorStatus.ACTIVE) <= 0) {
processNextPendingRequest();
} | 0 |
aci.first();
int count = getCharacterCount(i, i);
for (int n=0; n<count; n++) {
int glyphCharIndex = ((Integer)aci.getAttribute
(GVTAttributedCharacterIterator.TextAttribute.CHAR_INDEX)).intValue();
if (charIndex == glyphCharIndex)
return i;
if (aci.next() == AttributedCharacterIterator.DONE)
return -1; | 0 |
* @version $Revision$ | 1 |
System.out.println("Reading file: " + path.makeQualified(fs.getUri(), fs.getWorkingDirectory()).toString()); | 0 |
/** Sets the priority.
/** Sets the name.
/** Sets the action.
/** Sets the mode. | 0 |
/*
* Copyright 1999-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.cocoon.bean.query;
import org.apache.avalon.framework.context.Context;
import org.apache.avalon.framework.context.Contextualizable;
/**
* A component to help you get the Avalon Context.
* Probably only a temporary solution to getting this from within a FlowScript.
* cocoon.createObject (Packages.org.apache.cocoon.bean.query.ContextAccess);
*
* @version CVS $Id: ContextAccess.java 30941 2004-07-29 19:56:58Z vgritsenko $
*/
public class ContextAccess implements Contextualizable {
private Context avalonContext;
/* (non-Javadoc)
* @see org.apache.avalon.framework.context.Contextualizable#contextualize(org.apache.avalon.framework.context.Context)
*/
public void contextualize(Context avalonContext) {
this.avalonContext = avalonContext;
}
/**
* Return the Avalon Context
* @return The context object
*/
public Context getAvalonContext() {
return this.avalonContext;
}
} | 0 |
implements ListIterator, ResettableListIterator { | 0 |
* Flag indicating how unrecognized tokens are handled. <code>true</code> to stop
* <code>false</code> to throw an exception.
* @param stopAtNonOption if <code>true</code> an unrecognized argument stops
* {@link CommandLine}s args list. If <code>false</code> an unrecognized | 0 |
import org.apache.http.HttpStatus; | 0 |
import org.apache.ambari.annotations.ApiIgnore;
@POST @ApiIgnore // until documented
@POST @ApiIgnore // until documented
@GET @ApiIgnore // until documented
@GET @ApiIgnore // until documented
@PUT @ApiIgnore // until documented | 0 |
import cz.seznam.euphoria.core.client.dataset.windowing.Window;
public <WID extends Window, T, KEY, VALUE>
WindowedStream<StreamingWindowedElement<WID, Pair<KEY, VALUE>>,
AttachedWindow<WID>>
attachedWindow(DataStream<StreamingWindowedElement<WID, T>> input,
DataStream<StreamingWindowedElement<WID, Pair<KEY, VALUE>>> mapped
WID wid = i.getWindow();
final KeyedStream<StreamingWindowedElement<WID, Pair<KEY, VALUE>>, KEY> keyed;
public <T, WID extends Window, KEY, VALUE>
WindowedStream<MultiWindowedElement<WID, Pair<KEY, VALUE>>, KEY, FlinkWindow<WID>>
Windowing<T, WID> windowing) {
DataStream<MultiWindowedElement<WID, Pair<KEY, VALUE>>>
windowing.assignWindowsToElement((StreamingWindowedElement) i),
KeyedStream<MultiWindowedElement<WID, Pair<KEY, VALUE>>, KEY> keyed
Utils.wrapQueryable((MultiWindowedElement<WID, Pair<KEY, VALUE>> in)
static final class WeKeySelector<WID extends Window, KEY, VALUE> implements
KeySelector<StreamingWindowedElement<WID, Pair<KEY, VALUE>>, KEY>
public KEY getKey(StreamingWindowedElement<WID, Pair<KEY, VALUE>> value) | 0 |
package org.apache.felix.karaf.gshell.features.completers;
import org.apache.felix.karaf.gshell.features.management.ManagedFeature;
import org.apache.felix.karaf.gshell.features.management.ManagedFeaturesRegistry; | 0 |
* @param newSwitchDefault the default state
public final SwitchBuilder withSwitchDefault(final Boolean newSwitchDefault) {
this.switchDefault = newSwitchDefault; | 0 |
package org.apache.accumulo.shell;
import org.apache.accumulo.shell.ShellUtil; | 0 |
Query.jobScoped(Tasks.INFO_TO_JOB_KEY.apply(task)) | 0 |
import org.apache.ambari.server.security.authentication.kerberos.AmbariKerberosAuthenticationProvider;
import org.apache.ambari.server.security.authentication.kerberos.AmbariProxiedUserDetailsService;
AmbariKerberosAuthenticationProvider ambariKerberosAuthenticationProvider
.authenticationProvider(ambariKerberosAuthenticationProvider);
public AmbariKerberosAuthenticationProvider ambariKerberosAuthenticationProvider(
AmbariAuthToLocalUserDetailsService authToLocalUserDetailsService,
AmbariProxiedUserDetailsService proxiedUserDetailsService) {
return new AmbariKerberosAuthenticationProvider(authToLocalUserDetailsService,
proxiedUserDetailsService,
ambariKerberosTicketValidator); | 0 |
TableConfiguration acuTableConf, KeyExtent extent, CompactionEnv env, List<IteratorSetting> iterators, MajorCompactionReason reason) {
this(conf, fs, files, imm, outputFile, propogateDeletes, acuTableConf, extent, env, new ArrayList<IteratorSetting>(), null);
mfw.append(itr.getTopKey(), itr.getTopValue()); | 0 |
ig.setFont(new Font("Arial", Font.PLAIN, 10)); | 0 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList;
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Lists; | 0 |
public void apply(BundleForm.BundleStatus[] newStatus) throws IOException, BundleException { | 0 |
/*
* $Header: /cvshome/build/ee.foundation/src/java/io/Writer.java,v 1.6 2006/03/14 01:20:24 hargrave Exp $
*
* (C) Copyright 2001 Sun Microsystems, Inc.
* Copyright (c) OSGi Alliance (2001, 2005). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package java.io;
public abstract class Writer {
protected Writer() { }
protected Writer(java.lang.Object var0) { }
public abstract void close() throws java.io.IOException;
public abstract void flush() throws java.io.IOException;
public void write(char[] var0) throws java.io.IOException { }
public abstract void write(char[] var0, int var1, int var2) throws java.io.IOException;
public void write(int var0) throws java.io.IOException { }
public void write(java.lang.String var0) throws java.io.IOException { }
public void write(java.lang.String var0, int var1, int var2) throws java.io.IOException { }
protected java.lang.Object lock;
}
| 0 |
static final List<Class<? extends Checksum>> CRCS = new ArrayList<>();
final List<BenchResult> previous = new ArrayList<>(); | 0 |
package org.apache.accumulo.core.client.sample; | 0 |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.felix.dm.samples.annotation;
import org.apache.felix.dm.annotation.api.AspectService;
import org.apache.felix.dm.annotation.api.Param;
import org.apache.felix.dm.annotation.api.ServiceDependency;
import org.osgi.framework.Constants;
import org.osgi.service.log.LogService;
/**
* This aspect wraps a Dictionary and checks the "aspect" word on behalf of it.
*/
@AspectService(
filter="(!(" + Constants.SERVICE_RANKING + "=*))",
properties={@Param(name=Constants.SERVICE_RANKING, value="1")}
)
public class DictionaryAspect implements DictionaryService
{
/**
* This is the service this aspect is applying to.
*/
private volatile DictionaryService m_originalDictionary;
/**
* We'll use the OSGi log service for logging. If no log service is available, then we'll use a NullObject.
*/
@ServiceDependency(required = false)
private LogService m_log;
public boolean checkWord(String word)
{
m_log.log(LogService.LOG_DEBUG, "DictionaryAspect: checking word " + word);
if (word.equals("aspect")) {
return true;
}
return m_originalDictionary.checkWord(word);
}
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.