Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
/* * 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...
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
/* * 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
// Taken from Version 2016042500, Last Updated Mon Apr 25 07:07:01 2016 UTC "agakhan", // agakhan Fondation Aga Khan (Aga Khan Foundation) "akdn", // akdn Fondation Aga Khan (Aga Khan Foundation) "ftr", // ftr Frontier Communications Corporation "imamat", // imamat Fondation Aga ...
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
* Returns true if the encoded bytes of two objects are * equal only when they are also equal according to {@code Object.equals()}. * (and also implements a compatible {@code Object.hasCode()}) * * <p> This most notably false for arrays. It will generally * be false when {@code Object.equals()} compare...
0
import org.apache.felix.ipojo.HandlerManagerFactory; public static HandlerManagerFactory getHandlerFactoryByName(BundleContext bc, String factoryName) { return (HandlerManagerFactory) bc.getService(refs[0]);
0
@SuppressWarnings("unchecked") DoFnProcessContext<KV<K, V>, KV<K, WindowedValue<V>>> context = (DoFnProcessContext<KV<K, V>, KV<K, WindowedValue<V>>>) c; WindowedValue.of(value, c.timestamp(), context.windows())));
0
/** * Check whether the scheduler is already running. * @return */ public boolean isSchedulerStarted() throws SchedulerException;
0
private static <K, InputT, AccumT> Coder<AccumT> extractAccumulatorCoder( GlobalCombineFn<InputT, AccumT, ?> combineFn, AppliedPTransform<PCollection<KV<K, InputT>>, ?, Combine.PerKey<K, InputT, ?>> transform) throws CannotProvideCoderException { @SuppressWarnings("unchecked") PC...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/compiler/TreeCompiler.java,v 1.9 2003/10/09 21:31:39 rdonkin Exp $ * $Revision: 1.9 $ * $Date: 2003/10/09 21:31:39 $ * any, must include the following acknowledgement: * Alterna...
0
return new Read(null, null, null, Long.MAX_VALUE, null); return new Write(null, null, null);
0
root.currentIntervalWillUpdate(); root.currentIntervalWillUpdate();
0
public void start(final ServletContext containerContext, @Nonnull final Dictionary<String, Object> httpServiceProps) // runtime service gets the same props for now this.serviceRuntime.setAllAttributes(httpServiceProps);
0
import org.apache.accumulo.core.dataImpl.KeyExtent;
0
import javax.ws.rs.core.Response; import org.apache.oozie.ambari.view.exception.WfmWebException; @GET public Response getWorkflows() { try { HashMap<String, Object> result = new HashMap<>(); result.put("wfprojects", workflowManagerService.getAllWorkflows(viewContext.getUsername())); return Res...
0
import java.io.UncheckedIOException; import org.apache.accumulo.miniclusterImpl.MiniAccumuloClusterImpl.ProcessInfo; ProcessInfo gc = cluster.exec(SimpleGarbageCollector.class); output = gc.readStdOut(); } catch (UncheckedIOException ex) { gc.getProcess().destroy(); ProcessInfo gc = ...
0
@Description("Weather Jet Processors for DoFns should use green threads or not") @Validation.Required @Default.Boolean(false) Boolean getJetProcessorsCooperative(); void setJetProcessorsCooperative(Boolean cooperative);
0
import com.google.cloud.dataflow.sdk.transforms.windowing.GlobalWindows; new GlobalWindows());
0
import java.net.URI; import org.apache.felix.service.command.CommandSession; static final String CWD = "_cwd"; /** * Intepret a string as a URI relative to the current working directory. * @param session the session (where the CWD is stored) * @param relativeUri the input URI * @return ...
0
protected SideInputReader getSideInputReader( protected SideInputReader getSideInputReaderForViews(
0
* @deprecated to be removed when target class is removed
0
package org.apache.beam.sdk.coders.protobuf; import org.apache.beam.sdk.coders.CannotProvideCoderException; import org.apache.beam.sdk.coders.Coder; import org.apache.beam.sdk.coders.Coder.NonDeterministicException; import org.apache.beam.sdk.coders.CoderException; import org.apache.beam.sdk.coders.ListCoder; import or...
0
Coordination c = this.owner.getEnclosingCoordination(this); if ( c != null ) { c = new CoordinationHolder((CoordinationImpl)c); } return c; if (obj instanceof CoordinationHolder ) { return obj.equals(this); } if ( !(obj instanceof CoordinationImpl)...
0
URL fileURL = getDigester().getClassLoader().getResource(fileName); digester.setUseContextClassLoader(getDigester().getUseContextClassLoader()); digester.setClassLoader(getDigester().getClassLoader()); digester.setErrorHandler(getDigester().getErrorHandler()); ...
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
@Test(expected = IOException.class) public void truncatedString() throws Exception { final byte[] x = new byte[]{'n'}; Base64Decoder.decode(x, new ByteArrayOutputStream()); }
0
package org.apache.sshd.git.pack; public class GitPackCommandFactory implements CommandFactory { private final String rootDir; private final CommandFactory delegate; public GitPackCommandFactory(String rootDir) { this(rootDir, null); public GitPackCommandFactory(String rootDir, CommandFactory d...
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
directives.add(KerberosHelper.DIRECTIVE_IGNORE_CONFIGS);
0
ParseState(String str) public boolean lookingAt(String start) return str.substring(pos).startsWith(start); public CharSequence skip(int n) return str.subSequence(start, end); char ch = str.charAt(pos); if (pos < str.length()) if (isEndOfString()) return (c...
0
users.validateLogin(userEntity, "test-user"); expectLastCall().once();
0
} catch (final Exception e) { } catch (final Exception e) { } catch (final Exception e) { final String msg = messages.getString(key); final MessageFormat mf = new MessageFormat(msg);
0
private static final int DEFAULT_PORT = 22; super(DEFAULT_PORT);
0
import org.apache.felix.http.base.internal.util.MimeTypes; String type = this.contextHelper.getMimeType(name); if (type != null) { return type; } return MimeTypes.get().getByFile(name);
0
public class TestDualTreeBidiMap2<K extends Comparable<K>, V extends Comparable<V>> extends AbstractTestSortedBidiMap<K, V> { public DualTreeBidiMap<K, V> makeObject() { return new DualTreeBidiMap<K, V>( new ReverseComparator<K>(ComparableComparator.<K> getInstance()), new Re...
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
if (i != 0) { retval += " "; }
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.sdk.PipelineResult; import org.hamcrest.BaseMatcher; import org.hamcrest.Description; import java.util.Date; import java.util.UUID; @Test public void testMatcherSerializationDeserialization() { TestPipelineOptions opts = PipelineOptionsFactory.as(TestPipelineOptions.class); Serializa...
0
import java.net.SocketTimeoutException; import org.apache.http.conn.ConnectTimeoutException; try { sock.connect(remoteAddress, timeout); } catch (SocketTimeoutException ex) { throw new ConnectTimeoutException("Connect to " + remoteAddress + " timed out"); }
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
entity.setClusterId(clusterId.longValue()); requestEntity.setClusterId(clusterId.longValue()); entity1.setClusterId(clusterId.longValue()); entity2.setClusterId(clusterId.longValue()); entity3.setClusterId(clusterId.longValue()); UpgradeEntity lastUpgradeForCluster = dao.findLastUpgradeForCluste...
0
/** TODO: complete javadoc. */ /** TODO: complete javadoc. */ /** TODO: complete javadoc. */
0
if (this.x_parameters != null) {
0
this.observesWindow = signature.processElement().observesWindow() || !sideInputReader.isEmpty();
0
* <p> * This class is Serializable from Commons Collections 3.1. * @version $Revision: 1.5 $ $Date: 2004/06/02 22:02:34 $
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
import com.google.common.annotations.VisibleForTesting; @VisibleForTesting public final class OfferOrderBuilder { @VisibleForTesting public static Ordering<HostOffer> create(List<OfferOrder> order) {
0
package org.apache.felix.ipojo.runtime.core.test.components.optional; import org.apache.felix.ipojo.Nullable; import org.apache.felix.ipojo.annotations.Component; import org.apache.felix.ipojo.annotations.Requires; import org.osgi.service.log.LogService; @Component(immediate=true, name="optional-log-cons") public cl...
0
* nor may "Apache" appear in their name, without
0
import org.apache.ambari.server.Role; import org.apache.ambari.server.RoleCommand; import org.apache.ambari.server.state.ServiceComponentHostEvent; /** * Constructor via factory. * @param hostName Host name * @param role Action to run * @param event Event on the host and component * @param command Typ...
0
import aQute.bnd.differ.Baseline; import aQute.bnd.differ.Baseline.Info; import aQute.bnd.differ.DiffPluginImpl; import aQute.bnd.osgi.Instructions; import aQute.bnd.osgi.Jar; import aQute.bnd.osgi.Processor; import aQute.bnd.service.diff.Delta; import aQute.bnd.service.diff.Diff; import aQute.bnd.version.Version; impo...
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.
0
protected static final List<SerializableFunction<Instant, Instant>> IDENTITY; static { IDENTITY = ImmutableList.<SerializableFunction<Instant, Instant>>of(); }
0
package org.apache.cocoon.classloader;
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
* A {@code CombineFn} that computes the minimum of a collection * of elements of type {@code N}, useful as an public static class MinFn<N extends Comparable<N>> extends Combine.BinaryCombineFn<N> { public N apply(N a, N b) { return a.compareTo(b) <= 0 ? a : b; } @Override public N i...
0
import java.util.LinkedList; import org.apache.http.nio.reactor.IOReactorStatus; import org.apache.http.nio.reactor.SessionRequest; assertEquals("Test server status", IOReactorStatus.ACTIVE, this.server.getStatus()); Queue<SessionRequest> connRequests = new LinkedList<SessionRequest>(); ...
0
authstate.setState(AuthProtocolState.SUCCESS);
0
/* * Copyright 2001-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 applicable la...
0
new ExecutorTestUtils.TestReaderObserver(avroReader, actualSizes);
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/comparators/ComparatorChain.java,v 1.11 2003/05/16 15:08:45 scolebourne Exp $ * @version $Revision: 1.11 $ $Date: 2003/05/16 15:08:45 $ * @since Commons Collections 3.0 ...
0
* @param expectationVerifier the expectation verifier. May be
0
public void invokeCallbackMethod(Object[] instances, String methodName, Class[][] signatures, Object[][] parameters);
0
* in order to not be dependent on HttpClient v3 API, when generating and handling {@link GenericURLFileName}s, // Static initializer for allowed_opaque_part // Static initializer for allowed_reg_name
0
private Map initialEntries = null; public Map getInitialEntries() { return initialEntries; } public void setInitialEntries(Map initialEntries) { if (initialEntries != null) throw new IllegalStateException("Object Model has initial entries set already."); this.initia...
0
public class ProviderRenameTests extends AbstractProviderTestCase { protected Capability[] getRequiredCaps() { return new Capability[] { Capability.CREATE, Capability.DELETE, Capability.GET_TYPE, Capability.LIST_CHILDREN, Capability.READ_CONTENT, Capability.WRITE_CONTENT, Capability.RENAME }...
1
import java.io.Serializable; class DirtyState implements Serializable {
0
* Copyright 2001-2006 The Apache Software Foundation.
0
/* * Copyright 2002, 2003,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...
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
PropertyListConfiguration copy = new PropertyListConfiguration(config); assertFalse("Nothing was copied", copy.isEmpty());
0
Map<String, Service> services = new HashMap<>(); Map<String, DesiredConfig> configMap = new HashMap<>(); final Map<String, String> properties = new HashMap<>();
1
import org.apache.ambari.server.state.stack.LatestRepoCallable; private VersionDefinitionXml latestVersion = null; /** * @param xml the version definition parsed from {@link LatestRepoCallable} */ public void setLatestVersionDefinition(VersionDefinitionXml xml) { latestVersion = xml; } /** * @...
0
import org.apache.sshd.common.sftp.SftpConstants; try(ClientChannel channel = session.createSubsystemChannel(SftpConstants.SFTP_SUBSYSTEM_NAME)) {
0
import cz.seznam.euphoria.core.client.dataset.asserts.DatasetAssert; ListDataSink<Triple<String, String, String>> output = ListDataSink.get(); DatasetAssert.unorderedEquals( output.getOutputs(), Triple.of("uf", "foo", "bar"), Triple.of("uf", "quux", "ibis"));
0
import org.apache.hc.client5.http.impl.RequestCopier; import org.apache.hc.core5.http.HttpRequest; import org.apache.hc.core5.http.message.BasicHttpRequest; final HttpRequest req = new BasicHttpRequest("GET", "/"); final HttpRequest req = new BasicHttpRequest("PUT", "http://example.com/"); final...
0
* Returns a new instance of this bridge. */ public Bridge getInstance() { return new SVGAElementBridge(); } /**
0
import com.fasterxml.jackson.annotation.JsonIgnore; import org.apache.spark.api.java.JavaSparkContext; @Description("If the spark runner will be initialized with a provided Spark Context") @Default.Boolean(false) boolean getUsesProvidedSparkContext(); void setUsesProvidedSparkContext(boolean value); @Descr...
0
/* * Copyright 2001-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 applica...
0
checkState(!root.exists()); checkState(newManifest.createNewFile(), "Manifest creation failed"); checkState(newArtifact.createNewFile(), "Artifact creation failed"); checkState(newArtifact.createNewFile(), "Artifact creation failed");
0
return new AfterFirstStateMachine(Arrays.asList(triggers));
0
import org.apache.http.nio.util.ExpandableBuffer;
0
return containsMatch(left, (Iterator) right); * Learn whether any element returned from an Iterator matches a given value. * @param it Iterator * @param value to look for * @return whether a match was found */ private boolean containsMatch(Object value, Iterator it) { wh...
0
List<String> ns = new ArrayList<>(); return new HashSet<>(); return new HashSet<>();
0
private Key prevKey; public BlockIndexEntry(int pos, int entriesLeft, Key prevKey) { this.prevKey = prevKey; this.prevKey = key; return prevKey.compareTo(o.prevKey); @Override return prevKey + " " + entriesLeft + " " + pos; } public Key getPrevKey() { return prevK...
1
import java.util.Map; import java.util.function.Function; import java.util.stream.Collectors; import java.util.stream.Stream; private static final Map<String, PrivateKeyObfuscator> OBFUSCATORS = Stream.of(AESPrivateKeyObfuscator.INSTANCE, DESPrivateKeyObfuscator.INSTANCE) .collect(Collec...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/bag/HashBag.java,v 1.4 2003/12/28 16:36:48 scolebourne Exp $ * @since Commons Collections 3.0 (previously in main package v2.0) * @version $Revision: 1.4 $ $Date: 2003/12/28 16:3...
0
/** * Get the output strategy of this {@link Window.Bound Window PTransform}. For internal use * only. */ public WindowingStrategy<?, ?> getOutputStrategyInternal( WindowingStrategy<?, ?> inputStrategy) { /** * Get the {@link WindowFn} of this {@link Window.Bound Window PTransfor...
0
* A {@link PoolableObjectFactory} that creates * {@link PoolableConnection}s.
0
private boolean goodStats() { int start; switch (getMasterState()) { case UNLOAD_METADATA_TABLETS: start = 1; break; case UNLOAD_ROOT_TABLET: start = 2; break; default: start = 0; } for (int i = start; i < watchers.size(); i++) { ...
0
import org.apache.beam.sdk.values.WindowingStrategy; import org.apache.beam.sdk.values.WindowingStrategy.AccumulationMode;
0
FieldAccess.forField(delegateField).read(), FieldAccess.forField(delegateField).read());
0
// FIXME quick fix to get pipeline section running again if ( this.processingPipeline != null ) { this.pipelineSelector.release(this.processingPipeline); this.pipelinesManager.release(this.pipelineSelector); this.pipelineSelector = null; this.pipelinesMana...
0
* * * /** //------------------------------------------------------------------------- //-------------------------------------------------------------------------
1
@Override public boolean verifyServerKey(ClientSession sshClientSession, SocketAddress remoteAddress, PublicKey serverKey) {
0
import java.io.ByteArrayInputStream; import java.io.InputStream; import java.io.InterruptedIOException; import java.io.PipedInputStream; import java.io.PipedOutputStream; import java.io.PrintWriter; import java.net.URL; import java.util.List; import javax.servlet.ServletException; import org.apache.felix.karaf.shell.co...
0
reason.append("Invalid value provided for ").append(enumm.getName()); reason.append("Action type cannot be ").append(actionType);
0
return Tables.getTableId(context.inst, tableName);
0