Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
import com.google.cloud.dataflow.sdk.coders.Proto2CoderTestMessages.MessageA; import com.google.common.collect.ImmutableList; import com.google.protobuf.Duration; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.Serializable; import java.lang.reflect.Type; import java....
0
import org.apache.aurora.scheduler.storage.entities.ITaskConfig; import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger LOG = LoggerFactory.getLogger(ExecutorSettings.class); public ResourceBag getExecutorOverhead(ITaskConfig task) { if (!task.isSetExecutorConfig()) { // Do...
0
* <p>This class is immutable and thread-safe.</p>
0
import org.apache.felix.framework.cache.JarContent; bytes = m_contentLoader.getClassPath()[i].getEntryAsBytes(actual);
0
import org.apache.beam.sdk.values.PCollection; final PCollection<String> dataset = TestUtils.createMockDataset(TypeDescriptors.strings()); final PCollection<String> uniq = final Distinct distinct = (Distinct) TestUtils.getProducer(uniq); final PCollection<String> dataset = TestUtils.createMockDataset(Ty...
0
import javax.inject.Inject; @Inject private Monitor monitor; if (monitor.getProblemException() == null) { for (Entry<TableId,Map<ProblemType,Integer>> entry : monitor.getProblemSummary().entrySet()) { String tableName = Tables.getPrintableTableInfoFromId(monitor.getContext(), entry.getKey()); ...
0
* or more contributor license agreements. See the NOTICE file * regarding copyright ownership. The ASF licenses this file * with the License. You may obtain a copy of the License at * KIND, either express or implied. See the License for the
0
public static void setConnectionInfo(Job job, ConnectionInfo info) { OutputConfigurator.setConnectionInfo(CLASS, job.getConfiguration(), info); public static void setZooKeeperInstance(Job job, org.apache.accumulo.core.client.ClientConfiguration clientConfig) {
0
LOG.debug("stored metadata: {}", metadata); LOG.debug( LOG.debug("Staging artifact completed for " + artifactId);
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
this(DefaultHttpResponseFactory.INSTANCE, HeapByteBufferAllocator.INSTANCE, params);
0
/* * $Header: /cvshome/build/ee.foundation/src/java/security/GuardedObject.java,v 1.6 2006/03/14 01:20:27 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...
0
new ResponseServer("Test/1.1"), new RequestUserAgent("Test/1.1"), outhttpproc, new ProxyOutgoingConnectionReuseStrategy()); inhttpproc, new ProxyIncomingConnectionReuseStrategy(), handlerRegistry); ...
0
package org.apache.hc.core5.http2.impl;
0
serviceConfigEntity.setServiceDeleted(true);
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
* @return The client identities - may be {@code null}/empty if no currently Iterable<KeyPair> getClientIdentities(SessionContext session) throws IOException, GeneralSecurityException; * simply returns this value as it {@link #getClientIdentities(SessionContext)}. return session -> Collecti...
0
Window<Long> transform = Window.into(FixedWindows.of(windowDuration)); Matchers.equalTo(outputBundle)); Matchers.equalTo(outputBundle)); Matchers.equalTo(outputBundle)); return Collections.singleton(new IntervalWindow(c.timestamp(),
0
Write write = ElasticsearchIO.write().withConnectionConfiguration(connectionConfiguration); executeWriteTest(write); void testDefaultRetryPredicate(RestClient restClient) throws IOException { assertTrue(CUSTOM_RETRY_PREDICATE.test(response1.getEntity())); assertFalse(DEFAULT_RETRY_PREDICATE.test(respo...
0
// apply custom partitioner if different from default if (!origOperator.getPartitioning().hasDefaultPartitioner()) {
0
import com.google.common.collect.Lists; import com.google.inject.Inject; import static com.google.common.base.Preconditions.checkState; import static org.apache.aurora.scheduler.mesos.ProtosConversion.convert; * Implementation of Scheduler callback interfaces for Mesos SchedulerDriver. private final MesosCallbackHa...
0
this(pc, userName, Utils.toCharArray(userPassword));
0
new QuorumServer(i, new InetSocketAddress("127.0.0.1", clientport), new InetSocketAddress( "127.0.0.1", PortAssignment.unique())));
0
package org.apache.http.impl.conn.tsccm;
0
import com.google.cloud.dataflow.sdk.runners.worker.ReaderUtils; try { List<T> elems = ReaderUtils.readAllFromReader(reader); context.setPCollection(context.getOutput(transform), elems); } catch (IOException e) { throw new RuntimeException(e); }
0
import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger LOG = LoggerFactory.getLogger(ViewContextImpl.class);
1
/* * 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
final String uri = "zip:file:" + zipFilePath + "!/test.zip";
1
import java.util.HashMap; this.clusters = clusters != null ? new HashMap<>(clusters) : null;
0
import java.util.ArrayList; import java.util.HashMap; import java.util.List;
0
GANGLIA_CLUSTER_NAME_MAP.put("DATANODE", Arrays.asList("HDPDataNode", "HDPSlaves")); GANGLIA_CLUSTER_NAME_MAP.put("TASKTRACKER", Arrays.asList("HDPTaskTracker", "HDPSlaves")); GANGLIA_CLUSTER_NAME_MAP.put("NODEMANAGER", Arrays.asList("HDPNodeManager", "HDPSlaves")); GANGLIA_CLUST...
0
/* * Copyright 2000-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
public ConstantString(final ConstantString c) { ConstantString(final DataInput file) throws IOException { public ConstantString(final int string_index) { public void accept( final Visitor v ) { public final void dump( final DataOutputStream file ) throws IOException { public final void setString...
0
import org.apache.accumulo.core.client.AccumuloClient; AccumuloClient conn = context.getConnector(); private void waitForGCLock(AccumuloClient conn) throws InterruptedException { assertTrue(getClient().tableOperations().exists(ReplicationTable.NAME)); getClient().tableOperations().tableIdMap().get(Rep...
0
import static org.junit.Assert.assertEquals; assertEquals(tableDirs[1] + "/" + iti.tableId + "/" + tabletDir,
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableMap;
0
public boolean hasNamespacePermission(String user, String namespace, public boolean hasCachedNamespacePermission(String user, String namespace, throws AccumuloSecurityException { throws AccumuloSecurityException { public void grantNamespacePermission(String user, String namespace, NamespacePermi...
0
final Map<K, V> testMap = new TreeMap<>();
1
/** * {@inheritDoc} */ public Class<?> classForName( String className, Map<String, Object> context ) Class<?> result = null; if ( ( result = (Class<?>) classes.get( className ) ) == null )
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/compiler/CoreOperation.java,v 1.2 2001/09/21 23:22:44 dmitri Exp $ * $Revision: 1.2 $ * $Date: 2001/09/21 23:22:44 $ * @version $Revision: 1.2 $ $Date: 2001/09/21 23:22:44 $ ...
0
Collection<OptionGroup> processedGroups = new ArrayList<OptionGroup>(); private void appendOptionGroup(StringBuffer buff, OptionGroup group) private void appendOption(StringBuffer buff, Option option, boolean required)
0
public static final String OS_FAMILY_KEY = "server.os_family"; public static final String OS_VERSION_KEY = "server.os_type"; public static final String SHARED_RESOURCES_DIR_KEY = "shared.resources.dir"; private static final String SHARED_RESOURCES_DIR_DEFAULT = "/usr/lib/ambari-server/lib/ambari_commons/resourc...
0
public ConfigurationErrorEvent(final Object source, final EventType<? extends ConfigurationErrorEvent> eventType, final EventType<?> operationType, final String propName, final Object propValue, final Throwable cause)
0
import org.apache.beam.sdk.state.TimeDomain;
0
@SuppressWarnings("serial") @SuppressWarnings("serial") @SuppressWarnings("serial") @SuppressWarnings("serial") @SuppressWarnings("serial") @SuppressWarnings("serial") @SuppressWarnings("serial") @SuppressWarnings("serial") @SuppressWarnings("serial") @SuppressWarnings("serial")
0
@SuppressWarnings({"boxing","static-access"}) // test code
0
// disable request TTL for these tests Configuration configuration = injector.getInstance(Configuration.class); configuration.setProperty(Configuration.METRIC_RETRIEVAL_SERVICE_REQUEST_TTL_ENABLED.getKey(), "false"); JMXPropertyProvider.init(configuration);
0
members = QuorumPeerConfig.parseDynamicConfig(dynamicCfg, 0, true, false).toString();
0
import org.apache.aurora.scheduler.state.StateChangeResult; .andReturn(StateChangeResult.SUCCESS); .andReturn(StateChangeResult.SUCCESS); .andReturn(StateChangeResult.ILLEGAL);
0
public void process(final HttpRequest request, final HttpContext context)
0
protected static final String RESOURCES =
0
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
0
package org.apache.beam.sdk.extensions.euphoria.testing; import org.apache.beam.sdk.extensions.euphoria.core.client.dataset.Dataset; import org.apache.beam.sdk.extensions.euphoria.core.client.flow.Flow; import org.apache.beam.sdk.extensions.euphoria.core.client.io.ListDataSink; import org.apache.beam.sdk.extensions.eu...
0
package org.apache.commons.digester3.xmlrules.metaparser; import org.apache.commons.digester3.RulesBinder; import org.apache.commons.digester3.RulesModule; import org.apache.commons.digester3.rulesbinder.ConverterBuilder; import org.apache.commons.digester3.rulesbinder.LinkedRuleBuilder; final class PrefixedRulesBind...
0
/** Union builder which adds input {@link Dataset} to operator under build. */
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.cache.Weigher;
0
String[] subProps = getQuartzDbDelegateClassAndValidationQuery(); properties.setProperty("org.quartz.jobStore.driverDelegateClass", subProps[0]); subProps[1]); LOG.debug("Using quartz properties: " + properties); protected String[] getQuartzDbDelegateClassAndValidationQuery() { String dbU...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/compiler/Path.java,v 1.6 2002/10/13 02:59:01 dmitri Exp $ * $Revision: 1.6 $ * $Date: 2002/10/13 02:59:01 $ * @version $Revision: 1.6 $ $Date: 2002/10/13 02:59:01 $ els...
0
ParDo.of(new PartitionDoFn()).withOutputTags(MAIN, TupleTagList.of(SIDE)));
0
} catch (InterruptedException ie) { // Hadoop 2.0.2-alpha's Job.mapProgress throws Interrupted Exception. 1.x and 2.0.4 do not. return new RecoveryStatus(logFile.server, logFile.file, 1.0, 1.0, (int) (System.currentTimeMillis() - copyStartTime), 1.0);
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.commons.dbcp2;
1
/* * $Id$ * 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...
0
private DOMUtils() {} * Sets an element's attribute (using DOM level 2) with the * @param value the attribute value. If null, no attribute is set. * Sets an element's attribute (using DOM level 2) with the * @param value the attribute value. If null, no attribute is set. * Returns the first...
0
* Copyright (c) OSGi Alliance (2002, 2008). All Rights Reserved. * @version $Revision: 7337 $
0
chunked.close(); chunked.close(); public void negative_chunksize_not_permitted() throws Exception { (new ChunkedWriter(new OutputStreamWriter(new ByteArrayOutputStream()), 0)).close();;
0
* @version $Id$
1
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Lists; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Maps;
0
import java.beans.IntrospectionException; import java.beans.Introspector; import java.beans.PropertyDescriptor; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Set; session = new FOM_Session( getParentScope(), ObjectM...
0
import org.apache.commons.vfs.provider.UriParser; // HttpURL url = new HttpURL(name.getHostName(), name.getPort(), name.getPath()); HttpURL url = new HttpURL(name.getUserName(), name.getPassword(), name.getHostName(), name.getPort(), name.getPathDecoded()); url.setEscapedPath(name.ge...
0
* @since 1.4
1
package org.ognl.test.objects; /** * */ public class Model { public int getOptionCount() { return 1; } }
0
import org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader; Class<? extends FunctionalTest> testClass = AccumuloVFSClassLoader.loadClass(clazz, FunctionalTest.class);
0
import org.apache.accumulo.core.client.impl.Credentials;
1
import java.util.ArrayList; import java.util.Iterator; token = token.substring(1, token.length() - 1);
0
try (ClientSession session = client.connect(getCurrentTestName(), TEST_LOCALHOST, port).verify(7L, TimeUnit.SECONDS).getSession()) { try (ClientSession session = client.connect(getCurrentTestName(), TEST_LOCALHOST, port).verify(7L, TimeUnit.SECONDS).getSession()) { try (ClientSession session = c...
0
ImmutableMap.of(DEFAULT_SCHEME, new LocalFileSystem())); return MatchResult.create(Status.OK, Collections.emptyList()); .toSortedList(Ordering.natural()));
0
protected ResourceInstance createResource(Type type, Map<Type, String> mapIds) {
0
public class OpenEmptySigilProjectWizardAction extends AbstractNewWizardAction implements ICheatSheetAction { private String name; public void run( String[] params, ICheatSheetManager manager ) { if ( params != null && params.length > 0 ) { name = params[0]; } ...
0
public abstract <T> T getValue(int fieldIdx);
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 m...
0
import org.apache.accumulo.core.util.DeprecationUtil; DeprecationUtil.setMockInstance(split, true); Assert.assertEquals(DeprecationUtil.isMockInstanceSet(split), DeprecationUtil.isMockInstanceSet(newSplit));
0
for (final NameValuePair current : this.parameters) { final BasicHeaderElement that = (BasicHeaderElement) object; for (final NameValuePair parameter : this.parameters) { final StringBuilder buffer = new StringBuilder(); for (final NameValuePair parameter : this.parameters) {
0
import org.apache.atlas.listener.ActiveStateChangeHandler; //Enable this after ATLAS-498 is committed //activeStateChangeHandlerBinder.addBinding().to(HBaseBasedAuditRepository.class);
0
new MergingStateAccessorImpl<>( activeWindows, stateInternals, style, activeToBeMerged, mergeResult)); return new OnPremergeContextImpl( new PremergingStateAccessorImpl<>( activeWindows, windowingStrategy.getWindowFn().windowCod...
0
import com.twitter.mesos.scheduler.state.CronJobManager;
0
import java.lang.reflect.Proxy; import org.apache.commons.digester3.internal.mapper.MapperInvocationHandler; /** * Creates a &lt;T&gt; dynamic proxy that wraps the Digester * and performs Digester mapping under the hood. * * <b>WARNING</b>: this methods supports interfaces only. * * @p...
0
public HttpResponse execute(HttpHost target, final HttpRequest request, final HttpContext context) final HttpRequest request, final HttpContext context) protected void establishRoute(final HttpR...
0
import org.apache.hadoop.security.UserGroupInformation; private String atlasEndpoint; atlasEndpoint = applicationProperties.getString(ATLAS_ENDPOINT_PROPERTY, "http://localhost:21000"); UserGroupInformation ugi = UserGroupInformation.createRemoteUser(message.getUser()); ...
0
import org.apache.accumulo.core.replication.ReplicationConstants; replServiceAddr = new String(reader.getData(ZooUtil.getRoot(inst) + ReplicationConstants.ZOO_TSERVERS + "/" + tserver.hostPort(), null), StandardCharsets.UTF_8);
1
List<Predicate> predicateList = new LinkedList<>(); List<Predicate> andPredicateList = new LinkedList<>(); List<Predicate> andPredicateList = new LinkedList<>();
0
import org.apache.ambari.server.state.quicklinks.Host; Host host = link.getHost(); assertEquals("core-site", host.getSite());
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
*/ /** Load double from array */ public DALOAD() { super(org.apache.bcel.Constants.DALOAD); } /** * Call corresponding visitor method(s). The order is: * Call visitor methods of implemented interfaces first, then * call methods according to the class hierarchy in descending...
0
* Copyright 2000-2009 The Apache Software Foundation
0
@Override @Override
0
public void genJavaCode(File outputDirectory) throws IOException { File pkgdir = new File(outputDirectory, pkgpath);
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
public static String urnForTransform(PTransform<?, ?> transform) { TransformPayloadTranslator translator = KNOWN_PAYLOAD_TRANSLATORS.get(transform.getClass()); if (translator == null) { throw new IllegalStateException( String.format("No translator known for %s", transform.getClass().getNam...
0
import org.apache.atlas.model.instance.AtlasClassification; import org.apache.commons.lang.StringUtils; private final Map<String, AtlasObjectId> updatedEntities = new HashMap<>(); private final Map<String, AtlasObjectId> deletedEntities = new HashMap<>(); private final Map<St...
0