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 |
/**
* Returns a String descriptor entry parameter value.
*/
long getLong(Params key);
/**
* Returns a String descriptor entry parameter value.
*/
long getLong(Params key, long def); | 0 |
import org.apache.felix.ipojo.composite.CompositeInstanceDescription;
CompositeInstanceDescription id = (CompositeInstanceDescription) arch.getInstanceDescription();
//id = arch.getInstanceDescription();
//id = arch.getInstanceDescription();
//id = arch.getInstanceDescription();
//id = arch.getInstanceD... | 0 |
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
* @deprecated (4.2) use {@link PoolingHttpClientConnectionManager}
if (hca.getPoolEntry() != null) {
Asserts.check(hca.getManager() == this, "Connection not obtained from this manager");
} | 0 |
import java.awt.Rectangle;
public CachableRed getSource() {
Rectangle aoiR;
if (aoi != null)
aoiR = aoi.getBounds();
else
aoiR = getBounds2D().getBounds();
CachableRed cr = getSource();
if (aoiR.intersects(cr.getBounds()) == false)
return... | 0 |
import org.apache.felix.framework.util.Util;
import org.osgi.framework.AdminPermission;
import org.osgi.framework.Bundle;
if (!"felix".equals(url.getAuthority()))
{
checkPermission(url);
}
protected void parseURL(URL u, String spec, int start, int limit)
{
super.par... | 1 |
@Override
public BeamSqlPrimitive evaluate(Row inputRow, BoundedWindow window) { | 0 |
package org.apache.commons.digester3;
/*
* 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 Licens... | 0 |
return iface.isAssignableFrom(getClass()) || _stmt.isWrapperFor(iface);
} else if (iface.isAssignableFrom(_stmt.getClass())) {
return iface.cast(_stmt);
return _stmt.unwrap(iface); | 0 |
import org.apache.accumulo.server.security.SystemCredentials;
MasterMonitorInfo stats = client.getMasterStats(Tracer.traceInfo(), SystemCredentials.get().getAsThrift());
static class Opts extends ClientOnRequiredTable {} | 1 |
for (int i=0; i<list.getLength(); i++) {
Node n = list.item(i);
if (n != null) { | 0 |
* Copyright 2001-2006 The Apache Software Foundation | 0 |
//client = new HttpClient(new ThreadLocalHttpConnectionManager());
final HostConfiguration config = new HostConfiguration(); | 0 |
* <pre>
* </pre>
* <pre>
* </pre>
* <pre>
* </pre> | 0 |
/**
* 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 java.nio.file.Path;
import java.nio.file.Paths;
private Path currentDir;
this.currentDir = Paths.get(System.getProperty("user.dir")).toAbsolutePath().normalize();
public Path currentDir() {
return currentDir;
}
public void currentDir(Path path) {
currentDir = path;
}... | 0 |
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkState;
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Iterables; | 0 |
import org.apache.http.HttpHost;
| 0 |
fac = XMLSignatureFactory.getInstance("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI()); | 0 |
import com.google.inject.Binder;
import org.apache.atlas.listener.EntityChangeListener;
import org.apache.atlas.repository.audit.EntityAuditListener;
import org.apache.atlas.repository.audit.EntityAuditRepository;
import org.apache.atlas.repository.audit.HBaseBasedAuditRepository;
import org.apache.atlas.service.Servic... | 0 |
@SerializedName("clusterSize")
private int clusterSize = -1;
public void setClusterSize(int clusterSize) {
this.clusterSize = clusterSize;
}
| 0 |
* Signals a malformed chunked stream. | 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 ma... | 0 |
/***
* $Id: POP3Reply.java,v 1.1 2002/04/03 01:04:33 brekke Exp $
*
* NetComponents Internet Protocol Library
* Copyright (C) 1997-2002 Daniel F. Savarese
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the... | 0 |
return new ChainedTransformer<>(transformers);
return new ChainedTransformer<>(false, cmds); | 1 |
String base = System.getProperty("basedir") == null ? "./": System.getProperty("basedir");
base += fs + "data" | 0 |
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
state.set("tableList", new CopyOnWriteArrayList<String>());
List<String> tables = (List<String>) state.get("tableList"); | 0 |
import org.apache.http.params.HttpConnectionParams;
.setIntParameter(HttpConnectionParams.SO_TIMEOUT, 5000)
.setBooleanParameter(HttpConnectionParams.STALE_CONNECTION_CHECK, false) | 0 |
package cz.seznam.euphoria.core.client.functional;
/**
* Function of two arguments of the same type.
*/
@FunctionalInterface
public interface SameArgsBinaryFunction<IN, OUT>
extends BinaryFunction<IN, IN, OUT> {
} | 0 |
/*
* Copyright 2016-2018 Seznam.cz, a.s. | 0 |
for (byte[] val : values) | 0 |
public boolean isPrimitiveType() {
return isNumericType() || isStringType() || isDateType();
}
// For MAP type, returns the type of the key element, it must be a primitive type;
@Nullable public abstract TypeName getMapKeyType();
// For MAP type, returns the type of the value element, it can b... | 0 |
private static BCELComparator _cmp = new BCELComparator() {
* @param comparator Comparison strategy object
*/
public static void setComparator( BCELComparator comparator ) {
_cmp = comparator;
}
/** | 0 |
import org.apache.accumulo.core.data.TableId;
KeyExtent ke = new KeyExtent(TableId.of("0"), null, null);
KeyExtent ke = new KeyExtent(TableId.of("0"), null, null);
KeyExtent ke = new KeyExtent(TableId.of("0"), null, null); | 0 |
FunctionSpec.newBuilder()
.setUrn(KNOWN_CODER_URNS.get(coder.getClass()))
.setPayload(ByteString.copyFrom(translator.getPayload(coder))))
FunctionSpec.newBuilder()
.setUrn(JAVA_SERIALIZED_CODER_URN)
.setPayload(ByteString.copyFrom(S... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/decorators/Attic/ObservedTestHelper.java,v 1.3 2003/08/31 21:09:49 scolebourne Exp $
* @version $Revision: 1.3 $ $Date: 2003/08/31 21:09:49 $
coll.addModificationListe... | 0 |
for (int j = 0; j < 10; ++j) { | 0 |
import java.util.function.Predicate;
/**
* @since 4.4
*/
@Override
public boolean removeIf(final Predicate<? super E> filter) {
return decorated().removeIf(filter);
}
| 0 |
import org.apache.beam.vendor.grpc.v1p21p0.com.google.protobuf.Struct;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.util.concurrent.ListeningExecutorService; | 0 |
package org.apache.felix.sigil.eclipse.ui.internal.preferences.repository; | 0 |
Map<String, Object> properties = new HashMap<String, Object>();
Map<String, Object> properties = new HashMap<String, Object>();
Map<String, Object> properties = new HashMap<String, Object>(); | 0 |
/*****************************************************************************
* Copyright (C) The Apache Software Foundation. All rights reserved. *
* ------------------------------------------------------------------------- *
* This software is published under the terms of the Apache Software License *
* v... | 1 |
* Copyright 2001-2005 The Apache Software Foundation | 0 |
JavaClass clazz = getTestClass(PACKAGE_BASE_NAME+".data.PLSETestClass");
JavaClass clazz = getTestClass(PACKAGE_BASE_NAME+".data.PLSETestClass"); | 0 |
package org.apache.beam.harness.channel;
import org.hamcrest.Matchers;
assertThat(socketAddress, Matchers.instanceOf(InetSocketAddress.class));
assertThat(socketAddress, Matchers.instanceOf(DomainSocketAddress.class)); | 0 |
import org.apache.hc.core5.http.ClassicHttpResponse;
import org.apache.hc.core5.http.io.entity.BasicHttpEntity;
import org.apache.hc.core5.http.io.entity.HttpEntityWithTrailers;
import org.apache.hc.core5.http.io.entity.StringEntity;
import org.apache.hc.core5.http.message.BasicHeader;
public void testResponseConnC... | 1 |
package org.apache.hadoop.metadata.service;
import java.io.IOException;
public class TestService implements Service {
public static final String NAME = TestService.class.getName();
@Override
public String getName() {
return NAME;
}
@Override
public void start() throws Exception {
}
@Override
public vo... | 0 |
@SuppressWarnings("unchecked") // (1) should only fail if input stream is incorrect
map = (Map<K, Object>) in.readObject(); // (1) | 0 |
ClientContext context = getClientContext(); | 0 |
if (__state != __LAST_WAS_CR_STATE) {
}
if (__state == __LAST_WAS_NL_STATE) {
}
while (length-- > 0) {
}
if (__output == null) {
}
if (__state == __LAST_WAS_CR_STATE) {
} else if (__st... | 1 |
* Interface for receiving data.
* Unlike {@link java.io.InputStream}, this interface is tailored
* to the needs of the HTTP components.
* | 0 |
out.println("-w <width> Width of the output image");
out.println("-h <height> Height of the output image");
float width = Float.NaN;
float height = Float.NaN;
} else if (args[i].equals("-w")) {
if (i+1 < args.length) {
i++;
... | 0 |
BatchScanner scanner =
conn.createBatchScanner(state.getString("seqTableName"), new Authorizations(), 2); | 0 |
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument;
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkNotNull;
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkState;
import org.apache.be... | 0 |
import org.apache.hc.core5.http.nio.SessionOutputBuffer;
import org.apache.hc.core5.http.nio.SessionOutputBufferImpl; | 1 |
final int map_length = input.readUnsignedShort();
for (final StackMapEntry entry : map) {
for (final StackMapEntry element : map) {
final StringBuilder buf = new StringBuilder("StackMap(");
final StackMap c = (StackMap) clone(); | 1 |
/**
* The MIME types that jacl can handle.
*/
private static final String[] JACL_MIMETYPES = { "text/tcl" };
* Returns the mime-types to register this interpereter with.
public String[] getMimeTypes() {
return JACL_MIMETYPES;
} | 0 |
* Service with one or more Http Service registrations.
* Specification this property is set to a collection of {@code service.id}
* for the {@code HttpService} registrations provided by this
* implementation.
* The value of this attribute must be of type {@code Collection<Long>}. | 0 |
import java.io.IOException;
import java.io.InputStream;
InputStream getContent() throws IOException; | 0 |
String connString = (String) event.getOldValue();
a.firePropertyChangedEvent(Plugin.NEW_NODE_READY, connString, mbsc); | 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 |
* 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... | 1 |
OutputReceiverFactory outputReceiverFactory, StateRequestHandler stateRequestHandler,
BundleProgressHandler progressHandler)
return processor.newBundle(outputReceivers.build(), stateRequestHandler, progressHandler); | 0 |
protected K setKey(final K key) {
protected V setValue(final V value) { | 0 |
if (!shellState.getConnector().tableOperations().exists(tableName))
throw new TableNotFoundException(null, tableName, null);
if (cl.hasOption(optStartRow.getOpt()))
startRow = new Text(cl.getOptionValue(optStartRow.getOpt()));
if (cl.hasOption(optEndRow.getOpt()))
endRow = new Text(cl.... | 1 |
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import org.apache.bcel.Constants; | 0 |
package com.twitter.mesos.scheduler.httphandlers; | 0 |
verify(mockStorage).removeEntry("http://foo.example.com:80/content"); | 0 |
* @deprecated Use {@link #getSha1Digest()}
@Deprecated | 0 |
import org.apache.ambari.server.stack.StackManagerFactory;
install(new FactoryModuleBuilder().build(StackManagerFactory.class)); | 0 |
@FunctionalInterface | 0 |
public Converting copy() {
// TODO Implement this
return null;
}
@Override | 0 |
return isConstant(this instanceof JexlNode.Literal<?>);
}
public boolean isConstant(boolean literal) {
if (literal) { | 0 |
String timer1Tag = "gAAAAAAAA-joB_____8P";
String timer2Tag = "gAAAAAAAA-joBwA";
String timer3Tag = timer2Tag + "AAAA";
String bufferTag = "MergeWindows:gAAAAAAAA-joBw/__buffer";
String watermarkHoldTag = "MergeWindows:gAAAAAAAA-joBw/__watermark_hold"; | 0 |
@Deprecated
@Override
ColumnUpdate upd = (ColumnUpdate) obj;
return Arrays.equals(getColumnFamily(), upd.getColumnFamily()) && Arrays.equals(getColumnQualifier(), upd.getColumnQualifier())
&& Arrays.equals(getColumnVisibility(), upd.getColumnVisibility()) && isDeleted() == upd.isDeleted() && Arra... | 0 |
this(opt, null, hasArg, description); | 0 |
import org.apache.beam.vendor.grpc.v1p13p1.io.grpc.stub.CallStreamObserver;
import org.apache.beam.vendor.grpc.v1p13p1.io.grpc.stub.StreamObserver; | 0 |
import org.apache.ambari.common.rest.entities.NodeRole;
NodeRole ns = new NodeRole(e.getRoleName(), NodeRole.NODE_SERVER_STATE_DOWN, Util.getXMLGregorianCalendar(new Date()));
nodes.getNodes().get(host).getNodeState().updateRoleState(ns);
if (nodes.getNodes().get(host).getNodeSta... | 0 |
* @return <code>true</code> if the encodings of these strings are identical, <code>false</code> otherwise. | 1 |
import javax.annotation.Nullable;
@Default.Long(10 * 60)
@Nullable
Long getTestTimeoutSeconds();
void setTestTimeoutSeconds(Long value);
| 0 |
List<String> names = schmreg.getSchemeNames(); | 0 |
/* ====================================================================
* Copyright (c) 2001-2004 The Apache Software Foundation. All rights
* @version $Revision: 1.2 $ $Date: 2004/01/14 21:34:28 $ | 0 |
@Test
public void testDefaultMap() {
Integer value = new DefaultMap<String,Integer>(0).get("test");
assertNotNull(value);
assertEquals(new Integer(0), value);
value = new DefaultMap<String,Integer>(1).get("test");
assertNotNull(value);
assertEquals(new Integer(1), value);
AtomicIntege... | 1 |
private static final long serialVersionUID = 8305393337889433901L;
| 0 |
package org.apache.cocoon.portal.om; | 0 |
public class Main<OptionT extends NexmarkOptions> {
void runAll(OptionT options, NexmarkLauncher nexmarkLauncher) {
NexmarkPerf perf = nexmarkLauncher.run(configuration);
NexmarkLauncher<NexmarkOptions> nexmarkLauncher = new NexmarkLauncher<>(options);
new Main<>().runAll(options, nexmarkLauncher); | 0 |
import org.apache.aurora.scheduler.storage.entities.IJobUpdateKey;
* @param key ID of the update associated with the event.
void insert(@Param("key") IJobUpdateKey key, @Param("event") JobUpdateEvent event); | 0 |
import org.objectweb.asm.Label;
final MethodDescriptor md = new MethodDescriptor("$init", desc, (access & ACC_STATIC) == ACC_STATIC);
return new MethodInfoCollector(md);
final MethodDescriptor md = new MethodDescriptor(name, desc, (access & ACC_STATIC) == ACC_... | 0 |
public void flushCacheEntriesInvalidatedByRequest(
public void flushCacheEntriesInvalidatedByExchange( | 0 |
import org.apache.ambari.view.huetoambarimigration.datasource.queryset.huequeryset.pig.savedscriptqueryset.QuerySetHueDb;
import java.net.URI;
static final Logger logger = Logger.getLogger(PigScriptMigrationImplementation.class);
public ArrayList<PigModel> fetchFromHueDatabase(String username, String startdate, Str... | 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 int hashCode() {
return 0;
}
@Override
public int hashCode() {
return 0;
}
@Override | 0 |
// use the EOF flag of the underlying codec instance
return baseNCodec.eof ? 0 : 1;
if (!baseNCodec.hasData()) {
baseNCodec.encode(buf, 0, c);
baseNCodec.decode(buf, 0, c);
readLen = baseNCodec.readResults(b, offset, len); | 0 |
* @version $Revision$ $Date$ | 0 |
private static final Logger LOG = LoggerFactory.getLogger(ExecutableStageDoFnOperator.class);
LOG.debug(String.format("Sending value: %s", element)); | 0 |
import org.apache.beam.sdk.testing.ValidatesRunner;
@Category(ValidatesRunner.class) | 0 |
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList; | 0 |
* Return whether decimals are allowed in the number.
*
* @return Whether decimals are allowed in the number
*/
public boolean isAllowDecimals() {
return allowDecimals;
}
/**
* Return the number format pattern used to convert
* Numbers to/from a <code>java.lang.String</... | 0 |
import org.apache.commons.collections4.functors.EqualPredicate;
import org.apache.commons.collections4.functors.InstanceofPredicate;
import org.apache.commons.collections4.functors.NotPredicate;
import org.apache.commons.collections4.functors.NullPredicate; | 0 |
private void ensureIsDirectory(Source src, String location) throws ConfigurationException {
if (!src.exists()) {
throw new ConfigurationException(src.getURI() + " doesn't exist, at " + location);
} else if (!(src instanceof TraversableSource) || !((TraversableSource)src).isCollection()) ... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.