Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
import org.apache.beam.runners.spark.metrics.MetricsAccumulator; MetricsAccumulator.getOrCreateInstance(jsc);
0
assertEquals(13, resp.getUpgradePacks().size());
0
import static org.apache.accumulo.core.Constants.METADATA_TABLE_ID; import static org.apache.accumulo.core.Constants.ZROOT_TABLET; // versions should never be negative public static final Integer WIRE_VERSION = 2; public static final int DATA_VERSION = 5; public static final int PREV_DATA_VERSION = 4; ...
0
import com.google.protobuf.ByteString; import mesos.Protos.*; public int sendStatusUpdate(String taskId, ScheduleStatus status); * @param frameworkId Mesos framework ID. public void setDriver(ExecutorDriver driver, FrameworkID frameworkId); private final AtomicReference<FrameworkID> frameworkIdRef = new Atom...
0
@Override
0
import com.google.cloud.dataflow.sdk.io.BoundedSource; TRANSLATORS.put(Read.Bounded.class, new ReadSourceTranslator()); private static class ReadSourceTranslator<T> implements FlinkPipelineTranslator.TransformTranslator<Read.Bounded<T>> { @Override public void translateNode(Read.Bounded<T> transform, Translati...
0
public boolean equals( final Object o1, final Object o2 ) { public int hashCode( final Object o ) { public Field(final Field c) { Field(final DataInput file, final ConstantPool constant_pool) throws IOException, public Field(final int access_flags, final int name_index, final int signature_i...
0
public byte[] generateInitializationVector(PrivateKeyEncryptionContext encContext) throws GeneralSecurityException { public <A extends Appendable> A appendPrivateKeyEncryptionContext( A sb, PrivateKeyEncryptionContext encContext) throws IOException { protected byte[] ...
0
ArrayStack nsStack = (ArrayStack) namespaces.get(prefix); if (nsStack == null) { return null; return ((String) nsStack.peek()); return null;
0
mavenBundle().groupId("org.osgi").artifactId("org.osgi.compendium").version(Base.OSGI_SPEC_VERSION),
0
* Like {@link #apply(String, PTransform)} but defaulting to the name * of the {@code PTransform}. /** * Applies the given {@code PTransform} to this input {@code PCollectionList<T>}, * using {@code name} to identify this specific application of the transform. * This name is used in various places, incl...
0
int beaBlockSize = bea.getBlockSize(); if (realciphertext.length - beaBlockSize != cipherText.length) { int iMax = realciphertext.length - beaBlockSize; for (int i = 0; i < iMax; i++) {
0
expect(storage.readOp(EasyMock.<Quiet<?>>anyObject()))
0
op.filter(srcBI.getRaster(), myBI.getRaster());
0
* limitations under the License.
0
* @version CVS $Id: Upload.java,v 1.11 2004/05/07 13:08:24 bruno Exp $
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/model/jdom/JDOMAttributePointer.java,v 1.3 2002/11/26 01:20:07 dmitri Exp $ * $Revision: 1.3 $ * $Date: 2002/11/26 01:20:07 $ * @version $Revision: 1.3 $ $Date: 2002/11/26 01:20:07 $ ...
0
private static final Map<String, Role> roles = new ConcurrentHashMap<>();
0
endpointDetails = new BasicEndpointDetails(ioSession.getRemoteAddress(), ioSession.getLocalAddress(), connMetrics, ioSession.getSocketTimeout());
0
private static Map<String, String> propertiesMap = new HashMap<>(); protected List<String> xmlPropertyConfigurer = new ArrayList<>();
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 m...
0
* Copyright 1999-2009 The Apache Software Foundation.
0
Thread t = new Thread(m_componentActor, "SCR Component Actor"); t.setDaemon( true ); t.start(); // terminate the actor thread m_componentActor = null;
0
import org.apache.http.impl.client.HttpClients; this.httpclient = HttpClients.createDefault();
0
runner.insert("1", handler); try { verify(mockQueryRunner).insert("2", handler, "param1"); try { verify(mockQueryRunner).insert("1", handler);
0
public void setEntryParserFactory(final FileSystemOptions opts, final FTPFileEntryParserFactory factory) public FTPFileEntryParserFactory getEntryParserFactory(final FileSystemOptions opts) public void setEntryParser(final FileSystemOptions opts, final String key) public String getEntryParser(final File...
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
import com.google.cloud.dataflow.sdk.values.CodedTupleTag; void setTimer(W window, Instant timestamp, TimeDomain timeDomain) throws IOException; void deleteTimer(W window, TimeDomain timeDomain) throws IOException; /** * The current processing time. */ Instant currentProcessingTime(); /*...
0
/** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(OfflineResolver.class.getName()); log.debug("Mapped " + URI + " to " + newURI); log.debug("Available bytes = " + is.available()); ...
0
(XMLSignatureInput input, Transform _transformObject) return enginePerformTransform(input, null, _transformObject); // Force Xalan to use \n as line separator on all OSes. This // avoids OS specific signature validation failures due to line // separator differences in the tra...
1
import org.apache.http.message.BasicHttpResponse; public static HttpResponse make200Response() { HttpResponse out = new BasicHttpResponse(HttpVersion.HTTP_1_1, HttpStatus.SC_OK, "OK"); out.setHeader("Date", DateUtils.formatDate(new Date())); out.setHeader("Server", "MockOrigin/1.0"); ...
0
import org.apache.felix.ipojo.architecture.Architecture; } else if (itf.equals(Architecture.class.getName())) { filter = "(" + "architecture.instance" + "=" + name + ")";
0
svgRect.setAttributeNS(SVG_NAMESPACE_URI, SVG_RX_ATTRIBUTE, doubleString(rect.getArcWidth()/2)); svgRect.setAttributeNS(SVG_NAMESPACE_URI, SVG_RY_ATTRIBUTE, doubleString(rect.getArcHeight()/2)); svgRect.setAttributeNS(SVG_NAMESPACE_URI, SVG_X_ATTRIBUTE, doubleString(rect.getX())); svgRec...
0
* plus the current SSHD artifact name and version in uppercase - e.g., * &quot;SSH-2.0-APACHE-SSHD-1.0.0&quot;
0
rootElementName = (c != null) ? c.getRootElementName() : getRootNode() .getNodeName(); Map<String, String> attributes = constructHierarchy(rootBuilder, rootValue, document.getDocumentElement(), elemRefMap, true, 0); ...
0
final AppliedPTransform<?, PCollection<OutputT>, ?> transform) { Bounded<OutputT> bound = (Bounded<OutputT>) transform.getTransform(); BoundedSource<OutputT> source = bound.getSource(); private final AppliedPTransform<?, PCollection<OutputT>, ?> transform; AppliedPTransform<?, PCollect...
0
package org.apache.hc.core5.http.nio; void failed(Exception cause);
1
import java.util.function.Predicate; Predicate<String> all = x -> true;
0
Top.Natural<Integer> comparer = new Top.Natural<Integer>();
0
@Override public long getReadaheadThreshold() { throw new UnsupportedOperationException(); } @Override public void setReadaheadThreshold(long batches) { throw new UnsupportedOperationException(); }
0
package org.apache.felix.ipojo.runtime.core.components; public class ASimpleParentClass { protected String name; public ASimpleParentClass() { name = "hello"; } }
0
public void schedule(TransformExecutor work) { public void complete(TransformExecutor completed) { private AtomicReference<TransformExecutor> currentlyEvaluating; private final Queue<TransformExecutor> workQueue; public void schedule(TransformExecutor work) { public void complete(TransformExecut...
0
LOG.info("zk1 has session id 0x{}", Long.toHexString(zk1.getSessionId())); LOG.info("zk1 has session id 0x{}", Long.toHexString(zk1.getSessionId())); LOG.info("zk2 has session id 0x{}", Long.toHexString(zk2.getSessionId())); LOG.info("zk3 has session id 0x{}", Long.toHexString(zk3.getSes...
0
import java.util.Set; import org.apache.felix.sigil.model.ICapabilityModelElement; Set<ISigilProjectModel> resolveDependentProjects( Collection<ICapabilityModelElement> caps, IProgressMonitor monitor );
0
@Override
0
@SuppressWarnings("all") public class DeadServer implements org.apache.thrift.TBase<DeadServer, DeadServer._Fields>, java.io.Serializable, Cloneable {
0
//-----------------------------------------------------------------------
0
package org.apache.beam.sdk.coders; import org.apache.beam.sdk.testing.CoderProperties; import org.apache.beam.sdk.util.CoderUtils; * {@link org.apache.beam.sdk.coders.PrintBase64Encodings}.
0
* @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
0
package aQute.lib.osgi; import java.io.*; public abstract class AbstractResource implements Resource { String extra; byte[] calculated; long lastModified; protected AbstractResource(long modified) { lastModified = modified; } public String getExtra() { return extra; } ...
0
import java.awt.geom.GeneralPath; if (hints != null) { g2d.addRenderingHints(hints); } // Work around clipping issue. DO NOT REMOVE, EVEN // if it looks stupid. g2d.setClip(new GeneralPath(g2d.getClip())); g2d.setTransform(defaultTransform);
0
import org.apache.commons.configuration.PropertiesConfiguration; ClientConfiguration clientConfig = new ClientConfiguration(new PropertiesConfiguration(getClientConfigFile()));
0
protected abstract Destination createDestination(SpanKey key);
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/iterators/LoopingIterator.java,v 1.2 2003/01/10 20:21:25 rwaldhoff Exp $ * Copyright (c) 1999-2003 The Apache Software Foundation. All rights * any, must include the followin...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/adapters/Attic/NonSerializableFloatCollectionCollection.java,v 1.3 2003/11/07 20:07:50 rwaldhoff Exp $ * * @deprecated This code has been moved to Jakarta Commons Pri...
0
import org.apache.beam.sdk.transforms.OldDoFn; import org.apache.beam.sdk.transforms.OldDoFn.RequiresWindowAccess; * {@link OldDoFn} that tags elements of a {@link PCollection} with windows, according to the * provided {@link WindowFn}. public class AssignWindowsDoFn<T, W extends BoundedWindow> extends OldDoFn<T, T>
0
this(keysFolder, NamedResource.getNameList(BuiltinIdentities.VALUES), supportedOnly, loader, provider, strict); this(keysFolder, NamedResource.getNameList(BuiltinIdentities.VALUES), supportedOnly, loader, provider, strict); GenericUtils.forEach(toRemove, keys::remove); return getBuiltinI...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/test/org/apache/commons/jxpath/ri/compiler/CoreOperationTest.java,v 1.4 2003/10/09 21:31:43 rdonkin Exp $ * $Revision: 1.4 $ * $Date: 2003/10/09 21:31:43 $ * any, must include the following acknowledgement: * Al...
0
public TesterStatement(final Connection conn, final int resultSetType, final int resultSetConcurrency, final int resultSetHoldability) { _connection = conn; _resultSetType = resultSetType; _resultSetConcurrency = resultSetConcurrency; _resultSetHoldability = resultSetHold...
0
* @version CVS $Id: Field.java,v 1.12 2003/10/08 10:03:19 bruno Exp $ private boolean isValidating = false; // if getValue() is called on this field while we're validating, then it's because a validation // rule called getValue(), so then we just return the parsed (but not validated) value to avo...
0
* $Header: /cvshome/build/org.osgi.service.metatype/src/org/osgi/service/metatype/MetaTypeInformation.java,v 1.8 2006/06/16 16:31:23 hargrave Exp $ * Copyright (c) OSGi Alliance (2005, 2006). All Rights Reserved. * @version $Revision: 1.8 $ }
0
import java.lang.annotation.Retention; import java.lang.annotation.Target; import javax.inject.Qualifier; import com.google.inject.TypeLiteral; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import st...
0
case REGENERATE_KEYTABS: wrapper = getRegenerateKeytabsWrapper(upgradeContext, execution); break; * Return a {@link StageWrapper} for regeneration of keytabs. * * @param ctx * Upgrade Context * @param execution * Execution Stage * @return a...
0
import org.apache.http.localserver.BasicServerTestBase; import org.apache.http.localserver.LocalTestServer; public class TestUriEscapes extends BasicServerTestBase { @Override protected void setUp() throws Exception { localServer = new LocalTestServer(null, null); localServer.registerDefaultHand...
0
* Copyright (c) 2004 The Apache Software Foundation. All rights
0
String arr = ""; for (int j = 0; j < args[i].length(); j++) { if (args[i].charAt(j) == '[') { arr += '['; } } int index = args[i].indexOf('['); m_args[i] = arr + getInternalPrimitiveType(args[i].substring(0, index)); ...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/map/TestPredicatedSortedMap.java,v 1.2 2003/11/18 22:37:17 scolebourne Exp $ * @version $Revision: 1.2 $ $Date: 2003/11/18 22:37:17 $ public boolean isAllowNullKey() {
0
final Boolean remoteVerification = builder.getRemoteVerification(fileSystemOptions);
0
import static org.junit.Assert.assertEquals; import com.google.cloud.dataflow.sdk.coders.StringUtf8Coder; import com.google.cloud.dataflow.sdk.runners.worker.MapTaskExecutorFactory.ElementByteSizeObservableCoder; import java.util.Arrays; import java.util.List; import java.util.Random; assertEquals(5, (long) meanBy...
0
final String method = request.getRequestLine().getMethod(); final AuthState authState = (AuthState) context.getAttribute(
0
String[] exclusions = PrefsUtils.stringToArray(store.getString(SigilCore.DEFAULT_EXCLUDED_RESOURCES)); for (String exclusion : exclusions) exclusionSet.add(GlobCompiler.compile(exclusion)); public synchronized boolean select(Viewer viewer, Object parentElement, Object element) IR...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/tags/define/Attic/InvokeBodyTag.java,v 1.12 2002/10/30 19:16:29 jstrachan Exp $ * $Revision: 1.12 $ * $Date: 2002/10/30 19:16:29 $ * Copyright (c) 2002 The Apache Software Foundation. All ...
0
PrintWriter pw = new PrintWriter(new OutputStreamWriter(output));
0
package org.apache.accumulo.core.util.shell.commands; import org.apache.accumulo.core.util.shell.Shell; import org.apache.accumulo.core.util.shell.ShellCommandException; import org.apache.accumulo.core.util.shell.ShellCommandException.ErrorCode;
0
public void testManualConnectionEvict() throws Exception { ds.setMinIdle(0); ds.setMaxIdle(4); ds.setMinEvictableIdleTimeMillis(10); ds.setNumTestsPerEvictionRun(2); final Connection ds2 = ds.createDataSource().getConnection(); final Connection ds3 = ds.createDataSou...
0
import cz.seznam.euphoria.core.client.operator.Join.Type; /** */ public static <LeftT, RightT> ByBuilder<LeftT, RightT> of( Dataset<LeftT> left, Dataset<RightT> right) { /** */ /** */ public <LeftT, RightT> ByBuilder<LeftT, RightT> of(Dataset<LeftT> left, Dataset<RightT> right) { /** */ public sta...
0
private static AtlasDSLParser.QueryContext parse(String queryStr) throws AtlasBaseException { public Translator(String query, AtlasTypeRegistry typeRegistry, int offset, int limit) throws AtlasBaseException { this(Parser.parse(query), typeRegistry, offset, limit); } private ...
0
final IOEventDispatch ioEventDispatch = new DefaultHttpServerIODispatch(serviceHandler, this.connFactory) { final DefaultNHttpServerConnection conn = super.createConnection(session); } catch (final InterruptedException ignore) { } catch (final Exception ex) {
0
/** * Copyright 2016 Seznam a.s. * * 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...
0
import org.apache.ambari.view.SystemException; try { viewRegistry.updateViewInstance(viewInstanceEntity); } catch (SystemException e) { LOG.error("Caught exception updating the view instance.", e); }
0
* Tests registering the publicId of a DTD. */ public void testRegisterEntityId() throws ConfigurationException, IOException { File dtdFile = new File("conf/properties.dtd"); final String publicId = "http://commons.apache.org/test/properties.dtd"; conf = new XMLConfi...
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
* Converts the supplied object to String. * @param object to convert * @return String value * Converts the supplied object to Number. * @param object to convert * @return Number result * Converts the supplied object to double. * @param object to convert * @return double ...
0
import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; @SuppressWarnings("unchecked") try { return (MultiKeyMap<K, V>) super.clone(); } catch (CloneNotSupportedException e) { throw new InternalError(); } return (Abstra...
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
public void validate(PipelineOptions options) { checkArgument(this.options != null, "BigtableOptions not specified"); getBigtableService(options).tableExists(tableId), public void validate(PipelineOptions options) { checkArgument(this.options != null, "BigtableOptions not specified"); ...
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. * @version $Revision: 1.2 $ $Date: 2003/10/09 21:31:39 $
0
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertSame; import static org.junit.Assert.assertTrue; import org.junit.Test; public class ColumnFilterTest { @Test assertSame(smi, cf); @Test assertTrue(cf.hasTop()); assertEquals(ne...
0
import java.nio.channels.ReadableByteChannel; * Creates a read channel for the given filename. */ public static ReadableByteChannel open(String filename) throws IOException { return getFactory(filename).open(filename); } /**
0
* @param file A {@link File} that contains an identity key - never {@code null} * @param id The identity path to add - never {@code null} * @return Property value or {@code null} if no such property * @param user The global user name - ignored if {@code null}/empty or
0
package org.apache.aurora.scheduler.async; import org.apache.aurora.gen.ScheduleStatus; import org.apache.aurora.scheduler.base.Query; import org.apache.aurora.scheduler.base.Tasks; import org.apache.aurora.scheduler.storage.Storage; import org.apache.aurora.scheduler.storage.entities.IScheduledTask; import org.apache....
0
import org.apache.commons.codec.CharEncoding; QCodec qcodec = new QCodec(CharEncoding.UTF_8);
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/Attic/TestByteList.java,v 1.5 2003/11/16 22:15:11 scolebourne Exp $ import org.apache.commons.collections.list.AbstractTestList; * @version $Revision: 1.5 $ $Date: 2003...
0
* Tests for {@link ParDoMultiEvaluatorHooks}. public class ParDoMultiEvaluatorHooksTest implements Serializable { new ParDoEvaluatorFactory<>(evaluationContext, new ParDoMultiEvaluatorHooks<>()) new ParDoEvaluatorFactory<>(evaluationContext, new ParDoMultiEvaluatorHooks<>()) new ParDoEvaluatorF...
0
import java.io.File; import java.util.Collection; import java.util.Iterator; import org.apache.cocoon.util.AbstractLogEnabled; public class JavascriptProgram extends AbstractLogEnabled implements Program { return AbstractComponentHandler.getComponentHandler(clazz, ...
0
Map fontStringMap = new HashMap(); public void recordFontUsage(String string, Font font) {
0
* * * * * * *
0
* Copyright (C) 2015 Google Inc.
0
* $Revision: 1.3 $ * $Date: 2003/10/09 21:03:57 $ * 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 $Id: CPDSConnectionFactory.java,v 1.3 2003/10/09 21:03:5...
0