Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/test/org/apache/commons/jelly/tags/junit/FailTag.java,v 1.3 2003/10/09 21:21:31 rdonkin Exp $
* $Revision: 1.3 $
* $Date: 2003/10/09 21:21:31 $
* 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: FailTag.java,v 1.3 2003/10/09 21:21:31 rdonkin Exp $
* @version $Revision: 1.3 $ | 0 |
import org.apache.sshd.common.Closeable;
protected Closeable getInnerCloseable() {
return builder()
.close(super.getInnerCloseable())
.run(toString(), () -> Socket.close(socket))
.build(); | 0 |
public interface MiniClusterOnlyTests {} | 0 |
* @version CVS $Id: SourcePropsWritingTransformer.java,v 1.3 2003/11/15 04:21:29 joerg Exp $
* @param par Parameters for the transformer | 0 |
public class XMLX509CertificateTest { | 0 |
props.put("instance.name",name); | 0 |
int total = summary.getTaskTotal();
boolean skip = summary.isStageSkippable();
Map<HostRoleStatus, Integer> counts = calculateStatusCounts(summary.getTaskStatuses());
HostRoleStatus stageStatus = calculateSummaryStatus(counts, total, skip); | 0 |
public class ProviderWriteTests
extends AbstractProviderTestCase | 0 |
chunked.close();
public void negative_chunksize_not_permitted() throws Exception{
ChunkedOutputStream chunked = new ChunkedOutputStream(new ByteArrayOutputStream(), 0);
chunked.close();
chunked.close(); | 0 |
Copyright 2000-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 |
if(readCounter > -1){
lh.setLast(readCounter); | 0 |
import org.apache.beam.sdk.extensions.sql.schema.BeamSqlRecordType;
import org.apache.beam.sdk.values.BeamRecord;
protected BeamKafkaTable(BeamSqlRecordType beamSqlRowType) {
public BeamKafkaTable(BeamSqlRecordType beamSqlRowType, String bootstrapServers,
public abstract PTransform<PCollection<KV<byte[], byte[]>>, PCollection<BeamRecord>>
public abstract PTransform<PCollection<BeamRecord>, PCollection<KV<byte[], byte[]>>>
public PCollection<BeamRecord> buildIOReader(Pipeline pipeline) {
public PTransform<? super PCollection<BeamRecord>, PDone> buildIOWriter() {
return new PTransform<PCollection<BeamRecord>, PDone>() {
public PDone expand(PCollection<BeamRecord> input) { | 0 |
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
final Bundle bundle = ref.getBundle();
if ( bundle != null )
{
final BundleContext ctx = bundle.getBundleContext();
if ( ctx != null )
{
f = ctx.createFilter(this.contextSelection);
}
} | 0 |
* @throws IOException if an error occurs while writing to the stream
* @throws IOException if an error occurs while reading from the stream
* @throws ClassNotFoundException if an object read from the stream can not be loaded | 0 |
// May need to first transition to UPGRADED from UPGRADING | 0 |
* org.w3c.dom.svg.SVGAnimatedEnumeration#setBaseVal(short)}. | 0 |
* @version CVS $Id: CopletDataFieldHandler.java,v 1.4 2003/08/19 14:09:34 cziegeler Exp $
public class CopletDataFieldHandler extends AbstractFieldHandler { | 0 |
public <T, E extends Exception> T read(Work<T, E> work) throws StorageException, E {
return delegate.read(work); | 0 |
protected static final Configuration EMPTY_CONFIG;
static {
DefaultConfiguration config = new DefaultConfiguration("empty");
config.makeReadOnly();
EMPTY_CONFIG = config;
}
* @see org.springframework.beans.factory.config.BeanPostProcessor#postProcessAfterInitialization(Object, String)
} else {
config = AvalonUtils.replaceProperties(config, this.settings);
* @see DestructionAwareBeanPostProcessor#postProcessBeforeDestruction(Object, String) | 0 |
/*
* Copyright (c) 1999 World Wide Web Consortium
* (Massachusetts Institute of Technology, Institut National de Recherche
* en Informatique et en Automatique, Keio University).
* All Rights Reserved. http://www.w3.org/Consortium/Legal/
*
* $Id$
*/
package org.w3c.flute.util;
import org.w3c.css.sac.CSSException;
/**
* @version $Revision$
* @author Philippe Le Hegaret
*/
public final class CSSUtil {
// don't create CSSUtil object.
/**
* Creates a new CSSUtil
*/
private CSSUtil() {}
/**
* Used to retrieve a string with quotes.
*/
public static String getQuotedString(String s) {
int index1 = s.indexOf('"');
int index2 = s.indexOf('\'');
if ((index1 == -1) && (index2 == -1) || (index2 == -1)) {
return '"' + s + '"';
} else if (index1 == -1) {
return '\'' + s + '\'';
} else {
throw new CSSException("invalid CSS string " + s);
}
}
} | 1 |
import javax.swing.JOptionPane;
javax.swing.JOptionPane.showMessageDialog(null, "Starting latest Batik");
(resources.getString(CSS_PARSER_CLASS_NAME_KEY));
// Let the user know that we are
// Note that frame may be null, which is
// a valid argument for showMessageDialog
// NOTE: Need to revisit Resources/Messages usage to
// have a single entry point. Should have a
// formated message here instead of a + ...
JOptionPane.showMessageDialog
(frame,
resources.getString("Error.skipping.file")
+ file.getAbsolutePath()); | 0 |
/** The variable name to hold the list of tokens */
/** the delimiter that separates the tokens */ | 0 |
/**
* Construct an instance with the specified name
* @param name name of the test
*/
/**
* Create a Test Suite
* @return the test suite.
*/
/**
* Static main.
* @param args arguments
*/ | 0 |
import com.google.cloud.dataflow.sdk.util.ExecutableTrigger;
return WindowingStrategy.of(typedFn, ExecutableTrigger.create(typedTrigger)); | 0 |
return Collections.EMPTY_LIST;
return Collections.EMPTY_LIST;
return Collections.EMPTY_LIST; | 0 |
ElementValue default_value;
/**
* @param annotation_type the subclass type of the annotation
* @param name_index Index pointing to the name <em>Code</em>
* @param length Content length in bytes
* @param file Input stream
* @param constant_pool Array of constants
*/
AnnotationDefault(byte annotation_type, int name_index, int length, DataInputStream file,
ConstantPool constant_pool) throws IOException {
this(annotation_type, name_index, length, (ElementValue) null, constant_pool);
default_value = new ElementValue(file, constant_pool);
}
/**
* @param annotation_type the subclass type of the annotation
* @param name_index Index pointing to the name <em>Code</em>
* @param length Content length in bytes
* @param defaultValue the annotation's default value
* @param constant_pool Array of constants
*/
public AnnotationDefault(byte annotation_type, int name_index, int length,
ElementValue defaultValue, ConstantPool constant_pool) {
super(annotation_type, name_index, length, constant_pool);
setDefaultValue(defaultValue);
}
/**
* Called by objects that are traversing the nodes of the tree implicitely
* defined by the contents of a Java class. I.e., the hierarchy of methods,
* fields, attributes, etc. spawns a tree of objects.
*
* @param v Visitor object
*/
public void accept( Visitor v ) {
// v.visitAnnotationDefault(this);
}
/**
* @param defaultValue the default value of this methodinfo's annotation
*/
public final void setDefaultValue( ElementValue defaultValue ) {
default_value = defaultValue;
}
/**
* @return the default value
*/
public final ElementValue getDefaultValue() {
return default_value;
} | 0 |
* Tests for {@link Partition}.
input.apply(Partition.of(5, new IdentityFn()));
input.apply(Partition.of(0, new IdentityFn())); | 0 |
import org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode;
if (e.getErrorCode().equals(SecurityErrorCode.TABLE_DOESNT_EXIST))
return new org.apache.accumulo.proxy.thrift.TableNotFoundException(e.toString()); | 0 |
import org.apache.sshd.common.RuntimeSshException;
boolean authed;
try {
authed = authenticator.authenticate(session, username, clientKey, clientHostName, clientUsername, certs);
} catch (Error e) {
log.warn("doAuth({}@{}) failed ({}) to consult authenticator for {} key={}: {}",
username, session, e.getClass().getSimpleName(),
keyType, KeyUtils.getFingerPrint(clientKey), e.getMessage());
if (log.isDebugEnabled()) {
log.debug("doAuth(" + username + "@" + session + ") delegate consultation failure details", e);
}
throw new RuntimeSshException(e);
}
| 0 |
String namespaceId = Tables.getNamespaceId(master.getInstance(), tableId); | 0 |
* @version CVS $Id: DOMStreamer.java,v 1.5 2003/03/11 06:50:00 jefft Exp $
String nodeName = node.getNodeName(); // SAX 1 node name, for debugging
throw new SAXException("[NamespaceNormalizingDOMStreamer] Encountered a DOM Element '"+nodeName+"' without a localName. DOM Level 1 trees are not supported by this DOMStreamer.");
throw new SAXException("[NamespaceNormalizingDOMStreamer] Encountered an attribute '"+attrName+"' without a local name, on node '"+nodeName+"'. This DOM streamer does not support DOM 1 attributes."); | 0 |
new MagicNumberFileFilter("0", -1); | 0 |
*
*
*
*
* @author <a href="mailto:ckl@dacelo.nl">Christiaan ten Klooster</a>
* @return the parent window | 1 |
import com.google.common.net.HostAndPort;
final HostAndPort location = HostAndPort.fromString(opts.location);
final Instance inst = opts.getInstance();
final ServerConfigurationFactory conf = new ServerConfigurationFactory(inst);
final ClientContext context = new AccumuloServerContext(conf) {
TabletClientService.Iface client = ThriftUtil.getTServerClient(location, context); | 0 |
/*
import java.net.MalformedURLException;
public String getCachedBundleURL()
return m_refDir.toURL().toString();
catch (MalformedURLException ex)
// This should never happen.
return null; | 0 |
boolean useDrawRenderedImage = false;
// For some reason using the transform version
// causes a gStackUnderflow error but if I just
// use the drawImage with an x & y it works.
g2d.drawImage(subBI, iR.x, iR.y, null);
// AffineTransform trans
// = AffineTransform.getTranslateInstance(iR.x, iR.y);
// g2d.drawImage(subBI, trans, null); | 0 |
import org.apache.accumulo.core.conf.SiteConfiguration;
ZooReaderWriter zk = new ZooReaderWriter(new SiteConfiguration()); | 0 |
import org.apache.batik.dom.GenericDOMImplementation;
import org.apache.batik.dom.util.SAXDocumentFactory;
"org.apache.batik.css.parser.Parser";
/**
* The gui resources file name
*/
public final static String RESOURCES =
"org.apache.batik.apps.regsvggen.resources.Messages";
/**
* The resource bundle
*/
protected static ResourceBundle bundle;
static {
bundle = ResourceBundle.getBundle(RESOURCES, Locale.getDefault());
}
// Load xml test file
SAXDocumentFactory df = new SAXDocumentFactory
(GenericDOMImplementation.getDOMImplementation(),
bundle.getString("org.xml.sax.driver"));
Document testDoc = null;
testDoc = df.createDocument(null, "text",
new File(testFileName).toURL().toString());
e.printStackTrace();
throw e; | 0 |
in.apply("KvSwap", ParDo.of(new OldDoFn<KV<K, V>, KV<V, K>>() { | 0 |
if (m_grouping.parallelScheduler != null) {
int taskParallelism = m_grouping.parallelScheduler.maxDegreeOfParallelism;
if (taskParallelism == Integer.MAX_VALUE) {
taskParallelism = ctx.getDefaultMaxDegreeOfParallelism();
}
hostSets = SetUtils.split(tw.getHosts(), taskParallelism); | 0 |
import org.apache.cocoon.portal.coplet.CopletInstance;
import org.apache.cocoon.portal.coplet.CopletInstanceFeatures;
public void contextualize(Context aContext) throws ContextException {
this.context = aContext;
public void prepare(PortalManagerAspectPrepareContext renderContext, PortalService service) throws ProcessingException {
public void render(PortalManagerAspectRenderContext renderContext,
final Request req = ObjectModelHelper.getRequest(renderContext.getObjectModel());
final List changed = CopletInstanceFeatures.getChangedCopletInstanceDataObjects(service);
final CopletInstance current = (CopletInstance)i.next();
final Layout l = CopletInstanceFeatures.searchLayout(current.getId(), rootLayout);
final CopletInstance cid = profileManager.getCopletInstanceData(copletId);
portalLayout = CopletInstanceFeatures.searchLayout(cid.getId(), profileManager.getPortalLayout(null, null));
renderContext.invokeNext(ch, parameters); | 0 |
import org.apache.hc.core5.function.Supplier;
| 0 |
import java.io.IOException;
* Parses the current reader representing an angle.
protected void doParse() throws ParseException, IOException {
current = reader.read();
current = reader.read();
current = reader.read();
current = reader.read();
current = reader.read();
current = reader.read();
current = reader.read();
current = reader.read();
current = reader.read();
current = reader.read();
current = reader.read(); | 0 |
/*
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); 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.commons.ognl.performance.runtime;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
/**
* User: mcucchiara
* Date: 19/10/11
* Time: 9.37
*/
public interface RuntimeWrapper {
void getFields(Class<?> c) throws Exception;
void findParameterTypes(Class<?> targetClass, Method method) throws Exception;
void getConstructors(Class<?> c) throws Exception;
void getMethods(Class<?> c, boolean staticMethods) throws Exception;
void getDeclaredMethods(Class<?> c, String propertyName, boolean setters) throws Exception;
void getParameterTypes(Method method) throws Exception;
void getParameterTypes(Constructor<?> constructor) throws Exception;
void getPermission(Method method) throws Exception;
void getPrimitiveDefaultValue(Class<?> type) throws Exception;
void invokeMethod(Object o, Method method, Object[] args) throws Exception;
void clearCache();
} | 0 |
import org.apache.beam.vendor.grpc.v1p13p1.com.google.protobuf.Struct; | 0 |
import org.apache.beam.vendor.grpc.v1p21p0.io.grpc.stub.StreamObserver; | 0 |
* It uses file's path as the primary key.
// Convert to a URI because the location of a bundle
// is typically a URI. At least, that's the case for
// autostart bundles.
String location = b.getLocation();
if (location != null)
{
URI uri;
try
{
uri = new URI(b.getLocation()).normalize();
}
catch (URISyntaxException e)
{
// Let's try to interpret the location as a file path
uri = new File(location).toURI().normalize();
}
path = uri.getPath();
} | 0 |
* {@code null} if the index is out of range | 0 |
if (divisor == 0.0f)
= CSSUtilities.getComputedStyle(filterElement);
GraphicsNodeRenderContext rc =
| 0 |
@Test(timeout = (NUM_LOCATION_PASSES + 2) * LOCATION_DELAY) | 0 |
import org.apache.commons.lang3.StringUtils;
addAttributeData(parent, result, qualifiedName(name));
String prefix =
(name.getPrefix() != null) ? prefixName(name.getPrefix(),
null) : null;
if (prefix == null || StringUtils.startsWith(n, prefix))
{
addAttributeData(parent, result, n);
} | 0 |
import org.apache.felix.dependencymanager.test2.components.Ensure;
import org.apache.felix.dependencymanager.test2.integration.common.TestBase; | 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.sshd.util.test;
/**
* Marker interface used as <A HREF="https://github.com/junit-team/junit4/wiki/categories">jUnit category</A>
* to indicate a test that does not require real client/server interaction.
*
* @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
*/
public interface NoIoTestCase {
// Marker interface
} | 0 |
import org.apache.ambari.server.orm.dao.MemberDAO;
import org.apache.ambari.server.orm.dao.PrivilegeDAO;
import org.apache.ambari.server.orm.entities.MemberEntity;
import org.apache.ambari.server.orm.entities.PrincipalEntity;
import org.apache.ambari.server.orm.entities.PrivilegeEntity;
import java.util.LinkedList;
import java.util.List;
MemberDAO memberDAO;
PrivilegeDAO privilegeDAO;
AuthorizationHelper authorizationHelper, UserDAO userDAO,
RoleDAO roleDAO, MemberDAO memberDAO, PrivilegeDAO privilegeDAO) {
this.memberDAO = memberDAO;
this.privilegeDAO = privilegeDAO;
// get all of the privileges for the user
List<PrincipalEntity> principalEntities = new LinkedList<PrincipalEntity>();
principalEntities.add(user.getPrincipal());
List<MemberEntity> memberEntities = memberDAO.findAllMembersByUser(user);
for (MemberEntity memberEntity : memberEntities) {
principalEntities.add(memberEntity.getGroup().getPrincipal());
}
List<PrivilegeEntity> privilegeEntities = privilegeDAO.findAllByPrincipal(principalEntities);
authorizationHelper.convertPrivilegesToAuthorities(privilegeEntities)); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestFastHashMap.java,v 1.7 2002/08/12 18:00:46 pjack Exp $
* $Revision: 1.7 $
* $Date: 2002/08/12 18:00:46 $
* @version $Id: TestFastHashMap.java,v 1.7 2002/08/12 18:00:46 pjack Exp $
/**
* There is a bug in JDK1.2 HashMap; the keySet() will incorrectly
* return false when a null value is removed.
*/
public boolean useNullValue() {
return false;
} | 0 |
c.newInstance();
private boolean available = false;
private DaemonController daemonController = null;
private String[] args = null; | 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 |
package org.apache.beam.sdk.runners;
import org.apache.beam.sdk.Pipeline;
import org.apache.beam.sdk.options.DirectPipelineOptions;
* {@link org.apache.beam.sdk.Pipeline#run()}. | 0 |
import org.apache.sshd.common.session.Session;
StringBuilder sb = new StringBuilder(Session.MAX_VERSION_LINE_LENGTH + Integer.SIZE);
sb.append("SSH-2.0-software");
do {
sb.append("01234567890123456789012345678901234567890123456789");
} while (sb.length() < Session.MAX_VERSION_LINE_LENGTH);
Buffer buf = new ByteArrayBuffer(sb.toString().getBytes(StandardCharsets.UTF_8));
StringBuilder sb = new StringBuilder(FactoryManager.DEFAULT_MAX_IDENTIFICATION_SIZE + Integer.SIZE);
do {
} while (sb.length() < FactoryManager.DEFAULT_MAX_IDENTIFICATION_SIZE);
| 0 |
* @return the query string part of the filename
* @return the path and its query string
* @return the uri | 0 |
LOG.debug("Analyzing upgrade item {} with tasks: {}.", entity.getText(), entity.getTasks()); | 0 |
package org.apache.cocoon.blocks; | 0 |
* @version CVS $Id: EP_RepeatLeft.java,v 1.2 2003/03/11 19:05:01 vgritsenko Exp $ | 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.beam.sdk.io.gcp.bigquery;
/** Exception to signal that BigQuery schema retrieval failed. */
public class BigQuerySchemaRetrievalException extends RuntimeException {
BigQuerySchemaRetrievalException(String message, Throwable cause) {
super(message, cause);
}
} | 0 |
/*
* $HeadURL$
* $Revision$
* $Date$
*
* ====================================================================
*
* Copyright 1999-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.
* ====================================================================
*
* 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/>.
*
*/ | 0 |
* @throws Exception
* @throws Exception | 0 |
List<String> inclusiveNamespaces = new ArrayList<>();
List<String> inclusiveNamespaces = new ArrayList<>();
List<String> inclusiveNamespaces = new ArrayList<>();
List<String> inclusiveNamespaces = new ArrayList<>();
List<String> inclusiveNamespaces = new ArrayList<>();
List<String> inclusiveNamespaces = new ArrayList<>();
List<String> inclusiveNamespaces = new ArrayList<>();
List<String> inclusiveNamespaces = new ArrayList<>();
List<String> inclusiveNamespaces = new ArrayList<>();
List<String> inclusiveNamespaces = new ArrayList<>();
List<String> inclusiveNamespaces = new ArrayList<>();
List<String> inclusiveNamespaces = new ArrayList<>();
List<String> inclusiveNamespaces = new ArrayList<>();
List<String> inclusiveNamespaces = new ArrayList<>();
List<String> inclusiveNamespaces = new ArrayList<>(); | 0 |
/***
* Registers a notification handler to which will be sent
* notifications of received telnet option negotiation commands.
* <p>
* @param notifhand - TelnetNotificationHandler to be registered
***/
public void registerNotifHandler(TelnetNotificationHandler notifhand)
{
super.registerNotifHandler(notifhand);
}
/***
* Unregisters the current notification handler.
* <p>
***/
public void unregisterNotifHandler()
{
super.unregisterNotifHandler();
} | 0 |
* Thrown when there is a failure condition during the encoding process. This exception is thrown when an Encoder
* encounters a encoding specific exception such as invalid data, inability to calculate a checksum, characters outside
* of the expected range.
* @param message
* a useful message relating to the encoder specific error.
/**
* Creates a EncoderException.
*
* @param cause
* The cause which is saved for later retrieval by the {@link #getCause()} method. A <code>null</code>
* value is permitted, and indicates that the cause is nonexistent or unknown.
* @since 1.4
*/
public EncoderException(Throwable cause) {
super(cause);
}
/**
* Creates a EncoderException.
*
* @param message
* The detail message which is saved for later retrieval by the {@link #getMessage()} method.
* @param cause
* The cause which is saved for later retrieval by the {@link #getCause()} method. A <code>null</code>
* value is permitted, and indicates that the cause is nonexistent or unknown.
* @since 1.4
*/
public EncoderException(String message, Throwable cause) {
super(message, cause);
}
} | 0 |
@Override
@Override | 0 |
import org.apache.http.impl.DefaultConnectionReuseStrategy;
import org.apache.http.impl.DefaultHttpResponseFactory;
HttpService httpService = new HttpService(
httpproc,
new DefaultConnectionReuseStrategy(),
new DefaultHttpResponseFactory()); | 0 |
* commmit the transaction and make sure
/**
*
* @return transaction log's elapsed sync time in miliseconds
*/
long getTxnLogSyncElapsedTime(); | 0 |
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
@RunWith(JUnit4.class) | 0 |
* Copyright (c) 2002 The Apache Software Foundation. All rights | 0 |
return new IF_ACMPEQ(super.getTarget()); | 0 |
(AffineTransform.getRotateInstance( Math.toRadians( theta ) ));
= AffineTransform.getRotateInstance( Math.toRadians( theta ), cx, cy);
(AffineTransform.getShearInstance(Math.tan( Math.toRadians( skx ) ), 0));
(AffineTransform.getShearInstance(0, Math.tan( Math.toRadians( sky ) ))); | 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.hedwig.client.api;
import com.google.protobuf.ByteString;
import org.apache.hedwig.protocol.PubSubProtocol.Message;
import org.apache.hedwig.util.Callback;
/**
* Interface to define the client handler logic to consume messages it is
* subscribed to.
*
*/
public interface MessageHandler {
/**
* Consumes a message it is subscribed to and has been delivered to it.
*
* @param topic
* The topic name where the message came from.
* @param subscriberId
* ID of the subscriber.
* @param msg
* The message object to consume.
* @param callback
* Callback to invoke when the message consumption has been done.
* @param context
* Calling context that the Callback needs since this is done
* asynchronously.
*/
public void consume(ByteString topic, ByteString subscriberId, Message msg, Callback<Void> callback, Object context);
} | 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 | 0 |
* @version $Id$ | 0 |
import org.apache.http.nio.protocol.BasicAsyncRequestHandler;
import org.apache.http.nio.protocol.UriHttpAsyncRequestHandlerMapper;
UriHttpAsyncRequestHandlerMapper registry = new UriHttpAsyncRequestHandlerMapper();
UriHttpAsyncRequestHandlerMapper registry = new UriHttpAsyncRequestHandlerMapper();
UriHttpAsyncRequestHandlerMapper registry = new UriHttpAsyncRequestHandlerMapper();
UriHttpAsyncRequestHandlerMapper registry = new UriHttpAsyncRequestHandlerMapper(); | 0 |
public String hello();
public int add();
| 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 | 0 |
import org.apache.aurora.gen.RoleSummary;
import org.apache.aurora.gen.RoleSummaryResult;
public Response getRoleSummary() {
Set<RoleSummary> summaries = Sets.newHashSet();
RoleSummary summary = new RoleSummary();
summaries.add(summary);
.setResult(Result.roleSummaryResult(new RoleSummaryResult(summaries))); | 0 |
import com.twitter.common.stats.StatsProvider;
import org.apache.aurora.scheduler.async.AsyncModule;
import org.apache.aurora.scheduler.testing.FakeStatsProvider;
new AsyncModule(),
bind(StatsProvider.class).toInstance(new FakeStatsProvider()); | 1 |
/*
* Copyright 1999-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by 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.typeimpl;
/**
* A {@link org.apache.cocoon.forms.datatype.Datatype Datatype} implementation
* for double numbers (backed by the java.lang.Double class).
*
* @version $Id$
*/
public class DoubleType extends AbstractDatatype {
public Class getTypeClass() {
return Double.class;
}
public String getDescriptiveName() {
return "double";
}
} | 0 |
private String m_id;
m_id = repository + ":" + path + "/" + name;
public String getID() {
return m_id;
}
put(Resource.ID, getID()); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/MapUtils.java,v 1.25 2003/06/20 07:50:21 scolebourne Exp $
* <li>{@link #transformedSortedMap(SortedMap, Transformer, Transformer)}
* <li>{@link #typedSortedMap(SortedMap, Class, Class)}
* @version $Revision: 1.25 $ $Date: 2003/06/20 07:50:21 $
* @author Janek Bogucki | 0 |
* Implements a response intercepter that logs the upload id if the upload id header exists and it
* is the first request (does not have upload_id parameter in the request). Only logs if debug level
* is enabled. | 1 |
* Copyright 2006-2010 The Apache Software Foundation.
import javax.xml.crypto.dsig.dom.DOMValidateContext;
DOMValidateContext vc = validator.getValidateContext
(file, new KeySelectors.RawX509KeySelector());
vc.setProperty("javax.xml.crypto.dsig.cacheReference", Boolean.TRUE);
boolean coreValidity = validator.validate(vc);
DOMValidateContext vc = validator.getValidateContext
(file, new KeySelectors.RawX509KeySelector());
vc.setProperty("javax.xml.crypto.dsig.cacheReference", Boolean.TRUE);
boolean coreValidity = validator.validate(vc); | 0 |
PCollection<Long> longs = p.apply("mkLines", GenerateSequence.from(0).to(count));
p.apply("mkOtherLines", GenerateSequence.from(0).to(count))
p.apply("VarLengthLongs", GenerateSequence.from(0).to(5)).setCoder(VarLongCoder.of()); | 0 |
LOG.info("Starting servlet context destroy");
//stop services
stopServices();
super.contextDestroyed(servletContextEvent);
LOG.info("Stopping services");
} | 0 |
return parserError("assignment", getDetail()); | 0 |
import org.apache.felix.dm.annotation.api.ServiceDependency; | 0 |
.onResultOf(IJobInstanceUpdateEvent::getTimestampMs);
storage.write((NoResult.Quiet) storeProvider ->
saveJobUpdate(storeProvider.getJobUpdateStore(), update, ROLLING_FORWARD));
storage.write((NoResult.Quiet) storeProvider ->
storage.write((NoResult.Quiet) storeProvider ->
storage.write((NoResult.Quiet) storeProvider ->
storage.write((NoResult.Quiet) storeProvider ->
saveJobUpdate(storeProvider.getJobUpdateStore(), update, ROLLING_FORWARD));
private void saveJobUpdate(
store.saveJobUpdate(update);
storage.write((NoResult.Quiet) storeProvider ->
saveJobUpdate(storeProvider.getJobUpdateStore(), update, ROLLING_FORWARD));
storage.write((NoResult.Quiet) storeProvider ->
saveJobUpdate(storeProvider.getJobUpdateStore(), inProgress, ROLLING_FORWARD)); | 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.apache.batik.dom.svg.SVGDOMImplementation;
import org.w3c.dom.DOMImplementation;
import org.w3c.dom.Document; | 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;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;
/**
* Handler object available to the view components used to allow
* the API framework to handle the request.
*/
public interface ViewResourceHandler {
/**
* Handle the API request.
*
* @param headers the headers
* @param ui the URI info
* @param resourceId the resource id; may be null for collection resources
*
* @return the response
*/
public Response handleRequest(HttpHeaders headers, UriInfo ui, String resourceId);
} | 0 |
import java.util.List;
import java.util.Map;
* @return A <u>snapshot</u> of the currently bound forwarded local ports
* as "pairs" of port + bound {@link SshdSocketAddress}
*/
List<Map.Entry<Integer, SshdSocketAddress>> getLocalForwardsBindings();
/**
* @return A <u>snapshot</u> of the currently bound forwarded remote ports
* as "pairs" of port + bound {@link SshdSocketAddress}
*/
List<Map.Entry<Integer, SshdSocketAddress>> getRemoteForwardsBindings();
/** | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.