Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
submitRequest(conn, connState);
connState.setInputState(ClientConnState.RESPONSE_BODY_STREAM);
connState.setInputState(ClientConnState.RESPONSE_BODY_DONE);
processResponse(conn, connState);
connState.resetInput();
... | 0 |
import org.apache.commons.vfs.FileSystem; | 0 |
(Map.class), anyObject(Map.class), anyObject(Set.class), anyBoolean(), eq(false))).andReturn(kerberosConfig).once(); | 0 |
setState(State.UserAuth);
setState(State.UserAuth);
setState(State.UserAuth);
switch (getState()) {
throw new IllegalStateException("Unsupported state: " + getState());
if (getState() == State.WaitForAuth) {
super.se... | 0 |
if ( m_paramTypes.contains(ValueUtils.ValueType.ref_serviceType)
|| m_paramTypes.contains(ValueUtils.ValueType.ref_logger)
|| m_paramTypes.contains(ValueUtils.ValueType.ref_formatterLogger)) { | 0 |
* @version $Revision: 1.4 $ $Date: 2002/11/25 05:51:15 $
final FileInfo dir = base.addChild( "dir1", FileType.FOLDER );
final FileInfo code = base.addChild( "code", FileType.FOLDER );
final FileInfo sealed = code.addChild( "sealed", FileType.FOLDER );
sealed.addChild( "AnotherClass.cla... | 0 |
public InitReferenceMethod getInit()
{
return 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 ... | 0 |
* Copyright 2001-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 applic... | 0 |
try (Scanner scanner = c.createScanner(table2, new Authorizations())) {
Iterator<Entry<Key,Value>> iter = scanner.iterator();
assertTrue(iter.hasNext());
Entry<Key,Value> entry = iter.next();
assertEquals(Integer.parseInt(new String(entry.getValue().get())), 100);
assertFalse(iter.hasN... | 0 |
package com.twitter.mesos.scheduler.persistence;
import java.nio.ByteBuffer; | 0 |
* @return The decoded text string. | 0 |
@Override
@Override
@Override
@Override
@Override
@Override
@Override | 0 |
if (stats.tServerInfo.size() != 2) {
if (stats.deadTabletServers.size() != 0) { | 0 |
import cz.seznam.euphoria.shadow.com.google.common.base.Preconditions; | 0 |
if (idLabel != null && !Strings.isNullOrEmpty(outgoingMessage.recordId)) {
attributes.put(idLabel, outgoingMessage.recordId);
@Nullable String recordId = null;
recordId = attributes.get(idLabel);
if (Strings.isNullOrEmpty(recordId)) {
// Fall back to the Pubsub provided message... | 0 |
import com.google.cloud.dataflow.sdk.testing.PAssert;
* 4. Testing your Pipeline via PAssert
* Concept #4: PAssert is a set of convenient PTransforms in the style of
* to validate the contents of PCollections. PAssert is best used in unit tests
* that PAssert does not provide any output and that succe... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/adapters/Attic/NonSerializableFloatListList.java,v 1.2 2003/08/31 17:21:17 scolebourne Exp $
* any, must include the following acknowledgement:
* Alternately, th... | 0 |
if (!hasCronSchedule(job)) {
throw new ScheduleException("A cron job may not be updated to a non-cron job.");
} | 0 |
String idle = "idle";
String execute = "execute"; | 0 |
package org.apache.batik.anim.dom;
import org.apache.batik.dom.svg.ExtendedTraitAccess;
import org.apache.batik.dom.svg.LiveAttributeValue;
import org.apache.batik.dom.svg.SVGContext;
import org.apache.batik.dom.svg.SVGOMException; | 0 |
checkConfigurationCount(name, 0, -1); | 0 |
* @param docJar path to the docs jar file
public void updateRepository( URI bundleJar, URI sourceJar, URI docJar ) throws MojoExecutionException
String sourcePath = relativisePath( sourceJar );
String docPath = relativisePath( docJar );
m_resourceBundle.construct( m_project, bindexExtra... | 0 |
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
public int getStatusCode() {
return this.getStatusLine().getStatusCode();
... | 0 |
import org.apache.beam.sdk.coders.Coder;
import org.apache.beam.sdk.coders.SerializableCoder;
import org.apache.beam.sdk.options.PipelineOptions;
import org.apache.beam.sdk.transforms.display.DisplayData;
import org.apache.beam.sdk.util.FileIOChannelFactory;
import org.apache.beam.sdk.util.GcsIOChannelFactory;
import o... | 0 |
import org.apache.ambari.server.state.Cluster;
import org.apache.ambari.server.state.Clusters;
import org.apache.ambari.server.state.HostState; | 0 |
* ComposedJXPathBindingBase provides a helper base class for subclassing
* into specific {@link JXPathBindingBase} implementations that have nested
*
* @version CVS $Id: ComposedJXPathBindingBase.java,v 1.6 2004/01/11 20:51:15 vgritsenko Exp $
*
/**
* Actively performs the binding from the Woody-form ... | 0 |
@Override
@Override | 1 |
* The current path where to export files.
*/
protected String currentExportPath = ".";
/**
new JFileChooser(currentExportPath);
currentExportPath = f.getCanonicalPath();
new JFileChooser(currentExportPath);
curren... | 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.accumulo.core.Constants;
m.put(meta, new Text("size"), new Value(String.format("%d", numBytes).getBytes(Constants.UTF8))); | 0 |
package javax.mail.internet;
/**
* Mock class providing the declarations required to compile the Cocoon code when
* the actual library is not present.
*
* @version CVS $Id:
*/
public class ParameterList {
public java.util.Enumeration getNames() {
throw new NoSuchMethodError("This is a mock object");
}
pu... | 0 |
public JettyServiceStarter(final BundleContext context, final Dictionary<String, ?> properties)
this.jetty = new JettyService(context, this.controller, properties);
public void updated(final Dictionary<String, ?> properties) throws Exception | 0 |
if (!tmpfile.delete()){
System.out.println("Failed to delete: "+tmpfile);
}
if (!tmpfile.delete()){
System.out.println("Failed to delete: "+tmpfile);
} | 0 |
private Configuration processorConfiguration;
this.connections.put(name, block);
getLogger().debug("connection: " + " name=" + name + " block=" + block);
this.processorConfiguration = block.getChild("sitemap");
* Get the component configuration of the block
Configuration get... | 0 |
public final class CredentialHelper {
private CredentialHelper() {
throw new UnsupportedOperationException("No instance");
}
private static final class FixedLoginConfiguration extends Configuration { | 1 |
import static com.google.common.base.Charsets.UTF_8;
m.put(META_COLUMN_FAMILY, new Text("size"), new Value(String.format("%d", numBytes).getBytes(UTF_8)));
m.put(META_COLUMN_FAMILY, COUNT_COLUMN_QUALIFIER, new Value(String.format("%d", totalWrites).getBytes(UTF_8)));
m.put(META_COLUMN_FAMILY, UUID_COLUMN_Q... | 0 |
* Copyright 2002-2005 The Apache Software Foundation. | 0 |
package org.apache.sshd.common.session.helpers; | 0 |
/*
* Created on 27.06.2004
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Generation - Code and Comments
*/
package org.apache.cocoon.components.flow.java.test;
import org.mozilla.javascript.Context;
import org.mozilla.javascript.IdFunction;
import org.mozilla.j... | 0 |
Rules oldRules = getDigester().getRules();
anyChildRule.setDigester(getDigester());
newRules.init(getDigester().getMatch()+"/", oldRules);
getDigester().setRules(newRules);
AnyChildRules newRules = (AnyChildRules) getDigester().getRules();
getDigester().setRules(newRules.... | 0 |
import com.google.common.collect.ImmutableMap;
import java.util.Collections; | 0 |
// Ignore dynamic requirements.
String resolution = req.getDirectives().get(Constants.RESOLUTION_DIRECTIVE);
// TODO: OSGi R4.3 - Use proper "dynamic" constant.
if ((resolution != null) && resolution.equals("dynamic"))
{
continue;
}
... | 0 |
if ("hashCode".equals(arg1.getName())) {
return this.hashCode();
}
if ("equals".equals(arg1.getName()) && arg2.length == 1) {
return this.equals(arg2[0]);
}
| 0 |
import com.google.common.primitives.Ints;
import java.io.PushbackInputStream;
// Determine if the input stream is gzipped. The input stream returned from the
// GCS connector may already be decompressed, and no action is required.
PushbackInputStream stream = new PushbackInputStream(inputStream... | 0 |
package org.apache.commons.configuration2.io;
import static org.hamcrest.CoreMatchers.sameInstance;
import org.apache.commons.configuration2.AbstractConfiguration;
import org.apache.commons.configuration2.BaseConfiguration;
/**
* Tests the logger set per default.
*/
@Test
public void testAbstract... | 0 |
import org.junit.Rule;
@Rule
public final transient TestPipeline p = TestPipeline.create();
| 0 |
* Copyright (C) 2015 Google Inc. | 0 |
throw new ThriftTableOperationException(null, oldName, TableOperation.RENAME, TableOperationExceptionType.NAMESPACE_NOTFOUND,
"Name changed while processing"); | 0 |
import org.apache.beam.sdk.fn.channel.ManagedChannelFactory; | 0 |
* {@link com.google.cloud.dataflow.sdk.Pipeline}, which manages a graph of | 0 |
package org.osgi.util.converter; | 0 |
import org.apache.beam.vendor.grpc.v1p13p1.com.google.protobuf.ByteString; | 0 |
public boolean containsKey(Object name) { | 0 |
OptionBuilder.withArgName("stack_name");
OptionBuilder.withDescription( "Name of the cluster stack");
Option stack = OptionBuilder.create( "stack" );
OptionBuilder.withArgName( "stack_revision" );
Option stack_revision = OptionBuilder.create( "revision" );
options.addOpti... | 0 |
mbw = master.getClient().createBatchWriter(MetadataTable.NAME, new BatchWriterConfig()); | 0 |
import java.util.Map;
import org.apache.beam.sdk.values.PValue;
import org.apache.beam.sdk.values.TupleTag;
public Map<TupleTag<?>, PValue> expand() {
return Collections.emptyMap(); | 0 |
*
* --output=YOUR_PROJECT_ID:DATASET_ID.TABLE_ID
*
* --runner=YOUR_SELECTED_RUNNER
* }</pre>
*
* Examines each row in the input table. If a tornado was recorded in that sample, the month in
* which it occurred is output.
* Prepares the data for writing to BigQuery by building a TableRow object containing... | 1 |
/**
* Copyright 2013 Apache Software Foundation | 0 |
public final static String ENSURE = "TemporalAnnotations";
@ServiceDependency(filter = "(name=" + ENSURE + ")") | 0 |
import java.util.Set;
import com.google.common.collect.ImmutableSet;
import com.twitter.mesos.gen.ScheduleStatus;
import com.twitter.mesos.gen.ScheduledTask;
import com.twitter.mesos.scheduler.storage.Storage.StoreProvider;
void cronTriggered(final JobConfiguration job) {
LOG.info(String.format("Cron triggered fo... | 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 |
import org.apache.beam.vendor.grpc.v1_13_1.com.google.protobuf.ByteString;
import org.apache.beam.vendor.grpc.v1_13_1.io.grpc.Channel;
import org.apache.beam.vendor.grpc.v1_13_1.io.grpc.stub.StreamObserver; | 0 |
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
final WritableByteChannel channel = newChannel(baos);
final SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128, Consts.ASCII);
final HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
... | 0 |
this.challenge = buffer.substringTrimmed(beginIndex, endIndex);
if (this.challenge.length() == 0) {
if (this.state == State.MSG_TYPE1_GENERATED) {
this.state = State.MSG_TYPE2_RECEVIED;
} | 0 |
void step(int step);
void waitForStep(int nr, int timeout); | 0 |
public static final String ALGO_ID_MAC_HMAC_SHA1 = Constants.SignatureSpecNS + "hmac-sha1";
public static final String ALGO_ID_SIGNATURE_RSA = Constants.SignatureSpecNS + "rsa-sha1";
public static final String ALGO_ID_SIGNATURE_RSA_SHA1 = Constants.SignatureSpecNS + "rsa-sha1";
private static final String A... | 0 |
@Test
public void testTemplate6565b() throws Exception {
JexlEngine jexl = new JexlBuilder().create();
JxltEngine jexlt = jexl.createJxltEngine();
String source =
"$$ var res = '';\n" +
"$$ var meta = session.data['METADATA'];\n" +
"$$ if (meta) {... | 0 |
/**
* Unreserved characters, i.e. alphanumeric, plus: {@code _ - ! . ~ ' ( ) *}
* <p>
* This list is the same as the {@code unreserved} list in <a href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</>
*/ | 0 |
private final BaseNCodec baseNCodec;
this.baseNCodec = basedCodec;
baseNCodec.encode(b, offset, len);
baseNCodec.decode(b, offset, len);
int avail = baseNCodec.avail();
int c = baseNCodec.readResults(buf, 0, avail);
baseNCodec.encode(singleByte... | 0 |
import java.util.logging.Logger;
| 0 |
private static final long serialVersionUID = -542458133073307640L; | 0 |
import com.google.cloud.dataflow.sdk.util.CoderUtils;
import org.junit.Rule;
import org.junit.rules.ExpectedException;
@Rule
public ExpectedException thrown = ExpectedException.none();
@Test
public void encodeNullThrowsCoderException() throws Exception {
thrown.expect(CoderException.class);
thrown.exp... | 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 |
// Trace user (which is the same kerberos principal as the system user, but using a
// normal KerberosToken) needs to be able to read, write and alter the trace table
client.securityOperations().grantTablePermission(systemUser.getPrincipal(), traceTable,
TablePermissi... | 0 |
/*****************************************************************************
* Copyright (C) The Apache Software Foundation. All rights reserved. *
* ------------------------------------------------------------------------- *
* This software is published under the terms of the Apache Software License *
* v... | 0 |
//@@@ how to configure the parser?
return new HttpResponseParser(buffer, null, responseFactory, params); | 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 |
* Default options usable for all file systems. | 0 |
import org.apache.sshd.common.util.NumberUtils;
return getFingerPrint(f, buf, 0, NumberUtils.length(buf));
return getFingerPrint(d, buf, 0, NumberUtils.length(buf)); | 0 |
* @see FileAlterationObserver
return children != null ? children : FileAlterationObserver.EMPTY_ENTRIES; | 0 |
import org.apache.accumulo.harness.UnmanagedAccumuloIT;
public class BinaryIT extends UnmanagedAccumuloIT {
String tableName = getUniqueNames(1)[0];
c.tableOperations().create(tableName);
runTest(c, tableName);
String tableName = getUniqueNames(1)[0]; | 0 |
* any, must include the following acknowledgement:
* 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: ASTLENode.java,v 1.3 2003/10/09 21:28:55 rdonki... | 0 |
* Copyright 2000-2009 The Apache Software Foundation | 0 |
import org.apache.beam.sdk.transforms.DoFn;
* Interface for runners of {@link DoFn}'s that support pushback when reading side inputs,
* i.e. return elements that could not be processed because they require reading a side input
* window that is not ready.
public interface PushbackSideInputDoFnRunner<InputT, OutputT> ... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/test/org/apache/commons/jxpath/ri/compiler/ExtensionFunctionTest.java,v 1.9 2003/10/09 21:31:43 rdonkin Exp $
* $Revision: 1.9 $
* $Date: 2003/10/09 21:31:43 $
* any, must include the following acknowledgement:
* ... | 0 |
List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes()), ByteBuffer.wrap(timeType.name().getBytes()));
List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes()), start == null ? EMPTY : TextUtil.getByteBuffer(start), end == null ? EMPTY
List<ByteBuffer> args = Arrays.as... | 1 |
assertEquals(ThriftServerType.CUSTOM_HS_HA, | 0 |
/**
* Removes the timer set in this trigger context for the given {@link Instant}
* and {@link TimeDomain}.
*/
public abstract void deleteTimer(Instant timestamp, TimeDomain domain);
/** The current processing time. */
public abstract Instant currentProcessingTime();
/**
* Sets... | 0 |
import org.apache.commons.vfs.provider.jar.JarFileSystemProvider;
* @version $Revision: 1.3 $ $Date: 2002/11/25 05:42:08 $
manager.addProvider( "file", new UrlFileProvider() );
manager.addProvider( "jar", new JarFileSystemProvider() );
final File baseDir = AbstractVfsTestCase.getTestDirectory()... | 0 |
import org.junit.Ignore;
import com.twitter.mesos.scheduler.storage.mem.MemStorage;
@Ignore("TODO(William Farner): Remove this test completely once DbStorage is removed.")
return new MemStorage(); | 0 |
@SuppressWarnings("serial") | 0 |
protected String runningMode = SettingsDefaults.DEFAULT_RUNNING_MODE;
public void setRunningMode(String runningMode) {
this.runningMode = runningMode;
}
final String mode = getSystemProperty(Settings.PROPERTY_RUNNING_MODE, this.runningMode); | 0 |
.withFetchSize(12) | 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 ... | 1 |
* Copyright 1999-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 ... | 1 |
// guard against RetrievalMethod loops
if (data instanceof NodeSetData && Utils.secureValidation(context)) {
NodeSetData nsd = (NodeSetData)data;
Iterator i = nsd.iterator();
if (i.hasNext()) {
Node root = (Node)i.next();
if ("Retrieva... | 0 |
for(int i = 1; i < count; i++) { | 0 |
}
handler.requestReceived(this);
if (this.contentDecoder == null) { | 0 |
/**
* A status which represents a COMPLETED state at 0%
*/
public static final CalculatedStatus COMPLETED = new CalculatedStatus(HostRoleStatus.COMPLETED,
HostRoleStatus.COMPLETED, 100.0);
/**
* A status which represents a PENDING state at 0%
*/
public static final CalculatedStatus PENDING = ... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.