Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
package org.apache.batik.gvt.renderer; import org.apache.batik.gvt.filter.ConcreteGraphicsNodeRableFactory; import org.apache.batik.gvt.text.ConcreteTextSelector;
0
import java.util.HashMap; import java.util.Map; JSONObject entity = new JSONObject(); Map<String, String> errors = new HashMap<>(); errors.put("message", "Ldap password required"); entity.put("errors", errors); return Response.status(Response.Status.UNAUTHORIZED).entity(entity)....
0
package org.apache.batik.anim.dom; import org.apache.batik.dom.svg.SVGOMEvent;
0
import com.twitter.common.application.ActionRegistry; import com.twitter.common.base.Command; * * @param shutdownRegistry to register orderly shutdown of the periodic task scheduler. void startPeriodicTasks(ActionRegistry shutdownRegistry) { new ResourceManager(this, executorRootDir, shutdownRegistry).start...
0
import org.apache.hc.core5.reactor.IOSession; private final IOSession ioSession; public ManagedAsyncClientConnection(final IOSession ioSession) { if (ioSession instanceof TransportSecurityLayer) { ((TransportSecurityLayer) ioSession).startTls(sslContext, sslBufferManagement, initializer, ver...
0
if(entry.before == null) { throw new IllegalStateException("Entry.before is null." + " Please check that your keys are immutable, and that you have used synchronization properly." + " If so, then please report this to dev@commons.apache.org as a bug."...
0
import java.awt.image.DataBufferInt; import java.awt.image.SinglePixelPackedSampleModel; BufferedImage bi = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB); return bi; // // This is a trick so that viewers which do not support // the alpha channel will see a white backgroun...
0
if (values.isEmpty()) { return false; }
0
* Returns the xml:base attribute value of the given element. */ public static String getXMLBase(Element elt) { return elt.getAttributeNS(XML_NAMESPACE_URI, "base"); } /** public static String getCascadedXMLBase(Element elt) { base = getCascadedXMLBase((Element)n);
0
package org.apache.accumulo.examples.wikisearch.ingest; import org.apache.accumulo.examples.wikisearch.ingest.ArticleExtractor.Article; import org.apache.accumulo.examples.wikisearch.normalizer.LcNoDiacriticsNormalizer; import org.apache.accumulo.examples.wikisearch.protobuf.Uid; import org.apache.accumulo.examples.wik...
0
import java.net.ConnectException; if (io instanceof SocketTimeoutException || io instanceof ConnectException) { errorMsg = "Cannot connect to collector: SocketTimeoutException for " + uriBuilder.getHost();
0
* A {@link PCollectionViewWriter} is responsible for writing contents of a {@link PCollection} to a * storage mechanism that can be read from while constructing a {@link PCollectionView}.
1
// throw new FormsException("Widget to inherit from ("+newId+") not // found!", DomHelper.getLocationObject(element));
0
* Invoked when the consumer is being closed. * * @since 4.3 */ protected void onClose() throws IOException { } /** onClose();
0
import org.apache.accumulo.core.clientImpl.Table; import org.apache.accumulo.core.clientImpl.Tables;
0
import org.apache.hc.core5.annotation.Contract; import org.apache.hc.core5.annotation.ThreadingBehavior; @Contract(threading = ThreadingBehavior.IMMUTABLE)
0
import org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode;
1
* Generates class index for a given package. * @version CVS $Id$ public class PackageXMLWriter extends AbstractXMLWriter {
0
@Nullable return getTransformEvaluatorQueue(transform, evaluationContext).poll();
0
report.addDescriptionEntry(Messages.formatMessage(ENTRY_KEY_LINE_NUMBER,null), ln); report.addDescriptionEntry(Messages.formatMessage(ENTRY_KEY_COLUMN_NUMBER,null), cn);
0
* @version $Revision: 1.3 $, $Date: 2004/10/21 18:42:09 $ /** * <p><strong>This operation is not supported and will throw an * UnsupportedOperationException.</strong></p> * * @throws UnsupportedOperationException */ /** * <p><strong>This operation is not supported and will throw a...
0
import org.apache.accumulo.core.util.HostAndPort; transport = TSSLTransportFactory.getClientSocket(address.getHost(), address.getPort(), timeout); transport = createClient(wrappingSslSockFactory, address.getHost(), address.getPort(), timeout); log.trace("Creating SASL connection to {}:{}", a...
1
package org.apache.http.impl.client;
0
import org.apache.hc.client5.http.entity.mime.MultipartEntityBuilder;
0
public SmbFileSystem( final FileName rootName ) super( rootName, null );
0
@SuppressWarnings("unchecked")
0
import cz.seznam.euphoria.spark.accumulators.SparkAccumulatorFactory; private final SparkAccumulatorFactory accumulatorFactory; SparkAccumulatorFactory accumulatorFactory, public SparkAccumulatorFactory getAccumulatorFactory() {
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//dbcp/doc/ManualPoolingDataSourceExample.java,v 1.2 2003/08/11 14:37:12 dirkv Exp $ * $Revision: 1.2 $ * $Date: 2003/08/11 14:37:12 $ // First we load the underlying JDBC driver. // You need this if you don't use th...
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
// Before we try anything, check to see if we can read users/root out of Zookeeper, as it should be guaranteed to exist and ACLed // This is to ensure we have the right secret before we can muck around with anything ZooReaderWriter.validateSecret();
0
package org.apache.cocoon.portal.services; import org.apache.cocoon.portal.LayoutException;
0
import org.apache.commons.validator.routines.checkdigit.CheckDigit; import org.apache.commons.validator.routines.checkdigit.LuhnCheckDigit; import org.apache.commons.validator.util.Flags; * Luhn checkdigit validator for the card numbers. */ private static final CheckDigit LUHN_VALIDATOR = LuhnCheckDigit....
0
import org.apache.commons.configuration.ConfigurationException; import org.apache.commons.configuration.PropertiesConfiguration; PropertiesConfiguration configProperties = new PropertiesConfiguration("metadata-buildinfo.properties"); response.put("Version", confi...
0
private final ViewContext context; private final AmbariApi ambariApi; this.ambariApi = new AmbariApi(context); String rmUrl = getRMUrl(); RMRequestsDelegate delegate = new RMRequestsDelegateImpl(context, rmUrl); return ambariApi.getServices().getRMUrl();
0
import org.apache.cocoon.portal.om.CopletAdapter;
0
/** * Create a {@code TransformHierarchy} containing a root node. */
0
if (child == null) { } else if (child == target) { } else { } if (parent != null && threadable == null) { } if (threadable != null) { } if (threadable != null) { } rest = (rest == null ? null : rest.next)) {...
1
rethrow = checkConsistency(session, allCandidates, currentFaultyResources, hosts, false); Map<Resource, Resource> hosts, boolean dynamic) allCandidates, dynamic, resourcePkgMap, resultCache); rethrow = checkConsistency( ...
0
if (!isVisible) return null; if (shape == null) return null; if (primitiveBounds != null) return primitiveBounds; if (shapePainter == null) primitiveBounds = shape.getBounds2D(); else primitiveBounds = shapePainter.getPaintedBounds2D(); ...
0
package org.apache.felix.framework.installer.artifact; import org.apache.felix.framework.installer.Status; import org.apache.felix.framework.installer.StringProperty;
1
import org.apache.batik.util.CSSConstants;
0
return parentNode; parentNode = v; previousSibling = v; return previousSibling; nextSibling = v; return nextSibling;
1
* A {@link org.apache.cocoon.woody.datatype.Datatype Datatype} implementation for
0
if (orFields) return matches(rowMatcher, key.getRowData()) || matches(colfMatcher, key.getColumnFamilyData()) || matches(colqMatcher, key.getColumnQualifierData()) || matches(valueMatcher, value.get(), 0, value.get().length); if (options.containsKey(ROW_REGEX)) Pattern.compile(options.get(...
1
* @version $Revision$
1
StandaloneAccumuloCluster standaloneCluster = new StandaloneAccumuloCluster(cluster.getConnectionInfo(), conf.getTmpDirectory(), conf.getUsers()); if (saslEnabled()) { checkState(initialized); return getCluster().getConnectionInfo(); } public static boolean saslEnabled() { if (initializ...
0
return Arrays.asList("-Xdebug", String.format("-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=%d", port));
0
private static final String CLUSTER_HOST_INFO = "cluster_host_info"; Stage s = StageUtils.getATestStage(1, 1, "h1", CLUSTER_HOST_INFO); Stage stage = new Stage(1, "/logDir", "c1", "My Context", CLUSTER_HOST_INFO); assertEquals(CLUSTER_HOST_INFO, stage.getClusterHostInfo());
0
import org.apache.http.HttpClientConnection; import org.apache.http.conn.ConnectionRequest; import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; private PoolingHttpClientConnectionManager mgr; this.mgr = new PoolingHttpClientConnectionManager(); ConnectionRequest connreq = this.mgr.r...
0
import org.apache.beam.vendor.grpc.v1p13p1.io.grpc.stub.StreamObserver;
0
/** * Copyright 2016-2017 Seznam.cz, 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 ...
0
@Override @Override @Override @Override @Override @Override @Override @Override @Override
1
* @version $Revision$
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
@Deprecated @Deprecated @Deprecated
0
public final CloseFuture close(boolean immediately) { public final boolean isClosed() { public final boolean isClosing() {
0
package org.apache.bcel.util;
1
if (!StringUtils.equals(property.getValue(),clusterConfigProperties.get(property.getKey()))) {
0
import org.apache.commons.codec.RequiredCharsetNames; qpcodec.encode(ru_msg, RequiredCharsetNames.UTF_8) assertEquals("Gr=C3=BCezi_z=C3=A4m=C3=A4", qpcodec.encode(ch_msg, RequiredCharsetNames.UTF_8)); assertEquals(ru_msg, qpcodec.decode(qpcodec.encode(ru_msg, RequiredCharsetNames.UTF_8), Require...
0
import java.util.HashSet; import java.util.Set; * @version $Revision: 1.2 $ $Date: 2002/11/23 00:14:45 $ * @todo Extract subclass that overlays the children private FileObject file; private final Set children = new HashSet(); public void attachChild( final String baseName ) throws FileSystemException ...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/list/CursorableLinkedList.java,v 1.2 2003/12/29 00:38:08 scolebourne Exp $ * @version $Revision: 1.2 $ $Date: 2003/12/29 00:38:08 $ if (next == parent.header) { ...
0
protected StringBuffer cdataBuffer; cdataBuffer = null; if (cdataBuffer != null) cdataBuffer.append(ch, start, length); else { String data = new String(ch, start, length); if (currentNode == null) { preInfo.add(new TextInfo(data)); ...
0
if (!getCombinedState().isAcceptingInputs())
0
* @version CVS $Id$
0
if (!(type.getType() instanceof Class)) { reportError(context, "Cannot determine type from generic %s due to erasure", type); return; } private static Field getField(Class<?> originalClazz, String name) { Class<?> clazz = originalClazz; throw new IllegalArgume...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/share/org/apache/commons/validator/ValidatorResults.java,v 1.11 2004/04/08 23:05:39 dgraham Exp $ * $Revision: 1.11 $ * $Date: 2004/04/08 23:05:39 $
0
import org.apache.accumulo.server.util.ReplicationTableUtil; ReplicationTableUtil.updateReplication(SystemCredentials.get(), extent, unusedWalLogs, StatusUtil.fileClosed()); ReplicationTableUtil.updateReplication(SystemCredentials.get(), extent, logEntry.logSet, StatusUtil.fileClosed());
0
Assert.assertThat(extractWordsFn.processBundle(" some input words "), Assert.assertThat(extractWordsFn.processBundle(" "), Assert.assertThat(extractWordsFn.processBundle(" some ", " input", " words"),
0
copy.setProperty("element3", "clonedValue"); assertEquals("value", conf.getString("element3")); conf.setProperty("element3[@name]", "originalFoo"); assertEquals("foo", copy.getString("element3[@name]")); } public void testSubset() throws ConfigurationException {...
0
client.update(tinfo, credentials.toThrift(instance), entry.getKey().toThrift(), entry.getValue().get(0).toThrift(), DurabilityImpl.toThrift(durability)); long usid = client.startUpdate(tinfo, credentials.toThrift(instance), DurabilityImpl.toThrift(durability));
1
// private ComponentContext and implementation instances final ComponentContext serviceContext; serviceContext = ( ComponentContext ) serviceContexts.remove( service ); disposeImplementationObject( service, serviceContext, ComponentConstants.DEACTIVATION_REASON_DISPOSED ); // if ...
0
import org.apache.batik.gvt.filter.Mask; Mask mask = CSSUtilities.convertMask(element, node, ctx); node.setMask(mask);
0
* in DirectRunner and on SparkPipelineRunner, with the mapped dataflow-to-spark
0
import org.apache.beam.runners.core.construction.BeamUrns; environment .getUrn() .equals(BeamUrns.getUrn(RunnerApi.StandardEnvironments.Environments.DOCKER)), final RunnerApi.DockerPayload dockerPayload = RunnerApi.DockerPayload.parseFrom(environment.getPayload());
0
final Collection<?> param = (Collection<?>) params.getParameter( final boolean singleHeader = params.getBooleanParameter(
0
"--string=baz", "--otherString=quux").as(TestOptions.class);
0
if (!hasNext) throw new NoSuchElementException(); if (topKey == null) return super.getTopKey(); if (topKey == null) return super.getTopValue(); if (workKey.isDeleted()) return;
1
package org.apache.cocoon.template.v2.script;
0
package org.apache.http.conn;
0
* @param baseURI Element element, String baseURI, StorageResolver storage DSAKeyValue dsaKeyValue = new DSAKeyValue(dsaKeyElement, baseURI); Element element, String baseURI, StorageResolver storage Element element, String baseURI, StorageResolver storage
0
this.tableName = Tables.getTableName(instance, Table.ID.of(activeScan.tableId));
1
private static final char[] US_ENGLISH_MAPPING = US_ENGLISH_MAPPING_STRING.toCharArray();
0
* @author <a href="mailto:deweese@apache.org">l449433</a> // Wait for Update Manager to Start. while (!updateManager.isRunning());
1
import org.apache.http.Header; private static final String EXPECT_DIRECTIVE = "Expect"; private static final String EXPECT_CONTINUE = "100-Continue"; public boolean expectContinue() { Header expect = getFirstHeader(EXPECT_DIRECTIVE); return expect != null && EXPECT_CONTINUE.equalsIgnoreCa...
0
* @return a {@code String} variant key
0
* 1521</a> and allows a character set to be specified. * <a href="http://www.ietf.org/rfc/rfc1522.txt">RFC 1522</a> describes techniques to allow the encoding of non-ASCII * @see <a href="http://www.ietf.org/rfc/rfc1522.txt">MIME (Multipurpose Internet Mail Extensions) Part Two: Message * Header Extensions...
0
package org.apache.hc.client5.testing.sync;
0
* <code>ExceptionConverter</code> converts WebDAV exceptions into FileSystemExceptions. * @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a> public final class ExceptionConverter }
0
protected Object clearTreeInternal(String key)
0
import org.apache.cocoon.components.sax.XMLByteStreamInterpreter; XMLByteStreamInterpreter deserializer = new XMLByteStreamInterpreter();
0
* The bit array representing the first character of an XML name. */ * The bit array representing a character compositing an XML name. */
0
import java.util.Locale; String nameLower = name.toLowerCase(Locale.ENGLISH);
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
this.createDummyBlueprint("MyDummyBlueprint", "0", "MyDummySiteBlueprint", "0"); } public void createDummyBlueprint (String name, String revision, String siteName, String siteVersion) { bp.setName(name); bp.setParentName(siteName); bp.setRevision(revision); bp.setPar...
0
import static org.junit.Assert.*; assertEquals(8, moved); assertEquals(48, moved);
0
import org.apache.zookeeper.Watcher.Event.EventType; import org.apache.zookeeper.Watcher.Event.KeeperState; public Set<Watcher> materialize(Watcher.Event.KeeperState state, Watcher.Event.EventType type, String path);
0
import org.apache.accumulo.core.client.impl.Tables; TableConfiguration tblConf = tabletServer.getTableConfiguration(extent); if (null == tblConf) { Tables.clearCache(tabletServer.getInstance()); tblConf = tabletServer.getTableConfiguration(extent); if (null == tblConf) { // Not guarant...
0
import org.apache.accumulo.core.client.ClientConfiguration;
0
import java.util.Iterator; * @version $Id: TestBaseConfiguration.java,v 1.8 2004/03/09 15:34:02 epugh Exp $ eprop.setProperty("property.string", "hello"); Iterator it = subEprop.getKeys(); it.next(); assertFalse(it.hasNext()); subEprop = eprop.subset("prop."); ...
0
import java.util.concurrent.atomic.AtomicLong; private static AtomicLong s_nextId = new AtomicLong(System.nanoTime()); this("" + Id.nextNegativeLong(), 0, typeName); private static long nextNegativeLong() { long ret = s_nextId.getAndDecrement(); if (ret > 0) { ret *= -1; ...
0