Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
package com.twitter.mesos.scheduler; import com.twitter.mesos.scheduler.DbStorage.Configuration; import java.sql.SQLException; import java.util.Set; /** * @author jsirois */ public class DbStorageSchedulerCoreImplTest extends BaseSchedulerCoreImplTest { @Override protected Storage createStorage(Set<JobManager...
0
package org.apache.sshd.util.test;
0
return sqlEnv.parseQuery(pipeline, queryString);
0
import java.util.Comparator; public static final Comparator<File> EXTENSION_COMPARATOR = new ExtensionFileComparator(); public static final Comparator<File> EXTENSION_REVERSE = new ReverseComparator(EXTENSION_COMPARATOR); public static final Comparator<File> EXTENSION_INSENSITIVE_COMPARATOR public stati...
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
// This is no-op, since Spark runner in batch is blocking.
0
closeState = CloseState.CLOSED;
0
import org.apache.beam.sdk.schemas.Schema;
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;
0
public static class ValueCombiner<K, InputT, AccumT, OutputT> implements PartialGroupByKeyOperation.Combiner<WindowedValue<K>, InputT, AccumT, OutputT> { private final Combine.KeyedCombineFn<K, InputT, AccumT, OutputT> combineFn; private ValueCombiner(Combine.KeyedCombineFn<K, InputT, AccumT, OutputT> c...
0
/** * * @version CVS $Id: SourceResolverAdapter.java,v 1.4 2003/03/16 18:03:55 vgritsenko Exp $ */
0
// Crypto-related properties @Experimental INSTANCE_CRYPTO_PREFIX("instance.crypto.opts.", null, PropertyType.PREFIX, "Properties related to on-disk file encryption."), @Experimental @Sensitive INSTANCE_CRYPTO_SENSITIVE_PREFIX("instance.crypto.opts.sensitive.", null, PropertyType.PREFIX, "Sensit...
0
/** * {@link PipelineOptions} which allows passing {@link com.esotericsoftware.kryo.Kryo} parameters. */
0
* 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
import cz.seznam.euphoria.core.client.operator.state.StateFactory; static final class Factory<E> implements StateFactory<E, E, State<E, E>> { public State<E, E> createState(Context<E> context, StorageProvider storageProvider) { return new CombiningReduceState<>(context, storageProvider, r); private ...
0
clusterId, hostname, report, false);
0
import org.apache.accumulo.core.iterators.IteratorEnvironment; public static class TestIE implements IteratorEnvironment {
0
public void parallelWriteSpeed() throws InterruptedException {
0
if (ldapConfiguration.isAmbariManagesLdapConfiguration()) {
0
/* import java.net.URL; * private URL source; objectClassDefinition.setMetadata( this ); public URL getSource() { return source; } public void setSource( URL source ) { this.source = source; }
0
/** * @version $Revision: 1.5 $ $Date: 2004/02/28 12:18:17 $ */
0
import org.apache.xml.security.utils.IdResolver; IdResolver.registerElementById(propElem, id);
0
HttpResponse response = conn.receiveResponse(request);
0
import com.google.cloud.dataflow.sdk.util.common.worker.AbstractBoundedReaderIterator; class UngroupedShuffleReaderIterator extends AbstractBoundedReaderIterator<T> { protected boolean hasNextImpl() throws IOException { protected T nextImpl() throws IOException {
0
package org.apache.commons.net;
0
import org.apache.felix.http.base.internal.AbstractHttpActivator; extends AbstractHttpActivator super.doStart(); super.doStop();
0
res.resolve(uriAttr, null, true); res.resolve(uriAttr, null, true); res.resolve(uriAttr, "", true);
0
RunnerApi.Trigger.Repeat.newBuilder().setSubtrigger(toProto(v.getRepeatedTrigger()))) (OnceTrigger) fromProto(triggerProto.getAfterEndOfWindow().getLateFirings())); String.format("Required field 'timestamp_transform' not set in %s", transform));
1
* <p> * Attempts to modify it will result in an UnsupportedOperationException.
0
import org.apache.beam.model.pipeline.v1.RunnerApi.Environment;
0
* <h2>Reading text files</h2> * * <h3>Filepattern expansion and watching</h3> * * <h3>Reading a very large number of files</h3> * * <p>If it is known that the filepattern will match a very large number of files (e.g. tens of * thousands or more), use {@link Read#withHintMatchesManyFiles} for better performance ...
0
* href="https://commons.apache.org/configuration/team-list.html">Commons
0
import java.util.Collection; import java.util.Collections;
0
import org.apache.accumulo.core.security.thrift.TCredentials; private TCredentials credentials; ScannerIterator(Instance instance, TCredentials credentials, Text table, Authorizations authorizations, Range range, int size, int timeOut,
1
/** * 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 * distribu...
0
WeakReference<ManagedClientConnection> wref = new WeakReference<ManagedClientConnection>(conn); WeakReference<ThreadSafeClientConnManager> wref = new WeakReference<ThreadSafeClientConnManager>(mgr);
0
public String getProperty(String key) { return getConfiguration().get(key);
0
new HashMap<>(), new HashMap<>(), combineFn, boundedStrategy, new HashMap<>(), context.getPipelineOptions());
0
package org.apache.ambari.logsearch.config.json.model.inputconfig.impl;
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 java.io.IOException; @Override public boolean isClosed() { OperatedClientConnection conn = getConnection(); return !conn.isOpen(); } @Override public void close() { OperatedClientConnection conn = getConnection(); try { conn.close(); } catc...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/adapters/Attic/IntIteratorIterator.java,v 1.4 2003/08/31 17:21:17 scolebourne Exp $ * any, must include the following acknowledgement: * Alternately, this acknow...
0
Copyright 2001 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...
0
import org.apache.commons.pool2.impl.DefaultPooledObject;
0
created |= holder.configurationUpdated( new TargetedPID( config.getPid() ), new TargetedPID( config.getFactoryPid() ), config.getProperties(),
0
* @version $Revision: 1.2 $ $Date: 2002/08/21 07:00:13 $ private final String name; private final OsFamily[] families; this.name = name; families = new OsFamily[ 0 ]; this.name = name; this.families = families; return name; return families;
0
StackMapTable(int name_index, int length, DataInput file, ConstantPool constant_pool) throws IOException { int map_length = file.readUnsignedShort(); file.writeShort(map.length); for (StackMapTableEntry entry : map) { entry.dump(file); for (int i = 0; i < map.length; i++)...
0
if (null != portString) { } if (prevProps == null) { prevProps = new HashSet<String>(); } } } Request request = PropertyHelper.getReadRequest(propertyIds, requestInfoProperties, null, null, null); Request readRequest...
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
* http://www.apache.org/licenses/LICENSE-2.0
0
"Unresolved constraint in bundle " + b + ": " + ex.getMessage());
0
import org.apache.commons.ognl.enhance.ExpressionCompiler; import org.apache.commons.ognl.enhance.OgnlExpressionCompiler;
0
import org.apache.http.params.HttpParamsLinker; HttpParamsLinker.link(request, this.params); HttpParamsLinker.link(request, this.params); HttpParamsLinker.link(request, this.params); HttpParamsLinker.link(request, this.params); ...
0
package org.apache.beam.sdk.util; import org.apache.beam.sdk.options.DefaultValueFactory; import org.apache.beam.sdk.options.GcsOptions; import org.apache.beam.sdk.options.PipelineOptions; import org.apache.beam.sdk.util.gcsfs.GcsPath;
0
updateHbaseAndClusterConfigurations(); } protected void updateHbaseAndClusterConfigurations() throws AmbariException { AmbariManagementController ambariManagementController = injector.getInstance(AmbariManagementController.class); Clusters clusters = ambariManagementController.getClusters(); if (c...
0
package org.apache.aurora.scheduler.app; public MonitorException(String message, Throwable cause) {
0
private ComponentConfigurationDTO managerToConfiguration(final ComponentManager<?> manager, final ComponentDescriptionDTO description) final ComponentConfigurationDTO dto = new ComponentConfigurationDTO(); // DS 1.4
0
import org.apache.avalon.framework.service.ServiceException; import org.apache.avalon.framework.service.ServiceManager; import org.apache.avalon.framework.service.Serviceable; * @version CVS $Id: DefaultIncludeCacheManager.java,v 1.8 2004/03/18 07:42:12 cziegeler Exp $ Serviceable, private Servic...
0
/** VALUE_TYPE ASN */ /** REFERENCE_TYPE ASN */ * @throws XMLEncryptionException * @throws XMLEncryptionException
1
if (saslEnabled()) { opts.updateKerberosCredentials();
0
import cz.seznam.euphoria.core.client.accumulators.AccumulatorProvider; import cz.seznam.euphoria.core.client.accumulators.Counter; import cz.seznam.euphoria.core.client.accumulators.Histogram; import cz.seznam.euphoria.core.client.accumulators.Timer; private final AccumulatorProvider accumulators; ...
0
import org.apache.http.client.methods.HttpRequestWrapper; request = HttpRequestWrapper.wrap(post); request = HttpRequestWrapper.wrap(post); request = HttpRequestWrapper.wrap(put); request = HttpRequestWrapper.wrap(post); request = HttpRequestWrapper.wrap(new BasicHttpRequest("DEL...
0
@SuppressWarnings("serial")
0
import static org.apache.beam.sdk.extensions.sql.impl.rel.BeamJoinRelBoundedVsBoundedTest.ORDER_DETAILS1; import static org.apache.beam.sdk.extensions.sql.impl.rel.BeamJoinRelBoundedVsBoundedTest.ORDER_DETAILS2;
0
graph.commit(); graph.commit();
0
* Unless you keep a reference to the <code>InputStream</code> the * only way to close it is to call {@link LineIterator#close()} or * wait for the garbage collector. * Unless you keep a reference to the <code>InputStream</code> the * only way to close it is to call {@link LineIterator#close()} ...
0
package org.apache.hadoop.metadata.typesystem.types; public class ValueConversionException extends MetadataException { super(String .format("Cannot convert value '%s' to datatype %s", val.toString(), typ.getName()), t); public static class NullConversionException extends Valu...
0
import java.rmi.RemoteException; import java.rmi.ServerException; /** * Makes sure remote command exit status has been provided and it is zero * * @param command The command string - used only for exception text * @param exitStatus The exit status value * @throws RemoteException If <tt>exi...
0
private final List<DfsLogger> loggers = new ArrayList<>(); ArrayList<DfsLogger> copy = new ArrayList<>(); Set<String> logs = new HashSet<>(); ArrayList<LoggerOperation> queuedOperations = new ArrayList<>(copy.size()); final Map<CommitSession,Mutations> loggables = new HashMap<>(m...
0
for (int i = 64 - bin.length(); i > 0; i--) { // CHECKSTYLE IGNORE MagicNumber
0
for(int i=0; i < extensions.length; i++) list.add(ext_dir.getPath() + File.separatorChar + extensions[i]);
0
Storage.Util.fetchTasks(storage, Query.taskScoped(taskId))); Storage.Util.fetchTasks(storage, Query.taskScoped(taskId2))); Storage.Util.fetchTasks(storage, Query.taskScoped(taskId))); Storage.Util.fetchTasks(storage, Query.taskScoped(newTaskId))); Iterables.getOnlyElement(Storage.Uti...
0
ImmutableSet.of(Pair.of(80, 80))); ImmutableSet.of(Pair.of(86, 86)));
0
import static org.apache.accumulo.fate.util.UtilWaitThread.sleepUninterruptibly;
0
package org.apache.aurora.scheduler.storage; public abstract class AbstractLockStoreTest { storage = createStorage(); protected abstract Storage createStorage();
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
package org.apache.accumulo.shell.commands;
0
import org.apache.cocoon.portal.coplet.CopletData; public void setup(SourceResolver resolver, Map objectModel, String src, Parameters parameters) throws ProcessingException, SAXException, IOException { this.request = ObjectModelHelper.get...
0
return new TimeSliding<>(duration, step, Time.ProcessingTime.get()); private final UnaryFunction<T, Long> eventTimeFn; private TimeSliding(long duration, long step, UnaryFunction<T, Long> eventTimeFn) { this.eventTimeFn = requireNonNull(eventTimeFn); /** * Specify the event time extraction ...
0
* * * * * *
0
/** * 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 * distribu...
0
import org.apache.sshd.common.scp.ScpFileOpener; import org.apache.sshd.common.scp.impl.DefaultScpFileOpener; import org.apache.sshd.common.session.Session; import org.apache.sshd.common.session.SessionHolder; implements Command, Runnable, FileSystemAware, SessionAware, SessionHolder<Session>...
0
* $Header: /cvshome/build/org.osgi.service.io/src/org/osgi/service/io/ConnectionFactory.java,v 1.9 2006/07/12 21:22:12 hargrave Exp $ * Copyright (c) OSGi Alliance (2002, 2006). All Rights Reserved. import java.io.IOException; import javax.microedition.io.Connection; * scheme. The {@link #createConnection} method o...
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
* BUGS This code does not handle the fact that these files could include log events from previous * months. It therefore it assumes all dates are in the current month. One solution might be to skip * log files that haven't been touched in the last month, but that doesn't prevent newer files that * have old dates in...
0
import java.util.Collection; import java.util.Collections; @Component(provides = SpellChecker.class) @Property(name = CommandProcessor.COMMAND_SCOPE, value = "dictionary.annotation") @Property(name = CommandProcessor.COMMAND_FUNCTION, value = "spellcheck" ) @ServiceDependency private final Collection<Dictionary...
0
/* * 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 * distri...
0
ValueProvider<String> doubleNvp = NestedValueProvider.of( nvp, new SerializableFunction<String, String>() { @Override public String apply(String from) { return from; } }); assertEquals("bar", ((NestedValueProvider) nvp).propertyName()); assertEquals("bar", ((Nes...
0
@Override @Override @Override @Override @Override
0
/** Test for BeamSqlOverlayExpression. */ @Test public void accept() throws Exception { @Test public void evaluate() throws Exception { Assert.assertEquals( "w3resou3rce", new BeamSqlOverlayExpression(operands).evaluate(row, null).getValue()); Assert.assertEquals( "w3resou33rce", new Bea...
0
public class SolrServiceLogPropsConfig extends SolrConnectionPropsConfig {
0
import org.ops4j.pax.exam.junit.PaxExam; import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy; import org.ops4j.pax.exam.spi.reactors.PerMethod; @RunWith(PaxExam.class) @ExamReactorStrategy(PerMethod.class)
0
//Code to generate the json, use it for hard-coded json used later in this test String notificationJsonFromCode = AbstractNotificationConsumer.GSON.toJson(request); System.out.println(notificationJsonFromCode); + " \"id\": \"-1459493350903186000\",\n" + " ...
0
widgetEntity.setListWidgetLayoutUserWidgetEntity(new ArrayList<>()); widgetEntity.setListWidgetLayoutUserWidgetEntity(new ArrayList<>()); widgetEntity2.setListWidgetLayoutUserWidgetEntity(new ArrayList<>());
0
import org.apache.commons.vfs2.provider.webdav.WebdavFileSystemConfigBuilder;
0
" ADD CONSTRAINT configgrouphostmapping_pkey PRIMARY KEY (config_group_id, host_id)"); " ADD CONSTRAINT clusterhostmapping_pkey PRIMARY KEY (cluster_id, host_id)"); " ADD CONSTRAINT hostconfigmapping_pkey PRIMARY KEY (cluster_id, host_id, type_name, create_timestamp)"); " ADD CONSTRAINT ...
0
package org.apache.commons.vfs2.provider; import org.apache.commons.vfs2.CacheStrategy; import org.apache.commons.vfs2.Capability; import org.apache.commons.vfs2.FileListener; import org.apache.commons.vfs2.FileName; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileSelector; import org.apac...
1
new PoolableConnectionFactory(connectionFactory, 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 ...
1
private static final Logger log = Logger.getLogger(TabletServerBatchReader.class);
0