Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/adapters/io/Attic/InputStreamByteIterator.java,v 1.3 2003/08/31 17:21:21 scolebourne Exp $ * any, must include the following acknowledgement: * Alternately, this...
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
.setTimePartitioning(partitioning) .setEncryptionConfiguration(copy.getDestinationEncryptionConfiguration()));
0
import org.apache.ambari.server.controller.predicate.CategoryPredicate; @Override public void acceptCategoryPredicate(CategoryPredicate predicate) { // Do nothing }
0
FORMAT.parseDateTime("2017-01-01 02:04:03"), FORMAT.parseDateTime("2017-01-01 01:01:03"), 0, 3L, FORMAT.parseDateTime("2017-01-01 01:00:00"), 0, 1L, FORMAT.parseDateTime("2017-01-01 02:00:00")) .addValues(1, FORMAT.parseDateTime("20...
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
log.info("{} {}", kv.getKey().toStringNoTruncate(), ProtobufUtil.toString(Status.parseFrom(kv.getValue().get()))); log.info("{} {}", kv.getKey().toStringNoTruncate(), kv.getValue()); log.info("{} {}", kv.getKey().toStringNoTruncate(), ProtobufUtil.toString(Status.parseFrom(kv.getValue().get(...
0
* Thin implementation of ThriftServer.
0
import org.apache.ambari.server.security.SecurePasswordHelper;
0
import java.util.List; * The dirty areas, as a List of Rectangles. protected List dirtyAreas; public UpdateManagerEvent(Object source, BufferedImage bi, List das) { dirtyAreas = das; * Returns the dirty areas (list of rectangles) public List getDirtyAreas() { return dirtyAreas;
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
MASTER_LEASE_RECOVERY_WAITING_PERIOD("master.lease.recovery.interval", "5s", PropertyType.TIMEDURATION, "The amount of time to wait after requesting a WAL file to be recovered"),
0
protected static final String NEGATE = "negate";
0
@Override @Override @Override @Override @Override
0
public class ParameterPropertyVisitor extends MethodPropertyVisitor { * @see org.objectweb.asm.AnnotationVisitor#visitEnd()
0
package org.apache.beam.sdk.extensions.euphoria.core.time;
0
throw new IllegalArgumentException("Bad # of options, must supply: " + MAX_COLUMNS + " as value"); if (!options.containsKey(MAX_COLUMNS)) throw new IllegalArgumentException("Bad # of options, must supply: " + MAX_COLUMNS + " as value"); try { maxColumns = Integer.parseInt(options.get(MAX_COLUM...
1
AbstractComponentManager.RefPair refPair = ( AbstractComponentManager.RefPair ) rawParameter;
0
import org.apache.felix.scr.impl.config.ComponentActivator; ComponentActivator activator = getActivator(); final ComponentActivator activator = getActivator(); final ComponentActivator activator = getActivator(); ComponentActivator activator = getActivator(); final ComponentA...
0
* Number of NIO worker threads to use. */ public static final String NIO_WORKERS = "nio-workers"; /** * Default number of worker threads to use. */ public static final int DEFAULT_NIO_WORKERS = Runtime.getRuntime().availableProcessors() + 1; /**
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
* Does not print the userName and userPassword field nor the 'user' or 'password' in the connectionProperties. // TODO What if the connection string contains a 'user' or 'password' query parameter but that connection string is not in a legal URL format?
0
package com.google.cloud.dataflow.examples.cookbook; import com.google.cloud.dataflow.examples.cookbook.JoinExamples.ExtractCountryInfoFn; import com.google.cloud.dataflow.examples.cookbook.JoinExamples.ExtractEventDataFn;
0
import static org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.aggregators.AggregatorUtils.getJavaRegexFromSqlRegex;
0
PipelineOptions options = pipeline.getOptions(); pipeline.toString());
0
* with the {@code HttpCacheEntry} so it can be compared * @return {@code MemcachedCacheEntry}
0
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Objects; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Optional; import org.apache.beam.vendor.guava.v26_0_jre.com.google.c...
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
* 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
if (super.validateOptions(options) == false) return false; try { setLossyness(options); } catch (Exception e) { throw new IllegalArgumentException("bad boolean " + LOSSY + ":" + options.get(LOSSY)); }
1
import cz.seznam.euphoria.testing.DatasetAssert; }
0
throw new IOException( throw new IOException(
0
import org.apache.beam.sdk.coders.BigEndianIntegerCoder; import org.apache.beam.sdk.coders.Coder; import org.apache.beam.sdk.coders.CoderException; import org.apache.beam.sdk.coders.CoderRegistry; import org.apache.beam.sdk.coders.CustomCoder; import org.apache.beam.sdk.coders.ListCoder; import org.apache.beam.sdk.tran...
0
import static com.google.common.base.Charsets.UTF_8; import org.apache.accumulo.core.data.Value; String[] ba = new String(encodedDFV, UTF_8).split(","); return encodeAsString().getBytes(UTF_8); } public String encodeAsString() { return ("" + size + "," + numEntries + "," + time); return ("" + s...
0
import org.apache.sshd.util.BaseTestSupport; public class BuiltinCompressionsTest extends BaseTestSupport { assertSame(name, expected, actual); assertNotNull("No match found for " + name, value); assertTrue(name + " re-specified", avail.add(value)); assertEquals("Incomple...
0
import java.io.IOException; import java.net.ConnectException; import java.net.SocketAddress; String connectUrl = getCollectorUri(); try { String jsonData = mapper.writeValueAsString(metrics); SocketAddress socketAddress = getServerSocketAddress(); if (socketAddress != null) { StringRe...
0
import java.util.HashSet; import java.util.Set; public Set<String> getServiceComponentsHosts() { Set<String> serviceComponentsHosts = new HashSet<>(); for (ServiceComponentHost serviceComponentHost : getServiceComponentHosts().values()) { serviceComponentsHosts.add(serviceComponentHost.getHostName()); ...
1
CredentialProviderToken clone = (CredentialProviderToken) super.clone();
0
n.save( monitor );
0
this.trees.put(prefs[i].getDescription().getIdentifier(), prefs[i]);
0
package org.apache.hc.core5.http.impl.bootstrap; new ThreadFactoryImpl("HTTP-worker", this.workerThreads, false));
0
package org.apache.hc.core5.http.impl.nio; import org.apache.hc.core5.http.io.HttpRequestHandler; import org.apache.hc.core5.http.nio.HttpAsyncExchange; import org.apache.hc.core5.http.nio.HttpAsyncRequestConsumer; import org.apache.hc.core5.http.nio.HttpAsyncRequestHandler; ...
1
assertTrue(FunctionalTestUtils.count(s) > 0); assertEquals(0, FunctionalTestUtils.count(s));
0
package org.apache.atlas.web.service; import org.apache.atlas.web.resources.AdminJerseyResourceIT; import org.apache.atlas.web.resources.BaseResourceIT; import org.apache.atlas.web.resources.EntityJerseyResourceIT; import org.apache.atlas.web.resources.MetadataDiscoveryJerseyResourceIT; import org.apache.atlas.web.reso...
1
List<Assignment> assignments = new ArrayList<>(); List<Assignment> assigned = new ArrayList<>();
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
null, true)); } protected void addColumnsToUpgradeTable() throws SQLException { dbAccessor.addColumn(UPGRADE_TABLE, new DBAccessor.DBColumnInfo(UPGRADE_PACK_STACK_ID, String.class, 255, "", false));
0
HttpRequestExecutor reqexec) { managedConn.open(route, context, requestExec.getParams()); managedConn.tunnelCreated(secure, requestExec.getParams()); managedConn.layerProtocol(context, requestExec.getParams());
0
/* * $Header: /cvshome/build/ee.foundation/src/java/util/Observer.java,v 1.6 2006/03/14 01:20:25 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 not use this...
0
/* import java.net.*; public String getCachedBundleURL() { try { return m_bundleFile.toURL().toString(); } catch (MalformedURLException ex) { // This should never happen. return null; } }
0
this.hasWatchdog = timeout != INFINITE_TIMEOUT;
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 no...
0
hostAggregate.setSum(hostAggregate.getSum() / (perMetricCount - 1));
0
String tableName = OptUtil.getTableOpt(cl, shellState);
0
PCollection<KV<String, String>> wordAllPlays = words.apply(Combine.perKey(new ConcatWords()));
0
private SplitMapUtils() {} //----------------------------------------------------------------------- //-----------------------------------------------------------------------
0
checkTrue(NumberUtils.length(a) > 0, message); checkTrue(NumberUtils.length(a) > 0, message, args); checkTrue(NumberUtils.length(a) > 0, message); checkTrue(NumberUtils.length(a) > 0, message, args);
0
import java.io.File; Configuration conf = new Configuration(); conf.set("mapreduce.cluster.local.dir", new File(System.getProperty("user.dir"), "target/mapreduce-tmp").getAbsolutePath()); return ToolRunner.run(conf, new MRTester(), args);
0
String resDir = configs.getConfigsMap().get(Configuration.RESOURCES_DIR.getKey());
0
import java.io.File; import org.junit.Rule; import org.junit.rules.TemporaryFolder; @Rule public TemporaryFolder folder = new TemporaryFolder(); @Test public void classLoader_readFile() throws Exception { File simpleTable = folder.newFile(); BeamSqlLine.main( new String[] { "-e", ...
0
server.shutdown();
0
private String prefix; private static final Logger log = Logger.getLogger(DebugIterator.class); public DebugIterator() {} public DebugIterator deepCopy(IteratorEnvironment env) { return new DebugIterator(this, env); } private DebugIterator(DebugIterator other, IteratorEnvironment env) { ...
1
throw (IOException) new InterruptedIOException("Interrupted while polling for messages").initCause(e);
0
return SynchronizedSortedSet.synchronizedSortedSet(new TreeSet<E>());
0
HeaderElement[] parseElements(CharSequence buffer, ParserCursor cursor); HeaderElement parseHeaderElement(CharSequence buffer, ParserCursor cursor); NameValuePair[] parseParameters(CharSequence buffer, ParserCursor cursor); NameValuePair parseNameValuePair(CharSequence buffer, ParserCursor cursor);
0
import net.jcip.annotations.NotThreadSafe; @NotThreadSafe // HttpRequestBase is @NotThreadSafe
0
import org.apache.http.HttpHost; * Obtains the scheme for a host. * Convenience method for <code>getScheme(host.getSchemeName())</pre> * * @param host the host for which to obtain the scheme * * @return the scheme for the given host, never <code>null</code> * * @throws Ill...
0
package org.apache.accumulo.test.iterator;
0
import java.io.ObjectInputStream; // We use these for internal encoding/decoding for creating copies and comparing // serialized forms using a Coder private transient InspectableByteArrayOutputStream byteBuffer1; private transient InspectableByteArrayOutputStream byteBuffer2; byteBuffer1 = new InspectableByteArr...
0
node, return new ConcreteBackgroundRable(node, ctx.getGraphicsNodeRenderContext()); in = new ConcreteBackgroundRable(node, ctx.getGraphicsNodeRenderContext());
0
getQueryHint(startTime), outputTableName, aggregateColumnName, tableName,
0
this.generatedURL = this.linkService.getLinkURI(this, this.secure);
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 javax.swing.event.ListDataEvent;
0
float dx = convertNumber(filterElement, SVG_DX_ATTRIBUTE, 0, ctx); float dy = convertNumber(filterElement, SVG_DY_ATTRIBUTE, 0, ctx);
1
(Coder<BoundedWindow>) context.windowCoder, () -> currentElement, () -> currentWindow);
0
private static final long serialVersionUID = -4017327188724019487L; ElementValue default_value;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestDoubleOrderedMap.java,v 1.12 2003/11/16 22:15:09 scolebourne Exp $ import org.apache.commons.collections.map.AbstractTestMap; * @version $Revision: 1.12 $ $Date: 2003/11/16 2...
0
UserGroupInformation actual = token.getUser(), expected = UserGroupInformation.createRemoteUser(principal); AuthenticationTokenIdentifier newToken = new AuthenticationTokenIdentifier(principal, 1, 5l, 10l, "uuid");
0
import org.apache.felix.gogo.commands.Command; @Command(scope = "features", name = "removeUrl", description = "Remove a list of repository URLs from the features service.")
0
* @version $Revision$ $Date$
0
/** * Get the permissions sub-resource * * @param version the version * * @return the permission service */ @Path("{version}/permissions") public ViewPermissionService getPermissionHandler(@PathParam("version") String version) { return new ViewPermissionService(viewName, version); }
0
public String getExpressionText() { StringBuffer buffer = new StringBuffer(); for (Iterator iter = expressions.iterator(); iter.hasNext(); ) { Expression expression = (Expression) iter.next(); buffer.append( expression.getExpressionText() ); } return buff...
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.vendor.guava.v26_0_jre.com.google.common.collect.Iterables;
0
usage = "Default parallelism for SDK worker processes. This option is only applied when the " + "pipeline option sdkWorkerParallelism is set to 0." + "Default is 1, If 0, worker parallelism will be dynamically decided by runner." + "See also: sdkWorker...
0
package com.google.cloud.dataflow.examples.cookbook; import com.google.cloud.dataflow.examples.cookbook.MaxPerKeyExamples.ExtractTempFn; import com.google.cloud.dataflow.examples.cookbook.MaxPerKeyExamples.FormatMaxesFn;
0
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument; import org.apache.beam.vendor.grpc.v1p21p0.com.google.protobuf.ByteString; import org.apache.beam.vendor.grpc.v1p21p0.com.google.protobuf.InvalidProtocolBufferException; import org.apache.beam.vendor.guava.v26_0_jre...
0
import java.io.File; File file = new File(BASEDIR + "/src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/plaintext.xml").getCanonicalFile(); securePart = new SecurePart(file.toURI().toString(), File file = new File(BASEDIR + ...
0
if (log.isTraceEnabled()) opTimer = new OpTimer(log, Level.TRACE).start("Looking up in " + src.tablet_extent.getTableId() + " row=" + TextUtil.truncate(row) + " extent=" + src.tablet_extent + " tserver=" + src.tablet_location); if (opTimer != null) opTimer.stop("Got " + results....
1
return (input.readInt() & 0xffffffffL);
0
protected void processProperties(Properties properties) throws ParseException updateRequiredOptions(opt); // update the required options and groups updateRequiredOptions(opt); // if the option takes an argument value if (opt.hasArg()) { ...
0
long todo = n; while (todo > 0) { int len = (int) Math.min(b.length, todo); len = this.read(b, 0, len); todo -= len; return n - todo;
0
public final class DOMX509Data extends BaseStructure implements X509Data { @Override public List<Object> getContent() { public static void marshal(XmlWriter xwriter, X509Data x509Data, String dsPrefix, XMLCryptoContext context) xwriter.writeStartElement(dsPrefix, "X509Data", XMLSignature.XMLNS); ...
0
* @version $Id: FTPListParseEngine.java,v 1.4 2004/02/19 02:17:19 scohen Exp $ private ListIterator _internalIterator = entries.listIterator();
0
private final BiCache<TaskGroupKey, String> reservations; BiCache<TaskGroupKey, String> reservations) { boolean launched = assigner.maybeAssign( store, new ResourceRequest(task, aggregate), TaskGroupKey.from(task), taskId, reservations.get...
0
/* * 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 appl...
0
import org.apache.beam.sdk.state.TimeDomain;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/map/PredicatedSortedMap.java,v 1.2 2004/01/05 22:15:15 scolebourne Exp $ * Copyright (c) 2003-2004 The Apache Software Foundation. All rights * @version $Revision: 1.2 $ $Date: ...
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