Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
import org.apache.commons.jelly.JellyTagException; public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException {
0
import java.util.IdentityHashMap; import java.util.Map;
0
if (range.contains(currentKey)) {
0
* limitations under the License.
0
import com.google.cloud.dataflow.sdk.transforms.First; FIRST // Builds a pipeline containing a composite operation (First), then .apply(First.<String>of(10)) if (transform instanceof First) { Assert.assertTrue(visited.add(TransformsSeen.FIRST)); if (transform instanceof First) { ...
0
import com.google.common.base.Function; import com.google.common.collect.MapMaker; import javax.annotation.Nullable; Map<String, User> users = new MapMaker().makeComputingMap(new Function<String, User>() { @Override public User apply(String userName) { User user = new User(); u...
0
import org.apache.aurora.scheduler.state.SchedulerCore; private final SchedulerCore schedulerCore; * @param schedulerCore Core scheduler. SchedulerCore schedulerCore, this.schedulerCore = checkNotNull(schedulerCore); // TODO(William Farner): Refactor this to use a thinner interface here. As it...
0
import org.apache.http.io.ByteArrayBuffer; private ByteArrayBuffer buffer; private int maxSize; this.buffer = new ByteArrayBuffer(buffersize); this.maxSize = buffersize; if (this.buffer.length() > 0) { this.outstream.write(this.buffer.buffer(), 0, this.buffer.length()); ...
0
static org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(VerifyMerlinsExamplesFifteen.class.getName());
1
package org.apache.felix.dm.impl;
0
public abstract class DisplayAction extends Action { public DisplayAction() { super(); } public DisplayAction( String text ) { super( text ); } public DisplayAction( String text, ImageDescriptor image ) { super( text, image ); } public DisplayActi...
0
m_log.log(LogService.LOG_WARNING, "ProviderParticipant1.start()"); } @Override public String toString() { return "ProviderParticipant1";
0
public BaseConfigurationBuilderProvider(final String bldrCls, final String reloadBldrCls, final String configCls, final Collection<String> paramCls) final ConfigurationDeclaration decl) throws ConfigurationException final Collection<BuilderParameters> params = createParameterObje...
0
import org.eclipse.jetty.server.AbstractHttpConnection; AbstractHttpConnection connection = AbstractHttpConnection.getCurrentConnection(); connection.getRequest().setHandled(true); response.setContentType(MimeTypes.TEXT_PLAIN); int code = connection.getResponse().getStatus(); String message = conne...
0
@TableGenerator(name = "alert_notice_id_generator", table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "sequence_value", pkColumnValue = "alert_notice_id_seq", initialValue = 0, allocationSize = 1)
0
import com.twitter.aurora.scheduler.storage.entities.ITaskConfig; class TaskIdGenerator implements Function<ITaskConfig, String> { public String apply(ITaskConfig task) {
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 applicable la...
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
entity.setFromVersion(""); entity.setToVersion("");
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/tags/core/CoreTagLibrary.java,v 1.17 2002/09/30 17:40:16 jstrachan Exp $ * $Revision: 1.17 $ * $Date: 2002/09/30 17:40:16 $ * $Id: CoreTagLibrary.java,v 1.17 2002/09/30 17:40:16 jstrachan E...
0
CLASSIFICATION_ADD, CLASSIFICATION_DELETE, CLASSIFICATION_UPDATE; public static EntityAuditAction fromString(String strValue) { switch (strValue) { case "ENTITY_CREATE": return ENTITY_CREATE; case "ENTITY_UPDATE": retur...
0
package org.apache.felix.sigil.common.model.eclipse; import org.apache.felix.sigil.common.model.ICapabilityModelElement;
0
* Holds all of the variables needed to describe an HTTP connection to a host. * This includes remote host name, port and scheme. * @since 4.0
0
final ComponentContainer container = this.createComponent(desc, iLog); result.setMetatypeFiles(MetaTypeIO.generateDescriptors(module, this.options, this.logger)); final ComponentContainer container = new ComponentContainer(desc, componentDesc); container.setOCD( ocd ); ...
0
* Run a single query using the Direct Runner. class NexmarkDirectRunner extends NexmarkRunner<NexmarkDirectDriver.NexmarkDirectOptions> { public NexmarkDirectRunner(NexmarkDirectDriver.NexmarkDirectOptions options) { "Cannot use --pubSubMode=COMBINED with DirectRunner"); "Cannot use --pubSubMode=COMB...
0
import org.apache.hadoop.metadata.typesystem.types.StructTypeDefinition; public static StructTypeDefinition createStructTypeDef(String name, AttributeDefinition... attrDefs) { return new StructTypeDefinition(name, attrDefs); }
0
mockResource = createNiceMock(Resource.class);
0
Map<Text,Text> hashes = new HashMap<>(); ArrayList<Range> ranges = new ArrayList<>(); Map<Text,Text> hashes2 = new HashMap<>();
0
public final class SftpCheck { private SftpCheck() { public static void main(final String[] args) throws Exception { if (args.length != 4) { session.setUserInfo(new UserInfo() { public String getPassphrase() { public String getPassword() { public boolean promp...
0
/** * Set the from attribute. */ String from() default "";
0
/** A set of commonly used classes enabling some code reuse. */
0
private static final String ALERT_SUMMARY_PASSIVE_PROPERTY_ID = "alerts/summary/PASSIVE"; private static final String PASSIVE_TOKEN = "AMBARIPASSIVE="; int passive = 0; } // status = the return code from the plugin that controls // whether an alert is sent out (0 when using ...
0
* An empty or nonexistent directory that Accumulo and Zookeeper can store data in.
0
LOG.info("Received a updateComponent request" + ", clusterName=" + request.getClusterName() + ", serviceName=" + request.getServiceName() + ", componentName=" + request.getComponentName() + ", request=" + request.toString()); LOG.info("Received a updateHostComponent ...
0
* http://www.apache.org/licenses/LICENSE-2.0
0
import org.apache.beam.sdk.transforms.windowing.BoundedWindow; public BeamSqlPrimitive evaluate(BeamRecord inputRow, BoundedWindow window) { paras.add(e.evaluate(inputRow, window).getValue());
0
import org.apache.xml.security.algorithms.implementations.ECDSAUtils;
0
throw new Error("invalid convertType:" + type ); // can't be reached
0
/** Convert Java model object to Row. */ return Row.withSchema(adapter.getSchema()).addValues(adapter.getFieldsValues(model)).build(); return ParDo.of( new DoFn<Event, Row>() { @ProcessElement public void processElement(ProcessContext c) { Row row = INSTANCE.toRow(c.eleme...
1
* @version $Revision$ $Date$
0
* * @since 4.0
0
ZooCache cache = context.getZooCache();
0
// in this case it is good enough to assume the statement // in this case it is good enough to assume the result set
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
return ImmutableExecutableStage.ofFullComponents( pipeline.getComponents(),
0
import org.apache.http.params.BasicHttpParams; this.params = new BasicHttpParams(null);
0
* A self contained, repeatable non-blocking entity that retrieves its content * from a file. This class is mostly used to stream large files of different * types, so one needs to supply the content type of the file to make sure * * channel should be attempted.
0
* Copyright 2004,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
public static final DefaultHttpResponseWriterFactory INSTANCE = new DefaultHttpResponseWriterFactory();
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 ...
0
@Override @Override @Override @Override
0
if ( element instanceof Constructor || element instanceof Method ) Annotation[][] parameterAnnotations; Class<?>[] parameterTypes; if ( element instanceof Constructor ) { // constructor args Constructor<...
0
import java.util.Date; import org.apache.felix.jmx.service.coordinator.CoordinatorMBean; import org.apache.felix.service.coordinator.Coordination; import org.apache.felix.service.coordinator.CoordinationException; import org.apache.felix.service.coordinator.Participant; void schedule(final TimerTask task, final lon...
0
package org.apache.commons.dbcp2;
1
import org.slf4j.Logger;
0
Set<Map<String, Object>> propertySet = new LinkedHashSet<>(); Map<String, Object> properties = new LinkedHashMap<>(); Set<GroupResponse> allResponse = new HashSet<>(); Set<String> propertyIds = new HashSet<>(); Map<String, Object> properties = new LinkedHashMap<>();
1
/** * Compares this {@code ComponentFactoryImpl} object to another object. * * <p> * A component factory impl is considered to be <b>equal to </b> another component * factory impl if the component names are equal(using {@code String.equals}). * * @param object The {@code Compone...
0
private final ExecutorService cacheInvalidationExecutor = createCacheInvalidationExecutor(); private ExecutorService createCacheInvalidationExecutor() { return Executors.newSingleThreadExecutor( cacheInvalidationThreadFactory); }
0
import org.apache.felix.sigil.eclipse.ui.SigilUI; import org.apache.felix.sigil.eclipse.ui.util.DefaultTableProvider;
0
import com.google.common.base.Preconditions; Preconditions.checkNotNull(name); Preconditions.checkNotNull(dataTypeName); if (reverseAttributeName != null ? !reverseAttributeName.equals(that.reverseAttributeName) : that.reverseAttributeName != null)
0
package org.ognl.test.objects; /** * */ public class GenericRoot { Root _root = new Root(); GenericCracker _cracker = new GenericCracker(); public Root getRoot() { return _root; } public void setRoot(Root root) { _root = root; } public GenericCracker getCracker...
0
import java.net.InetSocketAddress; import java.net.UnknownHostException; private void validateAddress(final SocketAddress address) throws UnknownHostException { if (address == null) { return; } if (address instanceof InetSocketAddress) { InetSocketAddress endpoint = (...
0
return getAnimatedLengthAttribute (null, SVG_X_ATTRIBUTE, SVG_USE_X_DEFAULT_VALUE, SVGOMAnimatedLength.HORIZONTAL_LENGTH); } return getAnimatedLengthAttribute (null, SVG_Y_ATTRIBUTE, SVG_USE_Y_DEFAULT_VALUE, SVGOMAnimatedLength.VERTICAL_LENGTH); ...
0
import javax.annotation.Nullable; @Nullable
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 applicable l...
0
reportDir = new File(project.getTarget(), project.getProperty("test-reports", "test-reports")); if (report.isFile()) for (File file : reportDir.listFiles()) {
0
* Creates a clone of the specified {@code Synchronizer}. This method can be * called by {@code clone()} implementations in configuration classes that * also need to copy the {@code Synchronizer} object. This method can handle * some well-known {@code Synchronizer} implementations directly. For other...
0
import org.apache.sshd.common.kex.AbstractDH; @Override protected AbstractDH getDH() throws Exception { DH dh = new DH(); return dh;
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
Set<DisplayData> displayData = evaluator.displayDataForPrimitiveSourceTransforms(read);
0
/** * @param password The plain text password of the username being logged into. */ /** * @param fileType The type of the file (one of the <code>FILE_TYPE</code> */ /** * @param fileType The type of the file (one of the <code>FILE_TYPE</code> */ * FTPClient</a>, which wi...
0
* @version $Id$
0
Object[] args = new Object[jjtGetNumChildren()]; Object result, root = context.getRoot(); for ( int i = 0; i < args.length; ++i ) { args[i] = children[i].getValue( context, root ); } result = OgnlRuntime.callMethod( context, source, methodName, args ); ...
0
import java.io.ByteArrayInputStream; ByteArrayInputStream bais = ByteBufferUtil.toByteArrayInputStream(bb); byte[] buffer = new byte[expected.length()]; try { bais.read(buffer); Assert.assertEquals(expected, new String(buffer, Charsets.UTF_8)); } catch (IOException e) { throw new Runt...
0
log.error("Expected hostname of '{}' but got '{}'. Ensure the entries in" + " the Accumulo hosts files (e.g. masters, tservers) are the FQDN for" + " each host when using SASL.", fqdn, hostname);
0
public Object structuralValue(T value) throws Exception { return coder.structuralValue(toFn.apply(value)); } @Override
0
import org.apache.aurora.common.args.Arg; import org.apache.aurora.common.args.CmdLine; import org.apache.aurora.common.quantity.Amount; import org.apache.aurora.common.quantity.Time;
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
} else { String clientId = UUID.randomUUID().toString(); LOG.debug("MQTT client id set to random value {}", clientId); client.setClientId(clientId);
0
* Iterates property values of an object pointed at with a {@link PropertyOwnerPointer}. }
1
import junit.framework.TestCase;
0
String tableName = getTableNames(1)[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 not...
0
/** TODO: complete javadoc. */ /** TODO: complete javadoc. */ /** TODO: complete javadoc. */
0
import org.apache.beam.sdk.io.gcp.bigquery.BigQueryIO; import org.apache.beam.sdk.io.gcp.bigquery.BigQueryIO.Write.CreateDisposition; import org.apache.beam.sdk.io.gcp.bigquery.BigQueryIO.Write.WriteDisposition;
0
import com.google.inject.TypeLiteral; import com.google.inject.matcher.Matchers; import com.google.inject.spi.TypeEncounter; import com.google.inject.spi.TypeListener; import static com.google.inject.matcher.Matchers.*;
0
import org.apache.beam.sdk.runners.PipelineRunner; * by a Beam runner or later steps in the pipeline, or used in * <p>The element should be considered immutable. A Beam runner will not mutate the * {@link OldDoFn} methods, because it may be cached elsewhere, retained by the runner * {@link ProcessCont...
0
package org.osgi.service.serializer; public interface Deserializing<T> {
0
propertiesToExclude = propertiesToExclude == null ? new HashSet<>() : propertiesToExclude; propertiesToSet = propertiesToSet == null ? new HashMap<>() : propertiesToSet;
0
if (null != clusterVersion) { updateRepoVersion(stack, repoVersion); repositoryVersionDao.merge(repoVersion); } else { LOG.warn("Missing cluster version for cluster {}", cluster.getClusterName()); }
0
private static final long serialVersionUID = 3138679343859749668L;
0
/* * Copyright 2016-2018 Seznam.cz, a.s. import cz.seznam.euphoria.core.client.dataset.windowing.Window; public Window<?> getWindow() {
0
* Tests whether spaces are preserved when the xml:space attribute is set. */ public void testPreserveSpace() { assertEquals("Wrong value of blanc", " ", conf.getString("space.blanc")); assertEquals("Wrong value of stars", " * * ", conf .getString("space.stars")); } ...
0
* @version $Id$
0
import org.apache.ambari.server.state.Service; import org.apache.ambari.server.topology.TopologyManager; import org.apache.ambari.server.utils.StageUtils; expect(cluster.getHosts()).andReturn(hostsForCluster.values()).atLeastOnce(); expect(cluster.getServices()).andReturn(new HashMap<String, Service>()).anyTime...
0
import org.apache.felix.ipojo.ConfigurationTracker; // Initialize ConfigurationTracker ConfigurationTracker.initialize(); //Shutdown ConfigurationTracker ConfigurationTracker.shutdown();
0
assertEquals(stepName, getString(step.getProperties(), PropertyNames.USER_NAME)); .put("namespace", parDo1.getClass().getName()) .put("namespace", parDo2.getClass().getName())
0
* Returns whether the Content-Type header has the given parameter. */ public boolean hasContentTypeParameter(String param) { return data.hasContentTypeParameter(userAgent, param); } /**
0
String tblStr = context.tableOperations().tableIdMap().get(tableName); context.tableOperations().offline(tableName, true); Scanner scanner = context.createScanner(MetadataTable.NAME, Authorizations.EMPTY); BatchWriter writer = context.createBatchWriter(MetadataTable.NAME, null); context.tableOpe...
0