Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
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
import org.apache.ambari.server.state.PassiveState; expect(managementController.getEffectivePassiveState( capture(new Capture<Cluster>()), capture(new Capture<Service>()), capture(new Capture<ServiceComponentHost>()))).andReturn(PassiveState.ACTIVE).anyTimes();
0
import com.google.bigtable.v1.Row; import com.google.bigtable.v1.SampleRowKeysResponse; import com.google.cloud.dataflow.sdk.io.bigtable.BigtableIO.BigtableSource; import java.util.List; import java.util.NoSuchElementException; * The interface of a class that reads from Cloud Bigtable. */ interface Reader { ...
0
private static Configuration atlasProperties; private static NotificationInterface notifInterface; static { atlasProperties = ApplicationProperties.get(ApplicationProperties.CLIENT_PROPERTIES); // initialize the async facility to process hook calls. We don't // want to d...
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 class ServiceGraphSearchCriteria extends ServiceLogSearchCriteria {
0
* @version $Revision: 1.4 $ $Date: 2003/02/21 13:11:36 $ this( UriParser.extractScheme( rootUri ), rootUri, path, false ); this( scheme, rootUri, path, false ); } private BasicFileName( final String scheme, final String rootUri, final String ...
0
import net.jcip.annotations.Immutable; @Immutable private static final Idn impl; Idn _impl; try { _impl = new JdkIdn(); } catch (Exception e) { _impl = new Rfc3492Idn(); } impl = _impl;
0
registerTag( "emptyBorder", EmptyBorderTag.class ); registerTag( "titledBorder", TitledBorderTag.class );
0
getServiceInternal(registrationManager.getServiceRegistration()); boolean getServiceInternal(ServiceRegistration<S> serviceRegistration)
0
public abstract class BaseTestSupport extends Assert { @Rule public final TestWatcher rule = new TestWatcher() { // TODO consider using a ThreadLocal storage for the start time - provided // the code is assured to call starting/finished on the same thread private long startT...
0
import org.apache.hc.client5.http.cache.ResourceIOException; * @throws ResourceIOException void flushCacheEntriesFor(HttpHost host, HttpRequest request) throws ResourceIOException; * @throws ResourceIOException void flushInvalidatedCacheEntriesFor(HttpHost host, HttpRequest request) throws ResourceIOE...
0
break;
0
getDigester() .getLogger() .debug( format( "[ObjectCreateRule]{%s} New '%s' using default empty constructor", getDigester().getMatch(), clazz.getName() ) ); throw new SAXEx...
0
public void bind(Socket socket) throws IOException { throw new UnsupportedOperationException(); } public Socket getSocket() { OperatedClientConnection conn = ensureConnection(); return conn.getSocket(); }
0
Assert.assertTrue(validPropertyIds.contains("HostRoles/version")); Assert.assertTrue(validPropertyIds.contains("HostRoles/desired_repository_version"));
0
import java.util.regex.Pattern; private static final String LEGAL_ASCII_PATTERN = "^\\p{ASCII}+$"; Pattern matchAsciiPat = Pattern.compile(LEGAL_ASCII_PATTERN); if (!matchAsciiPat.matcher(value).matches()) {
0
entity.setClassifications(entityRetriever.getAllClassifications(atlasVertex));
1
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
setFileNameParser(FtpFileNameParser.getInstance());
0
import java.util.regex.*; import aQute.lib.base64.*; Pattern ENCODING = Pattern .compile("((:?[\\dA-Za-z][\\dA-Za-z])*)|((:?ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/)+={1,3})"); boolean hex = true; StringBuilder sb = new StringBuilder(s); for (int i = sb.length() - 1; i >= 0; i--)...
0
String path = entry.getValue().toString(); if (path.contains(":")) { datafiles.add(new FileRef(path)); } else { datafiles.add(new FileRef(path, this.master.fs.getFullPath(FileType.TABLE, Path.SEPARATOR + extent.getTableId() + path))); }
0
* Copyright (c) 2002, 2003 The Apache Software Foundation. All rights
0
import java.util.stream.Collectors; import static org.junit.Assert.*; execute(new AbstractTestCase<Integer, Pair<Integer, HashSet<Integer>>>( /* don't parallelize this test, because it doesn't work * well with count windows */ false) { execute(new AbstractTestCase<Integer, Pair<Integer,...
0
import org.junit.Rule; @Rule public final TestPipeline p = TestPipeline.create();
0
* Copyright 2016-2017 Seznam.cz, a.s.
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 applicabl...
0
"cluster1", "HDFS", false); null, timeout, false); cluster, service.toString(), false); "cluster1", Service.Type.HDFS.toString(), false); "cluster1", Service.Type.HDFS.toString(), false); "cluster1", Service.Type.HDFS.toString(), false); clusterName, service.t...
0
* @version $Id$
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
// Handle SourceException. if (cause instanceof SourceException) { handle((SourceException) cause); } // Handle SourceException. // See also toSax(XMLizable, ContentHandler if (cause instanceof SourceException) { ...
0
new AtomicReference<>(System.getProperty(SSHD_STTY_COMMAND_PROP, DEFAULT_SSHD_STTY_COMMAND)); private static final AtomicReference<String> TTY_PROPS_HOLDER = new AtomicReference<>(null); Map<PtyMode, Integer> modes = new TreeMap<>();
0
* @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...
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
JellyContext context = getJellyContext(); context.setVariable( "project", project ); script.run( context, getXMLOutput() );
0
public class Version implements com.yahoo.zookeeper.version.Info{ public static int getRevision() { return REVISION; } public static String getBuildDate() { return BUILD_DATE; } public static String getVersion() { return MAJOR + "." + MINOR + "." + MICRO; } public static String getVersionRevision() { ...
0
import junit.framework.TestCase;
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
* Execute a method call, ie syntactically written as name.call(...).
0
public static final String ASSET_ENTITY_TYPE = "Asset"; public static final String OWNER_ATTRIBUTE = "owner";
0
AtlasActionTypes.UPDATE, userName, groups, httpServletRequest); AtlasActionTypes.CREATE, userName, groups, httpServletRequest); AtlasAuthorizationUtils.getRequestIpAddress(httpServletRequest)); ...
0
package org.apache.ambari.metrics.alertservice.prototype.testing.utilities;
0
public FileBasedTestCase(final String name) { protected void createFile(final File file, final long size) final BufferedOutputStream output = protected byte[] generateTestData(final long size) { final ByteArrayOutputStream baout = new ByteArrayOutputStream(); } catch (final IOExc...
1
import org.apache.cocoon.environment.Session; import java.util.SortedSet; import java.util.TreeSet; * @version CVS $Id: SessionAttributeModule.java,v 1.2 2003/04/23 13:37:35 haul Exp $ SortedSet names = new TreeSet(); Session session = request.getSession(); Enumeration allNames = 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
* * * * * * The Service may also be called outside through the new Inventory bundle * due to mapping the BundlesServlet to an InventoryPrinter and for example * calling it from a Gogo Shell. In this case the {@code webConsoleRoot} * parameter will be null a {@link BundleInfo} objects of...
0
* @version $Id$
0
import com.google.common.base.Function; ServerSets::toEndpoint;
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 org.apache.commons.net.PrintCommandListener;
0
Vertex instanceVertex = getVertexForGUID(guid); try {
0
Activator.log( LogService.LOG_DEBUG, null, "Running task: " + task, null );
0
import org.apache.batik.gvt.GraphicsNodeRenderContext; * Returns the <tt>GraphicsNodeRenderContext</tt> used by the renderer. Use * this object if you want to manipulate the GVT tree. */ public GraphicsNodeRenderContext getRenderContext() { return rendererFactory.getRenderContext(); } ...
0
/** * Get the status of Ganglia server host for the given cluster name. * * @param clusterName the cluster name * * @return true if heartbeat with Ganglia server host wasn't lost * * @throws SystemException if unable to get the status of Ganglia server host */ public boolean isGangliaColl...
0
package org.apache.sshd.client.subsystem.sftp.extensions.helpers;
0
if (base == null) { throw new IOException(tableInfo.exportDir + " is not in a volume configured for Accumulo"); }
0
import com.google.cloud.dataflow.sdk.transforms.AppliedPTransform; import com.google.cloud.dataflow.sdk.values.PInput; import com.google.cloud.dataflow.sdk.values.POutput; doVisitTransform(node); doVisitTransform(node); private <PT extends PTransform> void doVisitTransform(TransformTreeNode node) { ...
0
* Copyright 2002-2005 The Apache Software Foundation.
0
import org.junit.experimental.categories.Category; @Category({ category.StackUpgradeTest.class})
0
/* * Copyright 2000-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 applic...
0
* @throws ConfigurationException if the path cannot be created private void createPath(File file) throws ConfigurationException if (!parent.mkdirs()) { throw new ConfigurationException("Cannot create path: " + parent); }
0
import com.google.common.collect.ImmutableSet; import static org.apache.aurora.scheduler.resources.ResourceTestUtil.mesosScalar; import static org.apache.aurora.scheduler.resources.ResourceType.CPUS; import static org.apache.aurora.scheduler.resources.ResourceType.RAM_MB; TestExecutorSettings.thermosOnlyWithOve...
0
// So we must take conjunction of activeWindows and triggerRunner state. // Since window was still active the trigger may not have closed. if (activeWindows.isActive(directContext.window())) { // Don't need to track address state windows anymore activeWindows.remove(directContext.window()); ...
0
* Autogenerated by Thrift Compiler (0.9.3) import javax.annotation.Generated; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) @Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-16") public class CompactionStrategyConfig implements org.apache.thrift.TBase<CompactionS...
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 ServiceReference<?> reference; public CommandProxy(BundleContext context, ServiceReference<?> reference, String function)
0
package org.apache.servicemix.kernel.deployer.filemonitor;
0
* @param clazz the class representing the type of argument * @param <T> type of argument
0
import com.google.cloud.dataflow.sdk.util.Trigger.WindowStatus; protected final DoFn<?, ?>.ProcessContext context; DoFn<?, ?>.ProcessContext context) { protected abstract WindowStatus put(W window, VI value) throws Exception; * <p> {@code mergeResult} must either not be in {@link #windows} or be in prote...
0
final int i = path.indexOf('?');
0
import java.util.Collections; while (!proxy.isServing()) { Thread.sleep(500); } userpass = tpc.proxy().login("root", Collections.singletonMap("password", ""));
0
c.setCommand("scp -f " + path); c.connect(); c.setCommand("scp -r -f " + path); c.connect(); c.setCommand("scp -f " + path); c.connect(); c.connect(); assertEquals(0, is.read()); c.setCommand("scp -t " + path); c.connect(); os.write...
0
package org.apache.beam.sdk.extensions.euphoria.core.testkit; import org.apache.beam.sdk.extensions.euphoria.core.testkit.junit.AbstractOperatorTest; import org.apache.beam.sdk.extensions.euphoria.core.testkit.junit.Processing;
0
assertThat(WindowFnTestUtils.assignedWindows(fn, 100L), Matchers.contains(first)); assertThat(WindowFnTestUtils.assignedWindows(fn, -100L), Matchers.contains(first)); assertThat( WindowFnTestUtils.assignedWindows(fn, 100L), Matchers.containsInAnyOrder(first, second)); assertThat( WindowF...
0
import static org.apache.beam.sdk.extensions.sql.impl.utils.CalciteUtils.VARCHAR; Schema.builder() .addDateTimeField("event_timestamp") .addMapField("attributes", VARCHAR, VARCHAR) .addRowField("payload", Schema.builder().build()) Schema.builder() .addMapF...
0
EasyMock.replay(detector); BuilderEventListenerImpl listener = new BuilderEventListenerImpl(); builder.addEventListener(ConfigurationBuilderEvent.RESET, listener); listener.nextEvent(ConfigurationBuilderEvent.RESET); listener.assertNoMoreEvents(); EasyMock.verify(detector...
0
import org.ow2.chameleon.testing.helpers.IPOJOHelper; import org.ow2.chameleon.testing.helpers.OSGiHelper; import static org.ow2.chameleon.testing.tinybundles.ipojo.IPOJOBuilder.withiPOJO; .build( withiPOJO(new File(ROOT, "FooImpl.jar"), new File(TEST, "foo.xml")) ); .build( withiPOJO(new File...
0
* @version $Revision$
1
import org.apache.beam.sdk.metrics.Counter; import org.apache.beam.sdk.metrics.Metrics; joinDoFn = new JoinDoFn(name, configuration.maxAuctionsWaitingTime); // Used to refer the metrics namespace private final String name; private final Counter newAuctionCounter; private final Counter newPersonCount...
0
import java.io.IOException; import java.math.BigInteger; import org.apache.beam.sdk.extensions.sql.impl.BeamRowCountStatistics; import org.apache.beam.sdk.io.gcp.bigquery.BigQueryHelpers; import org.apache.beam.sdk.io.gcp.bigquery.BigQueryOptions; import org.apache.beam.sdk.options.PipelineOptions; import org.slf4j.Log...
0
import org.apache.sshd.client.future.OpenFuture; OpenFuture future = channel.getOpenFuture(); if (future.isOpened()) { OutputStream outputStream = channel.getInvertedIn(); outputStream.write(buffer.array(), buffer.rpos(), buffer.available()); outpu...
0
/* $Id: LoaderSetProperties.java,v 1.4 2004/05/10 06:30:08 skitching Exp $ *
0
* limitations under the License.
0
import static org.apache.mesos.Protos.Status.DRIVER_ABORTED; import static org.apache.mesos.Protos.Status.DRIVER_RUNNING; expect(schedulerDriver.run()).andReturn(DRIVER_RUNNING); expect(schedulerDriver.stop(true)).andReturn(DRIVER_ABORTED); assertEquals(DRIVER_RUNNING, driver.run()); expect(schedulerDri...
0
ColumnUpdate update = new ColumnUpdate(ByteBuffer.wrap(cf.getBytes()), ByteBuffer.wrap(cq.getBytes()));
0
import java.io.File; import java.io.FilePermission; import java.util.Collection;
0
import static com.google.common.base.Preconditions.checkState; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.atomic.AtomicReference; private final ConcurrentMap<ArtifactMetadata, byte[]> artifactBytes; private final AtomicReference<Manifest> ma...
0
import com.google.common.collect.AbstractIterator; import com.google.common.collect.Lists; import com.google.common.collect.Sets;
0
* @version CVS $Id: ColorCode.java,v 1.3 2003/09/05 07:31:40 cziegeler Exp $
0
(PCollection) Iterables.getOnlyElement(transformTimers.getTransform().getInputs()) .getValue())
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/TreeBag.java,v 1.9 2003/08/31 17:26:44 scolebourne Exp $ * any, must include the following acknowledgement: * Alternately, this acknowledgement may appear in the software i...
0
* <p>Standard {@link org.apache.commons.beanutils.locale.LocaleConverter} * optionally using a default value or throwing a * Create a {@link org.apache.commons.beanutils.locale.LocaleConverter} * Create a {@link org.apache.commons.beanutils.locale.LocaleConverter} * Create a {@link org.apache.commons....
0
* and the {@link Action} interfaces and use the * <code>javax.servlet.Servlet</code> interface with predefined service * registration properties instead.</strong> * * @deprecated This interface will be removed when <a * href="https://issues.apache.org/jira/browse/FELIX-574">FELIX-574</a> * ...
0
import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringEscapeUtils; import org.apache.commons.lang3.StringUtils;
0
package org.apache.accumulo.monitor.rest.tservers; import org.apache.accumulo.monitor.rest.tables.TableInformation;
0
String tableName = getUniqueNames(1)[0]; String tableName = getUniqueNames(1)[0]; String[] tableNames = getUniqueNames(2); String[] tableNames = getUniqueNames(2); String[] tableNames = getUniqueNames(2); String[] tableNames = getUniqueNames(3);
0
import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDe...
0
* http://www.apache.org/licenses/LICENSE-2.0
0
manager.add("serviceName", input1); manager.add("serviceName", input2); manager.add("serviceName", input3); List<Input> inputList = manager.getInputList("serviceName"); public void testInputManager_monitor() throws Exception { manager.add("serviceName", input1); manager.add("serviceName", inpu...
0