Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
/** * Configure the WorkAssigner implementation */
0
import java.util.HashSet; import java.util.Hashtable; import java.util.Set; import org.osgi.framework.Constants; import org.osgi.framework.ServiceRegistration; private ServiceRegistration<?> serviceReg; Dictionary<String, Object> props = new Hashtable<String, Object>(); props.put(Constants.SERVICE_PID, Je...
0
protected Key getKey(String algorithmURI, XMLSecurityConstants.KeyUsage keyUsage, String correlationID) throws XMLSecurityException { protected PublicKey getPubKey(String algorithmURI, XMLSecurityConstants.KeyUsage keyUsage, String correlationID) throws...
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 m...
0
import org.apache.avalon.framework.service.ServiceSelector; // Get an appropriate list builder ServiceSelector builderSelector = (ServiceSelector)this.serviceManager.lookup(SelectionListBuilder.ROLE + "Selector"); // listType can be null, meaning we will use the default selection ...
0
portalServiceInfo.setRole(PortalService.class.getName());
0
package org.apache.beam.sdk.extensions.sql.interpreter.operator.arithmetic; import org.apache.beam.sdk.extensions.sql.interpreter.operator.BeamSqlExpression;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/model/jdom/JDOMNamespaceIterator.java,v 1.3 2003/01/11 05:41:26 dmitri Exp $ * $Revision: 1.3 $ * $Date: 2003/01/11 05:41:26 $ import java.util.ArrayList; import java.util.HashSet; impo...
1
EasyMock.isNull(),
0
import org.apache.commons.vfs.provider.UriParser; * @version $Revision: 1.2 $ $Date: 2003/01/24 00:20:04 $ private final String share; private SmbFileName( final String scheme, final String rootUri, final String hostName, final String p...
0
* @version CVS $Id: Cocoon.java,v 1.11 2003/08/05 16:56:20 cziegeler Exp $ private CommandManager commands; this.threads = new TPCThreadManager(); ContainerUtil.enableLogging(this.threads, getLogger().getChildLogger("thread.manager")); ContainerUtil.parameterize...
0
return beginTimes.clone(); return endTimes.clone();
0
private void publishGcsResults(PipelineResult result) { MetricsReader metricsReader = new MetricsReader(result, "org.apache.beam.sdk.extensions.gcp.storage.GcsFileSystem"); long numCopies = metricsReader.getCounterMetric("num_copies"); long copyTimeMsec = metricsReader.getCounterMetric("copy_time...
0
import java.io.File; import java.io.IOException; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; import static org.junit.Assert.*; ...
0
import org.apache.aurora.gen.AssignedTask; import org.apache.aurora.scheduler.storage.entities.IAssignedTask; AssignedTask builder = makeTask("id", JOB).newBuilder().getAssignedTask(); builder.getTask().unsetResources(); builder.unsetAssignedPorts(); IAssignedTask task = IAssignedTask.build(builder); ...
0
package org.apache.beam.sdk.extensions.euphoria.core.client.operator.state; import org.apache.beam.sdk.extensions.euphoria.core.annotation.audience.Audience;
0
import org.apache.sshd.common.session.Session;
0
import org.w3c.dom.svg.SVGFitToViewBox; return node.getPrimitiveBounds(); AffineTransform at = gn.getTransform(); if (at != null) { ctm.preConcatenate(at); elt = SVGCSSEngine.getParentCSSStylableElement(elt); gn = gn.getParent(); if (el...
0
Transformer<Enum<?>, String> ENUM_NAME_EXTRACTOR = input -> (input == null) ? null : input.name();
0
import java.util.concurrent.Semaphore; long periodMs = 200; final Semaphore sampleHappened = new Semaphore(0); sampleHappened.release(); sampleHappened.acquire(); long samplerStoppedTimeStamp = System.currentTimeMillis(); assertThat(lastSampledTimeStamp.get(), Matchers.lessThanOrEqualTo...
0
env.getConnector().tableOperations().setProperty(tableName, Property.TABLE_BLOCKCACHE_ENABLED.getKey(), blockCache + ""); ConditionalWriter cw = env.getConnector().createConditionalWriter(tableName, new ConditionalWriterConfig().setMaxWriteThreads(1));
0
public void setMaxTotal(final int max) { public void setDefaultMaxPerRoute(final int max) { public void setMaxPerRoute(final HttpRoute route, final int max) {
0
import org.apache.ambari.server.utils.VersionUtils; schemaVersion.setMetainfoValue(VersionUtils.getVersionSubstring(ambariMetaInfo.getServerVersion()));
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.accumulo.proxy.thrift.PrincipalToken; protected static PrincipalToken userpass; userpass = new PrincipalToken("root", ByteBuffer.wrap("".getBytes())); public void ping() throws Exception { tpc.proxy().ping(userpass); } @Test
0
/* * Copyright (C) MX4J. * All rights reserved. * * This software is distributed under the terms of the MX4J License version 1.0. * See the terms of the MX4J License in the documentation provided with this software. */ /* * Copyright 2005 The Apache Software Foundation * * Licensed under the Apache Licens...
0
* @param src will be the first (and only) member of the srcs * Vector. Src is also used to set the ColorModel, SampleModel, * and tile grid offsets. * Returns the x index of tile under xloc. * @param xloc the x location (in pixels) to get tile for. * Returns the y index of tile under yloc...
1
if (value == null) { return null; }
0
LOG.debug("Pre-process: {}, to: {}", propertyId, newPropertyId);
1
/** * Get the servlet handling the error * @param exception Optional exception * @param errorCode Error code * @return The servlet handling the error or {@code null} */ public ServletHandler get(final Throwable exception, final int errorCode) { ServletHandler errorHandler = ...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/test/org/apache/commons/validator/UrlTest.java,v 1.8 2004/01/19 14:11:33 rleland Exp $ * $Revision: 1.8 $ * $Date: 2004/01/19 14:11:33 $
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/test/org/apache/commons/validator/RequiredIfTest.java,v 1.9 2003/08/12 00:29:34 dgraham Exp $ * $Revision: 1.9 $ * $Date: 2003/08/12 00:29:34 $ import org.xml.sax.SAXException; * @version $Revision: 1.9 $ $Date: 200...
0
public BigDecimalLocaleConverterTestCase(final String name) {
0
package org.apache.xml.security.stax.impl.util;
0
* * <p>This class originated in FileUpload processing. In this use case, you do * not know in advance the size of the file being uploaded. If the file is small * you want to store it in memory (for speed), but if the file is large you want * to store it to file (to avoid memory issues).</p> * @version $Id: Defer...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/test/org/apache/commons/beanutils/TestBeanPackageSubclass.java,v 1.3 2003/10/05 13:33:29 rdonkin Exp $ * $Revision: 1.3 $ * $Date: 2003/10/05 13:33:29 $ * * Copyright (c) 2001-2003 The Apache Software Foundation. ...
0
* @version CVS $Id$ // FIXME(SW): it would be better for this to be named "context-root" and be a URL to be consistent // with Excalibur's SourceResolverImpl. For now, we use this also in the core's SimpleSourceResolver
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
Assert.assertNotNull( TypeSystem.getInstance().getDataType(ClassType.class, FalconTypeSystem.DefinedTypes.CLUSTER.name())); Assert.assertNotNull( TypeSystem.getInstance().getDataType(TraitType.class, FalconTypeSystem.DefinedTypes.TAG.name()));
0
* Copyright 2000-2009 The Apache Software Foundation
0
import org.apache.atlas.annotation.GraphTransaction; import org.springframework.stereotype.Component; import javax.inject.Inject; import javax.inject.Singleton; @Component public GraphBackedTypeStore(AtlasGraph atlasGraph) { this.graph = atlasGraph; Map<String, AtlasVertex> result = new HashMap<>(ty...
0
import org.apache.ambari.server.controller.internal.PropertyInfo; import org.apache.ambari.server.controller.spi.Resource; import org.junit.Assert; import org.junit.Test; Assert.assertEquals("metrics/yarn/Queue/$1", category); Assert.assertTrue(categories.contains("metrics/yarn/Queue/$1")); Assert.assertTr...
0
issues.add(this.getMessage("Class must be public: " + javaClass.getName()));
0
private static final Log LOG = LogFactory.getLog(TarFileSystem.class); return new TarInputStream(Bzip2FileObject.wrapInputStream(file.getAbsolutePath(), new FileInputStream(file))); VfsLog.warn(getLogger(), LOG, "vfs.provider.tar/close-tar-file.error :" + file, e);
0
import static org.apache.beam.sdk.schemas.utils.TestJavaBeans.SIMPLE_BEAN_SCHEMA; import static org.apache.beam.sdk.schemas.utils.TestPOJOs.SIMPLE_POJO_SCHEMA; import static org.junit.Assert.assertTrue; import org.apache.beam.sdk.schemas.utils.TestJavaBeans.SimpleBean; import org.apache.beam.sdk.schemas.utils.TestPOJOs...
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
return new FlinkJobInvocation( id, retrievalToken, executorService, pipeline, pipelineOptions, filesToStage); FlinkPipelineOptions pipelineOptions, List<String> filesToStage) {
0
import org.apache.beam.vendor.protobuf.v3.com.google.protobuf.ByteString;
0
import org.apache.ambari.server.agent.CommandReport; @Override public void updateHostRoleState(String hostname, long requestId, long stageId, String role, CommandReport report) { // TODO Auto-generated method stub }
1
private String serializeMetrics(MetricQueryResults metricQueryResults) throws Exception {
0
import org.apache.accumulo.shell.ShellOptions; namespaceOpt = new Option(ShellOptions.namespaceOption, "namespace", true, "name of a namespace to operate on");
1
.apply(BigQueryIO.write().to(tableSpec)
0
import com.google.common.collect.FluentIterable; import com.google.common.collect.Lists; import com.google.common.collect.Sets; import java.util.Arrays; import java.util.LinkedList; import java.util.List; import java.util.Set;
0
public void assertNotLocked(final ILockKey context) throws LockException { if (stored.isPresent()) { throw new LockException(String.format( "Unable to perform operation for %s due to active lock held", formatLockKey(context)));
0
static final List<String> CUSTOM_TRANSFORM_ATTRIBUTES = Arrays.asList(HDFS_PATH_NAME_ATTRIBUTE, HDFS_PATH_PATH_ATTRIBUTE, HDFS_CLUSTER_NAME_ATTRIBUTE); super(transformers); private boolean isPathUpdated = false; private boolean isCustomAttributeUpdated = false; public Obje...
0
import org.apache.accumulo.core.client.admin.ScanType; *
0
import org.apache.hadoop.fs.Path; ABSOLUTEPATH("absolute path", null, "An absolute filesystem path. The filesystem depends on the property. This is the same as path, but enforces that its root is explicitly specified.") { public boolean isValidFormat(String value) { return new Path(value).isAbsolute(...
0
* @version CVS $Id: SitemapComponentTestCase.java,v 1.9 2004/07/04 17:52:29 huber Exp $ private Map objectmodel = new HashMap(); /** * Select with a pattern. * * @param type Hint of the matcher. * @param expression Expression for the selector. * @param parameters Matcher parameters. ...
0
int currentMaxForwards = Integer.parseInt(maxForwards.getValue());
0
* http://www.apache.org/licenses/LICENSE-2.0
0
import org.apache.avalon.framework.service.ServiceManager; * @version CVS $Id: CopletThread.java,v 1.8 2004/05/26 08:39:49 cziegeler Exp $ private Logger logger; private String copletID; private Map objectModel; private Object[] loadedCoplet; private ServiceManager ...
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 void handleMessage(HiveMessage hiveMessage) {
0
* @param <K> the type of keys * @param <V> the type of mapped values
0
Set<String> operations = new TreeSet<>(this.operationTimings.keySet());
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.collect.ImmutableList; public static final List<Coder.Context> ALL_CONTEXTS = ImmutableList.of(
0
import javax.management.JMException; import org.apache.zookeeper.server.ManagedUtil; try { ManagedUtil.registerLog4jMBeans(); } catch (JMException e) { LOG.warn("Unable to register log4j JMX control", e); }
0
import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.c14n.InvalidCanonicalizerException; import org.apache.xml.security.c14n.implementations.Canonicalizer20010315OmitComments; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.transforms...
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 org.apache.commons.httpclient.HttpURL; * @version $Id: WebDAVSource.java,v 1.21 2004/03/22 17:05:28 gcasper Exp $ httpURL.setUserinfo(principal, password); private WebDAVSource (WebdavResource source, String principal, String password) source.getHttpURL().setUserinfo(principal, password); ...
0
import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger log = LoggerFactory.getLogger(GarbageCollectionAlgorithm.class);
0
import org.apache.ambari.server.controller.internal.QueryResponseImpl; import org.apache.ambari.server.controller.spi.QueryResponse; QueryResponse queryResponse = doQuery(resourceType, request, queryPredicate); queryResponse, request, queryPredicate, pageRequest, sortRequest); resourceSet.addAll(qu...
0
Map<String, Map<String, Map<String, String>>> configurationAttributes = new TreeMap<String, Map<String, Map<String, String>>>(); Map<String, Map<String, String>> attrs = new TreeMap<String, Map<String, String>>(); configHelper.cloneAttributesMap(clusterConfig.getPropertiesAttributes(), attrs); ...
0
this(c.getBootstrapMethodRef(), c.getBootstrapArguments()); this(input.readUnsignedShort(), input.readUnsignedShort()); // helper method private BootstrapMethod(int bootstrap_method_ref, int num_bootstrap_arguments) { this(bootstrap_method_ref, new int[num_bootstrap_arguments]); } ...
0
assertEquals("Combine.globally(Top(OrderByLength))", Top.of(1, new OrderByLength()).getName()); assertEquals("Combine.globally(Top(Smallest))", Top.smallest(1).getName()); assertEquals("Combine.globally(Top(Largest))", Top.largest(2).getName()); assertEquals("Combine.perKey(Top(IntegerComparator))", ...
0
import org.apache.batik.css.engine.CSSEngine; protected BridgeContext subCtx=null; BridgeContext theCtx = ctx; subCtx = null; if (!isLocal) { CSSEngine eng = refDocument.getCSSEngine(); subCtx = (BridgeContext)refDocument.getCSSEngine().getCSSContext(); ...
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
// xml:{base,id,lang,space} and XML Events attributes String XML_BASE_ATTRIBUTE = "base"; String XML_ID_ATTRIBUTE = "id"; String XML_LANG_ATTRIBUTE = "lang"; String XML_SPACE_ATTRIBUTE = "space"; String XML_BASE_QNAME = XML_PREFIX + ':' + XML_BASE_ATTRIBUTE; String XML_ID_QNAME = XML_PREFIX...
1
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
0
MetricsEnvironment.setCurrentContainer(null); MetricsEnvironment.setCurrentContainer(c1); MetricsEnvironment.setCurrentContainer(c2); MetricsEnvironment.setCurrentContainer(null);
0
/** * Tests for blocks * @since 1.1 */
0
import org.apache.ambari.server.controller.RootService; if (StringUtils.isBlank(serviceName) || RootService.AMBARI.name().equals(serviceName)) {
0
// Check in the cache for the file system final FileName rootName = getContext().getFileSystemManager().resolveName(name, FileName.ROOT_PATH);
0
import static org.hamcrest.Matchers.equalTo; import org.apache.beam.sdk.transforms.DoFn; import java.util.concurrent.atomic.AtomicInteger; private static AtomicInteger changed; changed = new AtomicInteger(0); counts.apply(ParDo.of(new DoFn<KV<String, Long>, Void>() { @ProcessElement public void up...
0
private InputStream in; final InputStream inLocal = in; if (inLocal != null) { synchronized (inLocal) { if (in != null) { try { in.close(); } finally { in = null; if (decompressor != null) { ...
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
* 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 ma...
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
* @since 6.0
0
mavenBundle().groupId("org.osgi").artifactId("org.osgi.compendium").version("4.2.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...
0
import org.apache.batik.constants.XMLConstants;
0
* Copyright 2002-2005 The Apache Software Foundation.
0
/** * Schedule a callback to be executed after the given window is expired. * * <p>For example, upstream state associated with the window may be cleared. */ public void scheduleAfterWindowExpiration( AppliedPTransform<?, ?, ?> producing, BoundedWindow window, WindowingStrategy<?, ?> wi...
0
private Object m_securityContext = null; public synchronized Object getSecurityContext() { return m_securityContext; } public synchronized void setSecurityContext(Object securityContext) { m_securityContext = securityContext; } if (!bundle.getInfo().getProtectio...
0
import org.apache.http.entity.EntityWriter;
0
import com.google.cloud.dataflow.sdk.util.IOChannelUtils; import com.google.cloud.dataflow.sdk.util.MimeTypes; import org.junit.rules.ExpectedException; import java.io.FileNotFoundException; import java.nio.channels.Channels; @Rule public ExpectedException expectedException = ExpectedException.none(); @Test pub...
0
private static final String API_CSRF_PREVENTION_DEFAULT = "true";
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/axes/AncestorContext.java,v 1.4 2002/04/10 03:40:20 dmitri Exp $ * $Revision: 1.4 $ * $Date: 2002/04/10 03:40:20 $ * @version $Revision: 1.4 $ $Date: 2002/04/10 03:40:20 $ public v...
0