Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
import java.util.Objects; this.buffer = Objects.requireNonNull(buffer, "No buffer provided"); Objects.requireNonNull(cause, "No cause specified");
0
package org.apache.felix.karaf.jaas.config;
0
public AnnotationVisitor visitParameterAnnotation(int id, String name, boolean visible) { if (visible) { AnnotationDescriptor ann = new AnnotationDescriptor(name, visible); m_method.addParameterAnnotation(id, ann); return ann; ...
0
* file path and automatically process the resources. return initialize(new BufferedInputStream(new FileInputStream(fileName))); * Initializes a <code>ValidatorResources</code> based on the <code>InputStream</code> * and automatically process the resources. ValidatorResources resources = new Val...
0
@Override public void dump( DataOutputStream out ) throws IOException { @Override public final void setIndex( int index ) { @Override protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException { int nameIndex = ((org.apache.bcel.classfile.ConstantClass) c).getNameInd...
0
import static org.junit.Assert.assertNotEquals; public void testInvokesSplitWithDefaultNumSplitsTooLarge() throws Exception { UnboundedSource<Long, ?> unboundedCountingSource = new BoundedToUnboundedSourceAdapter<Long>(CountingSource.upTo(1)); PipelineOptions options = PipelineOptionsFactory.create();...
0
Method m = BlueprintService.getClass().getMethod("getBlueprint", String.class, HttpHeaders.class, UriInfo.class, String.class); Object[] args = new Object[] {null, getHttpHeaders(), getUriInfo(), "blueprintName"}; m = BlueprintService.getClass().getMethod("getBlueprints", String.class, HttpHeaders.class, Ur...
0
private static final String DEFAULT_DATE_FORMAT * This constructor allows the creation of an OS2FTPEntryParser object * @param config The {@link FTPClientConfig configuration} object used to
0
* Closes all pools associated with this class. * Implements ObjectFactory to create an instance of SharedPoolDataSource * Sets some properties saved within a Reference
0
public Amount<Long, Time> get() { return Amount.of((long) minHoldTimeMs + random.nextInt(maxJitterWindowMs), Time.MILLISECONDS);
0
if (this.debugEnabled) { SystemLogger.debug(msg); } if (this.debugEnabled) { SystemLogger.debug(format(msg, arg0, arg1)); } // Classify all info messages as debug messages. // Jetty uses way to much verbose info messages. if (this.debugEnab...
0
"org.apache.felix.scr.integration.components.circularFactory," +
0
import org.apache.felix.ipojo.plugin.IPojoPluginConfiguration; IPojoPluginConfiguration.getLogger().log(Level.INFO, "End of the XML parsing, " + m_elements.length + " primary elements found"); IPojoPluginConfiguration.getLogger().log(Level.SEVERE, "Parse error when ending an element : " + qName + " [" + name...
0
if (!update && isRegistered(eDef.name)) { if (!update && isRegistered(sDef.typeName)) { if (!update && isRegistered(traitDef.typeName)) { if (!update && isRegistered(classDef.typeName)) { @Override public boolean isRegistered(String typeNam...
0
= "yy/MM/dd HH:mm:ss"; //01/11/09 12:30:24 private static final String REGEX = String datestr = group(3)+" "+group(4); // intentionally do nothing
0
import org.apache.beam.sdk.extensions.sql.BeamSqlCli; import org.apache.beam.sdk.extensions.sql.BeamSqlTable;
0
import java.security.NoSuchAlgorithmException; if (provider == null) { provider = getProvider("KeyInfoFactory", mechanismType); } Provider.Service ps = provider.getService("KeyInfoFactory", mechanismType); if (ps == null) { ...
0
"sumInteger", VarIntCoder.of(), Sum.ofIntegers());
0
import javax.xml.parsers.DocumentBuilder; private DocumentBuilder db; db = XMLUtils.createDocumentBuilder(false); Document doc = db.newDocument();
0
// prevent JPA errors when -1 is passed in by accident int offset = request.Pagination.getOffset(); if (offset < 0) { offset = 0; } typedQuery.setFirstResult(offset);
0
/* Generated By:JJTree: Do not edit this line. ASTBitwiseAndNode.java */ package org.apache.commons.jexl.parser; public class ASTBitwiseAndNode extends SimpleNode { public ASTBitwiseAndNode(int id) { super(id); } public ASTBitwiseAndNode(Parser p, int id) { super(p, id); } /** Accept the visitor....
0
Set<String> servicesWithUpdatedConfigs = new HashSet<>(); boolean configsChanged = false; if (configsChanged) { servicesWithUpdatedConfigs.add(serviceName); } if (!servicesWithUpdatedConfigs.isEmpty()) { m_configHelperProvider.get().updateAgentConfigs(Collections.singletonMap(clu...
0
import org.apache.beam.runners.core.construction.ReplacementOutputs;
0
ancestorSelector = ancestor; simpleSelector = simple; return ancestorSelector; return simpleSelector;
1
package org.apache.beam.learning.katas.triggers.windowaccummode;
0
InstructionHandle ih = super.getTarget();
0
// if they supplied a property and we cannot load it, then fail hard VolumeChooser chooser1; try { chooser1 = Property.createInstanceFromPropertyName(conf, Property.GENERAL_VOLUME_CHOOSER, VolumeChooser.class, null); } catch (NullPointerException npe) { chooser1 = null; // null chooser...
0
import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.with; import org.apache.felix.ipojo.tinybundles.BundleAsiPOJO; import org.ops4j.pax.swissbox.tinybundles.core.TinyBundles; .groupId( "org.ops4j.pax.swissbox" ) .artifactId( "pax-swissbox-tinybundles...
0
/** * Copyright 2013 Apache Software Foundation
0
* * * * * * *
0
* Signals that an HTTP exception has occurred. public class HttpException extends Exception { public HttpException(final String message) { public HttpException(final String message, final Throwable cause) { super(message, cause);
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...
0
* @throws TableNotFoundException public void delete(String namespace) throws AccumuloException, AccumuloSecurityException, TableNamespaceNotFoundException, TableNamespaceNotEmptyException, TableNotFoundException; * @throws TableNotFoundException * Sets a property on a table namespace which applies to a...
0
import org.apache.hc.core5.annotation.Contract; import org.apache.hc.core5.annotation.ThreadingBehavior; @Contract(threading = ThreadingBehavior.SAFE)
0
@Override public ILock apply(Storage.MutableStoreProvider storeProvider) @Override public void execute(MutableStoreProvider storeProvider) { @Override public Optional<ILock> apply(StoreProvider storeProvider) {
0
createKeytab(kdc, kdcWorkDir, "zookeeper", "dgi.keytab");
0
package org.apache.ambari.metrics.adservice.prototype.methods;
0
* @param cursor the parser cursor containing the current position and * the bounds within the buffer for the parsing operation ProtocolVersion parseProtocolVersion( CharArrayBuffer buffer, ParserCursor cursor) throws ParseException; * @param cursor the ...
0
package org.apache.felix.connect;
0
/** Factory that creates a {@link BeamCalciteSchema}. */ private BeamCalciteSchemaFactory() {} public Schema create(SchemaPlus parentSchema, String name, Map<String, Object> operand) {
0
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument; import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkNotNull; import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState; import st...
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 $Revision: 1.8 $ $Date: 2003/10/13 08:43:51 $
0
public static final String CONNECTION_MANAGER_FACTORY_CLASS_NAME = "http.connection-manager.factory-class-name"; /** * Defines the factory to create a default {@link org.apache.http.conn.ClientConnectionManager}. * <p> * This parameters expects a value of type {@link org.apache.http.conn.Cli...
0
import org.xml.sax.SAXException;
0
* @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
0
if (result.getNode() == currentStructure.getRoot()) { // the whole model is to be cleared clear(); return; }
0
public void testSpaces() { String value = "Hello World"; String listString = BLANK + value + BLANK + "," + BLANK + value + BLANK + "," +value; String[] list = AD.splitList(listString); assertNotNull(list); assertEquals(3, list.length); assertEquals(value, list[0])...
0
import org.apache.accumulo.core.client.AccumuloClient; final AccumuloClient c = getClient();
0
* @deprecated This block is deprecated and will be removed in future versions.
0
throw new IllegalArgumentException( "invalid comparison: " + v1.getClass().getName() + " and " + v2.getClass().getName() );
0
i.remove(); cleanupImplementationObject( componentContext.getInstance() ); serviceContext = serviceContexts.get( service ); serviceContexts.remove( service ); cleanupImplementationObject( service );
0
case FINISHED: break; case NEED_TASK: break; case FINISHED: break;
0
@AspectService(ranking = 10, factory=ServiceProviderAspectFactory.class, factoryMethod="createAspect")
0
import org.apache.beam.sdk.values.BeamRecordType; public MockedBoundedTable(BeamRecordType beamRowType) { super(beamRowType); public static MockedBoundedTable of(final BeamRecordType type) {
0
/* * $Header: /cvshome/build/ee.foundation/src/java/net/ContentHandler.java,v 1.6 2006/03/14 01:20:23 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...
0
import org.apache.commons.lang.StringUtils; Assert.assertTrue(StringUtils.isBlank(check.getFailReason())); Assert.assertTrue(StringUtils.isBlank(check.getFailReason())); Assert.assertTrue(StringUtils.isNotBlank(check.getFailReason())); Assert.assertEquals("Auto Start must be disabled before performing a...
0
* @version CVS $Id: ParanoidCocoonServlet.java,v 1.8 2003/08/07 06:26:24 cziegeler Exp $ if ( this.servlet != null ) { final ClassLoader old = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(this.classloader); ...
0
clusters.mapAndPublishHostsToCluster(hostNames, clusterName);
1
import org.apache.sshd.util.test.NoIoTestCase; import org.junit.experimental.categories.Category; @Category({ NoIoTestCase.class })
0
import org.apache.accumulo.fate.zookeeper.IZooReaderWriter; import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy;
1
package org.apache.commons.net.examples.util;
0
* * protected volatile GenericObjectPool<PoolableConnection> connectionPool = null; GenericObjectPool<PoolableConnection> gop; gop = new GenericObjectPool<>(factory, new GenericObjectPoolConfig(), gop = new GenericObjectPool<>(factory); PoolingDataSource<Pool...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/test/org/apache/commons/beanutils/BeanWithInnerBean.java,v 1.2 2003/10/05 13:33:29 rdonkin Exp $ * $Revision: 1.2 $ * $Date: 2003/10/05 13:33:29 $ * ==================================================================...
0
public boolean apply(String tableName) { public boolean apply(String tableId) { public boolean apply(String tableName) { public boolean apply(String tableName) { public boolean apply(String tableName) { public boolean apply(String tableId) {
0
if(LOG.isDebugEnabled()) { LOG.debug("Config staleness for " + sch.getServiceComponentName() + " on host " + sch.getHostName() + " - " + stale); } if (!actualTags.get(CLUSTER_DEFAULT_TAG).equals(desiredTags.get(CLUSTER_DEFAULT_TAG))) { // cluster level configs are already c...
0
for (Attribute attribute : attributes) { if (attribute instanceof Code) { return (Code) attribute; for (Attribute attribute : attributes) { if (attribute instanceof ExceptionTable) { return (ExceptionTable) attribute; for (Attribute attribu...
0
/* ==================================================================== * Copyright (c) 2003-2004 The Apache Software Foundation. All rights * @version $Revision: 1.3 $ $Date: 2004/01/14 21:34:34 $
0
protected static Map<String, Object> createCaseInsensitiveHashMap(int cols) {
0
* * * * DomHelper.getLocation(treeModelElement), e); DomHelper.getLocation(treeModelElement));
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
return Response.seeOther(URI.create("/apihelp/index.html")).build();
0
// these are functions to delay loading the Accumulo configuration unless we must public static String getBaseDir() { return ServerConfiguration.getSiteConfiguration().get(Property.INSTANCE_DFS_DIR); } public static String getTablesDir() { return getBaseDir() + "/tables"; } public static Strin...
1
import org.apache.ambari.logfeeder.util.LogFeederUtil;
0
import org.apache.aurora.common.base.Command; import org.apache.aurora.common.quantity.Amount; import org.apache.aurora.common.quantity.Time; import org.apache.aurora.common.testing.easymock.EasyMockTest; import org.apache.aurora.common.util.testing.FakeClock;
0
* http://www.apache.org/licenses/LICENSE-2.0
0
this.type = type != null ? type : new StringType<>();
0
import java.util.Collections; //CHECKSTYLE:OFF Not magic number //CHECKSTYLE:ON
0
Throwable cause = tte.getCause(); if (null != cause && cause instanceof UnknownHostException) {
1
public TransformResult<T> finishBundle() throws Exception { return StepTransformResult.<T>withHold(transform, BoundedWindow.TIMESTAMP_MIN_VALUE)
0
for (int i = 0; i < 10; i++) {
0
requestProducer, responseConsumer, callback, context, conn, this.httpprocessor); context, conn, this.httpprocessor); context, conn, this.httpprocessor); this.context, conn, httpprocessor); this.context, conn, httpprocessor);
0
import org.apache.beam.runners.direct.CommittedResult.OutputType; import java.util.EnumSet; Iterables.isEmpty(bundles) ? EnumSet.noneOf(OutputType.class) : EnumSet.of(OutputType.BUNDLE));
0
import org.apache.beam.sdk.state.Timer;
0
/* * Copyright 1999-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...
0
import java.lang.reflect.Proxy; import org.apache.http.client.methods.CloseableHttpResponse; private final CloseableHttpResponse response; final CloseableHttpResponse response) { CloseableHttpResponse getReconstructedResponse() throws IOException { return (CloseableHttpResponse) Proxy.newPro...
0
* @version CVS $Id: ComposerAction.java,v 1.1 2004/05/24 12:37:52 cziegeler Exp $
0
import org.apache.accumulo.core.client.mapreduce.lib.impl.FileOutputConfigurator; AccumuloConfiguration acuconf = FileOutputConfigurator.getAccumuloConfiguration(AccumuloFileOutputFormat.class, job1.getConfiguration()); acuconf = FileOutputConfigurator.getAccumuloConfiguration(AccumuloFileOutputFormat.class, jo...
1
import org.apache.beam.runners.core.GroupByKeyViaGroupByKeyOnly;
0
System.arraycopy(allNames, 0, names, 0, names.length);
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
receiver.get(cold).output(kv); receiver.get(hot).output(KV.of(KV.of(kv.getKey(), nonce), kv.getValue()));
0
AtlasTypeUtil.createOptionalAttrDef("parameters", "map<string,string>"),
0
.satisfies( input -> { // The final sums need not exist in the same pane, but must appear in the output // PCollection assertThat(input, hasItem(KV.of(blueTeam, 11))); assertThat(input, hasItem(KV.of(redTeam, 27))); return null; ...
0
public static <K, V> OrderedMapIterator<K, V> unmodifiableOrderedMapIterator(OrderedMapIterator<K, V> iterator) {
0
ROOT, META, NORMAL
0
Reader<String> reader = ReaderFactory.create(null, source, null, null, null); Reader<String> reader = ReaderFactory.create(null, source, null, null, null);
0
for (Pass3aVerifier pv : p3avs.values()) { for (Pass3bVerifier pv : p3bvs.values()) {
0
* limitations under the License.
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
* Encode in Base64 the given <code>{@link BigInteger}</code>. * Returns a byte-array representation of a <code>{@link BigInteger}</code>. * <b>N.B.:</B> <code>{@link BigInteger}</code>'s toByteArray * @param binaryData <code>byte[]</code> to be base64 encoded
0