Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
import org.apache.commons.vfs.FileName; final DefaultFileName rootName = new DefaultFileName( parser, fileUri.getContainerUri(), FileName.ROOT_PATH );
0
String getBasePath(); HttpServletRequest getRequest(); HttpServletResponse getResponse(); /** * Is the request an Ajax request? * * @return true if this is an Ajax request */ boolean isAjaxRequest(); ServletContext getServletContext();
0
/* * Copyright 2013 Twitter, Inc. * * 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 t...
0
// If no Transforms then just default to an Inclusive without comments transform
0
* RSA <code>Signature</code> /** * A named factory for RSA <code>Signature</code> */
0
import java.util.ArrayList; import org.apache.ambari.server.agent.ExecutionCommand; private List<ExecutionCommandVisitor> m_visitors = new ArrayList<>(); /** * Adds a command visitor that will be invoked after a command is created. Provides access * to the command. * * @param visitor the visitor */...
0
* @version CVS $Id: ScriptGenerator.java,v 1.6 2004/04/04 04:44:09 antonio Exp $ protected class BSFLanguage { public void configure(Configuration conf) throws ConfigurationException { if (conf != null) { for (int i = 0; i < languages.length; i++) { for (int j = 0; j < exten...
0
cluster123.setBlueprintName("cluster123"); cluster124.setBlueprintName("cluster124");
0
import java.io.IOException; import org.apache.hadoop.mapreduce.Job; public void testNoSubBins() throws IOException { public void testSubBins() throws IOException { private RangePartitioner prepPartitioner(int numSubBins) throws IOException { Job job = new Job(); private void checkExpectedRangeBins(int numS...
0
return new Pair<>(first, second); static final Map<String,Pair<Key,Key>> fakeFiles = new HashMap<>(); Map<FileRef,DataFileValue> files = new HashMap<>(); HashSet<String> result = new HashSet<>(); HashSet<String> result = new HashSet<>();
1
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
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 requi...
0
/* * $Header: /cvshome/build/ee.foundation/src/java/io/OutputStream.java,v 1.6 2006/03/14 01:20:23 hargrave Exp $ * * (C) Copyright 2001 Sun Microsystems, Inc. * Copyright (c) OSGi Alliance (2001, 2005). All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use th...
0
if (ZooReaderWriter.getInstance().exists(path, this)) // I'm not sure of a better way to get around this. The final modifier helps though.
0
public static <K, V> Bound<K, V> withKeyValueClass(Class<K> key, Class<V> value) { return new Bound<>(null, null, key, value);
0
* @version $Id$
0
import org.apache.beam.sdk.options.GcpOptions; import org.apache.beam.sdk.options.PipelineOptions;
0
package org.apache.felix.dm.test.annotation; import org.apache.felix.dm.annotation.api.Composition; import org.apache.felix.dm.annotation.api.Service; import org.apache.felix.dm.annotation.api.ServiceDependency; import org.apache.felix.dm.annotation.api.Start; import org.apache.felix.dm.annotation.api.Stop; @Service(...
0
import java.util.Iterator; * Attempts to call an overloaded forEach operator. * <p> * This takes care of finding and caching the operator method when appropriate * @param node the syntactic node * @param arg the argument * @return the result of the operator evaluation or TRY_FAILE...
0
import static org.junit.Assert.assertEquals; import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.UriInfo; import org.apache.ambari.server.api.resources.ResourceInstance; import org.apache.ambari.server.api.services.parsers.RequestBodyParser; import org.apache.ambari.server.api.services.serializers.ResultSeria...
0
// Verify no duplicate imports. if (pkgName.equals(".")) // Dynamic imports can have duplicates, verify that no partial package name wild carding is used if (!pkgName.equals("*") && pkgName.endsWith("*") && !pkgName.endsWith(".*")) // Verify t...
0
package cz.seznam.euphoria.core.executor.inmem; interface Collector<T> { void collect(T elem); }
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...
0
implements Element {
0
import java.util.concurrent.atomic.AtomicLong; private final static AtomicLong COUNT = new AtomicLong(1); return new Thread(r, "I/O dispatcher " + COUNT.getAndIncrement());
0
import org.apache.beam.dsls.sql.BeamSqlEnv; public PCollection<BeamSqlRow> buildBeamPipeline(PCollectionTuple inputPCollections , BeamSqlEnv sqlEnv) throws Exception { BeamSqlRelUtils.getBeamRelInput(input).buildBeamPipeline(inputPCollections, sqlEnv);
0
int[] visCount = new int[vec.length]; int[] invisCount = new int[vec.length];
0
public PCollection<T> expand(PCollectionList<T> inputs) { public PCollection<T> expand(PCollection<? extends Iterable<T>> in) {
0
import org.apache.hc.core5.http.ClassicHttpRequest; public void makeRequestCompliant(final ClassicHttpRequest request) private void verifyOPTIONSRequestWithBodyHasContentType(final ClassicHttpRequest request) { private void addContentTypeHeaderIfMissing(final ClassicHttpRequest request) { private void v...
0
log.debug("Trying to export flash object " + si.relativeName); log.debug("The " + si.relativeName + " has been exported succesfully.");
0
* @version $Revision: 155406 $
0
throw new UnsupportedOperationException("No instance allowed");
0
import org.apache.zookeeper.Watcher;
0
static final URI base = URI.create("test/ConfigTest/sigil.properties"); static System.setProperty("bar.version", "2.0.0"); public ConfigTest(String name) { super(name); } IBldProject project = BldFactory.getProject(base.resolve("test1.properties")); foo.setPackageName...
0
@Test(expected = ScheduleException.class) public void testInvalidStartUpdate() throws Exception { expectKillTask(1); control.replay(); buildScheduler(); JobConfiguration job = makeJob(OWNER_A, JOB_A, 1); scheduler.createJob(job); changeStatus(queryByOwner(OWNER_A), ASSIGNED); changeSta...
0
CachedXPathAPIHolder.setDoc(this._transformObject.getElement().getOwnerDocument());
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
public static byte[] getBytesWithoutClosing(InputStream stream) throws IOException {
0
import static org.apache.ambari.logsearch.solr.SolrConstants.ServiceLogConstants.INT_DYNAMIC_FIELDS; import static org.apache.ambari.logsearch.solr.SolrConstants.ServiceLogConstants.LONG_DYNAMIC_FIELDS; import static org.apache.ambari.logsearch.solr.SolrConstants.ServiceLogConstants.BOOLEAN_DYNAMIC_FIELDS; import 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 ma...
0
public static final String UNBOUND_LOCATION = "??unbound:bundle/location"; config.setBundleLocation( UNBOUND_LOCATION ); //$NON-NLS-1$
0
import java.util.HashMap; import java.util.Map; private static final APIInfo CREATE_ENTITY = new APIInfo(ENTITIES_API, HttpMethod.POST, Response.Status.OK); public EntityMutationResponse createEntity(final AtlasEntity atlasEntity) throws AtlasServiceException { return callAPI(CREATE_ENTITY, new HashMap<...
0
getPackagesForServiceHost(serviceInfo, hostParams, osFamily); /** * Computes os-dependent packages for service/host. Does not take into * account package dependencies for ANY_OS. Instead of this method * you should use getPackagesForServiceHost() * because it takes into account both os-depende...
0
* @version $Id$
0
import org.apache.hc.core5.annotation.ThreadSafe;
1
import org.apache.accumulo.hadoopImpl.mapreduce.FileOutputFormatBuilderImpl; * requirement of Accumulo data files. The output path to be created must be specified via * {@link #configure()}, which uses a fluent API. For Example: * * <pre> * AccumuloFileOutputFormat.configure() * .outputPath(path) * .fi...
0
* Copyright 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 by ap...
0
if (queuedWorkByPeerName != null) { if (replicationForPeer == null) { if (zooCache.get(ZooUtil.getRoot(instanceId) + ReplicationConstants.ZOO_WORK_QUEUE + "/" + entry.getValue()) == null) { if (queuedWorkForPeer == null) { return queuedWork == null; if (workForPeer == null) { ...
0
List<String> masters = Monitor.getContext().getMasterLocations();
0
* http://www.apache.org/licenses/LICENSE-2.0
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...
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 not...
0
* @throws IllegalArgumentException thrown if object is not recognized
0
protected void setup(Mapper<LongWritable,Text,Text,Text>.Context context) throws IOException, InterruptedException {
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/iterators/ArrayListIterator.java,v 1.6 2003/09/29 22:37:40 scolebourne Exp $ * @version $Revision: 1.6 $ $Date: 2003/09/29 22:37:40 $ * Holds the index of the last item retur...
0
import java.util.Collections; public static final List m_emptyList = Collections.unmodifiableList(new ArrayList());
0
public String readFileToString(File file) throws IOException { return readFileToString(file, null);
0
final Set<Integer> shardIds, @Nullable final Lock mutableLock, final IJobKey jobKey = JobKeys.assertValid(IJobKey.build(mutableJobKey)); final Response response = emptyResponse(); final SessionContext context; return storage.write(new MutateWork.Quiet<Response>() { @Override publ...
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 static final String ATTRIBUTE_INSTANCE = "instance";
0
* @version $Revision: 1.15 $ $Date: 2004/05/10 20:09:45 $
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
public abstract class RunningModeHelper { /** * Name of the system property specifying the running mode. */ * Determine the running mode. * @see #PROPERTY_RUNNING_MODE * @see SettingsDefaults#DEFAULT_RUNNING_MODE /** * Check if the value for the running mode is valid. * @thr...
0
private static final int PROPERTY_REQUEST_CONNECT_TIMEOUT = 5000; private static final int PROPERTY_REQUEST_READ_TIMEOUT = 10000; private final Map<String, Map<String, String>> jmxPortMap = Collections clusterJmxPorts = jmxPortMap.get(clusterName); URLStreamProvider streamProvider = new URLStreamP...
0
package org.apache.beam.sdk.extensions.euphoria.beam.testkit; import org.apache.beam.sdk.extensions.euphoria.beam.testkit.junit.AbstractOperatorTest; import org.apache.beam.sdk.extensions.euphoria.beam.testkit.junit.Processing;
0
* @version CVS $Id: ReadNodeBuilder.java,v 1.3 2004/07/15 12:49:50 sylvain Exp $ String type = this.treeBuilder.getTypeForStatement(config, Reader.ROLE); String mimeType = config.getAttribute("mime-type", null); if (mimeType == null) { mimeType = this.treeBuilder.getProcess...
0
DisplayDataValidator.validatePipeline(pipeline);
0
import java.util.List; import java.util.Map; import org.apache.http.entity.StringEntity; public class UrlEncodedFormEntity extends StringEntity { super(URLUtils.formUrlEncode(fields, charset), charset); setContentType(FORM_URL_ENCODED_CONTENT_TYPE); public UrlEncodedFormEntity( final Nam...
0
protected AccumuloClient client; return client; protected void setClient(AccumuloClient client) { this.client = client; ZooUtil.getRoot(client.getInstanceID()) + ReplicationConstants.ZOO_WORK_QUEUE, conf); public void configure(AccumuloConfiguration conf, AccumuloClient client) { this.client =...
0
private static final org.slf4j.Logger LOG =
1
import cz.seznam.euphoria.core.client.triggers.Trigger; import cz.seznam.euphoria.core.client.triggers.TriggerScheduler; import java.util.List; public List<Trigger> createTriggers() { return Collections.emptyList(); public void updateTriggering(TriggerScheduler triggering, Datum input) {
0
package org.w3c.dom.svg; import org.w3c.dom.DOMException; public interface SVGNumber { public float getValue( ); public void setValue( float value ) throws DOMException; }
0
import org.osgi.framework.VersionRange; * @param configMap VersionRange range = new VersionRange(osversions[i]); if (range.includes(currentOSVersion)) return new VersionRange(value.charAt(0), new Version(cleanupVersion(vlo)), new Version( cleanupV...
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
* @version $Revision$ $Date$
0
import org.apache.commons.jelly.impl.TagScript; TagScript tagScript, return new XPathExpression(xpath, tagScript); return super.createExpression(factory, tagScript, attributeName, attributeValue);
0
c1.createClusterVersion(stackId, stackId.getStackVersion(), "admin", RepositoryVersionState.INSTALLING); hv1.setState(RepositoryVersionState.INSTALLED); hv2.setState(RepositoryVersionState.INSTALLING); assertRepoVersionState(stackId.getStackId(), "2.2.9-9999", RepositoryVersionState.INSTALLING); ass...
0
db.setErrorHandler(new org.apache.xml.security.utils.IgnoreAllErrorHandler());
0
public int read(char[] cbuf, int off, int len) throws IOException {
0
* * * /**
1
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Optional; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
0
import org.apache.commons.io.testtools.TestUtils; TestUtils.sleepQuietly(pauseTime);
0
* Copyright 2001-2006 The Apache Software Foundation. import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMResult; import javax.xml.transform.sax.SAXSource; import org.apache.commons.jxpath.JXPathContext; import org.w3c.dom.Document; import org.w3c.d...
0
@Override @Override @Override
0
* @version $Revision$
0
import org.apache.http.params.CoreConnectionPNames; CoreConnectionPNames.MAX_HEADER_COUNT, -1); CoreConnectionPNames.MAX_LINE_LENGTH, -1);
0
import org.apache.beam.sdk.testing.NeedsRunner; @Category(NeedsRunner.class)
0
import org.apache.http.conn.scheme.SchemeLayeredSocketFactory; public class SSLSocketFactory implements SchemeLayeredSocketFactory, LayeredSchemeSocketFactory, LayeredSocketFactory { * @since 4.2 */ public Socket createLayeredSocket( final Socket socket, ...
0
if (c.finishedInAnyMergingWindow()) { for (W finishedWindow : c.getFinishedMergingWindows()) {
0
ExampleUtils exampleUtils = new ExampleUtils(options); exampleUtils.waitToFinish(result);
0
// NOTE: We need to use the executor here to save attributes and store the offer because this // requires the storage lock which can block. We cannot block in the libmesos callback // handler without ill effects. log.info("Received offer: {}", offer.getId().getValue()); public void han...
0
RequestEntityProxy.enhance((HttpEntityEnclosingRequest) currentRequest);
0
import java.util.Objects; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("path") return Objects.hash(super.hashCode(), m_path); return Objects.equals(m_path, other.m_path);
0
import org.apache.zookeeper.ZooKeeper; import org.junit.Test; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.util.concurrent.CountDownLatch; private CountDownLatch authFailed = new CountDownLatch(1); private class MyWatcher extends CountdownWatcher { @Override...
0
@NamedQuery(name = "AlertNoticeEntity.findByDefinitionId", query = "SELECT notice FROM AlertNoticeEntity notice WHERE notice.alertHistory.alertDefinition.definitionId = :definitionId"),
0
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkState; import org.apache.beam.vendor.guava.v20_0.com.google.common.annotations.VisibleForTesting;
0
import org.apache.ambari.logsearch.conf.AuthConfig; import javax.inject.Inject; @Inject private AuthConfig authConfig; if (!authConfig.isAuthSimpleEnabled()) {
0
+ "<" + getCurrentSource().rootElement + ">").getBytes(StandardCharsets.UTF_8); ("<" + getCurrentSource().recordElement).getBytes(StandardCharsets.UTF_8); new InputStreamReader(charBufStream, StandardCharsets.UTF_8);
0
public ByteOrderMarkTestCase(final String name) { final int bomClassHash = ByteOrderMark.class.hashCode(); } catch (final IllegalArgumentException e) { } catch (final IllegalArgumentException e) { } catch (final IllegalArgumentException e) { } catch (final IllegalArgumentExce...
1
public LocalXAConnectionFactory(final TransactionManager transactionManager, final ConnectionFactory connectionFactory) { public LocalXAResource(final Connection localTransaction) { public synchronized void start(final Xid xid, final int flag) throws XAException { public synchronized void en...
0