Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
/** * 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 in writing, software * distribu...
0
import com.google.inject.Provider; import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.state.Clusters; * Used for looking cluster name by cluster id */ @Inject Provider<Clusters> m_clusters; /** try { aggregateAlert.setCluster(m_clusters.get().getClusterById(clusterId...
0
/** * Sets a timeout threshold for a server to respond. The batch scanner will accomplish as much work as possible before throwing an exception. BatchScanner * iterators will throw a {@link TimedOutException} when all needed servers timeout. * * <p> * If not set, the timeout defaults to MAX_INT ...
0
long lastMod = 0; if (reloadScripts && lastExecTime != 0) { lastMod = entry.getSource().getLastModified(); }
0
* Copyright 2016-2017 Seznam.cz, a.s.
0
p.getCoderRegistry().registerCoderForClass(UserString.class, UserStringCoder.of()); p.getCoderRegistry().registerCoderForClass(UserString.class, UserStringCoder.of()); p.getCoderRegistry().registerCoderForClass( UserString.class, NullableCoder.of(UserStringCoder.of())); p.getCoderRegistry().regi...
0
// Temporarily remove dependency callback instance (if set), because we don't want to call it twice (one time from the // internal aspect/adapter AbstractDecorator object, and another one time from the actual aspect/adapter component instances). // See FELIX-5155. ...
0
EqualsPredicate p1 = new EqualsPredicate<>("p1", "one"); EqualsPredicate p2 = new EqualsPredicate<>("p2", "two");
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...
0
this.initParams = getInitParams(ref, HttpWhiteboardConstants.HTTP_WHITEBOARD_FILTER_INIT_PARAM_PREFIX);
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...
0
@Parameter(names = {"-zi", "--zooKeeperInstanceName"}, description="use a zookeeper instance with the given instance name") private String zooKeeperInstanceName; @Parameter(names = {"-zh", "--zooKeeperHosts"}, description="use a zookeeper instance with the given list of zoo hosts") private String zooKeeperHost...
0
import org.junit.Assert; AuthInfo auth = new AuthInfo("root", ByteBuffer.wrap("".getBytes()), "instance"); gc.init(fs, instance, auth, false);
1
package org.apache.batik.gvt.filter; import org.apache.batik.ext.awt.image.GraphicsUtil;
0
comparator = DirectoryFileComparator.DIRECTORY_COMPARATOR;
0
final String baseTmpDir = System.getProperty("java.io.tmpdir"); protected void deleteFile(final File file) protected void removeFile(final Object file) protected void addFile(final Object file) final String safeBasename = UriParser.encode(baseName, TMP_RESERVED_CHARS).replace('%', '_');
1
assertEquals(null, header.getValue());
0
import org.apache.http.annotation.Immutable; import org.apache.http.util.Args; Args.notNull(response, "HTTP response");
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
* Copyright (c) OSGi Alliance (2000, 2009). All Rights Reserved. * <code>BundleActivator</code> is an interface that may be implemented when a * bundle's <code>BundleActivator</code> as required. If an instance's * <code>BundleActivator.start</code> method executes successfully, it is * guaranteed that the same in...
0
/***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * * ------------------------------------------------------------------------- * * This software is published under the terms of the Apache Software License * * v...
0
* DatastoreV1 Datastore related pipeline options. public interface V1TestOptions extends TestPipelineOptions {
0
* Autogenerated by Thrift Compiler (0.11.0) @javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
0
import com.twitter.mesos.scheduler.ThermosJank; @ThermosJank if (config.isSetThermosConfig()) { config.setConfigParsed(true); return config; }
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/ObjectCreateRule.java,v 1.5 2001/08/20 16:10:13 craigmcc Exp $ * $Revision: 1.5 $ * $Date: 2001/08/20 16:10:13 $ * @version $Revision: 1.5 $ $Date: 2001/08/20 16:10:13 $
0
this(context, new ZooCache(context), new ReplicaSystemFactory());
0
FileSystemUtils fsu = new MockFileSystemUtils(0, lines, "dir /-c \"C:\""); FileSystemUtils fsu = new MockFileSystemUtils(0, lines, "dir /-c \"C:\\somedir\""); public void testGetFreeSpaceWindows_String_quoted() throws Exception { String lines = " Volume in drive C is HDD\n" + ...
0
package org.apache.http.testserver;
0
final StringBuilder buffer = new StringBuilder(uri);
0
@Override public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, IOException, ShellCommandException { @SuppressWarnings("deprecation") String deprecatedClassName = org.apache.accumulo.c...
0
/* * Copyright 2016-2018 Seznam.cz, a.s.
0
return Combine.globally(new TopCombineFn<>(count, compareFn)).named("Top"); return Combine.globally(new TopCombineFn<>(count, new Smallest<T>())).named("Top.Smallest"); return Combine.globally(new TopCombineFn<>(count, new Largest<T>())).named("Top.Largest"); new TopCombineFn<>(count, compareFn).<K>...
0
private DefaultHttpClientConnectionOperator connectionOperator; connectionOperator = new DefaultHttpClientConnectionOperator(
0
handler.handleUnimplementedMessage(this, SshConstants.SSH_MSG_UNIMPLEMENTED, buffer);
0
private final Coder<W> windowCoder; IsmRecordForSingularValuePerWindowDoFn(Coder<W> windowCoder) { this.windowCoder = windowCoder; } Optional<Object> previousWindowStructuralValue = Optional.absent(); T previousValue = null; Object currentWindowStructuralValue = win...
0
/** * @since 4.1 */ public DefaultHttpClient( final ClientConnectionManager conman) { super(conman, null); } connManager = new SingleClientConnManager(registry);
0
@SuppressWarnings({"unused"}) public enum TableOperation implements org.apache.thrift.TEnum {
0
* @throws NullPointerException if comparator is null * @throws NullPointerException if comparator or criterion is null throw new NullPointerException("Comparator must not be null."); throw new NullPointerException("Criterion must not be null.");
0
Object clone();
0
Iterable<String> provided = kpp.getKeyTypes(); for (String keyType : provided) { log.debug("sendKexInit(" + provided + ") " + keyType + " not in list of supported: " + supported); if (resolvedHostKeys == null) { resolvedHostKeys = new StringBuilder(); ...
0
package org.apache.ambari.server.state.live.job;
0
* @version CVS $Id$ public PartInMemory(Map headers, InputStream in, int size) {
0
* object, but with all attributes added defined by the given map. This * method is analogous to {@link #setAttribute(String, Object)}, but all * attributes in the given map are added. If the map is <b>null</b> or * empty, this method has no effect. * * @param newAttributes the map with att...
0
private javax.xml.parsers.DocumentBuilder db; db = XMLUtils.createDocumentBuilder(false); org.w3c.dom.Document doc = db.newDocument(); org.w3c.dom.Document doc = this.db.parse(is);
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//io/src/test/org/apache/commons/io/Attic/IOTestCase.java,v 1.3 2002/01/28 05:01:49 sanders Exp $ * $Revision: 1.3 $ * $Date: 2002/01/28 05:01:49 $ import junit.framework.TestCase; * @version $Revision: 1.3 $ * Test the FileU...
1
updateValuesAsRate(metric.getMetricValues()); static Map<Long, Double> updateValuesAsRate(Map<Long, Double> metricValues) { Double prevVal = null; Double diff; diff = currVal - prevVal; Double rate = diff / TimeUnit.MILLISECONDS.toSeconds(step); prevVal = currVal; static HashMa...
0
artifact = this.factory.createArtifactWithClassifier(groupId, artifactId, version, type, classifier);
0
import org.apache.beam.sdk.extensions.euphoria.core.client.operator.base.Builders.Output;
0
* @version CVS $Id$
0
/** * A singleton. */ public static final ClosedInputStream CLOSED_INPUT_STREAM = new ClosedInputStream();
0
static org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(C14nHelperTest.class.getName());
1
* Copyright (c) 1999-2003 The Apache Software Foundation. All rights
0
import org.apache.aurora.GuavaUtils.PassiveService; public class TaskHistoryPruner extends PassiveService implements EventSubscriber { private Runnable failureNotifyingRunnable(Runnable runnable) { return () -> { try { runnable.run(); } catch (Throwable t) { notifyFailed(t); } ...
0
* Copyright 2001-2006 The Apache Software Foundation
0
ChunkInputFormat.setInputInfo(job, user, pass.getBytes(), table, AUTHS); ChunkInputFormat.setMockInstance(job, instance); @SuppressWarnings("unchecked") Class<? extends Mapper<?,?,?,?>> forName = (Class<? extends Mapper<?,?,?,?>>) Class.forName(args[4]); job.setMapperClass(forName);
0
import java.util.Collections; import com.google.common.collect.Ordering; import com.google.common.primitives.Longs; Collections.sort(taskEvents, BY_TIMESTAMP); private static final Ordering<TaskEvent> BY_TIMESTAMP = new Ordering<TaskEvent>() { @Override public int compare(TaskEvent left, TaskEvent right...
0
/** * Recursively lists the files and directories under a given path, ingests their names and file info into one Accumulo table, indexes the file names in a * separate table, and the file data into a third table. See docs/examples/README.dirlist for instructions. */
0
* @cocoon.sitemap.component.documentation * Rewrites URIs in links to a value determined by an InputModule. * The URI scheme identifies the InputModule to use, and the rest of the URI is * used as the attribute name. *
0
SortedSet<Text> splits = new TreeSet<>();
0
package org.apache.beam.dsls.sql.transform; import org.apache.beam.dsls.sql.interpreter.BeamSQLExpressionExecutor; import org.apache.beam.dsls.sql.rel.BeamProjectRel; import org.apache.beam.dsls.sql.schema.BeamSQLRecordType; import org.apache.beam.dsls.sql.schema.BeamSQLRow;
0
@Test(expected = TaskDescriptionException.class) public void testCreateJobNoResources() throws Exception { control.replay(); buildScheduler(); TwitterTaskInfo task = new TwitterTaskInfo(DEFAULT_TASK); task.getConfiguration().remove("num_cpus"); task.getConfiguration().remove("ram_mb"); task...
0
// The component has registered a service: notify all component instances Object[] componentInstances = c.getCompositionInstances(); for (Object instance : componentInstances) try { Class[][] signatures = new...
0
/* import java.util.Collections; import org.apache.ambari.server.orm.entities.PrincipalEntity; * Find a permission entity with the given name. * * @param name permission name * * @return a matching permission entity or null */ @RequiresSession public PermissionEntity findByName(String name) { ...
0
public void doTag(XMLOutput output) throws Exception { getBody().run(context, output);
0
public void contextualize(Context avalonContext) throws ContextException { this.context = avalonContext; public void service(ServiceManager serviceManager) throws ServiceException { this.manager = serviceManager; final Context itsContext = this.createContext(); * Create the context ...
0
if (isInherited != manager.isInheritedProperty()) { for (String identValue : identValues) { LexicalUnit lu = cssParser.parsePropertyValue(identValue); if (!identValue.equalsIgnoreCase(s)) { identValue + '/' + s);
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.http.nio.impl;
0
/* Copyright 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 law...
0
package org.apache.cocoon.core.container.spring.logger; * Spring factory bean to setup a child Commons Logging logger. public class ChildLoggerFactoryBean extends LoggerFactoryBean implements FactoryBean, BeanFactoryAware { private BeanFactory factory; public ChildLoggerFact...
0
if (LogFeederUtil.hostName == null) { timelineMetric.setHostName(LogFeederUtil.hostName);
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 static Configuration getConfiguration(JobContext context) {
0
/***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * * ------------------------------------------------------------------------- * * This software is published under the terms of the Apache Software License * * v...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/test/org/apache/commons/beanutils/PropertyUtilsTestCase.java,v 1.31 2003/07/03 19:10:27 craigmcc Exp $ * $Revision: 1.31 $ * $Date: 2003/07/03 19:10:27 $ * @version $Revision: 1.31 $ $Date: 2003/07/03 19:10:27 $ ...
0
import org.apache.hc.core5.http.HttpHeaders; import org.apache.hc.core5.http.HttpHost; import org.apache.hc.core5.http.HttpRequest; import org.apache.hc.core5.http.HttpResponse; import org.apache.hc.core5.http.HttpStatus; import org.apache.hc.core5.http.HttpVersion; import org.apache.hc.core5.http.config.Lookup; import...
0
List<? extends Source<T>> shards = initialSource.splitIntoBundles(desiredSizeBytes,
0
package org.apache.commons.net.io;
0
import org.apache.hc.core5.io.CloseMode; client.shutdown(CloseMode.GRACEFUL);
0
final Map<String,Stats> summary = new TreeMap<>();
1
import org.apache.ambari.server.events.MetadataUpdateEvent; expect(cluster1.getClusterId()).andReturn(1L).atLeastOnce(); expect(controller.getClusterMetadataOnConfigsUpdate(eq(cluster1))).andReturn(createNiceMock(MetadataUpdateEvent.class)).once(); replay(controller, clusters, cluster1, cluster2, configWith...
0
ReplicationTableUtil.updateFiles(context, new KeyExtent("1", null, null), myFile, StatusUtil.fileCreated(createdTime)); KeyExtent extent = new KeyExtent("1", new Text("b"), new Text("a")); Assert.assertEquals(extent.getTableId(), new Text(col.getColumnQualifier()).toString());
0
import org.apache.http.auth.AUTH; Header header = new BasicHeader(AUTH.WWW_AUTH, challenge); Header challenge = new BasicHeader(AUTH.WWW_AUTH, "Basic realm=\"test\""); assertEquals(AUTH.WWW_AUTH_RESP, authResponse.getName()); Header challenge = new BasicHeader(AUTH.PROXY_AUTH, "Basic rea...
0
@Column(name = "short_url") @Basic private String shortUrl; this.shortUrl = instanceConfig.getShortUrl(); this.shortUrl = null; @Override public String getShortUrl() { return shortUrl; } /** * Set the short URL * @param shortUrl */ public void setShortUrl(String shortUrl) { ...
0
final int fragmentSizeHint, super(buffersize, fragmentSizeHint, chardecoder, charencoder, this(buffersize, buffersize, null, null, null, null, null, null, null);
0
public final class SHA256KeyHashingScheme implements KeyHashingScheme { public static final SHA256KeyHashingScheme INSTANCE = new SHA256KeyHashingScheme();
0
import org.ow2.chameleon.testing.helpers.BaseTest; import java.util.Arrays; import static org.ops4j.pax.exam.CoreOptions.mavenBundle; public class Common extends BaseTest { @Override protected Option[] getCustomOptions() { return new Option[]{ eventadmin() }; @Override pr...
0
throw new IllegalArgumentException("Integer coercion exception. Can't coerce type: " + val.getClass().getName()); throw new NumberFormatException("Long coercion exception. Can't coerce type: " + val.getClass().getName()); throw new IllegalArgumentException("BigInteger coercion exception. Can't c...
0
if (list != null){ for (int i = 0 ; i < list.size(); i++) { StrokingTextPainter.TextRun run = (StrokingTextPainter.TextRun)list.get(i); AttributedCharacterIterator aci = run.getACI(); ...
0
URL url = f.toURI().toURL();
0
import static junit.framework.Assert.assertEquals; import java.io.ByteArrayInputStream; import org.junit.Test; import nl.jqno.equalsverifier.EqualsVerifier; import nl.jqno.equalsverifier.Warning;
0
* @param beginCharIndex the index of the first char in the * contiguous selection. * @param endCharIndex the index of the last char in the * contiguous selection. * @return The highlight shape or null if the spacified char range * does not overlap with the chars in this layout. */ ...
0
String[] fileNameParts = originalPath.getName().split("\\.");
0
import org.testng.Assert; import org.testng.annotations.Test; import org.testng.annotations.BeforeMethod; @BeforeMethod
0
boolean created = false; created = true; if (created) { eventListeners.fire(new ConfigurationBuilderResultCreatedEvent( this, ConfigurationBuilderResultCreatedEvent.RESULT_CREATED, resObj)); }
0
abstract Builder<T> setKmsKey(String kmsKey); @Nullable abstract String getKmsKey(); getQueryLocation(), getKmsKey()); /** For query sources, use this Cloud KMS key to encrypt any temporary tables created. */ public TypedRead<T> withKmsKey(String kmsKey) { r...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/converters/FloatArrayConverter.java,v 1.4 2003/01/15 21:59:40 rdonkin Exp $ * $Revision: 1.4 $ * $Date: 2003/01/15 21:59:40 $ * Copyright (c) 1999-2003 The Apache Software Foundatio...
0
expect(permissionEntity.getPermissionName()).andReturn("CLUSTER.ADMINISTRATOR").anyTimes(); Assert.assertEquals("CLUSTER.ADMINISTRATOR", resource.getPropertyValue(AmbariPrivilegeResourceProvider.PERMISSION_NAME_PROPERTY_ID)); expect(permissionEntity.getPermissionName()).andReturn("CLUSTER.ADMINISTRATOR").an...
0
import org.apache.hc.core5.http.HttpVersion; import org.apache.hc.core5.http.ProtocolVersion; import org.apache.hc.core5.http.UnsupportedHttpVersionException; final ProtocolVersion transportVersion = request.getVersion(); if (transportVersion != null && transportVersion.greaterEquals(HttpVersion.HTTP_2)...
0
} else if (i.dataType() == DataTypes.INT_TYPE) { ints[pos] = 0; } else if (i.dataType() == DataTypes.BOOLEAN_TYPE) { bools[pos] = false;
0