Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import org.junit.BeforeClass;
import java.io.FileOutputStream;
@BeforeClass
public static void beforeClass() throws IOException {
String sm = "grant { permission java.security.AllPermission; };";
File tmp = File.createTempFile("batik", "sm");
FileOutputStream fos = new FileOutputStream(tmp);
fos.write(sm.getBytes());
fos.close();
tmp.deleteOnExit();
System.setProperty("java.security.policy", tmp.getAbsolutePath());
}
//fail on CI
"transcoder.image.hints.px2mm.72dpi",
"org.apache.batik.util.ApplicationSecurityEnforcerTest$CheckNoPolicyFile",
"bridge/error/transform" | 0 |
/*
replay(fileToUpload, compressedFile);
S3Uploader s3Uploader = new S3Uploader(s3OutputConfiguration, true, LOG_TYPE) {
protected void uploadFileToS3(String bucketName, String s3Key, File localFile, String accessKey, String secretKey) {
}
replay(fileToUpload, compressedFile);
S3Uploader s3Uploader = new S3Uploader(s3OutputConfiguration, true, LOG_TYPE) {
protected void uploadFileToS3(String bucketName, String s3Key, File localFile, String accessKey, String secretKey) {
}
replay(fileToUpload, compressedFile);
S3Uploader s3Uploader = new S3Uploader(s3OutputConfiguration, false, LOG_TYPE) {
protected void uploadFileToS3(String bucketName, String s3Key, File localFile, String accessKey, String secretKey) {
}
replay(fileToUpload, compressedFile);
S3Uploader s3Uploader = new S3Uploader(s3OutputConfiguration, true, LOG_TYPE) {
protected void uploadFileToS3(String bucketName, String s3Key, File localFile, String accessKey, String secretKey) {
} | 0 |
DefaultSshFuture future = new DefaultSshFuture(getCurrentTestName(), null);
Object expected = new Object();
DefaultSshFuture future = new DefaultSshFuture(getCurrentTestName(), null);
AtomicInteger listenerCount = new AtomicInteger(0);
Object expected = new Object();
SshFutureListener listener = f -> {
int numListeners = Byte.SIZE;
DefaultSshFuture future = new DefaultSshFuture(getCurrentTestName(), null);
AtomicInteger listenerCount = new AtomicInteger(0);
Object expected = new Object();
SshFutureListener listener = f -> {
DefaultSshFuture future = new DefaultSshFuture(getCurrentTestName(), null);
DefaultSshFuture future = new DefaultSshFuture(getCurrentTestName(), null);
AtomicInteger listenerCount = new AtomicInteger(0);
Object expected = new Object();
SshFutureListener listener = f -> { | 0 |
package org.apache.bcel.generic;
super(org.apache.bcel.Const.I2B); | 1 |
Capture<Watcher> cw = new Capture<>();
Capture<Watcher> cw = new Capture<>(); | 0 |
* Supports translation between a Beam transform, and Spark's operations on DStreams.
throw new UnsupportedOperationException("Beam transformation " + clazz
// In Beam it depends on the PTransform's Input and Output class
* Translator matches Beam transformation with the appropriate Spark streaming evaluator. | 0 |
HelperNodeList contextNodes = null;
if (contextChild != null) {
contextNodes = new HelperNodeList();
XMLUtils.addReturnToElement(doc, contextNodes);
contextNodes.appendChild(contextChild);
XMLUtils.addReturnToElement(doc, contextNodes);
} | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/map/AbstractTestOrderedMap.java,v 1.2 2003/12/01 22:34:54 scolebourne Exp $
import org.apache.commons.collections.OrderedMap;
* @version $Revision: 1.2 $ $Date: 2003/12/01 22:34:54 $
public abstract class AbstractTestOrderedMap extends AbstractTestAMap { | 0 |
KerberosServiceDescriptor(Map<?, ?> data) {
KerberosServiceDescriptor(String name, Map<?, ?> data) { | 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 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 distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.felix.dm.lambda.samples.device;
/**
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
*/
public interface DeviceParameter {
int getDeviceId();
} | 0 |
* Returns {@code true} if the specified
* @return {@code true} if the specified
* Returns {@code true} if the specified
* @return {@code true} if the specified | 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 |
index = (bytes.getIndex() + bytes.readShort() - 1);
int end = (start + vars[j].getLength()); | 0 |
final StringBuilder nameBuf = new StringBuilder();
final StringBuilder sb = new StringBuilder();
final StringBuilder buf = new StringBuilder(); | 0 |
import java.util.Collection;
import org.junit.Assume;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
@RunWith(Parameterized.class) // see https://github.com/junit-team/junit/wiki/Parameterized-tests
private final BuiltinDHFactories factory;
public KexTest(BuiltinDHFactories factory) {
this.factory = factory;
}
@Parameters(name = "Factory={0}")
public static Collection<Object[]> parameters() {
return parameterize(BuiltinDHFactories.VALUES);
public void testClientKeyExchange() throws Exception {
Assume.assumeTrue(factory.getName() + " not supported", factory.isSupported()); | 0 |
expected.offer.offerSetModule = NoopModule.class;
"-offer_set_module=org.apache.aurora.scheduler.config.CommandLineTest$NoopModule", | 0 |
this.setMimeTypeForSerializer(environment); | 0 |
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.UUID;
import org.apache.atlas.typesystem.types.utils.TypesUtil;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
import com.thinkaurelius.titan.core.TitanGraph;
import com.thinkaurelius.titan.core.TitanProperty;
import com.thinkaurelius.titan.core.TitanVertex;
import com.tinkerpop.blueprints.Direction;
import com.tinkerpop.blueprints.Edge;
import com.tinkerpop.blueprints.Element;
import com.tinkerpop.blueprints.Graph;
import com.tinkerpop.blueprints.GraphQuery;
import com.tinkerpop.blueprints.Vertex;
*
*
public static AttributeInfo getAttributeInfoForSystemAttributes(String field) {
switch (field) {
case Constants.STATE_PROPERTY_KEY:
case Constants.GUID_PROPERTY_KEY:
return TypesUtil.newAttributeInfo(field, DataTypes.STRING_TYPE);
case Constants.TIMESTAMP_PROPERTY_KEY:
case Constants.MODIFICATION_TIMESTAMP_PROPERTY_KEY:
return TypesUtil.newAttributeInfo(field, DataTypes.LONG_TYPE);
}
return null;
}
| 0 |
if (startRow == null && endRow == null && size < 0) {
shellState.getReader().flushConsole();
String line = shellState.getReader().readLine("Merge the entire table { " + tableName + " } into one tablet (yes|no)? ");
if (line == null)
return 0;
if (!line.equalsIgnoreCase("y") && !line.equalsIgnoreCase("yes"))
return 0;
} | 1 |
import static org.apache.felix.http.base.internal.util.UriUtils.compactPath;
import static org.apache.felix.http.base.internal.util.UriUtils.concat;
import static org.apache.felix.http.base.internal.util.UriUtils.decodePath;
import static org.apache.felix.http.base.internal.util.UriUtils.relativePath;
import static org.apache.felix.http.base.internal.util.UriUtils.removeDotSegments;
import static org.junit.Assert.assertEquals;
assertEquals(null, relativePath("/foo", "/foo/")); // XXX or "/"?
assertEquals("/..foo", removeDotSegments("/..foo")); | 0 |
import com.google.inject.Inject;
import com.thinkaurelius.titan.core.util.TitanCleanup;
import org.apache.atlas.RepositoryMetadataModule;
import org.testng.annotations.Guice;
@Guice(modules = RepositoryMetadataModule.class)
@Inject
GraphProvider<TitanGraph> graphProvider;
@Inject
TypeSystem.getInstance().reset();
//TODO - Fix failure during shutdown while using BDB
graphProvider.get().shutdown();
} catch (Exception e) {
e.printStackTrace();
}
try {
TitanCleanup.clear(graphProvider.get());
} catch (Exception e) {
e.printStackTrace();
//Elasticsearch requires some time before index is updated
Thread.sleep(5000);
| 0 |
public void testClearProperty() throws Exception
public void testRegisterEntityId() throws Exception
public void testAddNodesToSubnodeConfiguration() throws Exception | 0 |
import com.google.common.collect.ImmutableMap;
public BeamSqlPrimitive evaluate(
Row inputRow, BoundedWindow window, ImmutableMap<Integer, Object> correlateEnv) {
paras.add(e.evaluate(inputRow, window, correlateEnv).getValue()); | 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 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
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ | 0 |
private int m_state = STOPPED;
if(m_state != STOPPED) { return; } // Instance already started
if(m_state == STOPPED) { return; } // Instance already stopped
m_state = STOPPED;
if (state == INVALID) { m_factory.getLogger().log(Logger.INFO, "[" + m_className + "] State -> INVALID"); }
public int getState() { return m_state; }
/**
* @see org.apache.felix.ipojo.ComponentInstance#isStarted()
*/
public boolean isStarted() { return m_state != STOPPED; } | 0 |
case UpgradeSummary:
resourceDefinition = new SimpleResourceDefinition(
Resource.Type.UpgradeSummary, "upgrade_summary", "upgrade_summary");
break;
| 0 |
*
*
*
* @version $Revision: 1.5 $
//-------------------------------------------------------------------------
* Sets the subject as a String which is used to create the
//-------------------------------------------------------------------------
} | 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 use this file except in compliance with
* the License. You may obtain a copy of the License at | 0 |
private I18n() {
// we don't allow instantiation
} | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/test/org/apache/commons/digester/plugins/TestDeclaration.java,v 1.2 2003/10/05 15:29:37 rdonkin Exp $
* $Revision: 1.2 $
* $Date: 2003/10/05 15:29:37 $
* ====================================================================
*
* Copyright (c) 2001-2003 The Apache Software Foundation. All rights
* notice, this list of conditions and the following disclaimer.
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgement:
* "This product includes software developed by the
* 4. The names "Apache", "The Jakarta Project", "Commons", and "Apache Software
* from this software without prior written permission. For written
* 5. Products derived from this software may not be called "Apache",
* "Apache" nor may "Apache" appear in their names without prior
* written permission of the Apache Software Foundation.
*/ | 0 |
private static byte[] ROW_PREFIX = "row_".getBytes(UTF_8);
private static byte[] COL_PREFIX = "col_".getBytes(UTF_8);
public static byte[] genRandomValue(Random random, byte[] dest, int seed, int row, int col) {
byte[] randomValue = new byte[opts.dataSize];
byte[] value;
byte[] value; | 0 |
import org.apache.beam.sdk.testing.NeedsRunner;
@Category(NeedsRunner.class)
@Category(RunnableOnService.class)
@Category(RunnableOnService.class) | 0 |
package org.apache.http.impl.nio.reactor;
import org.apache.http.nio.reactor.IOSession;
import javax.net.ssl.SSLException;
import javax.net.ssl.SSLSession;
import java.net.SocketAddress;
/**
* This is an extended interface of the SSLIOSessionHandler - to maintain backwards compatibility but yet solve HTTPCORE-217
*/
public interface SSLIOSessionHandlerExt extends SSLIOSessionHandler {
/**
* Triggered when the SSL connection has been established and initial SSL
* handshake has been successfully completed. Custom handlers can use
* this callback to verify properties of the {@link javax.net.ssl.SSLSession}
* and optionally set properties on the IOSession to be processed later.
* For instance this would be the right place to enforce SSL cipher
* strength, validate certificate chain and do hostname checks, and to optionally
* set the client DN as an IOSession attribute
*
* @param remoteAddress the remote address of the connection.
* @param session newly created SSL session.
* @param iosession the underlying IOSession for the SSL connection.
* @throws javax.net.ssl.SSLException if case of SSL protocol error.
*/
void verify(SocketAddress remoteAddress, SSLSession session, IOSession iosession)
throws SSLException;
} | 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 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 distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License. | 0 |
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Collections; | 0 |
/** Get the bound {@link DoFn}. */
DoFn<InputT, OutputT> getFn();
| 0 |
public class INIConfiguration extends BaseHierarchicalConfiguration implements
FileBasedConfiguration
public INIConfiguration()
* Creates a new instance of {@code INIConfiguration} with the
public INIConfiguration(HierarchicalConfiguration c)
* to the storage scheme used by {@code INIConfiguration}. | 0 |
@Deprecated | 1 |
return input
.apply(
ParDo.of(
new DoFn<T, T>() {
@ProcessElement
public void processElement(ProcessContext c) {
if (predicate.apply(c.element())) {
c.output(c.element());
}
}
}))
.setCoder(input.getCoder()); | 0 |
import com.google.cloud.dataflow.sdk.transforms.windowing.Trigger;
import com.google.cloud.dataflow.sdk.transforms.windowing.Trigger.TimeDomain;
import com.google.cloud.dataflow.sdk.transforms.windowing.Trigger.TriggerContext;
import com.google.cloud.dataflow.sdk.transforms.windowing.Trigger.TriggerId;
import com.google.cloud.dataflow.sdk.transforms.windowing.Trigger.TriggerResult;
import com.google.cloud.dataflow.sdk.transforms.windowing.Trigger.WindowStatus;
trigger.onElement(triggerContext,
value.getValue(), value.getTimestamp(), window, status)); | 0 |
assertEquals(Double.valueOf(0.0), reader.getFractionConsumed());
assertEquals(Double.valueOf(0.0), reader.getFractionConsumed()); | 0 |
* {@link HttpServerRequestHandler} implementation that delegates request processing
* to a {@link HttpServerFilterChainElement}.
* | 0 |
import org.apache.cocoon.portal.LayoutException; | 0 |
* The interface(s) to use when registering adapters. By default, directly implemented
* interfaces will be registered in the OSGi registry.
*/
Class<?>[] provides() default {};
/**
* Adapter Service properties. Notice that public factory configuration is also registered in service properties,
* (only if propagate is true). Public factory configuration properties are those which don't starts with a dot (".").
*/
Property[] properties() default {};
/** | 0 |
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument;
import org.apache.beam.vendor.guava.v20_0.com.google.common.base.Joiner; | 0 |
// System.out.println("GetBounds2D called");
// System.out.println("Rendering called");
// System.out.println("R2d: " + r2d);
// System.out.println("AOI: " + aoiR2d);
| 0 |
public static final String AGGREGATORS_SKIP_BLOCK_CACHE =
"timeline.metrics.aggregators.skip.blockcache.enabled";
| 0 |
* The parent element of a used element is the <use> element | 0 |
final HttpHost target = authority != null ? new HttpHost(scheme, authority) : route.getTargetHost(); | 0 |
/** LeftJoin builder which adds input {@link Dataset} to operator under build. */
/** LeftJoin builder which adds key extractors to operator under build. */
/** LeftJoin builder which adds joining function to operator under build. */ | 0 |
* @param uriInfo the host info, with no SSL key information | 0 |
import org.apache.sshd.sftp.subsystem.SftpConstants;
public class SshFxpMkdirRequest extends BaseRequest {
public SftpConstants.Type getMessage() {
return SftpConstants.Type.SSH_FXP_MKDIR;
}
return getName() + "[path=" + path + "]"; | 0 |
cfg.setSiteConfig(siteConfig);
| 0 |
public T from(File f) throws Exception {
IO.copy(f, this);
return digest();
}
public T from(byte[] f) throws Exception {
IO.copy(f, this);
return digest();
} | 0 |
LOG.warn("Ignore the error and retry the request.", e); | 0 |
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument;
import org.apache.beam.vendor.guava.v20_0.com.google.common.base.Predicates;
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList;
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Lists;
org.apache.beam.vendor.guava.v20_0.com.google.common.io.Files.isFile(), | 0 |
import cz.seznam.euphoria.shadow.com.google.common.collect.Iterables; | 0 |
* @author William Farner
// TODO(John Sirois): XXX verify reads are behind barriers
// TODO(William Farner): Might have to be smarter here so as to not be burned by different | 0 |
import static org.apache.accumulo.fate.util.UtilWaitThread.sleepUninterruptibly; | 0 |
@Deprecated
@Deprecated | 0 |
import org.osgi.service.command.CommandSession;
import org.osgi.service.command.Converter;
import org.osgi.service.threadio.ThreadIO; | 0 |
log.trace("next({})[{}][K_S]: {}", this, session, BufferUtils.toHex(k_s));
log.trace("next({})[{}][f]: {}", this, session, BufferUtils.toHex(f));
log.trace("next({})[{}][sigH]: {}", this, session, BufferUtils.toHex(sigH)); | 0 |
/**
* Wrapper class for TAB completion to service names.
*/
public class Service extends AbstractCompletion {
super(name); | 0 |
* with {@link org.apache.commons.net.DatagramSocketClient#open open }
* and call {@link #send send } to send the datagram that will
* call {@link #receive receive }, and you're done. For netstat and
* {@link org.apache.commons.net.DatagramSocketClient#close close() } | 0 |
import java.util.Iterator;
Iterator<ChangeRecord> iter = zks.outstandingChanges.descendingIterator();
while (iter.hasNext()) {
ChangeRecord c = iter.next();
long firstZxid = zks.outstandingChanges.peek().zxid; | 0 |
* @since 1.7
* @since 1.7 | 0 |
+ "(\\S*)\\s*" // 12
+ "(\\S+)\\s*" // 13
+ "(\\S*)\\s*" // 14 user
+ "(\\d*)\\s*" // 15 group
+ "(\\d*)\\s*" // 16 filesize
+ MONTHS // 17 month
+ "\\s*" // TODO should the space be optional?
// TODO \\d* should be \\d? surely ? Otherwise 01111 is allowed
+ "((?:[012]\\d*)|(?:3[01]))\\s*" // 18 date [012]\d* or 3[01]
+ "((\\d\\d\\d\\d)|((?:[01]\\d)|(?:2[0123])):([012345]\\d))\\s"
// 20 \d\d\d\d = year OR
// 21 [01]\d or 2[0123] hour + ':'
// 22 [012345]\d = minute
+ "(\\S*)(\\s*.*)"; // 23 name
// it's a year; there are no hours and minutes | 0 |
for (byte element : arrayOctet)
{
if (isBase64(element)) { | 0 |
import com.google.common.collect.Lists;
import com.google.common.collect.Sets; | 0 |
LOG.info("==> AtlasTypeDefGraphStoreV1.init()");
LOG.info("<== AtlasTypeDefGraphStoreV1.init()"); | 0 |
import org.apache.ambari.logsearch.solr.SolrConstants;
import org.apache.commons.lang.StringUtils;
import org.springframework.data.solr.core.query.SimpleFacetQuery;
@Override
public void appendFacetQuery(SimpleFacetQuery facetQuery, FieldAuditLogRequest request) {
addInFiltersIfNotNullAndEnabled(facetQuery, request.getUserList(),
SolrConstants.AuditLogConstants.AUDIT_REQUEST_USER,
StringUtils.isNotBlank(request.getUserList()));
} | 0 |
+ " sessionId=" + Long.toHexString(sessionId) | 0 |
import org.apache.batik.bridge.Mark; | 0 |
package org.apache.felix.sigil.ui.eclipse.ui.editors.project;
import org.apache.felix.sigil.eclipse.SigilCore;
import org.apache.felix.sigil.eclipse.model.project.ISigilProjectModel;
import org.apache.felix.sigil.model.eclipse.ISigilBundle;
import org.apache.felix.sigil.ui.eclipse.ui.SigilUI;
import org.apache.felix.sigil.ui.eclipse.ui.form.SigilPage;
import org.apache.felix.sigil.ui.eclipse.ui.util.ModelLabelProvider; | 0 |
import org.slf4j.LoggerFactory;
sleep = Math.max(sleep, (AddressUtil.getAddressCacheNegativeTtl((UnknownHostException) (exception.getCause())) + 1) * 1000); | 0 |
PCollection<OutputT> output = (PCollection<OutputT>) context.getOutput();
context.getInput());
context.setOutputStream(context.getOutput(), outputStream); | 0 |
repeater.clear(); | 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 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
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.accumulo.server.test.functional;
import java.util.List;
import org.apache.accumulo.core.constraints.Constraint;
import org.apache.accumulo.core.data.Mutation;
import org.apache.accumulo.core.util.UtilWaitThread;
/**
*
*/
public class SlowConstraint implements Constraint {
@Override
public String getViolationDescription(short violationCode) {
return null;
}
@Override
public List<Short> check(Environment env, Mutation mutation) {
UtilWaitThread.sleep(20000);
return null;
}
} | 0 |
static final String ERROR_CONTEXT_NULL =
public DefaultImageHandler() {
public void handleImage(Image image, Element imageElement,
SVGGeneratorContext generatorContext) {
handleHREF(image, imageElement, generatorContext);
public void handleImage(RenderedImage image, Element imageElement,
SVGGeneratorContext generatorContext) {
handleHREF(image, imageElement, generatorContext);
public void handleImage(RenderableImage image, Element imageElement,
SVGGeneratorContext generatorContext) {
handleHREF(image, imageElement, generatorContext);
protected void handleHREF(Image image, Element imageElement,
SVGGeneratorContext generatorContext) {
protected void handleHREF(RenderedImage image, Element imageElement,
SVGGeneratorContext generatorContext) {
protected void handleHREF(RenderableImage image, Element imageElement,
SVGGeneratorContext generatorContext) { | 0 |
/*
* $Id$
* 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 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 distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/ | 0 |
TreeSet<Long> rows = new TreeSet<>(); | 1 |
import java.net.URL;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
import org.apache.batik.dom.svg.SAXSVGDocumentFactory; | 0 |
try (SshServer sshd = new SshServer()) {
try (SshServer sshd = createTestServer()) {
try (SshServer sshd = createTestServer()) {
try (SshServer sshd = createTestServer()) {
| 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 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 distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License. | 0 |
import org.apache.accumulo.core.util.shell.Token; | 0 |
ExitCodeException ece = new ExitCodeException(e.getExitCode(), "stderr: " + e.getMessage() + ", stdout: " + output);
log.error("Failed to run command", ece);
return Maps.immutableEntry(e.getExitCode(), output); | 0 |
import org.apache.accumulo.core.util.SslConnectionParams;
return getTransport(String.format("%s:%d", addr.getHostText(), addr.getPort()), conf.getTimeInMillis(Property.GENERAL_RPC_TIMEOUT), SslConnectionParams.forClient(conf));
public TTransport getTransport(String location, long milliseconds, SslConnectionParams sslParams) throws TTransportException {
return getTransport(new ThriftTransportKey(location, milliseconds, sslParams));
TTransport transport = ThriftUtil.createClientTransport(HostAndPort.fromParts(cacheKey.getLocation(), cacheKey.getPort()), (int)cacheKey.getTimeout(), cacheKey.getSslParams());
| 0 |
import com.google.common.collect.ImmutableList;
public static TriggerStateMachine inOrder(Iterable<? extends TriggerStateMachine> triggers) {
return new AfterEachStateMachine(ImmutableList.copyOf(triggers));
}
| 0 |
* Copyright 2000-2009 The Apache Software Foundation | 0 |
* Returns snapshot of all knows routes
*
* @since 4.4
*/
public Set<T> getRoutes() {
this.lock.lock();
try {
return new HashSet<T>(routeToPool.keySet());
} finally {
this.lock.unlock();
}
}
/** | 0 |
import org.apache.sshd.client.UserInteraction;
if (cmd == SshConstants.Message.SSH_MSG_USERAUTH_BANNER) {
String welcome = buffer.getString();
String lang = buffer.getString();
log.debug("Welcome banner: " + welcome);
UserInteraction ui = getClientFactoryManager().getUserInteraction();
if (ui != null) {
ui.welcome(welcome);
}
} else {
buffer.rpos(buffer.rpos() - 1);
switch (userAuth.next(buffer)) {
case Success:
authFuture.setAuthed(true);
username = userAuth.getUsername();
authed = true;
setState(State.Running);
startHeartBeat();
break;
case Failure:
authFuture.setAuthed(false);
userAuth = null;
setState(State.WaitForAuth);
break;
case Continued:
break;
} | 0 |
@Override
@Override | 0 |
* Extension of {@link AbstractTestSet} for exercising the | 0 |
import org.apache.beam.runners.core.metrics.MetricsContainerImpl;
MetricsContainerImpl container = new MetricsContainerImpl("any");
MetricsEnvironment.setCurrentContainer(container);
long droppedValues = container.getCounter(
droppedValues = container.getCounter( | 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
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ | 0 |
import static org.junit.Assert.assertTrue;
| 0 |
*
*
*
/**
//------------------------------------------------------------------------- | 1 |
/**
* @deprecated (4.1) do not use
*/ | 0 |
import org.apache.beam.model.fnexecution.v1.BeamFnApi; | 0 |
boolean caughtException = false; | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.