Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
/**
* authorize relationship type
* @param request
* @return
* @throws AtlasAuthorizationException
*/
default
boolean isAccessAllowed(AtlasRelationshipAccessRequest request) throws AtlasAuthorizationException {
return true;
} | 0 |
throw new InterruptedException("Operation interrupted");
}
throw new InterruptedException("Operation interrupted");
} | 0 |
public static volatile long SCHEDULE_TIMEOUT_VAL = 30000;
SCHEDULE_TIMEOUT_VAL = Long.valueOf(scheduleTimeout); | 0 |
import org.apache.felix.sigil.eclipse.ui.SigilUI; | 0 |
* Catches any exception thrown by provided {@link ThrowingSupplier} and rethrows it as {@link
public static <T> T unchecked(ThrowingSupplier<T> supplier) {
/** User defined {@link Exception} throwing supplier */
public interface ThrowingSupplier<T> {
/** User defined {@link Exception} throwing action. */
/... | 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 |
* 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.hc.core5.http.EndpointDetails;
public EndpointDetails getEndpointDetails() {
return streamDuplexer.getEndpointDetails(); | 0 |
* @return service config version created
ServiceConfigVersionResponse setServiceConfigVersion(String serviceName, Long version, String user, String note) throws AmbariException;
Map<String, Collection<ServiceConfigVersionResponse>> getActiveServiceConfigVersions(); | 0 |
import org.apache.beam.runners.core.OldDoFn; | 0 |
private long length = -1;
length = writer.getLength();
@Override
public long getLength() throws IOException {
if (closed) {
return length;
}
return writer.getLength();
} | 0 |
* Extension of {@link AbstractListTest} for exercising the
public class PredicatedListTest<E> extends AbstractListTest<E> {
public PredicatedListTest(String testName) { | 0 |
// TODO: what is intended here??
@Override
public Serializing view()
{
return null;
} | 0 |
Copyright 2001-2002 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 law... | 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 applicabl... | 0 |
import javax.inject.Singleton;
import org.apache.aurora.scheduler.app.SchedulerMain;
import org.apache.aurora.scheduler.mesos.FrameworkInfoFactory;
import org.apache.aurora.scheduler.mesos.FrameworkInfoFactory.FrameworkInfoFactoryImpl;
import org.apache.aurora.scheduler.mesos.FrameworkInfoFactory.FrameworkInfoFactoryIm... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//codec/src/java/org/apache/commons/codec/net/URLCodec.java,v 1.3 2003/07/31 20:09:21 tobrien Exp $
* $Revision: 1.3 $
* $Date: 2003/07/31 20:09:21 $
* @version $Id: URLCodec.java,v 1.3 2003/07/31 20:09:21 tobrien Exp $
... | 0 |
import com.twitter.aurora.scheduler.base.JobKeys;
JobKey key = JobKeys.assertValid(jobConfig.getKey()).deepCopy();
managers.getUnchecked(managerId).jobs.put(key, DEEP_COPY.apply(jobConfig));
public void removeJob(JobKey jobKey) {
return FluentIterable.from(manager.jobs.values()).transform(DEEP_COPY).toSet... | 0 |
SVGSVGElement svg = c.getViewport();
SVGSVGElement svg = c.getViewport();
/**
* Returns the viewport used to compute percentages and units.
*/
SVGSVGElement getViewport(); | 0 |
import org.apache.beam.sdk.io.fs.EmptyMatchTreatment;
this(fileSpec, EmptyMatchTreatment.DISALLOW);
}
TextSource(ValueProvider<String> fileSpec, EmptyMatchTreatment emptyMatchTreatment) {
super(fileSpec, emptyMatchTreatment, 1L); | 0 |
@SuppressWarnings({"unused"}) public enum TDurability implements org.apache.thrift.TEnum { | 0 |
// This is broken for charsets that don't map each char to a byte
@Ignore // test is broken for charsets that generate multiple bytes per char. | 0 |
import org.apache.hc.core5.http.ContentType;
import org.apache.hc.core5.http.HttpException;
public void sendResponse(final ResponseChannel responseChannel) throws HttpException, IOException {
responseChannel.sendResponse(response, dataProducer); | 0 |
* @version $Revision: 1.5 $ $Date: 2004/05/15 12:33:23 $
* @return a new typed Buffer
super(); | 0 |
import static org.apache.beam.sdk.io.hcatalog.HCatalogIOTestUtils.TEST_DATABASE;
import static org.apache.beam.sdk.io.hcatalog.HCatalogIOTestUtils.TEST_FILTER;
import static org.apache.beam.sdk.io.hcatalog.HCatalogIOTestUtils.TEST_TABLE;
private static final PipelineOptions OPTIONS = PipelineOptionsFactory.create();
... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/adapters/Attic/NonSerializableListShortList.java,v 1.2 2003/08/31 17:21:17 scolebourne Exp $
* any, must include the following acknowledgement:
* Alternately, th... | 0 |
PCollection<KV<K, OutputT>> doTranslate(
return (PCollection) combined;
private static class ReduceDoFn<K, V, OutT> extends DoFn<KV<K, Iterable<V>>, KV<K, OutT>> {
private final DoFnCollector<KV<K, Iterable<V>>, KV<K, OutT>, OutT> collector;
private static class Collector<K, V, OutT>
implement... | 0 |
public void configure(ServerContext context, String configuration) {
conf = context.getConfiguration();
final AccumuloConfiguration localConf = conf; | 0 |
import org.apache.beam.dsls.sql.schema.BeamSqlRecordType;
import org.apache.beam.dsls.sql.schema.BeamSqlRow;
BeamSqlRecordType dataType = BeamSqlRecordType.from(
BeamSqlRow row1 = new BeamSqlRow(dataType);
BeamSqlRow row2 = new BeamSqlRow(dataType);
BeamSqlRow row3 = new BeamSqlRow(dataType);
BeamSq... | 0 |
* Copyright 2001-2005 The Apache Software Foundation
* @version $Id: VMSFTPEntryParserTest.java,v 1.17 2005/01/02 03:17:50 scohen Exp $
"FREEWARE40.DIR;1 27/36 16-FEB-1999 10:01:46 [AP_HTTPD,APACHE$WWW (RWE,RWE,RE,RE)",
"1-JUN.LIS;1 9/9 ... | 0 |
outputDebugMessage("Created %s", dir); | 0 |
/* $Id$
*
* 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"); ... | 0 |
import org.apache.ambari.server.AmbariException;
import org.apache.ambari.server.state.Clusters;
import java.util.HashMap;
@Inject
Clusters clusters;
if (!cacheLoaded) {
if (configGroupHostMappingByHost == null) {
configGroupHostMappingByHost = new HashMap<Long, Set<ConfigGroupHostMapp... | 0 |
@Override
@Override
@Override
@Override
@Override | 0 |
"check"
private final String startUser = "agent";
private final String prestartUser = "agent";
private final String checkUser = "agent"; | 0 |
if (!"[--bar Bar, --foo Foo]".equals(group1.toString())) {
assertEquals("[--foo Foo, --bar Bar]", group1.toString());
}
if (!"[-b Bar, -f Foo]".equals(group2.toString())) {
assertEquals("[-f Foo, -b Bar]", group2.toString());
} | 0 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableMap; | 0 |
@RequiresSession
public AlertCurrentEntity findCurrentByHostAndName(long clusterId, String hostName,
String alertName) {
TypedQuery<AlertCurrentEntity> query = entityManagerProvider.get().createNamedQuery(
"AlertCurrentEntity.findByHostAndName", AlertCurrentEntity.class);
query.setPar... | 0 |
* @version $Id$ | 0 |
public void write(final byte[] b) throws IOException
public void write(final byte[] b, final int off, final int len) throws IOException
public void write(final int b) throws IOException
public void writeBoolean(final boolean v) throws IOException
public void writeByte(final int v) throws IOException... | 1 |
* @version $Id$ | 0 |
package org.apache.accumulo.tserver; | 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 |
@Override | 0 |
import java.util.Locale;
/**
* The name of the request attribute holding the language {@link Map}
* for the request (value is "felix.webconsole.langMap").
*
* This map contains the web console supported languages, which are automatically detected.
* The keys of the map are the language co... | 0 |
private ReferenceQueue<Object> q = new ReferenceQueue<Object>();
private final Collection<Tracker> trackers = Collections.synchronizedSet(new HashSet<Tracker>()); // synchronized
private final List<String> deleteFailures = Collections.synchronizedList(new ArrayList<String>());
private volatile boolean e... | 0 |
Map<String, List<String>> entities = new HashMap<>(); | 0 |
* <p> Code example which provides a "LogService" aspect that performs spell-checking of each log message. | 0 |
import org.apache.http.params.HttpCoreConfigBuilder;
this.serverParams = new HttpCoreConfigBuilder()
.setSocketTimeout(60000)
.setSocketBufferSize(8 * 1024)
.setTcpNoDelay(true)
.setOriginServer("TEST-SERVER/1.1").build();
this.clientParams = new HttpCoreC... | 0 |
/*
* $Header: /cvshome/build/ee.foundation/src/java/io/InputStream.java,v 1.6 2006/03/14 01:20:24 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 thi... | 0 |
buffer = session.createBuffer(SshConstants.SSH_MSG_REQUEST_SUCCESS, Integer.BYTES); | 0 |
import javax.servlet.Filter;
import org.osgi.framework.Bundle;
import org.osgi.service.http.HttpService;
public FilterMapping(Bundle bundle, Filter filter, String pattern, int ranking)
super(bundle);
if (!this.isRegistered() && getContext() != null)
{
try
{
... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestArrayList.java,v 1.5 2002/10/12 22:36:21 scolebourne Exp $
* $Revision: 1.5 $
* $Date: 2002/10/12 22:36:21 $
* @version $Id: TestArrayList.java,v 1.5 2002/10/12 22:36:21 sco... | 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 |
private final HttpCache<CacheEntry> cache;
private final URIExtractor uriExtractor; | 0 |
new HashSet<>(Arrays.asList(new String[]{
HC_PROCESS_CLUSTER_NAME_ID, HC_PROCESS_HOST_NAME_ID, HC_PROCESS_COMPONENT_NAME_ID, HC_PROCESS_NAME_ID}));
Set<Resource> resources = new HashSet<>();
Set<HostComponentProcessResponse> results = new HashSet<>(); | 1 |
PCollection<Long> vals = pipeline.apply(GenerateSequence.from(0).to(5));
PCollection<Long> vals = pipeline.apply(GenerateSequence.from(0).to(5));
PCollection<Long> vals = pipeline.apply(GenerateSequence.from(0).to(5));
PCollection<Long> vals = pipeline.apply(GenerateSequence.from(0).to(5)); | 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.commons.jexl2.parser.ASTNumberLiteral;
public Object visit(ASTNumberLiteral node, Object data) { | 0 |
result = continueMultiScan(sid, mss);
return continueMultiScan(scanID, session);
private MultiScanResult continueMultiScan(long scanID, MultiScanSession session)
sendables.forEach((commitSession, value) -> commitSession.abortCommit());
if (!security.canConditionallyUpdate(credentials, ... | 0 |
import org.apache.sshd.util.test.CoreTestSupportUtils;
sshd = CoreTestSupportUtils.setupTestServer(KexTest.class);
client = CoreTestSupportUtils.setupTestClient(KexTest.class); | 0 |
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList; | 0 |
import java.util.TreeMap;
@SuppressWarnings("serial")
userpass = tpc.proxy().login("root", new TreeMap<String, String>() {{put("password",""); }}); | 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 |
package org.apache.felix.sigil.ui.eclipse.ui.views;
import org.apache.felix.sigil.eclipse.SigilCore;
import org.apache.felix.sigil.eclipse.model.repository.IRepositoryModel;
import org.apache.felix.sigil.eclipse.model.util.ModelHelper;
import org.apache.felix.sigil.model.ICompoundModelElement;
import org.apache.felix.s... | 0 |
import org.apache.ambari.server.state.StackId;
Config createConfig(StackId stackId, Cluster cluster, String type, Map<String, String> properties, | 0 |
* @return the list of active compactions
| 0 |
* @version $Id$ | 0 |
LOG.debug("Agent {} vetoed task {}: {}", offer.getOffer().getHostname(), taskId, vetoes); | 0 |
package org.apache.felix.bundlerepository.impl;
import org.apache.felix.bundlerepository.Capability;
import org.apache.felix.bundlerepository.Requirement;
import org.apache.felix.bundlerepository.Resource;
import org.apache.felix.bundlerepository.impl.metadataparser.XmlCommonHandler;
import org.apache.felix.bundlerepos... | 0 |
import org.apache.atlas.ocf.properties.beans.Connection;
/**
* Return the local server name - used for outbound events.
*
* @return String name
*/
String getLocalServerName();
/**
* Return the local server type - used for outbound events.
*
* @return String name
*... | 0 |
import org.osgi.service.metatype.MetaTypeProvider;
static final String PROP_FACTORY_ENABLED = "ds.factory.enabled";
static final String PROP_LOGLEVEL = "ds.loglevel";
static final String PID = "org.apache.felix.scr.ScrService";
// add meta type provider if interfaces are available
Ob... | 0 |
* Creates a <code>Mask</code> according to the specified parameters. | 0 |
maxIdleTime > 0 ? maxIdleTime : 10, maxIdleTimeUnit != null ? maxIdleTimeUnit : TimeUnit.SECONDS,
maxIdleTime, maxIdleTimeUnit); | 0 |
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableMap;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableSet;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Lists;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.io.Ba... | 0 |
(AvroCoder<T>) transform.getDefaultOutputCoder(), context.getPipelineOptions()); | 0 |
final int r = super.read();
public synchronized int read(final byte b[], final int off, int len) throws IOException
final int nread = super.read(b, off, len);
final long nskip = super.skip(n);
protected long calcFilePosition(final long nadd)
public synchronized void mark(final int re... | 0 |
Resource src = this.resolver.getResource(getUrl(includeURI, contextURI));
loadURI(src, loadedURIs, includeStatement);
throw new ConfigurationException("Cannot load '" + includeURI + "' at " +
includeStatement.getLocation(),... | 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 |
* <li>{@link org.apache.http.params.CoreProtocolPNames#HTTP_ELEMENT_CHARSET}</li> | 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 com.google.common.base.MoreObjects;
return MoreObjects.toStringHelper(this) | 0 |
Assert.assertFalse(sc.isRecoveryEnabled()); // default value of recoveryEnabled
sc.setRecoveryEnabled(true);
Assert.assertTrue(sc.isRecoveryEnabled()); | 0 |
import cz.seznam.euphoria.core.client.type.TypeHint;
@Override
public boolean equals(Object obj) {
return obj instanceof TestWindowing;
}
@Override
public int hashCode() {
return 0;
}
.keyBy(e -> e, TypeHint.of(String.class))
.valueBy(e -> 1L, TypeHint.of(... | 0 |
import org.apache.accumulo.core.client.Durability;
private final Durability durability;
this.durability = config.getDurability();
tableId, durability.toThrift()); | 1 |
JEXL.setLenient(false);
JEXL.setCache(128);
public void setUp() throws Exception {
// ensure jul logging is only error
java.util.logging.Logger.getLogger(JexlEngine.class.getName()).setLevel(java.util.logging.Level.SEVERE);
}
JexlContext jc = null;
JexlContex... | 0 |
import net.jcip.annotations.NotThreadSafe;
@NotThreadSafe // AbstractCookieSpec is not thread-safe | 0 |
import java.util.Objects;
public boolean areEqualValues(Object val1, Object val2) {
final boolean ret;
if (val1 == null) {
ret = val2 == null;
} else if (val2 == null) {
ret = false;
} else {
Object normalizedVal1 = getNormalizedValue(val1);
... | 0 |
import java.nio.charset.StandardCharsets;
try (InputStream is = new ByteArrayInputStream(DATA.getBytes(StandardCharsets.UTF_8))) {
try (InputStream is = new ByteArrayInputStream(MULTIPLE_USER_DATA.getBytes(StandardCharsets.UTF_8))) { | 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 |
* @version CVS $Id$ | 0 |
package org.apache.http.impl.io;
import org.apache.http.io.HttpDataTransmitter;
| 0 |
import static org.junit.Assert.assertEquals;
@Test
public void testStructuralValueReturnTheSameValue() {
Double expected = 23.32;
Object actual = TEST_CODER.structuralValue(expected);
assertEquals(expected, actual);
} | 0 |
* limitations under the License. | 0 |
this(iteratorClass, iteratorOptions, range, input, Collections.emptySet(), false); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/compiler/Path.java,v 1.3 2002/04/24 04:05:38 dmitri Exp $
* $Revision: 1.3 $
* $Date: 2002/04/24 04:05:38 $
* @version $Revision: 1.3 $ $Date: 2002/04/24 04:05:38 $ | 0 |
StackId stackId = new StackId("HDP", STACK_VERSION);
ormHelper.createStack(stackId);
clusters.addCluster(clusterName, stackId); | 0 |
* Sets the owner's (or everybody's) write permission
*
* @param executable
* True to allow read access, false to disallow
* @param ownerOnly
* If <code>true</code>, the permission applies only to the owner; otherwise, it applies to everybody.
* @return true if t... | 0 |
import com.google.gson.Gson;
import com.google.inject.Inject;
import com.google.inject.Injector;
import com.google.inject.Provider;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;... | 0 |
import java.nio.charset.StandardCharsets;
import org.apache.hc.core5.http.Header;
import org.apache.hc.core5.http.HttpResponse;
import org.apache.hc.core5.http.HttpVersion;
import org.apache.hc.core5.http.MessageConstraintException;
import org.apache.hc.core5.http.NoHttpResponseException;
import org.apache.hc.core5.ht... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.