Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
* Service property to mark a Listener service as a Whiteboard service. * Listener services with this property set to the string value "true" will * be treated as Whiteboard services opting in to being handled by the Http * Whiteboard implementation. If the value "false" is specified, the service * is opting o...
0
AbstractGraphicsNodeBridge bridge = (AbstractGraphicsNodeBridge) BridgeContext.getSVGContext(paintedElement);
0
import java.util.ArrayList; import java.util.List; assertEquals("az", expand("${map[a1][1,-0]}")); assertEquals("baz bar foo", expand("\"${map[*]}\"")); // TODO: test subscripts on array resulting in a single element public void testQuotes() throws Exception { vars.clear(); ...
0
package org.apache.cocoon.spring.impl;
0
protected CommandProcessorImpl newProcessor(ThreadIO tio) { return new CommandProcessorImpl(threadio); } processor = newProcessor(threadio);
0
public void testHashCodeEqual() throws Exception { conn2.close(); public void testHashCodeNotEqual() throws Exception { conn2.close();
0
import org.w3c.dom.views.AbstractView;
0
return Boolean.valueOf(rs.getBoolean(index));
0
throw (SQLException) new SQLException("Cannot borrow connection from pool").initCause(e); throw (SQLException) new SQLException("Cannot borrow connection from pool").initCause(e);
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Maps;
0
import java.util.Collections; import org.apache.sshd.common.util.GenericUtils; protected TestPath create(String root, List<String> names) { TestPath(TestFileSystem fileSystem, String root, List<String> names) { protected TestPath create(String root, List<String> names) { private List<Str...
0
* @version $Revision: 1.1 $ $Date: 2003/02/17 09:22:15 $ public class ZipFileProvider
0
public interface Tree extends Comparable<Tree>{
0
String content = XMLUtils.getFullTextChildrenFromNode(dvElem);
0
throw new SCRDescriptorException("Referenced field for " + name + " has no values for a property name.", tag); throw new SCRDescriptorException("Referenced field " + name + " has more than one value for a property name.", tag); throw new SCRDescriptorException("Proper...
0
package org.apache.accumulo.server.test.randomwalk.bulk; import java.util.Random; import java.util.SortedSet; import java.util.TreeSet; import org.apache.accumulo.server.test.randomwalk.State; import org.apache.hadoop.io.Text; public class Split extends BulkTest { @Override protected void runLater(State st...
1
import org.apache.hc.core5.http.nio.codecs.AbstractContentEncoder;
0
float lastH = (float)(lastBounds.getHeight()); // System.out.println("LastMetrics.vadv: " + lastMetrics.getVerticalAdvance());
0
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not...
0
* Default implementation of a strategy deciding about connection re-use. *
0
package org.apache.bcel.generic; super(org.apache.bcel.Const.IFGT, target);
1
EntityUtils.consume(entity);
0
private HashMap fontFamilyMap;
0
public ReadableState<PaneInfo> getNextPaneInfo( ReduceFn<?, ?, ?, ?>.Context context, final boolean isFinal) { return describePane(key, windowMaxTimestamp, previousPane, isFinal); private <W> PaneInfo describePane( Object key, Instant windowMaxTimestamp, PaneInfo previousPane, boolean isFinal) {...
0
* map values sanitized and applied to their respective struct fields. * map values sanitized and applied to their respective struct fields.
0
* @param baseURI public DEREncodedKeyValue(Element element, String baseURI) throws XMLSecurityException { super(element, baseURI);
0
import java.nio.charset.StandardCharsets; private static CommandInfo makeExecutorCommand() { ImmutableList.of(THERMOS_EXECUTOR_PATH.get()).stream(), THERMOS_EXECUTOR_RESOURCES.get().stream()); .setValue("${MESOS_SANDBOX=.}/" + uriBasename(THERMOS_EXECUTOR_PATH.get()) + " " + Option...
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 ...
0
return getInputTableConfigs(implementingClass, conf, getInputTableName(implementingClass, conf)); } /** * Returns all {@link InputTableConfig} objects associated with this job. * * @param implementingClass * the class whose name will be used as a prefix for the property configuration key ...
0
package org.apache.beam.sdk.state;
0
import java.io.IOException; /** * Normalizes the path by removing '.', '..' and double separators (e.g. '//') * @param path * @param separator * @return normalized path * @throws IOException when the path is invalid (e.g. '/first/../..') */ public static String normalizePath(S...
0
//do nothing
0
* Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may...
0
* @version $Revision$
1
import org.apache.cocoon.core.CoreResourceNotFoundException; throw new CoreResourceNotFoundException("Cannot get delegate handler", e);
0
* Copyright 2004-2005 The Apache Software Foundation. public class ServletContextConfiguration extends BaseWebConfiguration /** Stores the wrapped servlet context.*/
0
LogManager logManager = new LogManager(log, Amount.of(1, Data.GB), false, shutdownRegistry);
0
public void ensureAvailable(int reqLen) throws BufferException { int availLen = available(); if (availLen < reqLen) { throw new BufferException("Underflow: requested=" + reqLen + ", available=" + availLen);
0
import org.apache.cocoon.components.transformation.helpers.FormValidatorHelper; * @version CVS $Id: SimpleFormTransformer.java,v 1.12 2004/03/10 12:58:13 stephan Exp $ this.validationResults = FormValidatorHelper.getResults(this.objectModel); FormValidatorHelper.getParamResult(this.obje...
0
private ObjectName OBJECT_NAME = null;
0
bd.addPropertyReference("bundleContext", "bundleContext");
0
* @see <a href="https://docs.oracle.com/javase/9/docs/specs/security/standard-names.html#messagedigest-algorithms"> * @see <a href="https://docs.oracle.com/javase/10/docs/specs/security/standard-names.html#messagedigest-algorithms"> * Java 10 Cryptography Architecture Standard Algorithm Name Documentation</a> ...
0
public void testAvailable() throws IOException { String s = "5\r\n12345\r\n0\r\n"; ChunkedInputStream in = new ChunkedInputStream( new SessionInputBufferMockup( EncodingUtils.getBytes(s, CONTENT_CHARSET))); assertEquals(0, in.available()); ...
0
public void testOption() throws Exception { Map<String, Object> vars = new HashMap<String, Object>(); JexlEvalContext context = new JexlEvalContext(vars); JexlScript script = JEXL.createScript("0 + '1.2' "); Object result; context.setStrictArithmetic(true); result = ...
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 ...
0
Map<String, String> hostAttributes = new HashMap<>(); Map<String, String> hostAttributes = new HashMap<>(); Map<String, String> hostAttributes = new HashMap<>(); Map<String, String> hostAttributes = new HashMap<>(); Map<String, String> commandParams = new HashMap<>(); Map<String, String> command...
1
import java.io.*; import java.util.*; import java.util.regex.*; import aQute.bnd.service.*; import aQute.lib.osgi.*; import aQute.libg.version.*;
0
if (entry.getKey().compareRow(rowName) == 0 && MetadataTable.TIME_COLUMN.hasColumns(entry.getKey())) { ScannerImpl mdScanner = new ScannerImpl(HdfsZooInstance.getInstance(), SecurityConstants.getSystemCredentials(), MetadataTable.ID, Authorizations.EMPTY); mdScanner.fetchColumnFamily(MetadataTable.D...
0
for (Object area : areas) { Shape s = (Shape) area; int x0 = (int) Math.floor(r2d.getX()); int y0 = (int) Math.floor(r2d.getY()); int x1 = (int) Math.ceil(r2d.getX() + r2d.getWidth()); int y1 = (int) Math.ceil(r2d.getY() + r2d.getHeight()); ...
0
final ObjectOutputStream outStream = new ObjectOutputStream(outbuffer); outStream.writeObject(orig); outStream.close(); final ByteArrayInputStream inBuffer = new ByteArrayInputStream(raw); final ObjectInputStream inStream = new ObjectInputStream(inBuffer); final HeaderGro...
0
setName(name); public void setName(String name) { this.name = name; }
0
private static final Map<Resource.Type, String> keyPropertyIds = ImmutableMap.<Resource.Type, String>builder() private static final Set<String> propertyIds = Sets.newHashSet(
0
* @version CVS $Id: AbstractParentProcessingNode.java,v 1.2 2004/01/21 10:46:43 antonio Exp $
0
new FileBasedSink<Object, Void, Object>( public WriteOperation<Void, Object> createWriteOperation() { });
0
public byte getByte(int idx) { return (Byte) getFieldValue(idx); }
0
// FIXME - change this later on to MODEL_POOLED info.setModel(ComponentInfo.MODEL_NON_THREAD_SAFE_POOLED); if( info.getModel() == ComponentInfo.MODEL_NON_THREAD_SAFE_POOLED) { } else if( info.getModel() == ComponentInfo.MODEL_POOLED ) { handler = new PoolableComponen...
0
import org.apache.beam.sdk.extensions.sql.QueryTransform; query = QueryTransform.withQueryString(queryString);
0
NestedPropertiesBuilder nestedPropertiesBuilder = this.providersRegistry.getProvider(this.keyPattern, this.namespaceURI, NestedPropertiesBuilder.class); SetPropertiesBuilder setPropertiesBuilder = this.providersRegistry.getProvider(this.keyPattern, this.namespaceURI, SetPropertie...
0
Builders.OutputValues<K, Long>, OptionalMethodBuilder<WindowByBuilder<InputT, K>, OutputBuilder<InputT, K, ?>> { @Override public OutputBuilder<InputT, K, ?> applyIf(boolean cond, UnaryFunction<WindowByBuilder<InputT, K>, OutputBuilder<InputT, K, ?>> applyWhenConditionHolds) { ...
0
closeQuietly(rs); closeQuietly(stmt); if (closeConn) { close(conn);
0
public final String getAlgorithm() { return algorithm; } @Override @Override public String toString() { return getClass().getSimpleName() + "[" + getAlgorithm() + "] - " + getBlockSize() + " bits"; }
0
LoggingHttp1StreamListener.INSTANCE);
0
* Allows reading log entries from a given {@code position}. To read all log entries, pass * @param position the position to read from * @return an iterator that ranges from the entry from the given {@code position} to the last Iterator<Entry> readFrom(Position position) * Removes all log entries...
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 ...
0
public void resolve(QuickLinksConfigurationModule parent, Map<String, StackModule> allStacks, Map<String, ServiceModule> commonServices, Map<String, ExtensionModule> allExtensions) throws AmbariException {
0
public final class UniquePredicate<T> implements Predicate<T>, Serializable { private final Set<T> iSet = new HashSet<T>(); * public static <E> Predicate<E> getInstance() { return new UniquePredicate<E>(); * public boolean evaluate(T object) {
0
import java.util.ArrayList; import java.util.List;
0
* @version $Id$
0
if (clientConfigFile == null) clientConfig = ClientConfiguration.loadDefault(); else clientConfig = new ClientConfiguration(new PropertiesConfiguration(clientConfigFile));
0
long traceMask = ZooTrace.CLIENT_REQUEST_TRACE_MASK; traceMask = ZooTrace.SERVER_PING_TRACE_MASK; ZooTrace.logRequest(LOG, traceMask, 'E', request, "");
0
* http://www.apache.org/licenses/LICENSE-2.0
0
* @version CVS $Id: DefaultEventRegistryImpl.java,v 1.10 2004/02/27 17:27:04 unico Exp $ throw new ContextException("Could not obtain persistent file. " + "The cache event registry cannot be " + "used inside an unexpanded WAR file."); protected final void createBlankCach...
0
* Copyright 2002-2005 The Apache Software Foundation.
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.base.Optional; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList;
0
import org.junit.After; import org.junit.Before; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; static class UserException extends RuntimeException { } pipeline.apply(Create.of("a")).apply(ParDo.of(new DoFn<String, String>() { throw new UserException(); } ...
0
import org.apache.cocoon.deployer.util.FileUtils; private boolean skipRootDirectory; public SingleFileDeployer(final String outputDir, final boolean skipRootDirectory) { this.skipRootDirectory = skipRootDirectory; public SingleFileDeployer(final String outputDir) { this(outputDir, false); } protected String...
0
/* $Id: TextLabel2RuleInfo.java,v 1.5 2004/05/07 01:30:00 skitching Exp $ *
0
import org.apache.beam.sdk.util.state.InMemoryTimerInternals; import org.apache.beam.sdk.util.state.TestInMemoryStateInternals; import org.apache.beam.sdk.util.state.TimerCallback; new TestInMemoryStateInternals<Object>(null /* key */); private final InMemoryTimerInternals timerInternals = new InMemoryTimerInte...
0
import java.util.HashMap; HashMap<Long,QuorumServer> peers = new HashMap<Long,QuorumServer>(); peers.put(Long.valueOf(1), new QuorumServer(1, new InetSocketAddress("127.0.0.1", 3181))); peers.put(Long.valueOf(2), new QuorumServer(2, new InetSocketAddress("127.0.0.1", 3182))); peers.put(L...
0
import cz.seznam.euphoria.core.client.util.Pair;
0
// Verify that the authenticated user has authorization to change auto-start states for services AuthorizationHelper.verifyAuthorization(ResourceType.CLUSTER, getClusterResourceId(clusterName), EnumSet.of(RoleAuthorization.SERVICE_START_STOP));
0
StateInternals stateInternals = stateInternalsFactory.stateInternalsForKey(key);
0
import org.apache.accumulo.core.client.impl.Table; private final Table.ID tableId; public TableConfiguration(Instance instance, Table.ID tableId, NamespaceConfiguration parent) { PropCacheKey key = new PropCacheKey(instance.getInstanceID(), tableId.canonicalID()); public Table.ID getTableId() {
1
// Perform initial sanity check: assertTrue("Expected some of the threads to fail",failed > 0);
0
* Do we want a "XInclude aware" parser. */ protected boolean xincludeAware = false; /** factory.setXIncludeAware(xincludeAware); /** * Return the XInclude-aware flag for parsers we create. XInclude * functionality additionally requires namespace-awareness. * * @r...
0
interface BackToLinkedRuleBuilder {
0
* <p> * This class is Serializable from Commons Collections 3.1. * @version $Revision: 1.6 $ $Date: 2004/06/02 21:56:19 $
0
import org.apache.commons.configuration.SynchronizerTestImpl.Methods;
0
import javax.servlet.http.HttpSession; private HttpSession session;
0
* @return <code>true</code> if this {@link MutableDynaClass} cannot be changed * otherwise <code>false</code> * @param restricted <code>true</code> if this {@link MutableDynaClass} cannot * be changed otherwise <code>false</code> * @return The dyna property for the specified name
0
if (this.deleteRowBinding != null) { this.deleteRowBinding.saveFormToModel(frmModel, rowContext); } else { getLogger().warn("RepeaterBinding has detected rows to delete, " + "but misses the <on-delete-row...
0
public Object fromV1ToV2(Object v1Obj, AtlasType type) throws AtlasBaseException { Object ret = null; ret = new AtlasObjectId(id.getTypeName(), id._getId()); AtlasEntityWithAssociations ret1 = new AtlasEntityWithAssociations(entity.getTypeName(), super.fromV1ToV2(entityType,...
0
* @version CVS $Id: XSPModuleHelper.java,v 1.4 2003/05/17 06:02:41 jefft Exp $ throw new CascadingRuntimeException("Error accessing attribute '"+attr+"' from input module '"+name+"'. "+e.getMessage(), e);
0
* @version $Revision: 1.19 $ $Date: 2004/05/17 17:56:35 $ final DefaultFileReplicator replicator = createDefaultFileReplicator(); protected DefaultFileReplicator createDefaultFileReplicator() { return new DefaultFileReplicator(); }
0
* Returns an adapter to convert from {@link BackOff} to {@link * com.google.api.client.util.BackOff}.
1
package org.apache.felix.sigil.junit.server.impl;
0
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not...
0
props.put("instance.name","toto provider"); props3.put("instance.name","toto provider 2"); props2.put("instance.name","ff");
0
import java.util.Optional; storeProvider.getTaskStore().fetchTask(taskId).map(IScheduledTask::newBuilder)); .map(IJobConfiguration::newBuilder));
0
* Provides the highest level of abstraction for Encoders. * <p> * This is the sister interface of {@link Decoder}. Every implementation of Encoder provides this * common generic interface which allows a user to pass a generic Object to any Encoder implementation * in the codec package.
0