Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
columns.add(new DBColumnInfo("label", String.class, 255, null, true));
0
if (upgradeStack.equals(stackToFind) && upgradePack.getType().equals(upgradeType)) {
0
int numToScan = rand.nextInt(maxScan - minScan) + minScan;
0
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkNotNull;
0
import org.apache.ambari.server.controller.RootService; String ambariServiceName = RootService.AMBARI.name();
0
import org.ow2.chameleon.testing.helpers.BaseTest; import java.util.Arrays; import java.util.List; public class TestPrimitiveTypesWithNumberInNames extends BaseTest { @Override protected List<String> getExtraExports() { return Arrays.asList("org.apache.felix.ipojo.runtime.core.components"); }
0
import java.io.File; import java.io.FileFilter; import org.junit.Assert; import junit.framework.TestCase; private static void test(File lib) throws IOException { System.out.println("parsing " + lib); total.start(); JarFile jar = new JarFile(lib); if (e.getName().endsWith(".class...
0
private final Log log = LogFactory.getLog(Jira87TestCase.class);
0
/** Produces a {@link SetCoder} with the given {@code elementCoder}. */ * @throws NonDeterministicException always. Sets are not ordered, but they are encoded in the * order of an arbitrary iteration. throw new NonDeterministicException( this, "Ordering of elements in a set may be non-determinis...
1
if (this.userAgent != null) { request.addHeader(HTTP.USER_AGENT, this.userAgent);
0
import org.apache.ambari.server.orm.OrmTestHelper; private OrmTestHelper helper; helper = injector.getInstance(OrmTestHelper.class); helper.getOrCreateRepositoryVersion(stackId.getStackName(), stackId.getStackVersion());
0
package org.apache.felix.ipojo.manipulator.util; import java.io.IOException; import java.io.InputStream; import java.util.Properties; /** * A static class to access the constant written during packaging. */ public class Constants { public static String CONSTANTS_PATH = "META-INF/constants.properties"; publ...
0
* * @version $Id$
0
import org.apache.http.protocol.HttpRequestExecutor;
0
/* $Id$
0
package org.apache.hc.core5.http.nio;
1
/** Like {@link #compose(SerializableFunction)}, but with a custom name. */ @Experimental public static <InputT extends PInput, OutputT extends POutput> PTransform<InputT, OutputT> compose(String name, SerializableFunction<InputT, OutputT> fn) { return new PTransform<InputT, OutputT>(name) { @Ove...
0
* @version $Revision$
1
import org.apache.felix.scr.impl.helper.ComponentMethods; import org.apache.felix.scr.impl.helper.SimpleLogger; public abstract class AbstractComponentManager implements Component, SimpleLogger private final ComponentMethods m_componentMethods; * @param componentMethods protected AbstractComponentManager(...
0
thrown.expectMessage(not(containsString("State"))); // lowercase "state" is in the package name thrown.expectMessage(not(containsString("State"))); // lowercase "state" is in the package name
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/model/beans/Attic/DynamicPointer.java,v 1.6 2002/10/20 03:47:17 dmitri Exp $ * $Revision: 1.6 $ * $Date: 2002/10/20 03:47:17 $ import org.apache.commons.jxpath.JXPathIntrospector; * @v...
0
import java.util.Collections; // Add new sequences for view entity // Add missing property for YARN updateConfigurationProperties("global", Collections.singletonMap("jobhistory_heapsize", "900"), false);
0
* Tests for {@link BigQueryCoderProviderRegistrar}. public class BigQueryCoderProviderRegistrarTest { CoderRegistry.createDefault().getCoder(TableRow.class); CoderRegistry.createDefault().getCoder(TableRowInfo.class);
0
.apply(BigQueryIO.writeTableRows()
0
try (CloseableHttpClient httpclient = HttpClients.createDefault()) { try (CloseableHttpResponse response = httpclient.execute(httppost)) {
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/decorators/Attic/TestAll.java,v 1.15 2003/09/20 16:57:20 scolebourne Exp $ * @version $Revision: 1.15 $ $Date: 2003/09/20 16:57:20 $ suite.addTest(TestBlockingBuffer.suite...
0
import com.google.common.base.MoreObjects; return MoreObjects.toStringHelper(this).add("id", id).add("stack", stack).add("version",
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 ap...
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...
1
if (stat != null) { n.copyStat(stat); }
0
package org.apache.beam.runners.direct.portable; /** Tests for {@link ImmutableListBundleFactory}. */ private <T> CommittedBundle<T> afterCommitGetElementsShouldHaveAddedElements( Iterable<WindowedValue<T>> elems) { CommittedBundle<KV<String, Integer>> keyedBundle = bundleFactory .create...
0
log.setLevel(getLogLevel(context));
0
/* * Copyright 1999-2006 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 ap...
0
import org.apache.ambari.logsearch.config.api.model.inputconfig.FilterKeyValueDescriptor; sourceField = filterDescriptor.getSourceField(); valueSplit = StringUtils.defaultString(((FilterKeyValueDescriptor)filterDescriptor).getValueSplit(), valueSplit); fieldSplit = StringUtils.defaultString(((FilterKeyValue...
0
pid=DictionaryAspect.PID)
0
import org.apache.aurora.scheduler.base.Query; import org.apache.aurora.scheduler.base.Tasks; import org.apache.aurora.scheduler.storage.Storage.StoreProvider; import org.apache.aurora.scheduler.storage.entities.IJobKey; * Initializes an {@link AttributeAggregate} instance from data store. * * @param storeProv...
0
extends RawPTransform<PCollection<Iterable<ElemT>>, PCollectionView<ViewT>> {
0
private volatile boolean shutdown = false; public synchronized void startup() { // check to avoid startup follows shutdown if (shutdown) { LOG.warn("Not starting Read-only server as startup follows shutdown!"); return; } LOG.info("Read-only server started"...
0
in.readFully(keyEncryptionKey);
0
package org.apache.xml.security.stax.impl.processor.input; import org.apache.xml.security.stax.ext.*; import org.apache.xml.security.stax.ext.stax.XMLSecEvent;
0
import org.apache.http.Consts; import org.apache.http.entity.ContentType; "This is the first test request", ContentType.create("text/plain", Consts.UTF_8)), "This is the second test request".getBytes("UTF-8"), ...
0
public abstract class AbstractAuthenticationProviderTest extends EasyMockSupport {
0
HostImpl host = new HostImpl("foo"); HostImpl host = new HostImpl("foo"); HostImpl host = new HostImpl("foo"); HostImpl host = new HostImpl("foo");
0
LOG.info("JsonRow - {}", row); Assert.assertNotNull(row.getString("type")); LOG.info("JsonRow - {}", row); Assert.assertNotNull(row.getString("type")); referenceable.set("qualifiedName", name); referenceable.set("clusterName", locationUri + name); Refe...
0
import org.apache.cocoon.configuration.Settings; final Settings settings = (Settings)manager.lookup(Settings.ROLE); this.classManager.addDirectory(new File(settings.getWorkDirectory()));
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/test/org/apache/commons/jxpath/NestedTestBean.java,v 1.2 2002/04/10 03:40:21 dmitri Exp $ * $Revision: 1.2 $ * $Date: 2002/04/10 03:40:21 $ * @version $Revision: 1.2 $ $Date: 2002/04/10 03:40:21 $ private int integ...
0
import org.apache.beam.sdk.Pipeline; import org.apache.beam.sdk.io.*; import org.apache.beam.sdk.options.Default; import org.apache.beam.sdk.options.Description; import org.apache.beam.sdk.options.PipelineOptionsFactory; import org.apache.beam.sdk.transforms.*; import org.apache.beam.sdk.transforms.windowing.*; import ...
0
* Copyright (c) OSGi Alliance (2005, 2016). All Rights Reserved. * @author $Id: 90d50e4d3f69b659bed23beedab6e54b31b96d76 $ @Override @Override @Override @Override @Override private StringBuilder normalize() { StringBuilder sb = new StringBuilder(); if (value1 instanceof Version) { return compa...
1
public boolean equals( Object o ) { if ( this == o ) { return true; } if ( o == null || getClass() != o.getClass() ) { return false; } Option option = (Option) o; if ( opt != null ? !opt.equals( option.opt ) : option.opt...
0
import org.apache.ambari.server.state.HostEvent; import org.apache.ambari.server.state.HostEventType;
0
features.put("SVGEvents", "1.0");
0
/* * Copyright 2004,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...
0
package org.apache.felix.karaf.admin.command; import org.apache.felix.karaf.admin.AdminService; import org.apache.felix.karaf.admin.InstanceSettings; InstanceSettings expectedIS =
0
/* * $Header: /cvshome/build/ee.foundation/src/java/util/jar/JarOutputStream.java,v 1.6 2006/03/14 01:20:30 hargrave Exp $ * * (C) Copyright 2001 Sun Microsystems, Inc. * Copyright (c) OSGi Alliance (2001, 2005). All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may n...
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
final long walogMaxSize = aconf.getAsBytes(Property.TSERV_WALOG_MAX_SIZE); long total = TabletServer.this.getConfiguration().getAsBytes(Property.TSERV_TOTAL_MUTATION_QUEUE_MAX); return getConfiguration().getAsBytes(Property.TSERV_MAJC_THROUGHPUT);
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
return DoFnLifecycleManager.of(bound.getNewFn()); fnLocal.get(),
0
private static final String METRIC_NAME = "Aggregators"; private final String name; public AggregatorMetricSource(final String name, final NamedAggregators aggregators) { this.name = name; metricRegistry.register(METRIC_NAME, AggregatorMetric.of(aggregators)); return name;
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 static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; @org.junit.jupiter.api.Test @org.junit.jupiter.api.Test assertTrue(input.isInitialized(), "Input is initialized"); @...
0
package org.apache.commons.digester3.plugins; import org.apache.commons.digester3.Digester;
1
import com.google.common.collect.ImmutableList; import org.apache.atlas.groovy.ArithmeticExpression.ArithmeticOperator; import org.apache.atlas.typesystem.types.TypeSystem; import org.apache.atlas.typesystem.types.cache.TypeCache.TYPE_FILTER; import java.util.ArrayList; import java.util.Collections; import java.util.C...
1
/** * @since 6.0 */
0
public void startElement(String uri, String localName, Properties attrib) public void endElement(String uri, String localName) throws ParseException /** * @see org.apache.felix.scr.parser.KXml2SAXHandler#characters(java.lang.String) */ public void characters( String text ) throws ParseException ...
0
Writer map = new MapFile.Writer(ns.getConf(), new Path(path + "/log1"), Writer.keyClass(LogFileKey.class), Writer.valueClass(LogFileValue.class));
0
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument; import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkNotNull; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Objects; import org.apache.beam.vendor.gua...
0
ServerSession session = getServerSession(); if (log.isDebugEnabled()) { log.debug("next({})[{}] process command={}", this, session, KeyExchange.Utils.getSimpleKexOpcodeName(cmd)); } "Protocol error: expected packet SSH_MSG_KEXDH_INIT, got " + KeyExchange.Utils.ge...
0
MAP_VALUE = new TreeMap<>(); MAP_VALUE_SPARSE = new TreeMap<>();
1
ServiceComponentHostResponse shr1 = new ServiceComponentHostResponse(clusterName, serviceName, componentName, displayName, hostName, publicHostname, desiredState, "", null, null, null, null); ServiceComponentHostResponse shr1 = new ServiceComponentHostResponse(clusterName, serviceName, c...
0
package org.apache.jute.compiler;
0
import org.apache.beam.vendor.grpc.v1p13p1.com.google.protobuf.ByteString; import org.apache.beam.vendor.grpc.v1p13p1.com.google.protobuf.TextFormat;
0
* Where possible substitues plain arabic glyphs with their shaped * forms. This is needed when the arabic text is rendered using * an AWT font. Simple arabic ligatures will also be recognised * and replaced by a single character so the length of the * resulting string may be shorter than the ...
0
if (bbox != null && (bbox.getWidth() == 0 || bbox.getHeight() == 0)) {
0
assertEquals(new BasicUserPrincipal("name"), creds1.getUserPrincipal()); assertEquals("[principal: name]", creds1.toString()); assertEquals(new BasicUserPrincipal("name"), creds2.getUserPrincipal()); assertEquals("[principal: name]", creds2.toString()); ...
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 ...
0
import javax.annotation.Nullable; private static PackageAttributes makePackageAttributes( File file, @Nullable String overridePackageName) throws IOException { PackageAttributes attributes = PackageUtil.PackageAttributes.forFileToStage(file, STAGING_PATH); if (overridePackageName != null) { attri...
0
@Test @SuppressWarnings("unchecked") public void testSimpleBuildWithValueSorted() { Flow flow = Flow.create("TEST"); Dataset<String> dataset = Util.createMockDataset(flow, 2); Windowing<String, ?> windowing = Time.of(Duration.ofHours(1)); Dataset<Long> output = ReduceWindow.of(dataset) .r...
0
package org.apache.felix.ipojo.test.scenarios.component; public class SimpleClass { // This class do not implement any interface, it will be exposed as SimpleClass public String hello() { return "Hello"; } }
0
i, "aaaaaaaaaabbbbbbbbbbccccccccccddddddddddeeeeeeeeee" + "ffffffffffgggggggggghhhhhhhhhhiiiiiiiiiijjjjjjjjjj"));
0
import org.apache.accumulo.core.util.ContextFactory; AccumuloInputFormat.setInputInfo(job.getConfiguration(), "root", "".getBytes(), "testtable1", new Authorizations()); AccumuloInputFormat.setMockInstance(job.getConfiguration(), "testmrinstance"); AccumuloOutputFormat.setOutputInfo(job, "root", "".getBytes...
0
// Use OrFinallyTrigger instead of AfterFirst because the continuation of ACTUAL // may not be a OnceTrigger. return Repeatedly.forever( new OrFinallyTrigger<W>( continuationTriggers.get(ACTUAL), (Trigger.OnceTrigger<W>) continuationTriggers.get(UNTIL)));
0
shellState.getReader().print(sb.toString()); shellState.getReader().println("Waiting for trace information"); shellState.getReader().flush(); shellState.getReader().print(sb.toString()); shellState.getReader().println("Not tracing"); shellState.getRead...
0
import cz.seznam.euphoria.core.client.operator.Builders.Output;
0
package org.apache.hc.core5.http.impl.io.bootstrap;
1
import org.apache.batik.css.engine.value.ValueManager;
0
properties.put(HostResourceProvider.HOST_GROUP_PROPERTY_ID, GROUP1_NAME); properties.put(HostResourceProvider.HOST_NAME_PROPERTY_ID, HOST1_NAME); properties.put(HostResourceProvider.HOST_GROUP_PROPERTY_ID, GROUP2_NAME); properties.put(HostResourceProvider.HOST_GROUP_PROPERTY_ID, GROUP3_NAME); proper...
0
import java.util.Collection; import org.apache.ambari.server.configuration.AmbariServerConfigurationProvider; import org.apache.ambari.server.orm.GuiceJpaInitializer; * * @see AmbariServerConfigurationProvider public class AmbariLdapConfigurationProvider extends AmbariServerConfigurationProvider<AmbariLdapConfigurati...
0
public Shape getFilterExtent() { return getBounds2D(); }
0
@Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override
0
import com.google.common.annotations.VisibleForTesting; @VisibleForTesting public class LockManagerImpl implements LockManager {
0
* The JMX object name, may be null.
0
import org.apache.http.util.EntityUtils; EntityUtils.consume(e1); EntityUtils.consume(e2); EntityUtils.consume(e1); EntityUtils.consume(e2); EntityUtils.consume(e1); EntityUtils.consume(e2); EntityUtils.consume(e1);
0
protected org.apache.accumulo.core.client.mapreduce.RangeInputSplit split; split = (org.apache.accumulo.core.client.mapreduce.RangeInputSplit) inSplit; splits.add(new org.apache.accumulo.core.client.mapreduce.RangeInputSplit(ke.clip(r), new String[] {location})); splits.add(new org.apache....
0
* This class serves as a base for all {@link HttpConnection} implementations and provides * functionality common to both client and server HTTP connections. * <p/> protected SessionInputBuffer getSessionInputBuffer() { return this.inbuffer; } protected SessionOutputBuffer getSessionOutputBuffer(...
0
import static org.easymock.EasyMock.expect; import static org.easymock.EasyMock.expectLastCall; import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.NoSuchAlgorithmException; import java.security.interfaces.RSAPrivateKey; import java.security.interfaces.RSAPublicKey; import java.ut...
0
import java.util.StringTokenizer;
0
// suppress lgtm alert - synchronized variable is not always true if (events == statusChangeEvents) { // lgtm [java/constant-comparison] // suppress lgtm alert - synchronized variable is not always true if (events == statusChangeEvents) { // lgtm [java/constant-comparison]
0
* This is the sister interface of {@link Decoder}. Every implementation of * Encoder provides this common generic interface whic allows a user to pass a * generic Object to any Encoder implementation in the codec package.</p> * @version $Id: Encoder.java,v 1.5 2003/10/04 16:24:14 tobrien Exp $
0
package org.apache.beam.runners.flink; class FlinkStreamingPipelineTranslator extends FlinkPipelineTranslator {
0