Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
@Deprecated | 1 |
import org.apache.http.annotation.ThreadSafe;
@ThreadSafe // public methods only | 0 |
package org.apache.jute.compiler.generated; | 0 |
import java.util.Arrays;
import org.apache.commons.cli.BasicParser;
import org.apache.commons.cli.ParseException;
String[] args = new String[2];
Options o = new Options();
o.addOption(OptUtil.tableOpt());
args[0] = "-t";
args[1] = tableName;
CommandLine cl = new BasicParser().parse(o, args);
pluginClazz = shellState.getClassLoader(cl, shellState).loadClass(ent.getValue()).asSubclass(clazz);
Logger.getLogger(ShellPluginConfigurationCommand.class).error("Class not found" + e.getMessage());
return null;
} catch (ParseException e) {
Logger.getLogger(ShellPluginConfigurationCommand.class).error("Error parsing table: " + Arrays.toString(args) + e.getMessage());
return null;
} catch (TableNotFoundException e) {
Logger.getLogger(ShellPluginConfigurationCommand.class).error("Table not found: " + tableName + e.getMessage());
return null;
} catch (Exception e) {
Logger.getLogger(ShellPluginConfigurationCommand.class).error("Error: " + e.getMessage()); | 0 |
import org.apache.sshd.client.auth.UserInteraction; | 0 |
* @version CVS $Id: Processor.java,v 1.1 2003/09/04 12:42:43 cziegeler Exp $ | 0 |
import java.io.IOException;
import org.apache.xml.security.transforms.TransformSpi;
import org.apache.xml.security.transforms.TransformationException;
import org.apache.xml.security.transforms.Transforms;
import org.xml.sax.SAXException;
return implementedTransformURI; | 0 |
for (int instance : Sets.union(existingInstances.keySet(), updatedTasks.keySet())) { | 0 |
import org.apache.beam.runners.core.StateTag;
import org.apache.beam.runners.core.StateTags; | 0 |
import org.apache.aurora.gen.JobInstanceUpdateEvent;
/**
* Gets job instance update events for a specific instance within an update.
*
* @param updateId Update identifier.
* @param instanceId Instance to fetch events for.
* @return Instance events affecting {@code instanceId} within {@code updateId}.
*/
List<JobInstanceUpdateEvent> selectInstanceUpdateEvents(
@Param("updateId") String updateId,
@Param("instanceId") int instanceId); | 0 |
import org.apache.sshd.util.JSchLogger;
import org.apache.sshd.util.SimpleUserInfo;
public class SpringConfigTest {
JSchLogger.init();
s.setUserInfo(new SimpleUserInfo("smx")); | 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 use this file except in compliance with
* the License. You may obtain a copy of the License at | 0 |
* data must be synchronized as methods of this interface may be executed
*/
| 0 |
import org.apache.hc.core5.http.ClassicHttpRequest;
import org.apache.hc.core5.http.io.entity.StringEntity;
import org.apache.hc.core5.http.message.BasicClassicHttpRequest;
final ClassicHttpRequest request = new BasicClassicHttpRequest("POST", "/");
interceptor.process(request, request.getEntity(), context);
final ClassicHttpRequest request = new BasicClassicHttpRequest("POST", "/");
interceptor.process(request, null, context);
final ClassicHttpRequest request = new BasicClassicHttpRequest("POST", "/");
request.setVersion(HttpVersion.HTTP_1_0);
interceptor.process(request, null, context);
final ClassicHttpRequest request = new BasicClassicHttpRequest("POST", "/");
interceptor.process(request, null, context);
interceptor.process(null, null, null);
final ClassicHttpRequest request = new BasicClassicHttpRequest("POST", "/");
interceptor.process(request, null, context); | 0 |
@SuppressWarnings("synthetic-access")
log.debug("Caught exception", e); | 0 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Lists; | 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 to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ | 0 |
Function<MonitorLocation,AppenderSkeleton> appenderFactory = newLocation -> {
return new AppenderSkeleton() {
{
this.name = "Appender for " + newLocation.getLocation();
}
@Override
public boolean requiresLayout() {
return false;
}
@Override
public void close() {}
@Override
protected void append(LoggingEvent event) {}
}; | 0 |
public class ChangedEvent extends AbstractFileChangeEvent {
public ChangedEvent(final FileObject file) {
public void notify(final FileListener listener) throws Exception { | 1 |
XMLSignatureInput resource=resolveInput(rm,BaseURI);
X509Certificate cert=getRawCertificate(resource);
Element e = obtainRefrenceElement(resource);
return resolveKey(e,BaseURI,storage);
static private Element obtainRefrenceElement(XMLSignatureInput resource) throws CanonicalizationException, ParserConfigurationException, IOException, SAXException, KeyResolverException {
e = getDocFromBytes(inputBytes);
XMLSignatureInput resource=resolveInput(rm,BaseURI);
X509Certificate cert=getRawCertificate(resource);
return resolveCertificate(e,BaseURI,storage);
static private X509Certificate resolveCertificate(Element e,String BaseURI,StorageResolver storage) throws KeyResolverException{
static private PublicKey resolveKey(Element e,String BaseURI,StorageResolver storage) throws KeyResolverException{
static private X509Certificate getRawCertificate(XMLSignatureInput resource) throws CanonicalizationException, IOException, CertificateException{
static private XMLSignatureInput resolveInput(RetrievalMethod rm,String BaseURI) throws XMLSecurityException{
static Element getDocFromBytes(byte[] bytes) throws KeyResolverException {
do {
parents.add(e);
Node n=e.getParentNode();
e=(Element)n;
} while (e!=null);
ListIterator it2=parents.listIterator(parents.size()-1);
Element ele=null;
ele=(Element)it2.previous();
return ele; | 0 |
import org.apache.http.client.HttpRequestRetryHandler;
/** The request retry handler. */
private HttpRequestRetryHandler retryHandler;
protected abstract HttpRequestRetryHandler createHttpRequestRetryHandler();
public synchronized final HttpRequestRetryHandler getHttpRequestRetryHandler() {
if (retryHandler == null) {
retryHandler = createHttpRequestRetryHandler();
}
return retryHandler;
}
public synchronized void setHttpRequestRetryHandler(final HttpRequestRetryHandler retryHandler) {
this.retryHandler = retryHandler;
}
getHttpRequestRetryHandler(), | 0 |
return 0.3528f; | 0 |
import java.nio.charset.StandardCharsets;
final byte[] b1 = s1.getBytes(StandardCharsets.US_ASCII);
final byte[] b2 = s2.getBytes(StandardCharsets.US_ASCII); | 0 |
* @version $Id: BooleanPropertyExecutor.java,v 1.2 2002/12/16 10:41:59 jstrachan Exp $ | 0 |
import org.apache.commons.vfs.operations.FileOperationProvider;
// -- OPERATIONS --
/**
* Adds the specified FileOperationProvider for the specified scheme.
* Several FileOperationProvider's might be registered for the same scheme.
* For example, for "file" scheme we can register SvnWsOperationProvider and
* CvsOperationProvider.
*
* @param scheme
* @param operationProvider
* @throws FileSystemException
*/
public void addOperationProvider(final String scheme, final FileOperationProvider operationProvider) throws FileSystemException;
/**
* @see FileSystemManager#addOperationProvider(String, org.apache.commons.vfs.operations.FileOperationProvider)
*
* @param schemes
* @param operationProvider
* @throws FileSystemException
*/
public void addOperationProvider(final String[] schemes, final FileOperationProvider operationProvider) throws FileSystemException;
/**
* @param scheme the scheme for wich we want to get the list af registered providers.
*
* @return the registered FileOperationProviders for the specified scheme.
* If there were no providers registered for the scheme, it returns null.
*
* @throws FileSystemException
*/
public FileOperationProvider[] getOperationProviders(final String scheme) throws FileSystemException; | 0 |
throw new XMLSignatureException(ex, "empty");
throw new XMLSignatureException(ex, "empty");
throw new XMLSignatureException(ex, "empty");
throw new XMLSignatureException(ex, "empty");
throw new XMLSignatureException(ex, "empty");
throw new XMLSignatureException(ex, "empty");
throw new XMLSignatureException(ex, "empty");
throw new XMLSignatureException(ex, "empty");
throw new XMLSignatureException(ex, "empty");
throw new XMLSignatureException(ex, "empty"); | 0 |
env.getConnector().tableOperations().compact(Setup.getTableName(), points[0], points[1], false,
true); | 0 |
private static final String TITLE = "%services.pluginTitle"; | 0 |
import com.google.cloud.dataflow.sdk.coders.BigEndianIntegerCoder;
return BigEndianIntegerCoder.of();
public void testSplitAtFractionExhaustive() throws Exception { | 0 |
import com.google.inject.Inject;
@Inject
private MaintenanceStateHelper maintenanceStateHelper;
if (newMaint.equals(MaintenanceState.IMPLIED_FROM_HOST)
|| newMaint.equals(MaintenanceState.IMPLIED_FROM_SERVICE)) {
if (schMaint == MaintenanceState.IMPLIED_FROM_HOST
maintenanceStateHelper.createRequests(controller, requestProperties, maintenanceClusters);
return controller.addStages(requestStages, cluster, requestProperties,
null, changedServices, changedComps, changedScHosts, | 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 use this file except in compliance with
* the License. You may obtain a copy of the License at | 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 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 distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.ambari.logsearch.view;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
public class VCount implements java.io.Serializable {
private static final long serialVersionUID = 1L;
protected String name;
protected Long count;
/**
* Default constructor. This will set all the attributes to default value.
*/
public VCount() {
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Long getCount() {
return count;
}
public void setCount(Long count) {
this.count = count;
}
public String toString() {
String str = "VLogLevel={";
str += super.toString();
str += "name={" + name + "} ";
str += "count={" + count + "} ";
str += "}";
return str;
}
} | 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 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
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ambari.server.view;
import org.apache.ambari.server.state.Config;
import org.apache.ambari.view.cluster.Cluster;
/**
* View associated cluster implementation.
*/
public class ClusterImpl implements Cluster {
/**
* The associated Ambari cluster.
*/
private final org.apache.ambari.server.state.Cluster cluster;
// ----- Constructors ------------------------------------------------------
/**
* Create a view associated cluster from an Ambari cluster.
*
* @param cluster the Ambari cluster
*/
public ClusterImpl(org.apache.ambari.server.state.Cluster cluster) {
this.cluster = cluster;
}
// ----- Cluster -----------------------------------------------------------
@Override
public String getName() {
return cluster.getClusterName();
}
@Override
public String getConfigurationValue(String type, String key) {
Config config = cluster.getDesiredConfigByType(type);
return config == null ? null : config.getProperties().get(key);
}
} | 0 |
import org.apache.accumulo.core.clientImpl.Credentials;
import org.apache.accumulo.core.clientImpl.MasterClient;
import org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException;
import org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException;
import org.apache.accumulo.miniclusterImpl.MiniAccumuloConfigImpl; | 0 |
import org.apache.ambari.server.orm.dao.PrincipalDAO;
import org.apache.ambari.server.orm.dao.PrincipalTypeDAO;
import org.apache.ambari.server.orm.entities.PrincipalEntity;
import org.apache.ambari.server.orm.entities.PrincipalTypeEntity;
protected PrincipalTypeDAO principalTypeDAO;
@Inject
protected PrincipalDAO principalDAO;
@Inject
PrincipalTypeEntity principalTypeEntity = new PrincipalTypeEntity();
principalTypeEntity.setName(PrincipalTypeEntity.USER_PRINCIPAL_TYPE_NAME);
principalTypeDAO.create(principalTypeEntity);
PrincipalEntity principalEntity = new PrincipalEntity();
principalEntity.setPrincipalType(principalTypeEntity);
principalDAO.create(principalEntity);
ldapUser.setPrincipal(principalEntity); | 0 |
package org.apache.commons.digester3; | 1 |
throw new ConfigurationException("Unknown store type: " + type); | 0 |
.inEarlyPane(window) | 0 |
String enumName = "randomEnum" + TestUtils.randomString(10); | 0 |
StringBuilder sb = new StringBuilder(); | 0 |
* Copyright (C) 2015 Google Inc. | 0 |
/**
* Event to denote when a registration request is received from a Node
*/
/**
* Node authenticated/verified.
*/
/**
* A healthy heartbeat event received from the Node.
*/
/**
* No heartbeat received from the Node within the defined expiry interval.
*/
/**
* A non-healthy heartbeat event received from the Node.
*/ | 0 |
import org.apache.commons.lang.StringUtils;
* @version CVS $Id: CIncludeTransformer.java,v 1.13 2004/07/08 07:22:33 tcurdt Exp $
public static final String CINCLUDE_INCLUDE_ELEMENT_STRIP_ROOT_ATTRIBUTE = "strip-root";
String stripRootValue = attr.getValue("",CINCLUDE_INCLUDE_ELEMENT_STRIP_ROOT_ATTRIBUTE);
boolean stripRoot = StringUtils.equals( stripRootValue, "true" );
stripRoot,
false,
boolean stripRoot,
boolean cache )
+ ", stripRoot=" + stripRoot
this.filter.setIgnoreRootElement( stripRoot ); | 0 |
protected synchronized String getSpanKey(Map<String,String> data) {
private synchronized void updateHosts(String path, List<String> children) { | 0 |
* The purpose of this interface is to define a behavior of other components. | 0 |
import java.util.LinkedList;
Iterable<? extends Map.Entry<PublicKey, String>> ids = agent.getIdentities();
Collection<? extends Map.Entry<PublicKey, String>> keys;
if (ids instanceof Collection<?>) {
keys = (Collection<? extends Map.Entry<PublicKey, String>>) ids;
} else {
Collection<Map.Entry<PublicKey, String>> c = new LinkedList<>();
for (Map.Entry<PublicKey, String> i : ids) {
c.add(i);
}
keys = c;
}
signingKey.getAlgorithm(), Integer.toHexString(flags), BufferUtils.toHex(':', data)); | 0 |
* @version CVS $Id: CocoonTask.java,v 1.5 2003/10/24 08:49:49 cziegeler Exp $
//private Boolean preCompileOnly;
//this.preCompileOnly = new Boolean(false);
//this.preCompileOnly = new Boolean(preCompileOnly); | 0 |
// @formatter:off
// Below is a diagram of the operations in this test over time.
//
// Scan 0 |------------------------------|
// Scan 1 |----------|
// Minc 1 |-----|
// Scan 2 |----------|
// Scan 3 |---------------|
// Minc 2 |-----|
// Majc 1 |-----|
// @formatter:on | 0 |
results.add(StageResourceProvider.toResource(cache, entity, propertyIds));
static Resource toResource( | 0 |
import org.apache.atlas.model.instance.AtlasEntity.AtlasEntityWithExtInfo;
import org.apache.atlas.repository.converters.AtlasInstanceConverter;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import static org.apache.atlas.repository.converters.AtlasInstanceConverter.toAtlasBaseException;
private final AtlasInstanceConverter restAdapters;
public EntityREST(AtlasTypeRegistry typeRegistry, AtlasInstanceConverter instanceConverter,
MetadataService metadataService, AtlasEntityStore entitiesStore) {
this.restAdapters = instanceConverter;
} | 0 |
return !valueCollection.isEmpty() && get(key).addAll(valueCollection); | 0 |
context.result.setLastModifiedTimestamp(context.newestLastModifiedTimestamp);
auditsWriter.write(userName, context.result, startTime, endTime, context.result.getData().getEntityCreationOrder());
clearContextData(context);
debugLog("==> processObjectId({})", item);
debugLog("<== processObjectId({})", item);
return AtlasExportResult.OperationStatus.SUCCESS;
}
private void debugLog(String s, Object... params) {
if (!LOG.isDebugEnabled()) {
return;
LOG.debug(s, params);
debugLog("==> processEntity({})", guid);
debugLog("<== processEntity({})", guid);
if(LOG.isDebugEnabled()) {
debugLog("==> getConnectedEntityGuids({}): guidsToProcess {} query {}", AtlasTypeUtil.getAtlasObjectId(entity), context.guidsToProcess.size(), query);
if(LOG.isDebugEnabled()) {
debugLog("<== getConnectedEntityGuids({}): found {} guids; guidsToProcess {}", entity.getGuid(), result.size(), context.guidsToProcess.size());
if(LOG.isDebugEnabled()) {
debugLog("==> getEntityGuidsForFullFetch({}): guidsToProcess {}", AtlasTypeUtil.getAtlasObjectId(entity), context.guidsToProcess.size());
if(LOG.isDebugEnabled()) {
debugLog("<== getEntityGuidsForFullFetch({}): found {} guids; guidsToProcess {}",
entity.getGuid(), result.size(), context.guidsToProcess.size()); | 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 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
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.accumulo.monitor.rest.resources;
import java.util.Map;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import org.apache.accumulo.monitor.Monitor;
import org.apache.accumulo.server.problems.ProblemType;
@Path("/problems")
@Produces(MediaType.APPLICATION_JSON)
public class ProblemsResource {
@GET
public Map<String,Map<ProblemType,Integer>> getSummary() {
return Monitor.getProblemSummary();
}
@GET
@Path("/exception")
public Exception getException() {
return Monitor.getProblemException();
}
} | 0 |
import org.apache.accumulo.test.randomwalk.Environment;
public void setUp(State state, Environment env) throws Exception {
state.set("tableNamePrefix", String.format("multi_%s_%s_%d", hostname, env.getPid(), System.currentTimeMillis()));
public void tearDown(State state, Environment env) throws Exception {
if (env.isMultiTableBatchWriterInitialized()) {
MultiTableBatchWriter mtbw = env.getMultiTableBatchWriter();
env.resetMultiTableBatchWriter();
Connector conn = env.getConnector(); | 0 |
package org.apache.felix.karaf.shell.osgi; | 0 |
import org.apache.accumulo.core.client.lexicoder.impl.AbstractLexicoder;
public class TextLexicoder extends AbstractLexicoder<Text> implements Lexicoder<Text> {
protected Text decodeUnchecked(byte[] data, int offset, int len) {
Text text = new Text();
text.set(data, offset, len);
return text; | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/adapters/Attic/ListIteratorShortListIterator.java,v 1.3 2003/11/07 20:08:15 rwaldhoff Exp $
*
* @deprecated This code has been moved to Jakarta Commons Primitives (http://jakarta.apache.org/commons/primitives/)
* @version $Revision: 1.3 $ $Date: 2003/11/07 20:08:15 $ | 0 |
HostAttributes attributes = op.getSaveHostAttributes().getHostAttributes(); | 0 |
final HttpContext context = new BasicHttpContext();
final HttpHost host = new HttpHost("somehost");
final InetAddress local = InetAddress.getByAddress(new byte[] {127, 0, 0, 0});
final InetAddress ip1 = InetAddress.getByAddress(new byte[] {127, 0, 0, 1});
final InetAddress ip2 = InetAddress.getByAddress(new byte[] {127, 0, 0, 2});
final SocketConfig socketConfig = SocketConfig.custom()
final InetSocketAddress localAddress = new InetSocketAddress(local, 0);
final HttpContext context = new BasicHttpContext();
final HttpHost host = new HttpHost("somehost");
final InetAddress ip1 = InetAddress.getByAddress(new byte[] {10, 0, 0, 1});
final InetAddress ip2 = InetAddress.getByAddress(new byte[] {10, 0, 0, 2});
final HttpContext context = new BasicHttpContext();
final HttpHost host = new HttpHost("somehost");
final InetAddress local = InetAddress.getByAddress(new byte[] {127, 0, 0, 0});
final InetAddress ip1 = InetAddress.getByAddress(new byte[] {10, 0, 0, 1});
final InetAddress ip2 = InetAddress.getByAddress(new byte[] {10, 0, 0, 2});
final InetSocketAddress localAddress = new InetSocketAddress(local, 0);
final HttpContext context = new BasicHttpContext();
final HttpHost host = new HttpHost("somehost", -1, "https");
final HttpContext context = new BasicHttpContext();
final HttpHost host = new HttpHost("somehost", -1, "http"); | 0 |
cnxManager = peer.createCnxnManager(); | 0 |
import org.apache.beam.runners.dataflow.options.DataflowPipelineOptions; | 0 |
* Bridge class for the <svg> element.
* Constructs a new bridge for the <svg> element.
* A viewport defined an <svg> element. | 0 |
import java.nio.charset.StandardCharsets;
sks = new KeySelectors.SecretKeySelector("secret".getBytes(StandardCharsets.US_ASCII));
TestUtils.getSecretKey("secret".getBytes(StandardCharsets.US_ASCII)), sks, false);
TestUtils.getSecretKey("secret".getBytes(StandardCharsets.US_ASCII)), sks, false);
("keyid".getBytes(StandardCharsets.US_ASCII))))); | 1 |
@SuppressWarnings("rawtypes") Iterable unprocessedElements =
result.getUnprocessedElements() == null ?
Collections.emptyList() :
result.getUnprocessedElements();
CommittedBundle<?> unprocessedBundle =
inputBundle == null ? null : inputBundle.withElements(unprocessedElements);
return CommittedResult.create(result,
unprocessedBundle,
Collections.<CommittedBundle<?>>emptyList()); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/UnsignedShortArrayList.java,v 1.8 2003/01/04 15:00:57 rwaldhoff Exp $
* $Revision: 1.8 $
* $Date: 2003/01/04 15:00:57 $
* @version $Revision: 1.8 $ $Date: 2003/01/04 15:00:57 $
*
* @deprecated This class will soon change to implement
* {@link IntList} and not {@link List}. Adapters
* between {@link List} and {@link IntList} will be
* provided.
* | 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 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
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.zookeeper.server.jersey.jaxb;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name="session")
public class ZSession {
public String id;
public String uri;
public ZSession() {
// needed by jersey
}
public ZSession(String id, String uri) {
this.id = id;
this.uri = uri;
}
@Override
public int hashCode() {
return id.hashCode();
}
@Override
public boolean equals(Object obj) {
if(!(obj instanceof ZSession)) {
return false;
}
ZSession s = (ZSession) obj;
return id.equals(s.id);
}
@Override
public String toString() {
return "ZSession(" + id +")";
}
} | 0 |
import java.rmi.UnknownHostException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static final Logger LOGGER = LoggerFactory.getLogger(RepositoryImpl.class);
try {
URI newrepo = new URI(e.getTextContent());
repositories.add(newrepo);
} catch (URISyntaxException ex) {
LOGGER.error("Could not load feature repository: " + ex.getMessage() + " in feature repository " + uri);
}
} catch (Exception e) {
throw (IOException) new IOException(e.getMessage() + " : " + uri).initCause(e); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/tags/define/Attic/DefineTagLibTag.java,v 1.2 2002/04/25 18:58:47 jstrachan Exp $
* $Revision: 1.2 $
* $Date: 2002/04/25 18:58:47 $
* $Id: DefineTagLibTag.java,v 1.2 2002/04/25 18:58:47 jstrachan Exp $
* @version $Revision: 1.2 $
context.registerTagLibrary( getUri(), tagLibrary ); | 0 |
final byte[] content, final int off, final int len) { | 0 |
import org.apache.beam.sdk.Pipeline;
import org.apache.beam.sdk.io.TextIO;
import org.apache.beam.sdk.transforms.Create;
import org.apache.beam.sdk.transforms.Flatten;
import org.apache.beam.sdk.values.PCollection;
import org.apache.beam.sdk.values.PCollectionList;
| 0 |
* {@link org.apache.hc.core5.http.io.entity.HttpEntityWrapper} responsible for | 0 |
List<ServiceTestInvocation> listInvocations = new ArrayList<>(); | 0 |
@Override
@Override
@Override
@Override | 0 |
package org.apache.beam.sdk.extensions.sql.interpreter.operator.string;
import org.apache.beam.sdk.extensions.sql.interpreter.operator.BeamSqlExpression;
import org.apache.beam.sdk.extensions.sql.interpreter.operator.BeamSqlPrimitive;
import org.apache.beam.sdk.extensions.sql.schema.BeamSqlRow; | 0 |
.apply("Init", MapElements.via(new SimpleFunction<T, KV<T, Void>>() {
@Override
public KV<T, Void> apply(T element) {
return KV.of(element, (Void) null); | 0 |
// Simulate timeout if queryTimout is set to less than 5 seconds
if (_queryTimeout > 0 && _queryTimeout < 5) {
throw new SQLException("query timeout");
}
return new TesterResultSet(this); | 0 |
import com.google.auto.value.AutoValue;
return new AutoValue_DatastoreV1_Read.Builder().setNumQuerySplits(0).build();
@AutoValue
public abstract static class Read extends PTransform<PBegin, PCollection<Entity>> {
@Nullable public abstract String getProjectId();
@Nullable public abstract Query getQuery();
@Nullable public abstract String getNamespace();
public abstract int getNumQuerySplits();
public abstract String toString();
abstract Builder toBuilder();
@AutoValue.Builder
abstract static class Builder {
abstract Builder setProjectId(String projectId);
abstract Builder setQuery(Query query);
abstract Builder setNamespace(String namespace);
abstract Builder setNumQuerySplits(int numQuerySplits);
abstract Read build();
}
return toBuilder().setProjectId(projectId).build();
return toBuilder().setQuery(query).build();
return toBuilder().setNamespace(namespace).build();
return toBuilder()
.setNumQuerySplits(Math.min(Math.max(numQuerySplits, 0), NUM_QUERY_SPLITS_MAX))
.build();
.apply(Create.of(getQuery()))
.apply(ParDo.of(new SplitQueryFn(v1Options, getNumQuerySplits())));
checkNotNull(getProjectId(), "projectId");
checkNotNull(getQuery(), "query");
.addIfNotNull(DisplayData.item("projectId", getProjectId())
.addIfNotNull(DisplayData.item("namespace", getNamespace())
.addIfNotNull(DisplayData.item("query", getQuery().toString())
public void populateDisplayData(DisplayData.Builder builder) { | 0 |
* Copyright 2016-2017 Seznam.cz, a.s. | 0 |
package org.apache.hc.core5.http.impl.nio; | 1 |
/** Flag indicating if tokens should no longer be analyzed and simply added as arguments of the command line. */ | 0 |
* limitations under the License. | 0 |
this.blockContext.setContextPath(blockContextURL);
this.blockContext.setInitParams(properties); | 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 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
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License. | 0 |
import net.jcip.annotations.NotThreadSafe;
@NotThreadSafe | 0 |
this.buffers = new PriorityQueue<>(numBuffers + 1,
(q1, q2) -> Integer.compare(q1.level, q2.level));
private static class QuantileBuffer<T> { | 0 |
verifySupportedTrigger(leftRows);
verifySupportedTrigger(rightRows);
| 0 |
package org.apache.commons.beanutils2; | 1 |
import net.jcip.annotations.NotThreadSafe;
@NotThreadSafe | 0 |
* Copyright 2004,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 law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
* @version CVS $Id: PortletApplicationDefinitionImpl.java,v 1.2 2004/03/05 13:02:14 bdelacretaz Exp $ | 1 |
private void handleException(final HttpException ex, final HttpResponse response) {
response.setStatusCode(HttpStatus.SC_NOT_IMPLEMENTED);
response.setStatusCode(HttpStatus.SC_HTTP_VERSION_NOT_SUPPORTED);
response.setStatusCode(HttpStatus.SC_BAD_REQUEST);
} else {
response.setStatusCode(HttpStatus.SC_INTERNAL_SERVER_ERROR);
response = this.responseFactory.newHttpResponse(HttpVersion.HTTP_1_0,
HttpStatus.SC_INTERNAL_SERVER_ERROR, context);
HttpParamsLinker.link(request, this.params);
handleException(ex, response);
response = this.responseFactory.newHttpResponse(HttpVersion.HTTP_1_0,
HttpStatus.SC_INTERNAL_SERVER_ERROR, context);
HttpParamsLinker.link(request, this.params);
handleException(ex, response); | 0 |
package com.twitter.aurora.scheduler.thrift.auth;
import com.twitter.aurora.scheduler.thrift.auth.CapabilityValidator.Capability; | 0 |
import com.google.inject.TypeLiteral;
import org.apache.aurora.common.quantity.Amount;
import org.apache.aurora.common.quantity.Time;
import org.apache.aurora.scheduler.config.types.TimeAmount;
import org.apache.aurora.scheduler.maintenance.MaintenanceController;
bind(new TypeLiteral<Amount<Long, Time>>() { })
.annotatedWith(
MaintenanceController.MaintenanceControllerImpl.PollingInterval.class)
.toInstance(new TimeAmount(1, Time.MINUTES));
20,
1800,
task.unsetSlaPolicy(); | 0 |
import org.w3c.dom.Node;
protected SVGOMFEMergeNodeElement() {
result = new SVGOMAnimatedString(this, null, SVG_IN_ATTRIBUTE);
/**
* Returns a new uninitialized instance of this object's class.
*/
protected Node newNode() {
return new SVGOMFEMergeNodeElement();
} | 0 |
package aQute.lib.deployer.obr;
public enum CapabilityType {
PACKAGE("package"),
EE("ee"),
BUNDLE("bundle"),
MODE("mode"),
OTHER(null);
private String typeName;
CapabilityType(String name) {
this.typeName = name;
}
public String getTypeName() {
return typeName;
}
/**
* @throws IllegalArgumentException
*/
public static CapabilityType getForTypeName(String typeName) {
for (CapabilityType type : CapabilityType.values()) {
if (type.typeName != null && type.typeName.equals(typeName))
return type;
}
throw new IllegalArgumentException("Unknown capability type: " + typeName);
}
} | 0 |
package org.apache.felix.karaf.gshell.core;
private static final String EMBEDDED_PROPS = "org/apache/felix/karaf/version/embedded.properties";
private static final String SERVICEMIX_VERSION ="org/apache/felix/karaf/gshell/core/servicemix-version.properties"; | 0 |
assertTrue(this.config.getHttpsPort() != 443); | 0 |
* $Revision: 1.6 $
* $Date: 2003/11/02 17:53:55 $
* TestSuite for BasicDataSource with abandoned connection trace enabled
*
* @author Dirk Verbeeck
* @version $Revision: 1.6 $ $Date: 2003/11/02 17:53:55 $ | 0 |
import org.apache.http.nio.buffer.ExpandableBuffer; | 0 |
import org.apache.beam.sdk.values.Schema;
protected BeamPCollectionTable(Schema beamSchema) {
super(beamSchema);
Schema beamSchema) {
this(beamSchema); | 0 |
* Copyright (C) 2015 Google Inc. | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.