Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
//A composite is the one whose lifecycle is dependent on the enclosing type and is not just a reference
1
import java.util.Set; private Set<String> excludedConfigTypes; excludedConfigTypes = service.getExcludedConfigTypes(); public Set<String> getExcludedConfigTypes() { return excludedConfigTypes; }
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
method -> Pair.of(method.getName(), method.getParameterTypes()); private static final Predicate<Method> IS_WHITELISTED = method -> method.getAnnotation(AllowUnchecked.class) != null; private static final Predicate<Method> VOID_METHOD = method -> method.getReturnType() == Void.TYPE;
0
* @deprecated Use the event type constants in {@code ConfigurationEvent} * @deprecated Use the event type constants in {@code ConfigurationEvent} * @deprecated Use the event type constants in {@code ConfigurationEvent} * @deprecated Use the event type constants in {@code ConfigurationEvent}
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/ShortList.java,v 1.2 2003/08/31 17:21:14 scolebourne Exp $ * any, must include the following acknowledgement: * Alternately, this acknowledgement may appea...
0
/** * A string representation of the current value. * @exception DOMException * SYNTAX_ERR: Raised if the specified CSS string value has a syntax * error (according to the attached property) or is unparsable. * <br>INVALID_MODIFICATION_ERR: Raised if the specified CSS string ...
0
import java.net.InetAddress; import java.net.UnknownHostException; /** * Returns canonical name (fully qualified domain name) of the localhost. * * @since 5.0 */ public static String getCanonicalLocalHostName() { try { final InetAddress localHost = InetAddress.getLocalHos...
1
package org.apache.commons.beanutils2; import org.apache.commons.beanutils2.IntrospectionContext; import org.apache.commons.beanutils2.SuppressPropertiesBeanIntrospector;
1
import org.apache.calcite.rel.RelRoot; SqlNode parsed = planner.parse(sqlStatement); SqlNode validated = planner.validate(parsed); LOG.info("SQL:\n" + validated); RelRoot root = planner.rel(validated); LOG.info("SQLPlan>\n" + RelOptUtil.toString(root.rel)); RelTraitSet desiredTrait...
0
log.debug("resolveAvailableSignaturesProposal({})[{}] {} not in supported list: {}",
0
"foo", Instant.now(), ImmutableList.of(), PaneInfo.NO_FIRING);
0
// Closing connection in an orderly manner and // waiting for output buffer to get flushed. // Do not want to wait indefinitely, though, in case // the opposite end is not reading if (conn.getSocketTimeout() <= 0) { conn.setSocketTimeout(1000); }
0
import org.apache.hc.core5.annotation.Contract; import org.apache.hc.core5.annotation.ThreadingBehavior; @Contract(threading = ThreadingBehavior.SAFE)
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
* Copyright 2001-2006 The Apache Software Foundation private transient Log log = LogFactory.getLog(FormSet.class); getLog().error("Constant '" + name + "' already exists in FormSet[" getLog().error("Form '" + formName + "' already exists in FormSet[" /** * Accessor method for Log...
0
import org.apache.ambari.logsearch.conf.SolrAuditLogConfig; import org.apache.ambari.logsearch.conf.SolrKerberosConfig; import org.easymock.EasyMockSupport; import org.easymock.Mock; import org.easymock.TestSubject; import org.junit.Before; @TestSubject private AuditSolrDao dao = new AuditSolrDao(); @Mock priv...
0
public class BeamSqlRelUtils { private static final Logger LOG = LoggerFactory.getLogger(BeamSqlRelUtils.class);
0
try (TraceScope clientSpan = opts.parseArgsAndTrace(name, args)) { ingest(client, opts); public static void ingest(AccumuloClient accumuloClient, FileSystem fs, Opts opts) throws IOException, AccumuloException, AccumuloSecurityException, TableNotFoundException, MutationsRejectedException, Tabl...
0
import com.google.datastore.v1.Entity; import com.google.datastore.v1.Key; import com.google.datastore.v1.PropertyFilter; import com.google.datastore.v1.Query; import com.google.datastore.v1.Value; import java.util.Map; import java.util.UUID; import javax.annotation.Nullable;
0
@Path("{stackName}/versions/{stackVersion}/links") @Produces("text/plain") public Response getStackVersionLinks(String body, @Context HttpHeaders headers, @Context UriInfo ui, @PathParam("stackName") String stackName, ...
0
package org.apache.felix.dependencymanager.dependencies; import org.apache.felix.dependencymanager.DependencyActivatorBase; import org.apache.felix.dependencymanager.DependencyService; import org.apache.felix.dependencymanager.impl.Logger; boolean makeAvailable = makeAvailable(); if (makeAvailable) { ...
0
* Utility methods. * @version $Id$
0
import java.nio.file.Paths; entriesFile = Paths.get(url.toURI());
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/adapters/Attic/NonSerializableCollectionDoubleCollection.java,v 1.3 2003/11/07 20:07:51 rwaldhoff Exp $ * * @deprecated This code has been moved to Jakarta Commons Pr...
0
import java.security.SecureRandom; Random r = new SecureRandom();
0
Repeatedly.forever(AfterPane.elementCountAtLeast(2)) .orFinally(AfterPane.elementCountAtLeast(3)), Repeatedly.forever(AfterPane.elementCountAtLeast(5)) .orFinally(AfterWatermark.pastEndOfWindow())),
0
import com.google.inject.Singleton; @Singleton
0
* is {@link StandardCharsets#ISO_8859_1} is assumed
0
import java.util.concurrent.ForkJoinPool; m_threadPool.awaitQuiescence(5000, TimeUnit.MILLISECONDS); m_threadPool = new ForkJoinPool(cores); if (! m_parallel && m_threadPool != null) { m_threadPool.shutdown(); m_threadPool.awaitTermination...
0
* Copyright 2003-2004 The Apache Software Foundation. * See Main.java.
0
* {@code HttpAsyncRequestHandlerMapper} can be used to resolve an instance
0
public PCollection<KV<K, V>> expand(PCollection<V> in) {
0
import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheLoader; private final Cache<String, TaskStateMachine> taskStateMachines = CacheBuilder.newBuilder().build(new CacheLoader<String, TaskStateMachine>() { @Override public TaskStateMachine...
0
/** {@link org.apache.beam.sdk.Pipeline} for testing Beam pipelines on the {@link FlinkRunner}. */
0
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; assertFalse(taskA.isCompleted()); assertTrue(taskA.isCompleted()); assertFalse(taskA.isCompleted());
0
public Authorizations getAuthorizations() {
0
import com.google.api.client.util.DateTime; DateTime lastModified = firstNonNull(storageObject.getUpdated(), new DateTime(0L)); ret.setLastModifiedMillis(lastModified.getValue());
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 static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import org.apache.ambari.server.agent.AgentCommand.AgentCommandType; import org.easymock.EasyMock; actionQueue = aq; operation = op; shouldRun = false; /** * @throws Exception */ @Test pu...
0
ccd = findCustomCommand("REBALANCEHDFS", component); Assert.assertEquals("scripts/namenode.py", ccd.getCommandScript().getScript()); Assert.assertTrue(ccd.isBackground()); Assert.assertEquals(3, component.getCustomCommands().size()); Assert.assertEquals(4, component.getCustomComman...
0
import org.apache.sshd.common.util.buffer.BufferUtils; private final byte[] workBuf = new byte[Integer.SIZE / Byte.SIZE]; // TODO in JDK-8 use Integer.BYTES OutputStream dos = channel.getInvertedIn(); BufferUtils.writeInt(dos, 1 /* cmd */ + (Integer.SIZE / Byte.SIZE) /* id */ + buffer.available(), ...
0
// Get memory information. Runtime runtime = Runtime.getRuntime(); int mb = 1024 * 1024; put(l, "os.memory.free", Long.toString(runtime.freeMemory() / mb) + "MB"); put(l, "os.memory.max", Long.toString(runtime.maxMemory() / mb) + "MB"); put(...
0
* Retrieves the current moment of time (timestamp of "now"). * Retrieves he current moment of time (timestamp of "now") with given offset added.
0
import org.apache.http.util.Asserts; Asserts.notNull(conn, "HTTP connection");
0
final HeaderElement[] elems = header.getElements(); final List<Cookie> cookies = new ArrayList<Cookie>(elems.length); for (final HeaderElement headerelement : elems) { final String name = headerelement.getName(); final String value = headerelement.getValue(); ...
0
import org.apache.beam.sdk.annotations.Experimental; @Experimental @Experimental @Experimental
0
/** * @param generatorContext used by converter to handle precision * or to create elements. */ public SVGTransform(SVGGeneratorContext generatorContext) { super(generatorContext); } public final String toSVGTransform(GraphicContext gc){ public final String toSVGTrans...
0
private volatile int connectTimeout; private volatile IOSession session = null; private volatile IOException exception = null;
0
byte[] c14nBytes = null; // byte[] refBytes = JavaUtils.getBytesFromStream(refIs.getByteStream()); byte[] refBytes = JavaUtils.getBytesFromFile(fileRef);
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
public Type getType( final ConstantPoolGen cp ) { public void accept( final Visitor v ) {
0
/** * Writes 32 bits * @param i */ /** * Writes 64 bits * @param i */ public void putLong(long i) { ensureCapacity(8); data[wpos++] = (byte) (i >> 56); data[wpos++] = (byte) (i >> 48); data[wpos++] = (byte) (i >> 40); data[wpos++] = (byte...
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
* @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a> * @param light New Light object
0
public void testSplittingUsingFullThreadPool() throws Exception { int numFiles = FileBasedSource.SPLITTING_THREAD_POOL_SIZE * 5; File file0 = null; for (int i = 0; i < numFiles; i++) { List<String> data = createStringDataset(3, 1000); File file = createFileWithData("file" + i, data); if ...
0
public FileName parseUri(final VfsComponentContext context, final FileName base, final String fileName) final Authority auth = extractToPath(fileName, name);
0
/** Unit tests for {@link SqlQuery5}. */ private static final List<Bid> BIDS = ImmutableList.of(newBid(1L, 1L), newBid(1L, 3L), newBid(1L, 4L), newBid(2L, 4L)); private static final List<Event> BIDS_EVENTS = ImmutableList.of( new Event(BIDS.get(0)), new Event(BIDS.get(1)), ...
1
import static org.easymock.EasyMock.createMock; import static org.easymock.EasyMock.expect; import static org.easymock.EasyMock.replay; import static org.easymock.EasyMock.verify; import org.apache.ambari.server.controller.ivory.Cluster; import org.apache.ambari.server.controller.ivory.IvoryService; import org.apache.a...
0
* @version CVS $Id: DatabaseCookieAuthenticatorAction.java,v 1.2 2003/03/24 14:33:57 stefano Exp $
0
protected RequestStatus deleteResourcesAuthorized(Request request, Predicate predicate)
0
Copyright 2001,2003 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 l...
0
log.debug("Got active WALs from all tservers " + activeWals); log.debug("Got raw active wals for " + address + ", " + activeWalsForServer); for (String activeWal : activeWalsForServer) { // Normalize the WAL URI walogs.add(new Path(activeWal).toString()); }
0
<InputT> PCollection<InputT> getInput(Operator<InputT, ?> operator) { <InputT> List<PCollection<InputT>> getInputs(Operator<InputT, ?> operator) { final PCollection<InputT> out = (PCollection<InputT>) datasetToPCollection.get(parent.output()); <InputT, OutputT> Coder<OutputT> getCo...
0
import java.util.Map.Entry; protected boolean isHtmlRequest( @SuppressWarnings("unused") final HttpServletRequest request ) Class<?> cl = resourceProvider.getClass(); @SuppressWarnings("unchecked") Map<String, String> labelMap = ( Map<String, String> ) request.getAttribute( WebConsol...
0
* @since FileUpload 1.1 * * @version $Id: PortletFileUpload.java,v 1.2 2004/12/08 02:53:29 sullis Exp $
0
import org.apache.beam.sdk.util.NameUtils; return String.format("ParDo(%s)", NameUtils.approximateSimpleName(clazz)); return String.format("ParMultiDo(%s)", NameUtils.approximateSimpleName(clazz));
0
import org.osgi.converter.TypeReference;
0
public static final AcceptAllServerKeyVerifier INSTANCE = new AcceptAllServerKeyVerifier(); private AcceptAllServerKeyVerifier() { super(true); }
1
import org.apache.felix.dm.DependencyActivation; import org.apache.felix.dm.DependencyService; public synchronized Service setAutoConfig(Class clazz, boolean autoConfig) { return this; public synchronized Service setAutoConfig(Class clazz, String instanceName) { return this; } publi...
0
* @param <K> the key type * @param <V> the value type * @param entrySet the entrySet to iterate
0
StringBuilder testBuffer = new StringBuilder(); StringBuilder carryMsg = new StringBuilder("{");
0
@Basic(fetch = FetchType.LAZY) @Lob
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/MappedPropertyDescriptor.java,v 1.5 2002/01/21 00:44:39 craigmcc Exp $ * $Revision: 1.5 $ * $Date: 2002/01/21 00:44:39 $ * Copyright (c) 1999-2002 The Apache Software Foundation. A...
0
* @see CompositeHandler#configure(org.apache.felix.ipojo.metadata.Element, java.util.Dictionary) * @see org.apache.felix.ipojo.composite.CompositeHandler#start() * @see org.apache.felix.ipojo.composite.CompositeHandler#isValid() * @see org.apache.felix.ipojo.composite.CompositeHandler#stop() * ...
0
import org.apache.http.util.EntityUtils; System.out.println(EntityUtils.toString(response1.getEntity())); System.out.println(EntityUtils.toString(response2.getEntity()));
0
workingDirectory, e);
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 org.apache.commons.vfs.FileSystem; import org.apache.commons.vfs.provider.AbstractLayeredFileProvider; import org.apache.commons.vfs.provider.ParsedLayeredUri; extends AbstractLayeredFileProvider * Parses an absolute URI. * @param uri The URI to parse. protected ParsedLayeredUri parseUri( final...
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.accumulo.examples.wikisearch.logic; import org.apache.accumulo.core.client.BatchWriter; import org.apache.accumulo.core.client.Connector; import org.apache.accumulo.core.client.MutationsRejectedException; import org.apache.accumulo.core.client.Scanner; import org.apache.accumulo.core.client.mock.Mock...
0
* @version $Id$
0
.getChildren(ZooUtil.getRoot(context.getInstanceID()) + Constants.ZPROBLEMS);
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 java.util.SortedMap; public class TestUnmodifiableSortedBidiMap<K extends Comparable<K>, V extends Comparable<V>> extends AbstractTestSortedBidiMap<K, V> { public SortedBidiMap<K, V> makeObject() { return UnmodifiableSortedBidiMap.decorate(new DualTreeBidiMap<K, V>()); public SortedBidiMap<K, V...
0
* Static set of property names to ignore. return tokens(exp, Collections.<String>emptySet()); } /** * Scan the provided query and generate a token stream to be used by the query parser. * * @param exp the query expression to scan * @param ignoreProperties property names which shoul...
0
if (value.trim().length() == 0) { if (host.contains(".")) { domain = '.' + domain;
0
/* Copyright 2005 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 l...
1
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//dbcp/src/test/org/apache/commons/jocl/TestJOCLContentHandler.java,v 1.3 2002/10/30 23:26:59 rwaldhoff Exp $ * $Revision: 1.3 $ * $Date: 2002/10/30 23:26:59 $ attr.addAttribute("http://apache.org/xml/xmlns/jakarta/commo...
0
throw new StreamClosedException(); throw new StreamClosedException();
0
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument;
0
import static org.junit.Assert.assertFalse; String instanceName = getClientInfo().getInstanceName(); String zookeepers = getClientInfo().getZooKeepers(); Properties props = client.properties(); assertFalse(props.containsKey(ClientProperty.AUTH_TOKEN.getKey())); ClientInfo info = ClientInfo.from(clie...
0
import org.apache.commons.io.FileCleaner;
0
/** /** private InstructionConst() { } // non-instantiable
0
import org.apache.hadoop.metrics2.sink.timeline.TimelineMetric; import org.apache.hadoop.metrics2.sink.timeline.TimelineMetrics; import com.google.common.base.Joiner;
0
final Header[] headers = response.getAllHeaders(); for (final Header header : headers) { final Header[] headers = request.getAllHeaders(); for (final Header header : headers) { final Socket socket = super.getSocket();
0
import org.springframework.beans.factory.BeanFactory; public BeanFactory getBeanFactory() {
0
import org.junit.Test; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; public class DataSinkOutputFormatTest {
0
package org.apache.aurora.scheduler.state; import org.apache.aurora.scheduler.storage.entities.IJobConfiguration; import org.apache.aurora.scheduler.storage.entities.ITaskConfig;
0
* @version $Id$ * @since 2.2 return "Settings:\n" + "Running mode : " + this.getProperty(PROPERTY_RUNNING_MODE, DEFAULT_RUNNING_MODE) + '\n' +
0