Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
* any, must include the following acknowledgement: * Alternately, this acknowledgement may appear in the software itself, * if and wherever such third-party acknowledgements normally appear. * permission of the Apache Software Foundation. * @version $Revision: 1.14 $ $Date: 2003/10/13 08:44:26 $
0
byte[] getBuffer() void setBuffer(byte[] buffer) long getLastModified() void setLastModified(long lastModified) FileType getType() void setType(FileType type) void clear() FileName getName() void addChild(RamFileData data) throws FileSystemException void removeChild(RamFileData data) throws FileSystemExceptio...
0
Copyright 2001,2003 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...
0
package org.apache.felix.scr.impl.logger; import org.apache.felix.scr.impl.MockBundle; import org.apache.felix.scr.impl.MockBundleContext; public class MockBundleLogger extends BundleLogger public MockBundleLogger() { super(new MockBundleContext(new MockBundle()), new MockScrLogger()); return le...
0
final String tablename; final MockAccumulo acu; MockBatchWriter(MockAccumulo acu, String tablename) { this.acu = acu; this.tablename = tablename; } @Override public void addMutation(Mutation m) throws MutationsRejectedException { acu.addMutation(tablename, m); } @Override publi...
1
package org.apache.jute;
0
import org.apache.sshd.util.test.JUnitTestSupport; public class LimitInputStreamTest extends JUnitTestSupport {
0
private AccumuloClient client; public MockWorkMaker(AccumuloClient client) { super(null, client); client = getClient(); ReplicationTable.setOnline(client); client.securityOperations().grantTablePermission(client.whoami(), ReplicationTable.NAME, client.securityOperations().grantTablePermissio...
0
import org.apache.batik.dom.svg.SVGOMUseShadowRoot; if (n instanceof SVGOMUseShadowRoot) { p = ((SVGOMUseShadowRoot) n).getCSSParentNode(); } else { p = n.getParentNode(); }
0
// perform login operations LoginProcessor loginProcessor = new LoginProcessor(); loginProcessor.login();
0
import org.apache.sshd.client.global.OpenSshHostKeysHandler; import org.apache.sshd.common.channel.RequestHandler; import org.apache.sshd.common.session.ConnectionService; public static final List<RequestHandler<ConnectionService>> DEFAULT_GLOBAL_REQUEST_HANDLERS = Collections.unmodifiableList(Arrays.<R...
0
/* * $HeadURL$ * $Revision$ * $Date$ * * ==================================================================== * * Copyright 1999-2006 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...
0
public void testSingle() { assertEquals("validate one", "ABC", (new RegexValidator("^([A-Z]*)$")).validate("ABC")); checkArray("match one", new String[] {"ABC"}, (new RegexValidator("^([A-Z]*)$")).match("ABC")); * Test with multiple regular expressions (case sensitive). public void testMult...
0
import org.w3c.dom.Attr; import org.w3c.dom.Document;
0
import static org.apache.aurora.scheduler.updater.StateEvaluator.Result.EVALUATE_AFTER_MIN_RUNNING_MS; return EVALUATE_AFTER_MIN_RUNNING_MS; return EVALUATE_AFTER_MIN_RUNNING_MS;
0
import org.apache.beam.sdk.util.common.ElementByteSizeObserver; import org.joda.time.Duration; import org.joda.time.ReadableDuration;
0
when(delegate.expand(collection)).thenReturn(output); PCollection<String> result = forwarding.expand(collection);
0
* Sets the factory to use when creating the implementation. You can specify both the factory class and method to invoke. The method should return the implementation, * all of them will be searched when injecting any of the dependencies. * <p>The dependency manager will look for a method of this name wit...
0
Mockito.when(entity.isStreaming()).thenReturn(Boolean.FALSE); Mockito.when(entity.isStreaming()).thenReturn(Boolean.TRUE); Mockito.when(entity.isStreaming()).thenReturn(Boolean.FALSE); Mockito.when(entity.isStreaming()).thenReturn(Boolean.TRUE);
0
import org.apache.accumulo.core.client.impl.AuthenticationTokenIdentifier;
1
if (currentParameters.isInheritSettings()) { params.inheritFrom(getParameters()); }
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
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
if (authConfig.isAuthFileEnabled()) {
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
// "merlinsSixteenRecreated.xml" signature.setFollowNestedManifests(false);
0
NexmarkUtils.<Event>diskBusy(configuration.diskBusyBytes));
0
// Implementstion methods
0
import java.util.concurrent.TimeUnit; startHeartBeat(); protected void startHeartBeat() { String intervalStr = getClientFactoryManager().getProperties().get(ClientFactoryManager.HEARTBEAT_INTERVAL); try { int interval = intervalStr != null ? Integer.parse...
0
@Test public void basicGetYARNProtocol() throws Exception { ViewContext viewContext = getViewContext(new HashMap<String, String>()); AmbariApi ambariApi = createNiceMock(AmbariApi.class); Cluster cluster = createNiceMock(Cluster.class); expect(ambariApi.isClusterAssociated()).andReturn(true).anyTim...
0
* Abstract credentials provider that maintains a collection of user * data must be synchronized as methods of this interface may be executed * /** * Sets the {@link Credentials credentials} for the given authentication * * @param credentials the authentication {@link Credentials credentials} ...
0
Map<String, Collection<String>> serviceComponentFilter = getServiceComponentFilter(); if (serviceComponentFilter != null && pruneServiceFilter()) { kerberosKeytabController.adjustServiceComponentFilter(clusters.getCluster(getClusterName()), true, serviceComponentFilter); } fina...
0
import java.util.ArrayList; public void testDbcp369() { final ArrayList<SharedPoolDataSource> dataSources = new ArrayList<>(); for (int j = 0; j < 10000; j++) { SharedPoolDataSource dataSource = new SharedPoolDataSource(); dataSources.add(dataSource); } Thre...
0
public byte[] getKeyBytes() { return keyBytes; }
0
package org.apache.beam.sdk.state;
0
public StageBundleFactory forStage(ExecutableStage executableStage) { private static class SimpleStageBundleFactory implements StageBundleFactory { private final BundleProcessor processor; static SimpleStageBundleFactory create( BundleProcessor processor = processBundleDescriptor.get...
0
import org.apache.beam.runners.direct.WatermarkManager.TimerUpdate; public interface TransformResult {
0
if ("shard1".equals(kinesisRecord.getShardId())) {
0
package org.apache.atlas.repository.store.graph.v2; AtlasVertex deletedEntityVertex = AtlasGraphUtilsV2.findByGuid(entityDeleted.getGuid());
1
@Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override ...
0
import org.apache.beam.sdk.schemas.Schema.FieldType; FieldType.INT64, "order_id", FieldType.INT32, "site_id", FieldType.DOUBLE, "price", FieldType.DATETIME, "order_time" FieldType.INT64, "order_id", FieldType.INT32, "site_id", ...
0
Thread.currentThread().interrupt(); throw new InterruptedIOException();
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/ArrayStack.java,v 1.4 2002/02/10 08:07:42 jstrachan Exp $ * $Revision: 1.4 $ * $Date: 2002/02/10 08:07:42 $ * Copyright (c) 1999-2002 The Apache Software Foundation. All rights...
0
* Fields annotated with {@code SetProperty} will be bound with {@code SetPropertiesRule} digester rule. * @Retention( RetentionPolicy.RUNTIME ) @Target( ElementType.FIELD ) @DigesterRule( reflectsRule = SetPropertiesRule.class, providedBy = SetPropertiesRuleProvider.class, handledBy = SetPropertiesLoaderHandler.clas...
1
import org.apache.commons.jelly.impl.BreakException; try { while (test.evaluateAsBoolean(getContext())) { if (log.isDebugEnabled()) { log.debug("evaluated to true! gonna keep on chuggin!"); } invokeBody(outpu...
0
import org.apache.cocoon.components.expression.ExpressionContext; import org.apache.cocoon.template.jxtg.environment.ExecutionContext; import org.apache.cocoon.xml.XMLConsumer; import org.xml.sax.SAXException; public Event execute(final XMLConsumer consumer, ExpressionContext expressionCon...
0
Copyright 1999-2003 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 ...
0
* Provides timing information for online operation.
0
import org.apache.http.conn.util.DomainType; publicSuffixMatcher = new PublicSuffixMatcher(DomainType.ICANN, Arrays.asList("com", "co.jp", "gov.uk"), null);
0
/** A test interface for string with default. */ public interface StringWithDefault extends PipelineOptions { @Default.String("testString") String getString(); void setString(String value); } StringWithDefault proxy = handler.as(StringWithDefault.class); + " long: 57\n" +...
0
@TableGenerator(name = "alert_definition_id_generator", table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "sequence_value", pkColumnValue = "alert_definition_id_seq", initialValue = 0, allocationSize = 1)
0
throw new RuntimeException(e);
0
acquireBundleLock(bundle, Bundle.STARTING | Bundle.ACTIVE);
0
final String propName = getCurrentTestName(); final String rootValue = getClass().getPackage().getName(); assertNull("Unexpected root previous value", PropertyResolverUtils.updateProperty(root, propName, rootValue)); assertSame("Mismatched root value", rootValue, PropertyResolverUtils.ge...
0
* @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
0
import org.apache.sshd.common.util.net.SshdSocketAddress;
0
public static class TransformAttributeFilter implements
0
import org.junit.Rule; @Rule public final TestPipeline p = TestPipeline.create();
0
context.getZooKeeperRoot() + ReplicationConstants.ZOO_WORK_QUEUE, conf, delay, period); context.getZooKeeperRoot() + ReplicationConstants.ZOO_WORK_QUEUE, conf);
0
return HeaderElement.parseElements(this.buffer, this.posValue, this.buffer.length());
0
@ObjectCreate( pattern = "person" ) public class Person { @SetProperty( pattern = "person" ) @SetProperty( pattern = "person" ) @BeanPropertySetter( pattern = "person/name" ) @CallMethod( pattern = "person/email" ) public void addEmail( @AttributeCallParam( pattern = "person/email", attribute = "typ...
1
if (null == iterators) { iterators = getIterators(job); }
0
props.putAll(SharedMiniClusterBase.getCluster().getClientInfo().getProperties());
0
fromCloudDuration(result.getReportStatusInterval()).getMillis(),
0
ScheduleStatus.KILLING);
0
@Override @Override @Override
0
/* * Copyright 2006 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 appl...
0
import com.google.inject.Injector; return getLibraryInstance(releaseVersionClass); /** * Loads an instance of the class from the stack classloader, if available. * * @param className * the name of the class to get an instance * @return * the instance of the class * @thr...
0
private void createRecordsUntilStep(int currStep) throws Exception { public void testFindByStackAndVersion() throws Exception { public void testFindByCluster() throws Exception { public void testFindByClusterAndStackAndVersion() throws Exception { public void testFindByClusterAndStateCurrent() throws Exceptio...
0
public static void main(final String[] args) throws Exception final Properties props = System.getProperties(); final Test tests[] = new Test[] final TestResult result = new TestResult() public void startTest(final Test test) public void endTest(final Test test) ...
1
public void testCreateTimestampedDefaultOutputCoderUsingCoder() throws Exception { Coder<Record> coder = new RecordCoder(); PBegin pBegin = PBegin.in(p); Create.TimestampedValues<Record> values = Create.timestamped( TimestampedValue.of(new Record(), new Instant(0)), Timesta...
0
BlockContext blockContext = (BlockContext) BlockCallStack.getCurrentBlockContext();
0
* Copyright 2001-2004,2006 The Apache Software Foundation ListUtils.retainAll(null, null); ListUtils.removeAll(null, null);
0
import java.util.ArrayList; import java.util.List; import org.apache.ambari.server.metrics.system.MetricsSink; import org.apache.ambari.server.metrics.system.SingleMetric; import com.codahale.metrics.Gauge; import com.codahale.metrics.MetricFilter; import com.codahale.metrics.jvm.FileDescriptorRatioGauge; public void...
0
import org.apache.sshd.common.TcpipForwarderFactory;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/adapters/Attic/NonSerializableIntListList.java,v 1.2 2003/08/31 17:21:17 scolebourne Exp $ * any, must include the following acknowledgement: * Alternately, this...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/adapters/io/Attic/TestReaderCharIterator.java,v 1.2 2003/08/31 17:28:45 scolebourne Exp $ * any, must include the following acknowledgement: * Alternately, this ...
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 java.io.PrintWriter; PrintWriter writer = response.getWriter(); writer.println("Test! " + attr); writer.close(); is.close(); os.close(); is.close(); os.close(); while ((bytesRead = is.read(buffer)) != -1)
0
import java.util.Hashtable; Hashtable<String, Object> props = new Hashtable<String, Object>();
0
/** Left outer join implementation of {@link JoinFn}. */ ProcessContext c, K key, CoGbkResult value,
0
import org.apache.ambari.server.controller.internal.DeleteStatusMetaData; clusters.getCluster(cluster1).setDesiredStackVersion(new StackId("HDP-1.3.1")); String hdfs = "HDFS"; createService(cluster1, hdfs, null); createServiceComponent(cluster1, hdfs, componentName1, State.INIT); createServiceCompon...
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
public class ConfigurationPropertiesFactoryBean implements InitializingBean, FactoryBean<Properties> public ConfigurationPropertiesFactoryBean() public ConfigurationPropertiesFactoryBean(Configuration configuration)
0
/* * Copyright 2016-2018 Seznam.cz, a.s.
0
BitSet bitSet = state.read(); state.access(FINISHED_BITS_TAG).readLater(); state.access(FINISHED_BITS_TAG).readLater(); state.access(FINISHED_BITS_TAG).readLater(); value.readLater(); ValueState<BitSet> finishedSetState = state.access(FINISHED_BITS_TAG); if (!readFinishedBits(finis...
0
import org.apache.aurora.common.zookeeper.JsonCodec; groupMonitor = new CuratorServiceGroupMonitor(groupCache, memberSelector, JsonCodec.INSTANCE); JsonCodec.INSTANCE.serialize(serviceInstance, sink);
0
new DeferredFileOutputStream(testBytes.length - 5, prefix, suffix, tempDir);
0
* Copyright (c) 1999 The Apache Software Foundation. All rights * notice, this list of conditions and the following disclaimer. * if any, must include the following acknowledgment: * software without prior written permission. For written * The development of this software was partly funded by the Europea...
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 javax.servlet.ServletContext; import javax.servlet.ServletContextAttributeListener; import org.apache.felix.http.base.internal.handler.HandlerRegistry; import org.osgi.framework.ServiceFactory; private final ServletContextAttributeListener attributeListener; public HttpServiceFactory(ServletContext cont...
0
/* * Copyright 2016-2018 Seznam.cz, a.s.
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
Converter converter = lookup(String.class); return ((String) converter.convert(String.class, value)); Converter converter = lookup(String.class); return ((String) converter.convert(String.class, value));
0
import org.apache.commons.beanutils.Converter; import org.apache.commons.grant.GrantProject; import org.apache.tools.ant.Project; import org.apache.tools.ant.types.EnumeratedAttribute; import org.apache.tools.ant.types.Reference; public static final String PROJECT_CONTEXT_HANDLE = "org.apache.commons.jelly.ant.Proj...
0
private final MockAccumulo acc; private final String tableName; private final Authorizations authorizations; /** * Create a {@link BatchDeleter} for the specified instance on the specified table where the writer uses the specified {@link Authorizations}. * * @param acc * @param tableName *...
1
import java.util.Optional;
0
* @version $Id$
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
* 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