Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
return split(data, 0, data.length); } /** * Splits a byte array by 0x00 */ public static byte[][] split(byte[] data, int dataOffset, int len) { for (int i = dataOffset; i < (dataOffset + len); i++) { offsets.add(dataOffset + len); int index = dataOffset;
0
return new HttpHost(scheme, authority); return new HttpHost(host.getSchemeName(), host.getHostName(), port);
0
public void grantTablePermission(TInfo tinfo, TCredentials credentials, String user, String tableName, byte permission) throws TException { String namespaceId; try { namespaceId = Tables.getNamespaceId(instance, tableId); } catch (TableNotFoundException e) { throw new TException(e); } pu...
1
StateTags.makeSystemTagInternal(StateTags.watermarkStateInternal("hold"));
0
import java.sql.Statement; public <T> T insert(String sql, ResultSetHandler<T> rsh) throws SQLException { return insert(this.prepareConnection(), true, sql, rsh, (Object[]) null); } public <T> T insert(String sql, ResultSetHandler<T> rsh, Object... params) throws SQLException { ret...
0
package org.apache.commons.codec.binary; import org.apache.commons.codec.BinaryDecoder; import org.apache.commons.codec.BinaryEncoder; import org.apache.commons.codec.DecoderException; import org.apache.commons.codec.EncoderException; * @see org.apache.commons.codec.BinaryEncoder#encode(byte[]) * @see org.apa...
1
List<InputSplit> inputSplitList = new ArrayList<>();
0
String getType(); void dispatch(Notification notification); boolean isDigestSupported(); TargetConfigurationResult validateTargetConfig(Map<String, Object> properties); /** * Gets whether Ambari should attempt to generate the content of the * {@link Notification} before giving it to the dispatcher. Som...
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 ...
1
private final DomainType type; /** * @since 4.5 */ public PublicSuffixList(final DomainType type, final List<String> rules, final List<String> exceptions) { this.type = Args.notNull(type, "Domain type"); this.exceptions = Collections.unmodifiableList(exceptions != null ? exceptions...
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
File root = tmp.newFolder(); checkState(root.exists(), "root directory must exist"); @Test public void testCreateAtThenForExisting() throws Exception { File baseFolder = tmp.newFolder(); LocalArtifactStagingLocation newLocation = LocalArtifactStagingLocation.createAt(baseFolder); File newManife...
0
public void visitMethodParameters(MethodParameters obj) { }
0
try (ClientSession session = createTestClientSession(sshd)) { try (ClientSession session = createTestClientSession(sshd)) { @Test // see SSHD-930 public void testDelayClientIdentification() throws Exception { sshd.start(); PropertyResolverUtils.updateProperty( clie...
0
import org.apache.commons.jelly.JellyContext; * @version $Revision: 1.6 $ assertTagsHaveParent( script, null, null ); protected void assertTagsHaveParent(Script script, Tag parent, JellyContext context) throws Exception { if ( context == null ) context = new JellyContext(); ...
0
import org.apache.cocoon.portal.layout.aspect.FrameStatus; * @version CVS $Id: FrameEventAspect.java,v 1.2 2003/05/08 13:38:10 cziegeler Exp $
0
package org.w3c.dom.svg; public interface SVGFEFuncAElement extends SVGComponentTransferFunctionElement { }
1
* Creates a new AnimatedAttributeListener. */ public AnimatedAttrListener() { } /**
0
package org.apache.ambari.api.resources; import org.apache.ambari.server.controller.spi.PropertyId; import java.util.*; //TODO: Refactor out of this class when setProperties is moved. private Map<PropertyId, Object> m_properties = new HashMap<PropertyId, Object>(); //todo: refactor set/get property methods out o...
0
* Encodes an Object using the Match Rating Approach algorithm. Method is here to satisfy the requirements of the
0
* @version CVS $Id: ClearCacheAction.java,v 1.2 2003/08/07 13:28:50 cziegeler Exp $ final String cacheRole = par.getParameter("cache-role", Cache.ROLE); Cache cache = null; cache = (Cache)this.manager.lookup(cacheRole); if (this.getLogger().isDebugEnabled()) { getLo...
0
@Category({ValidatesRunner.class, UsesTimersInParDo.class}) @Category({ValidatesRunner.class, UsesTimersInParDo.class}) @Category({ValidatesRunner.class, UsesTimersInParDo.class})
0
import java.util.concurrent.ThreadLocalRandom; assertTrue(Md5Crypt.md5Crypt("secret".getBytes(), (String) null).matches("^\\$1\\$[a-zA-Z0-9./]{0,8}\\$.{1,}$")); } @Test public void testMd5CryptExplicitCallWithThreadLocalRandom() { ThreadLocalRandom threadLocalRandom = ThreadLocalRandom.cur...
0
* <p>Please note, that any instance of {@link KinesisClientProvider} must be
0
private ZooCache zooCache; zooCache = new ZooCache(context); IZooReaderWriter zoo = context.getZooReaderWriter(); IZooReaderWriter zoo = context.getZooReaderWriter();
0
Dataflow.Projects.Jobs.Messages mockMessages = mock(Dataflow.Projects.Jobs.Messages.class); Dataflow.Projects.Jobs.Messages.List firstRequest = mock(Dataflow.Projects.Jobs.Messages.List.class); Dataflow.Projects.Jobs.Messages.List secondRequest = mock(Dataflow.Projects.Jobs.Messages....
0
public static <K, V> BidiMap<K, V> unmodifiableBidiMap(final BidiMap<? extends K, ? extends V> map) { @SuppressWarnings("unchecked") // safe to upcast final BidiMap<K, V> tmpMap = (BidiMap<K, V>) map; return tmpMap; @SuppressWarnings("unchecked") // safe to upcast private...
0
/** Tests for {@link StructuralByteArray}. */ assertFalse( new StructuralByteArray("test string".getBytes(Charsets.UTF_8)) .equals(new StructuralByteArray("diff string".getBytes(Charsets.UTF_8))));
1
import com.twitter.common.util.BuildInfo; import static org.easymock.EasyMock.createControl; import static org.easymock.EasyMock.expect;
0
public void testEmptyPath() throws Exception { final URIBuilder uribuilder = new URIBuilder("http://thathost"); Assert.assertTrue(uribuilder.isPathEmpty()); } @Test
0
/** * Simple direct graph search and depth traversal. * @param searchText is plain text * @param prop is the Vertex property to search. */ /** * Simple graph walker for search interface, which allows following of specific edges only. * @param edgesToFollow is a comma-separated-list...
0
package org.apache.ambari.view.commons.exceptions;
0
import java.util.concurrent.CopyOnWriteArrayList; import org.apache.sshd.client.auth.AuthenticationIdentitiesProvider; import org.apache.sshd.client.auth.PasswordIdentityProvider; private final List<Object> identities = new CopyOnWriteArrayList<>(); private final AuthenticationIdentitiesProvider identitiesProvi...
0
// broadcast the change event for the configuration ClusterConfigChangedEvent event = new ClusterConfigChangedEvent(cluster.getClusterName(), getType(), getTag(), getVersion());
0
import org.apache.felix.framework.FilterImpl;
1
import java.net.*; import java.util.*; List<URI> getIndexLocations() throws Exception;
0
// System.out.println(info.getBundleId() + " - " + permission); permission, direct, m_pai);
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//io/src/java/org/apache/commons/io/compress/zip/Attic/ZipEntry.java,v 1.3 2003/10/13 07:03:30 rdonkin Exp $ * $Revision: 1.3 $ * $Date: 2003/10/13 07:03:30 $ * any, must include the following acknowledgement: * Alternately,...
0
/** The runner is blocking. */ return State.DONE;
0
private static final long serialVersionUID = -1178229029789923698L;
0
* @since 3.0
0
* is called for a stage. This factory is not capable of handling mixed types of environment.
0
return "Starts Accumulo garbage collector";
0
int i = ((Number) obj).intValue();
0
import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerConfigurationException; * @version CVS $Id: IncludeXMLConsumer.java,v 1.2 2003/09/25 12:55:02 vgritsenko Exp $ * @param node The DOM Node to be included } catch (TransformerConfigurationException e) { } ...
0
import org.apache.ambari.server.controller.internal.ServiceConfigVersionResourceProvider; import io.swagger.annotations.ApiModelProperty; @ApiModelProperty(name = ServiceConfigVersionResourceProvider.SERVICE_NAME_PROPERTY_ID) @ApiModelProperty(name = ServiceConfigVersionResourceProvider.SERVICE_CONFIG_VERSION_P...
0
@Override @Override @Override @Override
0
public interface IFormValueConverter { String getLabel( Object value ); Object getValue( String label );
0
import org.apache.http.protocol.HttpContext; import org.apache.http.protocol.HttpRequestHandler;
0
public int getFieldCount(){ @Override public String toString() { return "BeamRecordType [fieldsName=" + fieldNames + "]"; }
0
public T buildConditionalRequest(final T request, final HttpCacheEntry cacheEntry) {
0
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
0
import java.io.ByteArrayOutputStream; ByteArrayOutputStream out = null; out = new ByteArrayOutputStream(); final MockShell shell = new MockShell(in, out); shell.getReader().flush(); final String[] output = StringUtils.split(new String(out.toByteArray()), '\n'); if (line.contains("formatter")) ...
0
* Test case for {@link PAssert}. public class PAssertTest implements Serializable { * A {@link PAssert} about the contents of a {@link PCollection} PAssert.that(pcollection).containsInAnyOrder( * A {@link PAssert} about the contents of a {@link PCollection} PAssert.that(pcollection).satisfies( * Basic...
0
* @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
0
public void doTag(XMLOutput output) throws JellyTagException { try { method.invoke(this.task, args); } catch (IllegalAccessException e) { throw new JellyTagException(e); } ...
0
* * * data array are dumped.
1
updateAMSConfigs();
0
* @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a> * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
0
UriParser.fixSeparators(name);
0
private final Set<String> extensions = new HashSet<>();
0
outputIds.isEmpty());
0
List<TabletStats> onlineTabletsForTable = client.getTabletStats(Tracer.traceInfo(), SystemCredentials.get().toThrift(configuration.getInstance()), tableId);
0
import javax.servlet.http.HttpSession; HttpSession session = request.getSession(false); final HttpSession session = request.getSession(false);
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
zc = context.getZooCache(); this.root = context.getZooKeeperRoot() + Constants.ZTSERVERS;
0
Map<String, RemoteInputDestination<WindowedValue<?>>> remoteInputDestinations, descriptor.getId(), s -> create(descriptor, remoteInputDestinations, stateDelegator));
0
return jexl.isCancellable();
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
model.setRootNode(NodeStructureHelper.ROOT_AUTHORS_TREE); model.setRootNode(null);
0
DataSet<BatchElement<Window, Pair>> tuples; FlatMapOperator<Object, BatchElement<Window, Pair>> wAssigned = BatchElement wel = (BatchElement) i; c.collect(new BatchElement<>( .returns(new TypeHint<BatchElement<Window, Pair>>() {}); Operator<BatchElement<Window, Pair>, ?...
0
import java.util.Arrays; import org.apache.ambari.server.controller.internal.ClusterKerberosDescriptorResourceProvider; resourceDefinition = new SimpleResourceDefinition(Resource.Type.StackArtifact, "artifact", "artifacts"); resourceDefinition = new SimpleResourceDefinition( Resource.Type.Cl...
0
import org.apache.hc.core5.io.ModalCloseable; import org.apache.hc.core5.io.CloseMode; public class HttpServer implements ModalCloseable { public void close(final CloseMode closeMode) { if (closeMode == CloseMode.GRACEFUL) { conn.close(CloseMode.GRACEFUL); close(CloseMode.GRACEFUL);
0
import org.apache.accumulo.core.conf.ClientConfiguration; ZooKeeperInstance zki = new ZooKeeperInstance(new ClientConfiguration().withInstance(opts.iname).withZkHosts(opts.keepers));
0
import org.apache.commons.httpclient.HttpURL; * @version $Id: WebDAVSourceTestCase.java,v 1.4 2004/06/29 16:10:55 unico Exp $ private String m_location = m_scheme + "://" + m_credentials + "@" + m_authority + m_path + m_name; private String m_secure = m_scheme + "://" + m_authority + m_path + m_name; priva...
0
import static org.apache.ambari.metrics.core.timeline.query.PhoenixTransactSQL.GET_METRIC_METADATA_SQL_V1; // No filter criteria support for now. public Map<TimelineMetricMetadataKey, TimelineMetricMetadata> getTimelineMetricMetadataV1() throws SQLException { Map<TimelineMetricMetadataKey, TimelineMetricMetadat...
0
* @version $Id: HexTest.java,v 1.11 2004/08/05 20:39:39 ggregory Exp $
0
import com.mockobjects.dynamic.Mock; /** * Tests whether runtime exceptions can be enabled. */ public void testEnableRuntimeExceptions() { PropertiesConfiguration config = new PropertiesConfiguration() { protected void addPropertyDirect(String key, Object value) ...
0
import org.apache.cocoon.util.AbstractLogEnabled; public class CookieMatcher extends AbstractLogEnabled implements Matcher, ThreadSafe { throws PatternException {
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 ...
1
import org.easymock.*; import static junit.framework.Assert.assertEquals; import static junit.framework.Assert.assertNull; import static org.easymock.EasyMock.capture; import static org.easymock.EasyMock.eq; Request request = PropertyHelper.getCreateRequest(propertySet, null); Capture<Set<ServiceRequest>> reque...
0
private final int maxObjectSizeBytes; private final boolean sharedCache; public CachingHttpClient(HttpClient client, HttpCache cache, CacheConfig config) { if (client == null) { throw new IllegalArgumentException("HttpClient may not be null"); } if (cache == null) { ...
0
import java.util.Objects; if (Objects.equals(hostRequestIterator.next().getHostName(), hostName)) { if (Objects.equals(allHostRequesIterator.next().getHostName(), hostName)) {
0
Map<String,String> siteConfig = new HashMap<String,String>(); cfg.setSiteConfig(siteConfig); long currentWait = 10 * 1000; while (!balancingWorked && (System.currentTimeMillis() - startTime) < ((5 * 60 + 15) * 1000)) { for (Map.Entry<String,TableInfo> entry : stats.getTServerInfo().get(i).getTab...
0
* Autogenerated by Thrift Compiler (0.11.0)
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
/* * 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...
1
/** * 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
import org.apache.hc.core5.io.Closer; Closer.close(entity.getContent()); try (final InputStream inStream = entity.getContent()) { if (inStream == null) { return null; } while ((l = inStream.read(tmp)) != -1) { final ContentType ...
0
private Set<String> m_dependencyNames = new HashSet<String>(); } } throw new IllegalArgumentException("Invalid timeout value " + t + " in ServiceDependency annotation from class " + m_className); writer.putString(annotation, EntryParam.removed, null); // name ...
0
return name.toUpperCase(Locale.ROOT);
0
@Override
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 <R,P> R accept(NodeVisitor<? extends R, ? super P> visitor, P data) { return visitor.visit(this, data); }
0
private int timeoutSeconds = 10; timeoutSeconds = conf.getInt(METRICS_POST_TIMEOUT_SECONDS, DEFAULT_POST_TIMEOUT_SECONDS); protected int getTimeoutSeconds() { return timeoutSeconds; } @Override
0
AtlasEdge ret; throw new AtlasBaseException(AtlasErrorCode.RELATIONSHIP_GUID_NOT_FOUND, guid);
0
* @param <T> the future result type returned by a callback.
0
package org.apache.accumulo.tserver.mastermessage;
1
/** * A provider is modified. * @param arg0 leaving service references. * @see org.apache.felix.ipojo.util.DependencyModel#onServiceDeparture(org.osgi.framework.ServiceReference) */ public void onServiceModification(ServiceReference arg0) { }
0
* * <p> Once {@link #start} or {@link #advance} has returned false, neither will be called * again on this object.
0