Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
if (fieldValue == null && !field.getType().getNullable()) {
0
String NName = attribute.getLocalName(); if (!XMLNS_URI.equals(attribute.getNamespaceURI())) {
1
import net.jcip.annotations.Immutable; @Immutable
0
* Empty constructor needed for Instruction.readInstruction. * Not to be used otherwise.
0
log.info("Created empty WAL at {}", emptyWalog.toURI()); log.info("Created WAL with malformed header at {}", partialHeaderWalog.toURI());
0
import java.util.List; import org.apache.sshd.common.NamedResource; import org.apache.sshd.common.signature.SignatureFactoriesManager; public class OpenSshHostKeysHandler extends AbstractOpenSshHostKeysHandler implements SignatureFactoriesManager { public static final OpenSshHostKeysHandler INSTANCE = new OpenSshHo...
0
package org.apache.http.nio.testserver;
0
// put the core into the context this.appContext.put(Core.ROLE, core); return (Core)this.parentManager.lookup(Core.ROLE); if ( Core.ROLE.equals(key) ) { if ( Core.ROLE.equals(key) ) {
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/compiler/CoreFunction.java,v 1.3 2002/04/24 04:05:38 dmitri Exp $ * $Revision: 1.3 $ * $Date: 2002/04/24 04:05:38 $ * @version $Revision: 1.3 $ $Date: 2002/04/24 04:05:38 $
0
import java.io.IOException; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; import java.util.List; import java.util.concurrent.atomic.AtomicReference; private final byte[][] endKeys; super(HFileOutputFormat2.class, toConf(updaters, conf)); private sta...
0
* @version $Revision: 1.10 $ $Date: 2004/04/01 02:55:31 $
0
// Adds dependencies (except named dependencies, which are managed by the lifecycle handler). addUnamedDependencies(b, dm, srv, srvMeta, depsMeta);
0
import org.apache.hc.client5.http.CircularRedirectException; import org.apache.hc.client5.http.RedirectException;
0
getConfigurationsDisabledThenEnable(pid, 0, ComponentConfigurationDTO.UNSATISFIED_REFERENCE); ComponentConfigurationDTO cc = getDisabledConfigurationAndEnable(pid, ComponentConfigurationDTO.UNSATISFIED_REFERENCE); findComponentConfigurationByName(pid, ComponentConfigurationDTO.UNSATISFIE...
0
import org.apache.cocoon.Cocoon; // protected Configuration getConfiguration() { // DefaultConfiguration config = new DefaultConfiguration("cocoon", "CoreBlockActivator"); // return config; // } manager.addInstance(Cocoon.class.getName(), this.processor);
0
input -> input.getName(); input -> input.getSimpleName(); annotation -> { String annotationName = annotation.annotationType().getName(); String annotationNameWithoutPackage = annotationName.substring(annotationName.lastIndexOf('.') + 1).replace('$', '.'); String ann...
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
* This implements the coercion table in RFC 190 5.6.3 //annotation fields can be primitives, String, Class, enums, annotations, and arrays of the preceding types final Class clazz = type; return ( (Character) o ).charValue(); return ( (Character) o ).charValue(); ret...
0
import java.security.AccessController; import java.security.PrivilegedAction; public void configurationEvent(final ConfigurationEvent configurationEvent) { if (System.getSecurityManager() != null) { AccessController.doPrivileged( new PrivilegedAction<Void>() ...
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableMap;
0
private final Collection<Capability> caps = new HashSet<Capability>();
0
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Lists;
0
.addTransition(State.INSTALLED, State.INSTALLED, ServiceComponentHostEventType.HOST_SVCCOMP_OP_SUCCEEDED, new ServiceComponentHostOpCompletedTransition()) State.INSTALLING, ServiceComponentHostEventType.HOST_SVCCOMP_INSTALL, new ServiceCompo...
0
import org.apache.htrace.HTraceConfiguration; // Visible for testing SendSpansViaThrift() {} public SendSpansViaThrift(HTraceConfiguration conf) { super(conf);
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/adapters/Attic/AbstractCollectionCharCollection.java,v 1.2 2003/08/31 17:21:17 scolebourne Exp $ * any, must include the following acknowledgement: * Alternately...
0
Iterator<EncryptionProperty> getEncryptionProperties();
0
import org.joda.time.DateTime; public BeamSqlPrimitive<DateTime> evaluate(Row inputRow, BoundedWindow window) { return BeamSqlPrimitive.of(SqlTypeName.TIMESTAMP, new DateTime(((IntervalWindow) window).start()));
0
/* $Id$ *
0
import org.apache.ambari.server.audit.event.kerberos.CreatePrincipalKerberosAuditEvent; import org.junit.Test;
0
String base = System.getProperty("basedir") == null ? "./": System.getProperty("basedir"); File dir = new File(base + fs +
0
ValidateUtils.checkNotNull( createConnectionCompletionHandler(future, socket, getFactoryManager(), getIoHandler()), "No connection completion handler created for %s", address); address, t.getClass().getSimpleName(), t.getMes...
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 List<TraceInformation> traces = new ArrayList<>(); public TraceList() {}
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
CloudObjects.asCloudObject(coder, /*sdkComponents=*/ null), KvCoder.of(keyCoder, IterableCoder.of(valueCoder)), IntervalWindowCoder.of()), /*sdkComponents=*/ null), IntervalWindowCoder.of()), /*sdkComponents=*/ null),
0
private Map<Role, Float> successFactors = new HashMap<>();
0
if (span != null) { span.stop(); org.htrace.Tracer.getInstance().continueSpan(null); }
0
* Copyright 2001-2006 The Apache Software Foundation.
0
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- * @version CVS $Id: ScriptablePropertyPointer.java,v 1.3 2003/05/01 09:32:34 coliver Exp $ public Object getImmediateNode() { Object value; if (index == WHOLE_COLLECTION) { value = getBaseValue(); } ...
0
import java.io.IOException; import java.util.Collection;
0
private static final long serialVersionUID = -4820523787212147844L;
1
* See https://issues.apache.org/jira/browse/BEANUTILS-291
0
public FileName createName(final String path, final FileType type) protected void appendRootUri(final StringBuilder buffer, final boolean addPassword)
1
import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger LOG = LoggerFactory.getLogger(ClusterResourceProvider.class);
0
import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.nullValue; import org.apache.beam.runners.spark.aggregators.metrics.sink.InMemoryMetrics; import org.junit.rules.ExternalResource; @Rule public ExternalResource inMemoryMetricsSink = new InMemoryMetricsSinkRule(); assertThat(InMemoryM...
0
@Override protected int defaultTimeoutSeconds() { return 90; } @Test
0
@Deprecated
0
* Use <code>onePredicate</code> if you want that.
0
import org.apache.http.HttpEntity; HttpEntity generate(
0
import org.apache.hc.core5.http.ContentType;
0
final Path root = dir.toPath();
0
private String traitName; Assert.assertTrue( e.getMessage().contains("\"error\":\"Cannot convert value '2014-07-11' to datatype date\"")); TypesUtil.createClassTypeDef("test", ImmutableList.<String>of(), traitName = "PII_Trait" + randomString(); Assert.a...
0
* or more contributor license agreements. See the NOTICE file * regarding copyright ownership. The ASF licenses this file * with the License. You may obtain a copy of the License at * KIND, either express or implied. See the License for the
0
if (!PipelineRunner.class.isAssignableFrom(runnerClass)) {
0
* @version CVS $Id: FlowVelocityGenerator.java,v 1.10 2003/09/04 09:38:34 cziegeler Exp $ public class FlowVelocityGenerator extends ServiceableGenerator
0
* @param commonAtts common configuration attributes {@link org.apache.cocoon.forms.binding.JXPathBindingBuilderBase.CommonAttributes}
0
* Sends a request to obtain the log file names for a given host * @return a HostLogFilesResponse, containing include the log file names for components associated * with a hostname HostLogFilesResponse sendGetLogFileNamesRequest(String hostName);
0
public boolean globalExtender() { return globalExtender; }
0
import java.util.HashSet; } private static Predicate<Number> EQUALS_TWO = new Predicate<Number>() { public boolean evaluate(Number input) { return (input.intValue() == 2); } }; public void testSelect() { List<Integer> list = new ArrayList<Integer>(); lis...
0
Matchers.containsInAnyOrder( Matchers.containsInAnyOrder( assertThat(shard.getWindows(), Matchers.contains(GlobalWindow.INSTANCE)); Matchers.containsInAnyOrder(
0
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicInteger; private final Map<InetAddress, AtomicInteger> ipMap = new ConcurrentHashMap<>(); private void addCnxn(final NettyServerCnxn cnxn) { InetAddress addr = ((InetSocketAddress) cnxn.getChannel().remot...
0
List<TupleTag<?>> additionalOutputTags, additionalOutputTags, List<TupleTag<?>> additionalOutputTags, additionalOutputTags,
0
new HostsMap((String) null), null, injector.getInstance(UnitOfWork.class), cdb, injector.getInstance(RequestFactory.class), null);
0
import java.util.HashMap; import java.util.Map;
0
public void testIdentityFilterByPredicate() { @Category(RunnableOnService.class) public void testNoFilterByPredicate() { public void testFilterByPredicate() { public void testFilterLessThan() { .apply(Create.of(1, 2, 3, 4, 5, 6, 7)) .apply(Filter.lessThan(4)); PAssert.that(output).contains...
0
* $Id$ * $Rev$ * $Date$ * Copyright 2001-2005 The Apache Software Foundation
0
// Initialized in init() private @Nullable ResidualElements residualElements;
0
throw new XMLSecurityException(ex, "empty"); throw new XMLSecurityException(ex, "empty"); throw new XMLSecurityException(ex, "empty");
0
import org.apache.sshd.common.util.logging.AbstractLoggingBean;
0
import org.apache.accumulo.core.iterators.IteratorUtil.IteratorScope; TABLE_ITERATOR_SCAN_PREFIX(TABLE_ITERATOR_PREFIX.getKey() + IteratorScope.scan.name() + ".", null, PropertyType.PREFIX, "Convenience prefix to find options for the scan iterator scope"), TABLE_ITERATOR_MINC_PREFIX(TABLE_ITERATOR_PREFIX.getKey() +...
0
package org.apache.beam.sdk.extensions.euphoria.core; import org.apache.beam.sdk.extensions.euphoria.core.testkit.FlatMapTest; import org.apache.beam.sdk.extensions.euphoria.core.testkit.JoinTest; import org.apache.beam.sdk.extensions.euphoria.core.testkit.ReduceByKeyTest;
0
package org.apache.bcel.verifier; import org.apache.bcel.verifier.tests.TestReturn01Creator; import org.apache.bcel.verifier.tests.TestReturn03Creator;
1
* <p> * <p> * <p>
0
import org.apache.sshd.server.session.ServerSession; protected List<OpenSSHExtension> resolveOpenSSHExtensions(ServerSession session) { List<OpenSSHExtension> original = super.resolveOpenSSHExtensions(session); buffer.putByte((byte) SftpConstants.S...
0
package org.apache.beam.sdk.extensions.gcp.util;
0
import org.apache.log4j.Level; final String LOG_MESSAGE_KEY = SolrUtil.class .getSimpleName() + "_SOLR_UTIL"; LogFeederUtil.logErrorMessageByInterval( LOG_MESSAGE_KEY, "Error constructing solrUtil", e, logger, Level.WARN); l...
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...
0
import java.awt.Graphics2D;
0
import com.google.inject.persist.jpa.AmbariJpaPersistModule; injector = Guice.createInjector(new InMemoryDefaultTestModule()); configGroup.refresh();
0
package org.apache.commons.vfs.operations; import org.apache.commons.vfs.FileSystemException; /** * FileOperations interface provides API to work with operations. * * @see FileOperation on what a operation in the context of VFS is. * * @author Siarhei Baidun * @since 0.1 */ public interface FileOperations { ...
0
public class ShipperConfigOperationDescriptions { public static final String GET_SERVICE_NAMES = "Get service names"; public static final String GET_SHIPPER_CONFIG = "Get shipper config"; public static final String SET_SHIPPER_CONFIG = "Set shipper config"; }
0
import org.apache.ambari.server.events.MetadataUpdateEvent; expect(cluster.getClusterId()).andReturn(1L).atLeastOnce(); expect(controller.getClusterMetadataOnConfigsUpdate(eq(cluster))) .andReturn(createNiceMock(MetadataUpdateEvent.class)) .once(); replay(clusters, cluster, zeppelinEnvConf, ...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/MapDynamicPropertyHandler.java,v 1.2 2002/04/24 03:29:33 dmitri Exp $ * $Revision: 1.2 $ * $Date: 2002/04/24 03:29:33 $ import java.util.Iterator; import java.util.Map; * @version $Revisi...
0
* Copyright 2000-2009 The Apache Software Foundation
0
* @param <K> the key type * @param <V> the value type
0
* @since 2.2
0
} else { }
0
public static final String EXTENSIONS_DIR_PATH = "extensions.path"; * Gets ambari extensions-path * @return String */ public String getExtensionsPath() { return properties.getProperty(EXTENSIONS_DIR_PATH); } /**
0
import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.UriInfo; import org.apache.ambari.server.api.resources.ResourceDefinition; import org.apache.ambari.server.api.resources.ResourceInstance; import org.junit.Test;
0
import org.apache.beam.sdk.testing.NeedsRunner; import org.junit.experimental.categories.Category; @Category(NeedsRunner.class)
0
@Test public void testTernaryFail() throws Exception { JexlEvalContext jc = new JexlEvalContext(); JexlExpression e = JEXL.createExpression("false ? bar : quux"); Object o; jc.setStrict(true); jc.setSilent(false); try { o = e.evaluate(jc); ...
0
int hashcode = builder.hashCode(); int port = PortUtils.getRandomFreePort();
0
EasyMock.isA(HttpClientContext.class), EasyMock.isA(HttpClientContext.class),
0
import org.apache.accumulo.core.security.SecurityUtil;
0
import org.apache.felix.framework.util.manifestparser.Capability; ManifestParser mp = new ManifestParser(m_logger, m_configMap, this, m_headerMap); capList.add( new Capability( this, caps[capIdx]....
0
import com.twitter.mesos.gen.JobKey; * Fetches the update configuration (if present) for the given job key. * @param jobKey Job to fetch update configuration for. Optional<JobUpdateConfiguration> fetchJobUpdateConfig(JobKey jobKey); * @deprecated Use {@link #removeShardUpdateConfigs(com.twitter.mesos.gen.J...
0
/* * Copyright 2016-2018 Seznam.cz, a.s.
0
import org.apache.beam.model.fnexecution.v1.BeamFnApi; import org.apache.beam.model.fnexecution.v1.BeamFnApi.RegisterResponse;
0
/** * VALIDATOR-296 - A / or a ! is valid in the user part, * but not in the domain part */ public void testEmailWithSlashes() { assertTrue( "/ and ! valid in username", validator.isValid("joe!/blow@apache.org") ); assertFalse( "/...
0
Copyright 2001,2003 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 l...
0