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 may not...
0
public void start(BundleContext bc) { Hashtable<String, Object> props = new Hashtable<>(); public void stop(BundleContext bc) {
0
import com.twitter.aurora.gen.Lock; import com.twitter.aurora.gen.LockKey; import com.twitter.aurora.gen.storage.RemoveLock; import com.twitter.aurora.gen.storage.SaveLock; public void testSaveLock() throws Exception { final Lock lock = new Lock( LockKey.job(JobKeys.from("testRole", "testEnv", "testJob"))...
0
return true;
0
return new ZipFileSystem( name, file );
0
import org.apache.felix.http.base.internal.runtime.ServletRequestAttributeListenerInfo; import org.apache.felix.http.base.internal.runtime.ServletRequestListenerInfo; else if ( info instanceof ServletRequestListenerInfo ) { handler.addListener((ServletRequestListenerInfo)info ); } ...
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
@Column(name = "target_id", nullable = false, updatable = false) @Column(length = 32672) if (this == object) { } if (object == null || getClass() != object.getClass()) { } : that.targetId != 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 may not u...
0
new TraitInformation(true, SVGTypes.TYPE_RECT)); * The 'viewBox' attribute value. */ protected SVGOMAnimatedRect viewBox; /** viewBox = createLiveAnimatedRect(null, SVG_VIEW_BOX_ATTRIBUTE, null); return viewBox;
0
import java.util.Collection; /** the recognised options */ /** the processed options */ private Option[] optionsArray; /** * <p>Returns an array of the processed {@link Option}s.</p> * * @return an array of the processed {@link Option}s. */ public Option[] getOptions( ) { ...
0
import org.apache.hc.core5.annotation.Contract; import org.apache.hc.core5.annotation.ThreadingBehavior; @Contract(threading = ThreadingBehavior.IMMUTABLE)
0
* Parameter names for HTTP client connections.
0
import com.google.common.collect.Lists; import java.util.Arrays; import java.util.Objects; @Override public boolean equals(Object o) { if (!(o instanceof Schema)) { return false; } Schema other = (Schema) o; return Objects.equals(fieldIndices, other.fieldIndices) && Objects.equals(getF...
0
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument; import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkNotNull; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList; import org.apache.beam.v...
0
import org.apache.accumulo.server.replication.StatusUtil; import org.apache.accumulo.server.replication.proto.Replication.Status;
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
* Copyright (c) OSGi Alliance (2004, 2008). All Rights Reserved. import java.util.ArrayList; import java.util.Collections; import java.util.Enumeration; import java.util.Iterator; * * @version $Revision: 5673 $
0
import static com.google.cloud.dataflow.sdk.runners.worker.SourceTranslationUtils.cloudPositionToReaderPosition; import static com.google.cloud.dataflow.sdk.runners.worker.SourceTranslationUtils.cloudProgressToReaderProgress; import com.google.cloud.dataflow.sdk.util.common.worker.Reader; public class InMemoryReader<T>...
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
/** * Create the node given an id. * * @param id node id. */ /** * Create a node with the given parser and id. * * @param p a parser. * @param id node id. */
0
StringBuilder buffer = new StringBuilder("UpgradeGroupHolder{"); buffer.append("name=").append(name);
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.annotations.VisibleForTesting; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Predicates; import org.apache.beam.vendor.guava.v26_0_...
0
import cz.seznam.euphoria.core.client.dataset.windowing.WindowedElement; import cz.seznam.euphoria.core.client.dataset.windowing.Windowing;
0
final String mode = (this.settings != null ? this.settings.getRunningMode() : SettingsDefaults.DEFAULT_RUNNING_MODE);
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...
0
protected long getMinCIdleThreshold(KeyExtent extent) { final long now = currentTimeMillis(); protected long currentTimeMillis() { return System.currentTimeMillis(); }
0
this(tabletServer, new Text(info.dir), extent, trm, CachedConfiguration.getInstance(), info.datafiles, info.time, info.initFlushID, info.initCompactID, info.lastLocation); this(tabletServer, location, extent, trm, conf, VolumeManagerImpl.get(), EMPTY, datafiles, time, lastLocation, new HashSet<FileRe...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/tags/define/Attic/InvokeBodyTag.java,v 1.5 2002/05/15 06:25:48 jstrachan Exp $ * $Revision: 1.5 $ * $Date: 2002/05/15 06:25:48 $ * $Id: InvokeBodyTag.java,v 1.5 2002/05/15 06:25:48 jstracha...
0
// Real bug - https://issues.apache.org/jira/browse/BEAM-6559 @SuppressFBWarnings("NP_NULL_ON_SOME_PATH")
0
* @return {@code true} if this file is writeable, {@code false} if not.
0
import java.io.InputStream; import org.junit.Assert; Assert.assertNotNull(ClassPath.SYSTEM_CLASS_PATH.getClassFile("java.lang.String")); } public void testGetResource() throws IOException { Assert.assertNotNull(ClassPath.SYSTEM_CLASS_PATH.getResource("java/lang/String.class")); } publi...
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
* any, must include the following acknowledgement: * Alternately, this acknowledgement may appear in the software itself, * if and wherever such third-party acknowledgements normally appear. * permission of the Apache Software Foundation. * @version $Revision: 1.10 $ $Date: 2003/10/13 08:44:26 $
0
private static final String TIMER_STATE_ID = "timer"; TimerRegistry<KeyedTimerData<K>> timerRegistry, final SamzaStoreStateInternals.Factory<?> nonKeyedStateInternalsFactory = SamzaStoreStateInternals.createStateInternalFactory( null, context, pipelineOptions, null, mainOutputTag); ...
0
import org.apache.beam.model.fnexecution.v1.BeamFnApi; import org.apache.beam.model.fnexecution.v1.BeamFnApi.ProcessBundleRequest; import org.apache.beam.model.fnexecution.v1.BeamFnApi.StateRequest; import org.apache.beam.model.fnexecution.v1.BeamFnApi.StateRequest.Builder; import org.apache.beam.model.fnexecution.v1.B...
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
suite.addTest(TestEnglishReasonPhraseCatalog.suite());
0
@NamedQuery(name = "AlertDefinitionEntity.findByServiceMaster", query = "SELECT ad FROM AlertDefinitionEntity ad WHERE ad.serviceName IN :services AND ad.scope = :scope AND ad.clusterId = :clusterId AND ad.componentName IS NULL" + " AND ad.sourceType <> org.apache.ambari.server.state.alert.SourceType.AGGREGATE"...
0
import javax.xml.bind.JAXBContext; import javax.xml.bind.Marshaller; OptionBuilder.isRequired(); public void printClusterDefinition(ClusterDefinition def) throws Exception { JAXBContext jc = JAXBContext.newInstance(org.apache.ambari.common.rest.entities.ClusterDefinition.class); Marshaller m...
0
// Ignore.
0
// FELIX-4491: only resources that need to be processed should be handled... if (!resourceInfo.isProcessedResource()) { session.getLog().log(LogService.LOG_INFO, "Ignoring non-processed resource: " + resourceInfo.getPath()); continue; } // ...
0
import org.apache.sshd.util.test.JUnit4ClassRunnerWithParametersFactory; import org.junit.runners.Parameterized.UseParametersRunnerFactory; @UseParametersRunnerFactory(JUnit4ClassRunnerWithParametersFactory.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
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/EvalContext.java,v 1.23 2003/03/11 00:59:18 dmitri Exp $ * $Revision: 1.23 $ * $Date: 2003/03/11 00:59:18 $ * Copyright (c) 1999-2003 The Apache Software Foundation. All rights * @ve...
0
public Object expr(CharSequence expr) { return processor.expr(this, expr); }
0
Optional<InetSocketAddress> httpSocket = Optional.fromNullable(serviceRegistry.getAuxiliarySockets().get("http")); if (!httpSocket.isPresent()) { throw new IllegalStateException("No HTTP service registered with LocalServiceRegistry."); httpSocket.get(),
0
/* * Copyright 2004-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 ap...
0
String nameSpace = assertNameSpaceIsRegistered(ns.getName()); AtlasClientV2 atlasClient = getAtlasClient(); if (atlasClient != null) { AtlasEntityWithExtInfo nameSpaceRef = atlasClient.getEntityByGuid(nameSpace); String nameSpaceQualifie...
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
void visit(int level, RemoteSpan parent, RemoteSpan node, Collection<RemoteSpan> children);
1
import javax.swing.tree.TreePath;
0
import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.ObjectNode; ObjectNode response = atlasClientV1.callAPIWithBody(AtlasClient.API_V1.CREATE_TYPE, typesAsJSON); ArrayNode typesAdded = (ArrayNode) response.get(AtlasClient.TYPES); ...
0
import org.apache.accumulo.core.clientImpl.Table; import org.apache.accumulo.core.dataImpl.KeyExtent;
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
assertEquals("Unexpected testfile.txt while processing ", e.getMessage());
0
ReduceByKey<IN, IN, Byte, VALUE, Void, OUT, WLABEL, W> reduceByKey;
0
status.getHost(), executorBuild, localBuild));
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...
0
public static final String LOGSEARCH_PROPERTIES_FILE = "logsearch.properties";
0
initialValue = 0
0
import org.apache.hc.core5.reactor.TlsCapableIOSession; public ClientHttpProtocolNegotiator createHandler(final TlsCapableIOSession ioSession, final Object attachment) {
0
List<String> userRoles = roles.get(user); if (userRoles.contains("admin")) { final PrivilegeEntity privilege = new PrivilegeEntity(); privilege.setPermission(adminPermission); privilege.setPrincipal(user.getPrincipal()); privilege.setResource(ambariResource); user.get...
0
package org.apache.commons.codec2.net; import org.apache.commons.codec2.CharEncoding; import org.apache.commons.codec2.DecoderException; import org.apache.commons.codec2.EncoderException; import org.apache.commons.codec2.StringDecoder; import org.apache.commons.codec2.StringEncoder;
0
/***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * * ------------------------------------------------------------------------- * * This software is published under the terms of the Apache Software License * * v...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/share/org/apache/commons/validator/Validator.java,v 1.34 2004/02/21 17:10:29 rleland Exp $ * $Revision: 1.34 $ * $Date: 2004/02/21 17:10:29 $ * Copyright 2001-2004 The Apache Software Foundation * Licensed under th...
0
* Creates a new <code>StyleReference</code>.
0
Combiner.setColumns(is, Collections.singletonList(new IteratorSetting.Column("acf")));
0
return IResource.newBuilder( type.getValue(), type.getAuroraResourceConverter().parseFrom(value));
0
import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlSeeAlso; import org.apache.atlas.model.PList; import org.apache.atlas.model.SearchFilter.SortType; @XmlRootElement /** * REST serialization friendly list. */ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisi...
0
DoFn<TimerOrElement<KV<K, VI>>, KV<K, VO>>.ProcessContext context, DoFn<TimerOrElement<KV<K, VI>>, KV<K, Iterable<VI>>>.ProcessContext context, DoFn<TimerOrElement<KV<K, VI>>, KV<K, VO>>.ProcessContext context, key, context, new StreamingActiveWindowManager<>(windowFn...
0
* @see #getKeys() * Get the list of the keys contained in the configuration. The returned * iterator can be used to obtain all defined keys. Note that the exact * behavior of the iterator's <code>remove()</code> method is specific to * a concrete implementation. It <em>may</em> remove the corre...
0
CountSum value) { CountSum value, ElementByteSizeObserver observer) LONG_CODER.registerByteSizeObserver(value.count, observer); DOUBLE_CODER.registerByteSizeObserver(value.sum, observer);
0
updateHosts(path, zoo.getChildren(path, this)); }
0
package org.apache.aurora.scheduler.config.validators; import com.beust.jcommander.IValueValidator; import com.beust.jcommander.ParameterException; import org.apache.aurora.common.quantity.Amount; public class PositiveAmount implements IValueValidator<Amount<? extends Number, ?>> { public void validate(String name, ...
0
import org.apache.commons.configuration.interpol.ConfigurationInterpolator; @Override public ConfigurationInterpolator getInterpolator() { return parent.getInterpolator(); }
0
import org.apache.http.FormattedHeader; import org.apache.http.Header; import org.apache.http.TrailerSupplier; import org.apache.http.message.BasicLineFormatter; private final TrailerSupplier trailers; * * @since 5.0 public ChunkedOutputStream(final int bufferSize, final SessionOutputBuffer out, fina...
0
* Copyright 2002,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 applic...
0
* by its unique article identifier (including the enclosing &lt; and &gt;). * @throws IOException if an error occurs * @return the reader * @throws IOException if an error occurs /** * Same as <code> retrieveArticleHeader(articleNumber, null) </code> * * @param articleNumber the ...
0
final String testData = "ABCD";
0
public abstract class AbstractTestNullComparator extends AbstractTestComparator<Integer> { public AbstractTestNullComparator(String testName) { TestSuite suite = new TestSuite(AbstractTestNullComparator.class.getName()); public static class TestNullComparator1 extends AbstractTestNullComparator { pu...
0
* Converts an array of bytes into a String representing the hexadecimal values of each byte in order. The returned * String will be double the length of the passed array, as it takes two characters to represent any given byte. * * @param data * a byte[] to convert to Hex characters ...
0
RELATIONSHIP_ALREADY_DELETED(404, "ATLAS-404-00-00F", "Attempting to delete a relationship which is already deleted : {0}"),
1
filter = new CompositeRable8Bit(srcs, rule, true);
0
* @version $Id: HttpFilesCacheTestCase.java 1808381 2017-09-14 19:26:39Z * ggregory $ try (final FileObject noQueryFile = fileSystemManager.resolveFile(noQueryStringUrl)) { Assert.assertEquals(noQueryStringUrl, noQueryFile.getURL().toExternalForm()); } try (final FileObjec...
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 com.google.common.annotations.VisibleForTesting; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
0
WindowingUtils.checkGroupByKeyApplicable(operator, leftKvInput, rightKvInput);
0
if (pk instanceof java.security.interfaces.DSAPublicKey) { } else if (pk instanceof java.security.interfaces.RSAPublicKey) { * @return the public key
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.apache.cocoon.core.container.spring.ResourceUtils; Arrays.sort(resources, ResourceUtils.getResourceComparator());
0
package org.apache.felix.persister.test.objects; import org.apache.felix.persister.test.objects.Bottom.BottomDTO; public interface SimpleMiddle extends Middle { Bottom embeddedValue(); public static class SimpleMiddleDTO extends DTO { public String id; public String value; public BottomD...
0
* Autogenerated by Thrift Compiler (0.12.0) @javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)") public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TKeyExtent extent; // required @org.apache.thrift.annotation.Nullable @org.apache.thrift.annotati...
0
private synchronized ExecutionCommandWrapper addGenericExecutionCommand(String clusterName, String hostName, Role role, RoleCommand command, ServiceComponentHostEvent event){ HostRoleCommand hrc = new HostRoleCommand(hostName, role, event, command); public synchronized void addHostRoleExecutionCommand(String ho...
0
boolean isHostStateUnknown = false; } else if (timeOutActionNeeded(status, s, hostObj, roleStr, now, commandTimeout) || (isHostStateUnknown = isHostStateUnknown(s, hostObj, roleStr))) { if (s.getAttemptCount(host, roleStr) >= maxAttempts || isHostStateUnknown) { db.timeou...
1
byte newbuf[] = new byte[this.buf.length << 1]; int newcount = this.bufCount + len;
0
package org.apache.beam.runners.core; import org.apache.beam.sdk.util.WindowedValue; import org.apache.beam.sdk.util.WindowingStrategy;
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
* @version CVS $Id: EP_Grid.java,v 1.3 2003/09/05 07:31:40 cziegeler Exp $
0
import org.codehaus.jackson.map.DeserializationConfig; import org.codehaus.jackson.map.ObjectReader; import java.io.InputStream; private final static ObjectReader objectReader; ObjectMapper objectMapper = new ObjectMapper(); objectMapper.configure(DeserializationConfig.Feature.USE_ANNOTATIONS, false); o...
0