Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
doc.setDocumentURI("http://example.com/blah"); return "http://example.com/blah".equals(doc.getBaseURI()) && "http://example.org/base".equals(e.getBaseURI()) && "http://example.org/somewhere".equals(e2.getBaseURI());
0
@XmlElementWrapper(name="requiredServices") @XmlElement(name="service") private List<String> requiredServices; public List<String> getRequiredServices() { return requiredServices; } public void setRequiredServices(List<String> requiredServices) { this.requiredServices = requiredServices; }
0
* <p> * <h3>Usage Examples</h3> * <blockquote> * * <pre> * &#64;Component * class X implements Z { * &#64;Start * void start() { * // Our Z Service is about to be registered into the OSGi registry. * } * * &#64;Registered * void registered(ServiceRegistration sr) { * ...
0
import org.apache.ambari.server.state.State; public State getState(); public void setState(State state);
0
import org.apache.htrace.Span;
0
private ServiceReference m_reference; // We can't use the generic version, as KF does not support it yet. m_reference = m_context.getServiceReference(m_clazz.getName()); m_service = (T) m_context.getService(m_reference);
0
enum TestResult {OK, NOK}
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
* http://www.apache.org/licenses/LICENSE-2.0
0
/** * This exception {@code serialVersionUID}. */ private static final long serialVersionUID = -7098538588704965017L;
0
throw new DeploymentException(CODE_OTHER_ERROR, "Expected more resources in the stream: " + expectedResources.keySet()); throw new DeploymentException(CODE_OTHER_ERROR, "Resource '" + name + "' is not described in the manifest."); throw new DeploymentException...
0
Proxies.enhanceEntity((HttpEntityEnclosingRequest) request);
0
"NameNode GC count", "NameNode GC time", "NameNode Host Load"));
0
* @return The Accumulo instance. * @return The Accumulo instance.
0
* Copyright 2000-2009 The Apache Software Foundation
0
Map<String, Object> keyProperties = new HashMap<String, Object>(); // find entity to remove String artifactName = String.valueOf(resource.getPropertyValue(ARTIFACT_NAME_PROPERTY)); TreeMap<String, String> artifactForeignKeys = createForeignKeyMap(keyProperties); ArtifactEntity en...
0
* to {@code sizeInternal()}. */ @Override public final int size() { beginRead(false); try { return sizeInternal(); } finally { endRead(); } } protected int sizeInternal() { // TODO implementation ...
0
import org.apache.accumulo.core.client.AccumuloClient; protected AccumuloClient getClient() throws AccumuloException, AccumuloSecurityException { return getCluster().getAccumuloClient("root", new PasswordToken(ROOT_PASSWORD)); return AccumuloClient.builder()
0
import java.net.Socket; import java.lang.reflect.Method; import java.lang.reflect.InvocationTargetException; if (!isConnected() || !socketIsConnected(_socket_)) /** * Checks if the socket is connected using reflection to be backward compatible. * The return value of this method is only meanin...
0
import com.google.common.collect.ImmutableSet; * @param instancesIds Set of instance IDs to be added to the job. * @param config {@link ITaskConfig} to use with new instances. void addInstances(IJobKey jobKey, ImmutableSet<Integer> instancesIds, ITaskConfig config)
0
Properties props = options.getClientProperties(); String password = options.getPassword(); if (password == null && props.containsKey(ClientProperty.AUTH_TOKEN.getKey()) && user.equals(ClientProperty.AUTH_PRINCIPAL.getValue(props))) { token = ClientProperty.getAuthenticationToken(props); if...
0
* http://www.apache.org/licenses/LICENSE-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 may not...
0
import java.util.Collections; addPropertyToModel(key, getListDelimiterHandler().parse(obj)); /** * {@inheritDoc} This method is not called in the normal way (via * {@code addProperty()} for hierarchical configurations because all values * to be added for the property have to be passed to the ...
0
* update the count/count of bytes of this stat datanode * @param bytesDiff * the diff to be added to number of bytes * @param countDiff public void updateCountBytes(String lastPrefix, long bytesDiff, int countDiff) { updatedStat.setCount(updatedStat.getCount() + countDiff...
0
import org.apache.cocoon.portal.profile.ProfileKey; protected ProfileKey buildKey(String copletId) ProfileKey key = new ProfileKey(); key.setPortalName(this.portalService.getPortalName()); key.setUserName(this.portalService.getUserService().getUser().getUserName()); key.setProfileCat...
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 not...
0
import org.apache.accumulo.core.sample.impl.SamplerConfigurationImpl; public interface FileSKVIterator extends InterruptibleIterator, AutoCloseable { FileSKVIterator getSample(SamplerConfigurationImpl sampleConfig);
1
* Reads replication records from the replication table and creates work records which include * target replication system information. final Map<String,String> props = tableConf .getAllPropertiesWithPrefix(Property.TABLE_REPLICATION_TARGET); protected void addWorkRecord(Text file, Value v, Map<String,St...
0
public static <T> Factory<T> instantiateFactory(Class<T> classToInstantiate, Class<?>[] paramTypes, Object[] args) {
0
return new OgnlInvokePermission( "invoke." + key.method.getDeclaringClass().getName() + "." + key.method.getName() );
0
throw new RepositoryException(String.format("Invalid Object Graph: " + "Encountered an unassignedId %s that is not associated with an Instance", oldId)); List<ITypedReferenceableInstance> newInstances = new ArrayList<ITypedReferenceableInstance>(); for (IR...
0
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; import java.io.IOException; import java.io.Serializable; import java.util.HashSet; import java.util.Li...
0
*/ public class ARRAYLENGTH extends Instruction implements ExceptionThrower, StackProducer { /** Get length of array */ public ARRAYLENGTH() { super(org.apache.bcel.Constants.ARRAYLENGTH, (short) 1); } /** @return exceptions this instruction may cause */ public Class[] getExcept...
0
public void testCustomMetricsWidgetsFiles() throws Exception { String serviceInfoXml = "<metainfo>\n" + " <schemaVersion>2.0</schemaVersion>\n" + " <services>\n" + " <service>\n" + " <name>CUSTOM</name>\n" + " <displayName>CUSTOM</display...
0
static DateTime str2Date(String dateStr) { DateTimeFormatter format = DateTimeFormat.forPattern("yyyy-MM-dd").withZoneUTC(); return format.parseDateTime(dateStr); }
0
private Map<String, Object> store = new LinkedHashMap<String, Object>(); @Override // safe to case because we have created the lists ourselves @SuppressWarnings("unchecked") List<Object> valueList = (List<Object>) previousValue; valueList.add(value); L...
0
final LazyDynaBean[] array = list.toArray(new LazyDynaBean[0]);
0
/* * $Header: /cvshome/build/ee.foundation/src/java/text/ChoiceFormat.java,v 1.6 2006/03/14 01:20:30 hargrave Exp $ * * (C) Copyright 2001 Sun Microsystems, Inc. * Copyright (c) OSGi Alliance (2001, 2005). All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use ...
0
private final int signature_index;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/Attic/TestAll.java,v 1.18 2003/04/16 18:32:40 rwaldhoff Exp $ * @version $Revision: 1.18 $ $Date: 2003/04/16 18:32:40 $ suite.addTest(TestAbstractCharCollection...
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.commons.digester3.annotations.handlers; import org.apache.commons.digester3.annotations.DigesterLoaderHandler; import org.apache.commons.digester3.annotations.FromAnnotationsRuleSet; import org.apache.commons.digester3.annotations.providers.SetPropertiesRuleProvider; import org.apache.commons.digeste...
1
import com.google.inject.PrivateModule; } /** * Binding module that installs the map-based task store implementation. */ public static class TaskStoreModule extends PrivateModule { private final KeyFactory keyFactory; public TaskStoreModule(KeyFactory keyFactory) { this.keyFactory = requireN...
0
XMLUtils.createDocumentBuilder(false).parse(new FileInputStream(signatureFile));
0
package org.apache.commons.collections4.sequence; import org.apache.commons.collections4.sequence.CommandVisitor; import org.apache.commons.collections4.sequence.SequencesComparator;
0
import org.apache.hc.core5.annotation.Immutable; import org.apache.hc.core5.util.Args;
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
/* * 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
package aQute.libg.cryptography; import java.io.*; import java.security.*; public class Verifier extends OutputStream { final Signature signature; final Digest d; Verifier(Signature s, Digest d) { this.signature = s; this.d = d; } @Override public void write( byte[] buffer, int offset, int length) thro...
0
import com.google.common.base.Optional; import org.apache.ambari.view.commons.hdfs.ViewPropertyHelper; public static final String VIEW_CONF_KEYVALUES = "view.conf.keyvalues"; Optional<Map<String, String>> props = ViewPropertyHelper.getViewConfigs(context, VIEW_CONF_KEYVALUES); HdfsApi api; if...
0
static void checkForErrors(Response response, int backendVersion) throws IOException { JsonNode searchResult = parseResponse(response); boolean errors = searchResult.path("errors").asBoolean(); if (errors) { StringBuilder errorMessages = new StringBuilder( "Error writing to E...
0
import org.apache.sshd.client.session.ClientSession; /** * @return The underlying {@link ClientSession} used */ ClientSession getClientSession();
0
* @since 1.8.0
0
package org.apache.beam.sdk.extensions.euphoria.core.time; import org.apache.beam.sdk.extensions.euphoria.core.annotation.audience.Audience;
0
if (this.launcher == null) { return this.launcher.exec(command, env, dir);
0
props.put("fs", fs.getInt()); props.put("fs2", fs2.getInt());
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
* @version $Id$
0
package org.apache.beam.sdk.extensions.sql.impl.interpreter.operator;
0
TYPE extends Dataset<Pair<CompositeKey<GROUP_KEY, KEY>, OUT>>> extends StateAwareWindowWiseSingleInputOperator<Pair<GROUP_KEY, IN>, IN, Pair<GROUP_KEY, IN>, CompositeKey<GROUP_KEY, KEY>, Pair<CompositeKey<GROUP_KEY, KEY>, OUT>, W, TYPE, VALUE, OUT, W, Dataset<Pair<CompositeKey<GROUP_KEY,...
0
Class currentClazz = instance.getClass(); boolean done = false; while (!done && currentClazz != null) { done = invokeMethod(instance, currentClazz, methodName, new Class[][] {{ServiceReference.class, Object.class}, {ServiceReference.class}, {Object.class}, {m_trackedS...
0
Collections.unmodifiableList( Arrays.<NamedFactory<Channel>>asList( ChannelSessionFactory.INSTANCE, DirectTcpipFactory.INSTANCE )); Collections.unmodifiableList( Arrays.<RequestHandler<ConnectionService>>asList( KeepAliv...
0
clipPathAttrBuf.append(clipDef.getAttributeNS(null, ATTR_ID)); Element clipDef = domFactory.createElementNS(SVG_NAMESPACE_URI, SVG_CLIP_PATH_TAG); clipDef.setAttributeNS(null, SVG_CLIP_PATH_UNITS_ATTRIBUTE, SVG_USER_SPACE_ON_USE_VALUE); clipDef.setAttributeNS(null, ATTR_ID, SVGID...
0
public abstract class ParDoFnBase implements ParDoFn {
0
* <p>To execute this pipeline locally, specify the BigQuery table for the output: * <p>To change the runner, specify: * --runner=YOUR_SELECTED_RUNNER * See examples/java/README.md for instructions about how to configure different runners.
0
continue;
0
static ServiceReference<HealthCheck>[] callSelectHealthCheckReferences(HealthCheckExecutor executor, HealthCheckSelector selector) { Method method = executor.getClass().getDeclaredMethod(methodName, HealthCheckSelector.class, HealthCheckExecutionOptions.class); Object result = method.invoke(...
0
* @version CVS $Id: SimpleProfileManager.java,v 1.12 2003/05/27 07:38:33 cziegeler Exp $ layout = (Layout)service.getAttribute(portalPrefix+"/Layout"); if (layout != null) { this.cacheLayouts(layoutMap, layout); adapter.saveProfile(ke...
0
* @author Apache Software Foundation
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 org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger log = LoggerFactory.getLogger(ListInstances.class); log.error(e.getMessage(), e);
0
import org.apache.beam.sdk.transforms.splittabledofn.Backlog; String element, OffsetRange range, Backlog backlog, OutputReceiver<OffsetRange> receiver) { String value, OffsetRange range, Backlog backlog, OutputReceiver<OffsetRange> receiver) {
0
public boolean isDeletedEntity(String entityGuid) { return deletedEntityIds.contains(entityGuid); }
0
import net.jcip.annotations.GuardedBy; import net.jcip.annotations.ThreadSafe; @ThreadSafe @GuardedBy("this")
0
public static final String CODEC_CLASSES_PROPERTY_NAME = "io.compression.codecs"; if (!gplEnabled && configType.equals("core-site") && (propertyName.equals(LZO_CODEC_CLASS_PROPERTY_NAME) || propertyName.equals(CODEC_CLASSES_PROPERTY_NAME))
0
import org.apache.sshd.common.FactoryManagerUtils; return FactoryManagerUtils.getIntProperty(factoryManager, name, defaultValue); if (log.isDebugEnabled()) { log.debug("getIntProperty(" + name + ") failed (" + e.getClass().getSimpleName() + ") to retrieve: " + e.getMessage()); ...
0
public Coder<ObjectId> getOutputCoder() {
0
import org.apache.ambari.logsearch.util.SolrUtil; import org.apache.commons.lang.StringUtils; import org.springframework.data.solr.core.query.SimpleFacetQuery; import static org.apache.ambari.logsearch.solr.SolrConstants.ServiceLogConstants.BUNDLE_ID; import static org.apache.ambari.logsearch.solr.SolrConstants.Service...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/test/org/apache/commons/jelly/core/TestArgTag.java,v 1.4 2003/01/24 19:03:25 morgand Exp $ * $Revision: 1.4 $ * $Date: 2003/01/24 19:03:25 $ * $Id: TestArgTag.java,v 1.4 2003/01/24 19:03:25 morgand Exp $ import org.apac...
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 ...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/test/org/apache/commons/validator/ValidatorTest.java,v 1.4 2002/03/30 04:33:18 dwinterfeldt Exp $ * $Revision: 1.4 $ * $Date: 2002/03/30 04:33:18 $ * * ==============================================================...
0
assertEquals(ThriftServerType.THREADED_SELECTOR,
0
audit.log(Level.INFO, getDefaultPrompt() + input);
0
import org.apache.accumulo.core.client.AccumuloException; import org.apache.accumulo.core.client.AccumuloSecurityException; InputFormatOptions<T> table(String tableName); void store(T t) throws AccumuloException, AccumuloSecurityException; * Sets the {@link Authorizations} used to scan. Must be a subset of...
0
import org.apache.accumulo.core.client.impl.Table; private Table.ID sourceTableId; public ReplicationTarget(String peerName, String remoteIdentifier, Table.ID sourceTableId) { public Table.ID getSourceTableId() { public void setSourceTableId(Table.ID sourceTableId) { WritableUtils.writeString(out, sourceT...
1
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/Attic/AbstractTestSortedBag.java,v 1.1 2003/10/02 22:35:31 scolebourne Exp $ * Copyright (c) 2001-2003 The Apache Software Foundation. All rights * Abstract test class for {@lin...
0
return new H2ConsoleModule(true);
0
Object decode(Decoder dec, @SuppressWarnings("unused") String s) throws Exception { Object decode(Decoder dec, @SuppressWarnings("unused") Number s) throws Exception { Object decode(Decoder dec, @SuppressWarnings("unused") boolean s) { Object decode(Decoder dec) {
0
public static final String SPLITTABLE_SPLIT_AND_SIZE_RESTRICTIONS_URN = getUrn(SplittableParDoComponents.SPLIT_AND_SIZE_RESTRICTIONS); public static final String SPLITTABLE_PROCESS_SIZED_ELEMENTS_AND_RESTRICTIONS_URN = getUrn(SplittableParDoComponents.PROCESS_SIZED_ELEMENTS_AND_RESTRICTIONS);
0
import org.apache.hc.core5.http2.impl.H2Processors; public class H2TestServer extends AsyncServer { public H2TestServer(final IOReactorConfig ioReactorConfig, final SSLContext sslContext) throws IOException { public H2TestServer() throws IOException { start(new InternalServerH2EventHandlerFactory( ...
0
* @throws IOException || response.getStatusLine().getStatusCode() != HttpStatus.SC_PARTIAL_CONTENT) HttpRequest originalRequest = requestWasWrapped(request) ?
0
package org.apache.batik.bridge; import org.apache.batik.bridge.resources.Messages;
0
import static org.apache.beam.runners.core.construction.PTransformTranslation.COMBINE_PER_KEY_TRANSFORM_URN; return COMBINE_PER_KEY_TRANSFORM_URN; .setUrn(COMBINE_PER_KEY_TRANSFORM_URN)
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
/* * @Mojo( name = "clean", requiresProject = false, defaultPhase = LifecyclePhase.CLEAN ) * * * *
0
static Class<?>[] PRIMS = { static void setUpKey(String name, Class<?>[] parms) { Class<?>[] arg0 = {PRIMS[p0]}; Class<?>[] arg1 = {PRIMS[p0], PRIMS[p1]}; Class<?>[] arg2 = {PRIMS[p0], PRIMS[p1], PRIMS[p2]}; String makeStringKey(String method, Clas...
0
final long len,
0
public class MultiOperationRecordTest extends ZKTestCase { MultiOperationRecord request = new MultiOperationRecord(); MultiOperationRecord decodedRequest = codeDecode(request); MultiOperationRecord request = new MultiOperationRecord(); MultiOperationRecord decodedRequest = codeDecode(req...
0