Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
import javax.xml.stream.XMLStreamException; } catch (ParserConfigurationException | IOException | SAXException | XMLStreamException ex) {
0
import org.apache.beam.sdk.extensions.sql.SqlTypeCoders; SqlTypeCoders.INTEGER, "order_id", SqlTypeCoders.INTEGER, "site_id", SqlTypeCoders.INTEGER, "price" SqlTypeCoders.INTEGER, "order_id", SqlTypeCoders.INTEGER, "site_id", SqlTypeCoders.INTEGER, "price" ...
0
final BasicHttpResponse response = new BasicHttpResponse(200, "OK"); final BasicHttpResponse response = new BasicHttpResponse(200, "OK");
0
setAttributeNS(null, SVG_ID_ATTRIBUTE, filterAttrBuf.append(filterDef.getAttributeNS(null, SVG_ID_ATTRIBUTE));
1
import java.util.ArrayList; import java.util.List; import org.apache.commons.logging.Log; @Test public void test206() throws Exception { String src = "null.1 = 2; return 42"; doTest206(src, false, false); doTest206(src, false, true); doTest206(src, true, false); doTest2...
0
INVALID_ATTRIBUTE_TYPE_FOR_CARDINALITY(409, "ATLAS4095E", "Cardinality of attribute {0}.{1} requires a list or set type"),
0
/** * TODO Add javadoc * * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a> * @version $Rev$, $Date$ */
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 u...
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
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//dbcp/src/java/org/apache/commons/dbcp/DelegatingStatement.java,v 1.4 2002/06/28 15:28:20 glenn Exp $ * $Revision: 1.4 $ * $Date: 2002/06/28 15:28:20 $ protected void passivate() throws SQLException { if (_conn != null)...
0
log.info("Creating lots of bulk import files");
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 ...
1
throws KeeperException, IOException, InterruptedException, MalformedPathException { } catch (IllegalArgumentException ex) { throw new MalformedPathException(ex.getMessage());
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/collection/UnmodifiableBoundedCollection.java,v 1.3 2003/11/29 18:14:20 scolebourne Exp $ import org.apache.commons.collections.BoundedCollection; * @version $Revision: 1.3 $ $Da...
0
protected static final String VERSION_DEF_STACK_DEFAULT = "VersionDefinition/stack_default"; VERSION_DEF_STACK_DEFAULT, res = toResource(null, xmlHolder.xml, ids); // !!! if the definition name is not null, it can only be from available if (null != definitionName) { res.setP...
0
private Predicate entityPredicateTraitNames; entityPredicateTraitNames = SearchPredicateUtil.getContainsAnyPredicateGenerator().generatePredicate(Constants.TRAIT_NAMES_PROPERTY_KEY, classificationType.getTypeAndAllSubTypes(), List.class); entityPredicateTraitNames = Sear...
0
import cz.seznam.euphoria.core.client.accumulators.AccumulatorProvider; import cz.seznam.euphoria.core.util.Settings; class FunctionCollectorMem<T> extends FunctionCollector<T> { public FunctionCollectorMem(AccumulatorProvider.Factory accumulatorFactory, Settings settings) { super(a...
0
import org.apache.felix.framework.wiring.BundleCapabilityImpl; import org.apache.felix.framework.wiring.BundleRequirementImpl; List<BundleCapabilityImpl> getCapabilities(); List<BundleRequirementImpl> getRequirements(); List<BundleRequirementImpl> getDynamicRequirements();
0
StackId stackId = cluster.getCurrentStackVersion(); StackInfo stack = null; stack = ambariMetaInfo.getStack(stackId.getStackName(), stackId.getStackVersion()); } catch (AmbariException e) { Map<String,Object> userData = stack.getRoleCommandOrder().getContent();
0
* @version CVS $Id: TreeProcessor.java,v 1.26 2004/05/05 06:36:58 cziegeler Exp $ boolean isRedirect = (environment.getObjectModel().remove("cocoon:forward") == null); Environment newEnv = new ForwardEnvironmentWrapper(environment, this.manager, uri, getLogger()); if ( isRedirect ) {
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 final class RepeaterDefinitionBuilder extends AbstractWidgetDefinitionBuilder { super.setupDefinition(repeaterElement, repeaterDefinition); repeaterDefinition.makeImmutable();
0
/* * Copyright 2016-2018 Seznam.cz, a.s.
0
if (!getZooKeeperInstance().isEmpty()) { List<String> zkOpts = getZooKeeperInstance(); String instanceName = zkOpts.get(0); String hosts = zkOpts.get(1); clientConfig.setProperty(ClientProperty.INSTANCE_ZK_HOST, hosts); clientConfig.setProperty(ClientProperty.INSTANCE_NAME, instanceNam...
0
private final transient TranslationContext context; new TranslationContext( this.context = new TranslationContext( public static BeamFlow of(Pipeline pipeline) { public static BeamFlow of(String name, Pipeline pipeline) { public static <T> BeamFlow of(PCollection<T> pCollection) { public static <T...
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
private Vector statementEventListeners = new Vector();
0
* The thread local context. */ protected static final java.lang.ThreadLocal<JexlContext.ThreadLocal> CONTEXT = new java.lang.ThreadLocal<JexlContext.ThreadLocal>() { @Override protected JexlContext.ThreadLocal initialValue() { return null; ...
1
@Override public String getId() { return ioSession.getId(); }
0
import org.apache.accumulo.start.classloader.AccumuloClassLoader; String principal = conf.get(Property.TRACE_USER); Map<String,String> loginMap = conf.getAllPropertiesWithPrefix(Property.TRACE_TOKEN_PROPERTY_PREFIX); if (loginMap.isEmpty()) { AuthenticationToken token = AccumuloClassLo...
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 u...
0
* @version CVS $Id: JSLog.java,v 1.2 2003/03/16 17:49:12 vgritsenko Exp $
0
int spaceCount = 0; boolean start = true; final boolean isWhitespace = Character.isWhitespace(ch); if ( start ) { if ( isWhitespace ) { continue; } start = false; } ...
0
protected static final String ATTR_ID = XMLConstants.XML_ID_ATTRIBUTE; * Returns true if the given Attr node represents an 'id'
1
String hashAlgo = algorithms.get(0); validateHashResult(file, file.checkFileName(srcPath, algorithms, 0L, 0L, hashBlockSize), hashAlgo, expectedHash); validateHashResult(hndl, hndl.checkFileHandle(fileHandle, algorithms, 0L, 0L, hashBlockSize), hashAlgo, expectedHash)...
0
import org.apache.hc.core5.annotation.Contract; import org.apache.hc.core5.annotation.ThreadingBehavior; import org.apache.hc.core5.http.EntityDetails; @Contract(threading = ThreadingBehavior.IMMUTABLE) public void process(final HttpRequest request, final EntityDetails entity, final HttpContext context) {
0
import org.apache.beam.sdk.values.PCollection; private final Map<PCollection<?>, AppliedPTransform<?, ?, ?>> producers; private final Map<PCollectionView<?>, AppliedPTransform<?, ?, ?>> viewWriters; Map<PCollection<?>, AppliedPTransform<?, ?, ?>> producers, Map<PCollectionView<?>, AppliedPTransform<?, ?...
0
import org.apache.hc.core5.http.ClassicHttpRequest;
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
import java.util.logging.Logger; private static final Logger LOG = Logger.getLogger(SchedulerMain.class.getName()); String javaVersion = System.getProperty("java.version"); char javaVersionMinor = javaVersion.charAt(2); if (javaVersionMinor < '8') { LOG.warning( "\n***********************...
0
import org.apache.hc.core5.net.URIHost; if (s == null) { return null; } * @since 5.0 public HttpHost(final URIHost uriHost, final String scheme) { this(Args.notNull(uriHost, "URI host").getHostName(), uriHost.getPort(), scheme); } /** * @since 5.0 */ p...
0
public static final ChannelSessionFactory INSTANCE = new ChannelSessionFactory();
1
import org.apache.commons.jxpath.ExceptionHandler; /** Serialization version */ private static final long serialVersionUID = 8117201322861007777L; private ExceptionHandler exceptionHandler; * Set the exceptionHandler of this NodePointer. * @param exceptionHandler the ExceptionHandler to set ...
0
* public static final JavaClassWidgetListenerBuilder INSTANCE = new JavaClassWidgetListenerBuilder();
0
super(encoding);
1
* Copyright 2002-2005 The Apache Software Foundation.
0
package javax.xml.crypto.test.dsig; import java.security.Provider; import java.security.Security; import javax.xml.crypto.dsig.Transform; import javax.xml.crypto.dsig.TransformService; /** * Used by ClassLoaderTest */ public class AppB { public void dsig() throws Exception { Provider p = Security.getProvider...
0
public class SourceTreeModelDefinitionBuilder implements TreeModelDefinitionBuilder { private SourceResolver sourceResolver; definition.setSourceResolver(sourceResolver); public void setSourceResolver( SourceResolver sourceResolver ) { this.sourceResolver = sourceResolver; }
0
import org.apache.beam.sdk.values.WindowingStrategy;
0
import org.apache.ambari.server.security.authentication.InvalidUsernamePasswordCombinationException;
0
package examples.nntp; import java.io.IOException; import java.io.PrintWriter; import java.net.SocketException; import org.apache.commons.net.nntp.Article; import org.apache.commons.net.nntp.NNTPClient; import org.apache.commons.net.nntp.NewsgroupInfo; import org.apache.commons.net.nntp.Threader; import examples.Pri...
0
import org.apache.ambari.server.orm.entities.HostEntity; HostEntity hostEntity = hostDAO.get().findByName(hostName); HostVersionEntity missingHostVersion = new HostVersionEntity(hostEntity,
0
String bu = XMLBaseSupport.getCascadedXMLBase(this);
0
/** * The class loader instance to use to load the JDBC driver. If not * specified, {@link Class#forName(String)} is used to load the JDBC driver. * If specified, {@link Class#forName(String, boolean, ClassLoader)} is * used. */ protected ClassLoader driverClassLoader = null; /...
0
throw new MutationsRejectedException(context.getProperties(), cvsList, af, serverSideErrors,
0
import java.util.concurrent.ConcurrentHashMap; ConcurrentHashMap<String, String> appIds; appIds = new ConcurrentHashMap<>(); if (!appIds.containsKey(appId)) { appIds.put(appId, appId); ConcurrentHashMap<String, String> apps = hostMetadata.get(hostname).getHostedApps(); for (S...
0
* Deprecated. To be removed for Ambari 2.0.0 after the web client has removed * references to {@code legacy_alerts}. @Deprecated public NagiosPropertyProvider() {
0
public static void test1(final TestLegalInvokeSpecial02 t, final int i){
0
import org.apache.felix.http.base.internal.registry.EventListenerRegistry; EventListenerRegistry.contextInitialized(handler.getListenerInfo(), listener, new ServletContextEvent(handler.getContext())); EventListenerRegistry.contextDestroyed(...
0
import org.apache.felix.ipojo.annotations.Component; import test.FakeAnnotation; MiniStore store = new MiniStore(AnnotatedComponent.class, FakeAnnotation.class);
0
import org.apache.ambari.server.api.predicate.InvalidQueryException; public Predicate toPredicate() throws InvalidQueryException {
0
LOG.debug("Transforms.addTransform({})", transformURI); LOG.debug("Transforms.addTransform({})", transformURI); LOG.debug("Transforms.addTransform({})", transform.getURI()); LOG.debug("Perform the ({})th {} transform", i, t.getURI()); LOG.debug("Perform th...
1
/** * A tag which is capable of producing a source of XPath context objects * such as &lt;x:forEach&gt; * * @author <a href="mailto:jstrachan@apache.org">James Strachan</a> * @version $Revision: 1.5 $ */
0
* <p> * The following parameters can be used to customize the behavior of this * class: * <ul> * <li>{@link org.apache.http.params.CoreConnectionPNames#SOCKET_BUFFER_SIZE}</li> * </ul>
0
* @throws NullPointerException if set or predicate is null * @throws NullPointerException if set or predicate is null
0
writePacket(buffer);
0
* @see #getSession() * @see Session#resolveAttribute(Session, AttributeKey)
0
new EventType<>(Event.ANY, "RELOAD");
0
* @version $Id$
0
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/share/org/apache/commons/validator/CreditCardValidator.java,v 1.10 2003/08/21 19:40:13 rleland Exp $ * $Revision: 1.10 $ * $Date: 2003/08/21 19:40:13 $ * Copyright (c) 2001-2003 The Apache Software Foundation. All ...
0
* @return This Deserializing object to allow further invocations on it. /** * Provide contextual information to complete the de-serializing operation. * The contexts that can be handled are serializer-specific. * * @param obj The context to use while deserializing. * @return This Deserializing objec...
0
builder.add(DisplayData.item(option.getKey(), type, value) .withNamespace(pipelineInterface)); builder.add(DisplayData.item(option.getKey(), value.toString()) .withNamespace(pipelineInterface)); builder.add(DisplayData.item(jsonOption.getKey(), jsonOption.getValue...
0
package org.apache.hc.core5.http; import org.apache.hc.core5.util.Args; public enum URIScheme { HTTP("http"), HTTPS("https"); public final String id; URIScheme(final String id) { this.id = Args.notBlank(id, "Id"); } public boolean same(final String scheme) { return id.equalsIgno...
0
bogusIdCount++ ; // Avoid dead local store warning id = "<Bogus-id:" + (bogusIdCount) + ">";
0
@Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override ...
0
connFactory = new BasicConnFactory( (SSLSocketFactory)SSLSocketFactory.getDefault(), 0, sconfig, ConnectionConfig.DEFAULT);
0
import org.apache.accumulo.server.ServerContext; return ServerContext.getInstance().getZooKeeperRoot() + Constants.ZTABLES + "/"
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 m...
0
/** * Tests that when there are no tasks and all counts are 0, that the returned * status is {@link HostRoleStatus#COMPLETED}. * * @throws Exception */ @Test public void testGetCompletedStatusForNoTasks() throws Exception { // no status / no tasks CalculatedStatus status = CalculatedStatus....
0
protected static final class FactoryInstance extends Satisfied//Registered Object getService( ImmediateComponentManager dcm ) { if ( dcm.createComponent() ) { dcm.changeState( Active.getInstance() ); return dcm.getInstance(); } ...
0
Copyright 2000-2001,2003,2006 The Apache Software Foundation import org.apache.batik.anim.values.AnimatableValue; import org.apache.batik.util.SVGTypes; // ExtendedTraitAccess /////////////////////////////////////////////////// /** * Returns whether the given XML attribute is animatable. */ ...
1
} else { // Note: (metricName instanceof MetricName) is always True. if (this.stepName != null) { builder.setPTransformLabel(metricUpdate.getKey().stepName()); } else { // Drop and log fpr these user counters, as they break the spec. All user counters must be // defined for a PTr...
0
public class InputProcessorChainTest extends Assert {
0
// generate label, help, hint, etc. definition.generateDisplayData(contentHandler);
0
import org.apache.zookeeper.admin.ZooKeeperAdmin; if (!(zk instanceof ZooKeeperAdmin)) { // This should never happen when executing reconfig command line, // because it is guaranteed that we have a ZooKeeperAdmin instance ready // to use in CliCommand stack. ...
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
* 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
* @version $Revision: 1.4 $ $Date: 2003/05/29 21:14:59 $
0
import org.apache.accumulo.core.cli.ClientOpts; import org.apache.accumulo.core.client.Instance; import org.apache.log4j.Logger; ClientOpts opts = new ClientOpts(); opts.parseArgs(MetadataBatchScanTest.class.getName(), args); Instance inst = new ZooKeeperInstance(new ClientConfiguration().withInstance("acu1...
1
public class DeadTask extends TaskOnDisk { * Creates a new dead task. * @param taskRoot Root directory for this task's recorded state. * @throws TaskStorageException If the task could not be restored from the task root. DeadTask(File taskRoot) throws TaskStorageException { super(taskRoot); this.task...
0
.add(new RequestExpectContinue(true)).build();
0
ProxyHost proxyhost1 = new ProxyHost("somehost"); assertEquals("somehost", proxyhost1.getHostName()); assertEquals(http.getDefaultPort(), proxyhost1.getPort()); assertEquals(http, proxyhost1.getProtocol()); ProxyHost proxyhost2 = new ProxyHost("somehost", 8080); asser...
0
/* * Copyright 2002, 2003,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 requi...
0
public void testServiceControllerWithSpecification() { Element meta = helper.getMetadata("org.apache.felix.ipojo.test.scenarios.component.PSServiceControllerSpec"); Element[] provs = meta.getElements("provides"); assertNotNull("Provides exists ", provs); System.out.println(provs...
0
package org.apache.http.util;
0
// Don't use an iterator here. Iterators on WeakHashMap can // get ConcurrentModificationException on garbage collection. MultiThreadedHttpConnectionManager[] connManagers = (MultiThreadedHttpConnectionManager[]) ALL_CONNECTION_MANA...
0
import static org.junit.Assert.assertEquals; @Test public void testFireDeadline() throws Exception { BoundedWindow window = new IntervalWindow(new Instant(0), new Instant(10)); assertEquals(new Instant(9), AfterEach.inOrder(AfterWatermark.pastEndOfWindow(), AfterWatermark.pas...
0
* * * /** * Represents a <a href="http://jakarta.apache.org/commons/jexl.html">Jexl</a> * expression which fully supports the Expression Language in JSTL and JSP * @version $Revision: 1.18 $ //------------------------------------------------------------------------- } return value;...
1
protected static final String COMPONENT_TOTAL_COUNT_PROPERTY_ID = "ServiceComponentInfo/total_count"; protected static final String COMPONENT_STARTED_COUNT_PROPERTY_ID = "ServiceComponentInfo/started_count"; protected static final String COMPONENT_INSTALLED_COUNT_PROPERTY_ID = "ServiceComponentInfo/installe...
0