Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
package org.w3c.dom.svg; import org.w3c.dom.events.EventTarget; public interface SVGElementInstance extends EventTarget { public SVGElement getCorrespondingElement( ); public SVGUseElement getCorrespondingUseElement( ); public SVGElementInstance getParentNode( ); public SVGElementInstanceList getChildNodes( ); public SVGElementInstance getFirstChild( ); public SVGElementInstance getLastChild( ); public SVGElementInstance getPreviousSibling( ); public SVGElementInstance getNextSibling( ); }
1
import org.apache.ambari.server.state.StackId; configHelper.updateConfigType(anyObject(Cluster.class), anyObject(StackId.class), anyObject(AmbariManagementController.class), configHelper.updateConfigType(anyObject(Cluster.class), anyObject(StackId.class), anyObject(AmbariManagementController.class),
0
@Inject private ExecutorCore executor;
0
* * <li>Defines united API among all the {@link Operator Operators}. * <li>Enables to share related javadoc. * <li>Allows for mandatory chaining of some builders. See {@link WindowBy}. * dataset's elements * <p>It consumes {@link WindowFn} and it is followed by {@link TriggeredBy} and {@link * {@link WindowFn}.It represents windowing strategy to apply to the input elements. * backward compatibility. /** TODO: complete javadoc. */ /** TODO: complete javadoc. */
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: SelectNode.java,v 1.3 2004/03/05 13:02:52 bdelacretaz Exp $
1
// In Accumulo's current code only one thread will ever call this method. However if multiple threads called this method concurrently it could result in // sessions being lost. This method synchronizes on idleSessions to prevent the loss. Its not expected that anything else will synchronize on idleSessions. synchronized (idleSessions) { synchronized (this) { Iterator<Session> iter = sessions.values().iterator(); while (iter.hasNext()) { Session session = iter.next(); long configuredIdle = maxIdle; if (session instanceof UpdateSession) { configuredIdle = maxUpdateIdle; } long idleTime = System.currentTimeMillis() - session.lastAccessTime; if (idleTime > configuredIdle && !session.reserved) { log.info("Closing idle session from user=" + session.getUser() + ", client=" + session.client + ", idle=" + idleTime + "ms"); iter.remove(); idleSessions.add(session); } List<Session> sessionsToCleanup = new ArrayList<>(); // do clean up outside of lock for TabletServer for (Session session : idleSessions) { if (!session.cleanup()) { sessionsToCleanup.add(session); } } synchronized (this) { idleSessions.clear(); idleSessions.addAll(sessionsToCleanup); /** * Add sessions so that get the list returned in the active scans call */ for (Session session : idleSessions) { copiedIdleSessions.add(Maps.immutableEntry(expiredSessionMarker, session)); for (Entry<Long,Session> entry : Iterables.concat(sessions.entrySet(), copiedIdleSessions)) { /** * Add sessions so that get the list returned in the active scans call */ for (Session session : idleSessions) { copiedIdleSessions.add(Maps.immutableEntry(expiredSessionMarker, session));
0
@Provides @Singleton public SocketManager provideSocketManager() { String[] portRange = options.managedPortRange.split("-"); if (portRange.length != 2) { throw new IllegalArgumentException("Malformed managed port range value: " + options.managedPortRange); } return new SocketManager(Integer.parseInt(portRange[0]), Integer.parseInt(portRange[1])); }
0
import org.apache.felix.bundlerepository.impl.FileUtil; out.println(" " + caps[i].getPropertiesAsMap());
0
* @author <A HREF="mailto:[email protected]">M. Dahm</A>
0
setZooKeeperInstance(job, ClientConfiguration.create().withInstance(instanceName).withZkHosts(zooKeepers));
0
/* $Id$
0
@Override
0
package org.apache.felix.sigil.eclipse.ui.internal.editors.project; import org.apache.felix.sigil.eclipse.ui.internal.form.SigilPage;
0
import org.apache.commons.lang.StringUtils; import java.util.Arrays; import java.util.Collections; import java.util.HashSet; import java.util.Map; import java.util.Set; public static final String PROPERTY_DISPLAY_NAME_PROPERTY_ID = PropertyHelper .getPropertyId("StackLevelConfigurations", "property_display_name"); //should not be returned if empty if (StringUtils.isNotEmpty(response.getPropertyDisplayName())) { setResourceProperty(resource, PROPERTY_DISPLAY_NAME_PROPERTY_ID, response.getPropertyDisplayName(), requestedIds); }
0
package org.apache.beam.sdk.state;
0
p.apply(TextIO.Read.from("gs://apache-beam-samples/shakespeare/*"))
0
assertTrue(!new BooleanComparator().equals(new BooleanComparator(true))); assertTrue(!new BooleanComparator(true).equals(new BooleanComparator(false)));
0
import org.apache.commons.jelly.JellyException; public Tag createTag(String name, Attributes attributes) throws JellyException { try { return (Tag) tagClass.newInstance(); } catch (InstantiationException e) { throw new JellyException(e.toString()); } catch (IllegalAccessException e) { throw new JellyException(e.toString()); }
0
* </p>
0
// a DoFn (defined in-line) on each element that tokenizes the text line into individual // unique word in the text. The associated value is the occurrence count for that word. // printable string, suitable for writing to an output file.
0
/* DomoWare UPnP Base Driver is an implementation of the OSGi UnP Device Spcifaction Copyright (C) 2004 Matteo Demuru, Francesco Furfari, Stefano "Kismet" Lenzi This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA You can contact us at: {matte-d, sygent, kismet-sl} [at] users.sourceforge.net */ package org.apache.felix.upnp.extra.util; /** * * @author Stefano "Kismet" Lenzi * */ public interface Constants { /** * If this property is set on a UPnP Device means that the * device service is been created by UPnP base Driver. <br> * The value of the do not mean nothing. <br> * The name of the property is "UPnP.device.import". */ public static final String UPNP_IMPORT = "UPnP.device.imported"; }
0
/* * 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. package org.apache.commons.net.tftp;
0
import com.thinkaurelius.titan.core.schema.Mapping; createCompositeAndMixedIndex(Constants.TRAIT_NAMES_INDEX, Constants.TRAIT_NAMES_PROPERTY_KEY, String.class, false, Cardinality.SET); createFullTextIndex(); private void createFullTextIndex() { TitanManagement management = titanGraph.getManagementSystem(); PropertyKey fullText = management.makePropertyKey(Constants.ENTITY_TEXT_PROPERTY_KEY).dataType(String.class).make(); management.buildIndex(Constants.FULLTEXT_INDEX, Vertex.class) .addKey(fullText, com.thinkaurelius.titan.core.schema.Parameter.of("mapping", Mapping.TEXT)) .buildMixedIndex(Constants.BACKING_INDEX); management.commit(); LOG.info("Created mixed index for {}", Constants.ENTITY_TEXT_PROPERTY_KEY); } //create index on vertex type createCompositeIndex(Constants.VERTEX_TYPE_PROPERTY_KEY, Constants.VERTEX_TYPE_PROPERTY_KEY, String.class, false, Cardinality.SINGLE);
0
enum Type { Result process(); ResourceInstance getResource(); String getURI(); Type getRequestType(); int getAPIVersion(); Predicate getQueryPredicate(); Map<String, TemporalInfo> getFields(); RequestBody getBody(); Map<String, List<String>> getHttpHeaders(); PageRequest getPageRequest(); SortRequest getSortRequest(); Renderer getRenderer(); /** * Returns the remote address for the request * @return the remote address for the request */ String getRemoteAddress();
1
@Override @Override @Override @Override
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
@Transactional @Transactional entityManagerProvider.get().remove(merge(hostComponentStateEntity));
1
// if the form has an ID, it is used as part of the submitId too // this has ID has to be cut off if(this.getId() != null) { submitId = submitId.substring(submitId.indexOf('.')+1); }
0
public class MultiValuedHashMap<K, V> extends AbstractMultiValuedMap<K, V> {
0
import com.google.common.annotations.VisibleForTesting; import java.io.IOException; import java.util.ArrayList; import java.util.Enumeration; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.NoSuchElementException; import javax.annotation.Nullable; import javax.jms.Connection; import javax.jms.ConnectionFactory; import javax.jms.Destination; import javax.jms.MessageConsumer; import javax.jms.MessageProducer; import javax.jms.Session; import javax.jms.TextMessage;
0
import org.apache.http.conn.HttpRoute; import org.apache.http.conn.SchemeRegistry;
0
import org.apache.accumulo.core.client.BatchWriterConfig; BatchWriter bw = conn.createBatchWriter(table, new BatchWriterConfig());
0
static final int MESSAGES_POLLING_ATTEMPTS = 12;
0
import com.google.common.collect.ImmutableMap; private static final Set<String> propertyIds = ImmutableSet.<String>builder() .add(SETTING_NAME_PROPERTY_ID) .add(SETTING_SETTING_TYPE_PROPERTY_ID) .add(SETTING_CONTENT_PROPERTY_ID) .add(SETTING_UPDATED_BY_PROPERTY_ID) .add(SETTING_UPDATE_TIMESTAMP_PROPERTY_ID) .add(SETTING_SETTING_TYPE_PROPERTY_ID) .add(SETTING) .build(); private static final Map<Resource.Type, String> keyPropertyIds = ImmutableMap.<Resource.Type, String>builder() .put(Resource.Type.Setting, SETTING_NAME_PROPERTY_ID) .build();
0
/* * Copyright 1999-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.cocoon.util; import java.io.OutputStream; /** * @version $Id$ * * @since 2.1.4 */ public final class NullOutputStream extends OutputStream { public void write(byte b[]) { } public void write(byte b[], int off, int len) { } public void write(int b) { } }
0
import org.apache.hadoop.metadata.classification.InterfaceAudience; @InterfaceAudience.Private * This is only used for testing purposes. Not intended for public use. @InterfaceAudience.Private
0
/* * Copyright 1999-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.cocoon.components.source; import org.apache.excalibur.source.Source; import org.apache.excalibur.source.SourceException; import org.apache.cocoon.components.source.helpers.SourceLock; /** * A source, which could be locked * * @author <a href="mailto:[email protected]">Stephan Michels</a> * @version $Id$ */ public interface LockableSource extends Source { /** * Add a lock to this source * * @param sourcelock Lock, which should be added * * @throws SourceException If an exception occurs during this operation */ public void addSourceLocks(SourceLock sourcelock) throws SourceException; /** * Returns a list of locks on the source. * * @return Enumeration of SourceLock */ public SourceLock[] getSourceLocks() throws SourceException; }
0
import junit.framework.TestCase; * @version $Id$ static final String TEST_DIR = ConfigurationAssert.TEST_DIR_NAME;
0
import org.apache.beam.sdk.fn.data.FnDataReceiver;
0
* This bean describes a persistence type. It is used by the {@link Converter} and * the {@link ProfileStore} to load and save parts of the portal profile. * references during loading/saving keyed maps can be provided. * * This is a list of maps that should be set for the persistence types: * PROFILETYPE_LAYOUT: "layoutType" : A map with layout types. * "customRenderer" : A map with renderers * PROFILETYPE_LAYOUTINSTANCE: "layout" : A map with layouts. * PROFILETYPE_COPLETDEFINITION: "copletType" : A map with coplet types. * PROFILETYPE_COPLETINSTANCE: "copletDefinition" : A map with coplet definitions.
0
import org.apache.sshd.common.util.buffer.Buffer; import org.apache.sshd.common.util.buffer.ByteArrayBuffer; @Override @Override Buffer buf = new ByteArrayBuffer(data, off, len); buf = new ByteArrayBuffer(buf.getCompactData());
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
/** * Tests whether the default lookup is called for variables with a prefix * when the lookup that was registered for this prefix is not able to * resolve the variable. */ public void testLookupDefaultAfterPrefixFails() { final String varName = TEST_PREFIX + ':' + TEST_NAME + "2"; interpolator.registerLookup(TEST_PREFIX, setUpTestLookup()); Map map = new HashMap(); map.put(varName, TEST_VALUE); interpolator.setDefaultLookup(StrLookup.mapLookup(map)); assertEquals("Variable is not resolved by default lookup", TEST_VALUE, interpolator.lookup(varName)); }
0
import org.apache.accumulo.core.client.security.tokens.AuthenticationToken.AuthenticationTokenSerializer; import org.apache.accumulo.core.security.Credentials; Connector conn = instance.getConnector(user, AuthenticationTokenSerializer.deserialize(tokenClass, password)); scanner = new OfflineScanner(instance, new Credentials(user, AuthenticationTokenSerializer.deserialize(tokenClass, password)), Tables.getTableId( Connector conn = instance.getConnector(getPrincipal(job), AuthenticationTokenSerializer.deserialize(getTokenClass(job), getToken(job))); while (!tl.binRanges(new Credentials(getPrincipal(job), AuthenticationTokenSerializer.deserialize(getTokenClass(job), getToken(job))), ranges, binnedRanges).isEmpty()) {
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. */ /** * Implementation classes of BeamSql. */ package org.apache.beam.sdk.extensions.sql.impl;
0
import java.text.MessageFormat; // TODO, this assumes that the display name is unique, but neither the code nor the DB schema enforces this. return findByStackNameAndVersion(stackId.getStackName(), version); return findByStackNameAndVersion(stackEntity.getStackName(), version); * Retrieves repository version, which is unique in this stack. * @param stackName Stack name such as HDP, HDPWIN, BIGTOP * @param version version public RepositoryVersionEntity findByStackNameAndVersion(String stackName, String version) { // TODO, need to make a unique composite key in DB using the repo_version's stack_id and version. // Ideally, 1.0-1234 foo should be unique in all HDP stacks. // The composite key is slightly more relaxed since it would only prevent 2.3.0-1234 multiple times in the HDP 2.3 stack. // There's already business logic to prevent creating 2.3-1234 in the wrong stack such as HDP 2.2. final TypedQuery<RepositoryVersionEntity> query = entityManagerProvider.get().createNamedQuery("repositoryVersionByStackNameAndVersion", RepositoryVersionEntity.class); * The version must be unique within this stack name (e.g., HDP, HDPWIN, BIGTOP). * @param stackEntity Stack entity. RepositoryVersionEntity existingVersionInStack = findByStackNameAndVersion(stackEntity.getStackName(), version); if (existingVersionInStack != null) { throw new AmbariException(MessageFormat.format("Repository Version for version {0} already exists, in stack {1}-{2}", version, existingVersionInStack.getStack().getStackName(), existingVersionInStack.getStack().getStackVersion())); } StackId stackId = new StackId(stackEntity.getStackName(), stackEntity.getStackVersion() ); if (!RepositoryVersionEntity.isVersionInStack(stackId, version)) { throw new AmbariException(MessageFormat.format("Version {0} needs to belong to stack {1}", version, stackEntity.getStackName() + "-" + stackEntity.getStackVersion()));
0
import com.google.cloud.dataflow.sdk.transforms.windowing.PaneInfo; PaneInfo.DEFAULT);
0
* @author <a href="mailto:[email protected]">Upayavira</a> * @version CVS $Id: CocoonBean.java,v 1.7 2003/06/04 13:48:50 upayavira Exp $ private String defaultFilename = Constants.INDEX_URI; * @return a <code>Collection</code> containing all links found, as
0
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkState;
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. */ import java.io.Serializable; /** * A set of Beam windowing parameters. * * @param <T> type of elements being windowed * @param <W> {@link BoundedWindow} subclass used to represent the windows used by {@link WindowFn} * accessible through {@link #getWindowFn()} */ public class WindowingDesc<T, W extends BoundedWindow> implements Serializable {
0
import java.util.concurrent.CompletionStage; import org.apache.beam.sdk.util.MoreFutures; List<CompletionStage<T>> futures = new ArrayList<>(tasks.size()); futures.add(MoreFutures.supplyAsync(() -> task.call(), executorService)); return MoreFutures.get(MoreFutures.allAsList(futures));
0
try (AbstractSession serverSession = GenericUtils.head(sshd.getActiveSessions())) { try (Channel channel = GenericUtils.head(channels)) {
0
//moved this down synchronized (this) { m_services.remove(service); }
0
import static com.google.common.base.Charsets.UTF_8; zoo.putPersistentData(ZKUserPath, principal.getBytes(UTF_8), NodeExistsPolicy.FAIL);
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/SetPropertiesRule.java,v 1.3 2001/08/15 20:35:43 craigmcc Exp $ * $Revision: 1.3 $ * $Date: 2001/08/15 20:35:43 $ * @version $Revision: 1.3 $ $Date: 2001/08/15 20:35:43 $ if ("".equals(name)) name = attributes.getQName(i); if (digester.getDebug() >= 9) digester.log(" Setting property '" + name + "' to '" + value + "'");
0
package org.apache.hc.core5.http.pool.nio;
1
* @version SVN $Id$ * Get the mount path of the block */ public String getMountPath(); /**
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/tags/xml/Attic/SetTag.java,v 1.9 2002/10/30 19:16:23 jstrachan Exp $ * $Revision: 1.9 $ * $Date: 2002/10/30 19:16:23 $ * Copyright (c) 2002 The Apache Software Foundation. All rights * $Id: SetTag.java,v 1.9 2002/10/30 19:16:23 jstrachan Exp $ * @version $Revision: 1.9 $
0
package org.apache.commons.digester3.examples.api.addressbook;
0
import org.apache.beam.vendor.grpc.v1p13p1.com.google.protobuf.Struct;
0
* @version $Id: HierarchicalDOM4JConfiguration.java,v 1.3 2004/02/24 13:08:03 epugh Exp $
0
public static final String TABLE_ALIAS_LIST = "aliases"; new AttributeDefinition(TABLE_ALIAS_LIST, DataTypes.arrayTypeName(DataTypes.STRING_TYPE.getName()), Multiplicity.OPTIONAL, true, null),
0
boolean horizontal = true; result.put(GVTAttributedCharacterIterator. horizontal = false; if (horizontal) { f = UnitProcessor.cssHorizontalCoordinateToUserSpace (v, CSS_LETTER_SPACING_PROPERTY, uctx); } else { f = UnitProcessor.cssVerticalCoordinateToUserSpace (v, CSS_LETTER_SPACING_PROPERTY, uctx); } if (horizontal) { f = UnitProcessor.cssHorizontalCoordinateToUserSpace (v, CSS_WORD_SPACING_PROPERTY, uctx); } else { f = UnitProcessor.cssVerticalCoordinateToUserSpace (v, CSS_WORD_SPACING_PROPERTY, uctx); } if (horizontal) { f = UnitProcessor.svgHorizontalLengthToUserSpace (s, SVG_KERNING_ATTRIBUTE, uctx); } else { f = UnitProcessor.svgVerticalLengthToUserSpace (s, SVG_KERNING_ATTRIBUTE, uctx); } if (horizontal) { f = UnitProcessor.svgHorizontalLengthToUserSpace (s, SVG_TEXT_LENGTH_ATTRIBUTE, uctx); } else { f = UnitProcessor.svgVerticalLengthToUserSpace (s, SVG_TEXT_LENGTH_ATTRIBUTE, uctx); }
0
// Tuple2[Key, Window] => Reduced Value // Order of items in this Tuple2 is reversed compared to the // order in KeySelector. This is made on purpose because // all values in this reducer have the same hash code. // Reversing the order will lead to better performance // when kw is put into hash map. Tuple2 kw = new Tuple2<>(key, window); Object key = e.getKey().f0; Window window = (Window) e.getKey().f1; @SuppressWarnings("unchecked") BatchElement<Window, Pair> batchElement = new BatchElement<>( Pair.of(key, e.getValue().getElement())); out.collect(batchElement);
0
if(processedGuids.contains(h.getGuid())) { continue; }
0
private final ServletInfo servletInfo; this.servletInfo = new ServletInfo(this); public ServletInfo getServletInfo() { return this.servletInfo; }
0
Iterators.size( getConnector().createScanner(MetadataTable.NAME, Authorizations.EMPTY).iterator());
0
factory.getReplacementTransform(null);
0
/* * (non-Javadoc) * * @see org.apache.accumulo.core.client.admin.InstanceOperations#ping(java.lang.String) */ @Override public void ping(String tserver) throws AccumuloException { // TODO Auto-generated method stub }
0
public static final String USE_HIVE_INTERACTIVE_MODE = "use.hive.interactive.mode"; if (property.equals(USE_HIVE_INTERACTIVE_MODE)) { String value = viewInstanceDefinition.getPropertyMap().get(USE_HIVE_INTERACTIVE_MODE); if (!("true".equalsIgnoreCase(value) || "false".equalsIgnoreCase(value))) { return new InvalidPropertyValidationResult(false, "Must be 'true' or 'false'"); } }
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
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/share/org/apache/commons/validator/ValidatorAction.java,v 1.20 2004/02/21 17:10:29 rleland Exp $ * $Revision: 1.20 $ * $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
* $Header: /home/cvs/jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/beanshell/TestBeanShellEL.java,v 1.7 2002/05/17 15:18:14 jstrachan Exp $ * $Revision: 1.7 $ * $Date: 2002/05/17 15:18:14 $ * $Id: TestBeanShellEL.java,v 1.7 2002/05/17 15:18:14 jstrachan Exp $ * @version $Revision: 1.7 $
0
return SVG_FE_FUNC_B_TAG;
0
/* * $Id$ * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */
0
/** * Exception to throw if an operation is attempted on a table that doesn't exist. * */ private static final long serialVersionUID = 1L; private String tableName; /** * @param tableId * the internal id of the table that was sought * @param tableName * the visible name of the table that was sought * @param description * the specific reason why it failed */ public TableNotFoundException(String tableId, String tableName, String description) { super("Table" + (tableName != null && !tableName.isEmpty() ? " " + tableName : "") + (tableId != null && !tableId.isEmpty() ? " (Id=" + tableId + ")" : "") + " does not exist" + (description != null && !description.isEmpty() ? " (" + description + ")" : "")); this.tableName = tableName; } /** * @param tableId * the internal id of the table that was sought * @param tableName * the visible name of the table that was sought * @param description * the specific reason why it failed * @param cause * the exception that caused this failure */ public TableNotFoundException(String tableId, String tableName, String description, Throwable cause) { this(tableId, tableName, description); super.initCause(cause); } /** * @param e * constructs an exception from a thrift exception */ public TableNotFoundException(ThriftTableOperationException e) { this(e.getTableId(), e.getTableName(), e.getDescription(), e); } /** * @return the name of the table sought */ public String getTableName() { return tableName; }
1
import org.apache.accumulo.core.clientImpl.ClientContext; import org.apache.accumulo.core.clientImpl.Credentials; import org.apache.accumulo.core.clientImpl.Namespace; import org.apache.accumulo.core.clientImpl.Namespaces; import org.apache.accumulo.core.clientImpl.Table; import org.apache.accumulo.core.clientImpl.Tables; import org.apache.accumulo.core.clientImpl.thrift.ClientService; import org.apache.accumulo.core.clientImpl.thrift.ConfigurationType; import org.apache.accumulo.core.clientImpl.thrift.SecurityErrorCode; import org.apache.accumulo.core.clientImpl.thrift.TDiskUsage; import org.apache.accumulo.core.clientImpl.thrift.TableOperation; import org.apache.accumulo.core.clientImpl.thrift.TableOperationExceptionType; import org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException; import org.apache.accumulo.core.clientImpl.thrift.ThriftTableOperationException; import org.apache.accumulo.core.securityImpl.thrift.TCredentials;
0
import org.apache.avalon.framework.component.Component; * @version CVS $Id: SlideRepositoryImpl.java,v 1.2 2003/12/03 12:06:05 unico Exp $ Contextualizable, Disposable, Component, ThreadSafe {
0
import org.apache.ambari.server.controller.internal.RequestStatusImpl; expect(controller.createResources(Resource.Type.Component, serverRequest)).andReturn(new RequestStatusImpl(null));
1
* Copyright (c) OSGi Alliance (2004, 2009). All Rights Reserved. * @Immutable * @version $Revision: 6492 $ private final String type; private final String[] args; * Constructs a <code>ConditionInfo</code> from the specified type and args. * @throws NullPointerException If <code>type</code> is <code>null</code>. this.args = (args != null) ? (String[]) args.clone() : new String[0]; * Constructs a <code>ConditionInfo</code> object from the specified encoded * <code>ConditionInfo</code> string. White space in the encoded * @throws IllegalArgumentException If the specified * Returns the string encoding of this <code>ConditionInfo</code> in a form * suitable for restoring this <code>ConditionInfo</code>. * The encoded format is: * where <i>argN</i> are strings that must be encoded for proper parsing. * Specifically, the <code>&quot;</code>, <code>\</code>, carriage return, * and line feed characters must be escaped using <code>\&quot;</code>, * <code>\\</code>, <code>\r</code>, and <code>\n</code>, respectively. * A single space character is used between type and &quot;<i>arg0</i>&quot; * and between the arguments. return (String[]) args.clone(); int h = 31 * 17 + type.hashCode(); h = 31 * h + args[i].hashCode(); return h;
0
private static final long serialVersionUID = 0; @Override public Boolean apply(CompletionCandidate c) { return c.getValue().length() == minPrefix; } })))
0
import org.apache.beam.sdk.transforms.SerializableFunctions; return JavaBeanUtils.schemaFromJavaBeanClass( typeDescriptor.getRawType(), SerializableFunctions.identity()); UserTypeCreatorFactory schemaTypeCreatorFactory() { return new SetterBasedCreatorFactory(new JavaBeanSetterFactory());
0
else if (numClass != null && numClass.isArray()) e.printStackTrace(); }
0
import org.joda.time.Instant; public Instant getWatermarkCutoff(W window) { return window.maxTimestamp(); } @Override
0
public void provideConfiguration( ServiceReference<ManagedServiceFactory> reference, final ConfigurationImpl config, final Dictionary<String, ?> rawProps ) public void removeConfiguration( ServiceReference<ManagedServiceFactory> reference, final ConfigurationImpl config )
0
return new PredicatedQueue<>(Queue, predicate);
1
* public class HdfsFileSystemConfigBuilder extends FileSystemConfigBuilder { private static final HdfsFileSystemConfigBuilder BUILDER = new HdfsFileSystemConfigBuilder(); /** * @return HdfsFileSystemConfigBuilder instance */ public static HdfsFileSystemConfigBuilder getInstance() { return BUILDER; } /** * @return HDFSFileSystem */ @Override protected Class<? extends FileSystem> getConfigClass() { return HdfsFileSystem.class; }
0
if ( metaData != null ) {
0
import java.util.Set; import java.util.concurrent.CompletableFuture;
0
* @see DefaultTcpipForwarder2 return new DefaultTcpipForwarder2( session );
0
private static boolean useC14N11 = ((Boolean) AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return new Boolean(Boolean.getBoolean ("com.sun.org.apache.xml.internal.security.useC14N11")); } })).booleanValue();
0
* or more contributor license agreements. See the NOTICE file * regarding copyright ownership. The ASF licenses this file * with the License. You may obtain a copy of the License at * KIND, either express or implied. See the License for the
0
package org.apache.beam.learning.katas.commontransforms.filter.pardo;
0
* @see ScpHelper#SCP_COMMAND_PREFIX
0
import org.apache.accumulo.server.replication.ReplicationTable; private BatchWriter writer; if (null == writer) { writer = conn.createBatchWriter(ReplicationTable.NAME, new BatchWriterConfig()); } writer = null; writer = null; writer.addMutation(m); writer.flush();
0
/* * Copyright (C) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.google.cloud.dataflow.sdk.transforms; import com.google.cloud.dataflow.sdk.Pipeline; import com.google.cloud.dataflow.sdk.testing.DataflowAssert; import com.google.cloud.dataflow.sdk.testing.TestPipeline; import com.google.cloud.dataflow.sdk.values.PCollection; import com.google.cloud.dataflow.sdk.values.TypeDescriptor; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; import java.io.Serializable; /** * Java 8 tests for {@link MapElements}. */ @RunWith(JUnit4.class) public class MapElementsJava8Test implements Serializable { /** * Basic test of {@link MapElements} with a lambda (which is instantiated as a * {@link SerializableFunction}). */ @Test public void testMapBasic() throws Exception { Pipeline pipeline = TestPipeline.create(); PCollection<Integer> output = pipeline .apply(Create.of(1, 2, 3)) .apply(MapElements // Note that the type annotation is required (for Java, not for Dataflow) .via((Integer i) -> i * 2) .withOutputType(new TypeDescriptor<Integer>() {})); DataflowAssert.that(output).containsInAnyOrder(6, 2, 4); pipeline.run(); } }
0
import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; Stream<String> types = Arrays.stream(PropertyType.values()).map(v -> v.name()); List<String> typesTested = Arrays.stream(this.getClass().getMethods()).map(m -> m.getName()).filter(m -> m.startsWith("testType")).map(m -> m.substring(8)) .collect(Collectors.toList()); types = types.map(t -> { assertTrue(PropertyType.class.getSimpleName() + "." + t + " does not have a test.", typesTested.contains(t)); return t; assertEquals(types.count(), typesTested.size());
0
/** public Collection<BundleCapability> findProviders(final Requirement requirement) { return m_felix.findProviders(requirement);
0
public final class ClassConverter implements Converter {
0
* @version $Id$
0