Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
/** * Returns the request line of this request. * @return the request line. */ //TODO add a setter for request line?
0
public static void main( String[] argv ) {
0
import org.apache.sshd.common.subsystem.sftp.extensions.ParserUtils; import org.apache.sshd.common.util.buffer.BufferUtils; return "info"; } @Override ...
0
BCFile.Writer _cbw = new BCFile.Writer(dos, null, "gz", CachedConfiguration.getInstance(), aconf);
0
BufferInfo bufferinfo = buffer;
0
* to use the standard providers and components. To use this manager: * <li>Set the logger using {@link #setLogger} (optional). * <li>Add custom providers and components. * @version $Revision: 1.5 $ $Date: 2002/11/17 03:37:28 $
0
return Base64.encodeBase64URLSafeString(rawValue);
0
return JSON_VALUE_PARSERS.get(fieldType.getTypeName()).apply((String) jsonBQValue);
0
public static LDAPExpr apply(LDAPExpr e) if (e == null) throw new NullPointerException("cannot apply Not to a null expression"); if (e.equals(Expressions.T)) if (e.equals(Expressions.F)) return new Not(e); private Not(LDAPExpr child) this.children = new LDAPEx...
0
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertTrue; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.DataInputStream; import java.io.DataOutputStream; ...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/converters/LongConverter.java,v 1.6 2003/10/05 13:34:53 rdonkin Exp $ * $Revision: 1.6 $ * $Date: 2003/10/05 13:34:53 $ * * Copyright (c) 2001-2003 The Apache Software Foundation....
0
public long prepQueueStartTime= -1;
0
import org.apache.accumulo.core.security.Credentials; stopTabletServer(instance, new Credentials(principal, token), stopOpts.args, opts.force); stopServer(instance, new Credentials(principal, token), everything); private static void stopServer(final Instance instance, final Credentials credentials, fi...
0
* @return An {@link IoWriteFuture} that can be used to wait for packet write * completion - {@code null} if the registered {@link ReservedSessionMessagesHandler} * decided to handle the command internally if (handler.handleUnimplementedMessage(this, cmd, buffer)) { return null; ...
0
new MarkerShorthandFactory(p));
0
* RFile metadata is stored at the end of the file. Inorder to read an RFile, its length must be * known. This provides a way to pass an InputStream and length for reading an RFile.
0
public void testMixedCaseHostname() { final AuthScope authscope = new AuthScope("SomeHost", 80); Assert.assertEquals(null, authscope.getScheme()); Assert.assertEquals("somehost", authscope.getHost()); Assert.assertEquals(80, authscope.getPort()); Assert.assertEquals(null, aut...
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
log.error("Encountered InterruptedException while waiting for the threadPool to terminate.", e); log.error("Encountered InterruptedException while waiting for the thread pool to terminate.", e); log.error("Encountered unknown exception in assignMapFiles.", t);
0
package org.apache.accumulo.core.util.shell.commands; import java.io.IOException; import org.apache.accumulo.core.security.TablePermission; import org.apache.accumulo.core.util.shell.Shell; import org.apache.accumulo.core.util.shell.Shell.Command; import org.apache.commons.cli.CommandLine; public class TablePermiss...
1
@SuppressWarnings("unused")
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
ProtectionDomain rhinoProtectionDomain
0
return openWriter(file, fs, conf, acuconf, acuconf.get(Property.TABLE_FILE_COMPRESSION_TYPE)); } FileSKVWriter openWriter(String file, FileSystem fs, Configuration conf, AccumuloConfiguration acuconf, String compression) throws IOException {
0
@Override public String[] getUnboundParameters() { return frame.getUnboundParameters(); }
0
private static VisibilityInterpreter interpreter = null; public static VisibilityInterpreter create() { if (interpreter == null) { throw new IllegalStateException("ColumnVisibilityInterpreterFactory is not configured: Interpreter is null"); return interpreter.create(); } public static Visib...
1
* When a particular component is not explicitly set this class will
0
* @version $Revision: 1.3 $ $Date: 2004/06/13 05:35:44 $ int count = cos.resetCount(); assertEquals("CountingOutputStream.resetCount()", count, 35); for(int i = 0; i < 10; i++) { cos.write(i); } assertByteArrayEquals("CountingOutputStream.write(int)", baos.toByteAr...
0
import org.apache.hc.core5.http.Supplier;
0
import org.apache.beam.sdk.metrics.MetricsSink; import org.apache.beam.sdk.util.InstanceBuilder; period = pipelineOptions.getMetricsPushPeriod(); // calls the constructor of MetricsSink implementation specified in // pipelineOptions.getMetricsSink() passing the pipelineOptions metricsSink = ...
0
package org.apache.commons.digester3.examples.api.catalog;
0
* serialVersionUID format is YYYYMMDD for the date of the last binary change.
0
&& !ver.lessEquals(HttpVersion.HTTP_1_0)) {
0
import org.apache.xml.security.stax.impl.util.UnsynchronizedBufferedOutputStream; xmlEventWriter = XMLSecurityConstants.xmlOutputFactory.createXMLEventWriter(new UnsynchronizedBufferedOutputStream(cipherOutputStream, 8192), "UTF-8"); int size = charactersBuffer.size(); ...
0
* </p> * </p>
0
* Close the queue. The given callback will be executed once the queue is empty. * * @param shutdownTask The task to execute once the queue is empty public void close(final HandlerTask shutdownTask);
0
* * package org.apache.commons.vfs2.provider.tar.test; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileSystemManager; import org.apache.commons.vfs2.impl.DefaultFileSystemManager; import org.apache.commons.vfs2.provider.tar.TarFileProvider; import org.apache.commons.vfs2.test.AbstractPro...
1
* Implementation of the {@link ContentOutputBuffer} interface that can be * Please note this class is thread safe only when used though * the {@link ContentOutputBuffer} interface. } this.mutex.notifyAll();
0
* Copyright (C) 2015 Google Inc.
0
public class QuoteUtil { public static String[] split( String str ) { ArrayList<String> split = new ArrayList<String>(); boolean quote = false; StringBuffer buf = new StringBuffer( str.length() ); for ( int i = 0; i < str.length(); i++ ) { char c = str.char...
0
package org.apache.batik.ext.awt.image.rendered; import java.awt.image.Raster; import java.awt.image.RenderedImage; public class TileCache { private static LRUCache cache = new LRUCache(50); public static void setSize(int sz) { cache.setSize(sz); } public static TileStore getTileGrid(int minTileX, int minTil...
0
import java.util.AbstractMap.SimpleImmutableEntry; Map.Entry<Path, Boolean> result; p = result.getKey(); Boolean status = result.getValue(); sendPath(BufferUtils.clear(buffer), id, result.getKey(), attrs); protected SimpleImmutableEntry<Path, Boolean> doRealPathV6( ...
0
import static org.junit.Assert.fail; import org.apache.accumulo.core.client.AccumuloSecurityException; try { assertNull(args.getPrincipal()); fail("Expected to receive exception fetching non-existent principal"); } catch (AccumuloSecurityException e) { // Pass -- no explicit principal and no t...
0
* Register the given rule builder and returns it. * @param <R> The Digester rule type * @param <RB> The Digester rule builder type * @param ruleBuilder The input rule builder instance. * Returns the first instance of {@link RuleProvider} assignable to the input type. * This method is usefu...
0
} catch (ThreadDeath td) { debuggerClass = null; clearAllBreakpoints = null; scriptGo = null; setExitAction = null; throw td; } catch (Exception ex) { ex.printStackTrace(); } catch (Exception ex) { ex.pri...
0
public ExportedPackageFinder(ISigilProjectModel sigil, IAccumulator<? super IPackageExport> accumulator) public IStatus run(final IProgressMonitor monitor) final List<IPackageExport> exports = new ArrayList<IPackageExport>( ResourcesDialogHelper.UPDATE_BATCH_SIZE); public boolean...
0
/** * Copyright 2016 Seznam.cz, a.s. * * 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 agree...
0
* @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
0
* The kerberos-env property name declaring whether the Hadoop auth_to_local rules should be included for all components of an installed service even if the component itself is not installed */ String INCLUDE_ALL_COMPONENTS_IN_AUTH_TO_LOCAL_RULES = "include_all_components_in_auth_to_local_rules"; /**
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/decorators/Attic/AbstractCollectionDecorator.java,v 1.2 2003/05/07 11:20:21 scolebourne Exp $ * @version $Revision: 1.2 $ $Date: 2003/05/07 11:20:21 $ private final Collection...
0
private final Collection<CreditCardType> cardTypes = new ArrayList<CreditCardType>();
0
public static class Factory { public ServiceConsumer createServiceConsumer() { public ServiceProvider createServiceProvider() { public ServiceProvider2 createServiceProvider2() { public interface ServiceInterface { @Service(factory = Factory.class, ...
0
import com.google.common.collect.Sets; import static org.junit.Assert.*;
0
import org.apache.beam.dsls.sql.interpreter.operator.BeamSqlCastExpression; case "CAST": ret = new BeamSqlCastExpression(subExps, node.type.getSqlTypeName()); break;
0
import org.apache.accumulo.core.security.tokens.AuthenticationToken; @Deprecated this.acu.users.put(user, new MockUser(user, new PasswordToken(password), authorizations)); public void createUser(String user, AuthenticationToken token) throws AccumuloException, AccumuloSecurityException { @Override @Deprecat...
1
* This class is not thread safe.
0
TabletLocator.getLocator(context, scanState.tableId).invalidateCache(context, loc.tablet_location);
0
import org.apache.accumulo.core.util.MetadataTable; Scanner scanner = conn.createScanner(MetadataTable.NAME, Authorizations.EMPTY); MetadataTable.PREV_ROW_COLUMN.fetch(scanner); scanner.fetchColumnFamily(MetadataTable.LAST_LOCATION_COLUMN_FAMILY); scanner.fetchColumnFamily(MetadataTable.CURRENT_...
0
import org.apache.sshd.client.subsystem.sftp.SftpException;
0
assertEquals("1-foo-2" + System.lineSeparator(), replacements.get(0).find); assertEquals("3-foo-4" + System.lineSeparator(), replacements.get(1).find);
0
Map<String, PropertyInfo> componentMetricMap = getComponentMetrics().get(getComponentName(resource)); if (!componentMetricMap.containsKey(id)) { updateComponentMetricMap(componentMetricMap, id); }
0
connState.close(); public void close() { try { this.inbuffer.close(); } catch (IOException ignore) { } try { this.outbuffer.close(); } catch (IOException ignore) { } this.inputStat...
0
import org.apache.zookeeper.WatchedEvent;
0
* Executes HTTP request using the default context. * Executes HTTP request using the given context. * Executes HTTP request using the default context. * Executes HTTP request using the given context. * Executes HTTP request using the default context and processes the * Executes HTTP reques...
0
import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger log = LoggerFactory.getLogger(PreferredVolumeChooser.class);
0
PCollection<ElemT>, PCollection<ElemT>, PCollection<ElemT>, PCollection<ElemT>, PTransform<PCollection<ElemT>, PCollection<ElemT>>> transform) {
1
* @version CVS $Id: DefaultAuthenticationManager.java,v 1.17 2003/09/24 21:22:33 cziegeler Exp $ this.manager.release( contextManager); manager.release( contextManager);
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/adapters/Attic/IntListList.java,v 1.7 2003/08/31 17:21:17 scolebourne Exp $ * any, must include the following acknowledgement: * Alternately, this acknowledgemen...
0
import org.apache.cocoon.portal.coplet.CopletInstance; final CopletInstance coplet = this.adapter.getCurrentCopletInstanceData(); final CopletInstance coplet = this.adapter.getCurrentCopletInstanceData();
0
import javax.inject.Singleton; @Singleton
0
return body(new ByteArrayEntity(b, null)); return body(new ByteArrayEntity(b, off, len, null));
0
public CaseInsensitiveMap(final Map<? extends K, ? extends V> map) {
0
properties.put("file_key", base64FileKey);
0
private KeyPair pairRsaBad; public SinglePublicKeyAuthTest() { SimpleGeneratorHostKeyProvider provider = new SimpleGeneratorHostKeyProvider(); provider.setAlgorithm("RSA"); pairRsaBad = provider.loadKey(KeyPairProvider.SSH_RSA); }
0
* @version CVS $Id: Web3.java,v 1.2 2003/03/16 17:49:09 vgritsenko Exp $
0
final File dynamicFile = (new VerifyingFileFactory.Builder(LOG) .warnForRelativePath() .failForNonExistingPath() .build()).create(dynamicFileStr); .concat(dynamicFile.getCanonicalPath())
0
} else if (xIncludeLevel > 0 && fallbackLevel > 0) { fallbackLevel++; }
0
put(Type.Cluster, HOST_STACK_VERSION_CLUSTER_NAME_PROPERTY_ID); put(Type.Host, HOST_STACK_VERSION_HOST_NAME_PROPERTY_ID); put(Type.HostStackVersion, HOST_STACK_VERSION_ID_PROPERTY_ID); put(Type.Stack, HOST_STACK_VERSION_STACK_PROPERTY_ID); put(Type.StackVersion, HOST_STACK_VERSION_VERSION_...
0
Method updateHostComponentLastStateTable = UpgradeCatalog300.class.getDeclaredMethod("updateHostComponentLastStateTable"); .addMockedMethod(updateHostComponentLastStateTable) upgradeCatalog300.updateHostComponentLastStateTable(); Capture<DBAccessor.DBColumnInfo> lastValidColumn = newCapture(); ...
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 org.apache.commons.lang.StringUtils; return s.replaceAll("\\\\\"", "\""); s = s.replaceAll("\\s", "");
0
m.put("org.foo.bar.warp", "eeej"); assertEquals(327L, dto.width); @Test public void testPrefixInterface() { Map<String, String> m = new HashMap<>(); m.put("org.foo.bar.width", "327"); m.put("org.foo.bar.warp", "eeej"); m.put("length", "12"); PrefixInterfa...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/Jelly.java,v 1.14 2002/08/09 19:11:56 jstrachan Exp $ * $Revision: 1.14 $ * $Date: 2002/08/09 19:11:56 $ * $Id: Jelly.java,v 1.14 2002/08/09 19:11:56 jstrachan Exp $ * @version $Revision: ...
0
/** * Copyright 2016 Seznam a.s. * * 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...
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
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestLRUMap.java,v 1.18 2002/05/08 16:07:05 morgand Exp $ * $Revision: 1.18 $ * $Date: 2002/05/08 16:07:05 $ import java.util.Iterator; * @version $Id: TestLRUMap.java,v 1.18 200...
0
public void consume(final ByteBuffer src) throws IOException {
0
return withNaming(fn(namingFn));
0
import java.util.Collections; import java.util.EnumSet; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import org.apache.ambari.server.controller.spi.Predicate;
0
/** * * @since 4.0 */
0
throw new RuntimeException( "foo" );
0
import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import org.apache.http.concurrent.FutureCallback; import org.apache.http.params.HttpConnectionParams; import org.apache.http.params.HttpParams; /** * Basic non-blocking {@link IOSession} pool. * <p> * The following parameters can be used to cu...
0
Map<String, Object> getAttributes() throws FileSystemException;
0
/** * Returns the {@link ConfigurationImpl} with the given PID if * available in the internal cache or from any persistence manager. * Otherwise <code>null</code> is returned. * * @param pid The PID for which to return the configuration * @return The configuration or <code>null</code> ...
0
* $HeadURL$ * $Revision$ * $Date$
0
AuditedSecurityOperation.getInstance(iid, true).initializeSecurity(SecurityConstants.getSystemCredentials(), opts.rootuser, opts.rootpass);
0
* @version CVS $Id: JavaScriptJXPathBindingBuilder.java,v 1.3 2003/12/18 07:57:21 mpo Exp $ CommonAttributes commonAtts = JXpathBindingBuilderBase.getCommonAttributes(element); if (commonAtts.loadEnabled) { if (commonAtts.saveEnabled) { return new JavaScriptJXPathBindin...
0
/** Factory to create a {@link JobInvocation} instances. */ /** Start running a job, abstracting its state as a {@link JobInvocation} instance. */ JobInvocation invoke(RunnerApi.Pipeline pipeline, Struct options, @Nullable String retrievalToken)
0
import javax.ws.rs.*; * Handles: GET /clusters/{clusterID} return handleRequest(headers, ui, Request.Type.GET, createResourceDefinition(clusterName)); * Handles: GET /clusters return handleRequest(headers, ui, Request.Type.GET, createResourceDefinition(null)); } /** * Handles: PUT /clusters/{clu...
1
import org.apache.sshd.server.global.OpenSshHostKeysHandler; CancelTcpipForwardHandler.INSTANCE, OpenSshHostKeysHandler.INSTANCE
0