Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
import org.apache.aurora.scheduler.storage.CronJobStore; public class MemCronJobStoreTest { private CronJobStore.Mutable store;
0
* Default XML attribute that needs to be present on a plugin declaration in order to specify the method * to load rules from. /** * See {@link #findLoader}. * * @param methodAttr The XML attribute that needs to be present on a plugin declaration in order to specify the * method to load rules from. */ * * @param d The digester instance where locating plugin classes * @param pluginClass The plugin Java class * @param p The properties object that holds any xml attributes the user may have specified on the plugin * declaration in order to indicate how to locate the plugin rules. * @throws PluginException if the algorithm finds a source of rules, but there is something invalid * about that source.
0
return FluentIterable.from(paths)
0
/* * $Header: /cvshome/build/ee.foundation/src/java/security/acl/Acl.java,v 1.6 2006/03/14 01:20:29 hargrave Exp $ * * (C) Copyright 2001 Sun Microsystems, Inc. * Copyright (c) OSGi Alliance (2001, 2005). All Rights Reserved. * * 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 java.security.acl; public abstract interface Acl extends java.security.acl.Owner { public abstract boolean addEntry(java.security.Principal var0, java.security.acl.AclEntry var1) throws java.security.acl.NotOwnerException; public abstract boolean checkPermission(java.security.Principal var0, java.security.acl.Permission var1); public abstract java.util.Enumeration entries(); public abstract java.lang.String getName(); public abstract java.util.Enumeration getPermissions(java.security.Principal var0); public abstract boolean removeEntry(java.security.Principal var0, java.security.acl.AclEntry var1) throws java.security.acl.NotOwnerException; public abstract void setName(java.security.Principal var0, java.lang.String var1) throws java.security.acl.NotOwnerException; public abstract java.lang.String toString(); }
0
* Concrete implementations of this class allow creation of schema service objects that vend * Lookup a schema for the given type. If no schema exists, returns null. public abstract <T> Schema schemaFor(TypeDescriptor<T> typeDescriptor); * Given a type, return a function that converts that type to a {@link Row} object * If no schema exists, returns null. * If no schema exists, returns null.
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. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * */ package org.apache.http.nio.protocol; /** * HttpAsyncRequestHandlerResolver can be used to resolve an instance of * {@link HttpAsyncRequestHandler} matching a particular request URI. Usually the resolved * request handler will be used to process the request with the specified request URI. * * @since 4.2 */ public interface HttpAsyncRequestHandlerResolver { /** * Looks up a handler matching the given request URI. * * @param requestURI the request URI * @return HTTP request handler or <code>null</code> if no match * is found. */ HttpAsyncRequestHandler<?> lookup(String requestURI); }
0
userContext = new HashMap<>(); .forServices(new ArrayList<>(clusterTopology.getBlueprint().getServices())) Map<String, Set<String>> componentHostsMap = new HashMap<>(); componentHosts = new HashSet<>();
1
ConditionalMutation cmut = new ConditionalMutation(ByteBufferUtil.toBytes(cu.getKey())); cmut.addCondition(cond);
0
import org.apache.sshd.common.config.keys.impl.ECDSAPublicKeyEntryDecoder; String encCurveName = KeyEntryResolver.decodeString(keyData, ECDSAPublicKeyEntryDecoder.MAX_CURVE_NAME_LENGTH); byte[] pubKey = KeyEntryResolver.readRLEBytes(keyData, ECDSAPublicKeyEntryDecoder.MAX_ALLOWED_POINT_SIZE);
0
XMLStreamReader stdXmlStreamReader = InputStream inputStream = xmlStreamReader =
1
//@@@ review parameter hierachy building request.getParams().setDefaults(requestExec.getParams());
0
Set<String> services = cluster.getServices().keySet();
0
private static Set<String> pkPropertyIds = new HashSet<>( Arrays.asList(new String[]{STACK_NAME_PROPERTY_ID, STACK_VERSION_PROPERTY_ID, SERVICE_NAME_PROPERTY_ID, PROPERTY_NAME_PROPERTY_ID})); final Set<StackConfigurationRequest> requests = new HashSet<>(); Set<Resource> resources = new HashSet<>();
1
pipeline .apply("CreateMainInput", Create.of(29, 31)) .apply( "OutputSideInputs", ParDo.of( new DoFn<Integer, Integer>() { @ProcessElement public void processElement(ProcessContext c) { checkArgument(c.sideInput(view).size() == 4); checkArgument( c.sideInput(view).get(0).equals(c.sideInput(view).get(0))); for (Integer i : c.sideInput(view)) { c.output(i); } } }) .withSideInputs(view)); checkArgument( c.sideInput(view).get(0).equals(c.sideInput(view).get(0)));
0
package org.apache.beam.sdk.util;
0
import org.apache.zookeeper.server.SyncRequestProcessor; /* * Request processors */ protected CommitProcessor commitProcessor; protected SyncRequestProcessor syncProcessor; @Override public void shutdown() { LOG.info("Shutting down"); try { super.shutdown(); } catch (Exception e) { LOG.warn("Ignoring unexpected exception during shutdown", e); } try { if (syncProcessor != null) { syncProcessor.shutdown(); } } catch (Exception e) { LOG.warn("Ignoring unexpected exception in syncprocessor shutdown", e); } }
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
/** * Update the internal timestamp by processed element (optional operation). */ default void updateProcessed(long stamp) { // nop } /** * Close all triggers and destroy the triggering. */ void close();
0
* @version $Revision$ $Date$
0
import java.security.AccessController; import java.security.PrivilegedAction; private static String getProperty(final String key) { return AccessController.doPrivileged(new PrivilegedAction<String>() { @Override public String run() { return System.getProperty(key); } }); } split(getProperty("https.protocols")), split(getProperty("https.cipherSuites")),
1
pool.shutdown();
1
private final Set<String> clearedProperties = new HashSet<>(); Set<String> keys = new HashSet<>();
0
return (this.getPrevEndRow() == null || this.getPrevEndRow().compareTo(row) < 0) && (this.getEndRow() == null || this.getEndRow().compareTo(row) >= 0); return (this.getPrevEndRow() == null || this.getPrevEndRow().compareTo(row) < 0) && (this.getEndRow() == null || this.getEndRow().compareTo(row) >= 0);
0
assertEquals("Field wasnt anonymized", "something else secret ******* / ******* is here something else 2", jsonObj.remove("someField")); mapAnonymizeDescriptorImpl.setHideChar('X'); assertEquals("Field wasnt anonymized", "something else XXXXXXX / XXXXXXX is the secret something else 2", jsonObj.remove("someField"));
0
* Copyright (c) OSGi Alliance (2010, 2016). All Rights Reserved. @Version("1.5.2")
1
import org.apache.hc.core5.http.ClassicHttpRequest; import org.apache.hc.core5.http.ClassicHttpResponse; final ClassicHttpRequest request, final HttpContext context) { final ClassicHttpResponse response = httpexchange.getResponse();
0
Copyright 2001-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 2016-2018 Seznam.cz, a.s.
0
* @version $Revision: 1.2 $, $Date: 2004/10/14 15:54:06 $ * @since 1.1
0
import java.util.Collections; import java.util.List; import java.util.Set; @Override public List<Set<String>> getHostGroupings(Set<String> hosts) { // TODO return Collections.singletonList(hosts); }
0
/* (non-Javadoc) * @see org.apache.cocoon.components.store.impl.MRUMemoryStore#init() */ public void init() throws Exception { super.init(); if (this.persistent) { throw new Exception("A transient store cannot be backed by a persistent store.");
0
Assert.assertFalse(sc.isRecoveryEnabled()); // default value of recoveryEnabled sc.setRecoveryEnabled(true); Assert.assertTrue(sc.isRecoveryEnabled());
0
package org.apache.commons.jexl2;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/axes/ChildContext.java,v 1.14 2003/10/09 21:31:39 rdonkin Exp $ * $Revision: 1.14 $ * $Date: 2003/10/09 21:31:39 $ * any, must include the following acknowledgement: * Alternately, this acknowledgement may appear in the software itself, * if and wherever such third-party acknowledgements normally appear. * permission of the Apache Software Foundation. * @version $Revision: 1.14 $ $Date: 2003/10/09 21:31:39 $
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.commons.dbutils.handlers.properties; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import org.junit.Before; import org.junit.Test; public class StringEnumPropertyHandlerTest { private StringEnumPropertyHandler handler; @Before public void setUp() { this.handler = new StringEnumPropertyHandler(); } @Test public void testMatch() { assertTrue(handler.match(TestEnum.class, "test")); } @Test public void testMatchNegative() { assertFalse(handler.match(TestEnum.class, Double.valueOf(1))); assertFalse(handler.match(Integer.class, "")); } }
0
setChildren.add(new SubResourceDefinition(Type.StackArtifact));
0
import java.io.Closeable; interface OutputStream extends Closeable { interface InputStream extends Closeable {
0
final CopletInstance cid = manager.getCopletInstance(this.copletId);
0
static final String KEY_IDENTITIES = Type.IDENTITY.getDescriptorPluralName(); static final String KEY_CONFIGURATIONS = Type.CONFIGURATION.getDescriptorPluralName(); static final String KEY_AUTH_TO_LOCAL_PROPERTIES = Type.AUTH_TO_LOCAL_PROPERTY.getDescriptorPluralName(); list = data.get(KEY_IDENTITIES); list = data.get(KEY_CONFIGURATIONS); list = data.get(KEY_AUTH_TO_LOCAL_PROPERTIES); map.put(KEY_IDENTITIES, list.values()); map.put(KEY_CONFIGURATIONS, list.values()); map.put(KEY_AUTH_TO_LOCAL_PROPERTIES, authToLocalProperties);
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.scr.integration.components.felix4984; import java.util.ArrayList; import java.util.List; public class B { private List<A> as = new ArrayList<A>(); private void setA(A a) { as.add( a ); } private void unsetA(A a) { as.remove( a ); } public List<A> getAs() { return as; } }
0
/* package org.apache.ambari.server.state;
0
@Override protected int defaultTimeoutSeconds() { return 60; } @Test @Test @Test @Test @Test @Test @Test @Test @Test @Test @Test @Test @Test @Test @Test @Test(expected = IllegalArgumentException.class) @Test
0
@Override * * @param property * the prefix property, and must be of type PropertyType.PREFIX public Map<String,String> getAllPropertiesWithPrefix(Property property) { Map<String,String> propMap = new HashMap<String,String>(); for (Entry<String,String> entry : this) { * Only here for Shell option-free start-up // overridden in ZooConfiguration public void invalidateCache() {}
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. */ /** Wire coders for communications between runner and SDK harness. */ package org.apache.beam.runners.fnexecution.wire;
0
* @version $Revision$
0
import java.util.Collections; import java.util.Set;
0
@Override
0
package org.apache.cocoon.template.v2.tag.samples; import org.apache.cocoon.template.v2.script.ScriptContext; import org.apache.cocoon.template.v2.tag.AbstractTag;
0
* * @param stream the input stream * @throws IOException if an error occurs while reading from the stream * @throws ClassNotFoundException if an object read from the stream can not be loaded * * @param stream the output stream * @throws IOException if an error occurs while writing to the stream
0
@Override
0
* $Revision: 1.5 $ * $Date: 2003/10/09 21:03:35 $ * Alternately, this acknowledgement may appear in the software itself, * if and wherever such third-party acknowledgements normally appear. * permission of the Apache Software Foundation. * @version $Id: PoolablePreparedStatementStub.java,v 1.5 2003/10/09 21:03:35 rdonkin Exp $
0
import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import com.google.inject.Inject;
0
// Implementation methods
0
import org.apache.xml.security.exceptions.XMLSecurityException;
0
LOG.info("Calling execute(SHUTDOWN)"); System.out.println("Calling execute(SHUTDOWN)");
0
* nor may "Apache" appear in their name, without * @version $Id: EnterpriseUnixFTPEntryParser.java,v 1.2 2003/01/26 00:21:43 dfs Exp $
0
private HashMap<String, String> elementNames = new HashMap<String, String>(); private ArrayList<Rule> rules = new ArrayList<Rule>(1); public List<Rule> match(String matchPath) { public List<Rule> match(String namespaceURI, String matchPath) { List<Rule> match = decoratedRules.match(namespaceURI, matchPath); LinkedList<Rule> newMatch = new LinkedList<Rule>(match); public List<Rule> rules() {
0
import org.apache.aurora.common.zookeeper.Credentials; if (zkClientConfig.credentials.isPresent()) { Credentials zkCredentials = zkClientConfig.credentials.get(); return new Log( QUORUM_SIZE.get(), logPath.getAbsolutePath(), zkConnectString, zkClientConfig.sessionTimeout.getValue(), zkClientConfig.sessionTimeout.getUnit().getTimeUnit(), zkLogGroupPath, zkCredentials.scheme(), zkCredentials.authToken()); } else { return new Log( QUORUM_SIZE.get(), logPath.getAbsolutePath(), zkConnectString, zkClientConfig.sessionTimeout.getValue(), zkClientConfig.sessionTimeout.getUnit().getTimeUnit(), zkLogGroupPath); }
0
import com.fasterxml.jackson.annotation.JsonProperty; @JsonProperty("repositories") @JsonProperty("repoVersion") @JsonProperty("repoVersionId") @JsonProperty("stackName") public long getM_repoVersionId() { return m_repoVersionId; } @JsonProperty("baseUrl") @JsonProperty("repoId") @JsonProperty("ambariManaged") @JsonProperty("repoName") @JsonProperty("mirrorsList") @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; CommandRepository that = (CommandRepository) o; return m_repoVersionId == that.m_repoVersionId; } @Override public int hashCode() { return (int) (m_repoVersionId ^ (m_repoVersionId >>> 32)); }
0
final boolean result = decorated().retainAll(coll); for (final Iterator<E> it = setOrder.iterator(); it.hasNext();) {
0
while (bufferLength > 0) { Buffer buf = buffer; int total = bufferLength; int length = Math.min(remoteWindow.waitForSpace(), total); int pos = buf.wpos(); buf.wpos(cmd == SshConstants.Message.SSH_MSG_CHANNEL_EXTENDED_DATA ? 14 : 10); buf.putInt(length); buf.wpos(pos); newBuffer(); if (total > length) { buffer.putBytes(buf.array(), pos - (total - length), total - length); bufferLength = total - length; } remoteWindow.waitAndConsume(length); log.debug("Send {} on channel {}", cmd, channel.getId()); channel.getSession().writePacket(buf); }
0
package org.apache.atlas.repository.graph; import org.apache.atlas.MetadataException; import org.apache.atlas.discovery.SearchIndexer; import org.apache.atlas.repository.Constants; import org.apache.atlas.repository.RepositoryException; import org.apache.atlas.typesystem.types.AttributeInfo; import org.apache.atlas.typesystem.types.ClassType; import org.apache.atlas.typesystem.types.DataTypes; import org.apache.atlas.typesystem.types.IDataType; import org.apache.atlas.typesystem.types.StructType; import org.apache.atlas.typesystem.types.TraitType; * @throws org.apache.atlas.MetadataException
0
* Copyright 2000-2009 The Apache Software Foundation
0
class ClipKey { /** * This clip hash code. Based on the serialized path * data */ int hashCodeValue = 0; /** * @param proxiedPath path used as an index in the Map */ public ClipKey(GeneralPath proxiedPath ){ String pathData = SVGPath.toSVGPathData(proxiedPath); hashCodeValue = pathData.hashCode(); } /** * @return this object's hashcode */ public int hashCode() { return hashCodeValue; } /** * @param object to compare * @return true if equal, false otherwise */ public boolean equals(Object clipKey){ boolean isEqual = false; if((clipKey != null) &&clipKey instanceof ClipKey) isEqual = (hashCodeValue == ((ClipKey)clipKey).hashCodeValue); return isEqual; }
0
package org.apache.hc.core5.testing.nio;
0
import java.lang.reflect.Array; /** * This method will stringify a Java object. It is mostly used to print the values * of unknown properties. This method will correctly handle if the passed object * is array and will property display it. * * If the value is byte[] the elements are shown as Hex * * @param value the value to convert * @return the string representation of the value */ public static final String toString(Object value) { if (value == null) { return "n/a"; } else if (value.getClass().isArray()) { final StringBuffer sb = new StringBuffer(); final int len = Array.getLength(value); synchronized (sb) { // it's faster to synchronize ALL loop calls sb.append('['); for (int i = 0; i < len; i++) { final Object element = Array.get(value, i); if (element instanceof Byte) { // convert byte[] to hex string sb.append("0x"); final String x = Integer.toHexString(((Byte) element).intValue() & 0xff); if (1 == x.length()) { sb.append('0'); } sb.append(x); } else { sb.append(toString(element)); } if (i < len - 1) { sb.append(", "); } } return sb.append(']').toString(); } } else { return value.toString(); } }
0
case ZooDefs.OpCode.create: case ZooDefs.OpCode.create2: case ZooDefs.OpCode.create2:
0
import org.apache.accumulo.core.client.mapreduce.InputTableConfig; private InputTableConfig tableQueryConfig; tableQueryConfig = new InputTableConfig(); InputTableConfig actualConfig = deserialize(serialized); InputTableConfig actualConfig = deserialize(serialized); InputTableConfig actualConfig = deserialize(serialized); InputTableConfig actualConfig = deserialize(serialized); private byte[] serialize(InputTableConfig tableQueryConfig) throws IOException { private InputTableConfig deserialize(byte[] bytes) throws IOException { InputTableConfig actualConfig = new InputTableConfig(new DataInputStream(bais));
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.datatype.typeimpl; /** * A {@link org.apache.cocoon.woody.datatype.Datatype Datatype} implementation for * java.lang.Boolean's. * @version $Id: BooleanType.java,v 1.1 2004/03/09 10:33:57 reinhard Exp $ */ public class BooleanType extends AbstractDatatype { public Class getTypeClass() { return Boolean.class; } public String getDescriptiveName() { return "boolean"; } }
0
* @version $Revision$ $Date$
0
public Principal getPrincipal() {
0
/** * Copyright 2013 Apache Software Foundation
0
import com.google.common.base.Preconditions; import com.google.common.collect.Sets;
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 CVS $Id: VariableConfiguration.java,v 1.4 2004/03/05 13:01:59 bdelacretaz Exp $
1
import java.util.Iterator; // POOL-288. Not all the traced objects will be statements List traces = getTrace(); if(traces != null) { Iterator traceIter = traces.iterator(); while (traceIter.hasNext()) { Object trace = traceIter.next(); if (trace instanceof Statement) { ((Statement) trace).close(); }
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 org.apache.mesos.v1.Protos.Offer; import org.apache.mesos.v1.Protos.Resource;
0
* @version $Revision$ $Date$
0
package org.apache.felix.scrplugin.om;
0
import java.util.Collection; import javax.persistence.EntityManager; import javax.persistence.TypedQuery; import org.apache.ambari.server.orm.RequiresSession; import org.apache.ambari.server.orm.entities.KeyValueEntity;
0
return boundedIterator(iterator, 0, max); return new BoundedIterator<E>(iterator, offset, max);
0
private final CodeValidator isbn10Validator = new CodeValidator(ISBN10_REGEX, 10, ISBN10CheckDigit.ISBN10_CHECK_DIGIT); private final CodeValidator isbn13Validator = new CodeValidator(ISBN13_REGEX, 13, EAN13CheckDigit.EAN13_CHECK_DIGIT);
0
* This <code>ClassLoader</code> implementation only grants permission to * A <code>URLClassLoader</code> extension is needed in case the user
0
super(org.apache.commons.bcel6.Const.FSUB);
0
import org.apache.sshd.util.test.NoIoTestCase; import org.junit.experimental.categories.Category; @Category({ NoIoTestCase.class }) public AuthorizedKeyEntryLoginOptionsParseTest( String value, String loginPart, String keyPart, Map<String, String> options) {
0
import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger LOG = LoggerFactory.getLogger(AsyncTest.class);
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 com.google.cloud.dataflow.sdk.options.PipelineOptions; import com.google.cloud.dataflow.sdk.util.common.worker.SourceFormat; * Creates {@code SourceFormat} objects from {@code Source}. public class SourceFormatFactory { private SourceFormatFactory() {} public static SourceFormat create(PipelineOptions options, Source source) throws Exception { return InstanceBuilder.ofType(SourceFormat.class) .withArg(PipelineOptions.class, options) "unable to create a source format from " + source, exn);
0
shutdownRegistry.addAction(EasyMock.<ExceptionalCommand<?>>anyObject());
0
* @version $Revision$ $Date$
0
package org.apache.batik.refimpl.gvt;
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. */ /** TODO: complete javadoc. */ package cz.seznam.euphoria.core.client.operator.state;
0
* @throws NullPointerException if the collection is null throw new NullPointerException("Collection must not be null.");
0
@Test(expectedExceptions = TypeNotFoundException.class) public void testCreateEntityWithUnknownDatatype() throws Exception { Referenceable entity = new Referenceable("Unknown datatype"); String dbName = RandomStringUtils.randomAlphanumeric(10); entity.set("name", dbName); entity.set("description", "us db"); createInstance(entity); Assert.fail(TypeNotFoundException.class.getSimpleName() +" was expected but none thrown."); }
0
import org.apache.commons.configuration.ex.ConfigurationException;
0
Copyright 2001 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) 2015 Google Inc. * * 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 com.google.cloud.dataflow.sdk.runners.inprocess; import com.google.cloud.dataflow.sdk.runners.inprocess.InProcessPipelineRunner.Bundle; import com.google.cloud.dataflow.sdk.transforms.AppliedPTransform; import com.google.cloud.dataflow.sdk.transforms.PTransform; import com.google.cloud.dataflow.sdk.util.common.CounterSet; import org.joda.time.Instant; import javax.annotation.Nullable; /** * The result of evaluating an {@link AppliedPTransform} with a {@link TransformEvaluator}. */ public interface InProcessTransformResult { /** * @return the {@link AppliedPTransform} that produced this result */ AppliedPTransform<?, ?, ?> getTransform(); /** * @return the {@link Bundle Bundles} produced by this transform */ Iterable<? extends Bundle<?>> getBundles(); /** * @return the {@link CounterSet} used by this {@link PTransform}, or null if this transform did * not use a {@link CounterSet} */ @Nullable CounterSet getCounters(); /** * @return the Watermark Hold for the transform at the time this result was produced */ Instant getWatermarkHold(); }
0
JavaRDD<WindowedValue<KV<K, V>>> rdd, Coder<K> keyCoder, WindowedValueCoder<V> wvCoder, boolean defaultParallelism) { JavaPairRDD<ByteArray, Iterable<byte[]>> groupedRDD; if (defaultParallelism) { groupedRDD = pairRDD.groupByKey(new HashPartitioner(rdd.rdd().sparkContext().defaultParallelism())); } else { groupedRDD = pairRDD.groupByKey(); } return groupedRDD
0
import java.math.BigDecimal; public Object expr(CommandSessionImpl session, CharSequence expr) { return new Expression(expr.toString()).eval(session.variables); }
0
import org.apache.hc.core5.annotation.Contract; import org.apache.hc.core5.annotation.ThreadingBehavior; @Contract(threading = ThreadingBehavior.IMMUTABLE)
0