Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
GenericObjectPool pool = new GenericObjectPool();
0
import org.apache.batik.anim.dom.AnimationTarget;
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.ipojo.manipulator.visitor; import org.apache.felix.ipojo.manipulator.ManipulationResultVisitor; import org.apache.felix.ipojo.manipulator.ManipulationVisitor; import org.apache.felix.ipojo.metadata.Element; /** * Empty ManipulationVisitor visitor. * It is useful to extends this class to keep a working visitor chain. * * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a> */ public class ManipulationAdapter implements ManipulationVisitor { private ManipulationVisitor delegate; public ManipulationAdapter(ManipulationVisitor delegate) { this.delegate = delegate; } public ManipulationResultVisitor visitManipulationResult(Element metadata) { return new ManipulationResultAdapter(delegate.visitManipulationResult(metadata)); } public void visitMetadata(Element metadata) { delegate.visitMetadata(metadata); } public void visitEnd() { delegate.visitEnd(); } }
0
import java.util.Set;
0
import org.junit.After; import org.junit.Before; import org.junit.Test; import org.osgi.framework.Version; import org.osgi.util.converter.MyDTO.Count; import org.osgi.util.converter.MyEmbeddedDTO.Alpha; public void testCustomErrorHandlingProxy() { ConverterFunction errHandler = new ConverterFunction() { @Override public Object apply(Object obj, Type targetType) throws Exception { return 123; } }; ConverterBuilder cb = converter.newConverterBuilder(); Converter c = cb.errorHandler(errHandler).build(); Map<?,?> m = new HashMap<>(); MyIntf i = c.convert(m).to(MyIntf.class); assertEquals(123, i.value()); } @Test
0
stats.extent = new KeyExtent(tableId, new Text(tserver.host() + String.format("%03d", i + 1)), new Text(tserver.host() + String.format("%03d", i))) .toThrift(); String key = migration.tablet.getTableId();
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/model/beans/Attic/DynamicPointer.java,v 1.3 2002/05/30 02:04:57 dmitri Exp $ * $Revision: 1.3 $ * $Date: 2002/05/30 02:04:57 $ * @version $Revision: 1.3 $ $Date: 2002/05/30 02:04:57 $
0
Arrays.asList(window(0, 10)), null), Arrays.asList(window(0, 10)), null), Arrays.asList(window(10, 20)), null))))); Arrays.asList(window(-10, 10), window(0, 20)), null), Arrays.asList(window(0, 20), window(10, 30)), null))))); Arrays.asList(window(-10, 10), window(0, 20)), null), Arrays.asList(window(0, 20), window(10, 30)), null), Arrays.asList(window(0, 20), window(10, 30)), null))))); Arrays.asList(window(0, 5)), null), Arrays.asList(window(1, 5)), null), Arrays.asList(window(0, 5)), null))))); Arrays.asList(window(0, 10)), null), Arrays.asList(window(5, 15)), null), Arrays.asList(window(15, 25)), null))))); Arrays.asList(window(0, 10)), null), Arrays.asList(window(5, 15)), null), Arrays.asList(window(15, 25)), null)))));
0
private static final int REQUESTS_RESULT_LIMIT_WITH_FILTER = 20; private static final int REQUESTS_RESULT_LIMIT = 200; resultsLimit = REQUESTS_RESULT_LIMIT_WITH_FILTER; } else { resultsLimit = REQUESTS_RESULT_LIMIT;
1
public interface IoServiceFactory extends Closeable, IoServiceEventListenerManager {
0
* dependency is added, changed or removed. When you specify callbacks, the auto * configuration feature is automatically turned off, because we're assuming you don't * need it in this case. * @param added the method to call when a service was added * @param changed the method to call when a service was changed * @param removed the method to call when a service was removed * @param swapped the method to call when the service was swapped due to addition or * removal of an aspect * @return this service dependency */ public ServiceDependency setCallbacks(String added, String changed, String removed, String swapped); /** * Sets the callbacks for this service. These callbacks can be used as hooks whenever a * Sets the callbacks for this service. These callbacks can be used as hooks whenever a * dependency is added, changed or removed. When you specify callbacks, the auto * configuration feature is automatically turned off, because we're assuming you don't * need it in this case. * @param instance the instance to call the callbacks on * @param added the method to call when a service was added * @param changed the method to call when a service was changed * @param removed the method to call when a service was removed * @param swapped the method to call when the service was swapped due to addition or * removal of an aspect * @return this service dependency */ public ServiceDependency setCallbacks(Object instance, String added, String changed, String removed, String swapped); /**
0
import org.w3c.dom.Document; import org.w3c.dom.Element;
1
import org.apache.accumulo.core.security.thrift.SecurityErrorCode; import org.apache.accumulo.core.security.thrift.ThriftSecurityException;
0
private static Key newKeyValue(SortedMap<Key,Value> tm, String row, String cf, String cq, String val) {
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/adapters/Attic/TestByteListIteratorListIterator.java,v 1.3 2003/10/01 21:54:55 scolebourne Exp $ import org.apache.commons.collections.iterators.AbstractTestListIterator; * @version $Revision: 1.3 $ $Date: 2003/10/01 21:54:55 $ public class TestByteListIteratorListIterator extends AbstractTestListIterator { protected Object addSetValue() { return new Byte((byte)1); }
0
import java.io.IOException; import javax.servlet.FilterChain; import javax.servlet.ServletException; import org.apache.felix.http.base.internal.handler.HandlerRegistry; public static final String REQUEST_DISPATCHER_PROVIDER = "org.apache.felix.http.requestDispatcherProvider"; private static final FilterChain DEFAULT_CHAIN = new NotFoundFilterChain(); public void dispatch(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException // Provides access to the correct request dispatcher... req.setAttribute(REQUEST_DISPATCHER_PROVIDER, servletPipeline); try { new FilterPipeline(this.handlerRegistry.getFilters(), servletPipeline).dispatch(req, res, DEFAULT_CHAIN); } finally { req.removeAttribute(REQUEST_DISPATCHER_PROVIDER); }
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. */ /** * NTP - network time protocol */ package org.apache.commons.net.ntp;
0
* Specifies if manifest headers from the bundle should be propagated to the service.
0
import org.apache.http.nio.ContentDecoder; import org.apache.http.nio.ContentEncoder; import org.apache.http.nio.NHttpServerConnection; import org.apache.http.nio.NHttpServiceHandler; import org.apache.http.nio.reactor.IOEventDispatch; import org.apache.http.nio.reactor.IOReactor;
0
private static final long RECENTLY_SPLIT_MILLIES = 60*1000; // ignore any tablets that have recently split Iterator<KeyExtent> each = onlineOverlapping.iterator(); while (each.hasNext()) { Tablet tablet = onlineTablets.get(each.next()); if (System.currentTimeMillis() - tablet.getSplitCreationTime() < RECENTLY_SPLIT_MILLIES) { each.remove(); } }
0
* <strong>N.B.</strong>Patterns can only be specified using the <i>standard</i> * pattern characters and NOT in <i>localized</i> form (see <code>java.text.DecimalFormat</code>). * See <code>java.text.DecimalFormat</code> for details * See <code>java.text.DecimalFormat</code> for details
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
return in.apply(Combine.globally(new SampleAnyCombineFn<T>(limit)).withoutDefaults())
0
public class StringComparator implements Comparator<String> @Override public int compare(String o1, String o2) return o1.compareTo(o2); return o1.compareToIgnoreCase(o2);
0
import org.apache.beam.sdk.schemas.FieldAccessDescriptor; import org.apache.beam.sdk.values.Row; /** * Provides a link to the input element converted to a {@link Row} object. The input * collection must have a schema registered for this to be called. */ Row asRow(FieldAccessDescriptor fieldAccessDescriptor); /** Provide a link to the time domain for a timer firing. */
0
import org.apache.accumulo.server.rpc.TCredentialsUpdatingWrapper; import org.apache.accumulo.server.rpc.ThriftServerType; Iface rpcProxy = RpcWrapper.service(this); final Processor<Iface> processor; if (ThriftServerType.SASL == getThriftServerType()) { Iface tcProxy = TCredentialsUpdatingWrapper.service(rpcProxy, getClass()); processor = new Processor<Iface>(tcProxy); } else { processor = new Processor<Iface>(rpcProxy); } return TServerUtils.startTServer(getConfiguration(), result, getThriftServerType(), processor, this.getClass().getSimpleName(), "GC Monitor Service", 2, getConfiguration().getCount(Property.GENERAL_SIMPLETIMER_THREADPOOL_SIZE), 1000, maxMessageSize, getServerSslParams(), getServerSaslParams(), 0).address;
1
* @version CVS $Id: VerticalAlignment.java,v 1.4 2004/01/31 08:50:39 antonio Exp $ public class VerticalAlignment { private int _alignment; private static final int _top = 1; private static final int _bottom = 2; private static final int _center = 4; private static final int _justify = 8; private static final Validator _validator = new Validator() { public IOException validate(final Number number) { return (value >= 0 && value <= 15) ? null : new IOException("\"" + number + "\" is out of range"); public VerticalAlignment(final String value) throws IOException { _alignment = NumericConverter.extractInteger(value, _validator).intValue(); public boolean isTop() { public boolean isBottom() { public boolean isCenter() { public boolean isJustify() { } // end public class VerticalAlignment
0
Request request = PropertyHelper.getCreateRequest(propertySet, null); Request request = PropertyHelper.getUpdateRequest(properties, null);
0
@Test public void testHttp204ContentLengthGreaterThanZero() throws Exception { final HttpResponse response = new BasicHttpResponse(204, "OK"); response.addHeader("Content-Length", "10"); response.addHeader("Connection", "keep-alive"); Assert.assertFalse(reuseStrategy.keepAlive(null, response, context)); } @Test public void testHttp204ContentLengthEqualToZero() throws Exception { final HttpResponse response = new BasicHttpResponse(204, "OK"); response.addHeader("Content-Length", "0"); response.addHeader("Connection", "keep-alive"); Assert.assertTrue(reuseStrategy.keepAlive(null, response, context)); } @Test public void testHttp204ChunkedContent() throws Exception { final HttpResponse response = new BasicHttpResponse(204, "OK"); response.addHeader("Transfer-Encoding", "chunked"); response.addHeader("Connection", "keep-alive"); Assert.assertFalse(reuseStrategy.keepAlive(null, response, context)); }
0
if ((line = chargenInput.readLine()) == null) { }
1
public static final ResettableIterator RESETTABLE_INSTANCE = new EmptyIterator<>();
1
* http://www.apache.org/licenses/LICENSE-2.0
0
import org.junit.Test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; public class CountingOutputStreamTest { @Test @Test
0
import org.apache.batik.util.awt.image.GraphicsUtil; GraphicsUtil.copyData(origSrc, src); srcCMPre = GraphicsUtil.coerceColorModel(srcCM, true); GraphicsUtil.copyData(origSrc, src); dstCMPre = GraphicsUtil.coerceColorModel(dstCM, true); GraphicsUtil.copyData(src, origSrc); GraphicsUtil.copyData(dest, finalDest); GraphicsUtil.copyData(origSrc, src); srcCMUnpre = GraphicsUtil.coerceColorModel(srcCM, false); GraphicsUtil.copyData(origSrc, src); dstCMUnpre = GraphicsUtil.coerceColorModel(dstCM, false); GraphicsUtil.copyData(src, origSrc); GraphicsUtil.copyData(dest, finalDest);
0
public boolean offer(final E element) {
0
// !!! %
0
accumuloClient = createAccumuloClient();
0
ScheduledExecutorService executor = factoryManager.getScheduledExecutorService(); log.info("Disconnecting: {} - {}", reason, msg);
0
private Set<E> contained; public EmptySetMutator(Set<E> set) {
0
// The base package name for imports; assumes Const is at the top level // N.B we use the class so renames will be detected by the compiler/IDE private static final String CONSTANT_PREFIX = Const.class.getSimpleName()+"."; _out.println("public class " + class_name + "Creator {"); buf.append(CONSTANT_PREFIX+"ACC_SUPER | "); buf.append(CONSTANT_PREFIX+"ACC_BRIDGE | "); buf.append(CONSTANT_PREFIX+"ACC_VARARGS | "); buf.append(CONSTANT_PREFIX+"ACC_").append(Const.getAccessName(i).toUpperCase(Locale.ENGLISH)).append( " | "); buf.append(String.format (CONSTANT_PREFIX+"ACC_BIT %x | ", pow));
0
import java.util.Collection; import java.util.List; import org.osgi.service.component.runtime.ServiceComponentRuntime; import org.osgi.service.component.runtime.dto.ComponentDescriptionDTO; private final ServiceComponentRuntime scrService; static ScrCommand register(BundleContext bundleContext, ServiceComponentRuntime scrService, ScrConfiguration scrConfiguration) private ScrCommand(BundleContext bundleContext, ServiceComponentRuntime scrService, ScrConfiguration scrConfiguration) List<ComponentDescriptionDTO> components; components = new ArrayList<ComponentDescriptionDTO>(scrService.getComponentDescriptionDTOs(bundle)); components = new ArrayList<ComponentDescriptionDTO>(scrService.getComponentDescriptionDTOs()); Collections.sort( components, new Comparator<ComponentDescriptionDTO>() public int compare(ComponentDescriptionDTO c1, ComponentDescriptionDTO c2) return c1.name.compareTo(c2.name); for ( ComponentDescriptionDTO component : components ) out.println( String.format( "[%4$s] [%4$s] [%3$4d]", component.name, component.defaultEnabled , component.bundle.id ) ); /* Component[] components = getComponentFromArg(componentId); */ /* */ /* */
0
protected boolean stringContent; XMLReader parser = XMLReaderFactory.createXMLReader(parserClassName); inDTD = false; inCDATA = false; currentNode = null; document = null; documentDescriptor.setLocationLine(e, locator.getLineNumber());
0
* Copyright 1999-2004 The Apache Software Foundation * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * @version $Revision: 1.9 $ $Date: 2004/02/29 14:17:38 $
0
// Printing Graphics is always set up for 72dpi, so scale // according to what user agent thinks it should be. double pixSzMM = userAgent.getPixelUnitToMillimeter(); double pixSzInch = (25.4/pixSzMM);
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. */ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
0
public final class Atlas { private static final Logger LOG = LoggerFactory.getLogger(Atlas.class); private Atlas() {
0
import javax.net.ssl.SSLParameters; import org.apache.hc.core5.function.Callback; private final NamedEndpoint targetEndpoint; private final Callback<SSLIOSession> callback; final SSLSessionVerifier verifier, final Callback<SSLIOSession> callback) { this(targetEndpoint, session, sslMode, sslContext, SSLBufferManagement.STATIC, initializer, verifier, callback); final SSLSessionVerifier verifier, final Callback<SSLIOSession> callback) { this.targetEndpoint = targetEndpoint; this.callback = callback; * SSLSessionInitializer#initialize(NamedEndpoint, SSLParameters)} callback * if an instance of {@link SSLSessionInitializer} was specified at the construction time. final SSLParameters sslParameters = this.sslEngine.getSSLParameters(); this.initializer.initialize(this.targetEndpoint, sslParameters); this.sslEngine.setSSLParameters(sslParameters); this.verifier.verify(this.targetEndpoint, this.sslEngine.getSession()); } if (this.callback != null) { this.callback.execute(this);
0
* @version $Revision$ $Date$
0
* http://www.apache.org/licenses/LICENSE-2.0
0
createEvaluator(singletonView, fn, inputPc, output); PCollection<Integer> input, input.getWindowingStrategy(),
0
// Every removed configurable propery gets reset to its default value for (int i = 0; i < m_configurableProperties.size(); i++) { Property prop = (Property) m_configurableProperties.get(i); if (configuration.get(prop.getName()) == null) { reconfigureProperty(prop, prop.getDefaultValue()); } }
0
import com.google.common.collect.ImmutableSet; import org.apache.shiro.realm.text.IniRealm; private static final String MISSING_SECTIONS_SHIRO_INI = "shiro-missing-sections.ini"; private static final String NO_SECTIONS_SHURO_INI = "shiro-malformed-no-sections.ini"; ShiroIniParser.ALLOWED_SECTION_NAMES, @Test public void testDoParseOptionalSections() { assertEquals( ImmutableSet.of(IniRealm.ROLES_SECTION_NAME), parser .doParse(ShiroIniParserTest.class.getResource(MISSING_SECTIONS_SHIRO_INI).toString()) .getSectionNames()); } parser.doParse(getClass().getResource(NO_SECTIONS_SHURO_INI).toString());
0
import com.google.common.base.Function; import com.google.common.base.MoreObjects; import com.google.common.collect.FluentIterable; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; import com.google.common.collect.Sets; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.PriorityQueue; import java.util.Set; import javax.annotation.Nullable;
0
import org.apache.beam.sdk.options.BigQueryOptions; import org.apache.beam.sdk.options.GcsOptions; import org.apache.beam.sdk.options.PubsubOptions;
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. */ public class RegexExample extends Configured implements Tool { public static class RegexMapper extends Mapper<Key,Value,Key,Value> { public void map(Key row, Value data, Context context) throws IOException, InterruptedException { public int run(String[] args) throws Exception { public static void main(String[] args) throws Exception { if (res != 0) System.exit(res);
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/model/dynabeans/DynaBeanPropertyPointer.java,v 1.2 2002/10/20 03:47:18 dmitri Exp $ * $Revision: 1.2 $ * $Date: 2002/10/20 03:47:18 $ * @version $Revision: 1.2 $ $Date: 2002/10/20 03:47:18 $
0
/** * Local {@link ExecutorProvider}. */
0
public BeamQueryPlanner(SchemaPlus schema) { .ruleSets(BeamRuleSets.getRuleSets()) public PCollection<Row> compileBeamPipeline(String sqlStatement, Pipeline basePipeline) throws Exception {
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.
0
import org.apache.beam.sdk.values.TaggedPValue; for (TaggedPValue consumed : node.getInputs()) { toFinalize.remove(consumed.getValue()); } for (TaggedPValue value : node.getInputs()) { primitiveConsumers.put(value.getValue(), appliedTransform); if (value instanceof PCollectionView) { views.add((PCollectionView<?>) value); }
0
* @param parser the line parser. If {@code null} * @param requestFactory the request factory. If {@code null} * @param constraints Message constraints. If {@code null}
0
import org.apache.accumulo.core.security.thrift.TCredentials; import org.apache.accumulo.core.security.tokens.AuthenticationToken; public static void setConnectorInfo(JobConf job, String principal, AuthenticationToken token) throws AccumuloSecurityException { * @see #setConnectorInfo(JobConf, String, AuthenticationToken) * @see #setConnectorInfo(JobConf, String, AuthenticationToken) scanner = new OfflineScanner(instance, new TCredentials(user, tokenClass, ByteBuffer.wrap(password), instance.getInstanceID()), Tables.getTableId(instance,
1
@SuppressWarnings("boxing") // test code
0
tickOfNextAckDeadline = leader.self.tick.get() tickOfNextAckDeadline = leader.self.tick.get() + leader.self.syncLimit; && leader.self.tick.get() <= tickOfNextAckDeadline;
0
import java.util.Properties; * @see org.apache.cocoon.portal.PortalManagerAspect#render(org.apache.cocoon.portal.PortalManagerAspectRenderContext, org.apache.cocoon.portal.PortalService, org.xml.sax.ContentHandler, java.util.Properties) Properties properties) aspectContext.invokeNext(ch, properties);
0
import java.util.EnumSet; import org.apache.accumulo.core.iterators.IteratorUtil.IteratorScope; conn.tableOperations().checkIteratorConflicts(t, null, EnumSet.allOf(IteratorScope.class));
0
/* Used by most IOIT */
0
package org.apache.cocoon.configuration;
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.servicemix.kernel.jaas.config.impl; import org.apache.servicemix.kernel.jaas.boot.ProxyLoginModule; import org.osgi.framework.BundleContext; import org.springframework.osgi.context.BundleContextAware; public class ProxyLoginModuleInitializer implements BundleContextAware { private BundleContext bundleContext; public void setBundleContext(BundleContext bundleContext) { this.bundleContext = bundleContext; } public void init() { BundleContext context = bundleContext.getBundle(0).getBundleContext(); ProxyLoginModule.init(context); } }
0
assignments = new HashMap<>();
1
* <p>Automatically invoked whenever this {@link POutput} is output, after * {@link PValue#finishSpecifyingOutput(String, PInput, PTransform)} has been called on each * component {@link PValue} returned by {@link #expand()}. void finishSpecifyingOutput(String transformName, PInput input, PTransform<?, ?> transform);
0
bind(Scheduler.class).toInstance( Scheduler.newFixedRateSchedule( TASK_STAT_INTERVAL.get().getValue(), TASK_STAT_INTERVAL.get().getValue(), TASK_STAT_INTERVAL.get().getUnit().getTimeUnit())); bind(Scheduler.class).toInstance( Scheduler.newFixedRateSchedule( SLOT_STAT_INTERVAL.get().getValue(), SLOT_STAT_INTERVAL.get().getValue(), SLOT_STAT_INTERVAL.get().getUnit().getTimeUnit()));
0
(CSS_MARKER_PROPERTY, (CSS_MARKER_START_PROPERTY, (CSS_MARKER_MID_PROPERTY, (CSS_MARKER_END_PROPERTY, orient = // Extract the overflow property = CSSUtilities.getComputedStyle(paintedElement); // Set the markerContentNode's clipping area Rectangle2D markerClip // Watch out: the reference point is defined a little weirdly in the
0
Class<?> clazz = Class.forName(objectStreamClass.getName(), false, classLoader);
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: SetCharacterEncodingAction.java,v 1.4 2004/03/05 13:02:43 bdelacretaz Exp $
1
* Returns {@code true} if this map contains no key-value mappings. * @return {@code true} if this map contains no key-value mappings * Returns {@code true} if this map contains a mapping for the specified * key. More formally, returns {@code true} if and only if this map * contains a mapping for a key {@code k} such that * {@code (key==null ? k==null : key.equals(k))}. (There can be at most one * @return {@code true} if this map contains a mapping for the specified key * from key {@code k} to value {@code v} in the specified map. * @throws UnsupportedOperationException if the {@code putAll} operation is * mapping from key {@code k} to value {@code v} in the specified map. * @throws UnsupportedOperationException if the {@code putAll} operation is * progress (except through the iterator's own {@code remove} operation), * {@code Iterator.remove}, {@code Set.remove}, {@code removeAll}, * {@code retainAll}, and {@code clear} operations. It does not support * the {@code add} or {@code addAll} operations.
0
import org.apache.sshd.util.test.NoIoTestCase; import org.junit.experimental.categories.Category; @Category({ NoIoTestCase.class })
0
import org.apache.log4j.Logger; return parseConfig(Property.TSERV_MAJC_DELAY + "=10ms"); UtilWaitThread.sleep(12000); Logger.getLogger(LargeRowTest.class).warn("checking splits"); // give split time to complete getConnector().tableOperations().flush(table, null, null, true);
0
/* * Copyright 2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.cocoon.portal; import java.util.Map; import org.apache.avalon.framework.parameters.Parameters; import org.apache.cocoon.ProcessingException; /** * @since 2.1.8 * @version $Id$ */ public interface PortalManagerAspectPrepareContext { /** * Invoke next aspect */ void invokeNext() throws ProcessingException; /** * Get the {@link Parameters} of the aspect. */ Parameters getAspectParameters(); /** * Get the object model. */ Map getObjectModel(); }
0
import org.apache.sshd.common.util.SelectorUtils; public Path resolveLocalPath(String basedir, String subpath) throws IOException { public Path resolveLocalPath(String remotePath) throws IOException { // In case double slashes and other patterns are used String path = SelectorUtils.normalizePath(remotePath, "/"); String localPath = SelectorUtils.translateToLocalPath(path);
0
import java.util.Collections; import java.util.List; protected List<Service> getServices() { return (currentService != null) ? Collections.singletonList(currentService) : Collections.<Service>emptyList();
0
* @version $Revision$
1
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/bag/UnmodifiableSortedBag.java,v 1.4 2004/01/05 21:54:06 scolebourne Exp $ * Copyright (c) 2003-2004 The Apache Software Foundation. All rights * @version $Revision: 1.4 $ $Date: 2004/01/05 21:54:06 $ public final class UnmodifiableSortedBag extends AbstractSortedBagDecorator implements Unmodifiable {
0
package org.apache.felix.sigil.eclipse.ui.internal.preferences.repository;
0
/* * Copyright 1999-2002,2004-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.cocoon.portal.event.aspect.impl; import org.apache.cocoon.portal.event.Event; import org.apache.cocoon.portal.event.EventManager; import org.apache.cocoon.portal.event.layout.LayoutChangeParameterEvent; import org.apache.cocoon.portal.layout.Layout; import org.apache.cocoon.portal.layout.impl.FrameLayout; /** * * @version $Id$ */ public class FrameEventAspect extends AbstractContentEventAspect { protected String getRequestParameterName() { // TODO - make this configurable return "frame"; } protected int getRequiredValueCount() { return 3; } /** * @see org.apache.cocoon.portal.event.aspect.impl.AbstractContentEventAspect#publish(EventManager, org.apache.cocoon.portal.layout.Layout, java.lang.String[]) */ protected void publish(EventManager publisher, Layout layout, String[] values) { if (layout instanceof FrameLayout) { final Event e = new LayoutChangeParameterEvent(layout, "frame", values[2], true); publisher.send(e); } else { this.getLogger().warn( "the configured layout: " + layout.getName() + " is not a FrameLayout."); } } }
0
return new ECDH(ECCurves.nistp256); return new ECDH(ECCurves.nistp384); return new ECDH(ECCurves.nistp521); return NamedResource.Utils.findByName(name, String.CASE_INSENSITIVE_ORDER, VALUES);
0
private static final Pattern STACK_ADVISOR_REGEX = Pattern.compile("/api/v[0-9]+/stacks/[^/]+/versions/[^/]+/(validations|recommendations).*");
0
package org.apache.http.impl.io; import org.apache.http.io.HttpDataReceiver;
0
import java.net.InetSocketAddress; import java.net.SocketAddress; private static void formatAddress(final StringBuilder buffer, final SocketAddress socketAddress) { if (socketAddress instanceof InetSocketAddress) { InetSocketAddress addr = ((InetSocketAddress) socketAddress); buffer.append(addr.getAddress() != null ? addr.getAddress().getHostAddress() : addr.getAddress()) .append(':') .append(addr.getPort()); } else { buffer.append(socketAddress); } } if (this.socket != null) { StringBuilder buffer = new StringBuilder(); SocketAddress remoteAddress = this.socket.getRemoteSocketAddress(); SocketAddress localAddress = this.socket.getLocalSocketAddress(); if (remoteAddress != null && localAddress != null) { formatAddress(buffer, localAddress); buffer.append("<->"); formatAddress(buffer, remoteAddress); } return buffer.toString(); return super.toString();
0
private String processorClassName; Logger logger, String processorClassName) { this.processorClassName = processorClassName; settings.setProcessorClassName(this.processorClassName);
0
DoFnRunner<KV<String, Iterable<WindowedValue<String>>>, KV<String, Iterable<String>>> runner = DoFnRunner<KV<String, Iterable<WindowedValue<String>>>, KV<String, Iterable<String>>> runner = DoFnRunner<KV<String, Iterable<WindowedValue<String>>>, KV<String, Iterable<String>>> runner = DoFnRunner<KV<String, Iterable<WindowedValue<Long>>>, KV<String, Long>> runner = DoFnRunner<KV<String, Iterable<WindowedValue<String>>>, KV<String, Iterable<String>>> runner = DoFnRunner<KV<String, Iterable<WindowedValue<String>>>, KV<String, Iterable<String>>> runner = makeRunner( outputTag, outputManager, DoFnRunner<KV<String, Iterable<WindowedValue<Long>>>, KV<String, Long>> runner = DoFnRunner<KV<String, Iterable<WindowedValue<String>>>, KV<String, Iterable<String>>> DoFnRunner.OutputManager outputManager, DoFnRunner<KV<String, Iterable<WindowedValue<Long>>>, KV<String, Long>> DoFnRunner.OutputManager outputManager, DoFnRunner<KV<String, Iterable<WindowedValue<InputT>>>, KV<String, OutputT>> DoFnRunner.OutputManager outputManager,
0
* Copyright (c) OSGi Alliance (2017). 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 * @author $Id$
0
import com.google.common.base.Optional;
0
FieldType.of(ARRAY).withCollectionElementType(INT32.type())) FieldType.of(ARRAY).withCollectionElementType(INT32.type()))
0
import org.apache.commons.jxpath.util.ReverseComparator; Collections.sort(list, ReverseComparator.INSTANCE);
0
expect(serviceDirectory.getConfigurationDirectory(dir, StackDirectory.SERVICE_PROPERTIES_FOLDER_NAME)).andReturn(configDir).anyTimes();
0
import org.apache.commons.configuration.tree.ExpressionEngine; /** * An expression engine used for converting child configurations to * hierarchical ones. */ private ExpressionEngine conversionExpressionEngine; * Returns the <code>ExpressionEngine</code> for converting flat child * configurations to hierarchical ones. * * @return the conversion expression engine * @since 1.6 */ public ExpressionEngine getConversionExpressionEngine() { return conversionExpressionEngine; } /** * Sets the <code>ExpressionEngine</code> for converting flat child * configurations to hierarchical ones. When constructing the root node for * this combined configuration the properties of all child configurations * must be combined to a single hierarchical node structure. In this * process, non hierarchical configurations are converted to hierarchical * ones first. This can be problematic if a child configuration contains * keys that are no compatible with the default expression engine used by * hierarchical configurations. Therefore it is possible to specify a * specific expression engine to be used for this purpose. * * @param conversionExpressionEngine the conversion expression engine * @see ConfigurationUtils#convertToHierarchical(Configuration, ExpressionEngine) * @since 1.6 */ public void setConversionExpressionEngine( ExpressionEngine conversionExpressionEngine) { this.conversionExpressionEngine = conversionExpressionEngine; } /** class ConfigData .convertToHierarchical(getConfiguration(), getConversionExpressionEngine());
0
import org.apache.hc.core5.http.ClassicHttpResponse; import org.apache.hc.core5.http.ContentType; import org.apache.hc.core5.http.HttpStatus; import org.apache.hc.core5.http.io.ResponseHandler; import org.apache.hc.core5.http.io.entity.EntityUtils; public Document handleResponse(final ClassicHttpResponse response) throws IOException { int status = response.getCode(); if (status >= HttpStatus.SC_REDIRECTION) { throw new HttpResponseException(status, response.getReasonPhrase()); ContentType contentType = EntityUtils.getContentTypeOrDefault(entity);
0
import org.apache.hc.core5.http.HttpResponse; import org.apache.hc.core5.http.HttpStatus;
0
return Collections.singletonList(BuiltinSignatures.rsa); return Collections.singletonList(BuiltinSignatures.dsa);
0