Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
import org.apache.aurora.gen.SlaPolicy; import org.apache.aurora.scheduler.maintenance.MaintenanceController; static final String SLA_DRAIN_HOSTS = STAT_PREFIX + "slaDrainHosts"; @VisibleForTesting private final AtomicLong slaDrainHostsCounter; this.slaDrainHostsCounter = statsProvider.makeCounter(SLA_DRAIN_HOSTS); public Response slaDrainHosts(Hosts hosts, SlaPolicy defaultSlaPolicy, long timeoutSecs) { slaDrainHostsCounter.addAndGet(hosts.getHostNamesSize()); return ok(Result.drainHostsResult( new DrainHostsResult().setStatuses(IHostStatus.toBuildersSet( maintenance.slaDrain(hosts.getHostNames(), defaultSlaPolicy, timeoutSecs))))); } @Override request = IJobUpdateRequest.build( new JobUpdateRequest(mutableRequest) .setTaskConfig(configurationManager.validateAndPopulate( ITaskConfig.build(mutableRequest.getTaskConfig()), mutableRequest.getInstanceCount()) .newBuilder()));
0
import java.util.ListIterator; FTPFileList ffl = FTPFileList.create(listStream, this); /** * Implement hook provided for those implementers (such as * VMSVersioningFTPEntryParser, and possibly others) which return * multiple files with the same name to remove the duplicates by * defining a no-op method which simply returns the original * FTPFileList. This method should not be overridden except in * parsers that really have to remove duplicates. * * @param original Original list * * @return Original list */ public FTPFileList removeDuplicates(FTPFileList original) { return original; } /** * return a ListIterator to the internal Vector of lines of <code>list</code>, * used in purging duplicates. * * This method could go away if FTPFileEntryParser were moved down into the * parser package. * * @return a ListIterator to the internal Vector of lines, used in purging * duplicates. */ protected ListIterator getInternalIteratorForFtpFileList(FTPFileList list) { return list.getInternalIterator(); }
0
/** * Copyright 2016 Seznam a.s. * * 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 handler description. */ private ProvidedServiceHandlerDescription m_description; // Initialize the description. m_description = new ProvidedServiceHandlerDescription(this, m_providedServices); return m_description;
0
/* * $Header: /cvshome/build/ee.foundation/src/java/security/KeyException.java,v 1.6 2006/03/14 01:20:27 hargrave Exp $ * * (C) Copyright 2001 Sun Microsystems, Inc. * Copyright (c) OSGi Alliance (2001, 2005). All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * 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 java.security; public class KeyException extends java.security.GeneralSecurityException { public KeyException() { } public KeyException(java.lang.String var0) { } }
0
import java.util.Set; private static final String THERMOS_CONFIG = "config"; .setThermosConfig(THERMOS_CONFIG.getBytes()) .setLimit(1))))))) assertEquals( ConfigurationManager.applyDefaultsIfUnset(MINIMUM_VIABLE_TASK), unclean.getTaskConfig()); public void testTaskConfigBackfillEqualTasks() { // TODO(Sathya): Remove this after deploying MESOS-3048. TwitterTaskInfo commonTask = MINIMUM_VIABLE_TASK.deepCopy() .setThermosConfig(THERMOS_CONFIG.getBytes()); Set<TwitterTaskInfo> tasks = ImmutableSet.of(commonTask.setShardId(0), commonTask.deepCopy().setShardId(1)); JobConfiguration copy = UNSANITIZED_JOB_CONFIGURATION.deepCopy() .setTaskConfigs(tasks); ConfigurationManager.applyDefaultsIfUnset(copy); assertTrue(copy.isSetTaskConfig()); assertEquals(ConfigurationManager.applyDefaultsIfUnset(commonTask), copy.getTaskConfig()); assertEquals(2, copy.getShardCount()); } @Test public void testTaskConfigBackfillUniqueTasks() { // TODO(Sathya): Remove this after deploying MESOS-3048. TwitterTaskInfo commonTask = MINIMUM_VIABLE_TASK.deepCopy() .setThermosConfig(THERMOS_CONFIG.getBytes()) .setShardId(0); TwitterTaskInfo uniqueTask = MINIMUM_VIABLE_TASK.deepCopy() .setThermosConfig("new config".getBytes()) .setShardId(1); JobConfiguration copy = UNSANITIZED_JOB_CONFIGURATION.deepCopy() .setTaskConfigs(ImmutableSet.of(commonTask, uniqueTask)); ConfigurationManager.applyDefaultsIfUnset(copy); assertFalse(copy.isSetTaskConfig()); assertEquals(0, copy.getShardCount()); } @Test
0
import org.apache.accumulo.core.util.shell.commands.ExportTableCommand; import org.apache.accumulo.core.util.shell.commands.ImportTableCommand; new DUCommand(), new ExportTableCommand(), new ImportTableCommand(), new OfflineCommand(), new OnlineCommand(), new RenameTableCommand(), new TablesCommand()};
0
InvokeContext errorContext = new InvokeContext(context, this.manager);
0
final String tarFilePath = AbstractVfsTestCase.getTestResource("nested.tar").getAbsolutePath();
0
* A managed connection operates like any other connection when no global
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
@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 * http://www.apache.org/licenses/LICENSE-2.0
0
import com.google.common.collect.Iterators; return Iterators.size(((Iterable<?>) s).iterator());
0
final String methodName = method.getName(); final int col = ((Integer) args[0]).intValue() - 1; final int col = ((Integer) args[0]).intValue() - 1;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/test/org/apache/commons/validator/RequiredIfTest.java,v 1.12 2004/01/11 23:30:21 dgraham Exp $ * $Revision: 1.12 $ * $Date: 2004/01/11 23:30:21 $ * Copyright (c) 2001-2004 The Apache Software Foundation. All rights * Performs Validation Test. */ */ */ */ */ */ */ */ */
0
tester.bufferTag(firstWindow), // Still holding the earliest element, waiting to fire tester.earliestElement(firstWindow)));
0
package org.apache.ambari.server; import java.util.Map; /** * ServiceComponent Interface for representing components of the various * products in the Hadoop eco-system such as NAMENODE, DATANODE for HDFS. */ public interface ServiceComponent { /** * @return Name of the ServiceComponent Instance */ public String getName(); /** * Get the ServiceComponentType for this instance * @return ServiceComponentType */ public ServiceComponentType getType(); /** * Get the Service to which this ServiceComponent belongs to * @return Service of which this ServiceComponent is part of */ public Service getService(); /** * Get the list of components that this ServiceComponent depends on * @return ServiceComponents mapped by their names */ public Map<String, ServiceComponent> getDependencies(); /** * Get the list of components that depend on this ServiceComponent * @return ServiceComponents mapped by their names */ public Map<String, ServiceComponent> getDependents(); }
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. */ * synchronized protected String getSpanKey(Map<String,String> data) {
0
return SPLITTABLE_PROCESS_URN;
0
for (String variationURL : variationURLs) { addVariationURL(variationURL);
0
* @version CVS $Id: UserHandler.java,v 1.9 2003/07/01 19:26:40 cziegeler Exp $ public UserHandler(HandlerConfiguration handler, AuthenticationContext context) { this.context = context; this.context.init(this);
0
import org.apache.felix.hc.api.FormattingResultLog;
0
import org.apache.ambari.logsearch.conf.SolrServiceLogPropsConfig; private SolrServiceLogPropsConfig solrServiceLogPropsConfig; public NodeListResponse getTreeExtension(ServiceLogSearchCriteria searchCriteria) { public NodeListResponse getHostListByComponent(ServiceLogSearchCriteria searchCriteria) { public NameValueDataListResponse getLogsLevelCount(ServiceLogSearchCriteria sc) { serviceLogsSolrDao.extractValuesFromBuckets(jsonFacetResponse, "x", "y", histogramData); public NodeListResponse getComponentListWithLevelCounts(ServiceLogSearchCriteria searchCriteria) { return convertObjToString(serviceLogsSolrDao.schemaFieldNameMap);
0
import org.apache.parquet.hadoop.metadata.CompressionCodecName; * <p>By default, {@link ParquetIO.Sink} produces output files that are compressed using the {@link * org.apache.parquet.format.CompressionCodec#SNAPPY}. This default can be changed or overridden * using {@link ParquetIO.Sink#withCompressionCodec(CompressionCodecName)}. * * .via(ParquetIO.sink(SCHEMA) * .withCompression(CompressionCodecName.SNAPPY)) abstract Builder toBuilder(); return toBuilder().setFilepattern(filepattern).build(); return new AutoValue_ParquetIO_Sink.Builder() .setJsonSchema(schema.toString()) .setCompressionCodec(CompressionCodecName.SNAPPY) .build(); abstract CompressionCodecName getCompressionCodec(); abstract Builder toBuilder(); abstract Builder setCompressionCodec(CompressionCodecName compressionCodec); /** Specifies compression codec. By default, CompressionCodecName.SNAPPY. */ public Sink withCompressionCodec(CompressionCodecName compressionCodecName) { return toBuilder().setCompressionCodec(compressionCodecName).build(); } .withCompressionCodec(getCompressionCodec())
0
/* * $Header: /cvshome/build/ee.foundation/src/java/lang/ref/PhantomReference.java,v 1.6 2006/03/14 01:20:26 hargrave Exp $ * * (C) Copyright 2001 Sun Microsystems, Inc. * Copyright (c) OSGi Alliance (2001, 2005). All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * 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 java.lang.ref; public class PhantomReference extends java.lang.ref.Reference { public java.lang.Object get() { return null; } public PhantomReference(java.lang.Object var0, java.lang.ref.ReferenceQueue var1) { } }
0
public final String toString() { default: throw new IllegalStateException("Type of ConstValue invalid: " + c);
0
package org.apache.felix.ipojo.test.scenarios.component.inner; public interface MyFilter { public String authenticate(); }
0
package org.apache.accumulo.core.iterators.filter; import java.util.Map; import org.apache.accumulo.core.data.Key; import org.apache.accumulo.core.data.Value; /** * @deprecated since 1.4 * @use accumulo.core.iterators.Filter **/ public interface Filter { public void init(Map<String, String> options); public boolean accept(Key k, Value v); }
1
@Deprecated
0
/** * This tests deprecated mapreduce code in core jar */ @Deprecated AccumuloOutputFormat.setZooKeeperInstance(job, ci.getInstanceName(), ci.getZooKeepers()); AccumuloInputFormat.setZooKeeperInstance(job, info.getInstanceName(), info.getZooKeepers()); AccumuloOutputFormat.setZooKeeperInstance(job, info.getInstanceName(), info.getZooKeepers());
0
import org.apache.http.util.CharArrayBuffer;
0
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkNotNull;
0
* @version $Revision: 1.5 $ public boolean isEqualsCheckable() { return false; } public String getCompatibilityVersion() { return "3.1"; } // public void testCreate() throws Exception { // Buffer buffer = BlockingBuffer.decorate(new UnboundedFifoBuffer()); // writeExternalFormToDisk((java.io.Serializable) buffer, "D:/dev/collections/data/test/BlockingBuffer.emptyCollection.version3.1.obj"); // buffer = BlockingBuffer.decorate(new UnboundedFifoBuffer()); // buffer.add("A"); // buffer.add("B"); // buffer.add("C"); // writeExternalFormToDisk((java.io.Serializable) buffer, "D:/dev/collections/data/test/BlockingBuffer.fullCollection.version3.1.obj"); // }
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.
1
import org.easymock.EasyMock; expect(factory.getServiceResourceProvider(EasyMock.<Set<String>>anyObject(), EasyMock.<Map<Resource.Type, String>>anyObject(), assertEquals(Collections.emptySet(), resource.getReadDirectives());
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/decorators/Attic/TestAll.java,v 1.7 2003/09/03 23:54:25 scolebourne Exp $ * @version $Revision: 1.7 $ $Date: 2003/09/03 23:54:25 $
0
* The second example uses the <code>FTPClient.listFiles()</code>
1
private StackMapEntry[] map; // Table of stack map entries // TODO could be final (setter unused) this.map = map; public final void setStackMap( StackMapEntry[] map ) { // TODO unused
0
/** * this is to avoid the jvm bug: * NullPointerException in Selector.open() * http://bugs.sun.com/view_bug.do?bug_id=6427854 */ try { Selector.open().close(); } catch(IOException ie) { LOG.error("Exception while opening a selector", ie); } try { if (bb != closeConn) { // We check if write interest here because if it is NOT set, // nothing is queued, so we can try to send the buffer right // away without waking up the selector if ((sk.interestOps() & SelectionKey.OP_WRITE) == 0) { try { sock.write(bb); } catch (IOException e) { // we are just doing best effort right now } } // if there is nothing left to send, we are done if (bb.remaining() == 0) { packetSent(); return; synchronized (factory) { sk.selector().wakeup(); if (LOG.isTraceEnabled()) { LOG.trace("Add a buffer to outgoingBuffers, sk " + sk + " is valid: " + sk.isValid()); } outgoingBuffers.add(bb); if (sk.isValid()) { sk.interestOps(sk.interestOps() | SelectionKey.OP_WRITE); } } catch(Exception e) { LOG.error("Unexpected Exception: ", e);
0
String clusterId = "1"; ExecutionCommand executionCommand = createMockExecutionCommand(clusterId, clusterName, commandParams); String clusterId = "1"; ExecutionCommand executionCommand = createMockExecutionCommand(clusterId, clusterName, commandParams); private ExecutionCommand createMockExecutionCommand(String clusterId, String clusterName, Map<String, String> commandParams) { expect(executionCommand.getClusterId()).andReturn(clusterId).anyTimes();
0
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
0
package org.apache.beam.examples.subprocess.configuration;
0
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at
0
String UNLIMITED_KEY_JCE_REQUIRED = "unlimited_key_jce_required";
0
return new OfBuilder("FullJoin").of(left, right);
0
public class Device {
0
* @deprecated (4.2) use {@link #NFileEntity(File, ContentType, boolean)} * @deprecated (4.2) use {@link #NFileEntity(File, ContentType)} * @deprecated (4.2) use {@link #close()}
0
List<String> errorMessages = new ArrayList<>();
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.felix.http.jetty.internal; import java.util.Dictionary; import org.apache.felix.http.base.internal.HttpServiceController; import org.osgi.framework.BundleContext; public class JettyServiceStarter { private final HttpServiceController controller; private final JettyService jetty; public JettyServiceStarter(final BundleContext context, final Dictionary<String, ?> properties) throws Exception { this.controller = new HttpServiceController(context); this.jetty = new JettyService(context, this.controller, properties); this.jetty.start(); } public void stop() throws Exception { this.jetty.stop(); this.controller.stop(); } public void updated(final Dictionary<String, ?> properties) throws Exception { this.jetty.updated(properties); } }
0
CommandSessionImpl session = (CommandSessionImpl) createSession(System.in, System.out, System.err);
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 (env.getAuthorizations().equals(AUTHS))
0
import static org.ops4j.pax.exam.CoreOptions.felix; systemPackages("org.apache.felix.karaf.jaas.boot;version=1.99"), equinox(), felix()
0
if (baseStr == null) return parseURL(urlStr); if (baseURL == null) return parseURL(urlStr);
0
protected static class Pair<L,R> { protected L left; protected R right; public Pair(L left, R right) { this.left = left; this.right = right; } }
0
Copyright 2001-2003 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */
0
/** Collection of tst utility classes. */
0
import org.apache.hc.core5.util.Args;
1
runTest(Map.of("executor", "E1"), "E1", "E1"); runTest(Map.of("single_executor", "E2"), "E2", dname); runTest(Map.of("multi_executor", "E3"), dname, "E3"); runTest(Map.of("executor", "E1", "single_executor", "E2"), "E2", "E1"); runTest(Map.of("executor", "E1", "multi_executor", "E3"), "E1", "E3"); runTest(Map.of("single_executor", "E2", "multi_executor", "E3"), "E2", "E3"); runTest(Map.of("executor", "E1", "single_executor", "E2", "multi_executor", "E3"), "E2", "E3"); runTest(Map.of("executor", "E1"), Map.of("scan_type", "quick"), "E1", "E1"); runTest(Map.of("executor", "E1", "executor.quick", "E2"), Map.of("scan_type", "quick"), "E2", "E2"); runTest(Map.of("executor", "E1", "executor.quick", "E2", "executor.slow", "E3"), Map.of("scan_type", "slow"), "E3", "E3");
0
private String stackName; private String stackVersion; public String getStackName() { return stackName; } public void setStackName(String stackName) { this.stackName = stackName; } public String getStackVersion() { return stackVersion; } public void setStackVersion(String stackVersion) { this.stackVersion = stackVersion; }
0
private static Logger LOG = Logger.getLogger(ExecutorHub.class.getName());
0
import org.apache.commons.logging.Log; import org.apache.commons.logging.impl.NoOpLog; /** Stores the logger.*/ private Log log; /** * Creates a new instance of <code>AbstractConfiguration</code>. */ protected AbstractConfiguration() { setLogger(null); } * Returns the logger used by this configuration object. * * @return the logger * @since 1.4 */ public Log getLogger() { return log; } /** * Allows to set the logger to be used by this configuration object. This * method makes it possible for clients to exactly control logging behavior. * Per default a logger is set that will ignore all log messages. Derived * classes that want to enable logging should call this method during their * initialization with the logger to be used. * * @param log the new logger * @since 1.4 */ public void setLogger(Log log) { this.log = (log != null) ? log : new NoOpLog(); } /**
0
if (!nextObjectSet && !setNextObject()) { throw new NoSuchElementException();
0
* Test {@link AlertDefinitionHash#isHashCached(String,String)}.
0
private static class MyWatcher implements Watcher {
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/test/org/apache/commons/jxpath/Attic/TestFunctions.java,v 1.2 2002/04/10 03:40:21 dmitri Exp $ * $Revision: 1.2 $ * $Date: 2002/04/10 03:40:21 $ * @version $Revision: 1.2 $ $Date: 2002/04/10 03:40:21 $ public TestFunctions(ExpressionContext context, String bar){ this.foo = ((Number)context.getContextNodePointer().getValue()).intValue(); this.bar = bar; } public static String path(ExpressionContext context){ return context.getContextNodePointer().asPath(); } public String instancePath(ExpressionContext context){ return context.getContextNodePointer().asPath(); } public String pathWithSuffix(ExpressionContext context, String suffix){ return context.getContextNodePointer().asPath() + suffix; } public String className(ExpressionContext context, ExpressionContext child){ return context.getContextNodePointer().asPath(); } /** * Returns true if the current node in the current context is a map */ public static boolean isMap(ExpressionContext context){ Pointer ptr = context.getContextNodePointer(); return ptr == null ? false : (ptr.getValue() instanceof Map); } /** * Returns the number of nodes in the context that is passed as * the first argument. */ public static int count(ExpressionContext context, Collection col){ return col.size(); }
0
/* * Copyright 1999-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.cocoon.portal.tools; /** * Represents a i18n Catalogue for a tool. * * @version $Id$ */ public class PortalToolCatalogue { private String id = ""; private String name = ""; private String location = ""; public String getId() { return id; } /** * @param id */ public void setId(String id) { this.id = id; } public String getLocation() { return location; } /** * @param location */ public void setLocation(String location) { this.location = location; } public String getName() { return name; } /** * @param name */ public void setName(String name) { this.name = name; } }
0
new LocalizableSupport(BUNDLE_CLASSNAME, Main.class.getClassLoader());
1
package aQute.bnd.osgi; import aQute.bnd.header.*;
0
import org.apache.beam.vendor.grpc.v1_13_1.io.grpc.inprocess.InProcessChannelBuilder; import org.apache.beam.vendor.grpc.v1_13_1.io.grpc.stub.StreamObserver;
0
final JavaRDD<SparkElement> input = (JavaRDD) context.getSingleInput(operator); JavaPairRDD<Integer, SparkElement> pairs = input.mapToPair( private static class TupleByPartition implements PairFunction<SparkElement, Integer, SparkElement> { public Tuple2<Integer, SparkElement> call(SparkElement el) {
0
public String usage() { return "jar <jar> [<main class>] args"; } @Override public String description() { return "Run Java <main class> in <jar> using Accumulo classpath"; }
0
* * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
0
import org.apache.commons.vfs.FileName; * @version $Revision: 1.3 $ $Date: 2003/02/12 02:05:19 $ super( scheme, hostName, port, userInfo, path ); /** Returns the default port for this file name. */ public String getDefaultPort() { return "21"; } /** * Factory method for creating name instances. */ protected FileName createName( final String path ) { return new FtpFileName( getScheme(), getHostName(), getPort(), getUserInfo(), userName, password, path ); }
0
public final ServiceManager serviceManager; public final Context context; public final Logger logger; public final RoleManager roleManager; public final LoggerManager loggerManager; private final ClassLoader classLoader; public ComponentEnvironment(ClassLoader classLoader, Logger logger, RoleManager roleManager, LoggerManager loggerManager, Context context, ServiceManager serviceManager) { // Find a class loader if (classLoader == null) { classLoader = Thread.currentThread().getContextClassLoader(); if (classLoader == null) { classLoader = this.getClass().getClassLoader(); } } this.classLoader = classLoader; this.logger = logger; this.roleManager = roleManager; this.loggerManager = loggerManager; this.context = context; this.serviceManager = serviceManager; } public Class loadClass(String name) throws ClassNotFoundException { return this.classLoader.loadClass(name); }
0
package org.apache.atlas.bridge.hivelineage.hook; import org.apache.atlas.bridge.hivelineage.hook.HiveLineage.CreateColumns; import org.apache.atlas.bridge.hivelineage.hook.HiveLineage.GroupBy; import org.apache.atlas.bridge.hivelineage.hook.HiveLineage.QueryColumns; import org.apache.atlas.bridge.hivelineage.hook.HiveLineage.SourceTables; import org.apache.atlas.bridge.hivelineage.hook.HiveLineage.WhereClause;
0
final HttpRoutedConnection conn = (HttpRoutedConnection) context.getAttribute( final HttpRoute route = conn.getRoute(); final AuthState authState = (AuthState) context.getAttribute(
0
package org.apache.http.nio.impl.reactor;
0
// Add some splits to make the server's life easier conn.tableOperations().addSplits(tableName, splits); log.debug("created " + splits.size() + " splits on " + tableName);
0
package org.apache.accumulo.examples.simple.dirlist; import org.apache.accumulo.examples.simple.filedata.FileDataQuery;
0
Set<SubResourceDefinition> setChildren = new HashSet<>();
1
* @version $Revision: 1.2 $ $Date: 2002/08/22 02:42:46 $ this.entryName = file.getName().getPath();
0
import java.util.Map; import org.apache.accumulo.core.client.AccumuloSecurityException; import org.apache.accumulo.core.conf.ConfigurationCopy; private AccumuloConfiguration config; config = new ConfigurationCopy(conn.instanceOperations().getSiteConfiguration()); String tablesDir = Constants.getTablesDir(config); FileSystem fs = FileUtil.getFileSystem(conf, config);
0
* Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License.
0
import org.apache.felix.inventory.Format; import org.apache.felix.inventory.InventoryPrinter; props.put(InventoryPrinter.NAME, "duplicate_exports"); //$NON-NLS-1$ props.put(InventoryPrinter.TITLE, "Duplicate Exports"); //$NON-NLS-1$ props.put(InventoryPrinter.FORMAT, new String[] { Format.TEXT.toString() }); InventoryPrinter.class.getName(),
0
* <li>cachable</li> * "cachable" : { * "description": "Indicates whether the generated keytab is allowed to be cached by the * Ambari server (true) or not (false)", * "type": "boolean" * } * A boolean value indicating whether the generated keytab is allowed to be cached by the Ambari * server or not. */ private boolean cachable = true; /** // If the "cachable" value is anything but false, set it to true setCachable(!"false".equalsIgnoreCase(getStringValue(data, "cachable"))); * Indicates whether the generated keytab is allowed to be cached by the Ambari server or not * * @return true if allowed to be cached; false otherwise */ public boolean isCachable() { return cachable; } /** * Sets whether the generated keytab is allowed to be cached by the Ambari server or not * * @param cachable true if allowed to be cached; false otherwise */ public void setCachable(boolean cachable) { this.cachable = cachable; } /**
0
* @version CVS $Id: CompositeContentAspect.java,v 1.4 2003/08/19 14:09:34 cziegeler Exp $ XMLUtils.startElement(handler, config.tagName);
0
import org.apache.atlas.typesystem.types.TypeUtils.Pair; /* (non-Javadoc) * @see org.apache.atlas.services.MetadataService#deleteEntities(java.lang.String) */ @Override public List<String> deleteEntities(List<String> deleteCandidateGuids) throws AtlasException { ParamChecker.notEmpty(deleteCandidateGuids, "delete candidate guids cannot be empty"); Pair<List<String>, List<ITypedReferenceableInstance>> deleteEntitiesResult = repository.deleteEntities(deleteCandidateGuids); if (deleteEntitiesResult.right.size() > 0) { onEntitiesDeleted(deleteEntitiesResult.right); } return deleteEntitiesResult.left; } private void onEntitiesDeleted(List<ITypedReferenceableInstance> entities) throws AtlasException { for (EntityChangeListener listener : entityChangeListeners) { listener.onEntitiesDeleted(entities); } }
0
package aQute.lib.deployer.obr; import org.xml.sax.SAXException; public class StopParseException extends SAXException { private static final long serialVersionUID = 1L; }
0
* @noinspection SynchronizeOnNonFinalField /** Store for pipeline locks (optional) */ String storeRole = params.getParameter("store-role", Store.TRANSIENT_STORE); // Get a lock object from the store String lockKey = PIPELOCK_PREFIX + key; Object lock; lock = transientStore.get(lockKey); getLogger().debug("Interrupted waiting for other pipeline to finish processing, retrying...", e); key = ((CacheableProcessingComponent) super.generator).getKey(); newComponentCacheKey( ComponentCacheKey.ComponentType_Generator, this.generatorRole, key)); newComponentCacheKey( ComponentCacheKey.ComponentType_Transformer, (String) this.transformerRoles.get(this.firstNotCacheableTransformerIndex), key)); key = ((CacheableProcessingComponent) this.serializer).getKey(); if (!waitForLock(this.fromCacheKey)) { if (!waitForLock(pcKey)) { releaseLock(pcKey);
0
sb.append(", language='").append(language).append('\'');
0
* @version CVS $Id: FormattingFloatConvertor.java,v 1.3 2004/05/06 14:59:44 bruno Exp $ public ConversionResult convertFromString(String value, Locale locale, Convertor.FormatCache formatCache) { return new ConversionResult(decimalValue); return new ConversionResult(new Float(decimalValue.floatValue())); return ConversionResult.create("float");
0
import org.apache.beam.sdk.values.BeamRecordType; protected BeamKafkaTable(BeamRecordType beamRowType) { super(beamRowType); public BeamKafkaTable(BeamRecordType beamRowType, String bootstrapServers, super(beamRowType); public BeamKafkaTable(BeamRecordType beamRowType, super(beamRowType);
0
for (int fontSize : fontSizes) { Font.PLAIN, fontSize); g.translate(width * 1.2, 0); for (String fontFamily : fontFamilies) { Font font = new Font(fontFamily, Font.PLAIN, 18); double height = font.createGlyphVector(frc, fontFamily).getVisualBounds().getHeight(); g.translate(0, height * 1.4); g.drawString(fontFamily, 10, 40); for (Font font : logicalFonts) { g.setFont(font); double height = font.createGlyphVector(frc, font.getName()).getVisualBounds().getHeight(); g.translate(0, height * 1.4); g.drawString(font.getName(), 10, 0); }
0
package org.apache.ambari.metrics.adservice.seriesgenerator;
0
import org.apache.cocoon.spring.ResourceUtils;
0
* <p> Note that, unless the behavior is overriden, * atomic coders are presumed to be deterministic * and all instances are considered equal. public abstract class AtomicCoder<T> extends DeterministicStandardCoder<T> {
0
if (this.credentials.getPrincipal().equals(principal)) {
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 * 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