Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
return new UnmodifiableOrderedBidiMap<>(map); inverse = new UnmodifiableOrderedBidiMap<>(decorated().inverseBidiMap());
1
* "Old" connection manager interface, as ported from HttpClient 3.x. * @deprecated kept temporarily for reference. To be replaced by * {@link ClientConnectionManager}.
0
import org.apache.beam.runners.dataflow.worker.fn.data.BeamFnDataGrpcService; import org.apache.beam.runners.fnexecution.GrpcFnServer; import org.apache.beam.runners.fnexecution.state.GrpcStateService; public GrpcFnServer<BeamFnDataGrpcService.DataService> getGrpcDataFnServer(); public GrpcFnServer<GrpcStateService> getGrpcStateFnServer();
0
import org.apache.beam.sdk.PipelineRunner;
0
protected String convertToString(Object value) {
0
import org.apache.commons.ognl.ClassResolver; protected Map<ClassResolver, EnhancedClassLoader> _loaders = new HashMap<ClassResolver, EnhancedClassLoader>(); public static String getCastString( Class<?> type ) Class<?> castClass = OgnlRuntime.getCompiler().getRootExpressionClass( expression, context ); /** * {@inheritDoc} */ /** * {@inheritDoc} */ public String getClassName( Class<?> clazz ) Class<?>[] intf = clazz.getInterfaces(); /** * {@inheritDoc} */ public Class<?> getSuperOrInterfaceClass( Method m, Class<?> clazz ) Class<?>[] intfs = clazz.getInterfaces(); Class<?> intClass; Class<?> superClass = getSuperOrInterfaceClass( m, clazz.getSuperclass() ); public boolean containsMethod( Method m, Class<?> clazz ) Class<?>[] parms = m.getParameterTypes(); Class<?>[] mparms = methods[i].getParameterTypes(); Class<?>[] exceptions = m.getExceptionTypes(); Class<?>[] mexceptions = methods[i].getExceptionTypes(); /** * {@inheritDoc} */ public Class<?> getInterfaceClass( Class<?> clazz ) Class<?>[] intf = clazz.getInterfaces(); /** * {@inheritDoc} */ public Class<?> getRootExpressionClass( Node rootNode, OgnlContext context ) Class<?> ret = context.getRoot().getClass(); /** * {@inheritDoc} Class<?> clazz = pool.toClass( newClass ); /** * {@inheritDoc} */ public String createLocalReference( OgnlContext context, String expression, Class<?> type ) EnhancedClassLoader ret = _loaders.get( context.getClassResolver() ); protected CtClass getCtClass( Class<?> searchClass )
0
org.apache.xml.security.Init.init();
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.infra.job.dummy; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.batch.item.ItemProcessor; public class DummyItemProcessor implements ItemProcessor<DummyObject, String> { private static final Logger LOG = LoggerFactory.getLogger(DummyItemProcessor.class); @Override public String process(DummyObject input) throws Exception { LOG.info("Dummy processing, f1: {}, f2: {}. wait 10 seconds", input.getF1(), input.getF2()); Thread.sleep(10000); return String.format("%s, %s", input.getF1(), input.getF2()); } }
0
/* * Copyright 2016-2018 Seznam.cz, a.s.
0
public static Object getField(final Object target, final String fieldName)
0
FileSystem fs = FileUtil.getFileSystem(instanceDirectory.toString(), CachedConfiguration.getInstance(), AccumuloConfiguration.getSiteConfiguration());
0
import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException;
1
* Copyright 2002,2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * @version $Revision: 1.4 $
0
package org.apache.http.nio.testserver;
0
ExecutionContext.StepContext step = executionContext.getStepContext("step", "transform");
0
* http://www.apache.org/licenses/LICENSE-2.0
0
package org.apache.beam.sdk.extensions.sql.impl.rel;
0
import org.apache.felix.scr.impl.helper.ComponentMethods; super( activator, componentHolder, metadata, new ComponentMethods() );
0
import org.apache.accumulo.core.client.impl.Namespace; if (!curr.startsWith(Namespace.ACCUMULO + ".")) {
0
package org.apache.accumulo.core.client.mapreduce.lib.util;
1
import java.util.Collections; entities = clusterDAO.getLatestConfigurationsWithTypes(clusterEntity.getClusterId(), HDP_01, Collections.emptyList()); Assert.assertTrue(entities.isEmpty());
0
if (super.getIndex() <= org.apache.commons.bcel6.Constants.MAX_BYTE) { // Fits in one byte? out.writeByte(super.getIndex()); out.writeShort(super.getIndex()); super.setIndex(bytes.readUnsignedByte()); org.apache.commons.bcel6.classfile.Constant c = cpg.getConstantPool().getConstant(super.getIndex()); throw new RuntimeException("Unknown or invalid constant type at " + super.getIndex()); switch (cpg.getConstantPool().getConstant(super.getIndex()).getTag()) { throw new RuntimeException("Unknown or invalid constant type at " + super.getIndex());
0
protected static final StringMap values = new StringMap();
0
* $Header: /home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/PostTag.java,v 1.4 2002/07/14 16:41:38 dion Exp $ * $Revision: 1.4 $ * $Date: 2002/07/14 16:41:38 $ * Copyright (c) 1999-2001 The Apache Software Foundation. All rights * import org.apache.commons.httpclient.HttpUrlMethod; import org.apache.commons.httpclient.NameValuePair; /** * A http post * @author dion public class PostTag extends HttpTagSupport { /** the post method */ private UrlPostMethod _postMethod; /** Creates a new instance of PostTag */ public PostTag() { } /** * Return a {@link HttpUrlMethod method} to be used for post'ing * * @return a HttpUrlMethod implementation * @throws MalformedURLException when the {@link getUrl() url} or * {@link #getPath() path} is invalid */ protected HttpUrlMethod getHttpUrlMethod() throws MalformedURLException { if (_postMethod == null) { _postMethod = new UrlPostMethod(getResolvedUrl()); } return _postMethod; } /** * Set the current parameters on the url method ready for processing * * This method <strong>must</strong> be called after * {@link getHttpUrlMethod} protected void setParameters() { NameValuePair nvp = null; for (int index = 0; index < getParameters().size(); index++) { NameValuePair parameter = (NameValuePair) getParameters(). get(index); _postMethod.addParameter(parameter); }
0
package org.apache.accumulo.examples.simple.dirlist; import org.apache.accumulo.examples.simple.filedata.FileDataIngest;
0
/** * Method main * * @param unused * @throws Exception */ public static void main(String unused[]) throws Exception { KeyStore ks = KeyStore.getInstance("JKS"); FileInputStream fis = new FileInputStream( "data/org/apache/xml/security/samples/input/keystore.jks"); ks.load(fis, "xmlsecurity".toCharArray()); javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); org.w3c.dom.Document doc = db.newDocument(); KeyInfo ki = new KeyInfo(doc); doc.appendChild(ki.getElement()); ki.setId("myKI"); ki.addKeyName("A simple key"); X509Certificate cert = (X509Certificate) ks.getCertificate("test"); ki.addKeyValue(cert.getPublicKey()); X509Data x509Data = new X509Data(doc); ki.add(x509Data); x509Data.addCertificate(cert); x509Data.addSubjectName("Subject name"); x509Data.addIssuerSerial("Subject nfsdfhs", 6786); ki.add(new RSAKeyValue(doc, new BigInteger("678"), new BigInteger("6870"))); XMLUtils.outputDOMc14nWithComments(doc, System.out); }
0
if (lockedByThread != null) { LOG.info("lockTypeRegistryForUpdate(): waiting for lock to be released by thread {}", lockedByThread);
1
import org.apache.atlas.utils.ParamChecker;
1
import org.apache.http.impl.entity.DefaultContentLengthStrategy; * {@link DefaultContentLengthStrategy#INSTANCE} will be used. DefaultContentLengthStrategy.INSTANCE; DefaultContentLengthStrategy.INSTANCE;
0
boolean debugEnabled = log.isDebugEnabled(); if (debugEnabled) { boolean traceEnabled = log.isTraceEnabled(); if (debugEnabled) { if (traceEnabled) { boolean debugEnabled = log.isDebugEnabled(); if (debugEnabled) { if (debugEnabled) { public CloseFuture close(boolean immediately) { Channel channel = AbstractChannel.this; boolean debugEnabled = log.isDebugEnabled(); if (debugEnabled) { if (debugEnabled) { if (debugEnabled) { if (debugEnabled) {
0
import org.springframework.security.authentication.BadCredentialsException; throw new BadCredentialsException("Invalid credentials!!");
0
implements CacheEntryFactory<T, Map<String, List<Method>>> for ( Method method : c.getDeclaredMethods() ) List<Method> ml = result.get( method.getName() ); ml = new ArrayList<Method>(); result.put( method.getName(), ml ); c = c.getSuperclass();
0
public Object getProperty( Map<String, Object> context, Object target, Object name ) public void setProperty( Map<String, Object> context, Object target, Object name, Object value )
0
* Classes and interfaces for interacting with state.
0
import com.google.api.services.dataflow.model.ConcatPosition; public static Position positionAtConcatPosition( @Nullable Integer index, @Nullable Position innerPosition) { return new Position().setConcatPosition( new ConcatPosition().setIndex(index).setPosition(innerPosition)); } public static ApproximateProgress approximateProgressAtConcatPosition( @Nullable Integer index, @Nullable Position innerPosition) { return approximateProgressAtPosition(positionAtConcatPosition(index, innerPosition)); } public static Reader.DynamicSplitRequest splitRequestAtConcatPosition( @Nullable Integer index, @Nullable Position innerPosition) { return toDynamicSplitRequest(approximateProgressAtConcatPosition(index, innerPosition)); }
0
import org.apache.accumulo.server.master.Master; public long close(Master m, FileSystem fs, Path path) throws IOException {
0
final Map<String, Header> map = new HashMap<String, Header>(headers.length); for (final Header header : headers) { final String s = header.getValue(); final int beginIndex = pos; final int endIndex = pos; final String s = buffer.substring(beginIndex, endIndex); final AuthSchemeRegistry registry = (AuthSchemeRegistry) context.getAttribute( for (final String id: authPrefs) { final Header challenge = challenges.get(id.toLowerCase(Locale.ENGLISH)); } catch (final IllegalStateException e) {
0
import org.apache.spark.storage.StorageLevel; private StorageLevel storageLevel = StorageLevel.MEMORY_AND_DISK_SER(); * Storage level to be used for expensive computation graph splits. * * @return builder */ public Builder storageLevel(StorageLevel storageLevel) { this.storageLevel = storageLevel; return this; } /** return new SparkExecutor(conf, storageLevel); /** * Storage level to be used for DAG splits. */ private final StorageLevel storageLevel; private SparkExecutor(SparkConf conf, StorageLevel storageLevel) { this.sparkContext = new JavaSparkContext(conf); this.storageLevel = storageLevel; sinks = translator.translateInto(flow, storageLevel);
0
String attributeName = filterCriteria.getAttributeName(); if (isIndexSearchable(filterCriteria, structType)) { LOG.warn("not using index-search for attribute '{}' - its either non-indexed or a string attribute used with NEQ operator; might cause poor performance", structType.getQualifiedAttributeName(attributeName)); if (insideOrCondition && !isIndexSearchable(filterCriteria, structType)) { private boolean isIndexSearchable(FilterCriteria filterCriteria, AtlasStructType structType) throws AtlasBaseException { String qualifiedName = structType.getQualifiedAttributeName(filterCriteria.getAttributeName()); Set<String> indexedKeys = context.getIndexedKeys(); boolean ret = indexedKeys != null && indexedKeys.contains(qualifiedName); if (ret) { // index exists // Don't use index query for NEQ on string type attributes - as it might return fewer entries due to tokenization of vertex property value by indexer if (filterCriteria.getOperator() == SearchParameters.Operator.NEQ) { AtlasType attributeType = structType.getAttributeType(filterCriteria.getAttributeName()); if (AtlasBaseTypeDef.ATLAS_TYPE_STRING.equals(attributeType.getTypeName())) { ret = false; } } } return ret; }
0
List<String> values = Arrays.asList(cl.getOptionValues("J")); List<?> argsleft = cl.getArgList(); List<?> argsleft = cl.getArgList();
0
import com.twitter.common.testing.easymock.EasyMockTest;
0
public interface HttpRequest extends HttpMessage {
0
String json = jsonCodec.serialize(m).convertWith(ca).toString(); convertWith(ca).from(json);
0
import org.apache.accumulo.core.metadata.MetadataLocationObtainer; import org.apache.accumulo.core.metadata.MetadataTable; import org.apache.accumulo.core.metadata.RootTable; import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection; public TabletLocations lookupTablet(TabletLocation src, Text row, Text stopRow, TabletLocator parent, TCredentials credentials) throws AccumuloSecurityException { Pair<SortedMap<KeyExtent,Text>,List<KeyExtent>> metadata = MetadataLocationObtainer.getMetadataLocationEntries(results); SortedMap<KeyExtent,Text> metadata = MetadataLocationObtainer.getMetadataLocationEntries(results).getFirst(); Key lk = new Key(mr, TabletsSection.CurrentLocationColumnFamily.NAME, new Text(instance)); Key pk = new Key(mr, TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.getColumnFamily(), TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.getColumnQualifier());
1
return new TransformedSplitMap<>(map, keyTransformer, valueTransformer); final Map<K, V> result = new LinkedMap<>(map.size());
1
PropertiesConfiguration pc = new PropertiesConfiguration(); pc.setFileName(testProperties); pc.load(); cc.addConfiguration(pc);
0
import org.apache.beam.sdk.state.TimeDomain;
0
* The property name for connectionInitSqls. private final static String PROP_CONNECTIONINITSQLS = "connectionInitSqls"; PROP_CONNECTIONINITSQLS, value = properties.getProperty(PROP_CONNECTIONINITSQLS);
0
import org.apache.accumulo.core.client.security.tokens.PasswordToken; prop.put("org.apache.accumulo.proxy.ProxyServer.tokenClass", PasswordToken.class.getName());
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
* This contains the results of a set of validation rules processed protected static class ResultStatus implements Serializable {
0
import org.apache.felix.http.base.internal.util.PatternUtil; if ( path.equals("/") ) return super.isValid() && PatternUtil.isValidSymbolicName(this.name) && isValidPath();
0
// the original source prefix final String m_prefix; final String prefix, m_prefix = prefix; return m_prefix + ":" + m_delegate.getScheme(); return m_prefix + ":" + m_delegate.getURI(); return new RepositorySource( m_prefix, (ModifiableTraversableSource) m_delegate.getChild(name), m_prefix, return new RepositorySource( m_prefix, (ModifiableTraversableSource) m_delegate.getParent(), m_manager, getLogger());
0
* Copyright (c) 2002 The Apache Software Foundation. All rights
0
Nodes result = new Nodes(); getElementsByTagName(e, tagname, result); return result; Nodes result = new Nodes(); getElementsByTagNameNS(e, namespaceURI, localName, result); return result;
0
File configFile = null; if ( configFileName != null ) { resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE); source = resolver.resolveURI(configFileName); // get the config file to use configFile = SourceUtil.getFile(source); //if(!configFile.exists()){ // throw new ParameterException( // "JCS Config file does not exist: " + configFileName // ); //} }
0
import java.awt.geom.AffineTransform;
0
import org.junit.Ignore; @Ignore
0
StringBuilder buf = new StringBuilder(100); // CHECKSTYLE IGNORE MagicNumber
0
import org.apache.hc.core5.function.Callback; class InternalIOSession implements TlsCapableIOSession { private final Queue<InternalIOSession> closedSessions; private final AtomicBoolean connected; InternalIOSession( final Queue<InternalIOSession> closedSessions) { this.connected = new AtomicBoolean(false); final IOEventHandler handler = getEventHandler(); if (connected.compareAndSet(false, true)) { final IOEventHandler handler = getEventHandler(); handler.connected(ioSession); } final IOEventHandler handler = getEventHandler(); handler.inputReady(tlsSession); final IOEventHandler handler = getEventHandler(); final IOEventHandler handler = getEventHandler(); handler.inputReady(ioSession); final IOEventHandler handler = getEventHandler(); handler.outputReady(tlsSession); final IOEventHandler handler = getEventHandler(); final IOEventHandler handler = getEventHandler(); handler.outputReady(ioSession); handler.timeout(ioSession); handler.disconnected(ioSession); public void startTls( verifier, new Callback<SSLIOSession>() { @Override public void execute(final SSLIOSession sslSession) { if (connected.compareAndSet(false, true)) { final IOEventHandler handler = getEventHandler(); handler.connected(sslSession); } } }))) {
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.threaddump.internal.jdk5; import java.util.HashMap; import java.util.Map; import org.apache.felix.threaddump.internal.ThreadWriter; /** * */ public final class ThreadStateConverter { private static final ThreadStateConverter INSTANCE = new ThreadStateConverter(); private final Map statuses = new HashMap(); private ThreadStateConverter() { register(Thread.State.NEW, ThreadWriter.NEW); register(Thread.State.RUNNABLE, ThreadWriter.RUNNABLE); register(Thread.State.BLOCKED, ThreadWriter.BLOCKED); register(Thread.State.WAITING, ThreadWriter.WAITING); register(Thread.State.TIMED_WAITING, ThreadWriter.TIMED_WAITING); register(Thread.State.TERMINATED, ThreadWriter.TERMINATED); } private void register(Thread.State state, short status) { statuses.put(state, Short.valueOf(status)); } private short getStatus(Thread.State state) { return ((Short) statuses.get(state)).shortValue(); } public static short toStatus(Thread.State state) { return INSTANCE.getStatus(state); } }
0
* Provide a String representation of this file filter. * @return a String representation
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.osgi.service.obr.Resource; private Resource m_resource; public Resource getResource() { return m_resource; } public void setResource(Resource resource) { m_resource = resource; }
0
import org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException; while (true) { try { client = MasterClient.getConnectionWithRetry(new ClientContext(c.getInstance(), creds, clientConf)); stats = client.getMasterStats(Tracer.traceInfo(), creds.toThrift(c.getInstance())); break; } catch (ThriftNotActiveServiceException e) { // Let it loop, fetching a new location sleepUninterruptibly(100, TimeUnit.MILLISECONDS); } finally { if (client != null) MasterClient.close(client); }
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
import org.apache.beam.sdk.transforms.DoFn; private final SimpleDoFnRunner<KeyedWorkItem<String, KV<InputT, RestrictionT>>, OutputT> underlying; SimpleDoFnRunner<KeyedWorkItem<String, KV<InputT, RestrictionT>>, OutputT> underlying, public DoFn<KeyedWorkItem<String, KV<InputT, RestrictionT>>, OutputT> getFn() { return underlying.getFn(); }
0
import static org.apache.beam.runners.core.construction.PTransformTranslation.IMPULSE_TRANSFORM_URN; .put(IMPULSE_TRANSFORM_URN, new ImpulseEvaluatorFactory.ImpulseRootProvider(context))
0
package org.apache.ambari.server.state;
0
* @version CVS $Id: TextRecorder.java,v 1.2 2003/05/06 07:17:28 cziegeler Exp $ buffer.append(new String(ary, start, length));
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/test/org/apache/commons/validator/ValidatorTestSuite.java,v 1.2 2002/03/30 04:31:29 dwinterfeldt Exp $ * $Revision: 1.2 $ * $Date: 2002/03/30 04:31:29 $ * * ==================================================================== * @version $Revision: 1.2 $ $Date: 2002/03/30 04:31:29 $ suite.addTest(ByteTest.suite()); suite.addTest(ShortTest.suite()); suite.addTest(IntegerTest.suite()); suite.addTest(LongTest.suite()); suite.addTest(FloatTest.suite()); suite.addTest(DoubleTest.suite()); suite.addTest(TypeTest.suite()); }
0
import org.apache.commons.io.FilenameUtils; * @todo Switch from 512 byte block size to bytes return FindingFilter.invert( this.invert, FilenameUtils.wildcardMatch(file.getName().toLowerCase(), this.argument.toString().toLowerCase()) ); return FindingFilter.invert( this.invert, FilenameUtils.wildcardMatch(file.getName(), this.argument.toString()) ); return FindingFilter.invert( this.invert, FilenameUtils.wildcardMatch(file.getPath().toLowerCase(), this.argument.toString().toLowerCase()) ); return FindingFilter.invert( this.invert, FilenameUtils.wildcardMatch(file.getPath(), this.argument.toString()) );
0
log.debug("we need >= 2 servers. sleeping for {}ms", currentWait); log.debug("We shouldn't have unassigned tablets. sleeping for {}ms", currentWait); log.debug("We should have > 10 tablets. sleeping for {}ms", currentWait); log.debug("Min={}, Max={}", min, max); log.debug("ratio of min to max tablets per server should be roughly even. sleeping for {}ms", currentWait);
0
package org.apache.ambari.server.stack.upgrade.orchestrate; import org.apache.ambari.server.stack.upgrade.Task;
0
import com.google.gson.reflect.TypeToken; import org.apache.ambari.logfeeder.plugin.common.AliasUtil; import org.apache.ambari.logfeeder.plugin.common.MetricData; import org.apache.ambari.logfeeder.plugin.filter.Filter; import org.apache.ambari.logfeeder.plugin.input.Input; import org.apache.ambari.logfeeder.plugin.manager.InputManager; import org.apache.ambari.logfeeder.plugin.manager.OutputManager; import org.apache.ambari.logfeeder.plugin.output.Output; import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils; import org.apache.commons.lang.BooleanUtils; import org.apache.commons.lang3.StringUtils; import java.io.BufferedInputStream; import java.io.File; import java.io.FileNotFoundException; import java.lang.reflect.Type; import java.nio.charset.Charset; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; private static final Logger LOG = Logger.getLogger(org.apache.ambari.logfeeder.common.ConfigHandler.class); Output output = (Output) AliasUtil.getClassInstance(value, AliasUtil.AliasType.OUTPUT); output.logConfigs(); Input input = (Input) AliasUtil.getClassInstance(source, AliasUtil.AliasType.INPUT); input.logConfigs(); Filter filter = (Filter) AliasUtil.getClassInstance(value, AliasUtil.AliasType.FILTER); filter.logConfigs();
0
Copyright 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
public static Test suite() { TestSuite suite = new TestSuite( "Test for org.apache.xml.security.test.algorithms"); //$JUnit-BEGIN$ suite.addTest(SignatureAlgorithmTest.suite()); //$JUnit-END$ return suite; }
0
new UnsupportedHttpVersionException(); new UnsupportedHttpVersionException("Oppsie");
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/DynaTag.java,v 1.4 2002/06/25 17:59:32 jstrachan Exp $ * $Revision: 1.4 $ * $Date: 2002/06/25 17:59:32 $ * $Id: DynaTag.java,v 1.4 2002/06/25 17:59:32 jstrachan Exp $ * @version $Revision: 1.4 $ public void setAttribute(String name, Object value) throws Exception;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/jelly-tags/define/src/java/org/apache/commons/jelly/tags/define/BeanTag.java,v 1.2 2003/01/26 00:07:23 morgand Exp $ * $Revision: 1.2 $ * $Date: 2003/01/26 00:07:23 $ * $Id: BeanTag.java,v 1.2 2003/01/26 00:07:23 morgand Exp $ import org.apache.commons.jelly.JellyTagException; * @version $Revision: 1.2 $ public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { throw new JellyTagException( protected Method getInvokeMethod( Class theClass ) {
0
public void testFileFilterUtils_and() throws Exception { IOFileFilter trueFilter = TrueFileFilter.INSTANCE; IOFileFilter falseFilter = FalseFileFilter.INSTANCE; assertFiltering(FileFilterUtils.and(trueFilter, trueFilter, trueFilter), new File("foo.test"), true); assertFiltering(FileFilterUtils.and(trueFilter, falseFilter, trueFilter), new File("foo.test"), false); assertFiltering(FileFilterUtils.and(falseFilter, trueFilter), new File("foo.test"), false); assertFiltering(FileFilterUtils.and(falseFilter, falseFilter), new File("foo.test"), false); } public void testFileFilterUtils_or() throws Exception { IOFileFilter trueFilter = TrueFileFilter.INSTANCE; IOFileFilter falseFilter = FalseFileFilter.INSTANCE; File testFile = new File( "foo.test" ); assertFiltering(FileFilterUtils.or(trueFilter, trueFilter), testFile, true); assertFiltering(FileFilterUtils.or(trueFilter, trueFilter, falseFilter), testFile, true); assertFiltering(FileFilterUtils.or(falseFilter, trueFilter), testFile, true); assertFiltering(FileFilterUtils.or(falseFilter, falseFilter, falseFilter), testFile, false); }
0
// Quote the arguments to prevent shell expansion for (int i = 0, j = 2; i < args.length; i++, j++) { cmd[j] = "'" + args[i] + "'"; }
0
package org.apache.felix.dm.test; import org.apache.felix.dm.DependencyManager; import org.apache.felix.dm.service.Service; import org.apache.felix.dm.dependencies.BundleDependency; import org.apache.felix.dm.dependencies.ConfigurationDependency; import org.apache.felix.dm.dependencies.ResourceDependency; import org.apache.felix.dm.dependencies.ServiceDependency; import org.apache.felix.dm.resources.Resource; import org.apache.felix.dm.resources.ResourceHandler; DependencyManager m = new DependencyManager(context); DependencyManager m = new DependencyManager(context); DependencyManager m = new DependencyManager(context); DependencyManager m = new DependencyManager(context);
0
@SuppressWarnings("ResultOfMethodCallIgnored") public void testSelfSupressed(){ BrokenInputStream bis = new BrokenInputStream(); try { bis.read(); } catch (IOException e) { try { bis.close(); } catch (IOException e1) { e1.addSuppressed( e); // Simulates try-with resources since we're not jdk7 yet } } }
0
compactingByTable.put(table, Math.max(holdTime == null ? 0. : holdTime.doubleValue(), status.holdTime));
0
package org.apache.beam.integration.nexmark.model; import org.apache.beam.integration.nexmark.NexmarkUtils; * Result of Query5.
0
import cz.seznam.euphoria.core.client.dataset.windowing.GlobalWindowing; .windowBy(GlobalWindowing.get(), w -> "global") assertEquals(Arrays.asList("file:" + tmp.getPath() + "/global"), loadedPaths); assertTrue(new File(tmp + "/global", "t").exists()); assertTrue(new File(tmp + "/global", "t").isDirectory());
0
import java.awt.Font; import java.awt.Image; import java.awt.Paint; import java.awt.Stroke; import java.awt.TexturePaint; import java.awt.geom.Ellipse2D; import java.awt.geom.GeneralPath; import java.awt.geom.Point2D; import java.awt.image.BufferedImage; import java.awt.image.ImageObserver; import java.text.AttributedCharacterIterator; import java.util.Iterator; import org.apache.batik.transcoder.wmf.WMFConstants;
1
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/share/org/apache/commons/validator/ValidatorException.java,v 1.8 2004/02/21 17:10:29 rleland Exp $ * $Revision: 1.8 $ * $Date: 2004/02/21 17:10:29 $ * 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.
0
// do not process cached identities that can be passed as is(headless identities) processPrincipal = "false".equals(identityRecord.get(KerberosIdentityDataFileReader.ONLY_KEYTAB_WRITE).toLowerCase());
0
if (null != componentDescriptors) { for (KerberosComponentDescriptor componentDescriptor : componentDescriptors.values()) { if (componentDescriptor != null) { List<KerberosIdentityDescriptor> identityDescriptors; // Handle the service-level Kerberos identities identityDescriptors = serviceDescriptor.getIdentities(true, filterContext); if (identityDescriptors != null) { for (KerberosIdentityDescriptor identityDescriptor : identityDescriptors) { createUserIdentity(identityDescriptor, kerberosConfiguration, kerberosOperationHandler, configurations); } // Handle the component-level Kerberos identities identityDescriptors = componentDescriptor.getIdentities(true, filterContext); if (identityDescriptors != null) { for (KerberosIdentityDescriptor identityDescriptor : identityDescriptors) { createUserIdentity(identityDescriptor, kerberosConfiguration, kerberosOperationHandler, configurations); }
0
DirectModeExecutionContext.create().getOrCreateStepContext("stepName", "stepName", null),
0
@Override
0
package org.apache.atlas.services; import org.apache.atlas.MetadataException; import org.apache.atlas.typesystem.types.DataTypes;
0
@Override
0
@Override public void removeScanIterator(String iteratorName) {}
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.svggen.font.table; /** * Definition of Script tags * * @version $Id$ * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a> */ public interface ScriptTags { String SCRIPT_TAG_ARAB = "arab"; }
0
import org.apache.accumulo.harness.AccumuloClusterHarness; public class TabletIT extends AccumuloClusterHarness {
0
SelectionKey key = socketChannel.register(this.selector, SelectionKey.OP_CONNECT,
0
protected static final Token COLON_TOKEN = new Token(COLON); protected static final Token OPEN_TOKEN = new Token(OPEN); protected static final Token CLOSE_TOKEN = new Token(CLOSE); protected static final Token EMPTY_TOKEN = new Token(EXPR);
0