Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
// TODO make private InstructionHandle prev; /** * @deprecated will be made private; do not access directly, use getter/setter */ @Deprecated /** * @param next the next to set * @ since 6.0 */ final InstructionHandle setNext(InstructionHandle next) { this.nex...
0
import org.apache.atlas.model.instance.AtlasEntity; public ZipSink(OutputStream outputStream) { zipOutputStream = new ZipOutputStream(outputStream);
0
package com.twitter.aurora.scheduler.periodic; import com.twitter.aurora.scheduler.periodic.PeriodicTaskLauncher.PeriodicTaskInterval; import com.twitter.aurora.scheduler.periodic.Preempter.PreemptionDelay;
1
import org.apache.beam.sdk.transforms.CombineWithContext; import org.apache.beam.sdk.values.PCollectionView; * Returns a {@code Combine.Context} from {@code PipelineOptions}, {@code SideInputReader}, and * the main input window. */ private static CombineWithContext.Context createFromComponents( final P...
0
Component configurator = component(m).impl(new Configurator("foobar")).withSvc(ConfigurationAdmin.class, true).build(); Component configurator = component(m).impl(new Configurator("foobar")).withSvc(ConfigurationAdmin.class, true).build();
0
import org.apache.sshd.common.FactoryManager; FactoryManager manager = getFactoryManager(); clientVersion = "SSH-2.0-" + manager.getVersion(); FactoryManager manager = getFactoryManager(); String algs = NamedResource.Utils.getNames(manager.getSignatureFactories()); ClientFactoryM...
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 static final org.slf4j.Logger LOG =
1
package org.apache.felix.karaf.gshell.core;
0
private final TelnetClient __client; // TODO there does not appear to be any way to change this value - should it be a ctor parameter?
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
* Copyright (c) OSGi Alliance (2002, 2010). All Rights Reserved. * Abstract implementation of the {@code URLStreamHandlerService} * {@code java.net.URLStreamHandler} except for {@code parseURL} * and {@code setURL}, which use the {@code URLStreamHandlerSetter} * {@code setURL} and {@code parseURL(URLStreamHandlerS...
0
import static org.easymock.EasyMock.anyBoolean; anyString(), eq(AmbariContext.TaskType.INSTALL), anyBoolean())).andReturn(hostRoleCommandInstallComponent3).times(3); anyString(), eq(AmbariContext.TaskType.INSTALL), anyBoolean())).andReturn(hostRoleCommandInstallComponent4).times(2);
0
job.setInputFormatClass(org.apache.accumulo.core.client.mapreduce.AccumuloInputFormat.class); org.apache.accumulo.core.client.mapreduce.AccumuloInputFormat.setZooKeeperInstance(job, ci.getInstanceName(), ci.getZooKeepers()); org.apache.accumulo.core.client.mapreduce.AccumuloInputFormat.setCo...
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
private final AtomicReference<Deferred<Void>> m_enabledLatchRef = new AtomicReference<>( private final AtomicReference<State> state = new AtomicReference<>(State.disabled); private final Set<Integer> m_missing = new TreeSet<>(); newEnabledLatch = new Deferred<>(); m_componentMethods.init...
0
/* * Copyright 2002, 2003,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...
0
import org.osgi.framework.wiring.BundleRevision; private BundleRevision m_targetRevision; // bundle://<revision-id>:<bundle-classpath-index>/<resource-path> // Where <revision-id> = <bundle-id>.<revision> long bundleId = Util.getBundleIdFromRevisionId(url.getHost()); // Get the b...
0
* @version $Id$ private static final String BOOLEAN_FIELD_EL = "booleanfield"; private static final String VALUE_EL = "value"; private static final String VALIDATION_MSG_EL = "validation-message"; if(getProcessRequests() == true) { validationError = null; Object oldValue =...
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 org.apache.aurora.common.base.Supplier; import org.apache.aurora.common.testing.easymock.EasyMockTest; import org.apache.aurora.common.util.BackoffHelper;
0
quorumPeer.setObserverMasterPort(config.getObserverMasterPort());
0
// No @Component, just skip. //warn("Annotation processing ignored in " + collector.getClassName() + " - @Component missing"); //warn("Declaring an empty instance of " + elem.getAttribute("classname"));
0
* @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 ...
0
* Unit tests for {@link DefaultRequestDirector} * {@link DefaultRequestDirector} is allocating a connection, that the
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
* * @since 1.10.1
0
Set<SubResourceDefinition> setChildren = new HashSet<>();
0
private static final String[] CSS_REFS = { "/res/ui/configurationrender.css" }; /** * @see org.apache.felix.webconsole.SimpleWebConsolePlugin#deactivate() */ pw.println( "<script type='text/javascript' src='${appRoot}/res/ui/ui.tabs.paging.js'></script>" ); pw.println( "$(document).rea...
0
* distributed under the License is distributed on an "AS IS" BASIS,
0
import org.apache.hadoop.metrics2.MetricType; timelineMetricsCache.putTimelineMetric(metric, MetricType.COUNTER); timelineMetricsCache.putTimelineMetric(metric, MetricType.COUNTER); timelineMetricsCache.putTimelineMetric(metric, MetricType.COUNTER); timelineMetricsCache.putTimelineMetric(metric, MetricT...
0
for (int i = currentURI + 1; i + index <= menu.getItemCount(); i++) {
0
v = make("beta"); assertTrue(v.getPackage() == null); assertTrue(v.getMajorVersion() == 0); assertTrue(v.getMinorVersion() == 0); assertTrue(v.getReleaseVersion() == 0); assertTrue(v.getEtcetera() == null);
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
}, context);
0
import junitx.framework.ArrayAssert; * @version $Id: TestXMLConfiguration.java,v 1.4 2004/07/21 12:36:27 ebourg Exp $ public void testGetCommentedProperty() { assertEquals(null, conf.getProperty("test.comment")); } public void testGetPropertyWithXMLEntity() { assertEquals("1<2", co...
0
import org.apache.http.HttpRequestFactory; import org.apache.http.impl.nio.DefaultNHttpServerConnection; import org.apache.http.nio.reactor.IOSession; import org.apache.http.nio.util.ByteBufferAllocator; import org.apache.http.params.HttpParams; public class LoggingNHttpServerIOTarget extends DefaultNHttpServerConnecti...
0
Assert.assertEquals("ViewVersion", subResourceDefinitions.iterator().next().getType().name());
0
import cz.seznam.euphoria.core.client.dataset.Dataset; import cz.seznam.euphoria.core.client.util.Sums; Dataset<Pair<LongWritable, Text>> lines = flow.createInput( Dataset<Pair<String, Long>> tuples = FlatMap.of(lines) Dataset<Pair<String, Long>> wordCount = ReduceByKey .combineBy(Sums.ofLongs()...
0
PCollection<Long> count = p.apply(read).apply(Count.globally()); PCollection<Long> count = p.apply(read).apply(Count.globally());
0
if (first != null && second != null) { int h = first.hashCode(); int shift = Integer.SIZE >> 1; return ((h >> shift) | (h << shift)) ^ second.hashCode(); } if (first != null) { return first.hashCode(); } if (second != null) { return second.hashCode()...
0
final String type = searchFilter.getParam(SearchFilter.PARAM_TYPE); final String name = searchFilter.getParam(SearchFilter.PARAM_NAME); final String supertype = searchFilter.getParam(SearchFilter.PARAM_SUPERTYPE); final String serviceType ...
0
* Returns the content types of the scripting languages this interpreter * handles. */ String[] getMimeTypes(); /**
0
/* * Copyright 2001-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 applica...
0
* Copyright (c) OSGi Alliance (2012, 2016). All Rights Reserved.
0
return new IdentityPredicate<>(object);
1
protected Encoder<V> encoder; private static class VIterator<V> implements Iterator<V> { private Iterator<Value> source; private Encoder<V> encoder; VIterator(Iterator<Value> iter, Encoder<V> encoder) { this.source = iter; this.encoder = encoder; @Override public boolean hasNext()...
1
import org.apache.felix.scr.impl.config.ScrConfiguration; BundleComponentActivator activator = getActivator(); if ( activator != null ) { return activator.getConfiguration().lockTimeout(); } return ScrConfiguration.DEFAULT_LOCK_TIMEOUT_MILLISECONDS; <T> void ...
0
import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.TableGenerator; @TableGenerator(name = "alert_current_id_generator", table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "value", pkColumnValue = "alert_current_id_seq", initialValue = 0,...
0
import org.apache.ambari.server.controller.spi.PropertyId; * Simple PropertyId implementation. /** * The property name. */ /** * The category name. */ /** * Indicates whether or not this property is temporal. */ // ----- Constructors ------------------------------------------------------ ...
1
/* * Copyright 2005 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 applica...
0
package org.apache.accumulo.examples.simple.client;
0
ExecutorServiceShutdown executorServiceShutdown = new ExecutorServiceShutdown( addTearDown(executorServiceShutdown::execute);
0
package org.apache.beam.sdk.extensions.euphoria.core.executor.graph; import org.apache.beam.sdk.extensions.euphoria.core.annotation.audience.Audience; import org.apache.beam.sdk.extensions.euphoria.core.client.util.Pair;
0
protected class BlueprintActionPreparator extends DefaultActionPreparator {
0
// e.printStackTrace(); // TODO remove line below!!! throw new RuntimeException(e);
0
private static final long serialVersionUID = 6527501707585768673L;
0
mockBackend = EasyMock.createNiceMock(HttpClient.class);
0
t.addTranscodingHint(PNGTranscoder.KEY_FORCE_TRANSPARENT_WHITE, new Boolean(false));
0
long txid1 = aoStore.create(); long txid2 = aoStore.create(); long txid3 = aoStore.create(); long txid1 = sstore.create(); long txid2 = sstore.create(); long txid3 = sstore.create();
0
import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger log = LoggerFactory.getLogger(CountTest.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
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument;
0
public class RamFileProvider extends AbstractOriginatingFileProvider { public static final Collection<Capability> capabilities = Collections.unmodifiableCollection( Arrays.asList(new Capability[] { Capability.CREATE, Capability.DELETE, Capability.RENAME, Capability.GET_TYPE, Capabili...
1
import org.apache.accumulo.core.client.lexicoder.impl.AbstractLexicoder; public class DateLexicoder extends AbstractLexicoder<Date> implements Lexicoder<Date> { protected Date decodeUnchecked(byte[] data, int offset, int len) { return new Date(longEncoder.decodeUnchecked(data, offset, len));
0
class DirRevision implements Revision @Override public Enumeration<String> getEntries() if (entryName != null) { File file = (new File(m_file, (entryName.startsWith("/")) ? entryName.substring(1) : entryName)); if (file.exists()) { ...
0
import org.apache.hadoop.conf.Configuration; public void configure(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite) {
0
* All unnamed dependencies will be injected before the init() method; so from the init() method, you can * then pick up whatever information needed from already injected (unnamed) dependencies, and configure dynamically
0
package org.apache.commons.vfs.provider.https; import org.apache.commons.vfs.provider.http.HttpFileProvider; /** * An HTTPS provider that uses commons-httpclient. * * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a> * @version $Revision$ $Date$ */ public class HttpsFileProvider extends HttpFi...
0
import org.apache.accumulo.core.security.tokens.PasswordToken; import org.apache.accumulo.core.security.tokens.SecurityToken;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/adapters/Attic/AbstractCollectionIntCollection.java,v 1.2 2003/08/31 17:21:17 scolebourne Exp $ * any, must include the following acknowledgement: * Alternately,...
0
import java.util.Comparator; import java.util.Map; import java.util.TreeMap; public class StringMap extends TreeMap<String, Object> private static final CaseInsensitiveComparator COMPARATOR = new CaseInsensitiveComparator(); super(COMPARATOR); public StringMap(Map<?, ?> map) super(COMPARATOR); ...
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
import org.apache.beam.model.pipeline.v1.RunnerApi.FunctionSpec; import org.apache.beam.model.pipeline.v1.RunnerApi.PCollection; import org.apache.beam.model.pipeline.v1.RunnerApi.PTransform; import org.apache.beam.runners.core.construction.PTransformTranslation; import org.apache.beam.runners.core.construction.graph.P...
0
clone.parameters.putAll(this.parameters);
0
BatchWriter tbw = env.getConnector().createBatchWriter(tmpIndexTableName, new BatchWriterConfig());
0
final int i = sessionBuffer.readLine(this.lineBuf); final ParserCursor cursor = new ParserCursor(0, this.lineBuf.length()); final StatusLine statusline = lineParser.parseStatusLine(this.lineBuf, cursor);
0
import org.apache.aurora.scheduler.storage.Storage.MutateWork.NoResult; storage.write((NoResult.Quiet) storeProvider -> { storeProvider.getQuotaStore() .saveQuota("a", IResourceAggregate.build(new ResourceAggregate(1, 1, 1))); storeProvider.getQuotaStore() .saveQuota("b", IResourceAg...
0
import org.apache.commons.jelly.JellyTagException; public void addChild(Component component, Object constraints) throws JellyTagException;
0
/** index of the first character of the property. */ private static final int PROPERTY_START_INDEX = 3; * @throws Exception on any error. * @param runtimeLogger service to use for logging. * {@inheritDoc} * {@inheritDoc} if (obj == null) { } * {@inheritDoc} * {@inh...
0
import org.apache.sshd.common.config.keys.KeyUtils; import org.apache.sshd.common.util.GenericUtils; import org.apache.sshd.common.util.Pair; import org.apache.sshd.common.util.ValidateUtils; Pair<KeyPair, String> pp = ValidateUtils.checkNotNull(getKeyPair(keys, key), "Key not found", GenericUtils.EMPTY_OBJ...
0
CachingHttpClient cachingClient = new CachingHttpClient(httpClient, cacheImpl);
0
import org.apache.accumulo.core.Constants; m.put(new Text("cf1"), new Text("cq1"), new Value(Integer.toString(1000 - i).getBytes(Constants.UTF8))); m.put(new Text("cf1"), new Text("cq2"), new Value(Integer.toString(i - 1000).getBytes(Constants.UTF8)));
0
import java.net.InetSocketAddress; import java.net.SocketAddress; import java.util.Set; import org.apache.sshd.common.*; String address = buffer.getString(); int port = buffer.getInt(); try { SshdSocketAddress bound = getTcpipForwarder().localPortForwardingRequested(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
* @version CVS $Id: PipelineNode.java,v 1.14 2004/03/11 01:31:59 joerg Exp $
0
import java.util.Collections; Assert.assertEquals(Collections.singleton(route), this.connManager.getRoutes()); Assert.assertEquals(Collections.singleton(route), this.connManager.getRoutes()); Assert.assertEquals(Collections.singleton(route), this.connManager.getRoutes()); Assert.assertEq...
0
AtlasGraphUtilsV2.addToEncodedSetProperty(ret, SUPER_TYPES_PROPERTY_KEY, superTypeName); return (List) instanceVertex.getPropertyValues(propertyName, List.class);
0
public void testWorkerThread() {
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
import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map;
0
public static synchronized void reset() { if (!initialized) { return; }
0
public static final String DEFAULT_DERBY_SCHEMA = "ambari"; public static final String JDBC_IN_MEMORY_URL = String.format("jdbc:derby:memory:myDB/%s;create=true", DEFAULT_DERBY_SCHEMA); * Gets the schema name of database * * @return the database schema name (can return {@code null} for any DB besides Postg...
0
import com.google.common.collect.ImmutableMap; split.setExecutionHints(ImmutableMap.of("priority", "9")); Assert.assertEquals(split.getExecutionHints(), newSplit.getExecutionHints());
0
private final List<SecurePart> encryptionParts = new LinkedList<>(); private final List<SecurePart> signatureParts = new LinkedList<>();
0
public class LocalFileName extends AbstractFileName { // URIs can contain :, /, ?, #, @ // See http://download.oracle.com/javase/6/docs/api/java/net/URI.html // http://tools.ietf.org/html/rfc3986#section-2.2 // Since : and / occur before the path, only chars after path are escaped (i.e., # and ?) //...
1
import org.apache.atlas.exception.AtlasBaseException; protected abstract T parse(String input) throws AtlasBaseException;
0
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.io.ByteStreams; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.io.CountingOutputStream;
0
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.fail; @BeforeEach
0