Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
private Long hostId; public void setHostId(Long hostId) { this.hostId = hostId; public Long getHostId() { return hostId; return Objects.equals(hostId, that.hostId) && return Objects.hash(hostId, hostLevelParamsClusters);
0
g.dispose();
0
* 'a' then 'b'. Exact parent and parent match rules take precedence.
0
ClientSession s = client.connect("localhost", port).await().getSession(); ClientSession s = client.connect("localhost", port).await().getSession(); int res = s.waitFor(ClientSession.CLOSED, 5000);
0
String desc = "This iterator allows ranges of key to be transformed (with" + " the exception of row transformations)."; String bufferDesc = "Maximum buffer size (in accumulo memory spec) to use" + " for buffering keys before throwing a BufferOverflowException. Users" + " should keep this limit in mind when deciding what to transform. That" + " is, if transforming the column family for example, then all keys" + " sharing the same row and column family must fit within this limit" + " (along with their associated values)";
0
import org.apache.log4j.Logger; fs.delete(new Path("/tmp/testmf"), true); fs.delete(new Path("/tmp/testmf_failures"), true); fs.delete(new Path("/tmp/testmf"), true); CreateMapFiles.main(new String[] {"tmp/testmf", "8", "0", "100000", "99"}); bulkImport(fs, TABLE_NAME, "/tmp/testmf");
0
private static final long serialVersionUID = -7732226881069447957L;
0
import org.apache.felix.scr.impl.inject.ComponentMethods;
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableMap;
0
if (m_type == AggregateDependencyInjectionType.SET) { m_proxyObject = new ServiceSet(this); } else { m_proxyObject = new ServiceList(this); }
0
KeySelectorResult ksResult = null; KeySelector keySelector = validateContext.getKeySelector(); if (keySelector != null) { ksResult = keySelector.select (ki, KeySelector.Purpose.VERIFY, sm, validateContext); if (ksResult != null) { validationKey = ksResult.getKey(); } }
0
import java.util.Iterator; import org.apache.hc.core5.http.HeaderElement; import org.apache.hc.core5.http.MessageHeaders; public static Iterator<HeaderElement> iterate(final MessageHeaders headers, final String name) { Args.notNull(headers, "Message headers"); Args.notBlank(name, "Header name"); return new BasicHeaderElementIterator(headers.headerIterator(name)); } public static HeaderElement[] parse(final Header header) { Args.notNull(header, "Headers"); final String value = header.getValue(); if (value == null) { return new HeaderElement[] {}; } final ParserCursor cursor = new ParserCursor(0, value.length()); return BasicHeaderValueParser.INSTANCE.parseElements(value, cursor); }
0
package org.apache.sshd.common.session.impl;
0
import org.apache.hc.core5.http.HttpEntity; import org.apache.hc.core5.http.HttpHost; import org.apache.hc.core5.http.HttpRequest; import org.apache.hc.core5.http.HttpResponse; import org.apache.hc.core5.http.HttpVersion; import org.apache.hc.core5.http.message.BasicHttpRequest; import org.easymock.IExpectationSetters; request = HttpRequestWrapper.wrap(new BasicHttpRequest("GET", "/foo", HttpVersion.HTTP_1_1), host);
0
UnaryFunction<KeyInT, K> keyExtractor, super(name, flow, outputType, windowing, euphoriaWindowing, keyExtractor, keyType);
0
/** The type of the exception to catch. NULL means ANY. */ private ObjectType catchtype; /** The InstructionHandle where the handling begins. */ private InstructionHandle handlerpc; /** Leave instance creation to JustIce. */ ExceptionHandler(ObjectType catch_type, InstructionHandle handler_pc){ catchtype = catch_type; handlerpc = handler_pc; } /** * Returns the type of the exception that's handled. <B>'null' means 'ANY'.</B> */ public ObjectType getExceptionType(){ return catchtype; } /** * Returns the InstructionHandle where the handler starts off. */ public InstructionHandle getHandlerStart(){ return handlerpc; }
0
String project = options.as(GcpOptions.class).getProject();
0
"Component '%s' is mapped to an invalid number of host groups '%s'.", propertyName, component, matchingGroupCount)); yarnSiteMap.put("yarn.timeline-service.reader.webapp.address", new MultipleHostTopologyUpdater("TIMELINE_READER")); yarnSiteMap.put("yarn.timeline-service.reader.webapp.https.address", new MultipleHostTopologyUpdater("TIMELINE_READER"));
0
private final CharsetDecoder decoder; * @param chardecoder chardecoder to be used for decoding HTTP protocol elements. * If <code>null</code> simple type cast will be used for byte to char conversion. final CharsetDecoder chardecoder) { this.decoder = chardecoder; if (this.decoder == null) { if (this.decoder == null) {
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/decorators/Attic/TypedList.java,v 1.5 2003/08/31 17:24:46 scolebourne Exp $ * any, must include the following acknowledgement: * Alternately, this acknowledgement may appear in the software itself, * if and wherever such third-party acknowledgements normally appear. * @version $Revision: 1.5 $ $Date: 2003/08/31 17:24:46 $
0
* Copyright 2004,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: RefreshBasketEvent.java,v 1.2 2004/03/05 13:02:11 bdelacretaz Exp $
1
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/iterators/TestSingletonIterator.java,v 1.4 2003/02/19 20:33:10 scolebourne Exp $ import junit.framework.Test; import junit.framework.TestSuite; * @version $Id: TestSingletonIterator.java,v 1.4 2003/02/19 20:33:10 scolebourne Exp $
0
@JsonProperty("source_field")
0
extends AbstractObjectCreationFactory<Book> public Book createObject( Attributes attributes )
0
package org.apache.atlas.bridge.hivestructure; import org.apache.atlas.MetadataException; import org.apache.atlas.bridge.ABridge; import org.apache.atlas.repository.MetadataRepository; import org.apache.atlas.typesystem.types.AttributeDefinition; import org.apache.atlas.typesystem.types.ClassType; import org.apache.atlas.typesystem.types.HierarchicalTypeDefinition; import org.apache.atlas.typesystem.types.Multiplicity; import org.apache.atlas.typesystem.types.TypeSystem;
1
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/SetNextRule.java,v 1.13 2002/03/23 17:45:58 rdonkin Exp $ * $Revision: 1.13 $ * $Date: 2002/03/23 17:45:58 $ * @version $Revision: 1.13 $ $Date: 2002/03/23 17:45:58 $ * * @deprecated The digester instance is now set in the {@link Digester#addRule} method. * Use {@link #SetNextRule(String methodName)} instead. this(methodName); * * @deprecated The digester instance is now set in the {@link Digester#addRule} method. * Use {@link #SetNextRule(String methodName,String paramType)} instead. this(methodName, paramType); } /** * Construct a "set next" rule with the specified method name. The * method's argument type is assumed to be the class of the * child object. * * @param methodName Method name of the parent method to call */ public SetNextRule(String methodName) { this(methodName, null); } /** * Construct a "set next" rule with the specified method name. * * @param methodName Method name of the parent method to call * @param paramType Java class of the parent method's argument * (if you wish to use a primitive type, specify the corresonding * Java wrapper class instead, such as <code>java.lang.Boolean</code> * for a <code>boolean</code> parameter) */ public SetNextRule(String methodName, String paramType) {
0
// look for hints of a failure on the previous tablet server if (!logEntries.isEmpty() || needsMajorCompaction(MajorCompactionReason.NORMAL)) { // look for any temp files hanging around removeOldTemporaryFiles(); }
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: RegexpTargetHostMatcher.java,v 1.2 2004/03/05 13:02:41 bdelacretaz Exp $
1
if(stats.getServerState().equals("leader")) {
0
* - "session_id_to_ephemeral_paths": Map<Long, Set<String>> * - "max_file_descriptor_count": Long (unix only)
0
package org.apache.cocoon.template.jxtg.instructions; import org.apache.cocoon.template.jxtg.script.event.Event; import org.apache.cocoon.template.jxtg.script.event.StartElement; import org.apache.cocoon.template.jxtg.script.event.StartInstruction;
0
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableMap;
0
public static final short SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2;
0
final Object value = new Object(); final String strVal = converter.convert(String.class, value); } catch(final ConversionException cex) {
0
* @version $Id$
0
import org.apache.zookeeper.common.Time; request.setHdr(new TxnHeader(request.sessionId, request.cxid, zxid, Time.currentWallTime(), type)); Time.currentWallTime(), OpCode.multi)); throw e; request.setHdr(new TxnHeader(request.sessionId, request.cxid, zxid, Time.currentWallTime(), request.type));
0
* reconfiguration will fail. Should be committed from the CLI to disable this option. static { if (cl.hasOption("file") && cl.hasOption("members")) { try { try (FileInputStream inConfig = new FileInputStream(cl.getOptionValue("file"))) {
0
int bytesRead = in.read(keyEncryptionKey); // check if the number of bytes read into the array is the same as the value of the length field, if (bytesRead == keyEncryptionKeyLength) { cipher.init(encryptionMode, new SecretKeySpec(keyEncryptionKey, params.getAlgorithmName())); if (Cipher.UNWRAP_MODE == encryptionMode) { try { Key plaintextKey = cipher.unwrap(params.getEncryptedKey(), params.getAlgorithmName(), Cipher.SECRET_KEY); params.setPlaintextKey(plaintextKey.getEncoded()); } catch (InvalidKeyException e) { log.error("{}", e.getMessage(), e); throw new RuntimeException(e); } catch (NoSuchAlgorithmException e) { log.error("{}", e.getMessage(), e); throw new RuntimeException(e); } } else { Key plaintextKey = new SecretKeySpec(params.getPlaintextKey(), params.getAlgorithmName()); try { byte[] encryptedSecretKey = cipher.wrap(plaintextKey); params.setEncryptedKey(encryptedSecretKey); params.setOpaqueKeyEncryptionKeyID(pathToKeyName); } catch (InvalidKeyException e) { log.error("{}", e.getMessage(), e); throw new RuntimeException(e); } catch (IllegalBlockSizeException e) { log.error("{}", e.getMessage(), e); throw new RuntimeException(e); } } } else { log.error("{}", "Error:bytesRead does not match EncryptionkeyLength"); throw new IllegalArgumentException("Error:bytesRead does not match EncryptionkeyLength"); }
0
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
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 @Override @Override @Override @Override
0
package org.apache.commons.digester3; import org.apache.commons.digester3.CallMethodRule; import org.apache.commons.digester3.Digester; import org.apache.commons.digester3.ExtendedBaseRules; ("/org/apache/commons/digester3/" + name));
1
@Override @Override @Override
0
@Override @Deprecated @Deprecated
0
* @version CVS $Id: AbstractEnvironment.java,v 1.5 2003/03/18 18:24:27 bruno Exp $ synchronized (this.getClass()) { throw new ProcessingException("The deprecated resolve() method of the environment was called." +"Please either update your code to use the new resolveURI() method or"
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.state; /** * The {@link NotificationState} class represents the various states that an * outbound notification can exist in. It allows tracking and history for * notifications that are pending, have succeeded, or were processed but failed * to be sent successfully. */ public enum NotificationState { /** * The notification has not yet been processed by the notification system. */ PENDING, /** * The notification was processed, but failed to be sent. It will not be * processed again. */ FAILED, /** * The notification was processed successfully. */ DELIVERED }
0
final HttpRequest promise, final AsyncPushProducer pushProducer, final HttpContext httpContext) throws HttpException, IOException {
0
static final Logger LOGGER = Logger.getLogger(VarTest.class.getName());
0
public static final String HIVE_CLUSTER_NAME = "atlas.cluster.name"; public static final String ATLAS_ENDPOINT = "atlas.rest.address"; atlasClient = new AtlasClient(hiveConf.get(ATLAS_ENDPOINT, DEFAULT_DGI_URL), ugi, doAsUser);
0
return true;
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.beam.sdk.io.cassandra; import com.datastax.driver.core.Session; import com.datastax.driver.mapping.MappingManager; import org.apache.beam.sdk.transforms.SerializableFunction; /** * Factory implementation that CassandraIO uses to initialize the Default Object Mapper for mapping * POJOs to CRUD events in Cassandra. * * @see org.apache.beam.sdk.io.cassandra.DefaultObjectMapper */ class DefaultObjectMapperFactory<T> implements SerializableFunction<Session, Mapper> { private transient MappingManager mappingManager; Class<T> entity; DefaultObjectMapperFactory(Class<T> entity) { this.entity = entity; } @Override public Mapper apply(Session session) { if (mappingManager == null) { this.mappingManager = new MappingManager(session); } return new DefaultObjectMapper<T>(mappingManager.mapper(entity)); } }
0
import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import com.google.common.collect.Sets; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.nio.ByteBuffer; import java.nio.channels.ReadableByteChannel; import java.util.List; import java.util.NoSuchElementException; import java.util.Random;
0
JdbcConnection connection = JdbcDriver.connect(inMemoryMetaStore, options);
0
* encodes/decodes values of type {@code T} by converting to/from {@code IntermediateT} and then * encoding/decoding using the underlying {@code Coder<IntermediateT>}. * <p>The conversions from {@code T} to {@code IntermediateT} and vice versa must be supplied as * {@link CodingFunction}, a serializable function that may throw any {@code Exception}. If a thrown * exception is an instance of {@link CoderException} or {@link IOException}, it will be re-thrown, * otherwise it will be wrapped as a {@link CoderException}. OutputT apply(InputT input) throws Exception; public static <T, IntermediateT> DelegateCoder<T, IntermediateT> of( Coder<IntermediateT> coder, public void encode(T value, OutputStream outStream) throws CoderException, IOException { * Returns the coder used to encode/decode the intermediate values produced/consumed by the coding * functions of this {@code DelegateCoder}. * throws a {@link Coder.NonDeterministicException}. For this to be safe, the intermediate * {@code CodingFunction<T, IntermediateT>} must also be deterministic. * @return a structural for a value of type {@code T} obtained by first converting to {@code * IntermediateT} and then obtaining a structural value according to the underlying coder. CodingFunction<InputT, OutputT> fn, InputT input) throws CoderException, IOException { protected DelegateCoder( Coder<IntermediateT> coder,
1
import org.apache.atlas.v1.model.instance.Id; import org.apache.atlas.v1.model.instance.Referenceable; import org.apache.atlas.v1.typesystem.types.utils.TypesUtil; private TypesUtil.Pair<String, Feed> getHDFSFeed(String feedResource, String clusterName) throws Exception { assertEquals(((List<Id>)processEntity.get("outputs")).get(0).getId(), feedId); String inputId = ((List<Id>) processEntity.get("inputs")).get(0).getId(); return TypesUtil.Pair.of(feedId, feed); assertEquals(((List<Id>)processEntity.get("outputs")).get(0).getId(), feedId); String inputId = ((List<Id>) processEntity.get("inputs")).get(0).getId(); TypesUtil.Pair<String, Feed> result = getHDFSFeed(FEED_HDFS_RESOURCE, cluster.getName());
1
/* * $Id$ * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */
0
// I know that 60 seems _really_ high but it turns out // That the GraphicsNodeTree was not being cleared when I // tested with as high as 36. So I would leave it at 60 // (why so large I don't know). final static int NUM_GC=60; for (int i=0; i<NUM_GC; i++) { } sb.append(","); String objStr = sb.toString(); fmt(ERROR_OBJS_NOT_CLEARED, new Object[]{objStr})) if (objStr.length() > 40) objStr = objStr.substring(0,40) + "..." ; System.err.print(">>>>> Objects not cleared: " + objStr + "\n");
0
* @version CVS $Id$ implements Serviceable, ThreadSafe, AspectDataStore, Contextualizable {
0
import java.nio.file.FileVisitOption; import java.util.EnumSet; Files.walkFileTree(root, EnumSet.of(FileVisitOption.FOLLOW_LINKS), Integer.MAX_VALUE, new FilteringFileVisitor());
0
import static com.google.common.base.Charsets.UTF_8; import java.text.ParseException; this.visibility = new String(visibility, UTF_8);
0
* @return * @throws XMLSecurityException
0
* @return Comparator&lt;? super V&gt;
0
StringBuffer buf = new StringBuffer(64); buf.append(access).append(signature).append(" ").append(name); buf.append(" = ").append(cv); buf.append(" [").append(a.toString()).append("]");
0
import org.junit.Ignore; @Ignore("We have a concurrency bug in HttpCore which will be addressed after HttpClient 4.3.2 is released")
0
import java.io.File; import java.util.Iterator; import java.util.Set; import org.apache.xml.security.c14n.implementations.Canonicalizer20010315OmitComments; import org.apache.xml.security.signature.XMLSignature; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.transforms.Transforms; import org.apache.xml.security.transforms.params.XPath2FilterContainer; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node;
0
import java.util.List; import org.apache.commons.configuration.PropertyConverter; * @version $Revision: 1.4 $, $Date$ Object value = config.getInitParameter(key); List list = PropertyConverter.split((String) value, getDelimiter()); return list.size() > 1 ? list : value;
0
// AntTagLibrary ant = (AntTagLibrary) context.getTagLibrary( "jelly:ant" ); org.apache.tools.ant.Project antProject = (org.apache.tools.ant.Project) context.findVariable( "org.apache.commons.jelly.ant.Project" );
0
protected abstract byte[] engineUpdate(byte buf[]) throws XMLSecurityException; protected abstract byte[] engineUpdate(byte buf[], int offset, int len) throws XMLSecurityException; protected abstract int engineGetKeySize(); protected abstract int engineGetBlockSize(); /** * Der init kann durchgefhrt werden: * * init(Cipher.ENCRYPT_MODE, byte[] key, SecureRandom sr) * init(Cipher.ENCRYPT_MODE, byte[] key, byte[] iv) * init(Cipher.ENCRYPT_MODE, PublicKey pk, * init(Cipher.ENCRYPT_MODE, Certificate cert, * init(Cipher.DECRYPT_MODE, byte[] key, * init(Cipher.DECRYPT_MODE, PrivateKey pk, */ protected abstract void engineInit(int opmode, byte[] key, SecureRandom sr) throws XMLSecurityException; protected abstract void engineInit(int opmode, byte[] key) throws XMLSecurityException;
0
builder.add(DisplayData.item("predicate", predicateDescription));
0
import org.apache.http.conn.routing.HttpRoute; import org.apache.http.conn.routing.HttpRoutePlanner; import org.apache.http.conn.ClientConnectionManager;
0
import java.util.*; cipherOutputStream = new TrimmerOutputStream(outputStream, 8192 * 10, 3, 4); xmlEventWriter = XMLSecurityConstants.xmlOutputFactory.createXMLEventWriter(cipherOutputStream, "UTF-8"); final Deque<XMLSecCharacters> charactersBuffer = characterEventGeneratorOutputStream.getCharactersBuffer(); if (charactersBuffer.size() > 5) { Iterator<XMLSecCharacters> charactersIterator = charactersBuffer.iterator(); while (charactersIterator.hasNext()) { XMLSecCharacters characters = charactersIterator.next(); outputAsEvent(subOutputProcessorChain, characters); charactersIterator.remove(); final Deque<XMLSecCharacters> charactersBuffer = characterEventGeneratorOutputStream.getCharactersBuffer(); private final Deque<XMLSecCharacters> charactersBuffer = new ArrayDeque<XMLSecCharacters>(); public Deque<XMLSecCharacters> getCharactersBuffer() { charactersBuffer.offer(createCharacters(new String(new byte[]{((byte) b)}, encoding))); charactersBuffer.offer(createCharacters(new String(b, encoding))); charactersBuffer.offer(createCharacters(new String(b, off, len, encoding)));
0
import java.util.Collections; import java.util.Set; import javax.annotation.Nullable; import org.apache.beam.sdk.extensions.sql.impl.BeamCalciteSchema; /** Get a specific table from this provider it is present, or null if it is not present. */ default @Nullable Table getTable(String tableName) { return getTables().get(tableName); } /** * Returns all sub-providers, e.g. sub-schemas. Temporary, this logic needs to live in {@link * BeamCalciteSchema}. */ default Set<String> getSubProviders() { return Collections.emptySet(); } /** * Returns a sub-provider, e.g. sub-schema. Temporary, this logic needs to live in {@link * BeamCalciteSchema}. */ default TableProvider getSubProvider(String name) { return null; }
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/axes/RootContext.java,v 1.10 2003/02/19 00:59:51 dmitri Exp $ * $Revision: 1.10 $ * $Date: 2003/02/19 00:59:51 $ * @version $Revision: 1.10 $ $Date: 2003/02/19 00:59:51 $ private JXPathContextReferenceImpl jxpathContext; public RootContext( JXPathContextReferenceImpl jxpathContext, NodePointer pointer) { this.jxpathContext = jxpathContext; return jxpathContext; public EvalContext getAbsoluteRootContext() { return jxpathContext.getAbsoluteRootContext(); } throw new UnsupportedOperationException(); throw new UnsupportedOperationException(); throw new UnsupportedOperationException(); throw new UnsupportedOperationException(); return new InitialContext(new RootContext(jxpathContext, pointer)); new RootContext( jxpathContext, jxpathContext.getVariablePointer(variableName))); return jxpathContext.getFunction(functionName, parameters);
0
import org.apache.ambari.server.state.HostState; boolean performingInitialBootstrap = false; performingInitialBootstrap = true; // During initial bootstrap, unhealthy hosts are ignored // so we boostrap the CURRENT version anyway if (performingInitialBootstrap && hostEntity.getHostStateEntity().getCurrentState() != HostState.HEALTHY) { continue; } boolean performingInitialBootstrap = false; if (hostVersionDAO.findByClusterAndHost(getClusterName(), host.getHostName()).isEmpty()) { // That is an initial bootstrap performingInitialBootstrap = true; } // Alternatively, transition to CURRENT during initial bootstrap if at least one host component advertised a version if (hostSummary.isUpgradeFinished() && hostVersionEntity.getState().equals(RepositoryVersionState.UPGRADING) || performingInitialBootstrap) {
0
import java.util.Properties; Properties props = m_providedServices[i].getProperties(); Iterator iterator = props.keySet().iterator(); Object obj = props.get(name); if (obj != null) { prop.addAttribute(new Attribute("value", obj.toString())); } else { prop.addAttribute(new Attribute("value", "null")); }
0
import org.apache.cocoon.caching.IdentifierCacheKey; * @version CVS $Id: CachingSource.java,v 1.11 2004/04/15 08:05:56 cziegeler Exp $ final protected IdentifierCacheKey cacheKey; this.cacheKey = new IdentifierCacheKey(key, false); protected IdentifierCacheKey getCacheKey() {
0
*/ public abstract class ReturnInstruction extends Instruction implements ExceptionThrower, TypedInstruction, StackConsumer { /** * Empty constructor needed for the Class.newInstance() statement in * Instruction.readInstruction(). Not to be used otherwise. */ ReturnInstruction() { } /** * @param opcode of instruction */ protected ReturnInstruction(short opcode) { super(opcode, (short) 1); public Type getType() { switch (opcode) { case Constants.IRETURN: return Type.INT; case Constants.LRETURN: return Type.LONG; case Constants.FRETURN: return Type.FLOAT; case Constants.DRETURN: return Type.DOUBLE; case Constants.ARETURN: return Type.OBJECT; case Constants.RETURN: return Type.VOID; default: // Never reached throw new ClassGenException("Unknown type " + opcode); } } public Class[] getExceptions() { return new Class[] { ExceptionConstants.ILLEGAL_MONITOR_STATE }; } /** @return type associated with the instruction */ public Type getType( ConstantPoolGen cp ) { return getType(); } }
0
import org.apache.beam.sdk.fn.channel.ManagedChannelFactory;
0
if (!isDelimiterParsingDisabled() || !(value instanceof String))
0
DistributedTrace.enable("localhost", "testTrace", getClientConfig());
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
/* * 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.commons.collections; import java.util.Enumeration; import java.util.Iterator; /** Adapter to make an {@link Iterator Iterator} instance appear to be an {@link Enumeration Enumeration} instances * * @author <a href="mailto:jstrachan@apache.org">James Strachan</a> */ public class IteratorEnumeration implements Enumeration { private Iterator iterator; public IteratorEnumeration() { } public IteratorEnumeration( Iterator iterator ) { this.iterator = iterator; } // Iterator interface //------------------------------------------------------------------------- public boolean hasMoreElements() { return iterator.hasNext(); } public Object nextElement() { return iterator.next(); } // Properties //------------------------------------------------------------------------- public Iterator getIterator() { return iterator; } public void setIterator( Iterator iterator ) { this.iterator = iterator; } }
0
return (DataSink<T>) new HadoopDataSink(
0
import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyString;
0
/** * Invalidates all clusters by retrieving each from the database and refreshing all of its internal * stateful collections. */ void invalidateAllClusters();
0
import org.apache.xml.security.test.TestUtils; TestUtils.createDSctx(doc, "x",
0
import com.google.auto.value.AutoValue; import com.google.common.collect.ImmutableList; import java.util.Collection; import java.util.EnumSet; import java.util.Set; import javax.annotation.Nullable;
0
String[] ba = new String(encodedDFV, Constants.UTF8).split(","); return ("" + size + "," + numEntries + "," + time).getBytes(Constants.UTF8); return ("" + size + "," + numEntries).getBytes(Constants.UTF8);
0
/* * Copyright 2013 Twitter, 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. */
0
* @version $Id: TestConfigurationConverter.java,v 1.3 2004/01/16 14:23:39 epugh Exp $ protected Configuration config = new BaseConfiguration(); ExtendedProperties ep = ConfigurationConverter.getExtendedProperties(config);
0
private boolean useContextClassLoader = true;
0
* @version CVS $Id: CIncludeTransformer.java,v 1.3 2003/05/16 07:04:55 cziegeler Exp $ SourceUtil.toSAX(source, mimeType, new IncludeXMLConsumer(this.contentHandler, this.lexicalHandler)); SourceUtil.toSAX(source, mimeType, this.filter);
0
clusters.addCluster(clusterName, new StackId("HDP-0.1"));
0
s_commandExecutionHelper.get().addExecutionCommandsToStage(actionContext, stage, requestParams, jsons); s_commandExecutionHelper.get().addExecutionCommandsToStage(actionContext, stage, requestParams, jsons);
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.geom.AffineTransform; /** * Factory class for vending <tt>AffineTransform</tt> objects. * * @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a> * @version $Id$ */ public interface TransformBridge extends Bridge { /** * Creates a <tt>AffineTransform</tt> using the specified context * and element. * @param ctx the context to use * @param element the Element with the 'transform' attribute */ AffineTransform createTransform(BridgeContext ctx, Element element); }
1
import org.apache.ambari.server.security.credential.PrincipalKeyCredential; import org.apache.ambari.server.utils.ShellCommandUtil; import org.apache.commons.codec.binary.Base64; import org.apache.commons.lang.ArrayUtils; import org.apache.commons.lang.StringUtils; import org.apache.directory.server.kerberos.shared.crypto.encryption.KerberosKeyFactory; import org.apache.directory.server.kerberos.shared.keytab.Keytab; import org.apache.directory.server.kerberos.shared.keytab.KeytabEntry; import org.apache.directory.shared.kerberos.KerberosTime; import org.apache.directory.shared.kerberos.codec.types.EncryptionType; import org.apache.directory.shared.kerberos.components.EncryptionKey; import org.slf4j.Logger; import org.slf4j.LoggerFactory;
0
import java.util.HashMap; Either.class, // broadcast hash join HashMap.class
0
import org.apache.felix.sigil.common.model.ModelElementFactory; import org.apache.felix.sigil.common.model.eclipse.ILibrary; import org.apache.felix.sigil.common.model.osgi.IPackageImport;
0
executionCommand.setRoleParams(new HashMap<>()); executionCommand.setRoleParams(new HashMap<>()); executionCommand.setRoleParams(new HashMap<>());
0
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkState; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList;
0