Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
key.seq = 1L;
0
* Attempts to close this channel are ignored, and {@link #isOpen} always
0
return keyId == null ? null : keyId.clone(); return keyPacket == null ? null : keyPacket.clone(); if ((tag & 6) != 6 && (tag & 14) != 14 && (tag & 5) != 5 && (tag & 7) != 7) {
0
m_repositoryVersion, null, null);
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
1
import javax.naming.OperationNotSupportedException; /* (non-Javadoc) * @see org.osgi.service.startlevel.StartLevel#isBundleActivationPolicyUsed(org.osgi.framework.Bundle) **/ public boolean isBundleActivationPolicyUsed(Bundle bundle) { throw new UnsupportedOperationException("This feature has not yet been implemented."); }
1
import org.apache.sshd.util.test.NoIoTestCase; import org.junit.experimental.categories.Category; @Category({ NoIoTestCase.class })
0
package com.twitter.aurora.scheduler.thrift; import com.twitter.aurora.scheduler.thrift.FeatureToggleSchedulerController.Delegate; import com.twitter.aurora.scheduler.thrift.FeatureToggleSchedulerController.EnableUpdates; import com.twitter.aurora.scheduler.thrift.auth.CapabilityValidator.Capability; import com.twitter.aurora.scheduler.thrift.auth.ThriftAuthModule;
0
import org.apache.accumulo.server.mini.MiniAccumuloCluster;
0
import javax.servlet.SessionCookieConfig; SessionCookieConfig sessionCookieConfig = createNiceMock(SessionCookieConfig.class); expect(sessionCookieConfig.getName()).andReturn("SESSION_COOKIE").anyTimes(); expect(sessionManager.getSessionCookieConfig()).andReturn(sessionCookieConfig).anyTimes(); replay(sessionManager, sessionCookieConfig); verify(sessionManager, sessionCookieConfig);
0
import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; import org.junit.Test; public class Base32Test { @Test @Test @Test @Test @Test @Test @Test
1
@Mojo(name = "start", defaultPhase = LifecyclePhase.PRE_INTEGRATION_TEST, requiresDependencyResolution = ResolutionScope.TEST) @Parameter(defaultValue = "${project.build.directory}", alias = "outputDirectory", property = "accumulo.outputDirectory", required = true) @Parameter(defaultValue = "testInstance", alias = "instanceName", property = "accumulo.instanceName", required = true) @Parameter(defaultValue = "secret", alias = "rootPassword", property = "accumulo.rootPassword", required = true) @Parameter(defaultValue = "0", alias = "zooKeeperPort", property = "accumulo.zooKeeperPort", required = true) static Set<MiniAccumuloClusterImpl> runningClusters = Collections .synchronizedSet(new HashSet<MiniAccumuloClusterImpl>()); getLog().info("Starting MiniAccumuloCluster: " + mac.getInstanceName() + " in " + mac.getConfig().getDir()); throw new MojoExecutionException( "Unable to start " + MiniAccumuloCluster.class.getSimpleName(), e);
0
protected static final String HOST_ROLE_COMMAND_TABLE = "host_role_command"; /** * Alter host_role_command table to add original_start_time, which is needed because the start_time column now * allows overriding the value in ActionScheduler.java * @throws SQLException */ private void updateHostRoleCommandTable() throws SQLException { final String columnName = "original_start_time"; DBColumnInfo originalStartTimeColumn = new DBColumnInfo(columnName, Long.class, null, -1L, true); dbAccessor.addColumn(HOST_ROLE_COMMAND_TABLE, originalStartTimeColumn); dbAccessor.executeQuery("UPDATE " + HOST_ROLE_COMMAND_TABLE + " SET original_start_time = start_time", false); dbAccessor.executeQuery("UPDATE " + HOST_ROLE_COMMAND_TABLE + " SET original_start_time=-1 WHERE original_start_time IS NULL"); dbAccessor.setColumnNullable(HOST_ROLE_COMMAND_TABLE, columnName, false); }
1
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestMultiHashMap.java,v 1.2 2002/02/22 02:18:50 mas Exp $ * $Revision: 1.2 $ * $Date: 2002/02/22 02:18:50 $ public Map makeEmptyMap() { public void testEntrySetIterator() { } public void testEntrySetContainsProperMappings() { } public void testEntrySetIteratorHasProperMappings() { // override and ignore test -- it will fail when verifying the iterator for // the set contains the right value -- we're not returning the value, we're // returning a collection. // TODO: re-implement this test to ensure the values of the iterator match // the proper collection rather than the value the superclass is checking // for. return; }
0
/* * Copyright 2005 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. * */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. */ /* * $Id$ */ package javax.xml.crypto.dsig.keyinfo; import javax.xml.crypto.XMLStructure; /** * A representation of the XML <code>KeyName</code> element as * defined in the <a href="http://www.w3.org/TR/xmldsig-core/"> * W3C Recommendation for XML-Signature Syntax and Processing</a>. * A <code>KeyName</code> object contains a string value which may be used * by the signer to communicate a key identifier to the recipient. The * XML Schema Definition is defined as: * * <pre> * &lt;element name="KeyName" type="string"/&gt; * </pre> * * A <code>KeyName</code> instance may be created by invoking the * {@link KeyInfoFactory#newKeyName newKeyName} method of the * {@link KeyInfoFactory} class, and passing it a <code>String</code> * representing the name of the key; for example: * <pre> * KeyInfoFactory factory = KeyInfoFactory.getInstance("DOM"); * KeyName keyName = factory.newKeyName("Alice"); * </pre> * * @author Sean Mullan * @author JSR 105 Expert Group * @see KeyInfoFactory#newKeyName(String) */ public interface KeyName extends XMLStructure { /** * Returns the name of this <code>KeyName</code>. * * @return the name of this <code>KeyName</code> (never * <code>null</code>) */ String getName(); }
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
0
public abstract String getProperty(String key); String key = AccumuloVFSClassLoader.VFS_CONTEXT_CLASSPATH_PROPERTY + context; String uris = getProperty(key); String delegate = getProperty(key + ".delegation");
0
* Copyright 1999-2007 The Apache Software Foundation. import org.w3c.dom.NodeList; /** {@link org.apache.commons.logging} logging facility */ private String basedir; private boolean haveISOPadding; private boolean haveKeyWraps; private String tstBase64EncodedString; basedir = System.getProperty("basedir","."); public void testEncryptedKeyWithRecipient() throws Exception { String filename = "data/org/apache/xml/security/encryption/encryptedKey.xml"; if (basedir != null && !"".equals(basedir)) { filename = basedir + "/" + filename; } File f = new File(filename); DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance(); builderFactory.setNamespaceAware (true); DocumentBuilder builder = builderFactory.newDocumentBuilder(); Document document = builder.parse(f); XMLCipher keyCipher = XMLCipher.getInstance(); keyCipher.init(XMLCipher.UNWRAP_MODE, null); NodeList ekList = document.getElementsByTagNameNS (EncryptionConstants.EncryptionSpecNS, EncryptionConstants._TAG_ENCRYPTEDKEY); for (int i = 0; i < ekList.getLength(); i++) { EncryptedKey ek = keyCipher.loadEncryptedKey (document, (Element) ekList.item(i)); assertNotNull(ek.getRecipient()); } } private String toString (Node n) throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); Canonicalizer c14n = Canonicalizer.getInstance (Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS); byte[] serBytes = c14n.canonicalizeSubtree(n); baos.write(serBytes); baos.close(); return baos.toString("UTF-8"); } static { org.apache.xml.security.Init.init(); }
0
/* * Copyright 2003-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.
0
* @version $Revision: 1.2 $ $Date: 2002/11/21 04:31:38 $ extends AbstractProviderTestCase
0
Map<String,String> siteConfig = new HashMap<>();
1
* Copyright (C) 2015 Google Inc.
0
final StatusLine statusline = new BasicStatusLine(HttpVersion.HTTP_1_1, HttpStatus.SC_OK, "OK"); } catch (final IllegalArgumentException e) { /* expected */ } } catch (final IllegalArgumentException e) { /* expected */ } final BasicStatusLine orig = new BasicStatusLine(HttpVersion.HTTP_1_1, HttpStatus.SC_OK, "OK"); final BasicStatusLine clone = (BasicStatusLine) orig.clone(); final BasicStatusLine orig = new BasicStatusLine(HttpVersion.HTTP_1_1, HttpStatus.SC_OK, "OK"); final ByteArrayOutputStream outbuffer = new ByteArrayOutputStream(); final ObjectOutputStream outstream = new ObjectOutputStream(outbuffer); final byte[] raw = outbuffer.toByteArray(); final ByteArrayInputStream inbuffer = new ByteArrayInputStream(raw); final ObjectInputStream instream = new ObjectInputStream(inbuffer); final BasicStatusLine clone = (BasicStatusLine) instream.readObject();
0
private static class SimpleCacheEntry implements CacheEntry { private byte[] buffer; private Object index; SimpleCacheEntry(byte[] buffer) { this.buffer = buffer; } @Override public byte[] getBuffer() { return buffer; } @Override public Object getIndex() { return index; } @Override public void setIndex(Object idx) { this.index = idx; } } private static class Ref extends SoftReference<SimpleCacheEntry> { public Ref(String blockId, SimpleCacheEntry sce, ReferenceQueue<SimpleCacheEntry> q) { super(sce, q); private ReferenceQueue<SimpleCacheEntry> q = new ReferenceQueue<SimpleCacheEntry>(); public synchronized SimpleCacheEntry getBlock(String blockName) { public synchronized SimpleCacheEntry cacheBlock(String blockName, byte buf[]) { SimpleCacheEntry sce = new SimpleCacheEntry(buf); cache.put(blockName, new Ref(blockName, sce, q)); return sce; public synchronized SimpleCacheEntry cacheBlock(String blockName, byte buf[], boolean inMemory) { SimpleCacheEntry sce = new SimpleCacheEntry(buf); cache.put(blockName, new Ref(blockName, sce, q)); return sce; @Override public long getMaxSize() { return Long.MAX_VALUE; }
0
// We're holding some finished bits, but that should be it. tester.assertHasOnlyGlobalAndFinishedSetsAndPaneInfoFor( new IntervalWindow(new Instant(0), new Instant(50)));
0
@Deprecated
0
import java.util.Collections; import org.apache.sshd.common.util.threads.ExecutorService; @Override TcpipServerChannel channel = new TcpipServerChannel(getType(), ThreadUtils.noClose(getExecutorService())); public TcpipServerChannel(ForwardingFilter.Type type, ExecutorService executor) { super("", Collections.emptyList(), executor); ? ThreadUtils.newSingleThreadExecutor("TcpIpServerChannel-ConnectorCleanup[" + getSession() + "]") : ThreadUtils.noClose(service); if (debugEnabled) { log.debug("disposing connector: {} for: {}", connector, TcpipServerChannel.this); connector.close(immediately) .addListener(f -> executors.close(true));
1
import java.util.HashMap; import java.util.Map; /** Processor attributes */ protected Map processorAttributes = new HashMap(); /** * @see org.apache.cocoon.Processor#getAttribute(java.lang.String) */ public Object getAttribute(String name) { return this.processorAttributes.get(name); } /** * @see org.apache.cocoon.Processor#removeAttribute(java.lang.String) */ public Object removeAttribute(String name) { return this.processorAttributes.remove(name); } /** * @see org.apache.cocoon.Processor#setAttribute(java.lang.String, java.lang.Object) */ public void setAttribute(String name, Object value) { this.processorAttributes.put(name, value); }
0
@Test public void testDelete() { FakeCassandraService service = new FakeCassandraService(); service.load(); assertEquals(10000, service.getTable().size()); pipeline .apply( CassandraIO.<Scientist>read() .withCassandraService(service) .withKeyspace("beam") .withTable("scientist") .withCoder(SerializableCoder.of(Scientist.class)) .withEntity(Scientist.class)) .apply( CassandraIO.<Scientist>delete() .withCassandraService(service) .withKeyspace("beam") .withEntity(Scientist.class)); pipeline.run(); assertEquals(0, service.getTable().size()); } public FakeCassandraWriter createWriter(CassandraIO.Mutate<Scientist> spec) { private static class FakeCassandraDeleter implements Deleter<Scientist> { @Override public void delete(Scientist scientist) { table.remove(scientist.id); } @Override public void close() { // nothing to do } } @Override public FakeCassandraDeleter createDeleter(CassandraIO.Mutate<Scientist> spec) { return new FakeCassandraDeleter(); }
0
Copyright 2002-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 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.hc.core5.concurrent.ComplexCancellable;
0
public List<FieldValueGetter> create(Class<?> targetClass, Schema schema) {
0
import org.apache.felix.framework.resolver.HostedCapability; import org.apache.felix.framework.resolver.HostedRequirement; new HostedCapability(this, caps.get(capIdx))); new HostedRequirement(this, reqs.get(reqIdx))); result = (nativeList.isEmpty())
0
* A {@link CodingFunction CodingFunction&ltInputT, OutputT&gt;} is a serializable function * {@inheritDoc} * * @throws NonDeterministicException when the underlying coder's {@code verifyDeterministic()} * throws a {@link NonDeterministicException}. For this to be safe, the intermediate * {@code CodingFunction<T, IntermediateT>} must also be deterministic. /** * {@inheritDoc} * * @return a structural for a value of type {@code T} obtained by first converting to * {@code IntermediateT} and then obtaining a structural value according to the underlying * coder. */ * {@inheritDoc} * @return a {@link String} composed from the underlying coder class name and its encoding id. * Note that this omits any description of the coding functions. These should be modified * with care. /** * {@inheritDoc} * * @return allowed encodings which are composed from the underlying coder class and its allowed * encoding ids. Note that this omits any description of the coding functions. These * should be modified with care. */
0
// Will be needed when credentials are correctly constructed and scoped. @SuppressWarnings("unused") private static class PubsubGrpcClientFactory implements PubsubClientFactory { @Override public PubsubClient newClient( @Nullable String timestampLabel, @Nullable String idLabel, PubsubOptions options) throws IOException { ManagedChannel channel = NettyChannelBuilder .forAddress(PUBSUB_ADDRESS, PUBSUB_PORT) .negotiationType(NegotiationType.TLS) .sslContext(GrpcSslContexts.forClient().ciphers(null).build()) .build(); // TODO: GcpOptions needs to support building com.google.auth.oauth2.Credentials from the // various command line options. It currently only supports the older // com.google.api.client.auth.oauth2.Credentials. GoogleCredentials credentials = GoogleCredentials.getApplicationDefault(); return new PubsubGrpcClient(timestampLabel, idLabel, DEFAULT_TIMEOUT_S, channel, credentials, null /* publisher stub */, null /* subscriber stub */); } @Override public String getKind() { return "Grpc"; } } /** * Factory for creating Pubsub clients using gRCP transport. */ public static final PubsubClientFactory FACTORY = new PubsubGrpcClientFactory();
0
* public Accum createAccumulator() { * return new Accum(); * } public Holder(V value) { set(value); } @Override public Integer apply(int[] accumulator) { return accumulator[0]; } @Override public int[] apply(Integer value) { return wrap(value); } @Override public Long apply(long[] accumulator) { return accumulator[0]; } @Override public long[] apply(Long value) { return wrap(value); } @Override public Double apply(double[] accumulator) { return accumulator[0]; } @Override public double[] apply(Double value) { return wrap(value); } * public Accum createAccumulator() { * return new Accum(); * } * public Accum createAccumulator(String key) { * return new Accum(); * } @Override public Integer apply(K unused) { return hotKeyFanout; }
0
public static final int SINGLETON_STRATEGY = 0; public static final int SERVICE_STRATEGY = 1; public static final int STATIC_STRATEGY = 2; public static final int INSTANCE_STRATEGY = 3; switch (factoryPolicy) { case SINGLETON_STRATEGY: case SERVICE_STRATEGY: case STATIC_STRATEGY: case INSTANCE_STRATEGY: + factoryPolicy); public String[] getServiceSpecifications() {
0
import org.apache.beam.sdk.io.gcp.testing.BigqueryClient; .pruningPattern(BigqueryClient.class.getName())
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/Functions.java,v 1.2 2002/04/24 04:05:41 dmitri Exp $ * $Revision: 1.2 $ * $Date: 2002/04/24 04:05:41 $ import java.util.Set; * @version $Revision: 1.2 $ $Date: 2002/04/24 04:05:41 $
0
testLeaderElection(5, 5, 3000, 20000);
0
private final URLClassLoader classLoader; private final FileSystem fs; final Map<String, ?> emptyMap = Collections.emptyMap(); final Path jrePath = Paths.get(System.getProperty("java.home")); final Path jrtFsPath = jrePath.resolve("lib").resolve("jrt-fs.jar"); URLClassLoader tempClassLoader = null; FileSystem tempFs = null; tempClassLoader = new URLClassLoader(new URL[] {jrtFsPath.toUri().toURL() }); tempFs = FileSystems.newFileSystem(URI.create("jrt:/"), emptyMap, tempClassLoader); try (DirectoryStream<Path> ds = Files.newDirectoryStream(tempFs.getPath("/modules"))) { this.classLoader = tempClassLoader; this.fs = tempFs; if (classLoader != null) { classLoader.close(); } if (fs != null) { fs.close(); }
0
package cz.seznam.euphoria.core.client.dataset; import cz.seznam.euphoria.core.client.operator.State; import java.util.HashSet; import java.util.Set; /** * Abstract window capable of registering states. */ public abstract class AbstractWindow<KEY, W extends AbstractWindow<KEY, W>> implements Window<KEY, W> { final Set<State<?, ?>> states = new HashSet<>(); @Override public void addState(State<?, ?> state) { states.add(state); } @Override public Set<State<?, ?>> getStates() { return states; } void clearStates() { states.clear(); } }
0
package org.apache.felix.sigil.eclipse.ui.util; import org.apache.felix.sigil.eclipse.ui.SigilUI;
0
import org.apache.http.cookie.CookieRestrictionViolationException; throw new CookieRestrictionViolationException(
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.base.Joiner; 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.Maps;
0
synchronized (sourcePath) { sourcePath.clear(); for (int i = 0; i < path.length; i++) { sourcePath.add(path[i]); } sourcePath.add(""); synchronized (sourcePath) { Iterator iter = sourcePath.iterator(); while (iter.hasNext()) { String prefix = (String)iter.next(); if (prefix.length() > 0) { if (!prefix.endsWith("/")) { prefix = prefix + "/"; } String uri = prefix + className.replace('.', '/') + ".java"; Source src; try { src = sourceResolver.resolveURI(uri); } catch (MalformedURLException ignored) { continue; } catch (IOException ignored) { continue; } if (src.exists()) { return src; } releaseSource(src); return null; Source src = getSource(className); notifyListeners(src, null); releaseSource(src);
0
filterRegion = SVGUtilities.convertFilterChainRegion(filterElement, filteredElement, filteredNode, uctx);
0
private final ControlClientPool<FnApiControlClient> pendingClients; pendingClients = QueueControlClientPool.createSynchronous(); FnApiControlClientPoolService.offeringClientsToPool(pendingClients.getSink(), headerAccessor); FnApiControlClient getClient = pendingClients.getSource().take(); } catch (Exception e) { throw new RuntimeException(e);
0
if (outputProducers.contains(this) && (!parts.isEmpty() || outputProducers.size() > 1)) { Set<String> otherProducerNames = new HashSet<>(); for (Node outputProducer : outputProducers) { if (outputProducer != this) { otherProducerNames.add(outputProducer.getFullName()); throw new IllegalArgumentException( String.format( "Output of composite transform [%s] contains a primitive %s produced by it. " + "Only primitive transforms are permitted to produce primitive outputs." + "%n Outputs: %s" + "%n Other Producers: %s" + "%n Components: %s", getFullName(), POutput.class.getSimpleName(), output.expand(), otherProducerNames, parts));
0
import org.apache.felix.framework.util.MultiReleaseContent; import java.io.IOException; import java.io.InputStream; import java.net.MalformedURLException; import java.net.URL; import java.security.ProtectionDomain; import java.util.ArrayList; import java.util.Collections; import java.util.Enumeration; import java.util.List; import java.util.Map; localContentList.add(MultiReleaseContent.wrap( getBundle().getFramework()._getProperty("java.specification.version"), content)); localContentList.add(MultiReleaseContent.wrap( getBundle().getFramework()._getProperty("java.specification.version"),embeddedContent)); localContentList.add(MultiReleaseContent.wrap( getBundle().getFramework()._getProperty("java.specification.version"),content)); // clean or meaningful, but the Spring guys want it.
0
return input .apply(GroupByKey.<K, InputT>create(fewKeys)) .apply(Combine.<K, InputT, OutputT>groupedValues(fn).withSideInputs(sideInputs));
0
* Sets a {@link Schema} on this {@link PCollection}.
0
import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import com.google.inject.Inject;
0
assertEquals("person", stmt.name.getSimple());
0
import org.apache.excalibur.source.SourceResolver; * @version CVS $Id: DefaultAuthenticationManager.java,v 1.6 2003/04/27 14:45:04 cziegeler Exp $ /** The Source Resolver */ private SourceResolver resolver; RequestState state = new RequestState( handler, applicationName, this.resolver ); RequestState state = new RequestState( handler, applicationName, this.resolver ); this.resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE); if ( this.manager != null) { this.manager.release( this.resolver ); this.manager = null; this.resolver = null; }
0
import static com.google.common.base.MoreObjects.toStringHelper; import org.apache.beam.sdk.runners.PTransformMatcher; overridesBuilder .add( PTransformOverride.of( PTransformMatchers.classEqualTo(Reshuffle.class), new ReshuffleOverrideFactory())) // Order is important. Streaming views almost all use Combine internally. .add( PTransformOverride.of( combineValuesWithoutSideInputs(), new PrimitiveCombineGroupedValuesOverrideFactory())) .add( PTransformOverride.of( PTransformMatchers.classEqualTo(ParDo.SingleOutput.class), new PrimitiveParDoSingleFactory())); /** * Returns a {@link PTransformMatcher} that matches a {@link PTransform} if the class of the * {@link PTransform} is equal to the {@link Class} provided ot this matcher and it has no side * inputs. */ private static PTransformMatcher combineValuesWithoutSideInputs() { return new CombineValuesWithoutSideInputsPTransformMatcher(); } private static class CombineValuesWithoutSideInputsPTransformMatcher implements PTransformMatcher { private CombineValuesWithoutSideInputsPTransformMatcher() {} @Override public boolean matches(AppliedPTransform<?, ?, ?> application) { return application.getTransform().getClass().equals(Combine.GroupedValues.class) && ((Combine.GroupedValues<?, ?, ?>) application.getTransform()) .getSideInputs() .isEmpty(); } @Override public String toString() { return toStringHelper(CombineValuesWithoutSideInputsPTransformMatcher.class).toString(); } }
0
public CacheEntry getBlock(String blockName, Loader loader) { Loader idxLoader = new Loader() { CacheEntry idxCacheEntry; @Override public Map<String,Loader> getDependencies() { idxCacheEntry = indexCache.getBlock(blockName); if (idxCacheEntry == null) { return loader.getDependencies(); } else { return Collections.emptyMap(); } } @Override public byte[] load(int maxSize, Map<String,byte[]> dependencies) { if (idxCacheEntry == null) { return loader.load(maxSize, dependencies); } else { return idxCacheEntry.getBuffer(); } } }; return summaryCache.getBlock(blockName, idxLoader); } @Override public static SummaryReader load(Configuration conf, AccumuloConfiguration aConf, InputStream inputStream, long length, org.apache.accumulo.core.file.blockfile.impl.CachableBlockFile.Reader bcReader = new CachableBlockFile.Reader((InputStream & Seekable) inputStream,
0
private static final long serialVersionUID = 0L; @Override public boolean equals(Object other) { // Semantically, all default triggers are identical return other instanceof DefaultTrigger; }
0
final BasicFutureCallback<Object> callback = new BasicFutureCallback<>(); final BasicFuture<Object> future = new BasicFuture<>(callback); final BasicFutureCallback<Object> callback = new BasicFutureCallback<>(); final BasicFuture<Object> future = new BasicFuture<>(callback); final BasicFutureCallback<Object> callback = new BasicFutureCallback<>(); final BasicFuture<Object> future = new BasicFuture<>(callback); final BasicFutureCallback<Object> callback = new BasicFutureCallback<>(); final BasicFuture<Object> future = new BasicFuture<>(callback); final BasicFuture<Object> future = new BasicFuture<>(null); final BasicFuture<Object> future = new BasicFuture<>(null); final BasicFuture<Object> future = new BasicFuture<>(null); final BasicFuture<Object> future = new BasicFuture<>(null); final BasicFuture<Object> future = new BasicFuture<>(null);
0
import org.apache.xml.security.test.TestUtils; Element context = TestUtils.createDSctx(doc, "ds", Constants.SignatureSpecNS);
0
* @return The file. Never returns null. * * The base file to use to resolve relative paths. May be null. * * @return The file. Never returns null. * The base file to use to resolve relative paths. May be null. * @return The file. Never returns null. * * The {@link FileObject} that represents the local file. Never * returns null. FileObject toFileObject( File file )
0
package org.apache.beam.sdk.transforms;
0
private static final String IMPLEMENTATION_QNAME = IMPLEMENTATION; private static final String SERVICE_QNAME = SERVICE; private static final String PROPERTY_QNAME = PROPERTY; private static final String REFERENCE_QNAME = REFERENCE; private static final String INTERFACE_QNAME = INTERFACE;
0
import java.util.Set; private Set<Integer> servers;
0
public abstract class AbstractEvent implements org.apache.batik.dom.dom3.events.Event { * Whether the event propagation must be stopped after the current * event listener group has been completed. * Whether the event propagation must be stopped immediately. */ protected boolean stopImmediatePropagation = false; /** * Namespace URI of this event. */ protected String namespaceURI; /** * Get the namespace URI of this event. */ public String getNamespaceURI() { return namespaceURI; } /** * <b>DOM</b>: Returns whether this Event implements the CustomEvent * interface. * @return false */ public boolean isCustom() { return false; } /** * <b>DOM</b>: Returns whether <code>preventDefault</code> has been * called on this object. */ public boolean isDefaultPrevented() { return preventDefault; } /** * <b>DOM</b>: Stops propagation of this event immediately, even to * listeners in the current group. */ public void stopImmediatePropagation() { this.stopImmediatePropagation = true; } /** /** * <b>DOM</b>: Implements * {@link org.w3c.dom.events.Event#initEventNS(String,String,boolean,boolean)}. */ public void initEventNS(String namespaceURIArg, String eventTypeArg, boolean canBubbleArg, boolean cancelableArg) { namespaceURI = namespaceURIArg; type = eventTypeArg; isBubbling = canBubbleArg; cancelable = cancelableArg; boolean getStopImmediatePropagation() { return stopImmediatePropagation; } void stopImmediatePropagation(boolean state) { this.stopPropagation = state; } return ae.isDefaultPrevented();
0
* Copyright 2016 Seznam.cz, a.s.
0
import org.apache.accumulo.core.client.AccumuloClient; AccumuloClient c = getClient(); private MasterMonitorInfo getStats(AccumuloClient c) throws Exception {
0
import org.apache.beam.runners.direct.DirectRunner; String directOut = runPipeline(DirectRunner.class);
0
// custom Ant tags if ( name.equals("fileScanner") ) { Tag tag = new FileScannerTag(new FileScanner(project)); return TagScript.newInstance(tag); } // is it an Ant task? // an Ant DataType? // assume its an Ant property object (classpath, arg etc).
0
package org.apache.beam.runners.flink.examples.streaming; import org.apache.beam.runners.flink.FlinkPipelineRunner; import org.apache.beam.runners.flink.translation.wrappers.streaming.io.UnboundedSocketSource;
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.beam.sdk.io.kinesis; import java.io.Serializable; /** Kinesis interface for custom partitioner. */ public interface KinesisPartitioner extends Serializable { String getPartitionKey(byte[] value); String getExplicitHashKey(byte[] value); }
0
setSignatureFactoriesNames(GenericUtils.isEmpty((Object[]) names) ? Collections.emptyList() : Arrays.asList(names));
0
metaScanner.setRange(new KeyExtent(tableId, null, null).toMetadataRange()); metaScanner.setRange(new KeyExtent(tableId, null, null).toMetadataRange());
0
* @use org.apache.accumulo.core.iterators.Filter
0
import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly; String lastTable = new KeyExtent(lastTablet, (Text) null).getTableId(); String currentTable = new KeyExtent(prevEndRowKey.getRow(), (Text) null).getTableId();
0
import org.apache.accumulo.core.cli.ScannerOpts; static class Opts extends ClientOnDefaultTable { private void execute(Opts opts, ScannerOpts scanOpts) throws Exception { scanner.setBatchSize(scanOpts.scanBatchSize); Opts opts = new Opts(); ScannerOpts scanOpts = new ScannerOpts(); opts.parseArgs(ReadWriteExample.class.getName(), args, scanOpts); rwe.execute(opts, scanOpts);
0
if (locale == null) { locale = getForm().getLocale(); }
0
import org.apache.accumulo.core.client.IteratorSetting; settings = IteratorUtil.generateInitialTableProperties(); /** * @deprecated since 1.4 {@link #attachIterator(String, IteratorSetting)} */ public void addAggregators(List<? extends org.apache.accumulo.core.iterators.conf.PerColumnIteratorConfig> aggregators) { for (Entry<String,String> entry : IteratorUtil.generateAggTableProperties(aggregators).entrySet()) {
0
@SerializedName("role") private String role; /** * Sets both the {@code componentName} and the {@code role}. Status commands * use the {@code componentName}, while execution commands use the * {@code role}. It's simpler for the Python to just worry about {@code role}, * so this ensures that both are set. * * @param componentName */ role = componentName; public String getRole() { return role; }
0
service.getName(), getName(),
0
import org.apache.commons.vfs.util.Messages; final String message = Messages.getString( "vfs.impl/delete-temp.warn", file.getName() ); getLogger().warn( message, e );
0
SparkContextFactory.stopSparkContext(jsc);
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.model.pipeline.v1.Endpoints;
0
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; setIsDone(); } // null is the only value of type Void, but findbugs thinks // it violates the contract of CompletableFuture.complete @SuppressFBWarnings("NP_NONNULL_PARAM_VIOLATION") private void setIsDone() {
0
* @since 1.0
0
List<HookNotification> baseMsgs = super.getNotificationMessages(); if (CollectionUtils.isEmpty(baseMsgs)) { LOG.debug("Skipped processing of column-rename (on a temporary table?)"); return null; } List<HookNotification> ret = new ArrayList<>(baseMsgs); Table oldTable = getHiveContext().getInputs().iterator().next().getTable(); Table newTable = getHiveContext().getOutputs().iterator().next().getTable();
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
attributeName ) );
0
* Beider-Morse phonetic encodings are optimised for family names. However, they may be useful for a wide range * of words. * "<code>dortlaj|dortlej</code>". Thus, the full, combined encoding is "{@code (ortlaj|ortlej)-(dortlaj|dortlej)}". * true if multiple encodings are to be combined with a '|', false if just the first one is * to be considered
0
package org.apache.hadoop.metadata.types; import org.apache.hadoop.metadata.MetadataException; import org.apache.hadoop.metadata.MetadataException;
0
// NewDefinitions are allowed to have a : in their id because they can look up // class widgets from the library directly if (id.indexOf(':') != -1 && !(widgetDefinition instanceof NewDefinition)) {
0
connector = new ServerConnector(server, getConnectionFactories(conf)); private static AbstractConnectionFactory[] getConnectionFactories(AccumuloConfiguration conf) { HttpConnectionFactory httpFactory = new HttpConnectionFactory(); return new AbstractConnectionFactory[] {httpFactory}; SslConnectionFactory sslFactory = new SslConnectionFactory(sslContextFactory, httpFactory.getProtocol()); return new AbstractConnectionFactory[] {sslFactory, httpFactory};
0
expect(quotaManager.getQuotaInfo(ROLE, storageUtil.storeProvider)).andReturn(infoMock);
0
String inAttr = elt.getAttributeNS(null, SVG_IN_ATTRIBUTE);
0
import static com.google.common.base.Preconditions.checkNotNull; checkNotNull(classToBind, "Missing a class to bind to a JAXB context."); checkNotNull(rootElementName, "Missing a root element name."); checkNotNull(baseOutputFilename, "Missing a filename to write to.");
0
import org.apache.accumulo.core.conf.SiteConfiguration; AccumuloConfiguration conf = SiteConfiguration.getInstance();
1
import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; DefaultEntityDeserializer entitygen = new DefaultEntityDeserializer( DefaultEntityDeserializer entitygen = new DefaultEntityDeserializer( DefaultEntityDeserializer entitygen = new DefaultEntityDeserializer( DefaultEntityDeserializer entitygen = new DefaultEntityDeserializer( DefaultEntityDeserializer entitygen = new DefaultEntityDeserializer( DefaultEntityDeserializer entitygen = new DefaultEntityDeserializer( DefaultEntityDeserializer entitygen = new DefaultEntityDeserializer( DefaultEntityDeserializer entitygen = new DefaultEntityDeserializer( DefaultEntityDeserializer entitygen = new DefaultEntityDeserializer( DefaultEntityDeserializer entitygen = new DefaultEntityDeserializer( DefaultEntityDeserializer entitygen = new DefaultEntityDeserializer( DefaultEntityDeserializer entitygen = new DefaultEntityDeserializer( DefaultEntityDeserializer entitygen = new DefaultEntityDeserializer(
0
static private class BaseProviderTestSuite extends ProviderTestSuite { public BaseProviderTestSuite(final ProviderTestConfig providerConfig) throws Exception final ProviderTestSuite sftpSuite = new BaseProviderTestSuite(standardTestCase); final ProviderTestSuite sftpStreamSuite = new BaseProviderTestSuite(streamProxyTestCase)
0
new LinkedList<>();
0