Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
import java.util.concurrent.atomic.AtomicLong; // FIXME: this is basically wrong and cannot function this way outside of local executor // the correct way of doing this is #192 // fix this after implementation of that issue AtomicLong time = new AtomicLong(1000); Dataset<String> lines = flow.createI...
0
import org.apache.ambari.view.utils.UserLocal; private static UserLocal<HdfsApi> hdfsApi; private static UserLocal<TempletonApi> templetonApi; templetonApi = new UserLocal<TempletonApi>(TempletonApi.class) { hdfsApi = new UserLocal<HdfsApi>(HdfsApi.class) {
0
LoggingHttp1StreamListener.INSTANCE_CLIENT);
0
private final HashSet<String> children = new HashSet<String>(); return children.toArray(new String[children.size()]);
0
import org.apache.ambari.server.api.services.ResultStatus;
0
/** * @since 4.2 */ public ByteArrayEntity(final byte[] b, final ContentType contentType) { if (contentType != null) { setContentType(contentType.toString()); } /** * @since 4.2 */ public ByteArrayEntity(final byte[] b, int off, int len, final ContentType ...
0
case OpCode.getEphemerals: case OpCode.getEphemerals: case OpCode.getEphemerals: return "getEphemerals";
0
import java.beans.PropertyChangeEvent; public void addGlobalPropertyChangeListener(PropertyChangeListener l) { PropertyChangeListener l){ public void removeGlobalPropertyChangeListener(PropertyChangeListener l){ public void fireGlobalPropertyChange(Object sou...
0
@Rule public final TestPipeline pipeline = TestPipeline.create();
0
TimestampFilter.setRange(is, "19990101010011GMT+01:00", "19990101010031GMT+01:00"); a.init(new SortedMapIterator(tm), is.getProperties(), null); a.seek(new Range(), EMPTY_COL_FAMS, false); assertEquals(size(a), 21); TimestampFilter.setRange(is, baseTime + 11000, baseTime + 31000);
0
protected void pruneTables(Set<String> tables) {
0
/** * Copyright 2016-2017 Seznam.cz, a.s. * * 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 ...
0
Copyright 2001-2002 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
this.serverParams); this.clientParams);
0
* This method expects the given key to have an arbitrary number of String * values, each of which is of the form <code>key=value</code>. These * strings are splitted at the equals sign, and the key parts will become * keys of the returned <code>Properties</code> object, the value parts * become...
0
if (files == null) { return null; } else if (files.length == 0)
0
private volatile int m_state; public int getState() void setState(int i)
1
KeyPair kp = SecurityUtils.loadKeyPairIdentity(null, keyFilePath, inputStream, null);
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/test/org/apache/commons/jxpath/ri/model/dom/TestDOMFactory.java,v 1.4 2003/10/09 21:31:44 rdonkin Exp $ * $Revision: 1.4 $ * $Date: 2003/10/09 21:31:44 $ * any, must include the following acknowledgement: * Alte...
0
import org.apache.http.params.HttpConnectionParams; this.responseParser = new HttpResponseParser( this.inbuf, params.getIntParameter(HttpConnectionParams.MAX_LINE_LENGTH, -1), params.getIntParameter(HttpConnectionParams.MAX_HEADER_COUNT, -1), respo...
0
/** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog( ResolverXPointer.class.getName()); // log.debug("Use #xpointer(id('" + id + "')) on element " + selectedElem); ...
0
Table.ID tableId; LocatorKey(String instanceId, Table.ID table) { this.tableId = table; return instanceId.hashCode() + tableId.hashCode(); return instanceId.equals(lk.instanceId) && tableId.equals(lk.tableId); public static synchronized TabletLocator getLocator(ClientContext context, Table.I...
1
protected ParamSaxBuffer getMessage(String catalogueID, String key) { getLogger().debug("Untranslated key: '" + key + "'"); public final class CatalogueInfo {
0
/** * TODO: add javadoc. */
0
package org.apache.atlas.web.service; import static org.apache.atlas.security.SecurityProperties.CERT_STORES_CREDENTIAL_PROVIDER_PATH; import static org.apache.atlas.security.SecurityProperties.CLIENT_AUTH_KEY; import static org.apache.atlas.security.SecurityProperties.DEFATULT_TRUSTORE_FILE_LOCATION; import static org...
1
* Copyright (C) 2015 Google Inc.
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 int glyphIndex; public TextHit(int glyphIndex, boolean leadingEdge) { this.glyphIndex = glyphIndex; public int getGlyphIndex() { return glyphIndex; int i = getGlyphIndex();
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
import java.io.IOException; import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
0
Mutation m = new Mutation(String.format("%016x", (rand.nextLong() & 0x7fffffffffffffffl))); long val = (rand.nextLong() & 0x7fffffffffffffffl);
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
b[o + i] = (char)c;
0
import static org.apache.accumulo.fate.util.UtilWaitThread.sleepUninterruptibly;
0
final Configuration one = new BaseConfiguration(); final String properties = final PropertiesConfiguration two = new PropertiesConfiguration(); final PropertiesConfigurationLayout layout = final Properties props = configurationFactory.getObject(); final Properties props =...
0
// this._constructionElement.appendChild(this._doc.createTextNode("\n")); Node result = null; if (this._state == MODE_SIGN) { result = this._constructionElement.appendChild(node); } return result;
0
public AgentConfigsUpdateEvent getCurrentDataExcludeCluster(Long hostId, Long clusterId) throws AmbariException { return configHelper.getHostActualConfigsExcludeCluster(hostId, clusterId); }
0
// TODO unused - is there a bug in the test?
0
import static com.google.cloud.dataflow.sdk.runners.worker.SourceTranslationUtils.readerProgressToCloudProgress; import static com.google.cloud.dataflow.sdk.runners.worker.SourceTranslationUtils.toCloudPosition; @Nullable SourceFormat.OperationResponse operationResponse, @Nullable List<Status> errors) throw...
0
package org.apache.atlas.bridge;
1
import org.apache.beam.sdk.values.PBegin; public PCollection<Row> buildIOReader(PBegin begin) { public POutput buildIOWriter(PCollection<Row> input) { return input.apply( BigQueryIO.<Row>write() .withSchema(BigQueryUtils.toTableSchema(getSchema())) .withFormatFunction(BigQueryUti...
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 * "Lice...
0
import java.util.Map; import java.util.TreeMap; import org.apache.hadoop.metrics2.sink.timeline.TimelineMetric; import org.apache.hadoop.metrics2.sink.timeline.TimelineMetrics; import org.slf4j.Logger; import org.slf4j.LoggerFactory;
0
* @deprecated since 2.0.0, use {@link #setClientPropertiesFile(JobConf, String)} instead ClientContext context = new ClientContext(getClientInfo(job)); ClientContext context = new ClientContext(getClientInfo(job)); tableId = Tables.getTableId(context, tableName); if (!Tables.exi...
0
import org.apache.beam.sdk.runners.AppliedPTransform;
0
/* * Copyright (C) 2015 Google Inc. * * 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 ...
0
return ImmutableList.of( deserializedView, Matchers.equalTo(createViewTransform.getView())); deserializedView, Matchers.equalTo(createViewTransform.getView()));
0
public void testLoadIncludeOptional() throws Exception { final PropertiesConfiguration pc = new PropertiesConfiguration(); final FileHandler handler = new FileHandler(pc); handler.setBasePath(testBasePath); handler.setFileName("includeoptional.properties"); handler.load()...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/example/org/apache/commons/validator/example/ValidateBean.java,v 1.2 2003/10/05 16:47:28 dgraham Exp $ * $Revision: 1.2 $ * $Date: 2003/10/05 16:47:28 $ * Copyright (c) 1999-2003 The Apache Software Foundation. All...
0
import org.junit.Test; * @version $Id$ public class BooleanComparatorTest extends AbstractComparatorTest<Boolean> { public BooleanComparatorTest(String testName) { @Test @Test @Test
0
import org.apache.beam.sdk.runners.PipelineRunner; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; private static final Logger LOG = LoggerFactory.getLogger(DoFnLifecycleManager.class); OldDoFn<?, ?> fn = outstanding.a...
0
* * @since 2.0 * * @since 2.0 * * @since 2.0 * * @since 2.0 * * @since 2.0 * * @since 2.0
0
* @since 3.0
0
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 law...
0
* Test basic stuff on AbstractSession.
0
import org.apache.cocoon.webapps.authentication.configuration.ApplicationConfiguration; * @version CVS $Id: DefaultAuthenticationManager.java,v 1.18 2003/10/23 11:29:36 cziegeler Exp $ // And now load applications Iterator applications = handler.getHandlerConfiguration().getApplications().value...
0
public interface ColorMatrixRable extends FilterColorInterpolation { * Returns the type of this color matrix.
0
buffer = session.createBuffer(SshConstants.SSH_MSG_REQUEST_SUCCESS, Integer.SIZE / Byte.SIZE);
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
public AlertState state(double value) { public String formatMessage(double value, List<Object> args) { return MessageFormat.format(message(value), args.toArray()); }
0
import org.springframework.stereotype.Component; @Component }
0
* Copyright 2001-2005 The Apache Software Foundation
0
private final Stack<BranchTarget> branchTargets = new Stack<>(); private final Hashtable<InstructionHandle, BranchTarget> visitedTargets = new Hashtable<>();
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.util.Collections; /** The request parameter name used for adding event information to the url. */ /** These parameters are used by default for adding portal specific information to a url. */ List DEFAULT_INTERNAL_PARAMETERS = Collections.singletonList("cocoon-*");
0
try (Reader reader = new Reader(new Configuration(), Reader.file(new Path(outputFile.toURI())))) { while (reader.next(key, value)) { try (Writer writer = SequenceFile.createWriter( new Configuration(), Writer.keyClass(IntWritable.class), Writer.valueClass(Text.class), Writer.file(n...
0
import java.util.Comparator; import java.util.Map; import java.util.Map.Entry; public class Pair<F, S> implements Map.Entry<F, S> { @SuppressWarnings("rawtypes") private static final Comparator<Map.Entry<Comparable, ?>> BY_KEY_COMPARATOR = new Comparator<Map.Entry<Comparable, ?>>() { @Suppre...
0
* @version $Id$
0
log.error("Failed to read locks for " + id + " continuing.", e);
0
private ThreadLocal<LdapServerProperties> ldapServerProperties = new ThreadLocal<>(); private ThreadLocal<LdapAuthenticationProvider> providerThreadLocal = new ThreadLocal<>();
1
outputs.set(partitionId, output);
0
this.contextManager = new ServletContextHelperManager(bundleContext, httpService);
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
* 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
(((javax.xml.crypto.dom.DOMStructure) xmlStructure).getNode(), private XMLSignature unmarshal(Node node, XMLCryptoContext context) TransformService spi;
0
public class RequestAttributeOutputModule extends AbstractOutputModule implements ThreadSafe {
0
import static org.apache.beam.sdk.io.FileIO.ReadMatches.DirectoryTreatment; .apply(FileIO.readMatches().withDirectoryTreatment(DirectoryTreatment.PROHIBIT)) new CreateSourceFn<>(getRecordClass(), getSchema().toString()), AvroCoder.of(getRecordClass(), getSchema()))); ...
0
sb.append(rules[i].toString(eng));
0
import org.apache.accumulo.core.conf.PropertyType; if (!Property.isValidZooPropertyKey(property)) { IllegalArgumentException iae = new IllegalArgumentException("Zookeeper property is not mutable: " + property); log.debug("Attempted to set zookeeper property. It is not mutable", iae); throw iae; ...
0
pipeline.replaceAll( FlinkTransformOverrides.getDefaultOverrides( translationMode == TranslationMode.STREAMING, options)); prepareFilesToStageForRemoteClusterExecution(options);
0
void reset(); void collect(Value value); Value aggregate();
1
assertTrue("This returns array", eprop.getVector("number") instanceof java.util.Vector); assertTrue("This returns array", eprop.getList("number") instanceof java.util.List); assertTrue("This returns scalar", eprop.getString("number") instanceof String); assertTrue("This returns vector", ...
0
* Elemental example for executing a GET request. * * * <!-- empty lines above to avoid 'svn diff' context problems -->
0
@SuppressWarnings({"unchecked", "serial", "rawtypes", "unused"}) public class ConstraintViolationException extends TException implements org.apache.thrift.TBase<ConstraintViolationException, ConstraintViolationException._Fields>, java.io.Serializable, Cloneable, Comparable<ConstraintViolationException> { public enum ...
0
// Create a new IV for the block or update an existing one in the case of GCM cryptoParams.updateInitializationVector();
0
public class BasicHttpEntity extends AbstractHttpEntity implements HttpContentProducer {
0
checkNotNull(combiner, "Combiner passed to createAggregatorInternal cannot be null");
0
Future<LocalPoolEntry> future2 = pool.lease("somehost", null); GetPoolEntryThread t2 = new GetPoolEntryThread(future2); t2.start(); Future<LocalPoolEntry> future2 = pool.lease("somehost", null); GetPoolEntryThread t2 = new GetPoolEntryThread(future2, 50, TimeUnit.MICROSECONDS...
0
* @version $Id$
0
assertEquals(true, map.containsKey(Integer.valueOf((String) els[i]))); assertEquals(els[i], map.get(Integer.valueOf((String) els[i]))); assertEquals(els[0], map.remove(Integer.valueOf((String) els[0]))); assertEquals(true, map.containsValue(Integer.valueOf((String) els[i])));...
0
/* * Copyright (c) OSGi Alliance (2012, 2013). All Rights Reserved. * * 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 req...
0
Service sa2 = m.createAspectService(ServiceInterface.class, null, 20, null).setImplementation(new ServiceAspect(e, 3)); Service sa3 = m.createAspectService(ServiceInterface.class, null, 30, null).setImplementation(new ServiceAspect(e, 2)); Service sa1 = m.createAspectService(ServiceInterface.cla...
0
return new Referenceable(guids.get(guids.size() - 1), referenceable.getTypeName(), null);
1
WebResource resource = getResource(api.getNormalizedPath()); return getResource(api.getNormalizedPath(), params); return getResource(apiV1.getNormalizedPath(), params);
0
import org.apache.hc.core5.annotation.ThreadSafe; import org.apache.hc.core5.pool.io.AbstractConnPool; import org.apache.hc.core5.pool.io.ConnFactory;
0
public static CompactionReason findByValue(int value) {
0
getDigester().getLogger().debug("[SetNextRule]{" + getDigester().getMatch() + getDigester().getLogger().debug("[SetNextRule]{" + getDigester().getMatch() +
0
public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws AccumuloException, AccumuloSecurityException, IOException, NamespaceNotFoundException { final String namespace = cl.hasOption(OptUtil.namespaceOpt().getOpt()) ? OptUtil.getNamespaceOpt(cl, shellState) ...
0
else if (m_namespace.equals(ICapability.PACKAGE_NAMESPACE) && m_attributes[i].getName().equals(ICapability.VERSION_PROPERTY))
0
import java.io.IOException; * Signals a generic resource I/O error. public class ResourceIOException extends IOException { public ResourceIOException(final String message) { public ResourceIOException(final String message, final Throwable cause) { super(message); initCause(cause);
0