Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
import static java.util.Arrays.asList; import java.util.ArrayList; import java.util.Collections; import java.util.List; private static final String CLIENT_ERROR = "4xx"; private static final String SERVER_ERROR = "5xx"; private static final Pattern ERROR_CODE_PATTERN = Pattern.compile("\\d{3}"); priva...
0
import org.apache.beam.sdk.fn.data.InboundDataClient; <T> InboundDataClient receive(
0
// statically bind the configuration config.setBundleLocation( this.getBundle().getLocation(), true );
0
if (cause != null && TableNotFoundException.class.equals(cause.getClass())) { if (cause != null && NamespaceNotFoundException.class.equals(cause.getClass())) { if (bwpe != null) { if (scopes != null && scopes.size() > 0) { if (serverType == ThriftServerType.SASL) { if (remoteUser == nu...
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
* * * * * * private boolean equals(final String a, final String b) { if ( a == null && b == null ) { return true; } if ( a != null ) { return a.equals(b); } return false; } if (equals(this.public_id, doctype.public_id) ...
0
* @version $Revision: 1.3 $ $Date: 2003/06/18 18:43:56 $ /** * The default character encoding */ /** * Create arrays to hold the base64 characters and a * lookup for base64 chars */ /** * An empty array of type byte */ * @throws UnsupportedEncodingException
0
/* $Id$
0
InProcessPipelineRunner.CommittedBundle<?> inputBundle,
0
package org.apache.cocoon.it.sitemap; /* * 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, V...
0
thrown.expect(IllegalArgumentException.class); thrown.expectMessage("withTable() is required"); .expand(null); thrown.expect(IllegalArgumentException.class); thrown.expectMessage("withConfigProperties() is required"); HCatalogIO.write().withTable("myowntable").expand(null); thrown.expect...
0
/** * The stroke attribute used to draw the outline of the shape. */ /** * The paint attribute used to draw the outline of the shape. */ public Shape getPaintedArea(Shape shape){ return stroke.createStrokedShape(shape); }
0
log.info("Trying to acquire ZooKeeper lock for garbage collector");
0
import org.apache.commons.jexl.JexlContext; /** * @return the value of the expression */ public Object value(JexlContext context) throws Exception { return ((SimpleNode) jjtGetChild(0)).value(context); }
0
public void testResponseConnControlExplicitClose() throws Exception { HttpContext context = new BasicHttpContext(null); BasicHttpRequest request = new BasicHttpRequest("GET", "/"); request.addHeader(new BasicHeader(HTTP.CONN_DIRECTIVE, HTTP.CONN_KEEP_ALIVE)); context.setAttribute(Exe...
0
* @return a Calendar with the parsed timestamp
0
private static final Object[] EMPTY_ARRAY = new Object[0]; /** * Create a new ConstructorFunction. * @param constructor the constructor to call. */ * @param context evaluation context * @param parameters constructor args * @return new instance Class[] types = constructo...
0
import com.google.inject.Inject; private static StateMachineInvokerInterface stateMachineInvoker; @Inject public static void setInvoker(StateMachineInvokerInterface sm) { stateMachineInvoker = sm; } stateMachineInvoker.getAMBARIEventHandler().handle( stateMachineInvoker.getAMBARIEventHandler()....
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//io/src/test/org/apache/commons/io/FilenameUtilsTestCase.java,v 1.3 2003/12/30 07:00:03 bayard Exp $ * $Revision: 1.3 $ * $Date: 2003/12/30 07:00:03 $ * @version $Id: FilenameUtilsTestCase.java,v 1.3 2003/12/30 07:00:03 bayard Exp...
0
import org.apache.cocoon.portal.layout.LayoutException; import org.apache.cocoon.portal.om.Layout; throws SAXException, LayoutException;
0
sysvalue = System.getenv(variable); // N.B. Deprecated in Java 1.3/1.4, but re-instated in Java 1.5+
0
import org.apache.accumulo.core.client.security.tokens.PasswordToken;
0
visitRelationships(entityType, entity, visitedAttributes);
0
@SuppressWarnings("rawtypes") AccessController.doPrivileged( new PrivilegedAction<Object>() final Object result = AccessController.doPrivileged( new PrivilegedAction<Boolean>() public Boolean run() @SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes") Dictionary...
0
* Copyright (C) 2015 Google Inc.
0
import org.junit.Rule; import org.junit.rules.ExpectedException; private static final ReadOnlyTableProvider BOUNDED_TABLE = new ReadOnlyTableProvider( "test", ImmutableMap.of( "test", MockedBoundedTable.of( Schema.FieldType.INT32, "id", ...
0
import org.apache.batik.css.engine.value.ValueManager;
1
try (InputStream is = new ByteArrayInputStream(INPUT_DATA.getBytes("UTF8"))) { assertTrue(EXPECTED_RESULT.equals(out.toString("UTF8")));
0
import org.apache.beam.dsls.sql.BeamSqlEnv; @Override public PCollection<BeamSqlRow> buildBeamPipeline(PCollectionTuple inputPCollections , BeamSqlEnv sqlEnv) throws Exception { return delegate.buildBeamPipeline(inputPCollections, sqlEnv);
0
import org.apache.cocoon.objectmodel.ObjectModel; import org.apache.cocoon.xml.NamespacesTable; public Event execute(final XMLConsumer consumer, ObjectModel objectModel, ExecutionContext executionContext, MacroContext macroContext, NamespacesTable namespaces, Event startEvent, Event endEvent) ch...
0
out.writeLong(uuid.getMostSignificantBits() ^ 0x8000000000000000L); out.writeLong(uuid.getLeastSignificantBits() ^ 0x8000000000000000L); return new UUID(in.readLong() ^ 0x8000000000000000L, in.readLong() ^ 0x8000000000000000L);
0
return WindowedValue.of(value, DEFAULT_TIMESTAMP, DEFAULT_NONEMPTY_WINDOW, null);
0
import org.apache.sshd.common.PropertyResolverUtils; channel.open().verify(PropertyResolverUtils.getLongProperty(channel, CHANNEL_OPEN_TIMEOUT_PROP, DEFAULT_CHANNEL_OPEN_TIMEOUT)); Session session = getSession(); log.debug("Send SSH_MSG_CHANNEL_OPEN on {} channel {}", session, Inte...
0
import java.nio.charset.Charset; import java.security.MessageDigest; @Override public void updateSignatureHash(MessageDigest digester, Object val) throws AtlasException { if( !(val instanceof ITypedStruct)) { throw new IllegalArgumentException("Unexpected value type " + val.getClass().getSi...
1
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Iterables;
0
import java.util.Arrays; dto.types = Arrays.copyOf(info.getListenerTypes(), info.getListenerTypes().length);
0
MONITOR_SSL_KEYSTORETYPE("monitor.ssl.keyStoreType", "", PropertyType.STRING, "Type of SSL keystore"), MONITOR_SSL_TRUSTSTORETYPE("monitor.ssl.trustStoreType", "", PropertyType.STRING, "Type of SSL truststore"),
0
Map<String, String> newPropertiesAmsHbaseSecuritySite = new HashMap<>();
0
* Predefined instance indicating a successful call to a void method. * Predefined instance indicating to reactivate the component. */ public static final MethodResult REACTIVATE = new MethodResult(false, null); /**
0
* * * * @version CVS $Id: LogicsheetCodeGenerator.java,v 1.2 2004/06/11 20:03:35 vgritsenko Exp $ private SAXTransformerFactory getTransformerFactory() { throws Exception {
0
* @version CVS $Id: CopletInstanceDataReferenceFieldHandler.java,v 1.4 2004/01/08 13:33:52 cziegeler Exp $ if (copletInstanceData == null) { throw new IllegalArgumentException( "Referenced Coplet Instance Data "+value+" does not exist."); }
0
import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @Befo...
0
* @version $Id$
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
ImmutableSet.of() : ImmutableSet.copyOf(propertyIds); ImmutableSet.of() : ImmutableSet.copyOf(properties); ImmutableMap.of() : ImmutableMap.copyOf(requestInfoProperties);
0
* If an undefined exit value is returned by the process then
0
import static org.easymock.EasyMock.eq; import java.util.*; Request request = PropertyHelper.getCreateRequest(propertySet, null); Map<String, String> mapRequestProps = new HashMap<String, String>(); mapRequestProps.put("context", "Called from a test"); AbstractResourceProviderTest.Matcher.getCluste...
0
} @Test public void test290() throws Exception { Object result; JexlScript script; String[] srcs = new String[]{ "(x)->{ x.nothing().nothing() }", "(x)->{ x.toString().nothing() }", "(x)->{ x.nothing().nothing() }", "(x)->{ (x...
0
import com.twitter.aurora.scheduler.async.RescheduleCalculator.RescheduleCalculatorImpl; import com.twitter.aurora.scheduler.async.TaskGroups.TaskGroupsSettings; @CmdLine(name = "max_reschedule_task_delay_on_startup", help = "Upper bound of random delay for pending task rescheduling on scheduler startup.") pr...
1
* @author <a href="mailto:vgritsenko@apache.org">Vadim Gritsenko</a> * @version CVS $Id: LuceneIndexTransformer.java,v 1.2 2003/03/11 17:44:23 vgritsenko Exp $
0
package org.apache.ambari.server.stack.upgrade; import org.apache.ambari.server.stack.upgrade.UpgradePack.ProcessingComponent; import org.apache.ambari.server.stack.upgrade.orchestrate.StageWrapper; import org.apache.ambari.server.stack.upgrade.orchestrate.StageWrapper.Type; import org.apache.ambari.server.stack.upgrad...
0
* * <p>Used only in {@link Serializer}, which will move modules @Deprecated
0
import java.sql.SQLException; import java.util.Map; import com.google.inject.Inject; import com.google.inject.Injector; }
0
* @version CVS $Id$
0
/** Test targeted at {@link KryoCoder}. */ IdentifiedRegistrar registrar = IdentifiedRegistrar.of((k) -> k.register(ClassToBeEncoded.class)); IdentifiedRegistrar registrar = IdentifiedRegistrar.of( (k) -> { /* No-op */ }); IdentifiedRegistrar registrarC...
0
package org.apache.beam.sdk.extensions.sql.impl.transform;
0
* Header header = new BasicHeader("Set-Cookie", header = new BasicHeader("Set-Cookie", "name2=\"value2\"; $Path=\"/\"; $Domain=\".domain.com\"",
0
import org.apache.batik.bridge.FilterPrimitiveBridge; * @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a> public class SVGFeCompositeElementBridge implements FilterPrimitiveBridge, SVGConstants {
0
* @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
0
* @param className the name of the resource class
1
* * Resets the writer. The writer will be ready to start serializing another *
0
/** * TODO Add javadoc * * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a> * @version $Rev$, $Date$ */
0
* If {@link #disconnectionSqlCodes} has been set, sql states are compared to those in the * codes in {@link Utils#DISCONNECTION_SQL_CODES} and in this case anything starting with #{link
0
import java.lang.reflect.Field; import java.util.concurrent.Callable; // @Test // public void testThatAnonymousClassDeclaredInStaticFieldsAreNotManipulated() throws Exception { // Manipulator manipulator = new Manipulator(); // String className = "test.inner.ComponentWithInnerClasses"; // Man...
0
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument; import org.apache.beam.vendor.grpc.v1p21p0.com.google.protobuf.InvalidProtocolBufferException; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Iterables;
0
import org.apache.beam.sdk.metrics.MetricKey;
0
boolean noRetryNeeded = true; if ( !process(configList) ) { noRetryNeeded = false; } if ( !noRetryNeeded ) { // TODO } * @return {@code true} if the change has been processed, {@code false} if a retry is required ...
0
// Set default rendering hints g.addRenderingHints(nodeRenderContext.getRenderingHints());
0
import org.apache.http.message.BasicHeaderElement; elems = new HeaderElement[] { BasicHeaderElement.parse(headervalue) };
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
package org.apache.felix.ipojo.test.scenarios.ps; ots.addTestSuite(ProvidedServiceArchitectureTest.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 ...
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.ImmutableSet; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Iterables;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/expression/ExpressionSupport.java,v 1.4 2002/06/22 23:53:55 jstrachan Exp $ * $Revision: 1.4 $ * $Date: 2002/06/22 23:53:55 $ * $Id: ExpressionSupport.java,v 1.4 2002/06/22 23:53:55 jstrach...
0
import com.google.auth.Credentials; import com.google.auth.http.HttpCredentialsAdapter; import com.google.auth.oauth2.GoogleCredentials; Credentials credential = getDefaultCredential(); return new Bigquery.Builder(transport, jsonFactory, new HttpCredentialsAdapter(credential)) private Credentials getDefaultCr...
0
* {@link Object#equals(Object) equals()}. This is fine, as long as the
0
package org.apache.commons.digester3.rule; import org.apache.commons.digester3.Digester; import org.apache.commons.digester3.Rule;
0
import org.apache.felix.utils.json.JSONWriter;
0
public List<Node> getNodes (@DefaultValue("") @QueryParam("allocated") String allocated, @DefaultValue("") @QueryParam("alive") String alive) throws Exception { return Nodes.getInstance().getNodesByState(allocated, alive);
0
import org.apache.batik.ext.awt.image.renderable.Filter; import org.apache.batik.ext.awt.image.renderable.GaussianBlurRable; import org.apache.batik.ext.awt.image.renderable.PadMode; import org.apache.batik.ext.awt.image.renderable.PadRable; import org.apache.batik.ext.awt.image.renderable.GaussianBlurRable8Bit; import...
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.http.params.CoreConnectionPNames; import org.apache.http.params.CoreProtocolPNames; .setIntParameter(CoreConnectionPNames.SO_TIMEOUT, 30000) .setIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE, 8 * 1024) .setBooleanParameter(CoreConnectionPNames.STALE_CONNECTIO...
0
final TestAuthScheme authscheme = new TestAuthScheme(); final Header header = new BasicHeader( final TestAuthScheme authscheme = new TestAuthScheme(); final CharArrayBuffer buffer = new CharArrayBuffer(32); final Header header = new BufferedHeader(buffer); final TestAuthS...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/FloatArrayList.java,v 1.7 2003/01/11 21:28:02 rwaldhoff Exp $ * Copyright (c) 2002-2003 The Apache Software Foundation. All rights * any, must include the 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 not...
0
import java.util.Map; @Test public void testGetPropertiesMap() { Resource resource = new ResourceImpl(Resource.Type.Cluster); String p1 = PropertyHelper.getPropertyId(null, "p1"); String p2 = PropertyHelper.getPropertyId("c1", "p2"); String p3 = PropertyHelper.getPropertyId("c1/c2", "p3"); St...
0
package org.apache.felix.ipojo.runtime.core.services; public interface Dummy { }
0
* @param <E> the type of elements in this bag
0
* An exception for FATE operations to use to denote when an Exception is acceptable and should not * trigger warning messages. This exception is intended to wrap an existing exception from a FATE op * implementation so that the FATE runner can know that the exception doesn't need to warn. * Often times, problems th...
0
import org.ow2.chameleon.testing.helpers.IPOJOHelper; import org.ow2.chameleon.testing.helpers.OSGiHelper; import static org.ow2.chameleon.testing.tinybundles.ipojo.IPOJOBuilder.withiPOJO; .build( withiPOJO(new File(ROOT, "FooImpl.jar"), new File(TEST, "foo.xml")) ); .build( withiPOJO(new File(ROOT, "...
0
.setInstanceId(shard)
0
Document doc = XMLUtils.read(new FileInputStream(f), false); (kifac.newKeyValue(TestUtils.getPublicKey("DSA", 2048))));
0
/** * Get the underlying {@link Server} contained by this {@link GrpcFnServer}. */ public Server getServer() { return server; }
0
import java.util.Collections; import org.apache.beam.runners.core.construction.graph.PipelineNode; /** Generates config for a BEAM PTransform (regular java api or portable api). */ /** Generate config for regular java api PTransform. */ default Map<String, String> createConfig( T transform, TransformHierarchy...
0
LinkedCallParamBuilder callParam(int paramIndex);
0
dir = new File(base + fs + "src/test/resources" + fs
0
return (IOSession) key.attachment(); IOSessionImpl session = (IOSessionImpl) key.attachment(); session.resetLastRead(); session.resetLastWrite(); key.attach(session); IOSessionImpl session = (IOSessionImpl) key.attachment(); int timeout = s...
0
import org.apache.http.ReadableByteChannelMockup;
0
* <p> * Note, that this does not match the algorithm that ships with PHP, or the algorithm * found in the Perl <a href="http://search.cpan.org/~mschwern/Text-Metaphone-1.96/Metaphone.pm">Text:Metaphone-1.96</a>. * They have had undocumented changes from the originally published algorithm. * </p>
0
new LocalizableSupport(RESOURCES, Resources.class.getClassLoader());
1