Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
import static com.google.common.base.Preconditions.checkArgument; checkArgument(impl != null, "impl is null");
0
class CacheEntryUpdater {
0
* @version $Id: SitemapComponentTestCase.java 55427 2004-10-24 11:38:37Z cziegeler $
0
private void expectLeaderShutdown() throws Exception { expectShutdown(); } private void expectShutdown() throws Exception { // Shutdown before leadership is taken (ex. in prepare). expectLeaderShutdown(); expectLeaderShutdown(); expectLeaderShutdown(); public void testStoragePrepareFails()...
0
Blueprint bp_return = response.getEntity(Blueprint.class);
0
this.interestOpsQueue = new ConcurrentLinkedQueue<>(); this.closedSessions = new ConcurrentLinkedQueue<>(); this.newChannels = new ConcurrentLinkedQueue<>();
0
PerformanceArea(String label, String warningParameter, int defaultWarningThreshold, String criticalParameter, int defaultCriticalThreshold) {
0
configureMetadataTable(context, MetadataTable.NAME);
0
* Returns an unmodifiable view of the expiration time -&gt; elements mapping.
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 * "Lice...
0
package org.apache.http.entity.mime.content; import org.apache.http.entity.mime.MIME;
0
factoryPid = DictionaryImpl.FACTORY_PID,
0
* * @return the minimum amount of time a statement may sit idle in the pool. }
0
* urlToDocs.apply(ParDo.of(new DoFn<KV<String, Iterable<Doc>>, R>() }{ * {@code @ProcessElement * }}})); * </pre>
0
new Object[] {(int) getNodeType(),
0
private boolean closing; this.channel.onClose(new Runnable() { public void run() { synchronized (messages) { closing = true; messages.notifyAll(); } } }); if (closing) { ...
0
JexlContext jc = JexlHelper.createContext(); jc.getVars().put("quuxClass", Quux.class); Expression create = ENGINE.createExpression("quux = new(quuxClass, 'xuuq', 100)"); Quux quux = (Quux) create.evaluate(jc); assertNotNull("quux is null", quux); Quux quux = ENGINE.newI...
0
import com.twitter.aurora.scheduler.base.JobKeys; .entity("<html>Usage: /mname/{role}/{env}/{job}/{shard}</html>") @Path("/{role}/{env}/{job}/{shard}/{forward:.+}") @PathParam("env") String env, return get(role, env, job, shardId, uriInfo, Optional.of(forward)); @Path("/{role}/{env}/{job}/{shard}/...
0
import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; import javax.ws.rs.GET; import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.Context; import javax.ws.rs.core...
0
* Copyright 2001-2005 The Apache Software Foundation
0
// Give initial values and reset the 'invoked' flag. prop.reset(); // Clear the invoked flag.
0
private static final Logger LOG = LoggerFactory.getLogger(ConfigureAction.class);
1
import org.apache.ambari.server.controller.internal.CalculatedStatus; import com.google.common.base.Optional; /** * @return true if all the tasks in the logical request are in completed state, false otherwise */ public boolean isFinished() { for (ShortTaskStatus ts : getRequestStatus().getTasks()) { ...
0
import org.apache.accumulo.core.clientImpl.ClientInfo; ClientInfo ci = getClientInfo(); AccumuloInputFormat.setConnectorInfo(job, ci.getPrincipal(), ci.getAuthenticationToken());
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/decorators/Attic/AbstractListDecorator.java,v 1.3 2003/05/07 11:20:21 scolebourne Exp $ * @version $Revision: 1.3 $ $Date: 2003/05/07 11:20:21 $ /** * Gets the list being...
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
import org.apache.sshd.common.channel.ChannelAsyncInputStream; import org.apache.sshd.common.channel.ChannelAsyncOutputStream; if (streaming == Streaming.Async) { asyncIn = new ChannelAsyncOutputStream(this, SshConstants.SSH_MSG_CHANNEL_DATA) { protected CloseFuture doCloseGracefully...
0
Element localFontElement = null; localFontElement = (Element)localGlyphElement.getParentNode(); = localFontElement.getElementsByTagNameNS localFontElement = (Element)document.importNode (refGlyphElement.getParentNode(), true); String glyphId = ...
0
public CopletInstance newInstance(CopletDefinition copletDefinition, String key) id = copletDefinition.getId() + '-' + idCounter; CopletInstance instance = new CopletInstance(id, copletDefinition); final CopletAdapter adapter = copletDefinition.getCopletType().getCopletAdapter(); ...
0
// TODO text-seek - see http://tools.ietf.org/wg/secsh/draft-ietf-secsh-filexfer/draft-ietf-secsh-filexfer-13.txt // TODO space-available - see http://tools.ietf.org/wg/secsh/draft-ietf-secsh-filexfer/draft-ietf-secsh-filexfer-09.txt // TODO home-directory - see http://tools.ietf.org/wg/secsh/dr...
0
* Geometry bounds for this node, not taking into account any of its * children rendering attributes into account */ protected Rectangle2D geometryBounds; /** public Rectangle2D getGeometryBounds(){ Rectangle2D b = null; if(geometryBounds == null){ Rectangle2D node...
0
import java.awt.Paint; import java.awt.Shape; import org.apache.batik.gvt.CompositeShapePainter; import org.apache.batik.gvt.FillShapePainter; import org.apache.batik.gvt.StrokeShapePainter; public abstract class SVGShapeElementBridge extends AbstractGraphicsNodeBridge { } case SVGCSSEngine.SHAPE_RENDE...
0
import static org.apache.beam.sdk.transforms.display.DisplayDataMatchers.hasDisplayItem; import static org.hamcrest.Matchers.hasSize; import static org.junit.Assert.assertThat; import org.apache.beam.sdk.transforms.display.DisplayData; @Test public void displayData() throws Exception { SpannerIO.Write write = ...
0
return SVG_FE_POINT_LIGHT_X_DEFAULT_VALUE; return SVG_FE_POINT_LIGHT_Y_DEFAULT_VALUE; return SVG_FE_POINT_LIGHT_Z_DEFAULT_VALUE; SVGAnimatedNumber result; if (xReference == null || (result = (SVGAnimatedNumber)xReference.get()) == n...
0
import java.io.OutputStream; XMLSignatureInput input, OutputStream os, Transform transformObject
0
responseFactory, reqistry, expectationVerifier, params);
0
package org.apache.commons.configuration; import org.apache.commons.lang.StringUtils; * * @author <a href="mailto:kelvint@apache.org">Kelvin Tan</a> * @author <a href="mailto:dlr@apache.org">Daniel Rall</a> * @version $Revision: 1.6 $, $Date: 2004/06/15 11:49:25 $ * Save the configuration if the automatic per...
0
LOG.warn( "Provided StorageLevel: {} is ignored for streams, using the default level: {}", this.dStream = dStream.map(CoderHelpers.toByteFunction(wc)).cache().map(CoderHelpers.fromByteFunction(wc));
1
import java.util.List; import org.apache.batik.bridge.resources.Messages; import org.apache.batik.ext.awt.LinearGradientPaint; DocumentLoader loader = ctx.getDocumentLoader(); String units = SVGUtilities.getChainableAttributeNS(paintElement, n...
0
public TemporaryFolder folder = new TemporaryFolder(new File(System.getProperty("user.dir") + "/target"));
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 la...
0
import java.sql.SQLException; import org.junit.Test; import com.twitter.mesos.gen.Identity; JobConfiguration jobConfig1 = new JobConfiguration().setOwner(new Identity("jake", "jake")) .setName("fortune"); JobConfiguration jobConfig2 = new JobConfiguration().setOwner(new Identity("jane", "jane")) ...
0
if (ShellCommandUtil.LINUX) {
0
return new HashSet<>(GANGLIA_CLUSTER_NAME_MAP.containsKey(component) ? GANGLIA_CLUSTER_NAME_MAP.get(component) : Collections.<String>emptyList());
1
public class LengthPrefixCoder<T> extends StructuredCoder<T> { * Overridden to short-circuit the default {@code StructuredCoder} behavior of encoding and if (valueCoder instanceof StructuredCoder) { // If valueCoder is a StructuredCoder then we can ask it directly for the encoded size of long valueSi...
0
import org.apache.http.annotation.ThreadSafe; @ThreadSafe private final RFC2965Spec strict; private final RFC2109Spec obsoleteStrict; private final NetscapeDraftSpec netscapeDraft; this.strict = new RFC2965Spec(datepatterns, oneHeader); this.obsoleteStrict = new RFC2109Spec(datepatterns, one...
0
final Map<String, File> map = new HashMap<String, File>();
0
import org.apache.beam.vendor.grpc.v1p13p1.com.google.protobuf.InvalidProtocolBufferException;
0
public FileName parseUri(final VfsComponentContext context, FileName base, final String filename) throws FileSystemException auth.password = cryptor.decrypt(auth.password.substring(1, auth.password.length() - 1)); private String scheme; private String hostName; pr...
0
static final SortedSet<Text> SPLITS = new TreeSet<>(); static final List<String> ROWS = new ArrayList<>(Arrays.asList(LETTERS));
1
package org.w3c.dom.svg; public interface SVGAltGlyphDefElement extends SVGElement { }
1
result = c14n.engineCanonicalize(input);
0
import com.google.auto.service.AutoService; public static final String STREAMING_IMPULSE_TRANSFORM_URL = "flink:transform:streaming_impulse:v1";
0
static Object eval(Object v) return eval(t, true); } public Object eval(final Token t, boolean convertNumeric) throws Exception { if (convertNumeric) { v = eval(v); } Object v = eval(t, values.isEmpty());
0
* @author <a href="mailto:volker.schmitt@basf-it-services.com">Volker Schmitt</a> * @version CVS $Id: CocoonRequestHandler.java,v 1.2 2003/03/16 17:49:08 vgritsenko Exp $
0
@Deprecated
0
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting;
0
package org.apache.beam.sdk.transforms.reflect; import org.apache.beam.sdk.transforms.reflect.DoFnInvokersTest.Invocations; * Test helper for {@link DoFnInvokersTest}, which needs to test package-private access public class DoFnInvokersTestHelper {
0
import static com.google.common.base.Preconditions.checkArgument; public synchronized void merge(CounterSet that) { for (Counter<?> theirCounter : that) { Counter<?> myCounter = counters.get(theirCounter.getName()); if (myCounter != null) { mergeCounters(myCounter, theirCounter); } else...
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...
1
package org.apache.beam.sdk.options;
0
bw = master.getClient().createBatchWriter(MetadataTable.NAME);
0
@Override @Override @Override @Override
0
implements ImageOperation { private RescaleOp colorFilter; private String prefix; private boolean enabled; public void setPrefix( String prefix ) { this.prefix = prefix; public void setup( Parameters params ) { enabled = params.getParameterAsBoolean( prefix + "enabled", tru...
0
import java.io.File;
0
/** * Copyright 2016 Seznam a.s. * * 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...
0
.createAcceptor(this);
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...
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
public Map<String, Collection<String>> getProjectedTopology() { for (HostRequest hostRequest : allHostRequests) {
0
import org.apache.batik.css.value.CommonCSSContext.Color;
0
import org.apache.beam.fn.harness.data.MultiplexingFnDataReceiver; import org.apache.beam.fn.harness.data.PCollectionConsumerRegistry; PCollectionConsumerRegistry consumers = new PCollectionConsumerRegistry(); consumers.register( FnDataReceiver<WindowedValue<String>> consumers = MultiplexingFnDataRe...
0
* * * * * * * * * * * *
0
// Implementation methods
0
* Sets if the bundle manifest headers should be propagated to the bundle component adapter service consumer (true by default). * The component service properties take precedence over the propagated bundle manifest headers.
0
public static final String MAPFILE_EXTENSION = "map";
0
* @version $Id: ScriptableWidget.java,v 1.4 2004/03/20 22:45:31 coliver Exp $ } else { if (index >= 0 && index < repeater.getSize()) { }
0
package org.apache.ambari.logfeeder.input; import org.apache.ambari.logfeeder.metrics.MetricCount; import org.apache.ambari.logfeeder.util.LogFeederUtil;
0
String toUpper = encoded.toUpperCase(); if (!(toUpper.startsWith("ALLOW {") || toUpper.startsWith("DENY {"))) m_allow = toUpper.startsWith("ALLOW {"); m_name = Long.toString(RANDOM.nextLong() ^ System.currentTimeMillis()); m_conditions = conditions == null ? CONDITION_INFO : ...
0
@Override
1
import org.apache.accumulo.core.client.Accumulo; client = Accumulo.newClient().from(getClientProps()).build();
0
public class ParseFailuresTest extends JexlTestCase {
0
// continue; : unsolvableMethod(node, methodName, argv); } catch (JexlException.TryFailed xany) { throw invocationException(node, methodName, xany.getCause()); return unsolvableMethod(node, tstr, argv);
0
if (fileSizeMax != -1) { // Check if limit is already exceeded && pContentLength > fileSizeMax) { new FileSizeLimitExceededException( format("The field %s exceeds its maximum permitted size of %s bytes.",...
0
if (iterInfo.priority > max) max = iterInfo.priority; if (entry.getValue() == null) continue; if (options == null) options = Collections.emptyMap();
1
buf = new StringBuffer(100); buf.append("Code(max_stack = ").append(max_stack) .append(", max_locals = ").append(max_locals) .append(", code_length = ").append(code_length).append(")\n") .append(Utility.codeToString(code, constant_pool, 0, -1, verbose)); buf.append("\nException handler(s...
0
* Copyright (c) OSGi Alliance (2000, 2009). All Rights Reserved. * <code>ServiceEvent</code> objects are delivered to * <code>ServiceListener</code>s and <code>AllServiceListener</code>s when a * @version $Revision: 6542 $ private final ServiceReference reference; * If a bundle is using a service that is <code>U...
0
"CanonicalizationMethod", XMLSignature.XMLNS); "SignatureMethod", XMLSignature.XMLNS); Ele...
0
/** * Creates an instance of DefaultConnectingIOReactor with the given configuration. * * @param config I/O reactor configuration. * @param threadFactory the factory to create threads. * Can be <code>null</code>. * @throws IOReactorException in case if a non-recoverable I/O error. ...
0
import org.springframework.security.authentication.encoding.Md5PasswordEncoder; public class CommonUtil { private static SecureRandom secureRandom = new SecureRandom(); private static int counter = 0; public static String genGUI() { return System.currentTimeMillis() + "_" + secureRandom.nextInt(1000) + "_" + ...
0
import org.apache.accumulo.core.client.AccumuloClient; private AccumuloClient accumuloClient; accumuloClient = getAccumuloClient(); accumuloClient.tableOperations().create(tableName); if (accumuloClient.securityOperations().listLocalUsers().contains(user)) { accumuloClient.securityOperations().dropL...
0
LOG.info("Got user-level KeeperException when processing " + request.toString() + " aborting remaining multi ops."
0
protected AlertDefinitionsAgentUpdateEvent handleUpdate(AlertDefinitionsAgentUpdateEvent current, AlertDefinitionsAgentUpdateEvent update) throws AmbariException { return null; AlertDefinitionsAgentUpdateEvent result = null; Map<Long, AlertCluster> existingClusters = current.getClusters(); Map<Long,...
0
package cz.seznam.euphoria.flink.translation.io; import cz.seznam.euphoria.core.client.io.DataSource; import org.apache.flink.streaming.api.functions.source.RichParallelSourceFunction; public class DataSourceWrapper<T> extends RichParallelSourceFunction<T> { private final DataSource<T> dataSource; public DataSo...
0
this.client.setMaxPerRoute(3); this.client.setMaxTotal(3); this.client.getConnPool()); this.client.setMaxPerRoute(3); this.client.setMaxTotal(3); this.client.getConnPool()); this.client.setMaxPerRoute(3); this.client.setMaxTotal(3);...
0
" <description>This is a description.</description>\n" +
0
private List<IOFileFilter> fileFilters; this.fileFilters = new ArrayList<IOFileFilter>(); public AndFileFilter(final List<IOFileFilter> fileFilters) { this.fileFilters = new ArrayList<IOFileFilter>(); this.fileFilters = new ArrayList<IOFileFilter>(fileFilters); this.fileF...
0
.apply( FlatMapElements.into(TypeDescriptors.strings()) .via((String word) -> Arrays.asList(word.split("[^a-zA-Z']+")))) .apply(Filter.by((String word) -> !word.isEmpty())) .apply(Count.perElement()) .apply( MapElements.into(TypeDescriptors.strings...
0
* public final class RuleSetCache implements Serializable { private final int capacity = (int) Math.ceil( this.cacheSize / this.loadFactor ) + 1; new LinkedHashMap<Class<?>, FromAnnotationsRuleSet>( capacity, loadFactor ) { /** * This class serialVersionUID. ...
1
Languages.LanguageSet guesses = this.lang.guessLanguages(this.name);
0