Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
String PRIVILEGE_ALL = "all"; String PRIVILEGE_READ = "read"; String PRIVILEGE_WRITE = "write"; String PRIVILEGE_READ_ACL = "read-acl"; String PRIVILEGE_WRITE_ACL = "write-acl"; String PRIVILEGE_READ_SOURCE = "read-source"; String PRIVILEGE_CREATE_SOURCE = "create-source"; String PRIVILEGE_REMOVE_SOURCE = "remove-source"; String PRIVILEGE_LOCK_SOURCE = "lock-source"; String PRIVILEGE_READ_LOCKS = "read-locks"; String PRIVILEGE_READ_PROPERTY = "read-property"; String PRIVILEGE_CREATE_PROPERTY = "create-property"; String PRIVILEGE_MODIFY_PROPERTY = "modify-property"; String PRIVILEGE_REMOVE_PROPERTY = "remove-property"; String PRIVILEGE_READ_CONTENT = "read-content"; String PRIVILEGE_CREATE_CONTENT = "create-content"; String PRIVILEGE_MODIFY_CONTENT = "modify-content"; String PRIVILEGE_REMOVE_CONTENT = "remove-content"; String PRIVILEGE_GRANT_PERMISSION = "grant-permission"; String PRIVILEGE_REVOKE_PERMISSION = "revoke-permission"; void setPrivilege(String privilege); String getPrivilege(); void setInheritable(boolean inheritable); boolean isInheritable(); void setNegative(boolean negative); boolean isNegative();
0
public void testPrintHelpWithEmptySyntax() { HelpFormatter formatter = new HelpFormatter(); try { formatter.printHelp(null, new Options()); fail("null command line syntax should be rejected"); } catch (IllegalArgumentException e) { // expected } try { formatter.printHelp("", new Options()); fail("empty command line syntax should be rejected"); } catch (IllegalArgumentException e) { // expected } } HelpFormatter formatter = new HelpFormatter();
0
import org.apache.hc.core5.util.TimeValue; final TimeValue timeout, requestSession(host, timeout, new SessionRequestCallback() { public Future<ClientSessionEndpoint> connect(final HttpHost host, final TimeValue timeout) throws InterruptedException { return connect(host, timeout, null); public Future<ClientSessionEndpoint> connect(final String hostname, final int port, final TimeValue timeout) throws InterruptedException { return connect(new HttpHost(hostname, port), timeout, null);
0
LOG.error("Leader epoch " + Long.toHexString(newLeaderZxid >> 32L)
0
process.err().println(argv[0] + ": " + e.toString());
0
import java.util.List; import org.apache.ambari.server.api.resources.ResourceDefinition.PostProcessor; import org.apache.ambari.server.api.services.Request; import org.apache.ambari.server.api.util.TreeNode; import org.apache.ambari.server.controller.spi.Schema; import org.apache.ambari.server.controller.utilities.ClusterControllerHelper; @Override public List<PostProcessor> getPostProcessors() { List<PostProcessor> listProcessors = super.getPostProcessors(); listProcessors.add(new HrefProcessor()); return listProcessors; } private class HrefProcessor extends BaseHrefPostProcessor { @Override public void process(Request request, TreeNode<Resource> resultNode, String href) { if (resultNode.getObject().getType() == Resource.Type.Configuration) { String clusterId = getResourceIds().get(Resource.Type.Cluster); String type = (String) resultNode.getObject().getPropertyValue(PropertyHelper.getPropertyId("type")); String tag = (String) resultNode.getObject().getPropertyValue(PropertyHelper.getPropertyId("tag")); href = href.substring(0, href.indexOf(clusterId) + clusterId.length() + 1) + "configurations?type=" + type + "&tag=" + tag; resultNode.setProperty("href", href); } else { super.process(request, resultNode, href); } } }
0
import org.apache.commons.jxpath.BasicNodeSet; import org.apache.commons.jxpath.NodeSet; import org.apache.commons.jxpath.ri.axes.NodeSetContext; assertArgRange(2, 3); Object value = getArg2().compute(context); EvalContext ec = null; if (value instanceof EvalContext) { ec = (EvalContext) value; if (ec.hasNext()) { value = ((NodePointer) ec.next()).getValue(); } else { // empty context -> empty results return new BasicNodeSet(); } } if (getArgumentCount() == 3) { Object arg3 = getArg3().computeValue(context); if (arg3 instanceof EvalContext) { arg3 = ((EvalContext) arg3).getCurrentNodePointer(); } if (!(arg3 instanceof NodePointer)) { throw new JXPathException("invalid third key() argument: " + arg3); } jxpathContext = jxpathContext.getRelativeContext((NodePointer) arg3); } NodeSet nodeSet = jxpathContext.getNodeSetByKey(key, value); if (ec != null && ec.hasNext()) { BasicNodeSet accum = new BasicNodeSet(); accum.add(nodeSet); while (ec.hasNext()) { value = ((NodePointer) ec.next()).getValue(); accum.add(jxpathContext.getNodeSetByKey(key, value)); } nodeSet = accum; } return new NodeSetContext(context, nodeSet); assertArgRange(count, count); } private void assertArgRange(int min, int max) { int ct = getArgumentCount(); if (ct < min || ct > max) { "Incorrect number of arguments: " + this);
1
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * 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.cauldron.sigil.ui.util; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; import org.eclipse.jface.viewers.IStructuredSelection; @SuppressWarnings("unchecked") public class SingletonSelection implements IStructuredSelection { private final Object singleton; public SingletonSelection(Object singleton) { this.singleton = singleton; } public Object getFirstElement() { return singleton; } public Iterator iterator() { return Collections.singleton(singleton).iterator(); } public int size() { return 1; } public Object[] toArray() { return new Object[] { singleton }; } public List toList() { ArrayList list = new ArrayList(1); list.add( singleton ); return list; } public boolean isEmpty() { return false; } }
0
public interface HttpServerConnection extends BHttpConnection {
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
"IF expression has no ELSE branch"); "IF expression is not of type boolean, but " + TYPE_NAMES[if_type] + "."); "THEN expression is not of expected type " + TYPE_NAMES[expected] + " but " + TYPE_NAMES[then_type] + "."); "ELSE expression is not of expected type " + TYPE_NAMES[expected] + " but " + TYPE_NAMES[else_type] + "."); then_type = else_type; then_expr.setType(else_type); "Type mismatch in THEN-ELSE: " + TYPE_NAMES[then_type] + " vs. " + TYPE_NAMES[else_type] + ".");
0
PublicKey key = Objects.requireNonNull(entry, "No key extracted").resolvePublicKey(PublicKeyEntryResolver.FAILING);
0
boolean ambariServerHostnameIsForced = false; ambariServerHostnameIsForced = true; for (String host : hosts) { (ambariServerHostnameIsForced && ambariServerHostname.equals(host)) ? null : host, kerberosDescriptor, false, false); List<KerberosIdentityDescriptor> identities = getActiveIdentities(cluster, host, if (host.equals(ambariServerHostname)) { principal = principal.replace("_HOST", host); activeIdentities.put(host, hostActiveIdentities.values());
0
LOG.debug("Ganglia server component is not live");
0
public static native int lockMemoryPages();
1
final String uri = "jar:file:" + outerFile.getAbsolutePath() + "!/test.jar";
0
Iterator it; case ConfigurationEvent.CM_LOCATION_CHANGED: // FELIX-3650: Don't log WARNING message // FELIX-3584: Implement event support break;
0
import org.apache.ambari.server.H2DatabaseCleaner; public void teardown() throws AmbariException, SQLException { H2DatabaseCleaner.clearDatabaseAndStopPersistenceService(injector);
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: ContentTypeImpl.java,v 1.2 2004/03/05 13:02:15 bdelacretaz Exp $
1
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at
0
outCompressionOpt, outReplication, enoSampleOption, extraSummaryOption, enoSummaryOption; put(cl, opts, extraSummaryOption, CompactionSettings.SF_EXTRA_SUMMARY); put(cl, opts, enoSummaryOption, CompactionSettings.SF_NO_SUMMARY); enoSummaryOption = new Option(null, "sf-no-summary", false, "Select files that do not have the summaries specified in the table configuration."); opts.addOption(enoSummaryOption); extraSummaryOption = new Option(null, "sf-extra-summary", false, "Select files that have summary information which exceeds the tablets boundries."); opts.addOption(extraSummaryOption);
1
int opcode = Integer.parseInt(st.nextToken()); boolean initlocal = Boolean.parseBoolean(st.nextToken()); boolean initremote = Boolean.parseBoolean(st.nextToken()); boolean acceptlocal = Boolean.parseBoolean(st.nextToken()); boolean acceptremote = Boolean.parseBoolean(st.nextToken());
0
import com.google.common.annotations.VisibleForTesting; import com.google.common.hash.Hashing; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; import java.util.List; import java.util.UUID; import java.util.concurrent.ThreadLocalRandom; import javax.annotation.Nullable;
0
@Category({NeedsRunner.class, UsesTimersInParDo.class, UsesTestStreamWithProcessingTime.class})
0
final int initialTimeout = timeout; throw new IllegalStateException("Timed out waiting for " + initialTimeout + " ms for step " + nr + ", we are still at step " + step);
0
* 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.
0
/** The namespace URI. */ private String namespace; if (tag == null) { throw new JellyTagException( "<attribute> tag must be enclosed inside an <element> tag" ); tag.setAttributeValue(getName(), getBodyText(false), getURI()); * Sets the name of the attribute. /** * @return the namespace URI of the element */ public String getURI() { return namespace; } /** * Sets the namespace URI of the element */ public void setURI(String namespace) { this.namespace = namespace; }
0
* http://www.apache.org/licenses/LICENSE-2.0
0
/* (non-Javadoc) * @see org.apache.cocoon.portal.profile.ProfileManager#storeProfile(org.apache.cocoon.portal.layout.Layout, java.lang.String) */ public void storeProfile(Layout rootLayout, String layoutKey) { PortalService service = null; try { service = (PortalService) this.manager.lookup(PortalService.ROLE); if ( null == layoutKey ) { layoutKey = service.getDefaultLayoutKey(); } final String layoutAttributeKey = "Layout:" + layoutKey; service.setAttribute(layoutAttributeKey, rootLayout); } catch (Exception ce) { throw new CascadingRuntimeException("Exception during loading of profile.", ce); } finally { this.manager.release(service); } }
0
import org.apache.felix.http.base.internal.whiteboard.WhiteboardManager; public ServletRequestListenerTracker(final BundleContext context, final WhiteboardManager manager)
0
HashMap m_definedClasses = new HashMap(); if(m_definedClasses.containsKey(name)) { return (Class) m_definedClasses.get(name); } Class c = super.defineClass(name, b, 0, b.length, domain); m_definedClasses.put(name, c); return c; ComponentInstance ci = (ComponentInstance) it.next(); if(ci.isStarted()) { ci.stop(); } public Class defineClass(String name, byte[] b, ProtectionDomain domain) throws Exception { if(m_classLoader == null) { m_classLoader = new FactoryClassloader(); } return m_classLoader.defineClass(name, b, domain); }
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestBagUtils.java,v 1.2 2003/09/20 17:02:03 scolebourne Exp $ import junit.framework.Test; import org.apache.commons.collections.decorators.SynchronizedBag; import org.apache.commons.collections.decorators.SynchronizedSortedBag; import org.apache.commons.collections.decorators.TransformedBag; import org.apache.commons.collections.decorators.UnmodifiableBag; import org.apache.commons.collections.decorators.UnmodifiableSortedBag; * @version $Revision: 1.2 $ $Date: 2003/09/20 17:02:03 $
0
import java.security.SecureRandom; System.currentTimeMillis() + "_" + new SecureRandom().nextInt(Short.MAX_VALUE), token,
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
/** * @since 4.0 */
0
package org.apache.beam.sdk.coders; import org.apache.beam.sdk.util.ExposedByteArrayOutputStream; import org.apache.beam.sdk.util.StreamUtils; import org.apache.beam.sdk.util.VarInt;
0
import org.apache.beam.runners.spark.translation.streaming.Checkpoint.CheckpointDir;
0
import com.google.common.collect.Lists; public void testSourceSplitIntoBundlesVoid() throws Exception { CreateSource<Void> source = CreateSource.fromIterable( Lists.<Void>newArrayList(null, null, null, null, null), VoidCoder.of()); PipelineOptions options = PipelineOptionsFactory.create(); List<? extends BoundedSource<Void>> splitSources = source.splitIntoBundles(3, options); SourceTestUtils.assertSourcesEqualReferenceSource(source, splitSources, options); } @Test public void testSourceSplitIntoBundlesEmpty() throws Exception { CreateSource<Integer> source = CreateSource.fromIterable(ImmutableList.<Integer>of(), BigEndianIntegerCoder.of()); PipelineOptions options = PipelineOptionsFactory.create(); List<? extends BoundedSource<Integer>> splitSources = source.splitIntoBundles(12, options); SourceTestUtils.assertSourcesEqualReferenceSource(source, splitSources, options); } @Test
0
* on the baseline.<br /> * * <b>Note</b>: The current implementation turns a drawString call * into shapes. Therefore, the generated SVG file will be sub-optimal * in terms of size and will have lost semantic (i.e., text is no * longer text but shapes), but it is graphically accurate. *
0
@SuppressWarnings("unchecked") // OK final Enumeration<String> propertyNames = (Enumeration<String>) cp.propertyNames(); while(propertyNames.hasMoreElements()){ String c = propertyNames.nextElement();
0
/** * Determines if the object has been set up with a ByteArray * * @return true is the object has been set up with an octet stream */ public boolean isByteArray() { return ( (bytes!=null) && ((this._inputNodeSet == null) && _subNode ==null)); }
0
* http://www.apache.org/licenses/LICENSE-2.0
0
import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl; public void configure(MiniAccumuloConfigImpl cfg) {
0
MONITOR_SSL_KEYSTORETYPE("monitor.ssl.keyStoreType", "jks", PropertyType.STRING, "Type of SSL keystore"), MONITOR_SSL_TRUSTSTORETYPE("monitor.ssl.trustStoreType", "jks", PropertyType.STRING, "Type of SSL truststore"),
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: BindingManager.java,v 1.5 2004/03/05 13:02:26 bdelacretaz Exp $
1
tmpDir = getFile(properties, TMPDIR, new File(System.getProperty("java.io.tmpdir"), "fileinstall"));
0
package org.apache.felix.ipojo.test.scenarios.component; import java.util.Dictionary; import java.util.List; import java.util.Map; import java.util.Properties; import org.apache.felix.ipojo.test.scenarios.configuration.service.CheckService; public class ComplexConfiguration implements CheckService { private List m_list; private Map m_map; private Dictionary m_dict; private String[] m_array; private List m_complexList; private Map m_complexMap; private Object[] m_complexArray; public boolean check() { return true; } public Properties getProps() { Properties props = new Properties(); props.put("list", m_list); props.put("map", m_map); props.put("dict", m_dict); props.put("array", m_array); props.put("complex-list", m_complexList); props.put("complex-map", m_complexMap); props.put("complex-array", m_complexArray); return props; } }
0
super(null, null, null, null);
0
import org.apache.beam.sdk.extensions.euphoria.core.annotation.audience.Audience;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/share/org/apache/commons/validator/Attic/Constant.java,v 1.9 2004/01/11 23:30:20 dgraham Exp $ * $Revision: 1.9 $ * $Date: 2004/01/11 23:30:20 $ * Copyright (c) 2001-2004 The Apache Software Foundation. All rights
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 1999-2009 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
* @author <a href="mailto:[email protected]">Christophe Jolif</a> * @param x the mouse x coordinate * @param y the mouse y coordinate * @param screenX the mouse x coordinate relative to the screen * @param screenY the mouse y coordinate relative to the screen
0
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; @SuppressFBWarnings(value = "RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT", justification = "prefetch side effect")
0
public final class JettyLogger implements Logger public void debug(Throwable throwable) { if (this.debugEnabled) { SystemLogger.debug(throwable.getMessage()); } } public void debug(String msg, Object... args) { if (this.debugEnabled) { SystemLogger.debug(MessageFormat.format(msg, args)); } } public void debug(String msg, Throwable throwable) { if (this.debugEnabled) { SystemLogger.debug(msg + ": " + throwable.getMessage()); } } public String getName() { return name; } public void ignore(Throwable throwable) { } public void info(Throwable throwable) { SystemLogger.info(throwable.getMessage()); } public void info(String msg, Object... args) { SystemLogger.info(MessageFormat.format(msg, args)); } public void info(String msg, Throwable throwable) { SystemLogger.info(msg + ": " + throwable.getMessage()); } public void warn(Throwable throwable) { SystemLogger.warning(null, throwable); } public void warn(String msg, Object... args) { SystemLogger.warning(MessageFormat.format(msg, args), null); } public void warn(String msg, Throwable throwable) { SystemLogger.warning(msg, throwable); }
0
this.loadXmlPage("cocoon-servlet-service-impl-sample/test1/test4?foo=5");
0
import org.apache.ambari.server.events.InitialAlertEvent; * Consumes an {@link InitialAlertEvent}. public void onInitialAlertEvent(InitialAlertEvent event) { onAlertEvent(event.getClusterId(), event.getAlert()); } /** * Consumes an {@link AlertStateChangeEvent}. */ @Subscribe public void onAlertStateChangeEvent(AlertStateChangeEvent event) { onAlertEvent(event.getClusterId(), event.getAlert()); } /** * Calculates the aggregate alert state for the aggregated alert specified. */ private void onAlertEvent(long clusterId, Alert alert) { clusterId, alert.getName()); AlertSummaryDTO summary = m_alertsDao.findAggregateCounts(clusterId, aggregateSource.getAlertName()); Alert aggregateAlert = new Alert(aggregateDefinition.getName(), null, aggregateAlert.setLabel(aggregateDefinition.getLabel()); aggregateAlert.setTimestamp(System.currentTimeMillis()); aggregateAlert.setText("There are no instances of the aggregated alert."); aggregateAlert.setText("There are alerts with a state of UNKNOWN."); aggregateAlert.setState(AlertState.CRITICAL); aggregateAlert.setText(MessageFormat.format( reporting.getCritical().getText(), aggregateAlert.setState(AlertState.WARNING); aggregateAlert.setText(MessageFormat.format( reporting.getWarning().getText(), aggregateAlert.setState(AlertState.OK); aggregateAlert.setText(MessageFormat.format( reporting.getOk().getText(), AlertReceivedEvent aggEvent = new AlertReceivedEvent(clusterId, aggregateAlert);
0
* Copyright (C) 2015 Google Inc.
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/Attic/TestBidiMap.java,v 1.2 2003/09/26 23:28:43 matth Exp $ import junit.framework.TestCase; * @version $Id: TestBidiMap.java,v 1.2 2003/09/26 23:28:43 matth Exp $ public abstract class TestBidiMap extends TestCase { /** * Ensures that calling: * * <pre> * map.add(a, c) * map.add(b, c) * </pre> * * Removes the entry (a, c) */ public void testAddDuplicateValue() { final BidiMap map = createBidiMap(); final Object key1 = "key1"; final Object key2 = "key2"; final Object value = "value"; map.put(key1, value); map.put(key2, value); assertTrue( "Key/value pair was not removed on duplicate value.", !map.containsKey(key1)); assertEquals("Key/value mismatch", key2, map.getKey(value)); } // ---------------------------------------------------------------- // ---------------------------------------------------------------- /** * This classes used to extend collections.TestMap, but can't anymore since * put() breaks a contract. */ protected final BidiMap createBidiMapWithData() {
0
super.setAccessFlags(access_flags); file.writeShort(super.getAccessFlags()); String access = Utility.accessToString(super.getAccessFlags(), true); buf.append(access).append(Utility.classOrInterface(super.getAccessFlags())).append(" ").append( buf.append("access flags\t\t").append(super.getAccessFlags()).append('\n'); return (super.getAccessFlags() & Constants.ACC_SUPER) != 0; return (super.getAccessFlags() & Constants.ACC_INTERFACE) == 0;
0
import org.apache.aurora.common.args.Arg; import org.apache.aurora.common.args.CmdLine;
0
private static final long serialVersionUID = 5296593071854982754L;
0
final long timeout, final TimeUnit tunit) throws InterruptedException, ConnectionPoolTimeoutException { if(!awaitLatch.await(timeout > 0 ? timeout : Integer.MAX_VALUE, tunit)) { final long timeout, final TimeUnit tunit) throws InterruptedException, ConnectionPoolTimeoutException { if(!awaitLatch.await(timeout > 0 ? timeout : Integer.MAX_VALUE, tunit)) {
0
Object serialize(Result result);
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
protected void setKey(final SelectionKey key) { this.key = key; } SelectionKey key = this.key; if (key != null) { key.cancel(); Channel channel = key.channel(); if (channel.isOpen()) { try { channel.close(); } catch (IOException ignore) {} } } SelectionKey key = this.key; if (key != null) { key.cancel(); Channel channel = key.channel(); SelectionKey key = this.key; if (key != null) { key.selector().wakeup(); SelectionKey key = this.key; if (key != null) { key.cancel(); Channel channel = key.channel();
0
* The RowEncodingIterator is designed to provide row-isolation so that queries see mutations as atomic. It does so by encapsulating an entire row of key/value * pairs into a single key/value pair, which is returned through the client as an atomic operation. This is an abstract class, allowing the user to implement * rowEncoder and rowDecoder such that the columns and values of a given row may be encoded in a format best suited to the client. * * One caveat is that when seeking in the WholeRowIterator using a range that starts at a non-inclusive first key in a row, (e.g. seek(new Range(new Key(new * Text("row")),false,...),...)) this iterator will skip to the next row. This is done in order to prevent repeated scanning of the same row when system * automatically creates ranges of that form, which happens in the case of the client calling continueScan, or in the case of the tablet server continuing a * scan after swapping out sources. * To regain the original key/value pairs of the row, call the rowDecoder function on the key/value pair that this iterator returned. * Given a value generated by the rowEncoder implementation, recreate the original Key, Value pairs. * * Take a stream of keys and values. Return values in the same order encoded such that all portions of the key (except for the row value) and the original * value are encoded in some way. *
0
// Issue a warning for missing imports. On the other hand, // if packages are being ignored, then this is a new project }
0
* {@link PCollection PCollections}, only a bounded portion of the input Pub/Sub stream * can be processed. As such, either {@link Bound#maxNumRecords(int)} or * {@link Bound#maxReadTime(Duration)} must be set.
0
package org.apache.commons.configuration; * @version $Id: TestCompositeConfigurationNonStringProperties.java,v 1.5 2005/01/03 16:35:04 ebourg Exp $ /** The File that we test with */ private String testProperties = new File("conf/test.properties").getAbsolutePath(); public void setUp() throws Exception { CompositeConfiguration cc = new CompositeConfiguration(); cc.addConfiguration(new PropertiesConfiguration(testProperties)); conf = cc; nonStringTestHolder.setConfiguration(conf); }
0
import org.apache.accumulo.core.util.RootTable; KeyExtent root = RootTable.ROOT_TABLET_EXTENT;
0
Set<SubResourceDefinition> setChildren = new HashSet<>();
1
public List<BoundedSource<KV<K, V>>> split(long desiredBundleSizeBytes, * and cached in this. These splits are further used by split() and
0
import java.util.Map.Entry; import org.apache.accumulo.core.client.impl.Namespaces; if (!curr.startsWith(Namespaces.ACCUMULO_NAMESPACE + ".")) {
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.agent.stomp; /** * Agent report default response. Contains status only. */ public class ReportsResponse extends StompResponse { }
0
* @param <E> the type of elements held in this queue
0
import java.util.Random; Random random = new Random(); tmpDir = accumuloDir + "/tmp/idxReduce_" + String.format("%09d", random.nextInt(Integer.MAX_VALUE)); log.debug(String.format("Found midPoint from indexes in %6.2f secs.%n", (t2 - t1) / 1000.0));
0
/* * $HeadURL$ * $Revision$ * $Date$ * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * */ package org.apache.http.impl.nio.codecs; import org.apache.http.HttpMessage; import org.apache.http.HttpResponse; import org.apache.http.message.BasicStatusLine; import org.apache.http.nio.reactor.SessionOutputBuffer; import org.apache.http.params.HttpParams; import org.apache.http.util.CharArrayBuffer; public class HttpResponseWriter extends AbstractMessageWriter { public HttpResponseWriter(final SessionOutputBuffer buffer, final HttpParams params) { super(buffer, params); } protected void writeHeadLine( final CharArrayBuffer lineBuffer, final HttpMessage message) { BasicStatusLine.format(lineBuffer, ((HttpResponse) message).getStatusLine()); } }
0
* Copyright 2003-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
* Returns the RGBColor value for this SVGColor. * For the SVG 1.1 ECMAScript binding. */ public RGBColor getRgbColor() { return this; } /** * Returns the SVGICCColor value of this SVGColor. * For the SVG 1.1 ECMAScript binding. */ public SVGICCColor getIccColor() { return this; } /**
0
import org.apache.beam.runners.core.StateInternals;
0
* Listing API Examples * Both paged and unpaged examples of directory listings are available, * as follows: * Unpaged (whole list) access, using a parser accessible by auto-detect: * <pre> * FTPClient f=FTPClient(); * f.connect(server); * f.login(username, password); * FTPFile[] files = listFiles(directory); * </pre> * <p> * Paged access, using a parser not accessible by auto-detect. The class * defined in the first parameter of initateListParsing should be derived * from org.apache.commons.net.FTPFileEntryParser: * <pre> * FTPClient f=FTPClient(); * f.connect(server); * f.login(username, password); * FTPListParseEngine engine = * f.initiateListParsing("com.whatever.YourOwnParser", directory); * * while (engine.hasNext()) { * FTPFile[] files = engine.getNext(25); // "page size" you want * //do whatever you want with these files, display them, etc. * //expensive FTPFile objects not created until needed. * } * </pre> * <p> * Paged access, using a parser accessible by auto-detect: * <pre> * FTPClient f=FTPClient(); * f.connect(server); * f.login(username, password); * FTPListParseEngine engine = f.initiateListParsing(directory); * * while (engine.hasNext()) { * FTPFile[] files = engine.getNext(25); // "page size" you want * //do whatever you want with these files, display them, etc. * //expensive FTPFile objects not created until needed. * } * </pre> * <p> * @author Daniel F. Savarese
0
assertEquals(k1, k2); assertEquals(k3, k4);
0
import org.apache.accumulo.core.client.Instance; Instance instance = HdfsZooInstance.getInstance(); Client client = MasterClient.getConnection(instance); client.getMasterStats(Tracer.traceInfo(), SystemCredentials.get().toThrift(instance));
0
exchangeId, operation.setDependency(execRuntime.execute(exchangeId, internalExchangeHandler, clientContext));
0
* Copyright 2008-2010 The Apache Software Foundation. private static final String BASEDIR = System.getProperty("basedir") == null ? "./": System.getProperty("basedir");
0
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Iterables;
0
Counter.longs("read_output_name-MeanByteCount", MEAN).resetMeanToValue(0, 0L), Counter.longs("DoFn1_output-MeanByteCount", MEAN).resetMeanToValue(0, 0L), Counter.longs("DoFnWithContext_output-MeanByteCount", MEAN).resetMeanToValue(0, 0L), Counter.longs("flatten_output_name-MeanByteCount", MEAN).resetMeanToValue(0, 0L), counterSet.getExistingCounter("test-other-msecs")).getAggregate())), Counter.longs("read_output_name-MeanByteCount", MEAN).resetMeanToValue(0, 0L), "test-WriteOperation-start-msecs")).getAggregate()), "test-WriteOperation-process-msecs")).getAggregate()), "test-WriteOperation-finish-msecs")).getAggregate())),
0
/** Unit tests for {@link BeamSqlCardinalityExpression}. */ ImmutableList.of(BeamSqlPrimitive.of(SqlTypeName.ARRAY, Arrays.asList("aaa", "bbb"))); ImmutableList.of(BeamSqlPrimitive.of(SqlTypeName.ARRAY, Arrays.asList())); ImmutableList.of(BeamSqlPrimitive.of(SqlTypeName.ARRAY, Arrays.asList("aaa", "bbb")));
0
@Override
0
(BeamFnApi.Elements t) -> { inboundServerValues.add(t); waitForInboundServerValuesCompletion.countDown(); ).build();
0
void failed(Exception cause);
0
(null, target.getHostName(), port, null, 0, params);
0
import org.apache.hc.core5.annotation.Internal; * Request execution handler in the classic request execution chain * that is responsible for implementation of HTTP specification requirements. @Contract(threading = ThreadingBehavior.STATELESS) @Internal public final class ProtocolExec implements ExecChainHandler { execRuntime.disconnectEndpoint(); execRuntime.discardEndpoint(); execRuntime.discardEndpoint(); return authenticator.updateAuthState(target, ChallengeType.TARGET, response, return authenticator.updateAuthState(proxy, ChallengeType.PROXY, response,
0
import java.util.Collections; return Collections.singletonList(input);
0
/** Tests {@link CustomOptional}. */ .addEqualityGroup(CustomOptional.of("3")) .testEquals();
1
package com.twitter.aurora.scheduler.log;
1
import org.slf4j.Logger; import org.slf4j.LoggerFactory; protected static final Logger LOG = LoggerFactory.getLogger(GenerateLoad.class);
0
public class ClassVector implements java.io.Serializable {
0
import org.apache.sshd.util.BaseTestSupport; public class SshServerTest extends BaseTestSupport { try(SshServer sshd = new SshServer()) { sshd.stop(); sshd.stop(); sshd.stop(); } try(SshServer sshd = createTestServer()) { sshd.setScheduledExecutorService(executorService); sshd.start(); sshd.stop(); assertFalse(executorService.isShutdown()); executorService.shutdownNow(); } try(SshServer sshd = createTestServer()) { sshd.setScheduledExecutorService(executorService, true); sshd.start(); sshd.stop(); assertTrue(executorService.isShutdown()); } try(SshServer sshd = createTestServer()) { sshd.setHost("localhost"); sshd.start(); assertNotEquals(0, sshd.getPort()); sshd.stop(); }
0