Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
public class ExposedByteArrayInputStream extends ByteArrayInputStream { /** Read all remaining bytes. */
1
private final Class clazz; private final Schema schema;
0
import java.util.Date; if (job.isSetCronSchedule()) { CrontabEntry crontabEntry = CrontabEntry.parse(job.getCronSchedule()); Optional<Date> nextRun = cronPredictor.predictNextRun(crontabEntry); return nextRun.transform(date -> summary.setNextCronRunMs(date.getTime())).or(summary); } ...
0
* @since 1.8.0 * @since 1.8.0
0
import cz.seznam.euphoria.shaded.guava.com.google.common.io.Closeables; import org.apache.commons.io.IOUtils; import org.apache.flink.api.common.ExecutionConfig; import org.apache.flink.api.java.ExecutionEnvironment; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.annotation.Nullable; retur...
0
endTime, null, null, true);
0
final Charset charset = (contentType != null ? contentType : ContentType.DEFAULT_TEXT).getCharset(); final byte[] bytes = body.getBytes(charset != null ? charset : StandardCharsets.US_ASCII); return new SimpleBody(bytes, null, contentType);
0
protected static final String KAFKA_BROKER_CONFIG = "kafka-broker"; updateKAFKAConfigs(); protected void updateKAFKAConfigs() throws AmbariException { AmbariManagementController ambariManagementController = injector.getInstance(AmbariManagementController.class); Clusters clusters = ambariManagementContr...
0
* @version $Revision: 1.13 $ $Date: 2004/05/01 12:52:23 $ protected Exception failure; checkFailure(); checkFailure(); protected void checkFailure() throws SQLException { if (failure != null) { throw new SQLNestedException("TesterConnection failure", failure); }...
0
* /home/cvs/jakarta-commons-sandbox/jelly/jelly-tags/fmt/src/java/org/apache/commons/jelly/tags/fmt/BundleTag.java,v 1.1 2003/01/16 16:21:46 jstrachan Exp import org.apache.commons.jelly.JellyTagException; public void doTag(XMLOutput output) throws JellyTagException {
0
import org.apache.commons.pool2.impl.WhenExhaustedAction; if (maxActive <= 0) { pool.setWhenExhaustedAction(WhenExhaustedAction.FAIL); pool.setMaxActive(Integer.MAX_VALUE); } if (maxWait == 0) { pool.setWhenExhaustedAction(WhenExhaustedAction.FAIL); }
0
@SuppressWarnings("all") public class ThriftTableOperationException extends Exception implements org.apache.thrift.TBase<ThriftTableOperationException, ThriftTableOperationException._Fields>, java.io.Serializable, Cloneable {
0
import java.io.Serializable;
0
import com.google.common.base.Preconditions; import com.google.common.collect.AbstractIterator; /** Time sliding windowing. */ public final class TimeSliding<T> implements Windowing<T, TimeInterval> { public static <T> TimeSliding<T> of(Duration duration, Duration step) { return new TimeSliding<>(duration.toMilli...
0
// See AvroSinkFactory#create for an explanation of this logic. if (coder instanceof ValueOnlyWindowedValueCoder && ((ValueOnlyWindowedValueCoder) coder).getValueCoder() instanceof AvroCoder) {
0
* performance is not an issue during initialization (and there is not * Has this configuration been initialized. final List<Object> list = (List<Object>) current; final List<String> values = (List<String>) value; * Combines an existing ExtendedProperties object with this one. ...
0
Array.set(obj, ((Integer) key).intValue(), value); list.set(((Integer) key).intValue(), value);
0
* @param value the value
0
protected String displayName = null; protected String description = null; protected ConnectorType connectorType = null; protected Endpoint endpoint = null;
0
* * * * @version $Revision: 1.4 $
1
import org.apache.ambari.server.configuration.AmbariServerConfigurationCategory; import org.apache.ambari.server.configuration.AmbariServerConfigurationKey; * @param category the name of the category * @param propertyName the name of the property * exists; {@code null} otherwise * @throws IllegalStateEx...
0
* <li>{@link AccumuloInputFormat#setTableQueryConfigs(JobConf, org.apache.accumulo.core.conf.TableQueryConfig...)}</li>
0
public abstract class RestrictionTracker<RestrictionT, PositionT> { interface ClaimObserver<PositionT> { void onClaimed(PositionT position); void onClaimFailed(PositionT position); } private ClaimObserver<PositionT> claimObserver; void setClaimObserver(ClaimObserver<PositionT> claimObserver) { thi...
0
Client client = factory.getClient(new TCompactProtocol(ugiTransport), new TCompactProtocol(ugiTransport)); ByteBuffer login = client.login(rootUser.getPrincipal(), Collections.<String,String>emptyMap()); Collections.<ColumnUpdate>singletonList(update)); Collections.<ColumnUpdate>singleto...
0
@Column(name = "current_mpack_id") private Long currentMpackId; public Long getCurrentMpackId() { return currentMpackId; } public void setCurrentMpackId(Long currentMpackId) { this.currentMpackId = currentMpackId; } buffer.append(", current_mpack_id=").append(currentMpackId);
0
public void setPrevKey(Key pk) { this.prevKey = pk; }
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 Map<Rule, Integer> order = new HashMap<Rule, Integer>(); order.put(rule, counter); public List<Rule> match(String namespace, String pattern) { List<Rule> universalList = new ArrayList<Rule>(counter); List<Rule> tempList = this.cache.get("!*"); tempList = this.cache.get("!...
0
import org.osgi.framework.wiring.BundleWiring; return this.bundle.adapt(BundleWiring.class).getClassLoader();
0
/** * A rate limiter which doesn't actually limit rates at all. */
0
public static volatile SingularAttribute<AlertDefinitionEntity, String> helpURL;
0
import org.apache.beam.portability.v1.Endpoints; private static final Endpoints.ApiServiceDescriptor DESCRIPTOR = Endpoints.ApiServiceDescriptor.newBuilder().setUrl("test").build();
0
import org.apache.accumulo.core.security.tokens.SecurityToken;
0
/* * Copyright 2001-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 applica...
0
import org.apache.cocoon.environment.impl.AbstractSession; public class MockSession extends AbstractSession {
0
Set<String> unsupportedProperties = return !unsupportedProperties.isEmpty() || hasSubResourcePredicate();
0
errors.checkArgument(params.length == 3, "Must have exactly 3 arguments"); TypeDescriptor<?> receiverT = fnT.resolveType(params[2]); "Third argument must be %s, but is %s",
0
AtlasGraph getAtlasGraph() { return atlasGraph; } AtlasVertex findTypeVertexByName(String typeName) { AtlasVertex findTypeVertexByNameAndCategory(String typeName, TypeCategory category) { AtlasVertex findTypeVertexByGuid(String typeGuid) { AtlasVertex findTypeVertexByGuidAndCategory(String typeGuid,...
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
group2ServiceComponents.put("service2", Arrays.asList("component3", "component4"));
0
/** * Pauses animations in the document. */ void pauseAnimations(); /** * Unpauses animations in the document. */ void unpauseAnimations(); /** * Returns whether animations are currently paused. */ boolean animationsPaused(); /** * Returns the current d...
0
import org.apache.http.nio.impl.SessionInputBuffer; super(new SessionInputBuffer(buffersize, linebuffersize)); super(new SessionInputBuffer(buffersize, linebuffersize)); protected int waitForData() throws IOException { return getBuffer().fill(this.channel);
0
Map<String,Table.ID> tableNameToId = Tables.getNameToIdMap(Monitor.getContext());
0
import org.apache.ambari.server.controller.spi.Resource;
0
protected transient WeakReference offsetReference; return SVG_STOP_TAG; result = new SVGOMAnimatedNumber(this, null, SVG_OFFSET_ATTRIBUTE, null);
0
import org.apache.beam.sdk.loadtests.metrics.ByteMonitor; import org.apache.beam.sdk.loadtests.metrics.TimeMonitor; .apply( "Collect start time metric", ParDo.of(new TimeMonitor<>(METRICS_NAMESPACE, "runtime"))) .apply( "Collect metrics", ...
0
* http://www.apache.org/licenses/LICENSE-2.0
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
@Override
0
getManagementController().retrieveHostRepositories(cl, addedHost), recoveryConfigHelper.getRecoveryConfig(cl.getClusterName(), addedHost.getHostName()) ));
0
*/ public FNEG() { super(org.apache.bcel.Constants.FNEG); } /** * Call corresponding visitor method(s). The order is: * Call visitor methods of implemented interfaces first, then * call methods according to the class hierarchy in descending order, * i.e., the most specific visi...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/DynaProperty.java,v 1.10 2003/10/05 13:35:37 rdonkin Exp $ * $Revision: 1.10 $ * $Date: 2003/10/05 13:35:37 $ * * Copyright (c) 2001-2003 The Apache Software Foundation. All righ...
0
@Deprecated
1
final class SetPropertyRule extends AbstractXmlRule { public SetPropertyRule( RulesBinder targetRulesBinder, PatternStack patternStack ) { super( targetRulesBinder, patternStack ); protected void bindRule( LinkedRuleBuilder linkedRuleBuilder, Attributes attributes ) throws Exception ...
0
private TopologyManager topologyManager; topologyManager = injector.getInstance(TopologyManager.class);
0
RPC_SSL_CIPHER_SUITES("rpc.ssl.cipher.suites", "", PropertyType.STRING, "Comma separated list of cipher suites that can be used by accepted connections"),
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
return m_felix.getExportedPackages(name);
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
package org.apache.http.client.impl;
0
hdfsSite.put("fs.default.name", "hdfs://localhost:50070");
0
* retval += String.format(",%s/%s.jar", libdir.getAbsolutePath(), jar);
0
import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.mockito.Mockito.when; import org.mockito.Mockito; MetricsContainer c1 = Mockito.mock(MetricsContainer.class); MetricsContainer c2 = Mockito.mock(MetricsContainer.class); Counter counter1 ...
0
import org.apache.commons.jexl2.JexlEngine; import org.apache.commons.jexl2.parser.StringParser; public String getMethodCallSyntax(String obj, String m, String... args) { sb.append(obj); sb.append(m); public String getOutputStatement(String toDisplay) { if (toDisplay == 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 ...
0
public class TestTreeList<E> extends AbstractTestList<E> { public static void benchmark(List<? super Integer> l) { java.util.Iterator<? super Integer> it = l.iterator(); public TreeList<E> makeObject() { return new TreeList<E>(); @SuppressWarnings("unchecked") List<E> l = ...
0
/** * the default default date format. */ public static final String DEFAULT_SDF = UnixFTPEntryParser.DEFAULT_DATE_FORMAT; /** * the default recent date format. */ public static final String DEFAULT_RECENT_SDF = UnixFTPEntryParser.DEFAULT_RECENT_DATE_FORMAT; /** * Par...
0
import org.apache.beam.model.pipeline.v1.RunnerApi;
0
package examples.ftp;
0
* $Id: RepositoryImpl.java 44 2007-07-13 20:49:41Z hargrave@us.ibm.com $ * Copyright (c) OSGi Alliance (2002, 2006, 2007). 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...
0
@Override @Override
0
import org.apache.sshd.server.command.CommandLifecycle;
0
import org.slf4j.LoggerFactory; audit.warn("operation: failed; user: {}; {}; exception: {}", credentials.getPrincipal(), String.format(template, args), ex.toString()); audit .info("operation: {}; user: {}; client: {}; {}", prefix, credentials.getPrincipal(), TServerUtils.clientAddress.get(), String....
0
import com.google.common.collect.Lists; List<BigtableWriteException> suppressed = Lists.newArrayList(); suppressed.add(exc); IOException exception = new IOException(message); for (BigtableWriteException e : suppressed) { exception.addSuppressed(e); } throw exc...
0
public Command(String user, String[] cmd) {
0
package aQute.lib.properties; public interface IDocument { int getNumberOfLines(); IRegion getLineInformation(int lineNum) throws BadLocationException; String get(); String get(int offset, int length) throws BadLocationException; String getLineDelimiter(int line) throws BadLocationException; int getLength(...
0
* Copyright 2016-2017 Seznam.cz, a.s.
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
* Copyright 2016-2017 Seznam.cz, a.s.
0
* @param <I> the input type * @param <O> the output type
0
switch (type) { case NON_ROLLING: list = getDowngradeGroupsForNonrolling(); break; case HOST_ORDERED: case ROLLING: default: list = getDowngradeGroupsForRolling(); break; // !!! Testing exposed groups.size() == 1 issue. Normally there's ...
0
provides,
0
import org.apache.batik.ext.awt.image.codec.ImageDecodeParam; import org.apache.batik.ext.awt.image.codec.ImageDecoderImpl; import org.apache.batik.ext.awt.image.codec.SeekableStream;
0
@Test(timeout = 2L * 60L * 1000L)
0
if (hDependencies == null) { } if (depend != null && depend.length() > 0) { } if (lMethodParams == null) { } if (value != null && value.length() > 0) { } if (hDependencies != null) { } else { }
0
public class KnownHostsServerKeyVerifier extends ModifiableFileWatcher implements ServerKeyVerifier, ModifiedServerKeyAcceptor { /** * Standard option used to indicate whether to use strict host key checking or not. * Values may be &quot;yes/no&quot;, &quot;true/false&quot; or &quot;on/of...
0
implements Serviceable, Disposable, ThreadSafe, Initializable {
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
Map<String, String> blocks = DeploymentUtil.deployBlockArtifacts(this.getWorkdir(servletContext) .getAbsolutePath());
0
public ModuleEvent(IModule module) super(module);
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
return new ByteArrayInputStream(buf.toByteArray());
0
import org.apache.commons.configuration.convert.DefaultListDelimiterHandler;
0
BigQueryHelpers.parseTableSpec("project:dataset.table"), mockClient)) { BigQueryHelpers.parseTableSpec("project:dataset.table"), BigQueryHelpers.parseTableSpec("project:dataset.table"), BigQueryHelpers.parseTableSpec("project:dataset.table"), BigQueryHelpers.parseTableSpe...
0
* @since 3.0
0
return new LessEqualsPredicate<>(propertyId, getValue());
1
public class HttpFileNameParser extends URLFileNameParser { public HttpFileNameParser() { public static FileNameParser getInstance() {
1
* 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.8 $ $Date: 2003/10/13 08:44:27 $
0
if (this.domain != null && !this.domain.isEmpty()) {
0
/* $Id$ *
0