Diff stringlengths 5 2k | FaultInducingLabel int64 0 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 |
import com.google.gson.Gson;
| 0 |
if (!dbAccessor.tableExists(CLUSTER_VERSION_TABLE)) {
return null;
} | 0 |
import org.apache.felix.sigil.common.config.IBldProject;
import org.apache.felix.sigil.common.core.BldCore;
import org.apache.felix.sigil.common.model.ICapabilityModelElement;
import org.apache.felix.sigil.common.model.ModelElementFactory;
import org.apache.felix.sigil.common.model.eclipse.ISigilBundle;
import org.apac... | 0 |
* @since 4.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 java.util.concurrent.TimeUnit;
import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
sleepUninterruptibly(3, TimeUnit.SECONDS); | 1 |
* @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $
/**
* Gets the predicates, do not modify the array.
* @return the predicates
* @since Commons Collections 3.1
*/
public Predicate[] getPredicates() {
return iPredicates;
}
/**
* Gets the closures, do not modify ... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/DynaProperty.java,v 1.3 2002/03/24 09:15:03 dion Exp $
* $Revision: 1.3 $
* $Date: 2002/03/24 09:15:03 $
* @version $Revision: 1.3 $ $Date: 2002/03/24 09:15:03 $
* Does this pr... | 0 |
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
| 0 |
/*****************************************************************************
* Copyright (C) The Apache Software Foundation. All rights reserved. *
* ------------------------------------------------------------------------- *
* This software is published under the terms of the Apache Software License *
* v... | 0 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Iterables;
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Lists; | 0 |
new HttpHost("www.yahoo.com"),
null);
new HttpHost("www.google.ch"),
null);
new HttpHost("www.apache.org"),
null); | 0 |
protected EventDispatcher eventDispatcher;
eventDispatcher =
new ConcreteEventDispatcher(
canvas.getRendererFactory().getRenderContext());
| 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 (C) The Apache Software Foundation. All rights reserved. *
* ------------------------------------------------------------------------- *
* This software is published under the terms of the Apache Software License *
* v... | 0 |
* http://www.apache.org/licenses/LICENSE-2.0 | 0 |
* N.B. implementations must be thread safe. | 0 |
* @see org.apache.cocoon.environment.Request#getLocalAttribute(java.lang.String)
public Object getLocalAttribute(String name) {
return this.delegate.getLocalAttribute(name);
* @see org.apache.cocoon.environment.Request#getLocalAttributeNames()
public Enumeration getLocalAtt... | 0 |
try {
testDownload(TFTP.ASCII_MODE, files[i]);
} catch (IOException e) {
fail("Entry "+i+" Error "+e.toString());
}
| 0 |
import java.net.UnknownHostException;
public static MasterClientService.Iface getConnectionWithRetry(Instance instance) {
if (tte.getCause().getClass().equals(UnknownHostException.class)) {
// do not expect to recover from this
throw new RuntimeException(tte);
} | 0 |
return SVGValueConstants.CSS_STROKE_WIDTH_PROPERTY;
return new CSSOMReadOnlyValue(SVGValueConstants.NUMBER_1); | 0 |
s4.setLearnerType(LearnerType.OBSERVER);
s5.setLearnerType(LearnerType.OBSERVER);
LOG.info("QuorumPeer 1 voting view: " + s1.getVotingView());
LOG.info("QuorumPeer 2 voting view: " + s2.getVotingView());
LOG.info("QuorumPeer 3 voting view: " + s3.getVotingView());
... | 0 |
import org.apache.felix.hc.api.execution.HealthCheckMetadata; | 0 |
void bind(X x, Map<String, Object> props) { | 0 |
serve("/assets", "/assets/*")
serve("/apiclient", "/apiclient/*") | 0 |
this.cache = new Hashtable<>();
* managers. The dictionaries returned are guaranteed to contain the
final List<Dictionary> configs = new ArrayList<>(); | 0 |
private static final List<ECCurveDefinition> ecCurveDefinitions = new ArrayList<>(); | 0 |
this.pkPropertyIds = new HashSet<>(getKeyPropertyIds().values());
Set<ViewInstanceEntity> instanceDefinitions = new HashSet<>();
Set<Resource> results = new HashSet<>();
Set<String> propertyIds = new HashSet<>(getDescriptorMap(clazz).keySet());
Map<String, PropertyDescriptor> descriptorMap = new ... | 0 |
.path("api/metadata/types/submit");
createType(json); | 0 |
package org.apache.beam.sdk.options;
import org.apache.beam.sdk.testing.ResetDateTimeProvider;
import org.apache.beam.sdk.testing.RestoreSystemProperties; | 0 |
* protected methods from AbstractCollectionTest. | 0 |
+ ":" + (PortAssignment.unique()) + ";" + CLIENT_PORT_QP1 + "\n"; | 0 |
* Copyright 1999-2002,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 ... | 1 |
* @author Rey Francois
* @author Gregor Rayman | 0 |
params.put(KeyNames.REPO_VERSION_ID, repoVersion.getId().toString()); | 0 |
* @param <R> The Rule type created by the provider. | 0 |
import org.apache.cocoon.portal.om.Item;
import org.apache.cocoon.portal.om.Layout;
import org.apache.cocoon.portal.om.NamedItem; | 0 |
public BundleContext getBundleContext()
{
return m_context;
} | 0 |
ConfigurationAdmin m_cm;
void bind(ConfigurationAdmin cm) {
m_cm = cm;
} | 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 |
* is determined by the value of the {@code Content-Length header}. | 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 static junit.framework.Assert.assertEquals;
import org.junit.Test;
@Test | 0 |
import com.google.common.collect.Sets;
@Test
public void druidProperties() throws Exception {
Map<String, Map<String, String>> properties = new HashMap<>();
Map<String, String> druidCommon = new HashMap<>();
String connectUriKey = "druid.metadata.storage.connector.connectURI";
String metastoreHostna... | 0 |
package org.w3c.dom.svg;
import org.w3c.dom.DOMException;
public interface SVGTextRotate {
// rotate types
public static final short ROTATE_UNKNOWN = 0;
public static final short ROTATE_AUTO = 1;
public static final short ROTATE_ANGLES = 2;
public short getRotateValueType( );
public void setRota... | 1 |
import org.apache.beam.runners.direct.DirectRunner.CommittedBundle; | 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 static org.easymock.EasyMock.anyObject;
import static org.easymock.EasyMock.createMock;
import static org.easymock.EasyMock.endsWith;
import static org.easymock.EasyMock.eq;
import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.expectLastCall;
import static org.easymock.EasyMock.replay;... | 0 |
import org.junit.Before;
@Before | 0 |
import java.net.URL;
import org.apache.avalon.framework.component.WrapperComponentManager;
import org.apache.cocoon.components.ContextHelper;
import org.apache.cocoon.environment.Redirector;
* @version CVS $Id: FOM_Cocoon.java,v 1.30 2004/02/20 18:48:23 sylvain Exp $
Redirector redirector;
... | 0 |
else if ( componentMetadata.getDSVersion().isDS11() && m_type.equals( "Char" ) )
else if ( !componentMetadata.getDSVersion().isDS11() && m_type.equals( "Character" ) ) | 0 |
import org.mozilla.javascript.Scriptable;
* Provides the interface between the JavaScript flow controller layer and the
*
* @version CVS $Id: FOM_JavaScriptFlowHelper.java,v 1.3 2004/01/21 14:38:30 vgritsenko Exp $
public static final String FOM_REQUEST =
public static final String FOM_RESPONSE =
publi... | 0 |
import org.apache.atlas.entitytransform.TransformerContext;
@VisibleForTesting
void setEntityTransformerHandlers(ZipSource source, String transformersJson) throws AtlasBaseException {
if (StringUtils.isEmpty(transformersJson)) {
TransformerContext context = new TransformerContext(typeRegistry, t... | 0 |
case MAP:
case ARRAY:
} else if (elementType instanceof AtlasArrayType) {
return vertex.getProperty(vertexPropertyName, List.class);
} else if (elementType instanceof AtlasMapType) {
return vertex.getProperty(vertexPropertyName, Map.class); | 0 |
* A {@code SetCoder<T>} encodes any {@code Set<T>}
* as an encoding of an iterable of its elements. The elements
* may not be in a deterministic order, depending on the
* {@code Set} implementation. | 0 |
+ " Examine the log files to identify them.%n");
// TODO Throw exception or return?
// TODO Throw exception or return?
// TODO Throw exception or return? | 0 |
clearReferences(child); | 0 |
implements TransformTranslator<ReadWithIds<?>> {
TranslationContext context) { | 0 |
private final String m_attributeName;
m_attributeName = null;
m_attributeName = null;
}
public AspectImpl(Class serviceInterface, String serviceFilter, int ranking, Object factory, String factoryCreateMethod, String attributeName, Dictionary properties) {
m_serviceInterface = se... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/ConvertUtils.java,v 1.4 2002/01/21 00:44:39 craigmcc Exp $
* $Revision: 1.4 $
* $Date: 2002/01/21 00:44:39 $
* Copyright (c) 1999-2002 The Apache Software Foundation. All rights
*... | 0 |
this.httpCacheInvalidator != null ? this.httpCacheInvalidator : new DefaultCacheInvalidator(uriExtractor, storageCopy)); | 0 |
timelineMetric.getUnits(),
timelineMetric.getType(), | 0 |
* @since 4.0 | 0 |
package org.apache.hc.client5.testing.sync; | 0 |
if (compactionId.getSecond().getIterators().isEmpty()) {
log.debug("No-op major compaction by USER on 0 input files because no iterators present.");
lastCompactID = compactionId.getFirst();
updateCompactionID = true;
} else {
log.debug("Major compactio... | 0 |
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Lists; | 0 |
import org.apache.cocoon.components.source.SourceUtil;
import org.apache.commons.jelly.Script;
import org.apache.commons.jelly.impl.XMLParser;
* @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
public class JellyGenerator
extends AbstractGenerator {
/** The Jelly Parser */
protected XMLP... | 0 |
@Override
public Set<String> listBackups() {
@Override
public void stage(String backupName) throws RecoveryException {
@Override
public Set<IScheduledTask> query(Query.Builder query) throws RecoveryException {
@Override
public void deleteTasks(Query.Builder query) throws RecoveryExceptio... | 0 |
errorMessage.append(" Config:").append(configType).append(" Property:").append(propertyName).append("\n"); | 0 |
package org.apache.zookeeper.server.util; | 0 |
import javax.management.JMException;
import org.apache.zookeeper.jmx.ManagedUtil;
ManagedUtil.registerLog4jMBeans();
} catch (JMException e) {
LOG.warn("Unable to register log4j JMX control", e);
}
try {
public static void runStandalone(ZooKeeperServer.Factory serve... | 0 |
super(manager, context, String.format("(&(objectClass=%s)(|(%s=*)(%s=*)(%s=*)))",
HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_NAME, | 0 |
final AtomicReference<Exception> ref = new AtomicReference<>();
List<Thread> threads = new ArrayList<>(); | 0 |
* @version CVS $Id: PartInMemory.java,v 1.4 2003/11/13 14:56:12 sylvain Exp $
if (this.in != null) {
return this.in;
} else {
throw new IllegalStateException("This part has already been disposed.");
}
}
/**
* Clean the byte array content buffer holding ... | 0 |
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Overrid... | 1 |
* @since 1.8.0 | 0 |
import org.apache.ambari.server.controller.metrics.MetricPropertyProviderFactory;
* Gets the {@link MetricPropertyProviderFactory} that was injected into this
* class. This is a terrible pattern.
*
* @return the injected {@link MetricPropertyProviderFactory}
*/
MetricPropertyProviderFactory getMetricPr... | 0 |
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import org.apache.bcel.Constants; | 0 |
/*
import org.osgi.framework.*;
*
Filter TRUE_FILTER = new Filter()
*
*
*
* A null filter object that does not match any given service reference.
Filter FALSE_FILTER = new Filter()
*
*
*
*
* @return The <tt>Filter</tt> of the filter string or... | 0 |
SQL_SERVER("sqlserver"),
SQL_ANYWHERE("sqlanywhere");
} else if (dbUrl.contains(DatabaseType.SQL_ANYWHERE.getName())) {
databaseType = DatabaseType.SQL_ANYWHERE; | 0 |
case HOST_SVCCOMP_SERVER_ACTION:
return new ServiceComponentHostServerActionEvent(serviceComponentName, hostName, opTimestamp); | 1 |
@SendNotification(after = Event.DriverDisconnected) | 0 |
volatile Runnable m_runnable;
volatile Sequencer m_sequencer;
volatile BundleContext m_bc;
volatile DependencyManager m_dm;
volatile org.apache.felix.dm.Component m_component; | 0 |
if (paths.keySet().remove(file))
// finishes.... therefore split could propagate load flags for a finished bulk load... there is a special iterator | 0 |
Assert.assertTrue("Setting executable permission failed: " + file, file.setExecutable(true, true));
Assert.assertTrue("Setting executable permission failed: " + file, file.setExecutable(true, false));
Assert.assertTrue("Setting executable permission failed: " + file, file.setExecutab... | 0 |
import java.util.Arrays;
import org.apache.accumulo.core.security.thrift.SecurityErrorCode;
if (!acu.users.containsKey(user))
conn.securityOperations().createUser(user, pass, new Authorizations());
else if (!Arrays.equals(acu.users.get(user).password, pass))
throw new AccumuloSecurityException(use... | 0 |
public <R, P> R accept( NodeVisitor<? extends R, ? super P> visitor, P data )
throws OgnlException | 0 |
import org.apache.velocity.runtime.RuntimeConstants;
* @version CVS $Id: FlowVelocityGenerator.java,v 1.3 2003/09/24 22:34:53 cziegeler Exp $
result == Scriptable.NOT_FOUND) {
result == Scriptable.NOT_FOUND) {
result == Scriptable.NOT_FOUND) {
... | 0 |
* @author <a href="mailto:tony@apache.org">Tony Collen</a>, December 2, 2002
* @version CVS $Id: WebServiceProxyGenerator.java,v 1.4 2003/09/25 19:59:24 tony Exp $
URI uri = null;
String host = null; | 0 |
import com.google.common.collect.ImmutableList;
import java.util.HashMap;
import java.util.List;
import java.util.Map; | 0 |
protected long getApparentAgeSecs(final HttpCacheEntry entry) {
protected long getApparentAgeSecs(final HttpCacheEntry entry) {
protected long getCorrectedReceivedAgeSecs(final HttpCacheEntry entry) {
protected long getResponseDelaySecs(final HttpCacheEntry entry) {
... | 0 |
* @version $Id: FileCleaner.java,v 1.2 2004/10/24 04:20:06 martinc Exp $
} catch (Exception e) {
* @param queue The queue on to which the tracker will be pushed.
public Tracker(File file, Object marker, ReferenceQueue queue) {
this(file.getPath(), marker, queue);
... | 1 |
import java.util.concurrent.Callable;
public static final Callable<Integer> callable = new Callable<Integer>() {
public Integer call() {
return 1;
}
};
public static int call() throws Exception {
return callable.call();
}
| 0 |
import java.awt.Color;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.GraphicsConfiguration;
import java.awt.Image;
import java.awt.Shape;
import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage;
import java.awt.image.ImageObser... | 0 |
package org.apache.felix.sigil.model; | 0 |
return String.format("%s:%s", obj.getOwnerName(), obj.getName()) ; | 0 |
import org.apache.hc.core5.util.TimeValue;
public SessionRequest requestSession(final HttpHost host, final TimeValue timeout, final SessionRequestCallback callback) {
Args.notNull(timeout, "Timeout");
sessionRequest.setConnectTimeout(timeout.toMillisIntBound()); | 0 |
// TODO the following setup appears to duplicate that in the super class methods | 0 |
searchControls.setReturningObjFlag(true); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.