Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
private final String[] suffixes;
private final IOCase caseSensitivity;
this(suffix, IOCase.SENSITIVE);
if (suffix == null) {
throw new IllegalArgumentException("The suffix must not be null");
}
this.suffixes = new String[] {suffix};
this(suffixes, IOCase.SENSI... | 0 |
final FileObject fileObj = fsManager.resolveFile(testFile.toURI().toURL().toString());
final DefaultFileMonitor monitor = new DefaultFileMonitor(new TestFileListener());
final FileObject fileObj = fsManager.resolveFile(testFile.toURI().toString());
final DefaultFileMonitor monitor = new ... | 1 |
* Copyright 2016-2017 Seznam.cz, a.s. | 0 |
* Use <code>constantFactory</code> if you want that. | 0 |
import java.util.Base64;
Base64.Decoder decoder = Base64.getDecoder();
return extractKeyPairs(resourceKey, beginMarker, endMarker, passwordProvider, decoder.decode(data)); | 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 |
/*
* 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 |
allowClusterOperatorToManageCredentials();
/**
* Adds <code>CLUSTER.MANAGE_CREDENTIALS</code> to the set of authorizations a <code>CLUSTER.OPERATOR</code> can perform.
*
* @throws SQLException
*/
protected void allowClusterOperatorToManageCredentials() throws SQLException {
String permissionId =... | 0 |
* Returns a BigQuery client builder using the specified {@link BigQueryOptions}.
* Returns a Pubsub client builder using the specified {@link PubsubOptions}.
* Returns a Cloud Storage client builder using the specified {@link GcsOptions}. | 0 |
* @since 6.0
/**
* @since 6.0
*/
/**
* @since 6.0
*/
return;
}
* @since 6.0 | 0 |
import org.apache.beam.runners.core.StateTag;
import org.apache.beam.runners.core.StateTags; | 0 |
/*
* There is at most one leader for each epoch, so if a peer claims to
* be the leader for an epoch, then that peer must be the leader (no
* arbitrary failures assumed). Now, if there is no quorum supporting
* this leader, then proces... | 0 |
package org.apache.accumulo.examples.simple.filedata; | 0 |
import java.util.TimeZone;
private static final Logger LOG = Logger.getLogger(DateUtil.class);
private DateUtil() {
throw new UnsupportedOperationException();
}
LOG.error("Error in coverting dateToString format :" + dateFormat, e);
private final static String SOLR_DATE_FORMAT = "yyyy-MM-dd'T'H... | 0 |
package org.apache.felix.obrplugin; | 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 applicabl... | 0 |
* @throws java.io.IOException thrown on any IO Error reading from the reader. | 0 |
charset = HTTP.DEF_PROTOCOL_CHARSET.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.conn; | 0 |
/**
* TODO(wfarner): This test has become flaky around the time of the switch to a concurrent map. Fix.
*/ | 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 |
Copyright 2001 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 law or a... | 0 |
* @version $Id: DynamicPropertyIterator.java,v 1.2 2003/01/11 05:41:26 dmitri Exp $
protected void prepareForIndividualProperty(String name) {
((DynamicPropertyPointer) getPropertyPointer()).setPropertyName(name); | 1 |
* </p> | 0 |
import org.apache.felix.gogo.commands.Option;
System.out.println(" Port State Pid Location");
System.out.println(" Port State Pid Name");
System.out.println(sb.toString());
return null; | 0 |
root.appendChild(object.getElement()); | 0 |
pids = new HashSet();
bundleLocation = ( String ) props.get( ConfigurationAdmin.SERVICE_BUNDLELOCATION );
pids.add( pidList[i] );
return persistenceManager;
return factoryPid;
return bundleLocation;
storeSilently();
return new HashSet( pids );
... | 0 |
import org.osgi.framework.BundleContext;
import org.osgi.util.tracker.ServiceTracker;
// name of the PackageAdmin class (this is a string to not create a reference to the class)
private static final String PACKAGEADMIN_CLASS = "org.osgi.service.packageadmin.PackageAdmin";
// this bundle's context
priva... | 0 |
Map attributes = AtlasTypeUtil.toStructAttributes((Map)obj);
Object value = attributes.get(attrName);
private final String vertexPropertyName;
this.definedInType = definedInType;
this.attributeDef = attrDef;
th... | 1 |
private static final long serialVersionUID = -3868598204285850458L;
| 0 |
* or more contributor license agreements. See the NOTICE file
* regarding copyright ownership. The ASF licenses this file
* with the License. You may obtain a copy of the License at
* KIND, either express or implied. See the License for the | 0 |
p1.put("instance.name","foo1");
p2.put("instance.name","foo2");
props.put("instance.name","export"); | 0 |
public class ProxyClient { | 0 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.base.Objects; | 0 |
componentMetrics.put("metrics/api/cluster/summary/wrong.metric", new Metric(null, false, false, false, "unitless"));
Assert.assertNull(resource.getPropertyValue(PropertyHelper.getPropertyId("metrics/api/cluster/summary", "wrong.metric"))); | 0 |
import org.apache.atlas.query.QueryParams;
private QueryParams queryParams = new QueryParams(100, 0);
String jsonResults = discoveryService.searchByDSL(dslQuery, queryParams);
String jsonResults = discoveryService.searchByDSL(dslQuery, queryParams);
String jsonResults = discoveryService.sear... | 0 |
* @version $Revision$ $Date$ | 0 |
public class RepositoryWizard extends Wizard
{
private IRepositoryModel model;
@Override
public boolean performFinish()
{
for ( IWizardPage page : getPages() )
{
if ( page instanceof RepositoryWizardPage )
{
RepositoryWizardPage rwp = ( Reposi... | 0 |
import java.io.Closeable;
import org.apache.beam.runners.core.metrics.MetricsContainerStepMap;
import org.apache.beam.sdk.metrics.MetricsContainer;
import org.apache.beam.sdk.metrics.MetricsEnvironment;
private MetricsContainer unboundMetricContainer;
public ElementCountFnDataReceiver(
FnDataReceiver<Windowed... | 0 |
import org.apache.cocoon.components.source.util.SourceUtil; | 0 |
import org.apache.beam.sdk.options.PipelineOptions;
import org.apache.beam.sdk.options.PipelineOptionsFactory;
/**
* This method creates {@link org.apache.beam.sdk.extensions.sql.impl.BeamSqlEnv} using empty
* Pipeline Options. It should only be used in tests.
*/
/**
* This method creates {@link org.apa... | 0 |
* "License"); you may not use this file except in compliance
* distributed under the License is distributed on an "AS IS" BASIS, | 0 |
if (LOG.isDebugEnabled()) {
LOG.debug("Executing DSL query: {}", dslQuery);
}
Object result = graph.executeGremlinScript(gremlinQuery.queryStr(), false);
if (result instanceof List && CollectionUtils.isNotEmpty((List)result)) {
List queryResult = (List) result;... | 0 |
public static final String SERVICE_CONFIG_VERSION_NOTE_PROPERTY_ID = PropertyHelper.getPropertyId(null, "service_config_version_note");
resource.setProperty(SERVICE_CONFIG_VERSION_NOTE_PROPERTY_ID, response.getNote());
!propertyId.equals("appliedtime") && !propertyId.equals("user") &&
!prope... | 0 |
* @version CVS $Id$
} | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/share/org/apache/commons/validator/Form.java,v 1.9 2003/08/03 17:29:40 dgraham Exp $
* $Revision: 1.9 $
* $Date: 2003/08/03 17:29:40 $
* @version $Revision: 1.9 $ $Date: 2003/08/03 17:29:40 $
* Returns the Fiel... | 0 |
return Namespace.ACCUMULO;
return Namespace.DEFAULT; | 0 |
*
*
*
*
*
*
* @version CVS $Id$
* XML bundle message element's key attribute name
private ParamSaxBuffer buffer;
| 0 |
AccumuloInputFormat.setClientInfo(job, getClientInfo());
Properties props = getClientInfo().getProperties(); | 0 |
* @version CVS $Id: FOM_JavaScriptInterpreter.java,v 1.27 2004/04/25 12:12:08 sylvain Exp $
FOM_JavaScriptFlowHelper.setFOM_FlowScope(cocoon.getObjectModel(), thrScope);
FOM_JavaScriptFlowHelper.setFOM_FlowScope(cocoon.getObjectModel(), kScope); | 0 |
import org.apache.accumulo.core.client.admin.DelegationTokenConfig;
import org.apache.accumulo.core.client.security.tokens.DelegationToken;
@Override
public DelegationToken getDelegationToken(DelegationTokenConfig cfg) throws AccumuloException, AccumuloSecurityException {
return null;
}
| 1 |
.getConstructor(clazz, new Class[] { BundleWiringImpl.class, ClassLoader.class, Logger.class });
new Object[] { this, determineParentClassLoader(), m_logger });
public BundleClassLoaderJava5(BundleWiringImpl wiring, ClassLoader parent, Logger logger)
super(wir... | 0 |
import java.util.Locale;
final String value = header.getValue();
throw new ProtocolException("Header '" + name + ": " + value + "' is illegal for HTTP/2 messages");
headers.add(new BasicHeader(name.toLowerCase(Locale.ROOT), value)); | 0 |
* <li>'BODY.PEEK[HEADER.FIELDS (SUBJECT)]'</li>
* <li>'(INTERNALDATE BODY.PEEK[])' - this is the default</li>
* Note that the sequence-set is passed unmodified to the FETCH command.
* The item names are wrapped in parentheses if more than one is provided.
* Otherwise, the parameter is assumed to be wrapped if nece... | 0 |
import org.joda.time.DateTime;
testPipeline.apply(Create.of(BIDS_EVENTS));
auction, 3L, 100L,
new DateTime(432342L + index * config.windowPeriodSec * 1000), "extra_" + auction); | 0 |
import java.io.DataOutputStream;
import java.io.IOException;
import org.apache.bcel.classfile.Constant;
import org.apache.bcel.classfile.ConstantClass;
import org.apache.bcel.classfile.ConstantPool;
* @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A> | 0 |
protected XMLSignatureInput enginePerformTransform
(XMLSignatureInput input, Transform _transformObject)
return enginePerformTransform(input, null, _transformObject);
| 0 |
protected static final String START_COMMAND_NAME = "START";
/**
* Determine whether or not the action should trigger a topology refresh.
*
* @param actionName the action name (i.e. START, RESTART)
* @param clusterName the cluster name
* @param serviceName the service name
*
* @return true i... | 0 |
import org.apache.batik.css.HiddenChildElementSupport;
import org.w3c.dom.svg.SVGSVGElement;
/**
* Returns the viewport to use to compute the percentages and the units.
*/
public SVGSVGElement getViewport() {
return (SVGSVGElement)
HiddenChildElementSupport.getParentElement(eleme... | 0 |
* @param precision Precision [ seconds, minutes, hours ]
Long endTime, Precision precision, Integer limit, boolean groupedByHosts)
Long endTime, Precision precision, Integer limit) | 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.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList; | 0 |
import org.apache.commons.lang3.mutable.MutableLong; | 0 |
import org.apache.beam.sdk.annotations.Internal;
* <b><i>For internal use only; no backwards-compatibility guarantees.</i></b>
@Internal | 0 |
if (entry.getValue() != null) {
Map<String, Object> mapProperties = propertySet.getProperties();
String property = schema.getKeyPropertyId(entry.getKey());
if (!mapProperties.containsKey(property)) {
mapProperties.put(property, entry.getValue());
} | 0 |
// isn't actually used anywhere, so it really doesn't matter. We can't include the kerberos | 0 |
package org.apache.commons.jexl2; | 0 |
return createFileEntryParser(key, null);
}
// Common method to process both key and config parameters.
private FTPFileEntryParser createFileEntryParser(String key, FTPClientConfig config) {
parser = createNTFTPEntryParser(config);
parser = createOS400FTPEntryParser(co... | 0 |
this.status = IOReactorStatus.SHUT_DOWN;
hardShutdown();
try {
Set<SelectionKey> keys = this.selector.keys();
for (Iterator<SelectionKey> it = keys.iterator(); it.hasNext(); ) {
IOSession session = getSession(key);
if (!session.... | 0 |
Tag newTag = dynaLib.createTag( tag.getLocalName(), getSaxAttributes() ); | 0 |
Iterable<KeyPair> keys = provider.loadKeys(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 to You under the Apache License, Version 2.0
* (the "License"); you may not... | 0 |
import org.apache.atlas.v1.model.instance.Referenceable;
import org.apache.atlas.v1.model.instance.Struct;
import org.apache.atlas.type.AtlasClassificationType;
import org.apache.atlas.type.AtlasTypeRegistry;
AtlasTypeRegistry typeSystem = mock(AtlasTypeRegistry.class);
Struct myTrait = new Struct(trait... | 1 |
import org.apache.http.params.BasicHttpParams;
HttpParams params = new BasicHttpParams(); | 0 |
import java.util.concurrent.atomic.AtomicInteger;
final AtomicInteger rc = new AtomicInteger();
rc.set(code);
Code code = Code.get(rc.get()); | 0 |
import org.apache.http.annotation.Immutable;
import org.apache.http.conn.util.InetAddressUtils;
| 0 |
protected AffineTransform usr2dev = new AffineTransform();
FontRenderContext fontRenderContext =
new FontRenderContext(new AffineTransform(), true, true);
GraphicsNodeRableFactory gnrFactory =
new ConcreteGraphicsNodeRableFactory();
new GraphicsNodeRenderContext(... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/iterators/TestFilterListIterator.java,v 1.5 2003/08/31 14:31:12 scolebourne Exp $
* $Revision: 1.5 $
* $Date: 2003/08/31 14:31:12 $
* @version $Revision: 1.5 $ $Date: 2003/08/31... | 0 |
import java.util.List;
/**
* Override preParse() phase as it is not needed.
*/
// TODO can be removed if NET-381 is implemented
@Override
public List<String> preParse(List<String> orig) {
return orig;
}
// Sample missing permission
// drwx------ 2 mirror mirror 4096 Mar ... | 0 |
import org.junit.Assert;
| 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 not... | 0 |
* http://www.apache.org/licenses/LICENSE-2.0 | 0 |
import java.util.Map;
RepositoryImpl repo = repoAdmin.addRepository(url, 1);
BundleContext bundleContext = EasyMock.createMock(BundleContext.class);
Bundle systemBundle = EasyMock.createMock(Bundle.class);
public boolean matches(Map<String, ?> map) {
return true;
... | 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... | 1 |
if (!(widget instanceof Field)) { | 0 |
package org.apache.beam.sdk.extensions.sql.impl.rel;
import org.apache.beam.sdk.extensions.sql.impl.interpreter.BeamSqlExpressionExecutor;
import org.apache.beam.sdk.extensions.sql.impl.interpreter.BeamSqlFnExecutor;
import org.apache.beam.sdk.extensions.sql.impl.transform.BeamSqlProjectFn;
import org.apache.beam.sdk.e... | 0 |
/*
* $Id$
* 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... | 0 |
private Map<String, String> schemaFieldNameMap = new HashMap<>();
private Map<String, String> schemaFieldTypeMap = new HashMap<>();
public void populateSchemaFields(final CloudSolrClient solrClient, final SolrPropsConfig solrPropsConfig) {
boolean _result = _populateSchemaFields(solrClient, solrPro... | 0 |
import org.apache.http.annotation.Immutable;
@Immutable | 0 |
* @return The unicode value of the substutute char, or -1 if no substitute | 0 |
GET_INPUT_STREAM_METHOD =
NetUtils.class.getMethod("getInputStream", Socket.class, Long.TYPE);
OutputStream output =
new BufferedOutputStream(NetUtils.getOutputStream(socket, timeoutMillis), 1024 * 10); | 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 |
// add a constraint that references a non-existent class | 0 |
* @version CVS $Id: JSCocoon.java,v 1.10 2003/05/07 04:36:33 coliver Exp $
* Load the script file specified as argument.
environment.redirect(false, uri); | 0 |
* Copyright 2001-2005 The Apache Software Foundation. | 0 |
import org.apache.cocoon.components.source.util.SourceUtil; | 0 |
@Test
public void testVersionDefinitionStackRepoUpdateLinkExists(){
// Get the base sqoop service
StackInfo stack = stackManager.getStack("HDP", "2.1.1");
String latestUri = stack.getRepositoryXml().getLatestURI();
assertTrue(latestUri != null);
stack = stackManager.getStack("HDP", "2.0.8");
... | 0 |
StateSpecs.combining( | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.