Diff
stringlengths 5
2k
| FaultInducingLabel
int64 0
1
|
---|---|
for (final String safeMethod: safeMethods) { | 0 |
public class PoolingHttpClientConnectionManager
implements HttpClientConnectionManager, ConnPoolControl<HttpRoute>, Closeable { | 0 |
import javax.servlet.http.HttpSessionAttributeListener;
import javax.servlet.http.HttpSessionListener;
HttpSessionAttributeListener getHttpSessionAttributeListener();
HttpSessionListener getHttpSessionListener(); | 0 |
final ProtocolVersion ver = request.getRequestLine().getProtocolVersion();
final HttpEntity entity = ((HttpEntityEnclosingRequest)request).getEntity();
final HttpClientContext clientContext = HttpClientContext.adapt(context);
final RequestConfig config = clientContext.getRequestConfig(); | 0 |
*
public final class CryptorFactory {
private CryptorFactory() {
*
public static synchronized void setCryptor(final Cryptor cryptor) {
* Return the Cryptor. If one has not been previously set, create it. The Cryptor class can be set by setting the
* "org.apache.commons.vfs2.cryptor" System property to the name of the Cryptor class.
*
public static synchronized Cryptor getCryptor() {
if (instance != null) {
if (cryptorClass != null) {
try {
} catch (final Exception ex) { | 1 |
private static org.slf4j.Logger LOG =
LOG.debug(ue.getMessage(), ue);
LOG.debug("STEP OUTPUT BUFFER\t\tINPUT BUFFER");
LOG.debug(" " + step + ": " + output);
LOG.debug("\t\t\t\t" + input);
LOG.debug("\t\t\t" + input); | 0 |
String base = System.getProperty("basedir") == null ? "./": System.getProperty("basedir");
base += fs + "data" + fs | 0 |
/*
* Copyright 2006 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.
*
*/ | 0 |
LOG.debug("Discovering instance to create/update for {}", instance);
LOG.debug("Instance {} has an assigned id", instance.getId()._getId());
LOG.debug("Creating new vertex for instance {}", instance);
LOG.debug("Re-using existing vertex {} for instance {}", instanceVertex.getId(), instance); | 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 |
expect(request.getPageRequest()).andReturn(null);
query.setPageRequest(null);
expect(request.getPageRequest()).andReturn(null);
query.setPageRequest(null);
expect(request.getPageRequest()).andReturn(null);
query.setPageRequest(null);
expect(request.getPageRequest()).andReturn(null);
query.setPageRequest(null);
expect(request.getPageRequest()).andReturn(null);
query.setPageRequest(null);
expect(request.getPageRequest()).andReturn(null);
query.setPageRequest(null);
// expect(request.getPageRequest()).andReturn(null); | 0 |
import org.apache.aurora.scheduler.updater.strategy.VariableBatchStrategy;
if (settings.getUpdateStrategy().isSetBatchStrategy()) {
checkArgument(
settings.getUpdateStrategy().getBatchStrategy().getGroupSize() > 0,
GROUP_SIZES_INVALID);
} else if (settings.getUpdateStrategy().isSetVarBatchStrategy()) {
checkArgument(
settings.getUpdateStrategy().
getVarBatchStrategy().
getGroupSizes().
stream().
reduce(0, Integer::sum) > 0,
GROUP_SIZES_INVALID);
} else {
checkArgument(
settings.getUpdateStrategy().getQueueStrategy().getGroupSize() > 0,
GROUP_SIZES_INVALID);
}
UpdateStrategy<Integer> strategy;
// Note: Verification that the update strategy exists and is valid has already taken
// place when the scheduler receives the thrift call.
// TODO(rdelvalle): Consider combining Batch Update and Variable Batch update strategies.
if (settings.getUpdateStrategy().isSetBatchStrategy()) {
strategy = new BatchStrategy<>(
updateOrder,
settings.getUpdateStrategy().getBatchStrategy().getGroupSize());
} else if (settings.getUpdateStrategy().isSetVarBatchStrategy()) {
strategy = new VariableBatchStrategy<>(
updateOrder,
settings.getUpdateStrategy().getVarBatchStrategy().getGroupSizes(),
rollingForward);
} else {
strategy = new QueueStrategy<>(
updateOrder,
settings.getUpdateStrategy().getQueueStrategy().getGroupSize());
}
static final String GROUP_SIZES_INVALID = "Update group size(s) must be positive."; | 0 |
* @param transactionRegistry
* transaction registry
* @param conn
* underlying connection
* @param pool
* connection pool
public PoolableManagedConnection(final TransactionRegistry transactionRegistry, final Connection conn,
final ObjectPool<PoolableConnection> pool) {
* @param transactionRegistry
* transaction registry
* @param conn
* underlying connection
* @param pool
* connection pool
* @param disconnectSqlCodes
* SQL_STATE codes considered fatal disconnection errors
* @param fastFailValidation
* true means fatal disconnection errors cause subsequent validations to fail immediately (no attempt to
* run query or isValid)
public PoolableManagedConnection(final TransactionRegistry transactionRegistry, final Connection conn,
final ObjectPool<PoolableConnection> pool, final Collection<String> disconnectSqlCodes, | 0 |
private FTPFileEntryParserFactory __parserFactory;
// __systemName is a cached values that should not be referenced directly
// except when assigned in getSystemName and __initDefaults.
private String __systemName;
__parserFactory = new DefaultFTPFileEntryParserFactory();
__systemName = null;
* @param __parserFactory
__parserFactory = parserFactory;
* This value is cached for the duration of the connection after the
* first call to this method. In other words, only the first time
* that you invoke this method will it issue a SYST command to the
* FTP server. FTPClient will remember the value and return the
* cached value until a call to disconnect.
if (__systemName == null && FTPReply.isPositiveCompletion(syst()))
__systemName = ((String)_replyLines.elementAt(0)).substring(4);
return __systemName;
__parserFactory.createFileEntryParser(parserKey);
/* Emacs configuration
* Local variables: **
* mode: java **
* c-basic-offset: 4 **
* indent-tabs-mode: nil **
* End: **
*/ | 0 |
import org.apache.ambari.view.utils.ambari.ValidatorUtils;
if (!ValidatorUtils.validateHdfsURL(webhdfsUrl)) { | 0 |
import org.apache.hc.core5.io.CloseMode;
public void close(final CloseMode closeMode) { | 0 |
import org.apache.cocoon.portal.aspect.AspectDescription;
* @version CVS $Id: DefaultCopletFactory.java,v 1.6 2003/06/14 17:55:43 cziegeler Exp $
AspectDescription adesc = DefaultAspectDescription.newInstance(aspectsConf[m]);
AspectDescription adesc = DefaultAspectDescription.newInstance(aspectsConf[m]); | 0 |
package org.apache.beam.sdk.extensions.euphoria.operator.test.junit; | 0 |
import org.junit.Rule;
@Rule
public TemporaryFolder folder = new TemporaryFolder(new File(System.getProperty("user.dir") + "/target"));
File f = folder.newFile("handleWriteTests");
File f = folder.newFile("writeBadVisibility");
| 0 |
import org.apache.calcite.runtime.SqlFunctions;
return currentVariance.combineWith(VarianceAccumulator.ofSingleElement(
SqlFunctions.toBigDecimal(rawInput))); | 0 |
LogQueryResponse sendQueryRequest(Map<String, String> queryParameters);
Set<String> sendGetLogFileNamesRequest(String componentName, String hostName);
LogLevelQueryResponse sendLogLevelQueryRequest(String componentName, String hostName);
String createLogFileTailURI(String baseURI, String componentName, String hostName); | 0 |
package org.apache.felix.scr.impl.manager;
import org.apache.felix.scr.impl.helper.ReadOnlyDictionary;
public class ComponentContextImpl implements ComponentContext | 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 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.cocoon.forms.datatype.convertor;
import org.apache.cocoon.forms.Constants;
import org.apache.cocoon.forms.util.DomHelper;
import org.w3c.dom.Element;
/**
* Builds {@link EnumConvertor}s.
*
* @version CVS $Id: EnumConvertorBuilder.java,v 1.1 2004/03/09 10:34:06 reinhard Exp $
*/
public class EnumConvertorBuilder implements ConvertorBuilder {
/* (non-Javadoc)
* @see org.apache.cocoon.woody.datatype.convertor.ConvertorBuilder#build(org.w3c.dom.Element)
*/
public Convertor build(Element configElement) throws Exception {
if (configElement == null) {
return null;
}
Element enumEl = DomHelper.getChildElement(configElement,
Constants.FD_NS, "enum", true);
String clazz = enumEl.getFirstChild().getNodeValue();
return new EnumConvertor(clazz);
}
} | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/share/org/apache/commons/validator/Attic/ValidatorResourcesInitializer.java,v 1.12 2003/03/12 06:06:46 dgraham Exp $
* $Revision: 1.12 $
* $Date: 2003/03/12 06:06:46 $
* Copyright (c) 1999-2003 The Apache Software Foundation. All rights
* @version $Revision: 1.12 $ $Date: 2003/03/12 06:06:46 $
"-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN",
"/org/apache/commons/validator/resources/validator_1_0.dtd",
"/org/apache/commons/validator/resources/validator_1_0_1.dtd" | 0 |
package org.apache.accumulo.server.master.state;
import org.apache.accumulo.server.master.state.DistributedStoreException;
public class IllegalDSException extends DistributedStoreException {
public IllegalDSException(String why) {
super(why);
}
private static final long serialVersionUID = 1L;
} | 0 |
log.info("Received SSH_MSG_CHANNEL_REQUEST {} on channel {}", req, id); | 0 |
package org.apache.commons.exec.launcher;
import java.io.File;
import java.io.IOException;
import org.apache.commons.exec.CommandLine;
import org.apache.commons.exec.environment.Environment;
/**
* A command launcher for a particular JVM/OS platform. This class is a general
* purpose command launcher which can only launch commands in the current
* working directory.
*/
public class CommandLauncherImpl implements CommandLauncher {
/*
* (non-Javadoc)
*
* @see org.apache.commons.exec.launcher.CommandLauncherIn#exec(java.lang.String[],
* java.lang.String[])
*/
public Process exec(final CommandLine cmd, final Environment env)
throws IOException {
String[] envVar = null;
if(env != null) {
envVar = env.getVariables();
}
return Runtime.getRuntime().exec(cmd.getCommandline(),
envVar);
}
/*
* (non-Javadoc)
*
* @see org.apache.commons.exec.launcher.CommandLauncherIn#exec(java.lang.String[],
* java.lang.String[], java.io.File)
*/
public Process exec(final CommandLine cmd, final Environment env,
final File workingDir) throws IOException {
if (workingDir == null) {
return exec(cmd, env);
}
throw new IOException("Cannot execute a process in different "
+ "directory under this JVM");
}
} | 1 |
import org.apache.accumulo.core.client.impl.ClientInfoImpl;
/**
* @return ClientInfo given properties
*/
static ClientInfo from(Properties properties) {
return new ClientInfoImpl(properties);
}
/**
* @return ClientInfo given properties and token
*/
static ClientInfo from(Properties properties, AuthenticationToken token) {
return new ClientInfoImpl(properties, token);
} | 0 |
} catch (SQLException | NumberFormatException ex) {
LOG.warn("Failed on insert records to store : " + ex.getMessage());
LOG.warn("Metric that cannot be stored : [" + metric.getMetricName() + "," + metric.getAppId() + "]" +
metric.getMetricValues().toString());
continue;
byte[] uuid = metadataManagerInstance.getUuid(clusterMetric, true); | 0 |
* $Revision: 1.10 $
* $Date: 2003/11/02 17:46:12 $
* @version $Revision: 1.10 $ $Date: 2003/11/02 17:46:12 $
public TesterPreparedStatement(Connection conn, String sql, int resultSetType, int resultSetConcurrency) {
super(conn, resultSetType, resultSetConcurrency);
_sql = sql;
}
return new TesterResultSet(this, null, _resultSetType, _resultSetConcurrency);
return new TesterResultSet(this, null, _resultSetType, _resultSetConcurrency); | 0 |
args, opts)) {
BatchWriter bw = client.createBatchWriter(clientOpts.getTableName()); | 0 |
package org.apache.accumulo.monitor.rest.tables; | 0 |
* Copyright 2003-2005 The Apache Software Foundation | 0 |
import java.util.AbstractSet;
import java.util.Iterator;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.Set;
import javax.xml.XMLConstants;
import javax.xml.crypto.MarshalException;
import javax.xml.crypto.XMLCryptoContext;
import javax.xml.crypto.XMLStructure;
import javax.xml.crypto.dsig.XMLSignature;
import javax.xml.crypto.dsig.spec.ExcC14NParameterSpec;
import javax.xml.crypto.dsig.spec.XPathFilter2ParameterSpec;
import javax.xml.crypto.dsig.spec.XPathFilterParameterSpec;
import javax.xml.crypto.dsig.spec.XPathType;
import javax.xml.crypto.dsig.spec.XSLTTransformParameterSpec;
| 0 |
* @version CVS $Id: Workbook.java,v 1.4 2003/09/22 22:44:15 joerg Exp $
_workbook.setSheetName(index, name, HSSFWorkbook.ENCODING_UTF_16); | 0 |
import org.apache.accumulo.core.data.NamespaceId;
import org.apache.accumulo.core.data.TableId;
public abstract TableConfiguration getTableConfiguration(TableId tableId);
public abstract NamespaceConfiguration getNamespaceConfiguration(NamespaceId namespaceId); | 0 |
import org.apache.beam.dsls.sql.BeamSqlCli;
import org.apache.beam.dsls.sql.BeamSqlEnv;
String plan = BeamSqlCli.explainQuery(sql);
String plan = BeamSqlCli.explainQuery(sql);
String plan = BeamSqlCli.explainQuery(sql);
String plan = BeamSqlCli.explainQuery(sql);
String plan = BeamSqlCli.explainQuery(sql);
String plan = BeamSqlCli.explainQuery(sql);
BeamSqlEnv.registerUdf("negative", BeamSqlUdfExpressionTest.UdfFn.class, "negative");
String plan = BeamSqlCli.explainQuery(sql); | 0 |
import static java.nio.charset.StandardCharsets.UTF_8;
mut1.put(new Text("column"), col1, System.currentTimeMillis(), new Value("This is the value for this key".getBytes(UTF_8)));
mut1.put(new Text("column"), col2, System.currentTimeMillis(), new Value("This is the value for this key".getBytes(UTF_8)));
mut1.put(new Text("column"), col3, System.currentTimeMillis(), new Value("This is the value for this key".getBytes(UTF_8)));
mut1.put(new Text("column"), col4, System.currentTimeMillis(), new Value("This is the value for this key".getBytes(UTF_8)));
mut2.put(new Text("column"), col1, System.currentTimeMillis(), new Value("This is the value for this key".getBytes(UTF_8)));
mut2.put(new Text("column"), col2, System.currentTimeMillis(), new Value("This is the value for this key".getBytes(UTF_8)));
mut2.put(new Text("column"), col3, System.currentTimeMillis(), new Value("This is the value for this key".getBytes(UTF_8)));
mut2.put(new Text("column"), col4, System.currentTimeMillis(), new Value("This is the value for this key".getBytes(UTF_8)));
mut3.put(new Text("column"), col1, System.currentTimeMillis(), new Value("This is the value for this key".getBytes(UTF_8)));
mut3.put(new Text("column"), col2, System.currentTimeMillis(), new Value("This is the value for this key".getBytes(UTF_8)));
mut3.put(new Text("column"), col3, System.currentTimeMillis(), new Value("This is the value for this key".getBytes(UTF_8)));
mut3.put(new Text("column"), col4, System.currentTimeMillis(), new Value("This is the value for this key".getBytes(UTF_8))); | 0 |
import org.apache.accumulo.core.client.impl.Table;
public static final Table.ID ID = Table.ID.ROOT; | 1 |
import javax.annotation.Nullable;
@Nullable
private final Windowing<IN, W> windowing;
@Nullable
private final UnaryFunction<IN, Long> eventTimeAssigner;
@Nullable Windowing<IN, W> windowing,
@Nullable UnaryFunction<IN, Long> eventTimeAssigner,
PartitioningBuilder<KEY, ?> partitioning) {
@Nullable Windowing<IN, W> windowing,
@Nullable UnaryFunction<IN, Long> eventTimeAssigner, | 0 |
* This is the Key used to store and access individual values in Accumulo. A Key is a tuple composed of a row, column family, column qualifier,
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
| 0 |
*
*
*
* <p>Tag handler for <Transaction> in JSTL.
*
// lets commit | 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 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.upgrade;
import java.io.IOException;
import java.util.concurrent.ConcurrentHashMap;
import org.apache.zookeeper.server.DataTree;
/**
* interface for snapshot conversion.
*
*/
public interface UpgradeSnapShot {
public DataTree getNewDataTree() throws IOException;
public ConcurrentHashMap<Long, Integer> getSessionWithTimeOuts();
} | 0 |
buf.append(" [").append(a.toString()).append("]");
buf.append("\n\t\tthrows ").append(str); | 0 |
* You may obtain a copy of the License at
* the example.
* following elements:
* <code>components</code> element.
* <dd>Used to configure any Components used by the test cases.
public abstract class ContainerTestCase extends TestCase {
protected void addComponents(ConfigurationInfo info)
Parameters p)
ContainerUtil.parameterize(instance, p);
Configuration conf)
Parameters p)
protected Object getComponent(String classname) | 0 |
System.arraycopy( rects, srcPos, this.rects, dstPos, len ); | 0 |
* @throws ClassNotFoundException if the class cannot be located | 0 |
new Object[] {maximumAllowedXMLStructureDepth} | 0 |
public class SignatureAlgorithmTest { | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/ConnectionTag.java,v 1.3 2003/10/09 21:21:20 rdonkin Exp $
* $Revision: 1.3 $
* $Date: 2003/10/09 21:21:20 $
* any, must include the following acknowledgement:
* Alternately, this acknowledgement may appear in the software itself,
* if and wherever such third-party acknowledgements normally appear.
* permission of the Apache Software Foundation.
* $Id: ConnectionTag.java,v 1.3 2003/10/09 21:21:20 rdonkin Exp $
* @version $Revision: 1.3 $ | 0 |
CompositeBehavior enterCompositeTransform(TransformHierarchy.Node node);
void leaveCompositeTransform(TransformHierarchy.Node node);
void visitPrimitiveTransform(TransformHierarchy.Node node);
void visitValue(PValue value, TransformHierarchy.Node producer);
public CompositeBehavior enterCompositeTransform(TransformHierarchy.Node node) {
public void leaveCompositeTransform(TransformHierarchy.Node node) { }
public void visitPrimitiveTransform(TransformHierarchy.Node node) { }
public void visitValue(PValue value, TransformHierarchy.Node producer) { } | 0 |
Set<String> propertyIds = new HashSet<>();
Set<String> propertyIds = new HashSet<>();
Set<String> propertyIds = new HashSet<>(); | 0 |
ClusterInformation clusterInformation = new ClusterInformation(CLUSTER_NAME, false, null, null, null);
ClusterInformation clusterInformation = new ClusterInformation(CLUSTER_NAME, false, null, null, null);
ClusterInformation clusterInformation = new ClusterInformation(CLUSTER_NAME, false, null, null, null);
ClusterInformation clusterInformation = new ClusterInformation(CLUSTER_NAME, false, null, null, null);
ClusterInformation clusterInformation = new ClusterInformation(CLUSTER_NAME, false, null, null, null); | 0 |
private final TransformEvaluatorRegistry transformRegistry;
TransformEvaluatorRegistry transformRegistry,
this.transformRegistry = transformRegistry;
executorFactory = new DirectTransformExecutor.Factory(context, transformRegistry);
transformRegistry.cleanup(); | 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.agentprotocol;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Queue;
public class ActionQueue {
Map<String, Queue<AgentCommand>> hostQueues;
private synchronized Queue<AgentCommand> getQueue(String hostname) {
return hostQueues.get(hostname);
}
private synchronized void addQueue(String hostname, Queue<AgentCommand> q) {
hostQueues.put(hostname, q);
}
public void enqueue(String hostname, AgentCommand cmd) {
Queue<AgentCommand> q = getQueue(hostname);
synchronized (q) {
q.add(cmd);
}
}
public AgentCommand dequeue(String hostname) {
Queue<AgentCommand> q = getQueue(hostname);
synchronized (q) {
return q.remove();
}
}
public List<AgentCommand> dequeueAll(String hostname) {
Queue<AgentCommand> q = getQueue(hostname);
List<AgentCommand> l = new ArrayList<AgentCommand>();
synchronized (q) {
while (true) {
try {
l.add(q.remove());
} catch (NoSuchElementException ex) {
return l;
}
}
}
}
} | 0 |
w.write("/**\n");
w.write("* Licensed to the Apache Software Foundation (ASF) under one\n");
w.write("* or more contributor license agreements. See the NOTICE file\n");
w.write("* distributed with this work for additional information\n");
w.write("* regarding copyright ownership. The ASF licenses this file\n");
w.write("* to you under the Apache License, Version 2.0 (the\n");
w.write("* \"License\"); you may not use this file except in compliance\n");
w.write("* with the License. You may obtain a copy of the License at\n");
w.write("*\n");
w.write("* http://www.apache.org/licenses/LICENSE-2.0\n");
w.write("*\n");
w.write("* Unless required by applicable law or agreed to in writing, software\n");
w.write("* distributed under the License is distributed on an \"AS IS\" BASIS,\n");
w.write("* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n");
w.write("* See the License for the specific language governing permissions and\n");
w.write("* limitations under the License.\n");
w.write("*/\n");
w.write("\n"); | 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.
*/ | 0 |
/**
* TODO Add javadoc
*
* @author <a href="mailto:[email protected]">Apache MINA SSHD Project</a>
* @version $Rev$, $Date$
*/ | 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 |
import org.junit.FixMethodOrder;
import org.junit.runners.MethodSorters;
@FixMethodOrder(MethodSorters.NAME_ASCENDING) | 0 |
import org.apache.excalibur.source.SourceValidity;
/**
* Get the validity object that describes the validity state
* of the properties belonging to the given source.
*
* @param source the Source for which to calculate the validity
* its properties, <code>null</code> if the source properties
* are not cacheable.
*/
public SourceValidity getValidity(Source source); | 0 |
* The syntax to use is LAYOUT_ID/PATH.
final Object layout = portalService.getProfileManager().getLayout(layoutId); | 0 |
* ALTER table to set new options
*/
public static final String ALTER_SQL = "ALTER TABLE %s SET TTL=%s";
/** | 0 |
/* ====================================================================
* Copyright (c) 2003-2004 The Apache Software Foundation. All rights
* @version $Revision: 1.4 $ $Date: 2004/01/14 21:34:34 $ | 0 |
* @return {@code null} if the connect operation is not finished yet, | 0 |
public Iterable<AtlasEdge<Titan1Vertex, Titan1Edge>> wrapEdges(Iterator<? extends Edge> it) {
Iterable<? extends Edge> iterable = new IteratorToIterableAdapter<>(it);
return wrapEdges(iterable);
}
public Iterable<AtlasEdge<Titan1Vertex, Titan1Edge>> wrapEdges(Iterable<? extends Edge> it) {
return Iterables.transform(it, new Function<Edge, AtlasEdge<Titan1Vertex, Titan1Edge>>() {
| 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 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
*
* @version $Revision$ $Date$ | 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 |
void sendInformation(HttpResponse response, HttpContext httpContext) throws HttpException, IOException;
void submitResponse(AsyncResponseProducer responseProducer, HttpContext httpContext) throws HttpException, IOException;
void pushPromise(HttpRequest promise, HttpContext httpContext, AsyncPushProducer responseProducer) throws HttpException, IOException; | 0 |
Copyright 2002-2003 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable 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 |
final SimpleHttpResponse response = new SimpleHttpResponse(HttpStatus.SC_OK);
response.setBodyText("Successful redirect", ContentType.TEXT_PLAIN);
return response;
return new SimpleHttpResponse(HttpStatus.SC_NOT_FOUND);
return new SimpleHttpResponse(HttpStatus.SC_NOT_FOUND);
final SimpleHttpResponse response = new SimpleHttpResponse(HttpStatus.SC_OK);
response.setBodyText("Successful redirect", ContentType.TEXT_PLAIN);
return response;
final SimpleHttpResponse response = new SimpleHttpResponse(HttpStatus.SC_OK);
response.setBodyText("Successful redirect", ContentType.TEXT_PLAIN);
return response;
SimpleRequestProducer.create(SimpleHttpRequest.get(target, "/circular-oldlocation/"), config),
SimpleResponseConsumer.create(), null);
SimpleRequestProducer.create(SimpleHttpRequest.get(target, "/circular-oldlocation/"), config),
SimpleResponseConsumer.create(), null);
final SimpleHttpRequest post = SimpleHttpRequest.post(target, "/oldlocation/");
post.setBodyText("stuff", ContentType.TEXT_PLAIN);
final Future<SimpleHttpResponse> future = httpclient.execute(post, context, null);
final SimpleHttpResponse response = new SimpleHttpResponse(HttpStatus.SC_OK);
response.setBodyText("Successful redirect", ContentType.TEXT_PLAIN);
return response;
final SimpleHttpResponse response = new SimpleHttpResponse(HttpStatus.SC_OK);
response.setBodyText("Successful redirect", ContentType.TEXT_PLAIN);
return response; | 0 |
import org.apache.sshd.common.SshConstants;
port = SshConstants.DEFAULT_PORT; | 0 |
public class BasicHttpEntity extends AbstractHttpEntity { | 0 |
* A stream for writing to a {@link HttpDataTransmitter HttpDataTransmitter}.
* | 0 |
LOG.info("Running setup step: {}", step); | 0 |
import java.io.IOException;
import org.apache.http.message.LineFormatter;
public HttpResponseWriter(final SessionOutputBuffer buffer,
final LineFormatter formatter,
final HttpParams params) {
super(buffer, formatter, params);
protected void writeHeadLine(final HttpMessage message)
throws IOException {
final CharArrayBuffer buffer = lineFormatter.formatStatusLine
(((HttpResponse) message).getStatusLine(), this.lineBuf);
this.sessionBuffer.writeLine(buffer); | 0 |
private final Flags options;
private final Set allowedSchemes = new HashSet(); | 0 |
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List; | 0 |
/**
* Returns some defaults for this property. The object must be of the appropriate type as defined by the cardinality and getType().
* The return type is a list of String objects that can be converted to the appropriate type. The cardinality of the return
* array must follow the absolute cardinality of this type. E.g. if the cardinality = 0, the array must contain 1 element.
* If the cardinality is 1, it must contain 0 or 1 elements. If it is -5, it must contain from 0 to max 5 elements. Note that
* the special case of a 0 cardinality, meaning a single value, does not allow arrays or vectors of 0 elements.
*/
public default PropertyMetaData setDefaults(String def, String ... defaults) {
String[] copy = new String[1 + defaults.length];
copy[0] = def;
System.arraycopy(defaults, 0, copy, 1, defaults.length);
return setDefaults(copy);
} | 0 |
if (loginOptions != null && !cl.hasOption(tokenOption.getOpt()))
throw new IllegalArgumentException("Must supply '-" + tokenOption.getOpt() + "' option with '-" + loginOption.getOpt() + "' option");
if (loginOptions == null && cl.hasOption(tokenOption.getOpt()))
throw new IllegalArgumentException("Must supply '-" + loginOption.getOpt() + "' option with '-" + tokenOption.getOpt() + "' option");
if (passw != null && cl.hasOption(tokenOption.getOpt()))
throw new IllegalArgumentException("Can not supply '-" + passwOption.getOpt() + "' option with '-" + tokenOption.getOpt() + "' option");
if (user == null)
throw new MissingArgumentException(usernameOption);
passw = readMaskedLine("Password: ", '*');
if (passw != null)
this.token = new PasswordToken(passw);
}
if (this.token == null) {
throw new MissingArgumentException("No password or token option supplied"); | 0 |
/** Tests for {@link CombineFnTester}. */
Iterable<KV<Integer, Integer>> accumulators) { | 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 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.view.hive2.actor.message.lifecycle;
public class InactivityCheck {} | 0 |
suite.addTest(new TestSuite(NullInputStreamTest.class));
suite.addTest(new TestSuite(NullReaderTest.class)); | 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.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.hc.core5.http;
/**
* The Request-Line begins with a method token, followed by the
* Request-URI and the protocol version.
*
* @since 4.0
*/
public interface RequestLine {
String getMethod();
ProtocolVersion getProtocolVersion();
String getUri();
} | 1 |
*
*
* OpenVMS.
return freeSpaceKb(-1);
return freeSpaceKb(new File(".").getAbsolutePath(), timeout);
final String[] cmdAttribs =
*
| 1 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/CallParamRule.java,v 1.18 2004/02/15 01:02:13 craigmcc Exp $
* $Revision: 1.18 $
* $Date: 2004/02/15 01:02:13 $
* @version $Revision: 1.18 $ $Date: 2004/02/15 01:02:13 $ | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/share/org/apache/commons/validator/Msg.java,v 1.12 2004/02/21 17:10:29 rleland Exp $
* $Revision: 1.12 $
* $Date: 2004/02/21 17:10:29 $
* 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 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 |
// ensure the metadata table is online
for (@SuppressWarnings("unused") Entry<Key,Value> unused : c.createScanner(MetadataTable.NAME, Authorizations.EMPTY))
; | 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.
*/
/** TODO: complete javadoc. */
package cz.seznam.euphoria.core.executor.io; | 0 |
fw1.write(65);
fw2.write(65); | 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.
*/ | 0 |
import javax.crypto.BadPaddingException;
import javax.servlet.DispatcherType;
import org.apache.ambari.server.checks.DatabaseConsistencyCheckHelper;
DatabaseConsistencyCheckHelper.checkDBVersionCompatible(); | 0 |
package org.apache.beam.sdk.runners.inprocess;
import org.apache.beam.sdk.runners.inprocess.InProcessPipelineRunner.CommittedBundle;
import org.apache.beam.sdk.transforms.AppliedPTransform; | 0 |
import org.apache.hc.client5.http.async.methods.SimpleHttpRequests;
final Future<SimpleHttpResponse> future = httpclient.execute(SimpleHttpRequests.GET.create(target, "/"), context, null); | 0 |
/** Defines basic methods available in user defined functions. */
* Retrieves the window - if any - underlying the current execution of this context.
* @return {@code null} if this context is not executed within a windowing strategy, otherwise the
* current window of this context | 0 |
public MaxIntegerFn() {
super(Integer.MIN_VALUE);
}
public MaxLongFn() {
super(Long.MIN_VALUE);
}
public MaxDoubleFn() {
super(Double.NEGATIVE_INFINITY);
} | 0 |
public SecretKey engineLookupAndResolveSecretKey( | 0 |
assertNotNull(conn);
assertNotNull(stmt);
assertNotNull(rset);
assertNotNull(conn);
assertNotNull(stmt);
assertNotNull(rset);
assertNotNull(conn);
assertNotNull(stmt);
assertNotNull(rset);
assertNotNull(stmt);
assertNotNull(rset);
assertNotNull(conn);
assertNotNull(stmt);
assertNotNull(rset);
assertNotNull(stmt);
assertNotNull(rset);
assertNotNull(conn);
assertNotNull(stmt);
assertNotNull(rset);
assertNotNull(conn); | 0 |
* <p>See {@link TextIO.Write#to(String) Write.to(String)} for more information. | 0 |
when(mockTrigger.onElement(Mockito.<Trigger<IntervalWindow>.OnElementContext>any()))
.thenReturn(TriggerResult.CONTINUE, TriggerResult.CONTINUE);
tester.injectElements(
TimestampedValue.of(1, new Instant(1)),
TimestampedValue.of(10, new Instant(10)));
TimestampedValue.of(10, new Instant(23)), // [-60, 40), [-30, 70), [0, 100) | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.