Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
Pair<Object,Object> pair = Pair.<Object,Object,Integer,String>fromEntry(entry);
Pair<Number,CharSequence> pair2 = Pair.<Number,CharSequence,Integer,String>fromEntry(entry); | 0 |
m_instance.addAttribute(new Attribute("component", m_className.replace('/', '.'))); | 0 |
import io.gearpump.streaming.dsl.api.functions.FoldFunction;
import io.gearpump.streaming.dsl.api.functions.MapFunction;
import io.gearpump.streaming.dsl.javaapi.JavaStream;
import io.gearpump.streaming.dsl.javaapi.functions.GroupByFunction;
import io.gearpump.streaming.dsl.window.api.Discarding$;
import io.gearpump.st... | 0 |
public class EAN13CheckDigitTest extends AbstractCheckDigitTest { | 0 |
* limitations under the License. | 0 |
import org.apache.beam.runners.core.construction.TransformInputs;
return (T) Iterables.getOnlyElement(TransformInputs.nonAdditionalInputs(currentTransform)); | 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.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static final Logger log = LoggerFactory.getLogger(ThriftTransportPool.class);
// connection unreserved, but it seems io may still be happening
log.warn("Connection returned to thrift connection pool that may still be in use {} {}", i... | 0 |
public static Info create(GremlinQueryComposer.Context context,
org.apache.atlas.query.Lookup lookup,
String identifier) {
Info idInfo = new Info(identifier);
idInfo.update(lookup, context);
return idInfo;
public static class In... | 0 |
import org.apache.accumulo.core.data.TableId;
private TableId tableIdBeingServiced;
TableId tableIdBeingServiced) {
public TableId getServicedTableId() { | 0 |
* <p>
* It requires Java runtime with ALPN protocol support (such as Oracle JRE 9).
public class Http2TlsAlpnRequestExecutionExample { | 0 |
import javax.persistence.PrePersist;
import javax.persistence.PreUpdate;
@NamedQuery(name = "UserAuthenticationEntity.findAll",
query = "SELECT entity FROM UserAuthenticationEntity entity"),
@NamedQuery(name = "UserAuthenticationEntity.findByType",
query = "SELECT entity FROM UserAuthenticationE... | 0 |
package org.apache.beam.runners.spark; | 0 |
import java.util.Set;
* @return a set of maps containing the properties contained in the http body
public Set<Map<PropertyId, Object>> getHttpBodyProperties(); | 0 |
import org.apache.hc.core5.http.HttpHost;
import org.apache.hc.core5.http.config.SocketConfig;
import org.apache.hc.core5.http.protocol.HttpContext; | 0 |
* @version $Revision$ $Date$ | 0 |
GraphicsNodeRenderContext rc =
bridgeContext.getGraphicsNodeRenderContext();
DocumentLoader loader = bridgeContext.getDocumentLoader();
uctx,
loader); | 0 |
* TODO: may want to add more bit vector functions like and/or/xor/nand
* TODO: also might be good to generate boolean[] from byte[] et. cetera. | 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;
private org.apache.felix.bundlerepository.RepositoryAdmin m_repoAdmin = null;
public ObrCommandImpl(Bundle... | 0 |
package org.apache.servicemix.kernel.deployer.filemonitor;
import org.apache.servicemix.kernel.deployer.filemonitor.FileMonitor; | 0 |
import org.apache.http.HeaderElement;
Header h = entity.getContentType();
if (h != null) {
HeaderElement[] elems = h.getElements();
if (elems.length > 0) {
String contentType = elems[0].getName();
return contentType.equalsIgnoreCase(CONTENT_TYPE);
... | 0 |
return CHARS_C; | 0 |
public AtlasCluster getCluster(@PathParam("clusterName") String clusterName) throws AtlasBaseException {
public List<ExportImportAuditEntry> getExportImportAudit(@QueryParam("clusterName") String cluster,
@QueryParam("userName") String userName,
... | 0 |
/** {@inheritDoc} */
/** {@inheritDoc} */
/** {@inheritDoc} */
/** {@inheritDoc} */
/** {@inheritDoc} */
/** {@inheritDoc} */ | 0 |
acls = AclUtils.updatePermissionForScheme(acls, "world", ZooDefs.Perms.READ); | 0 |
response.setMessage("This client version is deprecated. Please, sync Aurora client "
+ "to the latest version and retry your action. See: go/getaurora for more details.");
response.setResponseCode(ERROR); | 0 |
import java.util.Properties;
* Set Accumulo client properties used to connect to Accumulo
*
* @param job
* Hadoop job to be configured
* @param clientProps
* Accumulo client properties
* @since 2.0.0
*/
public static void setClientProperties(JobConf job, Properties clientProp... | 0 |
try (ClientSession session = client.connect(getCurrentTestName(), TEST_LOCALHOST, port).verify(7L, TimeUnit.SECONDS).getSession()) {
try (ClientSession session = client.connect(getCurrentTestName(), TEST_LOCALHOST, port).verify(7L, TimeUnit.SECONDS).getSession()) { | 0 |
package org.apache.commons.codec; | 1 |
* 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 |
/*
* 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 static org.apache.aurora.scheduler.resources.ResourceType.GPUS;
private final boolean allowGpuResource;
boolean requireDockerUseExecutor,
boolean allowGpuResource) {
this.allowGpuResource = allowGpuResource;
if (!settings.allowGpuResource && config.getResources().stream()
.f... | 0 |
HashMap<Long,DoubleWrapper> aggregation1 = new HashMap<>();
HashMap<Long,DoubleWrapper> aggregation2 = new HashMap<>();
HashMap<Long,DoubleWrapper> aggregation3 = new HashMap<>();
HashMap<Long,DoubleWrapper> aggregation4 = new HashMap<>();
TreeMap<Long,DoubleWrapper> sorted = new TreeMap<>(aggregati... | 0 |
package org.apache.ambari.logsearch.common;
public enum LogType {
SERVICE("Service"),
AUDIT("Audit");
private String label;
private LogType(String label) {
this.label = label;
public String getLabel() {
return label; | 0 |
* Interface for a context provider.
* Objects of this class provide special context, e.g. authentication or portal.
* The provider has to take care that the context is instantiated and managed
* correctly: for example a request context object should only created once
* per request, an authentication context once p... | 0 |
// getLogger().debug("done registered factory for inserting node -- " + this); | 0 |
/**
* Extracts BigDecimal from the JsonNode if it is within bounds.
*
* <p>Throws {@link UnsupportedRowJsonException} if value is out of bounds.
*/
static ValueExtractor<BigDecimal> decimalValueExtractor() {
return ValidatingValueExtractor.<BigDecimal>builder()
.setExtractor(JsonNode::decima... | 0 |
import org.apache.beam.sdk.options.PipelineOptions;
import org.apache.beam.sdk.options.PortablePipelineOptions;
public static SdkComponents create(PipelineOptions options) {
SdkComponents sdkComponents = new SdkComponents();
sdkComponents.registerEnvironment(
Environments.createOrGetDefaultEnvironment... | 0 |
package org.apache.commons.vfs.provider.webdav;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpURL;
import org.apache.commons.httpclient.UsernamePasswordCredentials;
import org.apache.commons.httpclient.MethodRetryHandler;
import org.apache.commons.httpclient.HttpMethod;
impo... | 0 |
* @version CVS $Id: ModifiableTraversableSource.java,v 1.2 2003/03/16 17:49:06 vgritsenko Exp $ | 0 |
* @version CVS $Id: StyleShading.java,v 1.4 2004/01/31 08:50:39 antonio Exp $
public class StyleShading {
public static final int STYLE_SHADING_NONE = 0;
public static final int STYLE_SHADING_SOLID = 1;
public static final int STYLE_SHADING_PERCENT75 = 2;
public static final int STYLE_SHADING_PERCENT50... | 0 |
import org.apache.beam.sdk.extensions.sql.BeamSqlTable; | 0 |
import org.w3c.dom.Element;
* @throws IllegalStateException if the context was not able to compute
* the value.
public float getViewportWidth(Element e) throws IllegalStateException {
// !!! TODO
throw new IllegalStateException();
* @throws IllegalStateException if the contex... | 0 |
* Autogenerated by Thrift Compiler (0.9.1)
import org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.server.AbstractNonblockingServer.*;
@SuppressWarnings("all") public class Compacting implements org.apache.thrift.TBase<Compacting, Compacting._Fields>, java.io.Serializable, Cloneable, Comparable<Co... | 0 |
/**
* 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 in writing, software
* distribu... | 0 |
public <T> void addListProperty(String propertyName, T value) {
try {
getAsTitanVertex().addProperty(propertyName, value);
} catch (SchemaViolationException e) {
if (getPropertyValues(propertyName, value.getClass()).contains(value)) {
// follow java set semant... | 1 |
import org.apache.ambari.server.controller.utilities.PropertyHelper;
String propertyId = PropertyHelper.getPropertyId("category1", "foo");
EqualsPredicate predicate = new EqualsPredicate<String>(propertyId, "bar");
String propertyId = PropertyHelper.getPropertyId("category1", "foo");
EqualsPredicate pre... | 1 |
Connector conn = new ZooKeeperInstance(accumulo.getInstanceName(), accumulo.getZooKeepers()).getConnector("root", "superSecret");
Connector uconn = new ZooKeeperInstance(accumulo.getInstanceName(), accumulo.getZooKeepers()).getConnector("user1", "pass1");
Connector conn = new ZooKeeperInstance(accumulo.getI... | 0 |
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static final Logger log = LoggerFactory.getLogger(ZKAuthorizor.class);
log.error(e.getMessage(), e);
log.error(e.getMessage(), e);
log.error(e.getMessage(), e);
log.error(e.getMessage(), e);
log.error(e.getMessage(), e);
... | 0 |
* @version $Id$ | 1 |
private static final String ZK_CLIENT_PORT = "hbase.zookeeper.property.clientPort";
if (amsHbaseSiteProperties.containsKey(ZK_CLIENT_PORT)) {
String newValue = "{{zookeeper_clientPort}}";
LOG.info("Replacing value of hbase.zookeeper.property.clientPort from " +
... | 0 |
Copyright 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 or a... | 0 |
if (DateUtils.isAfter(entry, response, HttpHeaders.DATE)) { | 0 |
package org.apache.commons.fileupload2;
import org.apache.commons.fileupload2.disk.DiskFileItemFactory;
* <p>The default {@link org.apache.commons.fileupload2.FileItemFactory}
* {@link org.apache.commons.fileupload2.FileItem} instances which keep their
* Create a new {@link org.apache.commons.fileupload2.Defaul... | 0 |
json.put("title", ocd.getName()); | 0 |
import net.jcip.annotations.Immutable;
@Immutable | 0 |
List<ServletHandler> servlets = new ArrayList<ServletHandler>();
List<ServletHandler> resources = new ArrayList<ServletHandler>();
ContextRuntime contextRuntime_0 = new ContextRuntime(filters_0, errorPages_0, null, null);
ContextRuntime contextRuntime_A = new ContextRuntime(filters_A, er... | 0 |
import org.apache.beam.sdk.PipelineRunner;
* {@link PipelineRunner}
* {@link PipelineRunner}
* {@link PipelineRunner}
* {@link PipelineRunner} | 0 |
import java.io.ByteArrayInputStream;
import java.io.InputStream;
String commandLine = "ambari-python-wrap /tmp/stacks/S1/V1/PIG/package/null generate_configs null " +
"/tmp/stacks/S1/V1/PIG/package /var/lib/ambari-server/tmp/structured-out.json " +
"INFO /var/lib/ambari-server/tmp";
Proc... | 0 |
E v = getCollection().set(i, n);
getConfirmed().set(i, n);
getCollection().set(0, getFullElements()[0]);
E o1 = getCollection().remove(i);
E o2 = getConfirmed().remove(i); | 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 BaseTracker<S> extends ServiceTracker<S, ConfigurationMap<?>>
public ConfigurationMap<?> addingService( ServiceReference<S> reference )
this.cm.log( LogService.LOG_DEBUG, "Registering service {0}", new String[]
{ ConfigurationManager.toString( reference ) } );
retu... | 0 |
shellState.getConnector().securityOperations().createUser(user, password.getBytes()); | 0 |
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AttributeInfo that = (AttributeInfo) o;
if (isComposite != that.isComposite) {
return f... | 0 |
EasyMock.expect(i1.isRoot()).andReturn(true);
Assert.assertTrue(cd1.containsValue(true)); | 0 |
class CachedResponseSuitabilityChecker { | 0 |
throws PortalException {
throw new PortalException("Unable configure component.", ce); | 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 |
import org.apache.beam.sdk.runners.AppliedPTransform; | 0 |
import java.util.Date;
Date date = cal.getTime();
notifier.propertyChange(new PropertyChangeEvent(variable,"Time",null,date)); | 0 |
public static void addCastString( OgnlContext context, String cast ) | 0 |
Learner learner;
SendAckRequestProcessor(Learner peer) {
this.learner = peer;
learner.writePacket(qp, false);
if (!learner.sock.isClosed()) {
learner.sock.close();
learner.writePacket(null, true);
if (!learner.sock.i... | 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... | 0 |
/**
* Adds property to the given entity id
* @param guid entity id
* @param property property to add
* @param value property's value
* @return
*/
@PUT
@Path("addProperty/{guid}")
@Produces(MediaType.APPLICATION_JSON)
public Response addProperty(@PathParam("guid") String... | 0 |
/**
* @since 4.2
*/ | 0 |
return Type.getTypeSize(getSignature(cpg)); | 0 |
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static final Logger LOG = LoggerFactory.getLogger(UnboundedDataset.class);
public void cache(String storageLevel) {
// we "force" MEMORY storage level in streaming
LOG.warn("Provided StorageLevel ignored for stream, using default level");
... | 0 |
package cz.seznam.euphoria.flink;
public class FlinkOperator<OP extends Operator> extends Operator { | 0 |
// non-javadoc, see interface ManagedClientConnection
public boolean isStateful() {
assertAttached();
return poolEntry.state != null;
}
// non-javadoc, see interface ManagedClientConnection
public void setState(final Object state) {
poolEntry.state = state;
... | 0 |
* @param revalidationRequest the request to be executed; not {@code null} | 0 |
public static final Transformer<DHFactory, NamedFactory<KeyExchange>> DH2KEX =
new Transformer<DHFactory, NamedFactory<KeyExchange>>() {
@Override
public NamedFactory<KeyExchange> transform(DHFactory factory) {
if (factory == null) {
return null;
... | 1 |
for (int unicodeChar : unicodeChars) {
buffer.append((char)unicodeChar); | 0 |
* TODO: Remove once splitting/checkpointing are available in SDKs and rewinding in readers.
* | 0 |
/** Constant for the prefix of binary numbers.*/
private static final String BIN_PREFIX = "0b";
/** Constant for the radix of binary numbers.*/
private static final int BIN_RADIX = 2;
if (str.startsWith(BIN_PREFIX))
{
try
{
... | 0 |
Copyright 2000-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 |
import org.apache.felix.webconsole.ModeAwareConfigurationPrinter;
/**
* This class provides the Threads tab in the configuration status.
*/
public class ThreadPrinter extends AbstractConfigurationPrinter implements ModeAwareConfigurationPrinter
private final ThreadDumper dumper = new ThreadDumper();
/**
... | 0 |
/*
* Copyright 2000-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 applic... | 0 |
*
*/
private static final long serialVersionUID = 1L; | 1 |
* Copyright 2000-2009 The Apache Software Foundation | 0 |
SSLSocketFactory socketFactory = new SSLSocketFactory(sslcontext, hostnameVerifier);
Scheme https = new Scheme("https", 443, socketFactory); | 0 |
private static final String API_PRIVILEGES_ALL_PATTERN = API_VERSION_PREFIX + "/privileges.*";
} else if(!authorizationPerformedInternally(requestURI)) {
/**
* Tests the URI to determine if authorization checks are performed internally or should be
* performed in the filter.
*
* @param request... | 0 |
import org.apache.accumulo.server.security.SecurityOperationImpl;
SecurityOperationImpl.getInstance().deleteTable(SecurityConstants.getSystemCredentials(), tableId); | 0 |
private ClientInfo clientInfo;
return Connector.builder().usingClientInfo(getClientInfo()).usingToken(user, token).build();
if (clientInfo == null) {
clientInfo = Connector.builder()
.usingProperties(config.getClientPropsFile().getAbsolutePath()).info();
}
return clientInfo;
Cl... | 0 |
/*
* $Header: /cvshome/build/ee.foundation/src/java/util/zip/CheckedInputStream.java,v 1.6 2006/03/14 01:20:30 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 ma... | 0 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList; | 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 applic... | 0 |
import java.util.concurrent.TimeUnit;
BatchWriter bw = getConnector().createBatchWriter("bwlt", new BatchWriterConfig().setMaxLatency(2000, TimeUnit.MILLISECONDS)); | 0 |
public class ObjectCreateRule extends Rule { | 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... | 0 |
int scPos = pathInfo.indexOf(';');
if (scPos > 0) {
pathInfo = pathInfo.substring(0, scPos); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.