Diff
stringlengths 5
2k
| FaultInducingLabel
int64 0
1
|
---|---|
import java.util.Objects;
this.buffer = Objects.requireNonNull(buffer, "No buffer provided");
Objects.requireNonNull(cause, "No cause specified"); | 0 |
package org.apache.felix.karaf.jaas.config; | 0 |
public AnnotationVisitor visitParameterAnnotation(int id,
String name, boolean visible) {
if (visible) {
AnnotationDescriptor ann = new AnnotationDescriptor(name, visible);
m_method.addParameterAnnotation(id, ann);
return ann;
}
return null;
}
public void visitAnnotation(MethodVisitor mv) {
* Methods allowing to recreate the visited (stored) parameter annotations
* into the destination method.
* This method recreate the annotations itself and any other
* attributes.
* @param id the paramter id
* @param mv the method visitor visiting the destination method.
*/
public void visitParameterAnnotation(int id, MethodVisitor mv) {
AnnotationVisitor av = mv.visitParameterAnnotation(id, m_name, m_visible);
for (int i = 0; i < m_simples.size(); i++) {
((SimpleAttribute) m_simples.get(i)).visit(av);
}
for (int i = 0; i < m_enums.size(); i++) {
((EnumAttribute) m_enums.get(i)).visit(av);
}
for (int i = 0; i < m_nested.size(); i++) {
((AnnotationDescriptor) m_nested.get(i)).visit(av);
}
for (int i = 0; i < m_arrays.size(); i++) {
((ArrayAttribute) m_arrays.get(i)).visit(av);
}
av.visitEnd();
}
/** | 0 |
* file path and automatically process the resources.
return initialize(new BufferedInputStream(new FileInputStream(fileName)));
* Initializes a <code>ValidatorResources</code> based on the <code>InputStream</code>
* and automatically process the resources.
ValidatorResources resources = new ValidatorResources();
initialize(resources, in);
return resources;
* Initializes the <code>ValidatorResources</code> based on the <code>InputStream</code>
* and automatically process the resources.
* @param resources Resources to initialize.
*/
public static void initialize(ValidatorResources resources, InputStream in)
initialize(resources, in, true);
* Initializes a <code>ValidatorResources</code> based on the <code>InputStream</code>
* and processes the resources based on the <code>boolean</code> passed in.
* @param resources Resources to initialize.
* @param process Whether or not to call process on <code>ValidatorResources</code>.
public static void initialize(ValidatorResources resources, InputStream in, boolean process)
digester.setDebug(1);
digester.addCallMethod("form-validation/global/validator/javascript",
"setJavascript", 0);
System.out.println("ValidatorResourcesInitializer::initialize - SAXException: " + e.getMessage());
if (process) {
resources.process();
}
| 0 |
@Override
public void dump( DataOutputStream out ) throws IOException {
@Override
public final void setIndex( int index ) {
@Override
protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
int nameIndex = ((org.apache.bcel.classfile.ConstantClass) c).getNameIndex();
c = cpg.getConstantPool().getConstant(nameIndex);
return new ObjectType(((org.apache.bcel.classfile.ConstantUtf8) c).getBytes());
@Override
public Type getType( ConstantPoolGen cpg ) {
@Override
public void accept( Visitor v ) { | 0 |
import static org.junit.Assert.assertNotEquals;
public void testInvokesSplitWithDefaultNumSplitsTooLarge() throws Exception {
UnboundedSource<Long, ?> unboundedCountingSource =
new BoundedToUnboundedSourceAdapter<Long>(CountingSource.upTo(1));
PipelineOptions options = PipelineOptionsFactory.create();
List<?> splits = unboundedCountingSource.split(100, options);
assertEquals(1, splits.size());
assertNotEquals(splits.get(0), unboundedCountingSource);
}
@Test | 0 |
Method m = BlueprintService.getClass().getMethod("getBlueprint", String.class, HttpHeaders.class, UriInfo.class, String.class);
Object[] args = new Object[] {null, getHttpHeaders(), getUriInfo(), "blueprintName"};
m = BlueprintService.getClass().getMethod("getBlueprints", String.class, HttpHeaders.class, UriInfo.class);
args = new Object[] {null, getHttpHeaders(), getUriInfo()}; | 0 |
private static final String DEFAULT_DATE_FORMAT
* This constructor allows the creation of an OS2FTPEntryParser object
* @param config The {@link FTPClientConfig configuration} object used to | 0 |
* Closes all pools associated with this class.
* Implements ObjectFactory to create an instance of SharedPoolDataSource
* Sets some properties saved within a Reference | 0 |
public Amount<Long, Time> get() {
return Amount.of((long) minHoldTimeMs + random.nextInt(maxJitterWindowMs), Time.MILLISECONDS); | 0 |
if (this.debugEnabled) {
SystemLogger.debug(msg);
}
if (this.debugEnabled) {
SystemLogger.debug(format(msg, arg0, arg1));
}
// Classify all info messages as debug messages.
// Jetty uses way to much verbose info messages.
if (this.debugEnabled) {
SystemLogger.info(format(msg, arg0, arg1));
} | 0 |
"org.apache.felix.scr.integration.components.circularFactory," + | 0 |
import org.apache.felix.ipojo.plugin.IPojoPluginConfiguration;
IPojoPluginConfiguration.getLogger().log(Level.INFO, "End of the XML parsing, " + m_elements.length + " primary elements found");
IPojoPluginConfiguration.getLogger().log(Level.SEVERE, "Parse error when ending an element : " + qName + " [" + namespaceURI + "]");
IPojoPluginConfiguration.getLogger().log(Level.INFO, "Start of the XML parsing");
IPojoPluginConfiguration.getLogger().log(Level.INFO, "An XML tag was openend : " + localName + " [" + namespaceURI + "]"); | 0 |
if (!update && isRegistered(eDef.name)) {
if (!update && isRegistered(sDef.typeName)) {
if (!update && isRegistered(traitDef.typeName)) {
if (!update && isRegistered(classDef.typeName)) {
@Override
public boolean isRegistered(String typeName) throws AtlasException {
return transientTypes.containsKey(typeName) || TypeSystem.this.isRegistered(typeName);
}
| 0 |
= "yy/MM/dd HH:mm:ss"; //01/11/09 12:30:24
private static final String REGEX =
String datestr = group(3)+" "+group(4);
// intentionally do nothing | 0 |
import org.apache.beam.sdk.extensions.sql.BeamSqlCli;
import org.apache.beam.sdk.extensions.sql.BeamSqlTable; | 0 |
import java.security.NoSuchAlgorithmException;
if (provider == null) {
provider = getProvider("KeyInfoFactory", mechanismType);
}
Provider.Service ps = provider.getService("KeyInfoFactory",
mechanismType);
if (ps == null) {
throw new NoSuchMechanismException("Cannot find " + mechanismType +
" mechanism type");
KeyInfoFactory fac = (KeyInfoFactory)ps.newInstance(null);
fac.mechanismType = mechanismType;
fac.provider = provider;
return fac;
} catch (NoSuchAlgorithmException nsae) {
throw new NoSuchMechanismException("Cannot find " + mechanismType +
" mechanism type", nsae);
}
private static Provider getProvider(String engine, String mech) {
Provider[] providers = Security.getProviders(engine + "." + mech);
if (providers == null) {
throw new NoSuchMechanismException("Mechanism type " + mech +
" not available");
}
return providers[0]; | 0 |
"sumInteger", VarIntCoder.of(), Sum.ofIntegers()); | 0 |
import javax.xml.parsers.DocumentBuilder;
private DocumentBuilder db;
db = XMLUtils.createDocumentBuilder(false);
Document doc = db.newDocument(); | 0 |
// prevent JPA errors when -1 is passed in by accident
int offset = request.Pagination.getOffset();
if (offset < 0) {
offset = 0;
}
typedQuery.setFirstResult(offset); | 0 |
/* Generated By:JJTree: Do not edit this line. ASTBitwiseAndNode.java */
package org.apache.commons.jexl.parser;
public class ASTBitwiseAndNode extends SimpleNode {
public ASTBitwiseAndNode(int id) {
super(id);
}
public ASTBitwiseAndNode(Parser p, int id) {
super(p, id);
}
/** Accept the visitor. **/
public Object jjtAccept(ParserVisitor visitor, Object data) {
return visitor.visit(this, data);
}
} | 0 |
Set<String> servicesWithUpdatedConfigs = new HashSet<>();
boolean configsChanged = false;
if (configsChanged) {
servicesWithUpdatedConfigs.add(serviceName);
}
if (!servicesWithUpdatedConfigs.isEmpty()) {
m_configHelperProvider.get().updateAgentConfigs(Collections.singletonMap(cluster.getClusterName(),
servicesWithUpdatedConfigs)); | 0 |
import org.apache.beam.runners.core.construction.ReplacementOutputs; | 0 |
ancestorSelector = ancestor;
simpleSelector = simple;
return ancestorSelector;
return simpleSelector; | 1 |
package org.apache.beam.learning.katas.triggers.windowaccummode;
| 0 |
InstructionHandle ih = super.getTarget(); | 0 |
// if they supplied a property and we cannot load it, then fail hard
VolumeChooser chooser1;
try {
chooser1 = Property.createInstanceFromPropertyName(conf, Property.GENERAL_VOLUME_CHOOSER, VolumeChooser.class, null);
} catch (NullPointerException npe) {
chooser1 = null;
// null chooser handled below
}
if (chooser1 == null) {
throw new RuntimeException("Failed to load volume chooser specified by " + Property.GENERAL_VOLUME_CHOOSER);
}
chooser = chooser1;
path = "/" + tableId.canonicalID() + path;
final String choice;
choice = chooser.choose(env, options);
// we may want to go with random if they chooser was not overridden
String msg = "The configured volume chooser, '" + chooser.getClass() + "', or one of its delegates returned a volume not in the set of options provided";
throw new RuntimeException(msg);
| 0 |
import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.with;
import org.apache.felix.ipojo.tinybundles.BundleAsiPOJO;
import org.ops4j.pax.swissbox.tinybundles.core.TinyBundles;
.groupId( "org.ops4j.pax.swissbox" )
.artifactId( "pax-swissbox-tinybundles" )
.version(asInProject()), | 0 |
/**
* Copyright 2013 Apache Software Foundation | 0 |
*
*
*
*
*
*
* | 0 |
* Signals that an HTTP exception has occurred.
public class HttpException extends Exception {
public HttpException(final String message) {
public HttpException(final String message, final Throwable cause) {
super(message, cause); | 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.template.script;
public abstract class AbstractToken implements Token {
protected int start;
protected int end;
public int getStart() {
return start;
}
public void setStart(int start) {
this.start = start;
}
public int getEnd() {
return end;
}
public void setEnd(int end) {
this.end = end;
}
}
| 0 |
* @throws TableNotFoundException
public void delete(String namespace) throws AccumuloException, AccumuloSecurityException, TableNamespaceNotFoundException, TableNamespaceNotEmptyException,
TableNotFoundException;
* @throws TableNotFoundException
* Sets a property on a table namespace which applies to all tables in the namespace. Note that it may take a short period of time (a second) to propagate the
* change everywhere.
* if the table namespace does not exist
* if the table namespace does not exist
* if the table namespace does not exist
* thrown if the user does not have the ability to set properties on the table namespace | 0 |
import org.apache.hc.core5.annotation.Contract;
import org.apache.hc.core5.annotation.ThreadingBehavior;
@Contract(threading = ThreadingBehavior.SAFE) | 0 |
@Override
public ILock apply(Storage.MutableStoreProvider storeProvider)
@Override
public void execute(MutableStoreProvider storeProvider) {
@Override
public Optional<ILock> apply(StoreProvider storeProvider) { | 0 |
createKeytab(kdc, kdcWorkDir, "zookeeper", "dgi.keytab"); | 0 |
package org.apache.ambari.metrics.adservice.prototype.methods; | 0 |
* @param cursor the parser cursor containing the current position and
* the bounds within the buffer for the parsing operation
ProtocolVersion parseProtocolVersion(
CharArrayBuffer buffer,
ParserCursor cursor) throws ParseException;
* @param cursor the cursor at which to check for a protocol version, or
boolean hasProtocolVersion(
CharArrayBuffer buffer,
ParserCursor cursor);
* @param cursor the parser cursor containing the current position and
* the bounds within the buffer for the parsing operation
RequestLine parseRequestLine(
CharArrayBuffer buffer,
ParserCursor cursor) throws ParseException;
* @param cursor the parser cursor containing the current position and
* the bounds within the buffer for the parsing operation
StatusLine parseStatusLine(
CharArrayBuffer buffer,
ParserCursor cursor) throws ParseException; | 0 |
package org.apache.felix.connect; | 0 |
/** Factory that creates a {@link BeamCalciteSchema}. */
private BeamCalciteSchemaFactory() {}
public Schema create(SchemaPlus parentSchema, String name, Map<String, Object> operand) { | 0 |
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument;
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkNotNull;
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState;
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Strings.isNullOrEmpty;
import org.apache.beam.vendor.grpc.v1p21p0.com.google.protobuf.TextFormat;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Supplier;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Iterables; | 0 |
* 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.
* @version $Revision: 1.8 $ $Date: 2003/10/13 08:43:51 $ | 0 |
public static final String CONNECTION_MANAGER_FACTORY_CLASS_NAME = "http.connection-manager.factory-class-name";
/**
* Defines the factory to create a default {@link org.apache.http.conn.ClientConnectionManager}.
* <p>
* This parameters expects a value of type {@link org.apache.http.conn.ClientConnectionManagerFactory}.
* </p>
*/
public static final String CONNECTION_MANAGER_FACTORY = "http.connection-manager.factory-object";
| 0 |
import org.xml.sax.SAXException;
| 0 |
* @author <A HREF="mailto:[email protected]">M. Dahm</A> | 0 |
if (result.getNode() == currentStructure.getRoot())
{
// the whole model is to be cleared
clear();
return;
} | 0 |
public void testSpaces()
{
String value = "Hello World";
String listString = BLANK + value + BLANK + "," + BLANK + value + BLANK + "," +value;
String[] list = AD.splitList(listString);
assertNotNull(list);
assertEquals(3, list.length);
assertEquals(value, list[0]);
assertEquals(value, list[1]);
assertEquals(value, list[2]);
}
| 0 |
import org.apache.accumulo.core.client.AccumuloClient;
final AccumuloClient c = getClient(); | 0 |
* @deprecated This block is deprecated and will be removed in future versions. | 0 |
throw new IllegalArgumentException( "invalid comparison: " + v1.getClass().getName()
+ " and " + v2.getClass().getName() ); | 0 |
i.remove();
cleanupImplementationObject( componentContext.getInstance() );
serviceContext = serviceContexts.get( service );
serviceContexts.remove( service );
cleanupImplementationObject( service ); | 0 |
case FINISHED:
break;
case NEED_TASK:
break;
case FINISHED:
break; | 0 |
@AspectService(ranking = 10, factory=ServiceProviderAspectFactory.class, factoryMethod="createAspect") | 0 |
import org.apache.beam.sdk.values.BeamRecordType;
public MockedBoundedTable(BeamRecordType beamRowType) {
super(beamRowType);
public static MockedBoundedTable of(final BeamRecordType type) { | 0 |
/*
* $Header: /cvshome/build/ee.foundation/src/java/net/ContentHandler.java,v 1.6 2006/03/14 01:20:23 hargrave Exp $
*
* (C) Copyright 2001 Sun Microsystems, Inc.
* Copyright (c) OSGi Alliance (2001, 2005). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use 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 java.net;
public abstract class ContentHandler {
public ContentHandler() { }
public abstract java.lang.Object getContent(java.net.URLConnection var0) throws java.io.IOException;
public java.lang.Object getContent(java.net.URLConnection var0, java.lang.Class[] var1) throws java.io.IOException { return null; }
}
| 0 |
import org.apache.commons.lang.StringUtils;
Assert.assertTrue(StringUtils.isBlank(check.getFailReason()));
Assert.assertTrue(StringUtils.isBlank(check.getFailReason()));
Assert.assertTrue(StringUtils.isNotBlank(check.getFailReason()));
Assert.assertEquals("Auto Start must be disabled before performing an Upgrade. To disable Auto Start, navigate to " +
"Admin > Service Auto Start. Turn the toggle switch off to Disabled and hit Save.", check.getFailReason());
| 0 |
* @version CVS $Id: ParanoidCocoonServlet.java,v 1.8 2003/08/07 06:26:24 cziegeler Exp $
if ( this.servlet != null ) {
final ClassLoader old = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(this.classloader);
this.servlet.destroy();
} finally {
Thread.currentThread().setContextClassLoader(old);
} | 0 |
clusters.mapAndPublishHostsToCluster(hostNames, clusterName); | 1 |
import org.apache.sshd.util.test.NoIoTestCase;
import org.junit.experimental.categories.Category;
@Category({ NoIoTestCase.class }) | 0 |
import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy; | 1 |
package org.apache.commons.net.examples.util; | 0 |
*
*
protected volatile GenericObjectPool<PoolableConnection> connectionPool = null;
GenericObjectPool<PoolableConnection> gop;
gop = new GenericObjectPool<>(factory, new GenericObjectPoolConfig(),
gop = new GenericObjectPool<>(factory);
PoolingDataSource<PoolableConnection> pds = new PoolingDataSource<>(connectionPool); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/test/org/apache/commons/beanutils/BeanWithInnerBean.java,v 1.2 2003/10/05 13:33:29 rdonkin Exp $
* $Revision: 1.2 $
* $Date: 2003/10/05 13:33:29 $
* ====================================================================
*
* Copyright (c) 2001-2003 The Apache Software Foundation. All rights
* notice, this list of conditions and the following disclaimer.
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgement:
* "This product includes software developed by the
* 4. The names "Apache", "The Jakarta Project", "Commons", and "Apache Software
* from this software without prior written permission. For written
* 5. Products derived from this software may not be called "Apache",
* "Apache" nor may "Apache" appear in their names without prior
* written permission of the Apache Software Foundation.
*/ | 0 |
public boolean apply(String tableName) {
public boolean apply(String tableId) {
public boolean apply(String tableName) {
public boolean apply(String tableName) {
public boolean apply(String tableName) {
public boolean apply(String tableId) { | 0 |
if(LOG.isDebugEnabled()) {
LOG.debug("Config staleness for " +
sch.getServiceComponentName() + " on host " + sch.getHostName() + " - " + stale);
}
if (!actualTags.get(CLUSTER_DEFAULT_TAG).equals(desiredTags.get(CLUSTER_DEFAULT_TAG))) {
// cluster level configs are already compared for staleness, now they match | 0 |
for (Attribute attribute : attributes) {
if (attribute instanceof Code) {
return (Code) attribute;
for (Attribute attribute : attributes) {
if (attribute instanceof ExceptionTable) {
return (ExceptionTable) attribute;
for (Attribute attribute : attributes) {
if (!((attribute instanceof Code) || (attribute instanceof ExceptionTable))) {
buf.append(" [").append(attribute.toString()).append("]"); | 0 |
/* ====================================================================
* Copyright (c) 2003-2004 The Apache Software Foundation. All rights
* @version $Revision: 1.3 $ $Date: 2004/01/14 21:34:34 $ | 0 |
protected static Map<String, Object> createCaseInsensitiveHashMap(int cols) { | 0 |
*
*
*
*
DomHelper.getLocation(treeModelElement), e);
DomHelper.getLocation(treeModelElement));
| 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 |
return Response.seeOther(URI.create("/apihelp/index.html")).build(); | 0 |
// these are functions to delay loading the Accumulo configuration unless we must
public static String getBaseDir() {
return ServerConfiguration.getSiteConfiguration().get(Property.INSTANCE_DFS_DIR);
}
public static String getTablesDir() {
return getBaseDir() + "/tables";
}
public static String getRecoveryDir() {
return getBaseDir() + "/recovery";
}
public static Path getInstanceIdLocation() {
return new Path(getBaseDir() + "/instance_id");
}
public static Path getDataVersionLocation() {
return new Path(getBaseDir() + "/version");
}
public static String getMetadataTableDir() {
return getTablesDir() + "/" + METADATA_TABLE_ID;
}
public static String getRootTabletDir() {
return getMetadataTableDir() + ZROOT_TABLET;
}
| 1 |
import org.apache.ambari.logfeeder.util.LogFeederUtil; | 0 |
import org.apache.aurora.common.base.Command;
import org.apache.aurora.common.quantity.Amount;
import org.apache.aurora.common.quantity.Time;
import org.apache.aurora.common.testing.easymock.EasyMockTest;
import org.apache.aurora.common.util.testing.FakeClock; | 0 |
* http://www.apache.org/licenses/LICENSE-2.0 | 0 |
this.type = type != null ? type : new StringType<>(); | 0 |
import java.util.Collections;
//CHECKSTYLE:OFF Not magic number
//CHECKSTYLE:ON | 0 |
Throwable cause = tte.getCause();
if (null != cause && cause instanceof UnknownHostException) { | 1 |
public TransformResult<T> finishBundle() throws Exception {
return StepTransformResult.<T>withHold(transform, BoundedWindow.TIMESTAMP_MIN_VALUE) | 0 |
for (int i = 0; i < 10; i++) { | 0 |
requestProducer, responseConsumer, callback, context, conn, this.httpprocessor);
context, conn, this.httpprocessor);
context, conn, this.httpprocessor);
this.context, conn, httpprocessor);
this.context, conn, httpprocessor); | 0 |
import org.apache.beam.runners.direct.CommittedResult.OutputType;
import java.util.EnumSet;
Iterables.isEmpty(bundles)
? EnumSet.noneOf(OutputType.class)
: EnumSet.of(OutputType.BUNDLE)); | 0 |
import org.apache.beam.sdk.state.Timer; | 0 |
/*
* Copyright 1999-2005 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.formmodel.library;
import org.apache.avalon.framework.CascadingException;
/**
* This exception is thrown when something specific to the library system goes wrong.
*
* @version $Id$
*/
public class LibraryException extends CascadingException {
public LibraryException(String message) {
super(message);
}
public LibraryException(String message, Exception e) {
super(message, e);
}
} | 0 |
import java.lang.reflect.Proxy;
import org.apache.http.client.methods.CloseableHttpResponse;
private final CloseableHttpResponse response;
final CloseableHttpResponse response) {
CloseableHttpResponse getReconstructedResponse() throws IOException {
return (CloseableHttpResponse) Proxy.newProxyInstance(
ResponseProxyHandler.class.getClassLoader(),
new Class<?>[] { CloseableHttpResponse.class },
new ResponseProxyHandler(reconstructed) {
public void close() throws IOException {
response.close();
}
}); | 0 |
* @version CVS $Id: ComposerAction.java,v 1.1 2004/05/24 12:37:52 cziegeler Exp $ | 0 |
import org.apache.accumulo.core.client.mapreduce.lib.impl.FileOutputConfigurator;
AccumuloConfiguration acuconf = FileOutputConfigurator.getAccumuloConfiguration(AccumuloFileOutputFormat.class, job1.getConfiguration());
acuconf = FileOutputConfigurator.getAccumuloConfiguration(AccumuloFileOutputFormat.class, job2.getConfiguration()); | 1 |
import org.apache.beam.runners.core.GroupByKeyViaGroupByKeyOnly; | 0 |
System.arraycopy(allNames, 0, names, 0, names.length); | 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 |
receiver.get(cold).output(kv);
receiver.get(hot).output(KV.of(KV.of(kv.getKey(), nonce), kv.getValue())); | 0 |
AtlasTypeUtil.createOptionalAttrDef("parameters", "map<string,string>"), | 0 |
.satisfies(
input -> {
// The final sums need not exist in the same pane, but must appear in the output
// PCollection
assertThat(input, hasItem(KV.of(blueTeam, 11)));
assertThat(input, hasItem(KV.of(redTeam, 27)));
return null;
}); | 0 |
public static <K, V> OrderedMapIterator<K, V> unmodifiableOrderedMapIterator(OrderedMapIterator<K, V> iterator) { | 0 |
ROOT, META, NORMAL | 0 |
Reader<String> reader = ReaderFactory.create(null, source, null, null, null);
Reader<String> reader = ReaderFactory.create(null, source, null, null, null); | 0 |
for (Pass3aVerifier pv : p3avs.values()) {
for (Pass3bVerifier pv : p3bvs.values()) { | 0 |
* limitations under the License. | 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.orm;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Any method or class marked with annotation treated as requiring Jpa session.
* Marking method with {@code @RequiresSession} will start session before method call and close after.
* If session already in progress it will be ignored.
*/
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Inherited
public @interface RequiresSession {
} | 0 |
* Encode in Base64 the given <code>{@link BigInteger}</code>.
* Returns a byte-array representation of a <code>{@link BigInteger}</code>.
* <b>N.B.:</B> <code>{@link BigInteger}</code>'s toByteArray
* @param binaryData <code>byte[]</code> to be base64 encoded | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.