Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import org.apache.commons.digester3.RulesBinder; | 0 |
static final LongPosition END = new LongPosition(Long.MAX_VALUE);
public Iterator<Entry> readFrom(Position position) throws InvalidPositionException {
return jdbcTemplate.query("SELECT id, contents FROM log_stream WHERE id >= ?",
public long truncateBefore(Position position) throws InvalidPositionExcept... | 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.bcel.generic;
import org.apache.bcel.ExceptionConst;
super(org.apache.bcel.Const.CHECKCAST, index); | 1 |
@Override
public boolean equals(final Object object) {
return object == this || decorated().equals(object);
}
@Override
public int hashCode() {
return decorated().hashCode();
}
| 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 |
* @version $Id$
* @since 2.2 | 0 |
* @version $Revision: 7937 $
* application instance. A service object becomes bound to the application when it | 0 |
if (idleTime > session.maxIdleAccessTime) {
session.maxIdleAccessTime = idleTime;
} | 0 |
value = Long.valueOf(l); | 0 |
* </p> | 0 |
* http://www.apache.org/licenses/LICENSE-2.0 | 0 |
private final ConcurrentHashMap<Integer,AuthenticationKey> allKeys = new ConcurrentHashMap<>();
Token<AuthenticationTokenIdentifier> token = new Token<>(id.getBytes(), password, id.getKind(), new Text(svcName.toString())); | 0 |
XMLUtils.selectDsNodeText(element.getFirstChild(), Constants._TAG_HMACOUTPUTLENGTH, 0);
Element HMElem =
| 1 |
/*
* Copyright 2001-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 |
/**
* 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 |
package com.yahoo.zookeeper.server;
public class ServerConfig {
private int clientPort;
private String dataDir;
private String dataLogDir;
protected ServerConfig(int port, String dataDir,String dataLogDir) {
this.clientPort = port;
this.dataDir = dataDir;
this.dataLogDir=dataLogDir;
}
protected boolean i... | 0 |
import static org.mockito.Mockito.eq;
private static Log LOG = LogFactory.getLog(BootStrapResourceTest.class); | 1 |
import org.apache.commons.vfs2.provider.ftps.FtpsMode;
builder.setFtpsMode(fileSystemOptions, FtpsMode.IMPLICIT); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/BeanMap.java,v 1.27 2004/01/05 22:46:33 scolebourne Exp $
* @version $Revision: 1.27 $ $Date: 2004/01/05 22:46:33 $
* Puts all of the writable properties from the given BeanM... | 0 |
Assert.assertEquals(1, VersionUtils.compareVersions("1.2.3.6.7\n", "1.2.3.4\n", 4)); //test version trimming | 0 |
import org.apache.accumulo.test.categories.MiniClusterOnlyTest;
import org.junit.experimental.categories.Category;
@Category(MiniClusterOnlyTest.class) | 0 |
return classificationType != null; | 0 |
import java.util.Collections;
* {@link com.google.cloud.dataflow.sdk.transforms.DoFn.KeyedState#lookup(java.lang.Iterable)}.
private static final CodedTupleTagMap EMPTY =
of(Collections.<CodedTupleTag<?>, Object>emptyMap());
* Returns an empty {@code CodedTupleTagMap}.
*/
public static CodedTupleTagM... | 0 |
* Creates a layered file system. This method throws a 'not supported' exception.
* Adds a file system to those cached by this provider. The file system
* may implement {@link VfsComponent}. | 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 requir... | 0 |
// component configuration property whose existence causes the
// activate method to fail
public static final String PROP_ACTIVATE_FAILURE = "request.activation.failure";
public static SimpleComponent INSTANCE;
// fail activation if requested so
if ( config.containsKey( PROP_ACTIVATE_FA... | 0 |
* @version $Id: StringDecoder.java,v 1.2 2003/07/25 22:48:11 ggregory Exp $ | 0 |
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import org.apache.bcel.Constants; | 0 |
while (true) {
Thread.sleep(LOCATION_DELAY_SECS * 1000); // extra precaution to ensure monitor has opportunity to log | 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 |
files.put("nested/file1kb", 1 << 10 /*1 kb*/);
Files.createDirectories(filePath.getParent()); | 0 |
package org.apache.ambari.view.commons.exceptions; | 0 |
public static Constructor lookupConstructor(
Object[] parameters)
{ | 0 |
import org.apache.batik.dom.anim.AnimationTarget; | 0 |
Copyright 2002-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 |
public static final char[] EMPTY_CHAR_ARRAY = {};
public static int length(char[] chars) {
return (chars == null) ? 0 : chars.length;
}
public static boolean isEmpty(char[] chars) {
return length(chars) <= 0;
}
/**
* Compares 2 character arrays - <B>Note:</B> {@code null} ... | 0 |
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import org.apache.ambari.server.orm.entities.ClusterConfigMappingEntity;
import com.google.inject.Inject;
import... | 0 |
EvaluationContext evaluationContext) throws Exception; | 0 |
import org.apache.sshd.common.util.SshdEventListener;
public interface SignalListener extends SshdEventListener { | 0 |
agentSessionManager.register(simpSessionId,
clusters.getHost(message.getHostname()));
public HeartBeatResponse heartbeat(@Header String simpSessionId, HeartBeat message) {
if (!agentSessionManager.isRegistered(simpSessionId)) {
//Server restarted, or unknown host.
LOG.error(String.fo... | 1 |
@Override | 0 |
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.apache.ambari.server.state.ComponentInfo;
import org.apache.ambari.server.state.CustomCommandDefinition;
/**
* The names of the custom commands defined for the component.
*/
private List<String> customCommands;
/**... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/tags/core/JellyTag.java,v 1.3 2002/04/24 11:59:13 jstrachan Exp $
* $Revision: 1.3 $
* $Date: 2002/04/24 11:59:13 $
* $Id: JellyTag.java,v 1.3 2002/04/24 11:59:13 jstrachan Exp $
import org... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/share/org/apache/commons/validator/FormSet.java,v 1.7 2003/04/29 02:33:17 dgraham Exp $
* $Revision: 1.7 $
* $Date: 2003/04/29 02:33:17 $
* Copyright (c) 1999-2003 The Apache Software Foundation. All rights
* @ver... | 0 |
KeyExtent extent = new KeyExtent(RootTable.ID, null, null);
KeyExtent extent = new KeyExtent(MetadataTable.ID, null, null);
KeyExtent extent = new KeyExtent(RootTable.ID, null, null);
KeyExtent extent = new KeyExtent(MetadataTable.ID, null, null);
KeyExtent extent = new KeyExtent("1", new Text("b"),... | 0 |
* $Revision: 1.8 $
* $Date: 2003/12/26 15:43:55 $
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.List;
* @author Dirk Verbeeck
* @version $Revision: 1.8 $ $Date: 2003/12/26 15:43:55 $
protected void activate() throws SQLException{
_closed = false;
if(_conn !... | 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) 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 Eu... | 0 |
public ClassLoader getClassLoader(final CommandLine cl, final Shell shellState) throws AccumuloException, TableNotFoundException, AccumuloSecurityException,
IOException, FileSystemException { | 0 |
String projectType = project.getPackaging();
// ignore unsupported project types, useful when bundleplugin is configured in parent pom
if ( !supportedProjectTypes.contains( projectType ) )
getLog().warn( "Ignoring project type " + projectType +
" - supporte... | 0 |
for (String mimeType : mimeTypes) mt.add(mimeType); | 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 |
* 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 |
* This implementation only gives access to the ENGINE_SCOPE bindings.
* </p>
return factory == null ? SingletonHolder.DEFAULT_FACTORY : factory;
}
// IODH - lazy initialisation
private static class SingletonHolder {
private static final JexlScriptEngineFactory DEFAULT_FACTORY = new JexlSc... | 0 |
import org.apache.batik.ext.awt.image.renderable.Filter; | 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 ap... | 1 |
import java.io.IOException;
HttpCacheEntry update(HttpCacheEntry existing) throws IOException; | 0 |
import org.apache.beam.model.pipeline.v1.RunnerApi;
try {
RunnerApi.Pipeline protoPipeline = PipelineTranslation.toProto(originalPipeline);
pipeline = PipelineTranslation.fromProto(protoPipeline);
} catch (IOException exception) {
throw new RuntimeException("Error preparing pipeline for direct... | 0 |
int defSz = AbstractTiledRed.getDefaultTileSize();
// Make tile(0,0) fall on the closest intersection of defaultSz.
int tgX = defSz*(int)Math.floor(bounds.x/defSz);
int tgY = defSz*(int)Math.floor(bounds.y/defSz);
if (tw > defSz) tw = defSz;
if (th > defSz) th = defSz; | 0 |
import org.apache.commons.configuration.event.EventListenerTestImpl;
assertTrue(nsee.getMessage().contains("bogus.property"));
cc.addEventListener(ConfigurationEvent.ANY, new EventListenerTestImpl(null));
.getEventListeners(ConfigurationEvent.ANY).isEmpty());
EventListenerTes... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/parser/XMLParser.java,v 1.19 2002/05/30 14:27:07 jstrachan Exp $
* $Revision: 1.19 $
* $Date: 2002/05/30 14:27:07 $
* $Id: XMLParser.java,v 1.19 2002/05/30 14:27:07 jstrachan Exp $
* @vers... | 0 |
* Tests building dependencies in GLUSTERFS cluster. Uses real dependency mapping
public void testInitializeAtGLUSTERFSCluster() throws AmbariException {
expect(cluster.getService("GLUSTERFS")).andReturn(service);
// And that some GLUSTERFS components are present (section has been loaded)
expect(cluster... | 0 |
import static org.junit.Assert.assertNull;
import org.osgi.service.useradmin.Group;
import org.osgi.service.useradmin.User;
import org.osgi.service.useradmin.UserAdmin;
UserAdmin ua = getUserAdmin();
// Create two roles...
User user = (User) ua.createRole("user1", Role.USER);
assertNotNull(use... | 0 |
NodeHandler<ImmutableNode> nodeHandler = config.getNodeModel().getNodeHandler();
config.getExpressionEngine().query(nodeHandler.getRootNode(),
nodeHandler); | 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 |
SortedKeyValueIterator<Key,Value> source = getSource();
while (source.hasTop() && lastRowFound.equals(source.getTopKey().getRow())) {
source.next(); // scan
Key nextKey = source.getTopKey().followingKey(PartialKey.ROW);
source.seek(new Range(nextKey, true, latestRange.getEndKey(), late... | 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 ap... | 0 |
import org.apache.accumulo.core.data.impl.KeyExtent; | 1 |
import org.apache.hc.core5.util.Timeout;
targetHost, outgoingRequest, Timeout.ofMinutes(1), clientContext); | 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 |
Map<String,String> props = context.instanceOperations().getSystemConfiguration(); | 0 |
* @version $Id$ | 0 |
import java.io.File;
import org.apache.accumulo.harness.AccumuloClusterIT;
import org.junit.Assert;
public class BulkFileIT extends AccumuloClusterIT {
public void configureMiniCluster(MiniAccumuloConfigImpl cfg, Configuration conf) {
FileSystem fs = getCluster().getFileSystem();
String rootPath;
if (Clu... | 0 |
return context.getZooReaderWriter().putPersistentData(zPath, value.getBytes(UTF_8),
context.getZooReaderWriter().recursiveDelete(zPath, NodeMissingPolicy.FAIL); | 0 |
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
* @version $Revision: 1.7 $ $Date: 2004/04/09 09:43:09 $
public class TransformedMap
extends AbstractMapDecorator
implements Serializable {
/** Serialization version */
... | 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 |
AccumuloClient client = getCluster().getAccumuloClient(getPrincipal(), getToken());
TableOperations tops = client.tableOperations();
AccumuloClient client = getClient();
TableOperations tops = client.tableOperations();
AccumuloClient client = getClient();
Map<String,String> nameToId = client.t... | 0 |
boolean needFullTextrocessor() {
boolean needClassificationProcessor() {
return classificationType != null && (entityType == null || hasAttributeFilter(searchParameters.getTagFilters()));
boolean needEntityProcessor() { | 0 |
import java.util.Random;
Random random = new Random();
UtilWaitThread.sleep(100 + random.nextInt(100)); // sleep randomly between 100 and 200 ms
UtilWaitThread.sleep(100 + random.nextInt(100)); // sleep randomly between 100 and 200 ms | 0 |
// A default host name for batch traffic.
private static final String DEFAULT_HOST = "https://batch-spanner.googleapis.com/";
abstract String getHost();
@Nullable
return builder().setHost(DEFAULT_HOST).build();
abstract Builder setHost(String host);
public SpannerConfig withHost(String host) {
r... | 0 |
import org.apache.beam.runners.core.GroupAlsoByWindowsAggregators;
GroupAlsoByWindowsAggregators.DROPPED_DUE_TO_CLOSED_WINDOW_COUNTER);
GroupAlsoByWindowsAggregators.DROPPED_DUE_TO_LATENESS_COUNTER); | 0 |
import org.apache.hc.core5.http.io.HttpClientResponseHandler;
* relieving individual {@link HttpClientResponseHandler}s from having to manage
* @param HttpClientResponseHandler the response handler
final HttpClientResponseHandler<? extends T> HttpClientResponseHandler) throws IOException {
... | 0 |
final InstructionList il = new InstructionList();
final MethodGen method = new MethodGen(Const.ACC_PUBLIC, Type.VOID, Type.NO_ARGS, new String[] { }, "<init>",
final InstructionHandle ih_0 = il.append(InstructionFactory.createLoad(Type.OBJECT, 0));
final InstructionHandle ih_4 = il.append(InstructionFa... | 1 |
import org.apache.beam.sdk.extensions.sql.RowSqlType;
import org.apache.beam.sdk.values.Row;
import org.apache.beam.sdk.values.RowType;
static RowType inputRowType;
static List<Row> inputRows;
RowSqlType | 0 |
* @version CVS $Id: LoopTagSupport.java,v 1.4 2003/12/23 15:28:33 joerg Exp $
* @see #next() | 0 |
import org.apache.atlas.GraphTransactionInterceptor;
GraphTransactionInterceptor.lockObjectAndReleasePostCommit(guid);
GraphTransactionInterceptor.lockObjectAndReleasePostCommit(guid);
GraphTransactionInterceptor.lockObjectAndReleasePostCommit(guids);
GraphTransactionInterceptor.lockObj... | 0 |
package cz.seznam.euphoria.core.client.operator.state;
import cz.seznam.euphoria.core.client.functional.BinaryFunction;
/**
* Optional interface for descriptor to implement in order to enable state merging.
*/
public interface MergingStorageDescriptor<T> {
/**
* Retrieve the merging function for state storag... | 0 |
ambariProperties.setProperty(Configuration.LDAP_USER_SEARCH_FILTER.getKey(), "17");
ambariProperties.setProperty(Configuration.LDAP_ALT_USER_SEARCH_ENABLED.getKey(), "true");
ambariProperties.setProperty(Configuration.LDAP_ALT_USER_SEARCH_FILTER.getKey(), "18");
Assert.assertEquals("17", ldapProperties.... | 0 |
import com.google.common.collect.Iterables;
UncommittedBundle<T> bundle =
context.createBundle(
(PCollection<T>) Iterables.getOnlyElement(application.getOutputs()).getValue()); | 0 |
break; | 0 |
import javax.inject.Inject;
| 1 |
*
*
*
*
*
*
*
*
* | 0 |
import com.google.cloud.dataflow.sdk.util.common.worker.NativeReader;
public static NativeReader.Progress cloudProgressToReaderProgress(
public static NativeReader.Position cloudPositionToReaderPosition(
@Nullable Position cloudPosition) {
@Nullable NativeReader.Progress readerProgress) {
public stati... | 0 |
public void testBlockExtend1() throws Exception {
pipeTest("ext/test", "test3/test.xml");
}
public void testBlockExtend2() throws Exception {
pipeTest("ext/test2", "test2/test.xml");
}
public void testBlockExtend3() throws Exception {
pipeTest("ext/test3", "test3/test.xml"... | 0 |
builder.addEventListener(Event.ANY, l1);
builder.addEventListener(ConfigurationEvent.ANY, l2); | 0 |
return new RootedFileSystemProvider().newFileSystem(dir, Collections.emptyMap()); | 0 |
try (AccumuloClient c = Accumulo.newClient().from(getClientProps()).build()) { | 0 |
import java.util.Arrays;
else if (value.getClass().isArray())
{
return Arrays.asList((Object[]) value);
} | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/tags/define/Attic/DynamicTag.java,v 1.10 2002/07/10 21:46:18 jvanzyl Exp $
* $Revision: 1.10 $
* $Date: 2002/07/10 21:46:18 $
* $Id: DynamicTag.java,v 1.10 2002/07/10 21:46:18 jvanzyl Exp $... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.