Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
// synthetize expr using register expr = "#0" + (expr.charAt(0) == '[' ? "" : ".") + expr + ";"; parser.ALLOW_REGISTERS = true; // set register interpreter.setRegisters(bean); } finally { parser.ALLOW_REGISTERS = false; // synthetize expr u...
0
import org.apache.flink.runtime.checkpoint.OperatorSubtaskState; OperatorSubtaskState snapshot = testHarness.snapshot(0, 0); VarLongCoder.of(), null /* key selector */
0
import org.apache.ambari.server.events.MaintenanceModeEvent; import org.apache.ambari.server.events.publishers.AmbariEventPublisher; /** * Used to publish events relating to host CRUD operations. */ @Inject private AmbariEventPublisher eventPublisher; stateMachine = stateMachineFactory.make(this); ...
0
@SuppressWarnings({"unchecked", "serial", "rawtypes", "unused"}) public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionStats._Fields>, java.io.Serializable, Cloneable, Comparable<ActionStats> { public enum _Fields implements org.apache.thrift.TFieldIdEnum {
0
Object pool; pool = pools.get(key); Object old = pools.put(getPoolKey(username,password), pool); if (old != null) { throw new IllegalStateException("Pool already contains an entry for this user/password: "+username); }
0
private Map<String, byte[]> m_resources; private Element m_component; m_component = component; m_resources = new HashMap<String, byte[]>(); m_component.addElement(structure); m_resources.put(type, resource); return m_resources;
0
import org.apache.http.util.concurrent.Executor;
0
* Constant for a prefix for reserved initialization parameter keys. If a * parameter was set whose key starts with this prefix, it is filtered out * before the initialization of a newly created result object. This * mechanism allows implementing classes to store specific configuration * data in...
0
import org.apache.accumulo.core.client.impl.ClientContext; import org.apache.accumulo.core.conf.AccumuloConfiguration; import org.apache.accumulo.core.conf.Property; import org.apache.accumulo.core.conf.SiteConfiguration; // Automatically try to add in the proper ZK from accumulo-site for backwards compat. if ...
0
Scanner rowThree = getRow(scanOpts, new Text("row3")); Scanner rowTwo = getRow(scanOpts, new Text("row2")); Scanner rowOne = getRow(scanOpts, new Text("row1")); rowTwo = getRow(scanOpts, new Text("row2")); rowThree = getRow(scanOpts, new Text("row3")); rowTwo = getRow(scanOpts, new Text("row2"))...
0
log.warn("Already cached block: {}", _lookup, e); log.debug("Error full blockRead for file {} for block {}", fileName, block, e); log.warn("Already cached block: {}", _lookup, e);
0
List<Query> datastoreSplits; try { datastoreSplits = getSplitQueries(Ints.checkedCast(numSplits), options); } catch (IllegalArgumentException | DatastoreException e) { LOG.warn("Unable to parallelize the given query: {}", query, e); return ImmutableList.of(this); } ...
0
/* ==================================================================== * Copyright (c) 2003-2004 The Apache Software Foundation. All rights * @version $Revision: 1.4 $ $Date: 2004/01/14 21:34:35 $
0
try (ServerContext context = new ServerContext(new SiteConfiguration())) { String root = Constants.ZROOT; IZooReaderWriter zk = context.getZooReaderWriter(); if (opts.auth != null) { zk.getZooKeeper().addAuthInfo("digest", ("accumulo:" + opts.auth).getBytes(UTF_8)); }
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
final TServerInstance[] servers = master.onlineTabletServers().toArray(new TServerInstance[0]); long timeInMillis = master.getConfiguration().getTimeInMillis(Property.MASTER_BULK_TIMEOUT);
0
package org.apache.cocoon.components.source.helpers; import org.apache.cocoon.components.source.helpers.SourceRefresher;
0
import com.google.cloud.dataflow.sdk.testing.DataflowAssert; SparkPipelineOptions options = SparkPipelineOptionsFactory.create(); options.setRunner(SparkPipelineRunner.class); Pipeline p = Pipeline.create(options); DataflowAssert.that(output).containsInAnyOrder(EXPECTED_SET); p.run();
0
import java.lang.ref.WeakReference; import java.util.HashSet; import java.util.Set; protected Set toolTipDocs = null; if (toolTipDocs != null) { Iterator i = toolTipDocs.iterator(); while (i.hasNext()) { SVGDocument ttdoc; ttdoc = (SVGDocument)((WeakR...
0
@Deprecated
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/locale/converters/SqlTimeLocaleConverter.java,v 1.4 2003/10/05 13:34:17 rdonkin Exp $ * $Revision: 1.4 $ * $Date: 2003/10/05 13:34:17 $ * * Copyright (c) 2001-2003 The Apache Soft...
0
import java.util.HashSet; import java.util.Set; import com.twitter.mesos.gen.Attribute; import com.twitter.mesos.gen.HostAttributes; import com.twitter.mesos.scheduler.storage.AttributeStore.AttributeStoreImpl; @Test public void testAttributeStoreSnapshot() { AttributeStoreImpl attributeStore1 = new AttributeSt...
0
public void testIsEncodeEquals() { this.colognePhonetic.isEncodeEqual(data[i][1], data[i][0]);
0
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableMap;
0
package org.apache.commons.ognl.internal.entry; /** * User: Maurizio Cucchiara * Date: 10/15/11 * Time: 9:02 AM */ public class DeclaredMethodCacheEntry extends MethodCacheEntry { MethodType type; public enum MethodType { STATIC, NON_STATIC } public DeclaredMethodCacheEntry( Clas...
0
import org.apache.ambari.server.state.kerberos.KerberosIdentityDescriptor; final Collection<KerberosIdentityDescriptor> serviceIdentities = serviceComponentFilter == null ? null : kerberosKeytabController.getServiceIdentities(executionCommand.getClusterName(), serviceComponentFilter.keySet()); final Set...
0
import org.apache.aurora.scheduler.storage.entities.IVolume; /** * Inserts a task's volume mounts. * * @param configId Task config ID. * @param volumes Volumes to insert. */ void insertVolumes( @Param("configId") long configId, @Param("volumes") List<IVolume> volumes);
0
adList.add(new AttributeDefinitionImpl(JettyConfig.FELIX_JETTY_SESSION_SCAVENGING_INTERVAL,
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
/* * 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.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting;
0
* typically when the VM exits /** * Returns <code>true</code> if the specified * {@link java.lang.Process} was * successfully added to the list of processes to be destroy. * * @param process * the process to add * @return <code>true</code> if the specified * {@link...
0
public static final String ALLOW_REVERT_COLUMN = "revert_allowed"; @Override List<ClusterConfigEntity> notMappedConfigs = query.getResultList(); dbAccessor.addColumn(UPGRADE_TABLE, new DBAccessor.DBColumnInfo(ALLOW_REVERT_COLUMN, Short.class, null, 0, 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...
0
import org.apache.samza.config.JobConfig; config.put(JobConfig.JOB_NAME(), options.getJobName());
0
import org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException; import org.apache.accumulo.core.dataImpl.KeyExtent; import org.apache.accumulo.core.securityImpl.thrift.TCredentials;
0
cleanupOnCancelOrFinish(); if (apexApp.isFinished()) { cleanupOnCancelOrFinish(); return State.DONE; } return null; /** * Opportunity for a subclass to perform cleanup, such as removing temporary files. */ protected void cleanupOnCancelOrFinish() { }
0
package org.apache.batik.gvt.filter;
0
import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileInputStream; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.apache.xml.security.c14n.Canonicalizer; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security....
0
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkNotNull; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Lists; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Maps;
0
* <li>{@link #doIsWriteable} returns true. * <li>This file has no children, if a folder. * <li>The parent folder exists and is writeable, or this file is the * root of the file system. * Returns the last modified time of this file. Is only called if * {@link #doGetType} does not retur...
0
import org.apache.xml.security.stax.ext.InboundSecurityContext; import org.apache.xml.security.stax.securityToken.SecurityTokenConstants; ECKeyValueType ecKeyValueType, InboundSecurityContext inboundSecurityContext, SecurityTokenConstants.KeyIdentifier keyIdentifier) throws XMLSecurityException ...
0
* Copyright 2016-2017 Seznam.cz, a.s.
0
if ( scope == NameScope.FILE_SYSTEM ) { // All good return true; } if ( !path.startsWith( basePath ) ) { return false; } final int baseLen = basePath.length(); if ( path.length() == baseLen if ( path.le...
0
package org.apache.beam.sdk.util; import org.apache.beam.sdk.options.PipelineOptions;
0
Copyright 2002-2003,2005 The Apache Software Foundation * Creates a new SVG12CSSEngine. * Creates a new SVG12CSSEngine.
1
* @version $Id$
0
import org.apache.accumulo.harness.AccumuloIT; import org.apache.accumulo.harness.MiniClusterHarness; * New tests should be written using {@link AccumuloClusterIT}. To obtain the same semantics (shared instance across methods in a class), extend * {@link AccumuloIT} and use {@link MiniClusterHarness} to create a Mini...
0
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertSame;
0
for (final String describe : describes) {
0
protected ComponentMethods getComponentMethods() { return m_componentMethods; }
0
import org.apache.accumulo.server.TabletLevel; public void addLoggersToMetadata(DfsLogger copy, TabletLevel level) { set = metadataTableLogs.putIfAbsent(copy, EnumSet.of(level)); MetadataTableUtil.addNewLogMarker(this, this.getLock(), this.getTabletSession(), copy.getPath(), level); set = metadata...
0
import org.junit.rules.RuleChain; public ExpectedException expectedException = ExpectedException.none(); public RuleChain ruleChain = RuleChain.outerRule(expectedException).around(p);
0
import org.apache.hc.core5.util.Args; Args.notNull(context, "HTTP context"); return new HttpClientContext(context);
0
import org.apache.beam.sdk.metrics.MetricResult; * Tests tagged with {@link UsesAttemptedMetrics} should be run for runners which support * {@link MetricResult#attempted()}. public class UsesAttemptedMetrics {}
0
Copyright 2001,2005 The Apache Software Foundation public class SVGDescElementBridge extends SVGDescriptiveElementBridge { * Returns a new instance of this bridge. public Bridge getInstance() { return new SVGDescElementBridge(); }
1
* http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing...
0
if (log.isDebugEnabled()) { log.debug("Closing connection" + " [" + entry.getPlannedRoute() + "][" + entry.getState() + "]"); }
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
/* * 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
String postUri = String.format("http://%s:%s%s", METADATA_HOST, METADATA_PORT, METADATA_PATH);
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
import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; impor...
0
import org.apache.aurora.scheduler.async.OfferManager; bindMock(OfferManager.class);
0
package org.apache.bcel.generic; super(org.apache.bcel.Const.FALOAD);
1
for (final HandlerEntry entry: handlerList) { } catch (final IOReactorException ex) {
0
import java.util.HashMap; * The property ids for an alert group resource. */ private static final Set<String> PROPERTY_IDS = new HashSet<String>(); /** * The key property ids for an alert group resource. */ private static final Map<Resource.Type, String> KEY_PROPERTY_IDS = new HashMap<Resource.Type, ...
0
public final ITypeBrowser typeSystem; public final int numFields; protected StructType(ITypeBrowser typeSystem, String name, int numFields) { this.typeSystem = typeSystem; this.numFields = numFields; protected StructType(ITypeBrowser typeSystem, String name, Immu...
0
try (AccumuloClient client = createAccumuloClient()) {
0
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; private final StreamExecutionEnvironment env; public StreamingFlowTranslator(StreamExecutionEnvironment env) { this.env = Objects.requireNonNull(env); } public List<DataSink<?>> translateInto(Flow flow) { StreamingExecutorCon...
0
* Replaces the first occurrence of the header with the same name. If no header with * * @since 5.0 public void setHeader(final Header header) { * @since 5.0 public Iterator<Header> headerIterator() { * @since 5.0 public Iterator<Header> headerIterator(final String name) { * Rem...
0
// After a bundle is uninstalled, the spec says getHeaders() should // of uninstall. So, let's clear the existing header cache to throw // away any other locales and populate it with the headers for the // default locale. We only do this if there are multiple cached locales // an...
1
import static org.apache.commons.lang.StringUtils.defaultString; import javax.persistence.Basic; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.EnumType; import javax.persistence.Enumerated; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persis...
0
* @throws IOException * @throws IOException
0
* Copyright (C) 2015 Google Inc.
0
import java.io.IOException; import java.sql.SQLException; import java.util.List; import java.util.Map; import java.util.Set;
0
@Parameter(names = "--startKey") @Parameter(names = "--endKey")
0
* @version CVS $Id: ParamSaxBuffer.java,v 1.4 2004/03/17 16:20:08 vgritsenko Exp $ final int end = start + length; if (j == end) {
0
loginTracer(SiteConfiguration.getInstance());
0
@SuppressWarnings("deprecation") // unavoidable until Java 7 @SuppressWarnings("deprecation") // unavoidable until Java 7 @SuppressWarnings("deprecation") // unavoidable until Java 7 @SuppressWarnings("deprecation") // unavoidable until Java 7 @SuppressWarnings("deprecation") // unavoida...
0
Copyright 2003-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
PCollection<Integer> outputs = p.apply(Create.of("foo")).apply(ParDo.of(new SDFWithMultipleOutputsPerBlock(3)));
1
@Override
0
package org.apache.commons.configuration2; /* * 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 Licen...
1
import org.apache.felix.ipojo.InstanceManager; import org.apache.felix.ipojo.util.Logger; * State of the instance manager (unresolved at the beginning). private int m_state = InstanceManager.INVALID; * The instance manager. private InstanceManager m_manager; * @see org.apache.felix.ipojo.Handler#...
0
if (contains(propertyIds, SERVICE_SERVICE_STATE_PROPERTY_ID)) {
0
import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.repository; mavenBundle().groupId("org.ow2.chameleon").artifactId("transaction-geronimo").version(asInProject()), ), repository("http://maven.ow2.org/maven2-snapshot/"), osgi.waitForServic...
0
public class LoggingHttp1StreamListener implements Http1StreamListener { final static LoggingHttp1StreamListener INSTANCE_CLIENT = new LoggingHttp1StreamListener(Type.CLIENT); final static LoggingHttp1StreamListener INSTANCE_SERVER = new LoggingHttp1StreamListener(Type.SERVER); private final Logger connLog...
0
try { out.append(c); } catch (IOException e) { handleIOException(e); } try { out.append(csq, start, end); } catch (IOException e) { handleIOException(e); } try { out.append(csq); } catch (IOExcept...
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
import org.apache.cocoon.util.NetUtils; * @version CVS $Id: ProxyReader.java,v 1.7 2004/07/12 13:36:43 cziegeler Exp $ query.append(NetUtils.encode(paramName, null)); query.append(NetUtils.encode(paramValues[i], null));
0
import org.apache.cocoon.environment.commandline.CommandLineContext; * @version CVS $Id: CocoonTask.java,v 1.3 2003/05/12 13:26:17 stephan Exp $ CommandLineContext clContext = new CommandLineContext(contextDir.toString());
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
package org.apache.http.testserver;
0
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Stopwatch; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
0
boolean newer = FileUtils.isFileNewer(file, last); // IO-279, must be done first last = System.currentTimeMillis(); } else if (newer) { last = System.currentTimeMillis();
0
when(systemBundle.loadClass(eq("java.lang.System"))).thenReturn((Class) System.class);
0
as.addAttribute(TextAttribute.FOREGROUND, p, firstChar, lastChar+1); as.addAttribute (GVTAttributedCharacterIterator.TextAttribute.STROKE_PAINT, sp, firstChar, lastChar+1); as.addAttribute (GVTAttributedCharacterIterator.TextAttribute...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//fileupload/src/java/org/apache/commons/fileupload/FileUpload.java,v 1.24 2003/10/09 21:15:47 rdonkin Exp $ * $Revision: 1.24 $ * $Date: 2003/10/09 21:15:47 $ * any, must include the following acknowledgement: * Alternately...
0
public TagScript createTagScript(String name, Attributes attributes) throws JellyException { public TagScript createCustomTagScript(String name, Attributes attributes) throws JellyException {
0