Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
* @param buffer the buffer containing chars of the line.
0
/** * A status which represents a COMPLETED state at 0% */ public static final CalculatedStatus COMPLETED = new CalculatedStatus(HostRoleStatus.COMPLETED, HostRoleStatus.COMPLETED, 100.0); /** * A status which represents a PENDING state at 0% */ public static final CalculatedStatus PENDING = ...
0
import java.io.ByteArrayInputStream; * Key used for public identifiers */ public static final String KEY_SKIPPABLE_PUBLIC_IDS = "skippablePublicIds"; /** * The DTD public IDs we know we can skip. */ protected static String skippable_dtdids; /** if (rb == null) ...
0
import com.google.common.net.HostAndPort; HostAndPort master = HostAndPort.fromString(locations.get(0)); if (0 == master.getPort())
0
public FileWriterWithEncodingTest(final String name) { final File encodingFinder = new File(getTestDirectory(), "finder.txt"); } catch (final IOException ex) { final char[] arr = new char[1024]; } catch (final AssertionFailedError ex) { } catch (final Assertio...
1
/** * Create a new ContainerPointer. * @param container Container object * @param locale Locale */ /** * Create a new ContainerPointer. * @param parent parent pointer * @param container Container object */ * @return <code>true</code>. /** * {@inheritDoc} ...
0
private int serverPort; String projectVersion, int serverPort) this.serverPort = serverPort; String commands[] = new String[11]; commands[9] = this.serverPort+""; commands[10] = this.passwordFile.toString(); " version=" + projectVersion + " serverPort=" + this.serverPort);
0
import org.apache.cocoon.environment.Environment; public class BlockPathModule implements InputModule {
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 ma...
0
/* ==================================================================== * Copyright (c) 2001-2004 The Apache Software Foundation. All rights * @version $Revision: 1.14 $ $Date: 2004/01/14 21:34:31 $
0
* http://www.apache.org/licenses/LICENSE-2.0
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestPredicateUtils.java,v 1.3 2003/10/05 21:23:21 scolebourne Exp $ * Copyright (c) 2001-2003 The Apache Software Foundation. All rights * @version $Revision: 1.3 $ $Date: 2003/...
0
import org.apache.hc.core5.http2.impl.H2Processors; import org.apache.hc.core5.http2.impl.nio.ClientH2StreamMultiplexerFactory; class InternalClientH2EventHandlerFactory implements IOEventHandlerFactory { InternalClientH2EventHandlerFactory( final ClientH2StreamMultiplexerFactory http2StreamHandlerFactory =...
0
package aQute.bnd.osgi;
0
* Implementations may accept {@code null} * never {@code null} * @return {@code true} if the tunnelled route is secure, * {@code false} otherwise. * The implementation here always returns {@code false}, * {@code route.ge...
0
config.getNodeModel().getNodeHandler());
0
public class ConstantPool implements Cloneable, Node {
1
import static java.util.Objects.requireNonNull; UnaryFunction< org.apache.beam.sdk.extensions.euphoria.core.client.dataset.Dataset<T>, Output<OutputT>> output) {
0
import org.apache.hc.core5.io.ShutdownType; server.shutdown(ShutdownType.GRACEFUL);
0
import java.util.LinkedList; import org.xml.sax.ContentHandler; import org.xml.sax.ext.LexicalHandler; * Java 1.3 contentHandler access method. * <br> * Access to {#contentHandler} from inner class on Java 1.3 causes NoSuchMethod error. */ private ContentHandler getContentHandler() { re...
0
if (! validated && autoDeploy != null && autoDeploy.isEnabled() && cardinality.supportsAutoDeploy()) { componentName, new Cardinality("1+"), autoDeployInfo, stack, clusterConfig); /** * Determine if the cardinality count supports auto-deployment. * This determination is independent ...
0
/* Copyright 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
* 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
package org.apache.ambari.server.api.util;
0
* @param transformObject the Transform object throw new UnsupportedOperationException(); * @param transformObject the Transform object return enginePerformTransform(input, null, transformObject); return enginePerformTransform(input, null);
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
import org.junit.Rule; @Rule public TestPipeline p = TestPipeline.create();
0
log.warn("lookup failed for tablet {}", entry.getKey(), e);
0
* * * public static class Opts extends ClientOnRequiredTable { @Parameter(names = "--min", description = "miniumum row that will be generated") @Parameter(names = "--max", description = "maximum ow that will be generated") @Parameter(names = "--num", required = true, desc...
0
/** {@link org.apache.log4j} logging facility */ static org.apache.log4j.Category cat = org.apache.log4j.Category .getInstance(TransformXPath2Filter.class.getName()); cat.debug("perform xfilter2 on " + inputSet.size() + " nodes"); XPath2FilterContainer.XPathFilter2NS, ...
0
import org.apache.log4j.Logger; private static final Logger log = Logger.getLogger(VersioningIteratorTest.class); log.error(e); log.error(e); log.error(e); log.error(e);
0
import org.apache.accumulo.server.replication.WorkAssigner;
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 FileSystem createSftpFileSystem() throws IOException { return createSftpFileSystem(SftpVersionSelector.CURRENT); } default FileSystem createSftpFileSystem(int version) throws IOException { return createSftpFileSystem(SftpVersionSelector.fixedVersionSelector(version)); } defau...
0
ArrayList<Pair<String,String>> expected = new ArrayList<>(); expected.add(new Pair<>(QueryUtil.getRow("").toString(), "1,0,3,3")); expected.add(new Pair<>(QueryUtil.getRow("/local").toString(), "2,1,2,3")); expected.add(new Pair<>(QueryUtil.getRow("/local/user1").toString(), "0,2,0,2")); expected.ad...
1
* {@link org.apache.http.auth.Credentials}. * If not defined then the * {@link org.apache.http.params.HttpProtocolParams#HTTP_ELEMENT_CHARSET * HttpProtocolParams.HTTP_ELEMENT_CHARSET} * should be used. * Defines the charset to be used when encoding * {@link org.apache.http.au...
0
package org.apache.http.nio.content;
0
for (BoundedSource<Bird> subSource : splits) { for (BoundedSource<Bird> subSource : splits) {
0
import java.nio.charset.StandardCharsets; import org.osgi.service.converter.ConversionException; public Appendable to(Appendable out) { try { out.append(encode(object)); return out; } catch (IOException e) { throw new ConversionException("Problem converting to YAM...
0
* Simple helper class which gets GSS credential using a fixed Krb5 login configuration. May need generalizing to deal
0
import org.apache.aurora.gen.HostAttributes; import org.apache.aurora.scheduler.storage.entities.IHostAttributes; import static org.apache.mesos.Protos.Offer; private static final HostOffer OFFER = createOffer(SLAVE_ID, SLAVE_HOST_1, 4, 1024, 1024); private static HostOffer createOffer(SlaveID slave, String slaveHo...
0
* <p>Used for assigning initial timestamps to values inserted into a pipeline
0
* $Id$ * $Rev$ * $Date$ * Copyright 2001-2005 The Apache Software Foundation
0
import static org.apache.beam.sdk.TestUtils.checkCombineFn; import static org.apache.beam.sdk.transforms.display.DisplayDataMatchers.hasDisplayItem; import static org.hamcrest.MatcherAssert.assertThat; import org.apache.beam.sdk.transforms.display.DisplayData; @Test public void testDisplayData() { Top.Smallest...
0
import org.apache.batik.dom.util.DoublyIndexedTable; /** * Table mapping XML attribute names to TraitInformation objects. */ protected static DoublyIndexedTable xmlTraitInformation; static { DoublyIndexedTable t = new DoublyIndexedTable(SVGOMElement.xmlTraitInformation); ...
0
package org.apache.atlas.falcon; import org.apache.atlas.MetadataException; import org.apache.atlas.typesystem.types.AttributeDefinition; import org.apache.atlas.typesystem.types.ClassType; import org.apache.atlas.typesystem.types.DataTypes; import org.apache.atlas.typesystem.types.EnumTypeDefinition; import org.apache...
0
import org.apache.beam.sdk.util.NameUtils.NameOverride; assertEquals("Embedded", NameUtils.approximateSimpleName(new EmbeddedOldDoFn())); assertEquals("Anonymous", NameUtils.approximateSimpleName(new EmbeddedOldDoFn() {})); assertEquals("DeeperEmbedded", NameUtils.approximateSimpleName(inner)); Name...
0
* This action adds HTTP headers to the response. * public class HttpHeaderAction extends AbstractConfigurableAction implements ThreadSafe {
0
import org.apache.beam.sdk.PipelineRunner;
0
import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger LOG = LoggerFactory.getLogger(HostComponentResourceProvider.class);
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
* Defines {@link org.apache.beam.sdk.options.PipelineOptions} for * <p>{@link org.apache.beam.sdk.options.PipelineOptions} encapsulates the various * using a {@link org.apache.beam.sdk.options.PipelineOptionsFactory}. package org.apache.beam.sdk.options;
0
import java.net.URL; /** * Returns the security settings for the given script * type, script url and document url * * @param scriptType type of script, as found in the * type attribute of the &lt;script&gt; element. * @param scriptURL url for the script, as defined in *...
0
import org.apache.ambari.annotations.ApiIgnore; @GET @ApiIgnore // until documented
0
return stackVersion.equals(s.stackVersion);
0
import java.text.ParseException; import org.apache.commons.beanutils.ConversionException; super(defaultValue, locale, pattern, locPattern); /** * Convert the specified locale-sensitive input object into an output object of the * specified type. This method will return values of type Short. *...
0
TestIngest.ingest(c, opts); VerifyIngest.verifyIngest(c, vopts); TestIngest.ingest(c, opts); VerifyIngest.verifyIngest(c, vopts);
0
public static ReshuffleTriggerStateMachine create() { return new ReshuffleTriggerStateMachine(); } private ReshuffleTriggerStateMachine() {
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 org.apache.beam.sdk.schemas.annotations.DefaultSchema;
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
List<ServiceTestInvocation> listInvocations = new ArrayList<>();
1
KerberosDescriptor descriptor = getKerberosDescriptor(commonServicesDirectory, "SPARK", "1.2.1");
0
/** {@inheritDoc} */ /** {@inheritDoc} */ /** {@inheritDoc} */ /** {@inheritDoc} */ /** {@inheritDoc} */ /** * Visit all children. * * @param visitor a {@link ParserVisitor}. * @param data data to be passed along to the visitor. * @return the value from visiting. *...
0
public static final String SERVICE_TYPE_ATLAS_CORE = "atlas_core"; private String serviceType; String serviceType, Map<String, String> options) { setServiceType(serviceType); public String getServiceType() { return serviceType; } public void se...
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
import java.util.function.Supplier;
0
return addAdditionalConfigurations(cluster, configurations.put("principals", principalNames(cluster, configurations));
0
import org.apache.hc.core5.reactor.ProtocolIOSession; public IOEventHandler createHandler(final ProtocolIOSession ioSession, final Object attachment) {
0
import org.apache.commons.net.ftp.FTPCmd; private void download(String path, FTPCmd command, File filename) throws Exception { self.download(path, FTPCmd.LIST, new File(DOWNLOAD_DIR, host+"_list.txt")); self.download(path, FTPCmd.MLSD, new File(DOWNLOAD_DIR, host+"_ml...
0
// FELIX-3360: Always clear dynamic binding if a new static // location is set. The static location is the relevant binding // for a configuration unless it is not explicitly set. setDynamicBundleLocation( null, false ); void tryBindLocation( final String bundleLocation )
0
/** Unit tests for {@link ModelAdaptersMapping}. */ private static final Schema PERSON_ROW_TYPE = Schema.builder() .addInt64Field("id") .addStringField("name") .addStringField("emailAddress") .addStringField("creditCard") .addStringField("city") .addSt...
1
import org.apache.atlas.model.notification.HookNotification; private List<HookNotification> messages = new ArrayList<>(); public void addMessage(HookNotification message) { public List<HookNotification> getMessages() {
1
* @author Enver Haase
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
/***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * * ------------------------------------------------------------------------- * * This software is published under the terms of the Apache Software License * * v...
0
import com.google.cloud.dataflow.sdk.options.PipelineOptions; import com.google.cloud.dataflow.sdk.util.BatchModeExecutionContext; PipelineOptions options = PipelineOptionsFactory.create(); DataflowExecutionContext context = BatchModeExecutionContext.fromOptions(options); options, BatchModeExe...
0
package org.apache.hadoop.metadata.typesystem; @nopublic */
0
* Creates a PoolableManagedConnectionFactory and attach it to a connection pool. * @param connFactory * XAConnectionFactory * @param dataSourceJmxName * The data source name. public PoolableManagedConnectionFactory(final XAConnectionFactory connFactory, final ObjectNam...
0
import java.lang.reflect.Array; final int arrayLength = Array.getLength(value); for(int m=0; m<arrayLength; m++) { b.append( Array.get(value, m).toString() );
0
import com.google.common.collect.ContiguousSet; import com.google.common.collect.DiscreteDomain; import com.google.common.collect.FluentIterable; import com.google.common.collect.Range; ConfigurationManager.scrubNonUniqueTaskFields(state.getAssignedTask().getTask())); Set<Integer> expectedInstanceIds = ...
0
* public class HdfsFileContentInfoFactory implements FileContentInfoFactory { private static final String CONTENT = "text/plain"; private static final String ENCODING = "UTF-8"; /** * Creates a FileContentInfo for a the given FileContent. * * @param fileContent * Use this FileContent to crea...
0
if (LOG.isDebugEnabled()) { LOG.debug("Unable to pull docker image {}", imageTag, e); } else { LOG.warn("Unable to pull docker image {}, cause: {}", imageTag, e.getMessage()); }
0
alert.setClusterId(cluster.getClusterId());
0
* @param obj the object to invoke the method upon
0
private Text tableName = null; context.write(tableName, m); tableName = new Text(job.getConfiguration().get("cloudgen.tablename"));
0
import static com.google.common.base.Preconditions.checkState; private final RootInputProvider rootInputProvider; RootInputProvider rootInputProvider, Map<Class<? extends PTransform>, Collection<ModelEnforcementFactory>> transformEnforcements, executorService, valueToCon...
0
List x509Datas=null; List encryptedKeys=null; if (x509Datas==null) x509Datas=new ArrayList(); x509Datas.add(x509data); if (encryptedKeys==null) encryptedKeys=new ArrayList(); encryptedKeys.add(encryptedKey); if (x509Datas!=null) { return x509Datas.size(); ...
0
* @author <a href="mailto:felix-dev@incubator.apache.org">Felix Project Team</a>
0
import org.apache.aurora.scheduler.storage.log.SnapshotterImpl; private SnapshotterImpl snapshotStore; private SnapshotterImpl getSnapshotStore() { bind(SnapshotterImpl.class).in(Singleton.class); return injector.getInstance(SnapshotterImpl.class);
0
outputLength = Integer.parseInt(textOfNode(paramsElem));
1
* @version $Revision$
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
private static final AnnotationHandlerFactory DEFAULT_HANDLER_FACTORY = new DefaultAnnotationHandlerFactory();
0
SHUTDOWN_REQUEST,
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
package org.apache.cocoon.components.source.helpers; * Parameter is used by {@link org.apache.cocoon.components.source.helpers.DelaySourceRefresher}.
0
* @version CVS $Id: PortalApplicationConfig.java,v 1.2 2003/09/18 14:38:46 vgritsenko Exp $ * @param doc a DOM document that holds all portal application configurations * @param application a DOM element, that holds the configuration of one portal application * @param elem a DOM element, that holds the...
0
import org.apache.cocoon.ojb.broker.components.PBFactory; PersistenceBroker broker = getPersistenceBroker(); broker.store(employee); PersistenceBroker broker = getPersistenceBroker(); employee = (Employee) broker.getObjectByIdentity(new Identity(employee, broker)); broker.store(employee); ...
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