Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
if (diff < 0) return -1; if (diff > 0) return 1;
1
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/compiler/CoreOperation.java,v 1.13 2003/10/09 21:31:39 rdonkin Exp $ * $Revision: 1.13 $ * $Date: 2003/10/09 21:31:39 $ * any, must include the following acknowledgement: * Alte...
0
@SuppressWarnings("rawtypes") // The null factory works for all object types public static final Factory NULL_INSTANCE = new ConstantFactory<Object>(null);
0
this._constructionElement.getAttributeNodeNS(null, Constants._ATT_URI);
0
* Copyright (C) 2015 Google Inc.
0
public AIMDBackoffManager(final ConnPoolControl<HttpRoute> connPerRoute) { AIMDBackoffManager(final ConnPoolControl<HttpRoute> connPerRoute, final Clock clock) { public void backOff(final HttpRoute route) { private int getBackedOffPoolSize(final int curr) { public void probe(final HttpRoute route) {...
0
* Creates a new sequence. The given byte array is used directly as the backing array, so later changes made to the array reflect into the new sequence. * @param data * byte data * Creates a new sequence from a subsequence of the given byte array. The given byte array is used directly as the back...
0
import java.io.ByteArrayOutputStream; @SuppressWarnings("deprecation") // SQLNestedException PrintStream ps = new PrintStream(new ByteArrayOutputStream()); PrintWriter pw = new PrintWriter(new ByteArrayOutputStream()); System.setErr(new PrintStream(new ByteArrayOutputStream()));
0
BasicCookie c1 = new BasicCookie("name1", "value1");
0
CocoonServiceManager newManager = new CocoonServiceManager(this.parentProcessorManager); return Arrays.asList(StringUtils.split(labels, ", \t\n\r"));
0
import org.apache.felix.serializer.Writer; import org.apache.felix.serializer.WriterFactory;
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.junit.Assert; final String[] args = new String[] {"--fake", "-u", "root", "-p", ""};
1
* 'Federated' introspection/reflection interface to allow JEXL introspection * behavior to be customized. * /** * Sets the class loader to use. * <p>This increments the version.</p> * Gets this uberspect version. * @return the class loader modification count */ int getVersion(); ...
1
if ( servletHandler != null ) else if ( pathResolution != null ) else
0
properties.put("content", "foo bar baz -Doozie.connection.retry.count=5 foobarbaz");
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
Set<String> hs = new HashSet<>(); // save class names to detect circular inheritance Map<String, String> hashmap = new HashMap<>(); private final Set<String> field_names = new HashSet<>(); private final Set<String> field_names_and_desc = new HashSet<>(); private final Set<String>...
0
private final RowProcessor convert; this(ArrayHandler.ROW_PROCESSOR);
0
.add(DisplayData.item("sink", sink.getClass()))
0
assertEquals(lst.size(), 3); containsInAnyOrder("--tempLocation=Test_Location", "--appName=TestPipelineCreationTest", "--optionsId=" + options.getOptionsId()));
0
import org.apache.beam.runners.core.OldDoFn;
0
"disk_free", 1)); "disk_free", 2)); "disk_free", 2)); "disk_free", 1)); Collections.singletonList("disk_free"), "local1", null, null, startTime, endTime, Precision.SECONDS, null, true); public void testGetClusterMetricRecordLatestWithFunction() throws Exception { // GIVEN T...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/Digester.java,v 1.22 2001/10/16 15:36:56 craigmcc Exp $ * $Revision: 1.22 $ * $Date: 2001/10/16 15:36:56 $ * @version $Revision: 1.22 $ $Date: 2001/10/16 15:36:56 $ * The public ...
0
import org.apache.aurora.scheduler.resources.AcceptedOffer; import org.apache.aurora.scheduler.resources.ResourceSlot; import org.apache.aurora.scheduler.resources.Resources;
0
public static void printDiskUsage(AccumuloConfiguration acuConf, Collection<String> tables, FileSystem fs, Connector conn, boolean humanReadable) throws TableNotFoundException, IOException { }, humanReadable); public static void printDiskUsage(AccumuloConfiguration acuConf, Collection<String> tables, File...
0
package org.apache.accumulo.test.randomwalk.concurrent; import org.apache.accumulo.test.randomwalk.State; import org.apache.accumulo.test.randomwalk.Test;
0
public Ample.TabletMutator deleteFile(Ample.FileMeta path) { Preconditions.checkState(updatesEnabled, "Cannot make updates after calling mutate."); mutation.putDelete(DataFileColumnFamily.NAME, path.meta()); return this; } @Override public Ample.TabletMutator deleteScan(Ample.FileMeta path) { m...
0
package org.apache.beam.sdk.util.state; import org.apache.beam.sdk.coders.Coder; import org.apache.beam.sdk.transforms.Combine.CombineFn; import org.apache.beam.sdk.transforms.Combine.KeyedCombineFn; import org.apache.beam.sdk.transforms.CombineWithContext.KeyedCombineFnWithContext; import org.apache.beam.sdk.transform...
0
super(Lists.newArrayList());
0
import org.apache.beam.sdk.transforms.windowing.TimestampCombiner; public <W extends BoundedWindow> WatermarkHoldState bindWatermark( StateTag<? super K, WatermarkHoldState> address, TimestampCombiner timestampCombiner) {
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.ArrayList; import java.util.List; import org.apache.accumulo.core.security.Authorizations; byte[] visibility = args[7].getBytes(); Authorizations auths = conn.securityOperations().getUserAuthorizations(user); if (!auths.contains(visibility)) { List<byte[]> copy = new ArrayList<byte[]>...
0
* Return the interval. * * @return the interval */ public long getInterval() { return interval; } /**
0
* @deprecated (4.4) use {@link org.apache.http.impl.cookie.DefaultCookieSpecProvider}. * @Deprecated
0
dto.initParams = info.getInitParameters();
0
/** * For debugging * @since 3.6 */
0
package aQute.lib.osgi; import java.io.*; public abstract class AbstractResource implements Resource { String extra; byte[] calculated; long lastModified; protected AbstractResource(long modified) { lastModified = modified; } public String getExtra() { return extra; } ...
0
import org.apache.ambari.server.security.authorization.UserType; import org.junit.Assert; import org.junit.Test;
0
package org.apache.accumulo.core.client.sample; import java.io.DataOutput; import java.io.IOException; private void putByteSquence(ByteSequence data, DataOutput hasher) throws IOException { hasher.write(data.getBackingArray(), data.offset(), data.length()); protected void hash(DataOutput hasher, Key k) throws I...
0
public boolean areEqualValues(Object val1, Object val2) { for (AtlasClassificationType superType : superTypes) { if (!superType.areEqualValues(val1, val2)) { return false; } } return super.areEqualValues(val1, val2); } @Override
0
private AtomicReference<T> serviceObjectRef = new AtomicReference<>(); "Could not get service from ref {0}", null, getRef() );
0
import java.io.BufferedReader; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; import java.nio.file.Paths; import org.apache.sshd.common.config.SshConfigFileReader; setupServerBanner(sshd, options); public static String setupServerBanner(ServerFactoryManager server, Map<String, ...
0
/***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * * ------------------------------------------------------------------------- * * This software is published under the terms of the Apache Software License * * v...
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
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/test/org/apache/commons/validator/MultipleConfigFilesTest.java,v 1.7 2003/08/23 02:24:07 rleland Exp $ * $Revision: 1.7 $ * $Date: 2003/08/23 02:24:07 $ * Copyright (c) 2001-2003 The Apache Software Foundation. All...
0
* Copyright 2016-2017 Seznam.cz, a.s.
0
import java.io.ByteArrayInputStream; final ByteArrayInputStream inputStream = new ByteArrayInputStream(s.getBytes(StandardCharsets.US_ASCII)); final SessionInputBuffer inbuffer = new SessionInputBufferImpl(16, StandardCharsets.US_ASCII.newDecoder()); final HttpRequest httprequest = parser.parse(...
1
return containsAll(new HashBag<>(coll)); return new BagIterator<>(this); return retainAll(new HashBag<>(coll)); final Bag<E> excess = new HashBag<>();
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...
0
if (LOG.isDebugEnabled()) { if (LOG.isDebugEnabled()) { if (LOG.isDebugEnabled()) { if (LOG.isDebugEnabled()) {
0
import org.apache.sshd.common.util.logging.AbstractLoggingBean;
0
@Override
0
public class BeanHandler<T> implements ResultSetHandler<T> { private final Class<T> type; public BeanHandler(Class<T> type) { public BeanHandler(Class<T> type, RowProcessor convert) { public T handle(ResultSet rs) throws SQLException {
0
import org.apache.hadoop.mapreduce.Job; static Job job; job = ContextFactory.createJob(); AccumuloFileOutputFormat.setReplication(job, a); AccumuloFileOutputFormat.setFileBlockSize(job, b); AccumuloFileOutputFormat.setDataBlockSize(job, c); AccumuloFileOutputFormat.setIndexBlockSize(job, d); A...
0
package org.apache.accumulo.shell.commands; import org.apache.accumulo.shell.Shell; import org.apache.accumulo.shell.Token; import org.apache.accumulo.shell.Shell.Command;
0
// set-up our input source (a stream) // extract interesting words from the source // ~ we're interested onlly // reduce it to counts, use windowing // produce the output
0
private final EndpointHolder endpointHolder; public static void enchance(final ClassicHttpResponse response, final EndpointHolder connHolder) { ResponseEntityProxy(final HttpEntity entity, final EndpointHolder endpointHolder) { this.endpointHolder = endpointHolder; if (this.endpointHolder !=...
0
* * @since 4.0
0
return myCoder.getType().equals(GenericRecord.class) ? new GenericDatumReader<T>(myCoder.getSchema()) : new ReflectDatumReader<T>(myCoder.getSchema()); } }; this.writer = new EmptyOnDeserializationThreadLocal<DatumWriter<T>>() { private final AvroCoder<T> myCoder = Av...
0
* @version $Id: EventValidity.java,v 1.2 2003/09/05 04:02:51 ghoward Exp $
0
* @version 1.5
0
* @param dst the target FileChannel to transfer data into. long transfer(FileChannel dst, long position, long count) throws IOException;
0
for (Element dep : deps) { String na = dep.getAttribute("id"); String field = dep.getAttribute("field"); return dep; return dep;
0
* Bridge class for the &lt;vkern&gt; element. * Constructs a new bridge for the &lt;vkern&gt; element.
0
import org.apache.accumulo.core.client.NamespaceNotFoundException; if (!exists(tableName)) { if (!namespaceExists(namespace)) throw new TableNotFoundException(tableName, new NamespaceNotFoundException(null, namespace, null)); throw new TableNotFoundException(null, tableName, null);
0
private final Map<ProtocolVersion, String> viaHeaders = new HashMap<>(4); } catch (final IOException | RuntimeException ex) { } catch (final IOException | RuntimeException ex) {
0
import org.apache.beam.sdk.extensions.euphoria.core.client.operator.Join.BuilderParams; final BuilderParams<LeftT, RightT, ?, ?, ?> params = new BuilderParams<>( private final BuilderParams<LeftT, RightT, ?, ?, ?> params; ByBuilder(BuilderParams<LeftT, RightT, ?, ?, ?> params) { BuilderPar...
0
import static org.apache.accumulo.fate.util.UtilWaitThread.sleepUninterruptibly;
0
@Component(factoryPid = "FactoryPidTest", propagate = true) @Property(name = "foo", value = "bar")
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
* * <p> * </p> * <p> * </p>
0
* @param purl URL of the image.
1
tail = tail.next){} if (tail != null) { // protect against possible NPE tail.next = c.child; }
0
PaneInfo.NO_FIRING)));
0
@Override
0
/* * $Id$ * 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...
0
public static final String NAMESPACE = "ns1"; private <T> List<MetricResult<T>> makeResults( String step, String name, T committed, T attempted) { MetricName metricName = MetricName.named(NAMESPACE, name); return Collections.singletonList( isCommittedSupported ? MetricResult.create...
0
* * * Information result of the bundling process * private Map<String, Set<Artifact>> m_exportedPackages = new HashMap<String, Set<Artifact>>(); Set<Artifact> artifacts = getExportedPackages().get( packageName ); artifacts = new HashSet<Artifact>(); protected Map<String, Set<Artifact>> g...
0
import org.apache.accumulo.core.client.impl.MasterClient; import org.apache.accumulo.core.master.thrift.MasterClientService; import org.apache.accumulo.core.master.thrift.MasterMonitorInfo; import org.apache.accumulo.server.client.HdfsZooInstance; import org.apache.accumulo.server.security.SystemCredentials; import org...
0
* @version $Id: PropertiesConfiguration.java,v 1.6 2004/03/28 15:34:23 epugh Exp $ InputStream is = getPropertyStream(fileName); load(is); is.close();
0
application.getTransform().getUnderlyingParDo().getFn(); transformOutputWindow.getTransform().getTransform().getUnderlyingParDo().getFn();
0
* The internal handler object. * Creates a handler manager. * @param factory the handler factory * @param context the bundle context * @param handlers the handler array * Gets the contained handler object. * Creates and initializes the handler object. * @param instance the compon...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/adapters/Attic/ListDoubleList.java,v 1.3 2003/11/07 20:08:15 rwaldhoff Exp $ * * @deprecated This code has been moved to Jakarta Commons Primitives (http://jakarta.ap...
0
(col1 != null) ? col1 : new ArrayList<>(col2.size()); Set<E> result = (set1 != null) ? set1 : new HashSet<>(); Map<K, V> result = (map1 != null) ? map1 : new HashMap<>(); Collection<E> result = (col != null) ? col : new LinkedList<>(); Set<E> result = (col != null) ? col ...
0
row1 = new ArrayList<>(); row2 = new ArrayList<>(); row3 = new ArrayList<>();
0
try { clusterTopology.getBlueprint().getStack().getServiceForConfigType(type); } catch (IllegalArgumentException illegalArgumentException) { LOG.error(new StringBuilder(String.format("Error encountered while trying to obtain the service name for config type [%s]. ", type)) ...
0
Assert.assertNotNull(injector.getInstance(HostComponentDesiredStateDAO.class).findByIndex( nameNodeHost.getClusterId(), nameNodeHost.getServiceName(), nameNodeHost.getServiceComponentName(), nameNodeHostEntity.getHostId() )); Assert.assertNull(injector.getInstance(HostComponentDesire...
0
import org.osgi.service.cm.ManagedService; private final DispatcherServlet dispatcher; private final HttpServiceController controller; private final Map<String, Deployment> deployments; private final ExecutorService executor; this.deployments = new LinkedHashMap<String, Deployment>(); } ...
0
AvroSource.from(new File(tmpFolder.getRoot().toString(), baseName + "*").toString())
0
* "invokeAndWait" call. dispatchRunnable.run(); // execute in current thread fireAsyncDocumentEvent(new DocumentPropertyEvent( DocumentPropertyEvent.SIZE, new Dimension((int)w, (int)h)), false);
0
@Test public void testWindow_applyIf() { Flow flow = Flow.create("TEST"); Dataset<String> dataset = Util.createMockDataset(flow, 3); Distinct.of(dataset) .applyIf(true, b -> b.windowBy(Time.of(Duration.ofHours(1)))) .output(); Distinct distinct = (Distinct) flow.operators().iterato...
0
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.List; import org.apache.beam.sdk.coders.Coder; import org.apache.beam.sdk.coders.CoderException; // Two distinct tags because they have non-equals() coders private static final StateTag<BagState<String>> STRING_BAG...
0
IScheduledTask a = makeTask("a", nullMetadata); IScheduledTask b = makeTask("a", nullMetadata); IScheduledTask c = makeTask("a", nullMetadata);
0
private static final String DEFAULT_PASSWORD = "super secret passphrase"; @Override public String getPassword(String file) throws IOException { return DEFAULT_PASSWORD; } }; for (BuiltinCiphers c : new BuiltinCiphers[]{ BuiltinCiphers.aes128cbc, Builti...
1
private static final long serialVersionUID = -5148237843784525732L;
0
tmpMap.put(_Fields.AUTHORIZATIONS, new org.apache.thrift.meta_data.FieldMetaData("authorizations", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, tmpMap.put(_Fields.RANGE, new org.apache.thrift.meta_data.FieldMetaData("...
0
HashMap<KeyExtent, SecurityErrorCode> authFailures = new HashMap<KeyExtent, SecurityErrorCode>(); if (us.currentTablet == null && (us.failures.containsKey(keyExtent) || us.authFailures.containsKey(keyExtent))) { if (sameTable || authenticator.hasTablePermission(SecurityConstants.getSystemCredentials()...
0
Map<String,String> uniqueFiles = new HashMap<>();
0
if (email.endsWith(".")) { // check this first - it's cheap! * @param domain being validated, may be in IDN format
0