Diff
stringlengths 5
2k
| FaultInducingLabel
int64 0
1
|
---|---|
* @deprecated use {@link HttpAsyncRequestExecutor} and {@link HttpAsyncRequester} | 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 | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/map/TestUnmodifiableMap.java,v 1.5 2003/12/01 22:34:54 scolebourne Exp $
* @version $Revision: 1.5 $ $Date: 2003/12/01 22:34:54 $
public class TestUnmodifiableMap extends AbstractTestAMap{ | 0 |
import org.apache.beam.sdk.values.TypeDescriptor;
public interface TypeDescriptorAware<T> extends Serializable {
* @return {@link TypeDescriptor} associated with this object
TypeDescriptor<T> getTypeDescriptor(); | 0 |
import org.apache.xml.security.utils.XMLUtils;
Base64OutputStream base64EncoderStream = null;
if (XMLUtils.isIgnoreLineBreaks()) {
base64EncoderStream = new Base64OutputStream(characterEventGeneratorOutputStream, true, 0, null);
} else {
base64EncoderStream = new Base64OutputStream(characterEventGeneratorOutputStream, true);
} | 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 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 |
* A quicklinks profile is essentially a set of quick link filters defined on three levels:
* <p>For each link, filters are evaluated bottom up: component level filters take priority to service level filters
* and service level filters take priority to global filters.</p>
* <p>When a quick link profile is set in Ambari, then each quick link's visibility flag is updated according to the profile
* before being returned by {@link org.apache.ambari.server.controller.internal.QuickLinkArtifactResourceProvider}.</p>
* <p>When no profile is set, all quick link's visibility flat will be set to {@code true} by the provider</p> | 0 |
private final boolean isFile;
this.isFile=false;
this.isFile=true;
public boolean isFile(){
return isFile;
}
| 0 |
import org.apache.beam.runners.spark.translation.streaming.utils.SparkTestPipelineOptions;
public final SparkTestPipelineOptions pipelineOptions = new SparkTestPipelineOptions(); | 0 |
sb.append("User, username=").append(userName); | 0 |
if ( pattern.equals("/") )
{
this.patterns = new String[] {"/", "/*"};
}
else
{
this.patterns = new String[] {pattern, pattern + "/*"};
} | 0 |
import org.apache.sshd.server.auth.pubkey.AcceptAllPublickeyAuthenticator; | 0 |
void dumpState(final StringBuilder buf) {
buf.append("requestState=").append(requestState)
.append(", responseState=").append(responseState)
.append(", responseCommitted=").append(requestCommitted)
.append(", keepAlive=").append(keepAlive)
.append(", done=").append(done);
}
final StringBuilder buf = new StringBuilder();
buf.append("[");
dumpState(buf);
buf.append("]");
return buf.toString(); | 0 |
* $HeadURL$
* $Revision$
* $Date$
* {@link HttpParams} implementation that delegates resolution of a parameter
* to the given default {@link HttpParams} instance if the parameter is not
* present in the local one. The state of the local collection can be mutated,
* whereas the default collection is treated as read-only.
* @version $Revision$
public final class DefaultedHttpParams extends AbstractHttpParams {
private final HttpParams local;
private final HttpParams defaults;
public DefaultedHttpParams(final HttpParams local, final HttpParams defaults) {
if (local == null) {
this.local = local;
this.defaults = defaults;
/**
* Creates a copy of the local collection with the same default
*/
HttpParams clone = this.local.copy();
return new DefaultedHttpParams(clone, this.defaults);
/**
* Retrieves the value of the parameter from the local collection and, if the
* parameter is not set locally, delegates its resolution to the default
* collection.
*/
Object obj = this.local.getParameter(name);
if (obj == null && this.defaults != null) {
obj = this.defaults.getParameter(name);
/**
* Attempts to remove the parameter from the local collection. This method
* <i>does not</i> modify the default collection.
*/
return this.local.removeParameter(name);
/**
* Sets the parameter in the local collection. This method <i>does not</i>
* modify the default collection.
*/
return this.local.setParameter(name, value);
public HttpParams getDefaults() {
return this.defaults; | 0 |
* @version CVS $Id: PortalManagerImpl.java,v 1.3 2003/07/03 08:27:47 cziegeler Exp $
* @see PortalManager#showPortal(ContentHandler, Parameters) | 0 |
package org.apache.bcel.generic;
super(org.apache.bcel.Const.DUP_X2); | 1 |
import java.util.NoSuchElementException;
@Test
public void testAccumulateExceptionOnNullValues() {
assertNull("Unexpected null/null result", GenericUtils.accumulateException(null, null));
Throwable expected=new NoSuchMethodException(getClass().getName() + "#" + getCurrentTestName());
assertSame("Mismatched null/extra result", expected, GenericUtils.accumulateException(null, expected));
assertSame("Mismatched current/null result", expected, GenericUtils.accumulateException(expected, null));
}
@Test
public void testAccumulateExceptionOnExistingCurrent() {
RuntimeException[] expected=new RuntimeException[] {
new IllegalArgumentException(getCurrentTestName()),
new ClassCastException(getClass().getName()),
new NoSuchElementException(getClass().getPackage().getName())
};
RuntimeException current=new UnsupportedOperationException("top");
for (RuntimeException extra : expected) {
RuntimeException actual=GenericUtils.accumulateException(current, extra);
assertSame("Mismatched returned actual exception", current, actual);
}
Throwable[] actual=current.getSuppressed();
assertArrayEquals("Suppressed", expected, actual);
} | 0 |
package org.apache.xml.security.c14n.implementations;
import junit.framework.Test;
import junit.framework.TestSuite;
public class AllTests {
public static Test suite() {
TestSuite suite = new TestSuite(
"Test for org.apache.xml.security.c14n.implementations");
//$JUnit-BEGIN$
suite.addTest(NameSpaceSymbTableTest.suite());
suite.addTest(UtfHelperTest.suite());
//$JUnit-END$
return suite;
}
} | 0 |
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Sets;
/**
* The key property ids for a Feed resource.
*/
private static Map<Resource.Type, String> keyPropertyIds = ImmutableMap.<Resource.Type, String>builder()
.put(Resource.Type.DRFeed, FEED_NAME_PROPERTY_ID)
.build();
/**
* The property ids for a Feed resource.
*/
private static Set<String> propertyIds = Sets.newHashSet(
FEED_NAME_PROPERTY_ID,
FEED_DESCRIPTION_PROPERTY_ID,
FEED_STATUS_PROPERTY_ID,
FEED_SCHEDULE_PROPERTY_ID,
FEED_SOURCE_CLUSTER_NAME_PROPERTY_ID,
FEED_SOURCE_CLUSTER_START_PROPERTY_ID,
FEED_SOURCE_CLUSTER_END_PROPERTY_ID,
FEED_SOURCE_CLUSTER_LIMIT_PROPERTY_ID,
FEED_SOURCE_CLUSTER_ACTION_PROPERTY_ID,
FEED_TARGET_CLUSTER_NAME_PROPERTY_ID,
FEED_TARGET_CLUSTER_START_PROPERTY_ID,
FEED_TARGET_CLUSTER_END_PROPERTY_ID,
FEED_TARGET_CLUSTER_LIMIT_PROPERTY_ID,
FEED_TARGET_CLUSTER_ACTION_PROPERTY_ID,
FEED_PROPERTIES_PROPERTY_ID);
public FeedResourceProvider(IvoryService ivoryService) {
return new HashSet<>(keyPropertyIds.values()); | 0 |
import cz.seznam.euphoria.core.client.dataset.HashPartitioner;
import cz.seznam.euphoria.flink.Utils;
import cz.seznam.euphoria.flink.functions.PartitionerWrapper;
DataSet<WindowedElement<?, ?, Pair>> reduced;
reduced = tuples.groupBy(new TypedKeySelector<>())
// apply custom partitioner if different from default HashPartitioner
if (!(origOperator.getPartitioning().getPartitioner().getClass() == HashPartitioner.class)) {
reduced = reduced
.partitionCustom(new PartitionerWrapper<>(
origOperator.getPartitioning().getPartitioner()),
Utils.wrapQueryable(
(WindowedElement<?, ?, Pair> we) -> (Comparable) we.get().getKey(),
Comparable.class))
.setParallelism(operator.getParallelism());
}
return reduced;
| 0 |
public class XMLSecurityEventReaderTest extends Assert { | 0 |
if (Utils.secureValidation(xc)) { | 0 |
import java.util.concurrent.Future;
final Future<ListenerEndpoint> future = listen(new InetSocketAddress(0));
final ListenerEndpoint listener = future.get(); | 0 |
expect(userDAO.findAll()).andReturn(Collections.<UserEntity>emptyList()).anyTimes();
expect(userDAO.findAll()).andReturn(Collections.<UserEntity>emptyList()).anyTimes(); | 0 |
* @param opcode opcode of instruction
* @param target Target instruction to branch to | 0 |
import org.apache.beam.model.pipeline.v1.RunnerApi.PTransform;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static final Logger LOG = LoggerFactory.getLogger(GreedyPCollectionFusers.class);
LOG.debug(
"Unknown {} {} will not fuse into an existing {}",
PTransform.class.getSimpleName(),
transform.getTransform(),
ExecutableStage.class.getSimpleName(),
PTransform.class.getSimpleName());
return false;
// Things with unknown URNs either execute within their own stage or are executed by the runner.
// In either case, assume the
LOG.debug(
"Unknown {} {} will not root a {} with other {}",
PTransform.class.getSimpleName(),
transform.getTransform(),
ExecutableStage.class.getSimpleName(),
PTransform.class.getSimpleName());
return false; | 0 |
import org.apache.accumulo.server.security.SystemCredentials;
MetadataTableUtil.moveMetaDeleteMarkers(instance, SystemCredentials.get().getAsThrift());
return instance.getConnector(SystemCredentials.get().getPrincipal(), SystemCredentials.get().getToken());
TCredentials systemAuths = SystemCredentials.get().getAsThrift(); | 1 |
import org.apache.beam.sdk.PipelineRunner; | 0 |
import org.apache.ambari.server.DuplicateResourceException;
try {
clusters.mapHostToCluster(h1, c1);
fail("Expected exception for duplicate");
} catch (DuplicateResourceException e) {
// expected
} | 0 |
private static final String CATEGORY = "Web Console";
public String getCategory()
{
return CATEGORY;
}
| 0 |
* @throws SQLException - if a database access error occurs | 0 |
/**
* Inserts 10K rows (50K entries) into accumulo with each row having 5 entries using an OutputFormat.
*/
System.out.println("Usage: bin/tool.sh " + this.getClass().getName() + " <instance name> <zoo keepers> <username> <password> <tablename>"); | 0 |
* TODO(William Farner): Consider accepting SanitizedConfiguration here to require that
* validation always happens for things entering storage. | 0 |
/*****************************************************************************
* Copyright (C) The Apache Software Foundation. All rights reserved. *
* ------------------------------------------------------------------------- *
* This software is published under the terms of the Apache Software License *
* version 1.1, a copy of which has been included with this distribution in *
* the LICENSE file. *
*****************************************************************************/
package org.apache.batik.bridge;
import org.w3c.dom.Element;
import java.awt.Cursor;
/**
* Factory class for vending <tt>Cursor</tt> objects.
*
* @author <a href="mailto:[email protected]">Thierry Kormann</a>
* @version $Id$
*/
public interface CursorBridge extends Bridge {
/**
* Creates a <tt>Cursor</tt> using the specified context and element.
* @param ctx the context to use
* @param element the Element with the 'cursor' attribute
*/
Cursor createCursor(BridgeContext ctx, Element element);
/**
* Updates an Element coresponding to the specified BridgeMutationEvent.
* @param evt the event that describes the modification to perform
*/
void update(BridgeMutationEvent evt);
} | 1 |
public boolean hasPendingHostRequests() {
return !requestsWithReservedHosts.isEmpty() || !outstandingHostRequests.isEmpty();
public int getPendingHostRequestCount() {
return outstandingHostRequests.size() + requestsWithReservedHosts.size();
}
/**
* Removes pending host requests (outstanding requests not picked up by any host, where hostName is null) for a host group.
* @param hostGroupName
* @return
*/
public Collection<HostRequest> removePendingHostRequests(String hostGroupName) {
Collection<HostRequest> pendingHostRequests = new ArrayList<>();
for(HostRequest hostRequest : outstandingHostRequests) {
if(hostGroupName == null || hostRequest.getHostgroupName().equals(hostGroupName)) {
pendingHostRequests.add(hostRequest);
}
}
outstandingHostRequests.clear();
Collection<String> pendingReservedHostNames = new ArrayList<>();
for(String reservedHostName : requestsWithReservedHosts.keySet()) {
HostRequest hostRequest = requestsWithReservedHosts.get(reservedHostName);
if(hostGroupName == null || hostRequest.getHostgroupName().equals(hostGroupName)) {
pendingHostRequests.add(hostRequest);
pendingReservedHostNames.add(reservedHostName);
}
}
for (String hostName : pendingReservedHostNames) {
requestsWithReservedHosts.remove(hostName);
}
allHostRequests.removeAll(pendingHostRequests);
return pendingHostRequests;
}
| 0 |
type.hosts.addAll(Arrays.asList("h1", "h2", "h3"));
type.hosts.addAll(Arrays.asList("h1", "h2"));
type.hosts.addAll(Arrays.asList("h2", "h3", "h4"));
type.hosts.addAll(Arrays.asList("h2", "h3"));
type.hosts.addAll(Arrays.asList("h2"));
type.hosts.addAll(Arrays.asList("h1", "h3")); | 0 |
import org.apache.hadoop.metrics2.sink.timeline.query.DefaultPhoenixDataSource;
import org.apache.hadoop.metrics2.sink.timeline.query.PhoenixConnectionProvider;
conn = dataSource.getConnectionRetryingOnException(retryCounterFactory); | 0 |
private final AtomicLong failedOffers = Stats.exportLong("scheduler_failed_offers");
private final AtomicLong failedStatusUpdates = Stats.exportLong("scheduler_status_updates");
private final Lifecycle lifecycle;
/**
* Creates a new mesos scheduler.
*
* @param schedulerCore Core scheduler.
* @param lifecycle Application lifecycle manager.
* @param taskLaunchers Task launchers.
* @param slaveMapper Slave information accumulator.
*/
this.lifecycle = checkNotNull(lifecycle);
public void registered(final SchedulerDriver driver, FrameworkID fId) {
LOG.info("Registered with ID " + fId);
this.frameworkID = fId;
failedOffers.incrementAndGet();
if (launcher.statusUpdate(status)) {
}
failedStatusUpdates.incrementAndGet();
lifecycle.shutdown();
public interface SlaveHosts {
public interface SlaveMapper {
/**
* In-memory slave host mapper.
*/ | 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 |
// FIXME: complexity is O(n)
// FIXME: complexity is O(n)
// FIXME: complexity is O(n) | 0 |
* @deprecated Replaced by the new {@link ArrayConverter} implementation | 0 |
import org.apache.accumulo.fate.ReadOnlyTStore.TStatus; | 0 |
import org.apache.ambari.logsearch.conf.AuthPropsConfig;
private AuthPropsConfig authPropsConfig;
url = authPropsConfig.getExternalAuthHostUrl() + url; | 0 |
cat.debug("java.class.path : " + System.getProperty("java.class.path"));
cat.debug("java.library.path : " + System.getProperty("java.library.path"));
cat.debug("java.runtime.name : " + System.getProperty("java.runtime.name"));
cat.debug("java.runtime.version : " + System.getProperty("java.runtime.version"));
cat.debug("java.specification.name : " + System.getProperty("java.specification.name"));
cat.debug("java.specification.vendor : " + System.getProperty("java.specification.vendor"));
cat.debug("java.specification.version : " + System.getProperty("java.specification.version"));
cat.debug("java.vendor : " + System.getProperty("java.vendor"));
cat.debug("java.version : " + System.getProperty("java.version"));
cat.debug("java.vm.info : " + System.getProperty("java.vm.info"));
cat.debug("java.vm.name : " + System.getProperty("java.vm.name"));
cat.debug("java.vm.version : " + System.getProperty("java.vm.version"));
cat.debug("os.arch : " + System.getProperty("os.arch"));
cat.debug("os.name : " + System.getProperty("os.name"));
cat.debug("os.version : " + System.getProperty("os.version")); | 0 |
public static final String METHOD_CACHE_SIZE = "org.apache.felix.dependencymanager.methodcache"; | 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 | 0 |
public RequestDispatcherImpl(final ServletResolution resolution,
filterChain.doFilter( req, response);
filterChain.doFilter( req, response); | 0 |
* @see <a href="http://en.wikipedia.org/wiki/FTPS#Implicit">Wikipedia: FTPS/Implicit</a> | 0 |
@Override
@Override | 0 |
import java.util.ArrayList;
import java.util.List;
* @param factory | 0 |
private List<Map<String, Object>> beans;
public List<Map<String, Object>> getBeans() {
public void setBeans(List<Map<String, Object>> beans) {
for (Map<String, Object> map : beans) {
for (Map.Entry<String, Object> entry : map.entrySet()) {
stringBuilder.append(" ").append(entry.toString()).append("\n"); | 0 |
TRAIT_DELETE,
TRAIT_UPDATE | 0 |
* Instantiation of BagUtils is not intended or required.
private BagUtils() {} | 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.atlas.gremlin.optimizer;
import org.apache.atlas.groovy.GroovyExpression;
/**
* An optimization that can be applied to a gremlin query.
*/
public interface GremlinOptimization {
/**
* Whether or not this optimization should be applied to the given expression
* @param expr
* @param contxt
* @return
*/
boolean appliesTo(GroovyExpression expr, OptimizationContext contxt);
/**
* Whether or not GremlinQueryOptimizer should call this optimization recursively
* on the updated children.
*/
boolean isApplyRecursively();
/**
* Applies the optimization.
*
* @param expr
* @param context
* @return the optimized expression
*/
GroovyExpression apply(GroovyExpression expr, OptimizationContext context);
} | 0 |
public static long UPDATE_WAIT_TIME = 2000;
ots.addTestSuite(ManagedServiceFactoryTestForServices.class);
| 0 |
this.zPath = ZooUtil.getRoot(master.getInstanceID()) + Constants.ZMASTER_TICK; | 0 |
* @version CVS $Id: WebApplicationDefinitionImpl.java,v 1.3 2004/01/27 08:05:34 cziegeler Exp $
public String icon;
public String distributable;
public String sessionConfig;
public String welcomeFileList;
public String errorPage;
public String taglib;
public String resourceRef;
public String securityConstraint;
public String loginConfig;
public String securityRole;
public String envEntry;
public String ejbRef;
private String contextPath;
private ObjectID objectId; | 0 |
import com.google.common.base.Function;
import com.google.common.base.MoreObjects;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import java.util.List;
import java.util.Objects; | 0 |
private static String urlEncode(
private static String urlDecode(
return urlDecode(content, charset != null ? Charset.forName(charset) : Consts.UTF_8, true);
return urlDecode(content, charset != null ? charset : Consts.UTF_8, true);
return urlEncode(content, charset != null ? Charset.forName(charset) :
return urlEncode(content, charset != null ? charset : Consts.UTF_8, URLENCODER, true);
return urlEncode(content, charset, USERINFO, false);
return urlEncode(content, charset, URIC, false);
return urlEncode(content, charset, PATHSAFE, false); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/Attic/TestAll.java,v 1.22 2003/09/27 10:54:06 scolebourne Exp $
* @version $Revision: 1.22 $ $Date: 2003/09/27 10:54:06 $ | 0 |
import org.apache.commons.digester3.rule.RulesBinder;
import org.apache.commons.digester3.rule.SetNestedPropertiesRule; | 0 |
/**
* <b>DOM</b>: Implements {@link org.w3c.dom.svg.SVGElement#getXMLbase()}.
*/
public String getXMLbase() {
return null;
}
/**
* <b>DOM</b>: Implements {@link org.w3c.dom.svg.SVGElement#setXMLbase(String)}.
*/
public void setXMLbase(String xmlbase) throws DOMException {
}
| 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.ambari.server.security.authentication;
import org.springframework.security.core.AuthenticationException;
/**
* AmbariAuthenticationException is an AuthenticationException implementation to be thrown
* when the user fails to authenticate with Ambari.
*/
public class AmbariAuthenticationException extends AuthenticationException {
private final String username;
public AmbariAuthenticationException(String username, String message) {
super(message);
this.username = username;
}
public AmbariAuthenticationException(String username, String message, Throwable throwable) {
super(message, throwable);
this.username = username;
}
public String getUsername() {
return username;
}
} | 0 |
final Constant c = cp.getConstant(name_index, Const.CONSTANT_Utf8); | 1 |
GLOSSARY_ALREADY_EXISTS(409, "ATLAS-409-00-007", "Glossary with qualifiedName {0} already exists"),
GLOSSARY_TERM_ALREADY_EXISTS(409, "ATLAS-409-00-009", "Glossary term with qualifiedName {0} already exists"),
GLOSSARY_CATEGORY_ALREADY_EXISTS(409, "ATLAS-409-00-00A", "Glossary category with qualifiedName {0} already exists"), | 0 |
Copyright 2000-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 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 |
/*****************************************************************************
* Copyright (C) The Apache Software Foundation. All rights reserved. *
* ------------------------------------------------------------------------- *
* This software is published under the terms of the Apache Software License *
* version 1.1, a copy of which has been included with this distribution in *
* the LICENSE file. *
*****************************************************************************/
package org.apache.batik.ext.awt;
import java.awt.RenderingHints;
import java.awt.image.BufferedImage;
/**
* This class is here to workaround a javadoc problem. It is only used by
* <code>GraphicsNode</code>.
*
* @author <a href="mailto:[email protected]">Christophe Jolif</a>
* @version $Id$
*/
final class BufferedImageHintKey extends RenderingHints.Key {
BufferedImageHintKey() {
super(1001);
}
public boolean isCompatibleValue(Object val) {
if (val == null)
return true;
if (val instanceof BufferedImage)
return true;
return false;
}
}
| 0 |
if (code.getCode().length >= Constants.MAX_CODE_SIZE){// length must be LESS than the max
"Code array in code attribute '"+code+"' too big: must be smaller than "+Constants.MAX_CODE_SIZE+"65536 bytes."); | 0 |
private final ControlClientPool<FnApiControlClient> pool = QueueControlClientPool.createLinked();
pool.getSink(), GrpcContextHeaderAccessorProvider.getHeaderAccessor());
FnApiControlClient client = pool.getSource().take();
pool.getSource().take(); | 0 |
import org.apache.http.entity.mime.MultipartEntity;
MultipartEntity reqEntity = new MultipartEntity(); | 0 |
import java.io.IOException;
protected void doOpen() throws IOException { | 0 |
* @version $Id: ASTNENode.java,v 1.7 2004/08/22 01:53:27 dion Exp $
return (!left.equals(right)) ? Boolean.TRUE : Boolean.FALSE;
return (!Coercion.coerceDouble(left).equals(Coercion.coerceDouble(right)))
? Boolean.TRUE : Boolean.FALSE;
return (!Coercion.coerceLong(left).equals(Coercion.coerceLong(right)))
? Boolean.TRUE : Boolean.FALSE;
return (!Coercion.coerceBoolean(left).equals(Coercion.coerceBoolean(right)))
? Boolean.TRUE : Boolean.FALSE;
return (!left.toString().equals(right.toString())) ? Boolean.TRUE : Boolean.FALSE;
return (!left.equals(right)) ? Boolean.TRUE : Boolean.FALSE; | 0 |
byte[] serializedOctets = null;
serializedOctets = serializer.serializeToByteArray(children);
serializedOctets = serializer.serializeToByteArray(element);
encryptedBytes = c.doFinal(serializedOctets);
Integer.toString(c.getOutputSize(serializedOctets.length)));
byte[] octets = decryptToByteArray(element); | 0 |
for (OffsetBasedSource<T> split : super.splitIntoBundles(desiredBundleSizeBytes, options)) { | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/ExtendedBaseRules.java,v 1.9 2003/10/13 20:52:21 rdonkin Exp $
* $Revision: 1.9 $
* $Date: 2003/10/13 20:52:21 $
* @version $Revision: 1.9 $ $Date: 2003/10/13 20:52:21 $
rulesList = findExactAncesterMatch(pattern); | 0 |
@SuppressWarnings("deprecation") | 0 |
import org.apache.batik.ext.awt.image.rendered.TranslateRed;
AffineTransform at, rcAT;
at = nodeRenderContext.getTransform();
rcAT = new AffineTransform(at.getScaleX(), at.getShearY(),
at.getShearX(), at.getScaleY(),
0, 0);
(rcAT, null,
int dx = Math.round((float)at.getTranslateX()+0.5f);
int dy = Math.round((float)at.getTranslateY()+0.5f);
rootCR = new TranslateRed(rootCR, rootCR.getMinX()+dx,
rootCR.getMinY()+dy); | 0 |
return Long.parseLong(value) * 1000; | 0 |
import org.apache.atlas.kafka.NotificationProvider;
protected static NotificationInterface notificationInterface;
notificationInterface = NotificationProvider.get();
notifyEntitiesInternal(messages, maxRetries, notificationInterface, logFailedMessages, failedMessagesLogger); | 0 |
try {
return Enum.valueOf((Class<Enum>) resultType, input);
} catch( Exception e) {
input = input.toUpperCase();
return Enum.valueOf((Class<Enum>) resultType, input);
} | 0 |
import org.apache.batik.util.DoublyIndexedTable; | 0 |
* {@link PCollection} of {@link TableRow TableRows} containing each of the rows of the table.
* {@link PCollection} of {@link TableRow TableRows}.
* A {@link PTransform} that writes a {@link PCollection} containing {@link TableRow TableRows}
* {@link PCollection} of {@link TableRow TableRows} to a BigQuery table. | 0 |
assertEquals(Integer.valueOf(i), orderedList.get(i)); | 0 |
import java.nio.charset.StandardCharsets;
p.load(new ByteArrayInputStream(
propText.replace(';', '\n').getBytes(StandardCharsets.ISO_8859_1))); | 0 |
import java.util.concurrent.ExecutorService;
| 0 |
fail(exprs[e] + " : should have failed due to null argument"); | 0 |
import java.util.HashSet;
import java.util.Set;
import junit.framework.Assert; | 0 |
return new DynamicSelectionList(datatype, uri, this.xmlizer, this.sourceResolver, this.processInfoProvider.getRequest()); | 0 |
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
static final Log LOGGER = LogFactory.getLog(ParseFailuresTest.class.getName()); | 0 |
package org.apache.aurora.scheduler.storage;
import com.google.inject.Guice;
import com.google.inject.Module;
public abstract class AbstractTaskStoreTest {
protected abstract Module getStorageModule();
public void baseSetUp() {
storage = Guice.createInjector(getStorageModule()).getInstance(Storage.class);
storage.prepare(); | 0 |
*
* @version $Id$
* @since 1.0.0
| 0 |
import org.apache.felix.dm.annotation.api.Component;
@Component(properties={@Property(name="foo", value="bar")})
@Component | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/comparators/BooleanComparator.java,v 1.3 2003/01/11 01:07:13 rwaldhoff Exp $
* @version $Revision: 1.3 $ $Date: 2003/01/11 01:07:13 $
* <code>!<i>trueFirst</i></code> values.
* <code>!<i>trueFirst</i></code> values. | 0 |
package org.apache.accumulo.server.test; | 0 |
BeanHelper helper =
BasicBuilderParameters.fetchBeanHelper(getParameters());
return (helper != null) ? helper : BeanHelper.INSTANCE; | 0 |
*
* @since 4.0 | 0 |
import org.apache.batik.util.ParsedURL;
* The URL of the document.
protected ParsedURL url;
public ParsedURL getURLObject() {
public void setURLObject(ParsedURL url) {
url = uri == null ? null : new ParsedURL(uri); | 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 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.
* @version $Revision: 1.3 $ $Date: 2004/02/29 14:17:42 $ | 0 |
* @version $Id: UberspectImpl.java,v 1.6 2004/08/19 17:15:59 dion Exp $ | 0 |
public NameSignatureInstruction(final short opcode, final int index) {
public ConstantNameAndType getNameAndType(final ConstantPoolGen cpg) {
public String getSignature(final ConstantPoolGen cpg) {
public String getName(final ConstantPoolGen cpg) { | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.