Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import org.apache.cocoon.components.source.util.SourceUtil; | 0 |
public void in(String propertyName, Collection<?> values) { | 0 |
}
final int timeout = config.getSocketTimeout();
if (timeout >= 0) {
managedConn.setSocketTimeout(timeout); | 0 |
package org.apache.bcel.verifier.tests; | 1 |
/** Gearpump {@link FlatMapFunction} wrapper over Beam {@link DoFn}. */
public class DoFnFunction<InputT, OutputT>
extends FlatMapFunction<List<RawUnionValue>, RawUnionValue> {
this.doFnRunnerFactory =
new DoFnRunnerFactory<>(
pipelineOptions,
doFn,
sideInputs,
outputManager,
mainOutput,
sideOutputs,
new NoOpStepContext(),
windowingStrategy);
sideInputReader = new SideInputHandler(sideInputs, InMemoryStateInternals.<Void>forKey(null));
for (RawUnionValue unionValue : inputs) {
for (PCollectionView<?> sideInput : sideInputs) {
for (BoundedWindow win : value.getWindows()) {
BoundedWindow sideInputWindow = sideInput.getWindowMappingFn().getSideInputWindow(win);
Object emptyValue =
WindowedValue.of(
new ArrayList<>(), value.getTimestamp(), sideInputWindow, value.getPane()); | 1 |
Query.instanceScoped(jobKey, shard).active(),
Query.Builder query = Query.instanceScoped(jobKey, shards).active();
Query.instanceScoped(jobKey, changedShards).active(), | 0 |
if (this.status.compareTo(IOReactorStatus.INACTIVE) == 0) {
this.status = IOReactorStatus.SHUT_DOWN;
cancelRequests();
this.selector.close();
return;
} | 0 |
* @throws IllegalArgumentException if comparator is null of criterion is invalid
* @see java.util.Comparator#compare(java.lang.Object first, java.lang.Object second) | 0 |
private static final String LOGSEARCH_GET_LOG_LEVELS_PATH = "/api/v1/service/logs/levels/counts"; | 0 |
import org.apache.hc.core5.http2.HttpVersionPolicy;
import org.apache.hc.core5.http2.impl.nio.bootstrap.H2RequesterBootstrap;
import org.apache.hc.core5.http2.protocol.H2RequestConnControl;
import org.apache.hc.core5.http2.protocol.H2RequestContent;
import org.apache.hc.core5.http2.protocol.H2RequestTargetHost;
System.out.println();
new H2RequestContent(),
new H2RequestTargetHost(),
new H2RequestConnControl(),
new RequestUserAgent("HttpCore-AB/5.0"));
final HttpVersionPolicy versionPolicy;
if (config.isForceHttp2()) {
versionPolicy = HttpVersionPolicy.FORCE_HTTP_2;
} else {
if (sslContext != null) {
versionPolicy = HttpVersionPolicy.NEGOTIATE;
} else {
versionPolicy = HttpVersionPolicy.FORCE_HTTP_1;
}
}
try (final HttpAsyncRequester requester = H2RequesterBootstrap.bootstrap()
.setVersionPolicy(versionPolicy)
stats.getVersion(), | 0 |
import org.apache.ambari.server.agent.ExecutionCommand;
import org.apache.ambari.server.state.StackId;
clusters.addCluster(CLUSTER1, new StackId("HDP-0.1"));
| 0 |
final class Utils {
public static <S extends OptionalFeature,T,E extends NamedFactory<T>> List<NamedFactory<T>> setUpTransformedFactories(
public static <T,E extends NamedFactory<T> & OptionalFeature> List<NamedFactory<T>> setUpBuiltinFactories( | 0 |
return experiments != null && experiments.contains("beam_fn_api"); | 0 |
@Override | 0 |
MONTOR_WEBSERVER,
DECOMMISSION_DATANODE | 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 |
package org.apache.accumulo.core.util.shell.commands;
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 SleepCommand extends Command {
@Override
public int execute(String fullCommand, CommandLine cl, Shell shellState)
throws Exception {
double secs = Double.parseDouble(cl.getArgs()[0]);
Thread.sleep((long)(secs * 1000));
return 0;
}
@Override
public String description() {
return "sleep for the given number of seconds";
}
@Override
public int numArgs() {
return 1;
}
} | 1 |
List<String> directories = new ArrayList<>(); | 1 |
private JaxbMapKeyList() {}
| 1 |
package org.apache.commons.ognl.internal.entry;
/**
* User: Maurizio Cucchiara
* Date: 10/15/11
* Time: 1:54 PM
*/
public class MethodCacheEntry implements CacheEntry
{
public Class<?> targetClass;
public MethodCacheEntry( Class<?> targetClass )
{
this.targetClass = targetClass;
}
} | 0 |
KERBEROS_CONFIGURATIONS("kerberos-configurations"), | 0 |
helper.createStack(stackId); | 0 |
* Copyright (c) 2002 The Apache Software Foundation. All rights | 0 |
HttpEntity entity = new StringEntity("stuff"); | 0 |
/**
* Test get and set of Setting object.
*/
@Test
public void testSetGetSetting() {
BlueprintEntity entity = new BlueprintEntity();
Collection<BlueprintSettingEntity> setting = Collections.emptyList();
entity.setSettings(setting);
assertSame(setting, entity.getSettings());
} | 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.logsearch.rest.error;
import static javax.ws.rs.core.Response.Status.INTERNAL_SERVER_ERROR;
import javax.inject.Named;
import javax.ws.rs.core.Response;
import javax.ws.rs.ext.ExceptionMapper;
import javax.ws.rs.ext.Provider;
import org.apache.solr.common.SolrException;
@Named
@Provider
public class SolrExceptionMapper implements ExceptionMapper<SolrException> {
@Override
public Response toResponse(SolrException exception) {
Response.Status status = Response.Status.fromStatusCode(exception.code());
if (status == null)
status = INTERNAL_SERVER_ERROR;
return GeneralExceptionMapper.toResponse(exception, status);
}
} | 0 |
import java.util.regex.MatchResult;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
protected Matcher _matcher_ = null;
//matcher_ = new Perl5Matcher();
pattern = Pattern.compile(regex);
catch (PatternSyntaxException e)
_matcher_ = pattern.matcher(s);
if (_matcher_.matches())
this.result = _matcher_.toMatchResult();
* Convenience method
return this.result.groupCount();
for (int i = 1; i <= this.result.groupCount(); i++) | 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 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.nio.charset.StandardCharsets;
new String[] {"stuff;", "more stuff"}, StandardCharsets.US_ASCII);
final SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, StandardCharsets.US_ASCII);
new String[] {"stuff;", "more stuff"}, StandardCharsets.US_ASCII);
final SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, StandardCharsets.US_ASCII);
new String[] {"stuff; ", "more stuff; ", "a lot more stuff!"}, StandardCharsets.US_ASCII);
final SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, StandardCharsets.US_ASCII);
new String[] {"stuff; ", "more stuff; ", "a lot more stuff!"}, StandardCharsets.US_ASCII);
final SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, StandardCharsets.US_ASCII);
new String[] {"stuff; ", "more stuff; ", "a lot more stuff!"}, StandardCharsets.US_ASCII);
final SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, StandardCharsets.US_ASCII);
final byte[] beginning = "beginning; ".getBytes(StandardCharsets.US_ASCII);
new String[] {"a"}, StandardCharsets.US_ASCII);
final SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, StandardCharsets.US_ASCII);
new String[] {"stuff;", "more stuff"}, StandardCharsets.US_ASCII);
final SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, StandardCharsets.US_ASCII);
new String[] {s}, StandardCharsets.US_ASCII);
final SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, StandardCharsets.US_ASCII); | 0 |
import org.apache.flink.runtime.checkpoint.OperatorSubtaskState;
null,
null,
VarIntCoder.of(), /* key coder */
WindowedValue::getValue);
VarIntCoder.of(), /* key coder */
WindowedValue::getValue);
StringUtf8Coder.of(), /* key coder */
kvWindowedValue -> kvWindowedValue.getValue().getKey());
keyCoder,
keyed ? WindowedValue::getValue : null);
WindowedValue::getValue,
null,
OperatorSubtaskState snapshot = testHarness.snapshot(0, 0);
null,
keyCoder,
WindowedValue::getValue);
WindowedValue::getValue,
null,
OperatorSubtaskState snapshot = testHarness.snapshot(0, 0);
null,
keyCoder,
WindowedValue::getValue);
WindowedValue::getValue,
null,
OperatorSubtaskState snapshot = testHarness.snapshot(0, 0);
final OperatorSubtaskState snapshot = testHarness.snapshot(0, 0);
VarIntCoder.of() /* key coder */,
keySelector);
null,
OperatorSubtaskState snapshot = testHarness.snapshot(0, 0);
null, | 0 |
public int capacity() { | 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 |
thrown.expectMessage(p.getRunner().getClass().getName());
thrown.expectMessage("does not support Splittable DoFn");
thrown.expectMessage(p.getRunner().getClass().getName());
thrown.expectMessage("does not support Splittable DoFn"); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/iterators/ListIteratorWrapper.java,v 1.1 2002/08/15 23:13:51 pjack Exp $
* $Revision: 1.1 $
* $Date: 2002/08/15 23:13:51 $
package org.apache.commons.collections.iterators;
* @version $Revision: 1.1 $ $Date: 2002/08/15 23:13:51 $ | 0 |
// URI Characters that are possible in local filenames, but must be escaped
// for proper URI handling.
//
// How reserved URI chars were selected:
//
// URIs can contain :, /, ?, #, @
// See http://download.oracle.com/javase/6/docs/api/java/net/URI.html
// http://tools.ietf.org/html/rfc3986#section-2.2
//
// Since : and / occur before the path, only chars after path are escaped (i.e., # and ?)
// ? is a reserved filesystem character for Windows and Unix, so can't be part of a filename.
// Therefore only # is a reserved char in a URI as part of the path that can be in the filename.
private static final char[] RESERVED_URI_CHARS = { '#' };
buffer.append(handleURISpecialCharacters(useAbsolutePath ? absPath : getPath()));
private String handleURISpecialCharacters(String uri) {
if (uri != null && uri.length() > 0) {
try {
// VFS-325: Handle URI special characters in filename
// Decode the base uri and re-encode with URI special characters
uri = UriParser.decode(uri);
return UriParser.encode(uri, RESERVED_URI_CHARS);
} catch (final FileSystemException e) {
// Default to base uri value
}
}
return uri;
}
| 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 |
public String getResponse(String url, Map<String, String> headers, String authType) {
HttpURLConnection connection;
if(authType == null || authType.equalsIgnoreCase("simple")) {
connection = provider.getConnection(url, "GET", (String) null, headers);
} else {
connection = provider.getConnectionAsCurrent(url, "GET", (String) null, headers);
}
public String getProxyUrl(String baseUrl, String endPoint, MultivaluedMap<String, String> queryParameters, String authType) {
if(authType == null || authType.equalsIgnoreCase("simple")) {
builder.addParameter("user.name", viewContext.getUsername());
} | 0 |
p1.put("instance.name","FooProvider-1");
p2.put("instance.name","FooProvider-2");
p3.put("instance.name","FooProvider-3"); | 0 |
if (bytesRead == -1) {
} | 0 |
org.apache.commons.logging.LogFactory.getLog(RetrievalMethodResolver.class); | 0 |
/*
* $Source: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//dbcp/src/java/org/apache/commons/dbcp/datasources/InstanceKeyDataSource.java,v $
* $Revision: 1.4 $
* $Date: 2003/08/22 16:08:32 $
*
* ====================================================================
*
* Copyright (c) 1999-2003 The Apache Software Foundation. All rights
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowledgement:
* Apache Software Foundation - http://www.apache.org/"
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
* permission of the Apache Group.
* http://www.apache.org/
*
* @version $Id: InstanceKeyDataSource.java,v 1.4 2003/08/22 16:08:32 dirkv Exp $ | 0 |
package org.apache.commons.beanutils2;
import org.apache.commons.beanutils2.BeanUtils;
import org.apache.commons.beanutils2.MappedPropertyDescriptor; | 1 |
import org.apache.bcel.Constants;
import org.apache.bcel.Repository;
import org.apache.bcel.classfile.Attribute;
import org.apache.bcel.classfile.ClassParser;
import org.apache.bcel.classfile.Code;
import org.apache.bcel.classfile.ConstantValue;
import org.apache.bcel.classfile.Deprecated;
import org.apache.bcel.classfile.ExceptionTable;
import org.apache.bcel.classfile.Field;
import org.apache.bcel.classfile.JavaClass;
import org.apache.bcel.classfile.Method;
import org.apache.bcel.classfile.Synthetic;
import org.apache.bcel.classfile.Utility;
import org.apache.bcel.generic.BranchHandle;
import org.apache.bcel.generic.BranchInstruction;
import org.apache.bcel.generic.CodeExceptionGen;
import org.apache.bcel.generic.ConstantPoolGen;
import org.apache.bcel.generic.Instruction;
import org.apache.bcel.generic.InstructionHandle;
import org.apache.bcel.generic.InstructionList;
import org.apache.bcel.generic.LineNumberGen;
import org.apache.bcel.generic.LocalVariableGen;
import org.apache.bcel.generic.MethodGen;
import org.apache.bcel.generic.ObjectType;
import org.apache.bcel.generic.Select;
import org.apache.bcel.generic.TABLESWITCH;
public class JasminVisitor extends org.apache.bcel.classfile.EmptyVisitor {
new org.apache.bcel.classfile.DescendingVisitor(clazz, this).visit(); | 0 |
Component s1 = component(m).impl(configurator).withSvc(ConfigurationAdmin.class).build();
.factoryPid("MyFactoryPid").impl(adapterImplClass).update(adapterUpdate).propagate().provides(AdapterService.class, "foo", "bar")
.withSvc(AdapterExtraDependency.class)
.impl(AdapterServiceConsumer.class).withSvc(AdapterService.class, srv -> srv.add("bind").change("change").remove("remove")).build(); | 0 |
public Object convert(
final String pid,
final Object value,
final File filePath = Util.extractFile(bundle, pid, path);
final File filePath = Util.extractFile(bundle, pid, paths[i]); | 0 |
protected void doParse() throws ParseException { | 0 |
import org.apache.accumulo.core.clientImpl.ClientInfo; | 0 |
public final class XMLByteStreamCompiler extends AbstractXMLByteStreamCompiler {
super();
protected void initOutput() {
super.initOutput();
super.recycle();
protected void write( final int b ) { | 0 |
return Base64.decodeBigIntegerFromString(
).getNodeValue() | 0 |
* the keys will be saved. The nodes selected by the prefix (it is possible
* that multiple nodes are selected) are mapped to the root node of the
* returned configuration, i.e. their children and attributes will become
* children and attributes of the new root node. However a value of the root
* node is only set if exactly one of the selected nodes contain a value (if
* multiple nodes have a value, there is simply no way to decide how these
* values are merged together). Note that the returned
* <code>Configuration</code> object is not connected to its source
* configuration: updates on the source configuration are not reflected in
* the subset and vice versa.
// Initialize the new root node
Object value = null;
int valueCount = 0;
if (nd.getValue() != null)
{
value = nd.getValue();
valueCount++;
}
for (Iterator it2 = visitor.getClone().getChildren().iterator(); it2
.hasNext();)
for (Iterator it2 = visitor.getClone().getAttributes().iterator(); it2
.hasNext();)
result.getRootNode().addAttribute(
(ConfigurationNode) it2.next());
// Determine the value of the new root
if (valueCount == 1)
{
result.getRootNode().setValue(value);
} | 0 |
SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128);
SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 16);
SessionOutputBuffer outbuf = new SessionOutputBufferImpl(16, 16);
SessionOutputBuffer outbuf = new SessionOutputBufferImpl(16, 16);
SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128);
SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128);
SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128); | 0 |
.apply("testCompositeFilter", BeamSql.query(sql));
.apply("testNoReturnFilter", BeamSql.query(sql));
.apply("testFromInvalidTableName1", BeamSql.query(sql));
exceptions.expectMessage("Use PCOLLECTION as table name"
+ " when selecting from single PCollection."
+ " Use PCollectionTuple to explicitly "
+ "name the input PCollections"); | 0 |
if (instance == null)
instance = new UniqueNameAllocator(); | 1 |
private final ArrayList<FileObject> resources = new ArrayList<>();
final List<URL> result = new ArrayList<>(2); | 0 |
.apply("Consume", Filter.by(SerializableFunctions.constant(false)))
.apply(View.asIterable());
return materialized.apply(Reshuffle.viaRandomKey()); | 0 |
Coder<K> keyCoder = context.getKeyCoder(operator);
Coder<LeftT> leftCoder = context.getCoderBasedOnDatasetElementType(operator.getLeft());
Coder<RightT> rightCoder = context.getCoderBasedOnDatasetElementType(operator.getRight());
left, operator.getLeftKeyExtractor(), keyCoder, leftCoder, ":extract-keys-left");
right, operator.getRightKeyExtractor(), keyCoder, rightCoder, ":extract-keys-right"); | 0 |
/*
* Copyright 2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless 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.cocoon.portal.deployment.impl;
import org.apache.cocoon.portal.deployment.DeploymentEvent;
import org.apache.cocoon.portal.deployment.DeploymentObject;
/**
* Default implementation of the deployment event.
*
* @version $Id$
*/
public class DeploymentEventImpl implements DeploymentEvent {
/** The corresponding deployment object. */
protected DeploymentObject deploymentObject;
/** The deployment status. */
protected int status = STATUS_EVAL;
/**
*
*/
public DeploymentEventImpl(DeploymentObject depObject) {
this.deploymentObject = depObject;
}
/**
* @see org.apache.cocoon.portal.deployment.DeploymentEvent#getDeploymentObject()
*/
public DeploymentObject getDeploymentObject() {
return this.deploymentObject;
}
/**
* @see org.apache.cocoon.portal.deployment.DeploymentStatus#getStatus()
*/
public int getStatus() {
return this.status;
}
/**
* @see org.apache.cocoon.portal.deployment.DeploymentEvent#setStatus(int)
*/
public void setStatus(int i) {
this.status = i;
}
} | 0 |
if (!this.connStrategy.keepAlive(response, this.context)) { | 0 |
/*
* 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 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 examples; | 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 |
@Override
@Override
@Override | 0 |
package org.apache.hc.core5.http.examples;
import org.apache.hc.core5.http.nio.DefaultHttpClientIODispatch;
import org.apache.hc.core5.http.nio.pool.BasicNIOConnPool;
import org.apache.hc.core5.http.nio.reactor.DefaultConnectingIOReactor; | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/SetNextRule.java,v 1.11 2002/01/23 21:25:22 sanders Exp $
* $Revision: 1.11 $
* $Date: 2002/01/23 21:25:22 $
* @version $Revision: 1.11 $ $Date: 2002/01/23 21:25:22 $
digester.log.debug("[SetNextRule]{" + digester.match +
"} Call [NULL PARENT]." +
digester.log.debug("[SetNextRule]{" + digester.match +
"} Call " + parent.getClass().getName() + "." + | 0 |
* @version $Revision$ $Date$ | 0 |
public ResolveProjectsJob(IWorkspace workspace)
super("Resolving Sigil projects");
setRule(workspace.getRoot());
super("Resolving Sigil projects");
setRule(workspace.getRoot());
super("Resolving Sigil project");
setRule(project.getProject().getWorkspace().getRoot());
MultiStatus status = new MultiStatus(SigilCore.PLUGIN_ID, 0,
"Error resolving Sigil projects", null);
for (ISigilProjectModel sigilProject : sigilProjects)
if (isDependent(sigilProject))
{
if (flush)
sigilProject.flushDependencyState();
catch (CoreException e)
status.add(e.getStatus());
if (capabilities == null)
{
else
{
if (b == null)
{
else
{
if (element instanceof IRequirementModelElement)
{
for (ICapabilityModelElement c : capabilities)
{
if (r.accepts(c))
{
| 0 |
"&facet.mincount=1&facet.limit=-1&facet.pivot=myfield%2Crepo", | 0 |
DefaultMutableTreeNode node = (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
Gateway selectedGateway = null;
if ( node != null && node != top) {
selectedGateway = (Gateway) node.getUserObject();
}
Gateway newGateway = null;
try {
newGateway = Gateway.newGateway(selectedGateway);
} catch (Exception exep) {
JOptionPane.showMessageDialog(null, "Gateway creation error:\n "+exep.toString(), "Error", JOptionPane.ERROR_MESSAGE);
}
if ( newGateway != null ) {
this.createTreeNode(newGateway);
if( JOptionPane.showConfirmDialog(null, "Sure we remove this gateway \""+g.getNickname()+"\" ?\n "+g.toString()) == JOptionPane.YES_OPTION ) {
} else {
System.out.println("Protocol provider package for \""+protoName+"\" is prefixed with \""+packages+"\""); | 0 |
/* $Id: SetPropertiesRule.java,v 1.21 2004/09/27 06:20:38 skitching Exp $
// The BeanUtils.populate method silently ignores items in
// the map (ie xml entities) which have no corresponding
// setter method, so here we check whether each xml attribute
// does have a corresponding property before calling the
// BeanUtils.populate method.
//
// Yes having the test and set as separate steps is ugly and
// inefficient. But BeanUtils.populate doesn't provide the
// functionality we need here, and changing the algorithm which
// determines the appropriate setter method to invoke is
// considered too risky.
//
// Using two different classes (PropertyUtils vs BeanUtils) to
// do the test and the set is also ugly; the codepaths
// are different which could potentially lead to trouble.
// However the BeanUtils/ProperyUtils code has been carefully
// compared and the PropertyUtils functionality does appear
// compatible so we'll accept the risk here.
| 0 |
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a> | 0 |
* row1 refs uid1\0a A&B V0
* row1 refs uid2\0b C&D V0
* row1 ~chunk 0 A&B V1
* row1 ~chunk 0 C&D V1
* row1 ~chunk 0 E&F V1
* row1 ~chunk 0 G&H V1
* row1 refs uid1\0a A&B V0
* row1 refs uid2\0b C&D V0
* row1 ~chunk 0 (A&B)|(C&D) V1 | 0 |
String p = shellState.readMaskedLine("Enter password for user " + user + ": ", '*'); | 0 |
import org.apache.accumulo.core.security.thrift.TCredentials;
public static List<String> bulkLoad(AccumuloConfiguration conf, Instance instance, TCredentials creds, long tid, String tableId, List<String> files,
private TCredentials credentials;
public BulkImporter(AccumuloConfiguration conf, Instance instance, TCredentials credentials, long tid, String tableId, boolean setTime) {
private Map<Path,List<KeyExtent>> assignMapFiles(AccumuloConfiguration acuConf, Instance instance, Configuration conf, TCredentials credentials, FileSystem fs,
TCredentials credentials;
public AssignmentTask(TCredentials credentials, Map<Path,List<KeyExtent>> assignmentFailures, String tableName, String location,
private Map<Path,List<KeyExtent>> assignMapFiles(TCredentials credentials, String tableName, Map<Path,List<AssignmentInfo>> assignments,
private List<KeyExtent> assignMapFiles(TCredentials credentials, String location, Map<KeyExtent,List<PathSize>> assignmentsPerTablet) throws AccumuloException, | 1 |
* Don't use {@code synchronized} for that purpose!
* @param tunit the unit for the {@code timeout},
* may be {@code null} only if there is no timeout
* @param reusable {@code true} if the entry is deemed
* reusable, {@code false} otherwise.
* @param tunit the unit for the {@code idletime}
* @param conn the connection to close, or {@code null} | 0 |
import java.text.AttributedString;
import java.util.Map; | 0 |
* @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $
/**
* Gets the predicate in use.
* @return the predicate
* @since Commons Collections 3.1
*/
public Predicate getPredicate() {
return iPredicate;
}
/**
* Gets the closure.
* @return the closure
* @since Commons Collections 3.1
*/
public Closure getClosure() {
return iClosure;
}
/**
* Is the loop a do-while loop.
* @return true is do-while, false if while
* @since Commons Collections 3.1
*/
public boolean isDoLoop() {
return iDoLoop;
}
} | 0 |
if ((felix.getState() == Bundle.ACTIVE) || (felix.getState() == Bundle.STARTING)) | 0 |
*
*/
@Test
public void testFindAllEnabled() {
List<AlertDefinitionEntity> definitions = dao.findAll();
assertNotNull(definitions);
assertEquals(15, definitions.size());
List<AlertDefinitionEntity> enabledDefinitions = dao.findAllEnabled(clusterId);
assertNotNull(enabledDefinitions);
assertEquals(definitions.size(), enabledDefinitions.size());
enabledDefinitions.get(0).setEnabled(false);
dao.merge(enabledDefinitions.get(0));
enabledDefinitions = dao.findAllEnabled(clusterId);
assertNotNull(enabledDefinitions);
assertEquals(definitions.size() - 1, enabledDefinitions.size());
}
/** | 0 |
public interface FileItem extends Serializable {
InputStream getInputStream() throws IOException;
String getString(String encoding) throws UnsupportedEncodingException; | 0 |
import org.apache.http.conn.SocketClientConnection;
private SocketClientConnection conn;
conn = Mockito.mock(SocketClientConnection.class);
Mockito.verify(conn, Mockito.times(2)).bind(socket);
Mockito.verify(conn, Mockito.times(3)).bind(socket);
Mockito.verify(conn).bind(socket); | 0 |
import java.io.DataInput;
StackMapTable(int name_index, int length, DataInput file, ConstantPool constant_pool) | 0 |
ResultSetHandler<List<String>> h = new ColumnListHandler<String>();
List<String> results = h.handle(this.rs);
ResultSetHandler<List<String>> h = new ColumnListHandler<String>(2);
List<String> results = h.handle(this.rs);
ResultSetHandler<List<Integer>> h = new ColumnListHandler<Integer>("intTest");
List<Integer> results = h.handle(this.rs);
assertEquals(new Integer(1), results.get(0));
assertEquals(new Integer(3), results.get(1));
ResultSetHandler<List<String>> h = new ColumnListHandler<String>();
List<String> results = h.handle(this.emptyResultSet); | 0 |
StateInternalsFactory<K> stateInternalsFactory =
key -> {
// this will implicitly be keyed by the key of the incoming
// element or by the key of a firing timer
return (StateInternals) keyedStateInternals;
};
TimerInternalsFactory<K> timerInternalsFactory =
key -> {
// this will implicitly be keyed like the StateInternalsFactory
return timerInternals;
}; | 0 |
@SuppressWarnings("serial")
@Override
protected final List<T> decodeToIterable(List<T> decodedElements) {
return decodedElements;
}
| 0 |
* @version $Revision: 1.5 $ $Date: 2002/11/21 04:25:58 $ | 0 |
byte[] b = null;
public CachedBlockRead(CacheEntry cb, byte[] buf) { | 0 |
public class FlatResolver implements JexlExprResolver {
* Flag to return NO_VALUE on null from context.
* Default CTOR.
public FlatResolver() {
* noValOnNull, which is true. (jexl gets a shot after if null)
*
* @param noValOnNull Whether NO_VALUE will be returned instead of null.
public FlatResolver(boolean noValOnNull) {
/**
* Try to resolve expression as-is.
*
* @param context The context for resolution.
* @param expression The flat expression.
* @return The resolved value.
*/
public Object evaluate(JexlContext context, String expression) {
if (val == null && noValOnNull) { | 0 |
for (final Constructor<?> ctor2 : ctors) { | 0 |
long getRefreshRateMs() {
return refreshRateMs;
}
long intervalStartMs = nowMs - settings.getRefreshRateMs(); | 0 |
if (!testLatch.await(10, TimeUnit.SECONDS)) | 0 |
* Note that this log level is not used with an R7 LogService implementation. | 0 |
/* $Id: VariableAttributes.java,v 1.5 2004/05/10 06:30:08 skitching Exp $
* | 0 |
assertEquals(1000, tm.size());
assertEquals(100, size);
assertEquals(50, size);
assertEquals(0, size);
assertEquals(1000, tm.size());
assertEquals(900, size);
assertEquals(450, size);
assertEquals(100, size);
assertEquals(1000, tm.size());
assertEquals(900, size);
assertEquals(900, size);
assertEquals(1000, tm.size());
assertEquals(900, size(a));
assertEquals(900, size(copy));
assertEquals(1000, tm.size());
assertEquals(902, size(a));
assertEquals(102, size(a));
assertEquals(902, size(a));
assertEquals(1000, tm.size());
assertEquals(98, size(a));
assertEquals(898, size(a));
assertEquals(98, size(a));
assertEquals(1000, tm.size());
assertEquals(902, size(a));
assertEquals(102, size(a));
assertEquals(902, size(a));
assertEquals(1000, tm.size());
assertEquals(1000, size(a));
assertEquals(500, size);
assertEquals(1000, size);
assertEquals(1000, tm.size());
assertEquals(750, size);
assertEquals(5, tm.size());
assertEquals(5, size);
assertEquals(5, size);
assertEquals(1, size);
assertEquals(2, size);
assertEquals(2, size);
assertEquals(3, size);
assertEquals(1000, tm.size());
assertEquals(100, size);
assertEquals(100, tm.size());
assertEquals(100, tm.size());
assertEquals(21, size(a));
assertEquals(21, size(a));
assertEquals(20, size(a));
assertEquals(19, size(a));
assertEquals(20, size(a));
assertEquals(89, size(a));
assertEquals(88, size(a));
assertEquals(32, size(a));
assertEquals(31, size(a));
assertEquals(89, size(a));
assertEquals(32, size(a));
assertEquals(4, tm.size());
assertEquals(3, size); | 0 |
public void testCannotProxyAbstractAndConcreteClasses() { | 0 |
T initValue = initialValue(context);
LOG.info("Obtained initial value : {} for key : {}",initValue,key);
instances.put(key, initValue); | 0 |
String[] atlasServerUri = configuration.getStringArray(AtlasConstants.ATLAS_REST_ADDRESS_KEY);
if (atlasServerUri == null || atlasServerUri.length == 0) {
atlasServerUri = new String[] { AtlasConstants.DEFAULT_ATLAS_REST_ADDRESS };
}
atlasClient = new AtlasClient(atlasServerUri, basicAuthUsernamePassword);
atlasClient = new AtlasClient(atlasServerUri, null);
private int handleCommand(CommandLine commandLine, String[] atlasServerUri, AtlasClient atlasClient) { | 0 |
import cz.seznam.euphoria.core.client.operator.state.ListStorage;
import cz.seznam.euphoria.core.client.operator.state.ListStorageDescriptor;
import cz.seznam.euphoria.core.client.operator.state.StorageProvider;
import cz.seznam.euphoria.core.client.operator.state.ValueStorage;
import cz.seznam.euphoria.core.client.operator.state.ValueStorageDescriptor;
class BatchStateStorageProvider implements StorageProvider, Serializable {
static class MemValueStorage implements ValueStorage {
MemValueStorage(Object defVal) {
this.value = defVal;
}
static class MemListStorage implements ListStorage {
MemListStorage(
public <T> ValueStorage<T> getValueStorage(ValueStorageDescriptor<T> descriptor) {
return new MemValueStorage(descriptor.getDefaultValue());
public <T> ListStorage<T> getListStorage(ListStorageDescriptor<T> descriptor) {
return new MemListStorage(MAX_ELEMENTS_IN_MEMORY, kryo, serializers); | 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.
*/
package org.apache.cocoon.forms.event;
import org.apache.cocoon.forms.formmodel.Widget;
import org.apache.cocoon.forms.formmodel.ImageMap;
/**
* Currently this event originates from a {@link org.apache.cocoon.forms.formmodel.ImageMap}
* widget.
*
*/
public class ImageMapEvent extends ActionEvent {
public ImageMapEvent(Widget source, String actionCommand) {
super(source, actionCommand);
}
public int getX() {
return ((ImageMap)(source)).getX();
}
public int getY() {
return ((ImageMap)(source)).getY();
}
} | 0 |
queue = new PriorityQueue<>(10, (Bid b1, Bid b2) -> b1.dateTime.compareTo(b2.dateTime)); | 0 |
@Override
@Override | 0 |
import org.apache.ambari.logsearch.common.StatusMessage;
import org.apache.solr.client.solrj.response.UpdateResponse;
public StatusMessage deleteLogs(ServiceLogRequest request) {
SimpleQuery solrQuery = conversionService.convert(request, SimpleQuery.class);
UpdateResponse updateResponse = serviceLogsSolrDao.deleteByQuery(solrQuery, "/service/logs");
return new StatusMessage(updateResponse.getStatus());
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.