Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import org.apache.aurora.scheduler.storage.CronJobStore;
public class MemCronJobStoreTest {
private CronJobStore.Mutable store; | 0 |
* Default XML attribute that needs to be present on a plugin declaration in order to specify the method
* to load rules from.
/**
* See {@link #findLoader}.
*
* @param methodAttr The XML attribute that needs to be present on a plugin declaration in order to specify the
* method ... | 0 |
return FluentIterable.from(paths) | 0 |
/*
* $Header: /cvshome/build/ee.foundation/src/java/security/acl/Acl.java,v 1.6 2006/03/14 01:20:29 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 t... | 0 |
* Concrete implementations of this class allow creation of schema service objects that vend
* Lookup a schema for the given type. If no schema exists, returns null.
public abstract <T> Schema schemaFor(TypeDescriptor<T> typeDescriptor);
* Given a type, return a function that converts that type to a {@link Row... | 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
... | 0 |
userContext = new HashMap<>();
.forServices(new ArrayList<>(clusterTopology.getBlueprint().getServices()))
Map<String, Set<String>> componentHostsMap = new HashMap<>();
componentHosts = new HashSet<>(); | 1 |
ConditionalMutation cmut = new ConditionalMutation(ByteBufferUtil.toBytes(cu.getKey()));
cmut.addCondition(cond); | 0 |
import org.apache.sshd.common.config.keys.impl.ECDSAPublicKeyEntryDecoder;
String encCurveName = KeyEntryResolver.decodeString(keyData, ECDSAPublicKeyEntryDecoder.MAX_CURVE_NAME_LENGTH);
byte[] pubKey = KeyEntryResolver.readRLEBytes(keyData, ECDSAPublicKeyEntryDecoder.MAX_ALLOWED_POINT_SIZE); | 0 |
XMLStreamReader stdXmlStreamReader =
InputStream inputStream =
xmlStreamReader = | 1 |
//@@@ review parameter hierachy building
request.getParams().setDefaults(requestExec.getParams()); | 0 |
Set<String> services = cluster.getServices().keySet(); | 0 |
private static Set<String> pkPropertyIds = new HashSet<>(
Arrays.asList(new String[]{STACK_NAME_PROPERTY_ID,
STACK_VERSION_PROPERTY_ID, SERVICE_NAME_PROPERTY_ID, PROPERTY_NAME_PROPERTY_ID}));
final Set<StackConfigurationRequest> requests = new HashSet<>();
Set<Resource> resources = new HashSet<>(); | 1 |
pipeline
.apply("CreateMainInput", Create.of(29, 31))
.apply(
"OutputSideInputs",
ParDo.of(
new DoFn<Integer, Integer>() {
@ProcessElement
public void processElement(ProcessContext... | 0 |
package org.apache.beam.sdk.util; | 0 |
import org.apache.zookeeper.server.SyncRequestProcessor;
/*
* Request processors
*/
protected CommitProcessor commitProcessor;
protected SyncRequestProcessor syncProcessor;
@Override
public void shutdown() {
LOG.info("Shutting down");
try {
super.shutdown();
... | 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... | 0 |
/**
* Update the internal timestamp by processed element (optional operation).
*/
default void updateProcessed(long stamp) {
// nop
}
/**
* Close all triggers and destroy the triggering.
*/
void close(); | 0 |
* @version $Revision$ $Date$ | 0 |
import java.security.AccessController;
import java.security.PrivilegedAction;
private static String getProperty(final String key) {
return AccessController.doPrivileged(new PrivilegedAction<String>() {
@Override
public String run() {
return System.getProperty(key);
... | 1 |
pool.shutdown(); | 1 |
private final Set<String> clearedProperties = new HashSet<>();
Set<String> keys = new HashSet<>(); | 0 |
return (this.getPrevEndRow() == null || this.getPrevEndRow().compareTo(row) < 0)
&& (this.getEndRow() == null || this.getEndRow().compareTo(row) >= 0);
return (this.getPrevEndRow() == null || this.getPrevEndRow().compareTo(row) < 0)
&& (this.getEndRow() == null || this.getEndRow().compareTo(row)... | 0 |
assertEquals("Field wasnt anonymized", "something else secret ******* / ******* is here something else 2", jsonObj.remove("someField"));
mapAnonymizeDescriptorImpl.setHideChar('X');
assertEquals("Field wasnt anonymized", "something else XXXXXXX / XXXXXXX is the secret something else 2", jsonObj.remove("some... | 0 |
* Copyright (c) OSGi Alliance (2010, 2016). All Rights Reserved.
@Version("1.5.2") | 1 |
import org.apache.hc.core5.http.ClassicHttpRequest;
import org.apache.hc.core5.http.ClassicHttpResponse;
final ClassicHttpRequest request, final HttpContext context) {
final ClassicHttpResponse response = httpexchange.getResponse(); | 0 |
Copyright 2001-2003 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... | 0 |
/*
* Copyright 2016-2018 Seznam.cz, a.s. | 0 |
* @version $Revision: 1.2 $, $Date: 2004/10/14 15:54:06 $
* @since 1.1 | 0 |
import java.util.Collections;
import java.util.List;
import java.util.Set;
@Override
public List<Set<String>> getHostGroupings(Set<String> hosts) {
// TODO
return Collections.singletonList(hosts);
} | 0 |
/* (non-Javadoc)
* @see org.apache.cocoon.components.store.impl.MRUMemoryStore#init()
*/
public void init() throws Exception {
super.init();
if (this.persistent) {
throw new Exception("A transient store cannot be backed by a persistent store."); | 0 |
Assert.assertFalse(sc.isRecoveryEnabled()); // default value of recoveryEnabled
sc.setRecoveryEnabled(true);
Assert.assertTrue(sc.isRecoveryEnabled()); | 0 |
package org.apache.commons.jexl2; | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/axes/ChildContext.java,v 1.14 2003/10/09 21:31:39 rdonkin Exp $
* $Revision: 1.14 $
* $Date: 2003/10/09 21:31:39 $
* any, must include the following acknowledgement:
* Alternate... | 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 ... | 0 |
setChildren.add(new SubResourceDefinition(Type.StackArtifact)); | 0 |
import java.io.Closeable;
interface OutputStream extends Closeable {
interface InputStream extends Closeable { | 0 |
final CopletInstance cid = manager.getCopletInstance(this.copletId); | 0 |
static final String KEY_IDENTITIES = Type.IDENTITY.getDescriptorPluralName();
static final String KEY_CONFIGURATIONS = Type.CONFIGURATION.getDescriptorPluralName();
static final String KEY_AUTH_TO_LOCAL_PROPERTIES = Type.AUTH_TO_LOCAL_PROPERTY.getDescriptorPluralName();
list = data.get(KEY_IDENTITIES);
... | 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 ... | 0 |
/*
package org.apache.ambari.server.state; | 0 |
@Override
protected int defaultTimeoutSeconds() {
return 60;
}
@Test
@Test
@Test
@Test
@Test
@Test
@Test
@Test
@Test
@Test
@Test
@Test
@Test
@Test
@Test
@Test(expected = IllegalArgumentException.class)
@Test | 0 |
@Override
*
* @param property
* the prefix property, and must be of type PropertyType.PREFIX
public Map<String,String> getAllPropertiesWithPrefix(Property property) {
Map<String,String> propMap = new HashMap<String,String>();
for (Entry<String,String> entry : this) {
* Only here for Sh... | 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 ... | 0 |
* @version $Revision$ | 0 |
import java.util.Collections;
import java.util.Set;
| 0 |
@Override | 0 |
package org.apache.cocoon.template.v2.tag.samples;
import org.apache.cocoon.template.v2.script.ScriptContext;
import org.apache.cocoon.template.v2.tag.AbstractTag; | 0 |
*
* @param stream the input stream
* @throws IOException if an error occurs while reading from the stream
* @throws ClassNotFoundException if an object read from the stream can not be loaded
*
* @param stream the output stream
* @throws IOException if an error occurs while writing to... | 0 |
@Override | 0 |
* $Revision: 1.5 $
* $Date: 2003/10/09 21:03:35 $
* Alternately, this acknowledgement may appear in the software itself,
* if and wherever such third-party acknowledgements normally appear.
* permission of the Apache Software Foundation.
* @version $Id: PoolablePreparedStatementStub.java,v 1.5 2003/10/09... | 0 |
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import com.google.inject.Inject; | 0 |
// Implementation methods | 0 |
import org.apache.xml.security.exceptions.XMLSecurityException; | 0 |
LOG.info("Calling execute(SHUTDOWN)");
System.out.println("Calling execute(SHUTDOWN)"); | 0 |
* nor may "Apache" appear in their name, without
* @version $Id: EnterpriseUnixFTPEntryParser.java,v 1.2 2003/01/26 00:21:43 dfs Exp $ | 0 |
private HashMap<String, String> elementNames = new HashMap<String, String>();
private ArrayList<Rule> rules = new ArrayList<Rule>(1);
public List<Rule> match(String matchPath) {
public List<Rule> match(String namespaceURI, String matchPath) {
List<Rule> match = decoratedRules.ma... | 0 |
import org.apache.aurora.common.zookeeper.Credentials;
if (zkClientConfig.credentials.isPresent()) {
Credentials zkCredentials = zkClientConfig.credentials.get();
return new Log(
QUORUM_SIZE.get(),
logPath.getAbsolutePath(),
zkConnectString,
zkClientConfig.session... | 0 |
import com.fasterxml.jackson.annotation.JsonProperty;
@JsonProperty("repositories")
@JsonProperty("repoVersion")
@JsonProperty("repoVersionId")
@JsonProperty("stackName")
public long getM_repoVersionId() {
return m_repoVersionId;
}
@JsonProperty("baseUrl")
@JsonProperty("repoId")
@JsonPrope... | 0 |
final boolean result = decorated().retainAll(coll);
for (final Iterator<E> it = setOrder.iterator(); it.hasNext();) { | 0 |
while (bufferLength > 0) {
Buffer buf = buffer;
int total = bufferLength;
int length = Math.min(remoteWindow.waitForSpace(), total);
int pos = buf.wpos();
buf.wpos(cmd == SshConstants.Message.SSH_MSG_CHANNEL_EXTENDED_DATA ? 14 :... | 0 |
package org.apache.atlas.repository.graph;
import org.apache.atlas.MetadataException;
import org.apache.atlas.discovery.SearchIndexer;
import org.apache.atlas.repository.Constants;
import org.apache.atlas.repository.RepositoryException;
import org.apache.atlas.typesystem.types.AttributeInfo;
import org.apache.atlas.typ... | 0 |
* Copyright 2000-2009 The Apache Software Foundation | 0 |
class ClipKey {
/**
* This clip hash code. Based on the serialized path
* data
*/
int hashCodeValue = 0;
/**
* @param proxiedPath path used as an index in the Map
*/
public ClipKey(GeneralPath proxiedPath ){
String pathData = SVGPath.toSVGPathData(proxiedPath);
h... | 0 |
package org.apache.hc.core5.testing.nio; | 0 |
import java.lang.reflect.Array;
/**
* This method will stringify a Java object. It is mostly used to print the values
* of unknown properties. This method will correctly handle if the passed object
* is array and will property display it.
*
* If the value is byte[] the elements are shown a... | 0 |
case ZooDefs.OpCode.create:
case ZooDefs.OpCode.create2:
case ZooDefs.OpCode.create2: | 0 |
import org.apache.accumulo.core.client.mapreduce.InputTableConfig;
private InputTableConfig tableQueryConfig;
tableQueryConfig = new InputTableConfig();
InputTableConfig actualConfig = deserialize(serialized);
InputTableConfig actualConfig = deserialize(serialized);
InputTableConfig actualConfig = des... | 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... | 0 |
* @version $Revision$ $Date$ | 0 |
public Principal getPrincipal() { | 0 |
/**
* Copyright 2013 Apache Software Foundation | 0 |
import com.google.common.base.Preconditions;
import com.google.common.collect.Sets; | 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 ap... | 1 |
import java.util.Iterator;
// POOL-288. Not all the traced objects will be statements
List traces = getTrace();
if(traces != null) {
Iterator traceIter = traces.iterator();
while (traceIter.hasNext()) {
Object trace = traceIter.next... | 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... | 0 |
import org.apache.mesos.v1.Protos.Offer;
import org.apache.mesos.v1.Protos.Resource; | 0 |
* @version $Revision$ $Date$ | 0 |
package org.apache.felix.scrplugin.om; | 0 |
import java.util.Collection;
import javax.persistence.EntityManager;
import javax.persistence.TypedQuery;
import org.apache.ambari.server.orm.RequiresSession;
import org.apache.ambari.server.orm.entities.KeyValueEntity;
| 0 |
return boundedIterator(iterator, 0, max);
return new BoundedIterator<E>(iterator, offset, max); | 0 |
private final CodeValidator isbn10Validator = new CodeValidator(ISBN10_REGEX, 10, ISBN10CheckDigit.ISBN10_CHECK_DIGIT);
private final CodeValidator isbn13Validator = new CodeValidator(ISBN13_REGEX, 13, EAN13CheckDigit.EAN13_CHECK_DIGIT); | 0 |
* This <code>ClassLoader</code> implementation only grants permission to
* A <code>URLClassLoader</code> extension is needed in case the user | 0 |
super(org.apache.commons.bcel6.Const.FSUB); | 0 |
import org.apache.sshd.util.test.NoIoTestCase;
import org.junit.experimental.categories.Category;
@Category({ NoIoTestCase.class })
public AuthorizedKeyEntryLoginOptionsParseTest(
String value, String loginPart, String keyPart, Map<String, String> options) { | 0 |
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static final Logger LOG = LoggerFactory.getLogger(AsyncTest.class); | 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 u... | 0 |
import com.google.cloud.dataflow.sdk.options.PipelineOptions;
import com.google.cloud.dataflow.sdk.util.common.worker.SourceFormat;
* Creates {@code SourceFormat} objects from {@code Source}.
public class SourceFormatFactory {
private SourceFormatFactory() {}
public static SourceFormat create(PipelineOptions optio... | 0 |
shutdownRegistry.addAction(EasyMock.<ExceptionalCommand<?>>anyObject()); | 0 |
* @version $Revision$ $Date$ | 0 |
package org.apache.batik.refimpl.gvt; | 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 ... | 0 |
* @throws NullPointerException if the collection is null
throw new NullPointerException("Collection must not be null."); | 0 |
@Test(expectedExceptions = TypeNotFoundException.class)
public void testCreateEntityWithUnknownDatatype() throws Exception {
Referenceable entity = new Referenceable("Unknown datatype");
String dbName = RandomStringUtils.randomAlphanumeric(10);
entity.set("name", dbName);
entity... | 0 |
import org.apache.commons.configuration.ex.ConfigurationException; | 0 |
Copyright 2001 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 a... | 0 |
/*
* Copyright (C) 2015 Google Inc.
*
* 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 ... | 0 |
JavaRDD<WindowedValue<KV<K, V>>> rdd,
Coder<K> keyCoder,
WindowedValueCoder<V> wvCoder,
boolean defaultParallelism) {
JavaPairRDD<ByteArray, Iterable<byte[]>> groupedRDD;
if (defaultParallelism) {
groupedRDD =
pairRDD.groupByKey(new HashPartitioner(rdd.rdd().sparkContext(... | 0 |
import java.math.BigDecimal;
public Object expr(CommandSessionImpl session, CharSequence expr) {
return new Expression(expr.toString()).eval(session.variables);
} | 0 |
import org.apache.hc.core5.annotation.Contract;
import org.apache.hc.core5.annotation.ThreadingBehavior;
@Contract(threading = ThreadingBehavior.IMMUTABLE) | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.