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...
0
* * @param maxConnLifetimeMillis * The maximum lifetime in milliseconds. * The disconnection SQL codes. * @see #getDisconnectionSqlCodes()
0
CounterSet.AddCounterMutator addCounterMutator, StateSampler stateSampler) executionContext, addCounterMutator, stateSampler); addCounterMutator, stateSampler); CounterSet.AddCounterMutator addCounterMutator, StateSampler stateSampler) { addCounterMutator, ...
0
package com.google.cloud.dataflow.examples.complete;
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 u...
0
protected Class<?> getDefaultType() { protected <T> T convertToType(Class<T> type, Object value) throws Throwable { // We have to support Object, too, because this class is sometimes // used for a standard to Object conversion if (String.class.equals(type) || Object.class.equals(type)) {...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/iterators/ArrayIterator.java,v 1.7 2003/11/14 22:58:27 scolebourne Exp $ * @version $Revision: 1.7 $ $Date: 2003/11/14 22:58:27 $ public class ArrayIterator implements ResettableI...
0
final ServletDTO dto = build(handler.getServletInfo(), reason); public static ServletDTO build(final ServletInfo info, final int reason) final ServletDTO dto = (reason != -1 ? new FailedServletDTO() : new ServletDTO()); if ( reason != -1 ) { ((FailedServletDTO)dto).failur...
0
package org.apache.commons.configuration; * @version $Id: BasePropertiesConfiguration.java,v 1.10 2004/06/15 11:49:25 ebourg Exp $ throw new ConfigurationRuntimeException("Unable to parse unicode value: " + unicode, nfe);
0
import java.util.Properties; import org.apache.commons.configuration.MapConfiguration; // Interpolated items need to be careful, as JVM properties could be updates and we may want that propogated when those changes occur. // Currently only VFS_CLASSLOADER_CACHE_DIR, which isn't ZK mutable, is interpolated, so t...
0
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import org.apache.accumulo.core.util.ContextFactory; ctx = ContextFactory.createTaskAttemptContext(conf); WikipediaInputSplit split = new Wik...
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
import org.apache.http.impl.nio.DefaultServerIOEventDispatch; import org.apache.http.nio.NHttpServiceHandler; private void execute(final NHttpServiceHandler serviceHandler) throws IOException { IOEventDispatch ioEventDispatch = new DefaultServerIOEventDispatch( serviceHandler, ...
0
public class HttpAssets { GuicedProcess.registerHttpAsset(binder, "/js/mootools-core.js", HttpAssets.class, GuicedProcess.registerHttpAsset(binder, "/js/mootools-more.js", HttpAssets.class, GuicedProcess.registerHttpAsset(binder, "/js/tit.js", HttpAssets.class, GuicedProcess.registerHttpAsset(binder, "/...
0
private static final long serialVersionUID = -8536341322669578097L;
0
/* * Copyright 1999-2002,2004-2005 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 requ...
0
List<Task> realTasks = new ArrayList<>(); Set<String> hosts = new HashSet<>();
1
public final void setProperty(String key, Object value) setPropertyInternal(key, value); * Actually sets the value of a property. This method is called by * {@code setProperty()}. It provides a default implementation of this * functionality by clearing the specified key and delegating to ...
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
String uri = "caching:http://slashdot.org/?cocoon:cache-expires=1"; // Source is cached -- same meta data assertSame(meta1, meta2); // Source is still cached -- still same meta data assertSame(meta1, meta3); // Source is refreshed -- but meta data should not change ...
0
private char[] array; this.array = new char[capacity]; final char[] newArray = new char[Math.max(this.array.length << 1, newlen)]; System.arraycopy(this.array, 0, newArray, 0, this.len); this.array = newArray; if (newlen > this.array.length) { System.arraycopy(b, off,...
0
"\t-L - use lenient future dates (server dates may be up to 1 day into future)\n" + boolean lenient = false; else if (args[base].equals("-L")) { lenient = true; } if (lenient) { FTPClientConfig config = new FTPClientConfig(); ...
0
* Get the custom {@link org.apache.cocoon.portal.om.Renderer} for this layout.
0
/** Parse Javadocs? */ protected final boolean parseJavadocs; /** Process Annotations? */ protected final boolean processAnnotations; * @param excludeString The exclude information for sources * @param parseJavadocs Should the javadocs be parsed? * @param processAnnotations Should the a...
0
/***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * * ------------------------------------------------------------------------- * * This software is published under the terms of the Apache Software License * *...
0
* @version CVS $Id: Form.java,v 1.13 2003/12/29 17:52:12 stefano Exp $
0
* @version $Revision: 1.51 $ $Date: 2004/12/19 16:56:30 $ /** * Returns an unmodifiable copy of the map. */ public static Map unmodifiableMapCopy(Map map) { if (map == null) throw new IllegalArgumentException("null not permitted."); Map copy = new HashMap(map.size(), 1.0f); ...
0
import org.apache.hc.core5.http2.HttpVersionPolicy; final MinimalHttpAsyncClient client = HttpAsyncClients.createMinimal( HttpVersionPolicy.FORCE_HTTP_2, H2Config.DEFAULT, null, ioReactorConfig);
0
HDFSFileSource.from( file.toString(), SequenceFileInputFormat.class, IntWritable.class, Text.class); assertEquals(file.length(), source.getEstimatedSizeBytes(null)); assertThat(expectedResults, containsInAnyOrder(readFromSource(source, options).toArray())); } @Test publi...
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
import static com.google.common.base.Preconditions.checkState; checkState(uses.size() > 0, "Unknown transform: " + transform); checkState(uses.size() <= 1, "Transform used multiple times: " + transform);
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.annotations.VisibleForTesting; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableMap;
0
public Attribute copy(ConstantPool _constant_pool) { c.constant_pool = _constant_pool;
0
* @version $Revision$, $Date$ public class OptionGroup implements Serializable { * Set the selected option of this group to <code>name</code>. * if (selected == null || selected.equals(option.getOpt())) selected = option.getOpt(); return required; * Returns the stringified ve...
0
import org.apache.accumulo.core.client.IteratorSetting; import org.apache.accumulo.core.client.IteratorSetting.Column; IteratorSetting cfg = new IteratorSetting(50, StatusCombiner.class); Combiner.setColumns(cfg, Collections.singletonList(new Column(StatusSection.NAME))); combiner.init(new DevNull(), cfg.ge...
0
@Transactional public void removeAllByGroup(Long groupId) { TypedQuery<Long> query = entityManagerProvider.get().createQuery ("DELETE FROM ConfigGroupConfigMappingEntity configs WHERE configs" + ".configGroupId = ?1", Long.class); daoUtils.executeUpdate(query, groupId); entityManagerProv...
0
* @version $Id$ public class ComparableComparatorTest extends AbstractComparatorTest<Integer> { public ComparableComparatorTest(String testName) {
0
public static void main(String[] args) throws Exception { HttpHost target = new HttpHost("jakarta.apache.org", 80, "http"); // some general setup SchemeRegistry supportedSchemes = new SchemeRegistry(); // one operator can be used for many connections ClientConnectionOperator ...
0
import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger LOG = LoggerFactory.getLogger(JobUpdateControllerImpl.class); LOG.debug( "Job update {} has been pulsed. Timeout of {} msec is reset.", state.getPulseTimeoutMs()); LOG.error("Error while processing job u...
0
* @version $Id$
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.assertEquals(zookeepers, info.getZooKeepers());
0
BatchModeExecutionContext context = BatchModeExecutionContext.fromOptions(options); BatchModeExecutionContext context = BatchModeExecutionContext.fromOptions(options);
0
import org.apache.beam.fn.harness.data.PCollectionConsumerRegistry; PCollectionConsumerRegistry pCollectionConsumerRegistry, pCollectionConsumerRegistry.register(
0
/* * Copyright 2000-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 applic...
0
@Override
0
* @version CVS $Id$ * @param interpreterId id of interpreter invoking continuation creation String interpreterId, * @param interpreterId Id of an interpreter that queries for * the continuation * * @return a <code>WebContinuation</code> object,...
0
@Override
0
* Displays a message in the User Agent interface. */ public void displayMessage(String message) { statusBar.setMainMessage(message); } /** * Informs the user agent to change the cursor. * @param cursor the new cursor */ public void setSVGCursor(Cursor cursor) { ...
0
import org.apache.felix.ipojo.util.SecurityHelper; // Security Check if (SecurityHelper.hasPermissionToRegisterService(ManagedService.class.getName(), getInstanceManager().getContext())) { m_sr = getInstanceManager().getContext().registerService(...
0
import org.apache.cocoon.acting.ServiceableAction; * @version CVS $Id: LogoutAction.java,v 1.5 2003/10/15 20:47:14 cziegeler Exp $ extends ServiceableAction this.manager.release( authManager );
0
import org.junit.Assert;
0
Configuration classPathConfig = null; if ( componentConfig != null ) { // before we pass the configuration we have to strip the // additional configuration parts, like classpath as these // are not configurations for the component container final DefaultCo...
0
* @version CVS $Id: SessionContextProviderImpl.java,v 1.6 2004/01/09 11:20:23 cziegeler Exp $ manager.release( (Component)portal);
0
package cz.seznam.euphoria.core.client.operator; import cz.seznam.euphoria.core.client.functional.UnaryFunction; import java.util.Objects; /** * Class to be extended by operator builders that want to make use * of `applyIf` call. * @param BUILDER the class of the builder that extends this class */ public abstrac...
0
* @version $Revision$
0
/* ==================================================================== * Copyright (c) 2002-2004 The Apache Software Foundation. All rights * @version $Revision: 1.8 $ $Date: 2004/01/14 21:43:04 $
0
* An {@code ExternalIterable}, that is stored in memory. Use this class with care, because it might * cause OOME or other performance issues.
0
import static org.junit.Assert.assertFalse; public static int countRFiles(Connector c, String tableName) throws Exception { Scanner scanner = c.createScanner(MetadataTable.NAME, Authorizations.EMPTY); String tableId = c.tableOperations().tableIdMap().get(tableName); scanner.setRange(MetadataSchema.Tablet...
1
}}, new HashMap<String, Map<String, String>>()); Config config3 = cf.createNew(cluster, "yarn-site", new HashMap<String, String>() {{ put("test.password", "supersecret"); }}, new HashMap<String, Map<String,String>>()); config3.setTag("version1"); cluster.addConfig(config3)...
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
public interface MissingGetter extends PipelineOptions { public interface MissingMultipleGetters extends MissingGetter { public interface MissingSetter extends PipelineOptions { public interface MissingMultipleSetters extends MissingSetter { public interface MissingGettersAndSetters extends MissingGetter { ...
0
public BufferOverflowException(final String message) { public BufferOverflowException(final String message, final Throwable exception) {
0
* {@inheritDoc} This method is overridden to adapt the return type. */ @Override public ReloadingCombinedConfigurationBuilder configure(BuilderParameters... params) { super.configure(params); return this; } /**
0
* logging namespaces by specifying * {@code --workerLogLevelOverrides=Name1#Level1,Name2#Level2,...}. For example, by specifying * {@code --workerLogLevelOverrides=com.google.cloud.dataflow.examples.DebuggingWordCount#DEBUG} * "DEBUG" or higher level logs for the DebuggingWordCount class in addition to the default ...
0
import java.io.Serializable; public class TimelineMetric implements Comparable<TimelineMetric>, Serializable { private String instanceId = null;
0
import org.apache.aurora.gen.ExplicitReconciliationSettings; import org.apache.aurora.scheduler.reconciliation.TaskReconciler; private TaskReconciler taskReconciler; taskReconciler = createMock(TaskReconciler.class); auditMessages, taskReconciler)); public void testExplicitTaskReconcilia...
0
import org.apache.accumulo.core.client.security.tokens.AuthenticationToken; import org.apache.accumulo.core.client.security.tokens.PasswordToken;
0
import static org.easymock.EasyMock.createMock; import static org.easymock.EasyMock.expect; import static org.easymock.EasyMock.replay; import static org.junit.Assert.assertEquals; @Test public void testAllZooKeepersAreUsed() { final String zookeepers = "zk1,zk2,zk3", instanceName = "accumulo"; ZooCacheF...
0
import org.apache.ambari.server.api.query.QueryImplTest; ComponentServiceTest.class, HostComponentServiceTest.class, ReadHandlerTest.class, QueryImplTest.class,
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 applica...
0
} else if (((Set<?>) session.get(CommandSessionImpl.CONSTANTS)).contains(token.toString())
0
import org.apache.sshd.client.session.ClientConnectionService; import org.apache.sshd.deprecated.UserAuthPassword; import org.apache.sshd.deprecated.ClientUserAuthServiceOld; client.setServiceFactories(Arrays.asList( new ClientUserAuthServiceOld.Factory(), new ClientConnectionSe...
0
// Adds dependencies (except named dependencies, which are managed by the lifecycle handler). addUnamedDependencies(b, dm, service, srvMeta, depsMeta);
0
import org.apache.ambari.server.orm.DBAccessor; import java.util.ArrayList; import java.util.List; private static final String KERBEROS_DESCRIPTOR_TABLE = "kerberos_descriptor"; private static final String KERBEROS_DESCRIPTOR_NAME_COLUMN = "kerberos_descriptor_name"; private static final String KERBEROS_DESCRIPTO...
0
package org.apache.accumulo.server.fs; import org.apache.accumulo.core.spi.common.ServiceEnvironment; import org.apache.hadoop.fs.FileSystem; public interface VolumeChooserEnvironment { public Text getEndRow(); public boolean hasTableId(); public TableId getTableId(); /** * @since 2.0.0 */ public Choose...
0
val = coder.decode(new ByteArrayInputStream(bcast.value()));
0
log.trace(String.format("Splitting at %6.2f instead of .5, row at .5 is same as end row%n", keys.firstKey()));
0
/** The required options and groups expected to be found when parsing the command line. */ for (OptionGroup group : options.getOptionGroups()) for (String argument : arguments) handleToken(argument); List<String> matchingOpts = options.getMatchingOptions(token); ...
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 * * http://www.apache.org/licenses/LICENSE-2.0 * * KIND, either express or implied. See the License for the
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
* @param propType The bean property type that this column needs to be
0
Mockito.anyInt(), final int connectTimeout,
0
List<Component> services = new ArrayList<Component>(dm.getComponents()); List<Component> services = new ArrayList(dm.getComponents());
0
* * @deprecated since 2.0. This class maintained for backwards compatibility please do not remove. * New users see org.apache.accumulo.hadoop.mapreduce.AccumuloInputFormat @Deprecated
0
public ClassConverterTestCase(final String name) { final Converter converter = new ClassConverter(); final Converter converter = new ClassConverter(); } catch (final ConversionException e) { } catch (final ConversionException e) { final Converter converter = new ClassConverte...
0
private static SiteConfiguration siteConfig = SiteConfiguration.create(); scf = new ServerConfigurationFactory(context, siteConfig);
0
import org.apache.beam.runners.core.StateMerging;
0
* Copyright 2000-2009 The Apache Software Foundation
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestAll.java,v 1.17 2002/02/25 23:15:29 morgand Exp $ * $Revision: 1.17 $ * $Date: 2002/02/25 23:15:29 $ * @version $Id: TestAll.java,v 1.17 2002/02/25 23:15:29 morgand Exp $ ...
0
MasterClient.executeVoid(ctx, new ClientExec<MasterClientService.Client>() {
0
* Simple {@link Credentials} implementation based on a user name / password * pair.
0
public final class BooleanConverter implements Converter {
0
* @version $Revision$
1
import static org.junit.jupiter.api.Assertions.assertTrue; @org.junit.jupiter.api.Test assertTrue(coreValidity, "Signature failed core validation");
0
import org.apache.ambari.logfeeder.conf.LogFeederProps; public void init(LogFeederProps logFeederProps) throws Exception { super.init(logFeederProps);
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
* <pre>{@code * }</pre> * --project=YOUR_PROJECT_ID * --dataset=YOUR_DATASET_ID * --output=[YOUR_LOCAL_FILE | gs://YOUR_OUTPUT_PATH]
0
// Check the count again to ensure that nobody else has just // obtained the service again if (usage.m_count.get() <= 0) if (usage.m_svcHolderRef.compareAndSet(holder, null)) { ...
0
private final int n;
0