Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
package org.apache.aurora.scheduler.preemptor; import org.apache.aurora.scheduler.preemptor.BiCache.BiCacheSettings;
0
for (Attribute attribute : attributes) { if (!(attribute instanceof Annotations)) { addAttribute(attribute); }
0
package org.apache.jcp.xml.dsig.internal.dom;
0
* * * * @version CVS $Id: AbstractCachingProcessingPipeline.java,v 1.21 2004/06/11 20:32:19 vgritsenko Exp $ } catch (SocketException se) { } catch (Exception e) { throw new ProcessingException("Error executing pipeline.", e); os = new CachingOutputStr...
0
public class ReplicationMetricsTest { public class ReplicationMetricsTestMetrics extends ReplicationMetrics { ReplicationMetricsTestMetrics(Master master) { super(master); EasyMock.replay(master, fileSystem, util, stat, quantiles); ReplicationMetrics metrics = new ReplicationMetricsTestMetrics(maste...
0
import java.util.HashMap; protected final Map<String, String> configurationMap = new HashMap<>(); protected AmbariServerConfiguration(Map<String, String> configurationMap) { if (configurationMap != null) { this.configurationMap.putAll(configurationMap); } } /** * @return this configurati...
0
Matchers.describedAs("%0", Matchers.equalTo(new Instant(timestamp)), timestamp),
0
* @version $Revision: 1.2 $ $Date: 2002/11/23 00:41:09 $ final Method setLogMethod = mgrClass.getMethod( "setLogger", new Class[]{Log.class} ); setLogMethod.invoke( mgr, new Object[]{logger} );
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.util.concurrent.atomic.AtomicLong; protected final AtomicLong sentCount = new AtomicLong(0L); protected final AtomicLong recvCount = new AtomicLong(0L); return sentCount.get(); return recvCount.get();
0
import org.apache.beam.sdk.coders.Coder; /** * Given {code coders} are inferred from type arguments defined for this class. * Coders which are already set should take precedence over offered coders. * @param coders Array of coders indexed by the type arguments order. Entries might be null if * ...
0
@Override public List<ReadOnlyRepo<T>> getStack(long tid) { return store.getStack(tid); }
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...
1
package org.apache.felix.sigil.eclipse.ui.util;
0
return widgetDefinitions.size();
0
return new SparkProcessContext<>(doFn, doFnRunner, outputManager).processPartition(iter);
0
import org.apache.ambari.server.configuration.Configuration; import org.apache.ambari.server.security.authentication.kerberos.AmbariKerberosAuthenticationProperties; /** * A Boolean value declaring whether Kerberos authentication has been enabled (<code>true</code>) * or not (<code>false</code>). * <p> *...
0
import org.apache.atlas.AtlasErrorCode; import org.apache.atlas.exception.AtlasBaseException; import static org.apache.atlas.AtlasErrorCode.TYPE_NAME_NOT_FOUND; // validate if all types created successfully checkIfTypeExists(enumDef.getName()); checkIfTypeExists(structDef.getName()); ...
0
InputT, InputT, Byte, OutputT, W, ReduceWindow<InputT, V, OutputT, W>> {
0
(org.apache.accumulo.core.client.mapreduce.RangeInputSplit) split;
0
expect(executor.submit(anyObject(AsyncCallableService.class))).andReturn(mockFuture).times(1);
0
import java.util.stream.Collectors; private static final long MAX_COPY_OBJECT_SIZE_BYTES = 5_368_709_120L; private S3Options options; this.options = checkNotNull(options, "options"); checkNotNull(options.getS3StorageClass(), "storageClass"); specs.stream().map(spec -> S3ResourceId.fromUri(spec)).col...
0
private QuorumPeer createQuorumPeer(File tmpDir) throws IOException, FileNotFoundException { HashMap<Long, QuorumServer> peers = new HashMap<Long, QuorumServer>(); peers.put(0L, new QuorumServer(0, new InetSocketAddress(33221), new InetSocketAddress(33231), new InetSocketAddress(33241))); ...
0
import static org.apache.accumulo.fate.util.UtilWaitThread.sleepUninterruptibly;
1
import org.apache.beam.sdk.transforms.DoFn.ArgumentProvider; import org.apache.beam.sdk.transforms.DoFn.FakeArgumentProvider; @Mock private ArgumentProvider<String, String> mockArgumentProvider; when(mockArgumentProvider.window()).thenReturn(mockWindow); when(mockArgumentProvider.inputProvider()).thenReturn(m...
0
/** * Retrieves file data based on the SHA1 hash of the file. Used by the {@link org.apache.accumulo.examples.simple.dirlist.Viewer}. See README.dirlist for * instructions. */
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
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/test/org/apache/commons/digester/DigesterTestCase.java,v 1.13 2003/05/22 17:00:55 rdonkin Exp $ * $Revision: 1.13 $ * $Date: 2003/05/22 17:00:55 $ import java.io.StringReader; * @version $Revision: 1.13 $ $Date: 2003...
0
import java.util.*; public Map<String, String> createNamedParameterMap() {
0
Component sc = component(m).impl(consumer).withSvc(TemporalServiceInterface.class, s->s.timeout(10000)).build(); Component sc = component(m).impl(consumer).withSvc(TemporalServiceInterface.class, srv->srv.add("add").remove("remove").timeout(10000)).build(); ServiceDependency temporalDep = servic...
0
* Wraps a given input-independent {@link TerminationCondition} as an equivalent condition with * a given input type, passing {@code null} to the original condition as input. .apply( ParDo.of(new WatchGrowthFn<>(this, outputCoder, outputKeyFn, outputKeyCoder)) .withSid...
1
@Override
0
import org.apache.helix.participant.statemachine.StateModel; import org.apache.helix.participant.statemachine.StateModelFactory; public class OnlineOfflineStateModelFactory extends StateModelFactory<StateModel> { public StateModel createNewStateModel(String resourceName, String partition) { LOG.info("Received req...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//fileupload/src/java/org/apache/commons/fileupload/MultipartStream.java,v 1.12 2003/06/01 00:18:13 martinc Exp $ * $Revision: 1.12 $ * $Date: 2003/06/01 00:18:13 $ import java.io.UnsupportedEncodingException; * @version $Id: Multi...
0
private HttpAsyncExchange httpexchange; this.httpexchange = Mockito.mock(HttpAsyncExchange.class);
0
/** * Basic, yet fully functional and spec compliant, HTTPS/1.1 server based on the non-blocking * I/O model. * <p> * Please note the purpose of this application is demonstrate the usage of HttpCore APIs. * It is NOT intended to demonstrate the most efficient way of building an HTTP server. * * @author <a hre...
0
* @version $Id$
0
public PCollection<T> expand(PCollection<T> input) { public PCollection<KV<K, V>> expand(PCollection<KV<K, V>> input) {
0
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument;
0
new StoredJobUpdateDetails().setDetails(UPDATE.newBuilder())));
0
return key.getColumnFamilyData().length() > 0 || key.getColumnQualifierData().length() > 0 || key.getColumnVisibilityData().length() > 0 || key.getTimestamp() < Long.MAX_VALUE || key.isDeleted(); return key.getColumnQualifierData().length() > 0 || key.getColumnVisibilityData().length()...
0
Document doc = XMLUtils.newDocument(false); doc = XMLUtils.newDocument(false);
0
import org.apache.beam.runners.apex.translators.ParDoBoundMultiTranslator; registerTransformTranslator(ParDo.BoundMulti.class, new ParDoBoundMultiTranslator<>());
0
expect(storageUtil.attributeStore.getHostAttributes("b")) .andReturn(Optional.<IHostAttributes>absent()); IHostAttributes attributes = IHostAttributes.build(new HostAttributes().setHost(hostName)); expect(storageUtil.attributeStore.getHostAttributes(hostName)) .andReturn(Optional.of(attribu...
0
import com.google.datastore.v1.Value; * Tests {@link DatastoreWriterFn} with large entities that need to be split into more batches. */ @Test public void testDatatoreWriterFnWithLargeEntities() throws Exception { List<Mutation> mutations = new ArrayList<>(); for (int i = 0; i < 12; ++i) { Entity...
0
private static final String API_WIDGET_LAYOUTS_PATTERN = API_VERSION_PREFIX + "/clusters/.*?/widget_layouts.*?"; private static final String API_CLUSTER_REQUESTS_ALL_PATTERN = API_VERSION_PREFIX + "/clusters/.*?/requests.*"; private static final String API_CLUSTER_SERVICES_ALL_PATTERN = API_VERSION_PREFIX + "/clu...
0
package org.apache.batik.anim.dom; import org.apache.batik.anim.values.AnimatableTransformListValue; import org.apache.batik.anim.values.AnimatableValue; import org.apache.batik.dom.svg.AbstractSVGTransformList; import org.apache.batik.dom.svg.ListBuilder; import org.apache.batik.dom.svg.LiveAttributeException; import ...
0
package org.apache.beam.runners.direct; import org.apache.beam.runners.direct.InProcessPipelineRunner.CommittedBundle;
0
if (target instanceof Function) return ((Function) target).execute(session, arguments); } else { Object result = method(session, target, name, arguments); if (result != CommandShellImpl.NO_SUCH_COMMAND) { ...
0
ClientInfo clientInfo = getClientInfo(job); String principal = clientInfo.getPrincipal(); AuthenticationToken token = clientInfo.getAuthenticationToken(); try (AccumuloClient c = Accumulo.newClient().from(clientInfo.getProperties()).build()) {
0
import java.util.EnumSet; import org.apache.ambari.server.security.authorization.RoleAuthorization; EnumSet<RoleAuthorization> manageUserAuthorizations = EnumSet.of(RoleAuthorization.AMBARI_MANAGE_USERS); setRequiredCreateAuthorizations(manageUserAuthorizations); setRequiredGetAuthorizations(manageUserAuth...
0
import com.twitter.aurora.gen.TaskConfig; .setTask(new TaskConfig().setJobName("job_name")))));
0
* nor may "Apache" appear in their name, without import org.apache.commons.net.io.Util;
0
import java.lang.management.ManagementFactory; import java.lang.management.OperatingSystemMXBean; import com.sun.management.UnixOperatingSystemMXBean; return createClient(watcher, hp, CONNECTION_TIMEOUT); } protected TestableZooKeeper createClient(CountdownWatcher watcher, String hp, int t...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/Function.java,v 1.5 2003/03/11 00:59:12 dmitri Exp $ * $Revision: 1.5 $ * $Date: 2003/03/11 00:59:12 $ * Copyright (c) 1999-2003 The Apache Software Foundation. All rights * @version $R...
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...
1
import javax.management.ObjectName; import org.apache.commons.pool2.impl.GenericObjectPoolConfig; ObjectName oName = new ObjectName("UnitTests:DataSource=test"); new PoolableConnectionFactory(connFactory, oName); GenericObjectPoolConfig config = new GenericObjectPoolConfig(); config....
0
* A simple, self contained, repeatable non-blocking entity that retrieves
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...
1
* Maps to {@link HttpClient#execute(HttpHost,HttpRequest,HttpContext) * execute(target, request, context)}. * The target is determined from the URI of the request. // Otherwise, the null target is detected in the director. return execute(target, request, context)...
0
return okEmptyResponse();
0
public DeactivateMethod( final SimpleLogger logger, final String methodName, final boolean methodRequired, final Class componentClass, final boolean isDS11, final boolean isDS12Felix ) super( logger, methodName, methodRequired, componentClass, isDS11, isDS12Felix );
0
import java.awt.geom.GeneralPath; private Shape outline; outline = null; * Returns the outline of this <tt>CompositeGraphicsNode</tt>. * * @param rc the GraphicsNodeRenderContext for which this dimension applies * @return the outline of this node if (outline == 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 ...
0
Rule.getInstance(NameType.GENERIC, RuleType.APPROX, "noSuchLanguage"); Lang.loadFromResource("thisIsAMadeUpResourceName", Languages.getInstance(NameType.GENERIC)); Languages.getInstance("thereIsNoSuchLanguage");
0
"swg12KOw51bHBNnjNkPn-wPiaWQ_AsohTe-mXyOGWcybUGt9TKi2FHqY2OH-gV0_GWqRbjNAGsSskI7K3xf9JmT" + "jf1ySZXuvF9S9PsgV3kT-sgypaRw_i1MK_orzcJVg_s3cEGTjTY1_Xor3JM9UBVKiQy3Vpulf7aN9LMki" + "QEfO28mXQibyUtXL4yoLIwujoo8ArC9SayfbH5HmUxX9G0e506_cefoYIGByfq3M8GLp1_METj97ViU38" + "jex...
0
* Used by BranchInstruction, LocalVariableGen, CodeExceptionGen, LineNumberGen
0
public void test_optional_single_dynamic() throws Exception public void test_required_single_dynamic() throws Exception public void test_optional_multiple_dynamic() throws Exception public void test_required_multiple_dynamic() throws Exception public void test_optional_single_static() throws Excepti...
0
public class ServerH2StreamHandler implements H2StreamHandler { private final H2StreamChannel outputChannel; ServerH2StreamHandler( final H2StreamChannel outputChannel,
0
return "true";
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
package org.apache.http;
0
ConsumerSpEL.hasHeaders ? rawRecord.headers() : null,
0
* @version CVS $Id: PortletWindowAspect.java,v 1.5 2004/03/15 11:38:23 cziegeler Exp $ if ( !ws.equals(WindowState.MINIMIZED) ) { XMLUtils.createElement(contenthandler, "minimize-uri", url.toString()); if ( !ws.equals(WindowState.NORMAL)) { XMLUti...
0
import java.lang.reflect.InvocationTargetException;
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...
1
import org.apache.commons.jexl.util.Introspector; * <p> * * * The singleton ScriptFactory also holds a single instance of * {@link Parser}. When parsing expressions, ScriptFactory protected static Parser parser = new Parser(new StringReader(";"), Introspector.getUberspect() ); * Creates a Script f...
0
/** * Create a new QName. * @param qualifiedName value */ /** * Create a new QName. * @param prefix ns * @param localName String */ /** * Get the prefix of this QName. * @return String */ /** * Get the local name. * @return String */ /...
0
package org.apache.commons.digester3.annotations; import org.apache.commons.digester3.Digester; import org.apache.commons.digester3.Rule; import org.apache.commons.digester3.RuleSet;
1
"+display", assertEquals(1, cl.getOptionCount(display)); "+display", assertEquals(1, cl.getOptionCount("+display"));
0
new EventType<>(null, "ANY");
0
package org.apache.felix.ipojo.test.scenarios.component.temporal; import org.apache.felix.ipojo.annotations.Component; import org.apache.felix.ipojo.handler.temporal.Requires; import org.apache.felix.ipojo.test.scenarios.annotations.service.FooService; @Component public class TemporalWithNullable { @Requires...
0
} catch (final NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
0
if (entry.getKey().toLowerCase().contains("password") || entry.getKey().toLowerCase().contains("secret"))
0
package org.apache.beam.sdk.testing; import org.apache.beam.sdk.util.IdentityWindowFn; class GatherAllPanes<T> extends PTransform<PCollection<T>, PCollection<Iterable<ValueInSingleWindow<T>>>> { public PCollection<Iterable<ValueInSingleWindow<T>>> apply(PCollection<T> input) { ValueInSingleWindow.Code...
0
import org.apache.aurora.scheduler.configuration.ConfigurationManager; bind(ConfigurationManager.class).toInstance(TaskTestUtil.CONFIGURATION_MANAGER); cronJobManager.createJob(SanitizedCronJob.fromUnsanitized( TaskTestUtil.CONFIGURATION_MANAGER, CRON_JOB));
0
* <p>This class is immutable and thread-safe.</p>
0
client.getParams().setParameter(ClientPNames.COOKIE_POLICY, CookiePolicy.BEST_MATCH); client.getParams().setParameter(ClientPNames.COOKIE_POLICY, CookiePolicy.BEST_MATCH); assertNotNull(cookiesupport); assertEquals("$Version=1", cookiesupport.getValue()); client.getParams().setPa...
0
void addScanIterator(IteratorSetting cfg); void removeScanIterator(String iteratorName); void updateScanIteratorOption(String iteratorName, String key, String value); void fetchColumnFamily(Text col); void fetchColumn(Text colFam, Text colQual); void clearColumns(); void clearScanIterators(); Iterator<E...
0
new FileChecksumMatcher(DEFAULT_OUTPUT_CHECKSUM, options.getOutput() + "*-of-*"));
0
return new ProviderTestSuite(new Tbz2ProviderTestCase(), true);
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/BeanUtils.java,v 1.29 2002/12/16 00:21:02 craigmcc Exp $ * $Revision: 1.29 $ * $Date: 2002/12/16 00:21:02 $ * @version $Revision: 1.29 $ $Date: 2002/12/16 00:21:02 $ * @depreca...
0
public DualHashBidiMap(final Map<? extends K, ? extends V> map) {
0
public Resource make(Builder builder, String destination, Map<String,String> argumentsOnMake) throws Exception { String type = argumentsOnMake.get("type"); if (!type.equals("copy")) return null; String from = argumentsOnMake.get("from"); if (from == null) { String content = argumentsOnMake.get("content")...
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 org.apache.beam.sdk.runners.AppliedPTransform;
0
public abstract class PValueBase implements PValue { private final Pipeline pipeline; * Sets the name of this {@link PValueBase}. Returns {@code this}. this.pipeline = pipeline; this.pipeline = null; * The name of this {@link PValueBase}, or {@code null} if not yet set. * Records that this {@link P...
0
/** * Provide a {@link OutputReceiver} for outputting rows to the default output. */ OutputReceiver<Row> outputRowReceiver(DoFn<InputT, OutputT> doFn); /** * Provide a {@link MultiOutputReceiver} for outputing to the default output. */ public OutputReceiver<Row> outputRowReceiver(Do...
0
if ("http".equals(name)) { flaghttp = true; } else if ("https".equals(name)) { flaghttps = true; } else { Assert.fail("unexpected name in iterator: " + name); } if (flaghttp) { Assert.fail("name 'http' found twice"); } if (flaghttps) { Assert.fail("name 'https' ...
0
* Copyright 2000-2009 The Apache Software Foundation
0