Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
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.apache.ambari.server.api.predicate.operators; import org.apache.ambari.server.controller.predicate.GreaterPredicate; import org.junit.Test; import static org.junit.Assert.*; /** * GREATER operator test. */ public class GreaterOperatorTest { @Test public void testGetName() { assertEquals("GreaterOperator", new GreaterOperator().getName()); } @Test public void testToPredicate() { assertEquals(new GreaterPredicate<String>("1", "2"), new GreaterOperator().toPredicate("1", "2")); } @Test public void testGetType() { assertSame(Operator.TYPE.GREATER, new GreaterOperator().getType()); } @Test public void testGetBasePrecedence() { assertEquals(-1, new GreaterOperator().getBasePrecedence()); } @Test public void testGetPrecedence() { assertEquals(-1, new GreaterOperator().getPrecedence()); } }
0
* or an {@link BasicManagedEntity entity}
0
dict.put("instance.name", instance.getAttribute("name"));
0
private final Map<String, String> blockContexts; public BlockContextURLStreamHandler(Map<String, String> blockContexts) { @Override
0
public class FtpFileNameParser extends HostFileNameParser { public FtpFileNameParser() { public static FileNameParser getInstance() {
1
public abstract class AbstractCheckDigitTest extends TestCase {
0
@Test public void testAbortHolding() { UnitOfWork unitOfWork = EasyMock.createMock(UnitOfWork.class); ActionDBAccessor db = EasyMock.createMock(ActionDBAccessor.class); ActionQueue aq = new ActionQueue(); Clusters fsm = EasyMock.createMock(Clusters.class); Configuration conf = new Configuration(new Properties()); db.abortHostRole("h1", -1L, -1L, "AMBARI_SERVER_ACTION"); EasyMock.expectLastCall(); EasyMock.replay(db); ActionScheduler scheduler = new ActionScheduler(100, 50, db, aq, fsm, 3, new HostsMap((String) null), unitOfWork, null, conf); HostRoleCommand hrc1 = new HostRoleCommand("h1", Role.NAMENODE, null, RoleCommand.EXECUTE); hrc1.setStatus(HostRoleStatus.COMPLETED); HostRoleCommand hrc3 = new HostRoleCommand("h1", Role.AMBARI_SERVER_ACTION, null, RoleCommand.CUSTOM_COMMAND); hrc3.setStatus(HostRoleStatus.HOLDING); HostRoleCommand hrc4 = new HostRoleCommand("h1", Role.FLUME_HANDLER, null, RoleCommand.EXECUTE); hrc4.setStatus(HostRoleStatus.PENDING); List<HostRoleCommand> hostRoleCommands = Arrays.asList(hrc1, hrc3, hrc4); scheduler.cancelHostRoleCommands(hostRoleCommands, "foo"); EasyMock.verify(db); }
0
/* ==================================================================== * Copyright (c) 2003-2004 The Apache Software Foundation. All rights * @version $Revision: 1.2 $ $Date: 2004/01/14 21:43:08 $
0
} catch (final UnsupportedCharsetException ex) {
0
/** * 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.aurora.common.args.constraints; import java.lang.annotation.Annotation; import org.apache.aurora.common.args.Verifier; import org.apache.aurora.common.args.VerifierFor; import static com.google.common.base.Preconditions.checkArgument; /** * Verifier to ensure that a number is non-negative. * * @author William Farner */ @VerifierFor(NotNegative.class) public class NotNegativeNumberVerifier implements Verifier<Number> { @Override public void verify(Number number, Annotation annotation) { checkArgument(number.doubleValue() >= 0, "Value must be non-negative."); } @Override public String toString(Class<? extends Number> argType, Annotation annotation) { return "must be >= 0"; } }
0
@Override @Override @Override @Override @Override @Override @Override @Override @Override @Override
0
package org.apache.http.nio.impl; import org.apache.http.nio.impl.InputBuffer; import org.apache.http.nio.impl.OutputBuffer;
0
assertEquals(propertyDefinitions.size(), 3);
0
public void add(HostsType hostsType, String service, boolean forUpgrade, boolean clientOnly, ProcessingComponent pc) {
0
c.tableOperations().addSplits(table, new TreeSet<>(Lists.transform(Arrays.asList(splits), Text::new)));
0
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.MoreObjects;
0
// Constants used to make sure assignment logging isn't excessive in quantity or size private static final String ASSIGNMENT_BUFFER_SEPARATOR = ", "; private static final int ASSINGMENT_BUFFER_MAX_LENGTH = 4096; final StringBuilder builder = new StringBuilder(64); if (builder.length() > 0) { builder.append(ASSIGNMENT_BUFFER_SEPARATOR); } builder.append(assignment); // Don't let the log message get too gigantic if (builder.length() > ASSINGMENT_BUFFER_MAX_LENGTH) { builder.append("]"); Master.log.debug(store.name() + " assigning tablets: [" + builder.toString()); builder.setLength(0); } if (builder.length() > 0) { // Make sure to log any leftover assignments builder.append("]"); Master.log.debug(store.name() + " assigning tablets: [" + builder.toString()); }
0
import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly; shell = new Shell(new ConsoleReader(input, output));
0
/* * Copyright 2016-2018 Seznam.cz, a.s.
0
private class TimersImpl implements Timers {
0
if (value > 0.0) { metricCount++; }
0
import com.google.common.annotations.VisibleForTesting; @VisibleForTesting protected DataflowPipelineRunner(DataflowPipelineOptions options) { transform instanceof GroupByKey ? ((GroupByKey<?, ?>) transform).updateWindowingStrategy(pc.getWindowingStrategy()) : pc.getWindowingStrategy(), .setCoder(coder).setIsBoundedInternal(IsBounded.BOUNDED);
0
import org.apache.accumulo.core.client.security.tokens.PasswordToken;
1
for (byte b : bytes) { out.write(b);
0
* @version CVS $Id: ContextHelper.java,v 1.2 2003/05/23 12:14:04 cziegeler Exp $ public static final String CONTEXT_REQUEST_OBJECT = CONTEXT_OBJECT_MODEL + '.' + ObjectModelHelper.REQUEST_OBJECT; public static final String CONTEXT_RESPONSE_OBJECT = CONTEXT_OBJECT_MODEL + '.' + ObjectModelHelper.RESPONSE_OBJECT;
0
import org.apache.accumulo.core.client.BatchWriterConfig; BatchWriter bw = c.createBatchWriter(Constants.METADATA_TABLE_NAME, new BatchWriterConfig()); BatchWriter bw = connector.createBatchWriter("!METADATA", new BatchWriterConfig());
0
traitPredicate = SearchPredicateUtil.getNotEmptyPredicateGenerator().generatePredicate(Constants.TRAIT_NAMES_PROPERTY_KEY, null, List.class);
0
* * private static final String SEPARATOR = ":"; StringTokenizer tokenizer = new StringTokenizer(value.trim(), SEPARATOR); StringBuffer constructedRgbString = new StringBuffer(); if (j > 0) { constructedRgbString.append(SEPARATOR); } constructedRgbString.append( StringUtils.leftPad(Integer.toHexString(_components[j]), 4, '0').toUpperCase()); rgbstring = constructedRgbString.toString();
0
.setIntParameter(CoreConnectionPNames.MIN_CHUNK_LIMIT, 1024) new DefaultHttpResponseFactory(), reqistry, params);
0
import org.apache.cocoon.forms.event.CreateEvent; import org.apache.cocoon.forms.event.CreateListener; import org.apache.cocoon.forms.event.WidgetEventMulticaster; * @version $Id: AbstractWidgetDefinition.java,v 1.7 2004/06/15 07:33:44 sylvain Exp $ protected CreateListener createListener; protected void addCreateListener(CreateListener listener) { this.createListener = WidgetEventMulticaster.add(this.createListener, listener); } public void fireCreateEvent(CreateEvent event) { if (this.createListener != null) { this.createListener.widgetCreated(event); } }
0
* implementation of {@link JXPathContext} also globally caches some of the * To acquire a CompiledExpression, call {@link JXPathContext#compile * the path by invoking an {@link AbstractFactory}, which should first be * installed on the context by calling {@link JXPathContext#setFactory}. * the path by invoking an {@link AbstractFactory}, which should first be * installed on the context by calling {@link JXPathContext#setFactory}.
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
/** * 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.view.hive.resources.jobs; import org.apache.commons.beanutils.BeanUtils; import java.lang.reflect.InvocationTargetException; import java.util.Map; public class FileResourceShort { public FileResourceShort() {} public FileResourceShort(Map<String, Object> stringObjectMap) throws InvocationTargetException, IllegalAccessException { BeanUtils.populate(this, stringObjectMap); } private Integer id; private String path; public FileResourceShort(Integer id, String path) { this.id = id; this.path = path; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getPath() { return path; } public void setPath(String path) { this.path = path; } }
0
public static <ElemT, ViewT> CreateDataflowView<ElemT, ViewT> forBatch(PCollectionView<ViewT> view) { return new CreateDataflowView<>(view, false); } public static <ElemT, ViewT> CreateDataflowView<ElemT, ViewT> forStreaming(PCollectionView<ViewT> view) { return new CreateDataflowView<>(view, true); private final boolean streaming; private CreateDataflowView(PCollectionView<ViewT> view, boolean streaming) { this.streaming = streaming; if (streaming) { return PCollection.createPrimitiveOutputInternal( input.getPipeline(), input.getWindowingStrategy(), input.isBounded(), input.getCoder()); } return (PCollection) view.getPCollection();
0
* <li>{@link org.apache.http.params.CoreConnectionPNames#MAX_LINE_LENGTH}</li>
0
* @author <a href="mailto:[email protected]">Apache Felix Project</a> }
0
package aQute.bnd.osgi; import aQute.bnd.header.*;
0
* * * * * * *
0
import java.nio.charset.Charset; private static final Charset utf8 = Charset.forName("UTF8"); return ("" + size + "," + numEntries + "," + time).getBytes(utf8); return ("" + size + "," + numEntries).getBytes(utf8);
0
EncodingUtils.getBytes(tmp.toString(), charset), false);
0
* Enumeration of the supported versions of Gremlin.
1
private static final String SHELL_DESCRIPTION = "Shell - Apache Accumulo Interactive Shell";
0
@Override public void visit(State state, Properties props) throws Exception { String indexTableName = (String) state.get("indexTableName"); int numPartitions = (Integer) state.get("numPartitions"); Random rand = (Random) state.get("rand"); SortedSet<Text> splitSet = ShardFixture.genSplits(numPartitions, rand.nextInt(numPartitions) + 1, "%06x"); log.debug("adding splits " + indexTableName); state.getConnector().tableOperations().addSplits(indexTableName, splitSet); }
1
import org.apache.ambari.logsearch.common.LogSearchContext; import org.apache.ambari.logsearch.web.model.User; LogSearchContext context = new LogSearchContext(); User user = new User(); user.setUsername("myUserId"); context.setUser(user); LogSearchContext.setContext(context);
0
* Copyright (c) OSGi Alliance (2000, 2013). All Rights Reserved. * @author $Id: c2d45ff158a6a19ff7bc155af3ac9941cb6a89d6 $ @Override @Override @Override @Override @Override * Called by {@link PackagePermission#implies(Permission)}. This method is * only called on a requested permission which cannot have a filter set. AccessController.doPrivileged(new PrivilegedAction<Void>() { public Void run() { @Override @Override @Override @SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
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: NotifyingBuilder.java,v 1.2 2004/03/05 13:02:49 bdelacretaz Exp $
1
private static org.apache.bcel.util.Repository repository = SyntheticRepository.getInstance(); return repository; repository = rep; return repository.loadClass(class_name); return repository.loadClass(clazz); ClassPath path = repository.getClassPath(); repository.clear(); JavaClass old = repository.findClass(clazz.getClassName()); repository.storeClass(clazz); repository.removeClass(repository.findClass(clazz)); repository.removeClass(clazz);
0
* @version $Revision: 1.5 $ $Date: 2004/06/03 22:02:13 $ /** Serialization version */ private static final long serialVersionUID = -8304417378626543635L;
0
.addNullableField("f_string", FieldType.STRING) .addField(fieldName, fieldType.type())
0
import org.apache.accumulo.server.tabletserver.compaction.CompactionStrategy; import org.apache.accumulo.server.tabletserver.compaction.CompactionStrategy.Writer; import org.apache.accumulo.server.tabletserver.compaction.DefaultWriter; import org.apache.accumulo.server.tabletserver.compaction.MajorCompactionReason; private Writer writer; TableConfiguration acuTableConf, KeyExtent extent, CompactionEnv env, List<IteratorSetting> iterators, MajorCompactionReason reason, CompactionStrategy.Writer writer) { this.writer = writer; this(conf, fs, files, imm, outputFile, propogateDeletes, acuTableConf, extent, env, new ArrayList<IteratorSetting>(), null, new DefaultWriter()); List<FileSKVWriter> writers = Collections.singletonList(mfw); writer.write(itr.getTopKey(), itr.getTopValue(), writers);
0
private final String id; public PoolEntry(final String id, final T route, final C conn, final long timeToLive, final TimeUnit tunit) { this.id = id; public PoolEntry(final String id, final T route, final C conn) { this(id, route, conn, 0, TimeUnit.MILLISECONDS); public String getId() {
0
* @version CVS $Id: LinkService.java,v 1.4 2004/02/28 17:26:28 cziegeler Exp $ * @param event The event to add (null is also allowed for convenience)
0
import org.apache.atlas.AtlasServiceException; import org.testng.Assert; @Test(dependsOnMethods = "testConsumerConsumesNewMessageWithAutoCommitDisabled") public void testConsumerRemainsAtSameMessageWithAutoCommitEnabled() throws Exception { try { hookConsumer.handleMessage(consumer.next()); } catch (AtlasServiceException e) { Assert.fail("Consumer failed with exception ", e); } catch (AtlasException e) { Assert.fail("Consumer failed with exception ", e); }
0
* Attempts to modify it will result in an UnsupportedOperationException. * * * @SuppressWarnings("unchecked") // (1) should only fail if input stream is incorrect *
0
if (null != hostsType && !hostsType.getHosts().contains(hostName)) {
0
public String repair() {
0
/** {{@inheritDoc}}. */ /** {{@inheritDoc}}. */ /** {{@inheritDoc}}. */ /** {{@inheritDoc}}. */ /** {{@inheritDoc}}. */
0
public static final String ENC_BINARY = "binary";
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
throw new UnsupportedOperationException( String.format("%s is not supported yet!", relNode.getClass().toString())); throw new UnsupportedOperationException("Operator: " + opName + " is not supported yet!"); throw new UnsupportedOperationException( String.format("%s is not supported yet!", rexNode.getClass().toString()));
0
package test.switches; /** * An enum. */ public enum Color { RED, GREEN, BLUE }
0
import com.google.common.base.Splitter; import com.google.common.collect.Lists; combiners = new ColumnSet(Lists.newArrayList(Splitter.on(",").split(encodedColumns))); for (String columns : Splitter.on(",").split(encodedColumns)) {
0
if (shutdownExecutor && (executor != null) && (!executor.isShutdown())) { try { executor.shutdownNow(); } finally { executor = null; }
0
assertEquals(KeeperException.Code.NONODE, e.code()); assertEquals(KeeperException.Code.NONODE, e.code()); assertEquals(KeeperException.Code.NONODE, e.code()); assertEquals(KeeperException.Code.NONODE, e.code()); assertEquals(KeeperException.Code.NONODE, e.code()); assertEquals(KeeperException.Code.NONODE, e.code()); assertEquals(KeeperException.Code.NONODE, e.code()); assertEquals(KeeperException.Code.NONODE, e.code()); assertEquals(KeeperException.Code.NONODE, e.code()); assertEquals(KeeperException.Code.NONODE, e.code());
0
* * * * * * * * * * * * * * * * * * * * *
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
localServer = null;
0
Copyright 2001,2003 The Apache Software Foundation public static final return fontBridge.createFont(ctx, fontElement, textElement, complex = ret ? Boolean.TRUE : Boolean.FALSE;
0
package org.apache.batik.ext.awt.image.codec.util;
0
* $Header$ * @version $Revision$ $Date$
0
import java.util.Collections; import java.util.Map; final long startTime = Time.currentElapsedTime(); ServerMetrics.getMetrics().OM_PROPOSAL_PROCESS_TIME.add(Time.currentElapsedTime() - startTime); final long startTime = Time.currentElapsedTime(); ServerMetrics.getMetrics().OM_COMMIT_PROCESS_TIME.add(Time.currentElapsedTime() - startTime); public Iterable<Map<String, Object>> getSyncedObserversInfo() { if (om != null && om.getNumActiveObservers() > 0) { return om.getActiveObservers(); } return Collections.emptySet(); } public void resetObserverConnectionStats() { if (om != null && om.getNumActiveObservers() > 0) { om.resetObserverConnectionStats(); } }
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
* 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
/** * 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.hadoop.yarn.server.applicationhistoryservice.metrics.timeline; import org.junit.Test; import static org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.Function.fromMetricName; import static org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.Function.ReadFunction.AVG; import static org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.Function.PostProcessingFunction.RATE; import static org.assertj.core.api.Assertions.assertThat; public class FunctionTest { @Test public void testCreation() throws Exception { Function f = fromMetricName("Metric._avg"); assertThat(f).isEqualTo(new Function(AVG, null)); f = fromMetricName("Metric._rate._avg"); assertThat(f).isEqualTo(new Function(AVG, RATE)); f = fromMetricName("bytes_in"); assertThat(f).isEqualTo(Function.DEFAULT_VALUE_FUNCTION); } @Test(expected = Function.FunctionFormatException.class) public void testNotAFunction() throws Exception { Function f = fromMetricName("bytes._not._afunction"); } }
0
*/ final List<InstructionHandle> Q = new ArrayList<>(); } // default case: Fall through.
0
/** * serialVersionUID format is YYYYMMDD for the data of the last binary change. */ private static final long serialVersionUID = 20101208L;
0
// Note that we don't check this if the submit widget was already set, as it can cause problems // if the user triggers submit with an input (which sets 'forms_submit_id'), then clicks back // and submits using a regular submit button. if (getSubmitWidget() == null) { String submitId = formContext.getRequest().getParameter(SUBMIT_ID_PARAMETER); if (!StringUtils.isEmpty(submitId)) { // if the form has an ID, it is used as part of the submitId too and must be removed if(!StringUtils.isEmpty(this.getId())) { submitId = submitId.substring(submitId.indexOf('.')+1); } Widget submit = this.lookupWidget(submitId.replace('.', '/')); if (submit == null) { throw new IllegalArgumentException("Invalid submit id (no such widget): " + submitId); } setSubmitWidget(submit);
0
public abstract class AbstractWindowing<T, KEY, W extends Window<KEY>> protected W addNewWindow(W window, Triggering triggering, UnaryFunction<Window<?>, Void> evict) {
0
this.serverParams); this.clientParams); this.serverParams); this.clientParams); this.serverParams); this.clientParams); this.serverParams); this.clientParams); this.serverParams); this.clientParams); this.serverParams); this.clientParams); this.serverParams); this.clientParams); this.serverParams); this.clientParams);
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/test/org/apache/commons/jxpath/ri/model/dynabeans/DynaBeanModelTest.java,v 1.4 2003/10/09 21:31:44 rdonkin Exp $ * $Revision: 1.4 $ * $Date: 2003/10/09 21:31:44 $ * any, must include the following acknowledgement: * Alternately, this acknowledgement may appear in the software itself, * if and wherever such third-party acknowledgements normally appear. * permission of the Apache Software Foundation. * @version $Revision: 1.4 $ $Date: 2003/10/09 21:31:44 $
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList; import org.apache.beam.vendor.guava.v20_0.com.google.common.net.HostAndPort; import org.apache.beam.vendor.guava.v20_0.com.google.common.util.concurrent.Uninterruptibles;
0
CoderProperties.coderConsistentWithEquals( Coder.INSTANCE, CoderProperties.coderDecodeEncodeEqual( Coder.INSTANCE, CoderProperties.structuralValueDecodeEncodeEqual( Coder.INSTANCE,
1
public static final String UPGRADE_CHECK_FAILED_DETAIL_PROPERTY_ID = PropertyHelper.getPropertyId("UpgradeChecks", "failed_detail"); UPGRADE_CHECK_FAILED_DETAIL_PROPERTY_ID, setResourceProperty(resource, UPGRADE_CHECK_FAILED_DETAIL_PROPERTY_ID,prerequisiteCheck.getFailedDetail(), requestedIds);
0
* Copyright (c) OSGi Alliance (2010, 2013). All Rights Reserved. import org.osgi.annotation.versioning.ProviderType; * @author $Id: 367499c4b37683c52e622f479242a9caf7e59b0f $ @ProviderType * given namespace, the list contains the capabilities in the order * the capabilities were specified in the manifests of the * given namespace, the list contains the requirements in the order * the requirements were specified in the manifests of the * This method may return different results if this bundle wiring * establishes additional wires to more requirements. For example, * dynamically importing a package will establish a new wire to the * dynamically imported package. * of this bundle wiring followed by dynamically established wires, * if any, in the order they were established. There is no ordering * defined between requirements in different namespaces. * the result.</li> * must not cause new wires for dynamic imports to be established.</li> * capabilities in the order the capabilities were specified in the * namespace. For a given namespace, the list contains the * requirements in the order the requirements were specified in the * manifests of the {@link #getResource() resource} and the attached * fragment resources of this wiring. There is no ordering defined * between requirements in different namespaces.
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/ConvertUtils.java,v 1.11 2002/12/21 19:53:24 craigmcc Exp $ * $Revision: 1.11 $ * $Date: 2002/12/21 19:53:24 $ * @version $Revision: 1.11 $ $Date: 2002/12/21 19:53:24 $ * returned. The registered {@link Converter} for the * <code>java.lang.String</code> class will be used, which allows * applications to customize Object->String conversions (the default * implementation simply uses toString()). if (value == null) { } else { Converter converter = (Converter) converters.get(String.class); return ((String) converter.convert(String.class, value)); } Converter converter = (Converter) converters.get(String.class); return ((String) converter.convert(String.class, value));
0
String edgeLabel = graphHelper.getEdgeLabel(typedInstance, attributeInfo); Edge currentEdge = graphHelper.getEdgeForLabel(instanceVertex, edgeLabel);
1
private final int instance; public TaskRescheduled(String role, String job, int instance) { this.instance = instance; public int getInstance() { return instance; && Objects.equal(instance, other.instance); return Objects.hashCode(role, job, instance);
0
protected static final Map<String,String> commandMap = new HashMap<String,String>( ); StringBuffer sb = new StringBuffer(); sb.append(quotaPath); sb.append("/" + splits[i]); quotaPath = sb.toString();
0
String dDescription = m_configMap.getDecription();
0
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import com.google.common.collect.Lists; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; @Rule public TemporaryFolder folder = new TemporaryFolder(); FsSpillingListStorage<String> storage = new FsSpillingListStorage<>(new JavaSerializationFactory(), spillFiles, 3); FsSpillingListStorage<String> storage = new FsSpillingListStorage<>(new JavaSerializationFactory(), spillFiles, 3); assertEquals(Arrays.asList("one", "two", "three", "four"), Lists.newArrayList(elements)); assertEquals(Arrays.asList("one", "two", "three", "four"), Lists.newArrayList(elements)); List<String> input = Arrays.asList("one", "two", "three", "four", "five", "six", "seven", "eight"); if (i + 2 < input.size()) { List<String> input = Arrays.asList("one", "two", "three", "four", "five", "six", "seven", "eight"); assertEquals( input, StreamSupport.stream(storage.get().spliterator(), false).collect(Collectors.toList())); }
0
public class ByteArrayEntity extends AbstractHttpEntity implements Cloneable { public Object clone() throws CloneNotSupportedException { return super.clone(); }
0
.canonical();
0
for(int i = 0; i < properties.length ; i++) { }
0
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at
0
import java.util.BitSet; import java.util.Collections; import java.util.EnumMap; import java.util.EnumSet; import java.util.HashMap; import java.util.Map; import org.apache.thrift.EncodingUtils; import org.apache.thrift.protocol.TTupleProtocol; private static final long serialVersionUID = -4659975753252858243l;
0
package org.apache.beam.runners.core.construction; * Tests for {@link ElementAndRestrictionCoder}.
0
@Override @Override @Override @Override @Override @Override @Override public byte[] getBuffer() { return seekableInput.getBuffer(); } @Override @Override /** * The byte array returned by this method is only for read optimizations, it should not be modified. */ @Override public byte[] getBuffer() { throw new UnsupportedOperationException(); }
0
static org.slf4j.Logger LOG = LOG.warn("Test testContentRemoved skipped as necessary algorithms not available"); LOG.warn("Test testMultipleKeyInfoElements skipped as necessary algorithms not available");
0
file.println("<H4><A NAME=\"" + anchor + "\">" + attr_count + " " + Constants.getAttributeName(tag)
0
for (int i = 0; (i < modes.length) && (modes[i] != PtyMode.TTY_OP_END);) { * According to https://tools.ietf.org/html/rfc4254#section-8: * Opcodes 160 to 255 are not yet defined, and cause parsing to stop if ((opcode >= 160) && (opcode <= 255)) { log.warn("handlePtyReq({}) unknown reserved pty opcode value: {}", this, opcode); PtyMode mode = PtyMode.fromInt(opcode); if (mode == null) { log.warn("handlePtyReq({}) unsupported pty opcode value: {}={}", this, opcode, val); } else { ptyModes.put(mode, val); }
0