Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
beginRead(false); beginWrite(false); * additional actions before this read operation. The boolean * <em>optimize</em> argument can be evaluated by overridden methods in * derived classes. Some operations which require a lock do not need a fully * initialized configuration object. By setting this flag to * <strong>true</strong>, such operations can give a corresponding hint. An * overridden implementation of {@code beginRead()} can then decide to skip * some initialization steps. All basic operations in this class (and most * of the basic {@code Configuration} implementations) call this method with * a parameter value of <strong>false</strong>. <strong>In any case the * @param optimize a flag whether optimization can be performed protected void beginRead(boolean optimize) * additional operations before an update. For a description of the boolean * <em>optimize</em> argument refer to the documentation of * {@code beginRead()}. <strong>In any case the inherited method must be * called! Otherwise, proper synchronization is not guaranteed.</strong> * @param optimize a flag whether optimization can be performed * @see #beginRead(boolean) protected void beginWrite(boolean optimize) beginWrite(false); beginWrite(false); beginWrite(false); beginWrite(false); beginRead(false); beginRead(false); beginRead(false); beginRead(false); beginRead(false);
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: ModifiableTraversableSource.java,v 1.2 2004/03/05 13:02:40 bdelacretaz Exp $
1
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
0
protected Amount(T value, U unit, T maxValue) {
0
import org.apache.accumulo.core.cli.MapReduceClientOnRequiredTable; static class Opts extends MapReduceClientOnRequiredTable { if (!opts.getConnector().tableOperations().exists(opts.getTableName())) { log.info("Creating table " + opts.getTableName()); opts.getConnector().tableOperations().create(opts.getTableName()); opts.getConnector().tableOperations().addSplits(opts.getTableName(), splits);
0
* There isn't a good way to build this off of the {@link AccumuloClusterIT} (as would be the logical place) because we need to start the MiniAccumuloCluster in * a static BeforeClass-annotated method. Because it is static and invoked before any other BeforeClass methods in the implementation, the actual test classes
0
values.put(CSSConstants.CSS_ALL_VALUE, ValueConstants.ALL_VALUE);
0
* @param opts * * * * @param opts *
0
* Here: <a href="http://hsqldb.sourceforge.net">HSQLDB</a> 1.6 IDENTITY columns * @version CVS $Id: HsqlIdentityAutoIncrementModule.java,v 1.2 2004/02/19 22:13:28 joerg Exp $
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: EPCells.java,v 1.5 2004/03/05 13:02:03 bdelacretaz Exp $
1
dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder();
0
import org.apache.http.nio.protocol.BasicAsyncRequestConsumer; import org.apache.http.nio.protocol.BasicAsyncResponseConsumer; * * @deprecated use {@link BasicAsyncRequestConsumer} or {@link BasicAsyncResponseConsumer}
0
package org.apache.felix.dm.annotation.plugin.bnd; /** * The type of parameters which can be found in a component descriptor. */ public enum EntryParam { init, start, stop, destroy, impl, provide, properties, composition, service, filter, defaultImpl, required, added, changed, removed, autoConfig, pid, factoryPid, propagate, updated, timeout, adapterService, adapterProperties, adapteeService, adapteeFilter, stateMask, ranking, factory, factoryConfigure, name }
0
HashSet<String> validPrefixes = new HashSet<>(); HashSet<String> propertyNames = new HashSet<>(); HashSet<Integer> usedPorts = new HashSet<>(); final TreeMap<String,String> extras = new TreeMap<>(); TreeSet<String> expected = new TreeSet<>(); TreeSet<String> actual = new TreeSet<>();
0
import org.junit.Assert; import org.junit.Test; public class TestRFC2617Scheme { @Test Assert.assertEquals("test", authscheme.getSchemeName()); Assert.assertEquals("realm1", authscheme.getParameter("realm")); Assert.assertEquals(null, authscheme.getParameter("test")); Assert.assertEquals("stuff", authscheme.getParameter("test1")); Assert.assertEquals("stuff, stuff", authscheme.getParameter("test2")); Assert.assertEquals("\"crap", authscheme.getParameter("test3")); @Test Assert.assertEquals("test", authscheme.getSchemeName()); Assert.assertEquals("realm1", authscheme.getParameter("realm")); @Test(expected=MalformedChallengeException.class) authscheme.processChallenge(header); @Test(expected=MalformedChallengeException.class) authscheme.processChallenge(header); @Test(expected=MalformedChallengeException.class) authscheme.processChallenge(header);
0
import java.util.Map; * @version CVS $Id: AbstractInterpreter.java,v 1.3 2003/05/07 04:36:33 coliver Exp $ Map objectModel = environment.getObjectModel(); Flow.setContextObject(objectModel, bizData); Flow.setWebContinuation(objectModel, continuation); PipelinesNode.getRedirector(environment).redirect(false, uri);
0
@Override @Override @Override
0
try (SshServer sshd = Utils.setupTestServer()) { try (SshServer sshd = Utils.setupTestServer()) { try (SshServer sshd = Utils.setupTestServer()) {
0
} catch (RuntimeException re) { throw new RuntimeException(re);
0
import java.util.Locale; * @return The content type encoding (upcased) encoding = (encoding != null) ? encoding.toUpperCase(Locale.US) : null;
0
try (Scanner scanner = c.createScanner(MetadataTable.NAME, Authorizations.EMPTY)) { scanner.setRange(MetadataSchema.DeletesSection.getRange()); for (Entry<Key,Value> entry : scanner) { String row = entry.getKey().getRow().toString(); if (!row.contains("/" + tableId + "/")) { log.info("Ignoring delete entry for a table other than the one we deleted"); continue; } Assert.fail("Delete entry should have been deleted by the garbage collector: " + entry.getKey().getRow().toString());
0
import org.apache.atlas.model.typedef.AtlasClassificationDef; public final static AtlasClassificationType MATCH_ALL_CLASSIFICATION = new AtlasClassificationType(new AtlasClassificationDef("*")); String classificationName = searchParameters.getClassification(); this.entityAttributes = new HashSet<>(); this.entityType = typeRegistry.getEntityTypeByName(searchParameters.getTypeName()); this.classificationType = getClassificationType(classificationName); if (StringUtils.isNotEmpty(classificationName) && classificationType == null) { throw new AtlasBaseException(AtlasErrorCode.UNKNOWN_CLASSIFICATION, classificationName); private AtlasClassificationType getClassificationType(String classificationName) { AtlasClassificationType ret; if (StringUtils.equals(classificationName, MATCH_ALL_CLASSIFICATION.getTypeName())) { ret = MATCH_ALL_CLASSIFICATION; } else { ret = typeRegistry.getClassificationTypeByName(classificationName); } return ret; }
0
* The provided service properties take precedence over the propagated bundle manifest headers. * It means a bundle manifest header won't override a component service property having the same name. * The provided service properties take precedence over the propagated bundle manifest headers. * It means a bundle manifest header won't override a component service property having the same name. *
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
/* $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. */ package org.apache.commons.digester3.binder; import org.apache.commons.digester3.BeanPropertySetterRule; /** * Builder chained when invoking {@link LinkedRuleBuilderImpl#setBeanProperty()}. */ public final class BeanPropertySetterBuilder extends AbstractBackToLinkedRuleBuilder<BeanPropertySetterRule> { private String propertyName; BeanPropertySetterBuilder( String keyPattern, String namespaceURI, RulesBinder mainBinder, LinkedRuleBuilder mainBuilder ) { super( keyPattern, namespaceURI, mainBinder, mainBuilder ); } /** * Sets the name of property to set. * * @param propertyName The name of property to set * @return this builder instance */ public BeanPropertySetterBuilder withName( /* @Nullable */String propertyName ) { this.propertyName = propertyName; return this; } /** * {@inheritDoc} */ @Override protected BeanPropertySetterRule createRule() { return new BeanPropertySetterRule(this.propertyName); } }
0
import java.util.Map; import org.apache.ambari.server.state.Cluster; import org.apache.ambari.server.state.HostComponentAdminState; import org.apache.ambari.server.state.Service; import org.apache.ambari.server.state.ServiceComponent; import org.apache.ambari.server.state.ServiceComponentHost; import org.apache.ambari.server.state.stack.PrerequisiteCheck; super(CheckDescription.SERVICES_DECOMMISSION); prerequisiteCheck.setFailReason(getFailReason(prerequisiteCheck, request));
0
import java.util.Iterator; for (String root : map.keySet()) { for (Iterator<Attribute> it = newAttr.iterator(); it.hasNext();) Attribute a = it.next(); it.remove(); orgAttr.addAll(newAttr);
0
private int adapt(int delta, final int numpoints, final boolean firsttime) { private int digit(final char c) { public String toUnicode(final String punycode) {
0
Method method = ClustersImpl.class.getDeclaredMethod("loadClustersAndHosts");
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.hive2.actor.message.lifecycle; public class KeepAlive {}
0
final int dfaultPort = ServerConfiguration.getDefaultConfiguration().getPort(Property.TSERV_CLIENTPORT);
0
@Test public void testDeleteEntity() throws Exception { final String tableName = "table-" + randomString(); Referenceable tableInstance = createHiveTableInstance(DATABASE_NAME, tableName); final Id tableId = createInstance(tableInstance); final String guid = tableId._getId(); waitForNotification(notificationConsumer, MAX_WAIT_TIME, newNotificationPredicate(EntityNotification.OperationType.ENTITY_CREATE, HIVE_TABLE_TYPE, guid)); final String property = "name"; final String name = (String) tableInstance.get(property); serviceClient.deleteEntity(HIVE_TABLE_TYPE, property, name); waitForNotification(notificationConsumer, MAX_WAIT_TIME, newNotificationPredicate(EntityNotification.OperationType.ENTITY_DELETE, HIVE_TABLE_TYPE, guid)); }
0
* Extension of {@link AbstractSetTest} for exercising the * @since 3.0 * @version $Id$ public class UnmodifiableSetTest<E> extends AbstractSetTest<E> { public UnmodifiableSetTest(String testName) { return BulkTest.makeSuite(UnmodifiableSetTest.class);
0
import org.apache.sshd.util.test.BaseTestSupport; import org.apache.sshd.util.test.BogusChannel;
0
import org.apache.http.nio.protocol.HttpAsyncServerProtocolHandler; HttpAsyncServerProtocolHandler serviceHandler = new HttpAsyncServerProtocolHandler( HttpAsyncServerProtocolHandler serviceHandler = new HttpAsyncServerProtocolHandler( HttpAsyncServerProtocolHandler serviceHandler = new HttpAsyncServerProtocolHandler( HttpAsyncServerProtocolHandler serviceHandler = new HttpAsyncServerProtocolHandler(
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
class DefaultCacheInvalidator implements HttpCacheInvalidator { * Create a new {@link DefaultCacheInvalidator} for a given {@link HttpCache} and public DefaultCacheInvalidator(
0
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import org.apache.accumulo.core.metadata.MetadataTable; import org.junit.Rule; import org.junit.rules.TemporaryFolder; @Rule public TemporaryFolder folder = new TemporaryFolder(new File(System.getProperty("user.dir") + "/target")); @Test(timeout = 2 * 60 * 1000) File siteFileBackup = new File(folder.getRoot(), "accumulo-site.xml.bak"); assertFalse(siteFileBackup.exists()); assertEquals(0, exec(Admin.class, new String[] {"dumpConfig", "-a", "-d", folder.getRoot().getPath()}).waitFor()); assertTrue(siteFileBackup.exists()); String site = FunctionalTestUtils.readAll(new FileInputStream(siteFileBackup)); String meta = FunctionalTestUtils.readAll(new FileInputStream(new File(folder.getRoot(), MetadataTable.NAME + ".cfg")));
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.infra.model; import javax.validation.constraints.NotNull; import javax.ws.rs.PathParam; public class StepExecutionRequest { @PathParam("jobExecutionId") @NotNull private Long jobExecutionId; @PathParam("stepExecutionId") @NotNull private Long stepExecutionId; public Long getJobExecutionId() { return jobExecutionId; } public void setJobExecutionId(Long jobExecutionId) { this.jobExecutionId = jobExecutionId; } public Long getStepExecutionId() { return stepExecutionId; } public void setStepExecutionId(Long stepExecutionId) { this.stepExecutionId = stepExecutionId; } }
0
* Tests the copy constructor. */ public void testInitCopy() { fillLayout(); PropertiesConfigurationLayout l2 = new PropertiesConfigurationLayout( config, layout); assertEquals("Wrong number of keys", layout.getKeys().size(), l2 .getKeys().size()); for (Iterator it = layout.getKeys().iterator(); it.hasNext();) { Object key = it.next(); assertTrue("Key was not found: " + key, l2.getKeys().contains(key)); } } /** * Tests if the copy and the original are independend from each other. */ public void testInitCopyModify() { fillLayout(); PropertiesConfigurationLayout l2 = new PropertiesConfigurationLayout( config, layout); assertEquals("Comments are not equal", layout.getComment(TEST_KEY), l2 .getComment(TEST_KEY)); layout.setComment(TEST_KEY, "A new comment"); assertEquals("Comment was changed", TEST_COMMENT, l2 .getCanonicalComment(TEST_KEY, false)); l2.setBlancLinesBefore(TEST_KEY, l2.getBlancLinesBefore(TEST_KEY) + 1); assertFalse("Blanc lines do not differ", layout .getBlancLinesBefore(TEST_KEY) == l2 .getBlancLinesBefore(TEST_KEY)); } /**
0
import java.util.stream.Collectors; public Map<TupleTag<?>, Coder<?>> getOutputCoders() { return currentTransform .getOutputs() .entrySet() .stream() .filter(e -> e.getValue() instanceof PCollection) .collect(Collectors.toMap(e -> e.getKey(), e -> ((PCollection) e.getValue()).getCoder())); }
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.beam.sdk.extensions.sql.meta.provider; import java.util.Collections; import java.util.List; import org.apache.beam.sdk.extensions.sql.meta.Table; /** * A {@code InMemoryMetaTableProvider} is an abstract {@code TableProvider} for in-memory types. */ public abstract class InMemoryMetaTableProvider implements TableProvider { @Override public void createTable(Table table) { // No-op } @Override public void dropTable(String tableName) { // No-op } @Override public List<Table> listTables() { return Collections.emptyList(); } }
0
expect(runner.launch()).andReturn(LocalService.auxiliaryService("a", 100, shutdown)); assertEquals(Optional.<InetSocketAddress>absent(), registry.getPrimarySocket()); assertEquals(ImmutableMap.of("a", getLocalAddress(100)), registry.getAuxiliarySockets());
0
package org.apache.cocoon.forms.formmodel; public class RepeaterFilterFieldDefinition extends FieldDefinition { private String repeaterName; private String field; public String getRepeaterName() { return repeaterName; } public void setRepeaterName(String repeaterName) { this.repeaterName = repeaterName; } public Widget createInstance() { RepeaterFilterField field = new RepeaterFilterField(this); return field; } public void initializeFrom(WidgetDefinition definition) throws Exception { if (!(definition instanceof RepeaterFilterFieldDefinition)) throw new IllegalArgumentException("Wrong definition type to initialize from : " + definition.getClass().getName()); super.initializeFrom(definition); this.repeaterName = ((RepeaterFilterFieldDefinition)definition).getRepeaterName(); this.field = ((RepeaterFilterFieldDefinition)definition).getField(); } public String getField() { return field; } public void setField(String field) { this.field = field; } }
0
this.session.close();
0
import org.apache.xml.security.utils.XMLUtils; import org.w3c.dom.Attr; import org.w3c.dom.Document; Document doc = XMLUtils.createDocumentBuilder(false).newDocument(); Document doc = XMLUtils.createDocumentBuilder(false).newDocument();
0
* <p> * </p> * <p> * </p> * <p> * </p> * <p> * </p> * <p> * </p> * <p> * </p> * <p> * </p> * <p> * </p>
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. */ /** * <p> * This package contains all exception classes used by this library. * </p> * <p> * <em>Commons Configuration</em> defines a small number of exception classes. * Because these classes are referenced by multiple other packages, they are * located in their own package to avoid cyclic dependencies. * </p> * * @version $Id$ */ package org.apache.commons.configuration2.ex;
1
@Override
0
List candidates = state.getResolvedCandidates(target, importer); candidates.addAll(state.getUnresolvedCandidates(target, importer)); List candidates = state.getResolvedCandidates(reqs[reqIdx], targetModule); candidates.addAll(state.getUnresolvedCandidates(reqs[reqIdx], targetModule)); List getResolvedCandidates(IRequirement req, IModule reqModule); List getUnresolvedCandidates(IRequirement req, IModule reqModule);
1
import java.awt.Graphics2D; import org.apache.batik.transcoder.SVGAbstractTranscoder;
0
@Override
0
return success == other.success
0
private final ConfigurationInterpolator localSubst; localSubst = initLocalInterpolator(); localSubst = initLocalInterpolator(); String path = String.valueOf(getInterpolator().interpolate(pattern)); String path = String.valueOf(localSubst.interpolate(pattern)); /** * Creates a {@code ConfigurationInterpolator} instance for performing local * variable substitutions. * * @return the {@code ConfigurationInterpolator} */ private ConfigurationInterpolator initLocalInterpolator() { ConfigurationInterpolator ci = new ConfigurationInterpolator(); ci.registerLookups(getInterpolator().getLookups()); return ci; }
0
* matches the implemented interface and filter. The adapter will be registered * with the specified interface and existing properties from the original service * plus any extra properties you supply here. It will also inherit all dependencies, * and if you declare the original service as a member it will be injected. * Sets the adapter service interface(s). By default, the directly implemented interface(s) is (are) used. * Sets some additional properties to use with the adapter service registration. By default, * the adapter will inherit all adaptee service properties. * Sets the adaptee service interface this adapter is applying to. * Sets the filter condition to use with the adapted service interface. * Sets the static method used to create the adapter service implementation instance. * By default, the default constructor of the annotated class is used.
0
public void testSetURLWithParams() throws Exception { FileConfiguration config = new PropertiesConfiguration(); URL url = new URL( "http://issues.apache.org/bugzilla/show_bug.cgi?id=37886"); config.setURL(url); assertEquals("Base path incorrect", "http://issues.apache.org/bugzilla/", config.getBasePath()); assertEquals("File name incorrect", "show_bug.cgi", config .getFileName()); assertEquals("URL was not correctly stored", url, config.getURL()); } *
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
* @param index Index into the collection.
0
SelectionEvent.SELECTION_START,
0
import org.w3c.dom.Document; import org.w3c.dom.DocumentFragment; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.w3c.dom.Text; * @version CVS $Id: PortalManager.java,v 1.9 2003/08/07 17:13:39 joerg Exp $
0
public Shape getPaintedArea(){
0
import com.twitter.mesos.gen.TaskQuery; public interface SchedulerCore extends Function<TaskQuery, Iterable<TwitterTaskInfo>>, TaskLauncher { Set<ScheduledTask> getTasks(TaskQuery query); void setTaskStatus(TaskQuery query, ScheduleStatus status, @Nullable String message); void killTasks(TaskQuery query, String user) throws ScheduleException;
0
return GlobalWindows.class.hashCode(); // all GlobalWindow instances have the same hash code.
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. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * */ /** * Deprecated. * @deprecated (4.3). */ package org.apache.http.cookie.params;
0
* * * * * * * * * * * @param instanceName * the Accumulo instance name * @param zooKeepers * a comma-separated list of zookeeper servers * @since 1.5.0 * @deprecated since 1.6.0; Use {@link #setZooKeeperInstance(Job, ClientConfiguration)} instead. */ @Deprecated public static void setZooKeeperInstance(Job job, String instanceName, String zooKeepers) { setZooKeeperInstance(job, new ClientConfiguration().withInstance(instanceName).withZkHosts(zooKeepers)); } /** * Configures a {@link org.apache.accumulo.core.client.ZooKeeperInstance} for this job. * * @param job * the Hadoop job instance to be configured * * * * * * * * * * * * * * *
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 */ /* localCrc = (T[T8_7_start + c0] ^ T[T8_6_start + c1]) ^ (T[T8_5_start + c2] ^ T[T8_4_start + c3]); localCrc ^= (T[T8_3_start + c4] ^ T[T8_2_start + c5]) ^ (T[T8_1_start + c6] ^ T[T8_0_start + c7]);
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 * 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.aurora.scheduler.resources.ResourceSlot; import org.apache.aurora.scheduler.resources.ResourceType;
0
* Helper class to hold {@link Schema} and {@link FieldValueGetter}s which were used to create it. /** Returns a {@link Schema}. */ * Returns the list of {@link FieldValueGetter}s which were used to create {@link * SchemaGetters#schema()}.
1
import org.apache.xml.security.encryption.XMLEncryptionException; /** * Method addEncryptedKey * * @param encryptedKey * @throws XMLEncryptionException */ public void add(EncryptedKey encryptedKey) throws XMLEncryptionException { if (this._state == MODE_SIGN) { XMLCipher cipher = XMLCipher.getInstance(XMLCipher.TRIPLEDES); this._constructionElement.appendChild(cipher.martial(encryptedKey)); } }
0
* Copyright 2000-2009 The Apache Software Foundation
0
import org.apache.ambari.api.resources.ResourceDefinition; expect(requestFactory.createRequest(eq(httpHeaders), isNull(String.class), eq(uriInfo), eq(Request.Type.GET), expect(requestFactory.createRequest(eq(httpHeaders), isNull(String.class), eq(uriInfo), eq(Request.Type.GET), expect(requestFactory.createRequest(eq(httpHeaders), eq("body"), eq(uriInfo), eq(Request.Type.PUT), assertSame(response, hostService.createService("body", httpHeaders, uriInfo, serviceName)); expect(requestFactory.createRequest(eq(httpHeaders), eq("body"), eq(uriInfo), eq(Request.Type.POST), assertSame(response, hostService.updateService("body", httpHeaders, uriInfo, serviceName)); expect(requestFactory.createRequest(eq(httpHeaders), isNull(String.class), eq(uriInfo), eq(Request.Type.DELETE),
0
* $Header: /cvshome/build/org.osgi.service.useradmin/src/org/osgi/service/useradmin/Authorization.java,v 1.11 2007/02/07 18:53:08 hargrave Exp $ * Copyright (c) OSGi Alliance (2001, 2007). All Rights Reserved. * @version $Revision: 1.11 $ * Gets the names of all roles implied by this <code>Authorization</code> * @return The names of all roles implied by this
0
import org.apache.aurora.scheduler.async.OfferManager.OfferManagerImpl; import org.apache.aurora.scheduler.async.OfferManager.OfferReturnDelay; bind(OfferManager.class).to(OfferManagerImpl.class); bind(OfferManagerImpl.class).in(Singleton.class); expose(OfferManager.class); PubsubEventModule.bindSubscriber(binder(), OfferManager.class);
0
@Override @Override
1
import java.util.List; List<JexlUberspect.ResolverType> strategy = (node == null) || !(node.jjtGetParent()instanceof ASTArrayAccess) ? JexlUberspect.POJO : JexlUberspect.MAP; JexlPropertyGet vg = uberspect.getPropertyGet(strategy, object, attribute); List<JexlUberspect.ResolverType> strategy = (node == null) || !(node.jjtGetParent()instanceof ASTArrayAccess) ? JexlUberspect.POJO : JexlUberspect.MAP; JexlPropertySet vs = uberspect.getPropertySet(strategy, object, attribute, value);
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: LocaleTag.java,v 1.3 2004/03/05 13:02:25 bdelacretaz Exp $
1
import static org.apache.aurora.gen.ScheduleStatus.DRAINING; checkOutstandingTimer(DRAINING, 0); checkOutstandingTimer(DRAINING, 0);
0
import org.apache.hc.core5.io.CloseMode; import org.apache.hc.core5.net.NamedEndpoint; import org.apache.hc.core5.reactor.ProtocolLayer; import org.apache.hc.core5.reactor.ssl.SSLBufferMode; this.socketTimeout = ioSession.getSocketTimeoutMillis(); public void close(final CloseMode closeMode) { log.debug(getId() + ": Shutdown connection " + closeMode); ioSession.close(closeMode); ioSession.enqueue(new ShutdownCommand(CloseMode.GRACEFUL), Command.Priority.IMMEDIATE); public void setSocketTimeoutMillis(final int timeout) { ioSession.setSocketTimeoutMillis(timeout); public int getSocketTimeoutMillis() { return ioSession.getSocketTimeoutMillis(); if (ioSession instanceof ProtocolLayer) { final IOEventHandler handler = ((ProtocolLayer) ioSession).getHandler(); if (handler instanceof HttpConnection) { return ((HttpConnection) handler).getEndpointDetails(); } return null; if (ioSession instanceof ProtocolLayer) { final IOEventHandler handler = ((ProtocolLayer) ioSession).getHandler(); if (handler instanceof HttpConnection) { return ((HttpConnection) handler).getProtocolVersion(); } return HttpVersion.DEFAULT; final NamedEndpoint endpoint, final SSLBufferMode sslBufferMode, ((TransportSecurityLayer) ioSession).startTls(sslContext, endpoint, sslBufferMode, initializer, verifier); ioSession.enqueue(command, Command.Priority.IMMEDIATE); ioSession.enqueue(command, Command.Priority.NORMAL); ioSession.setSocketTimeoutMillis(0); ioSession.setSocketTimeoutMillis(socketTimeout);
0
import org.apache.hc.core5.annotation.NotThreadSafe;
0
final Options options = new Options(); final HelpFormatter formatter = new HelpFormatter(); final StringWriter out = new StringWriter();
0
import org.apache.hc.core5.annotation.Internal; @Internal
0
import java.util.Map; * Returns a map of properties which correspond to {@link ValueProvider.RuntimeValueProvider}, * keyed by the property name. The value is a map containing type and default information. */ Map<String, Map<String, Object>> outputRuntimeOptions(); /**
0
import com.beust.jcommander.Parameter; import com.beust.jcommander.Parameters; @Parameters(separators = "=") public static class Options { @Parameter( names = "-enable_h2_console", description = "Enable H2 DB management console.", arity = 1) public boolean enableH2Console = false; } public H2ConsoleModule(Options options) { this(options.enableH2Console);
0
package org.apache.beam.sdk.extensions.sql.interpreter.operator; import org.apache.beam.sdk.extensions.sql.interpreter.BeamSqlFnExecutorTestBase;
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
Connector connector = opts.getConnector(); connector.securityOperations().changeUserAuthorizations(opts.principal, AUTHS);
0
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; import static org.testng.Assert.assertFalse; @Test(dataProvider = "salesNewTypeAttrs-next") public void transformUpdatesForSubTypes(ZipSource zipSource) throws IOException, AtlasBaseException { loadBaseModel(); loadHiveModel(); String transformJSON = "{ \"Asset\": { \"qualifiedName\":[ \"lowercase\", \"replace:@cl1:@cl2\" ] } }"; importService.setImportTransform(zipSource, transformJSON); ImportTransforms importTransforms = zipSource.getImportTransform(); assertTrue(importTransforms.getTransforms().containsKey("Asset")); assertTrue(importTransforms.getTransforms().containsKey("hive_table")); assertTrue(importTransforms.getTransforms().containsKey("hive_column")); } @Test(dataProvider = "salesNewTypeAttrs-next") public void transformUpdatesForSubTypesAddsToExistingTransforms(ZipSource zipSource) throws IOException, AtlasBaseException { loadBaseModel(); loadHiveModel(); String transformJSON = "{ \"Asset\": { \"qualifiedName\":[ \"replace:@cl1:@cl2\" ] }, \"hive_table\": { \"qualifiedName\":[ \"lowercase\" ] } }"; importService.setImportTransform(zipSource, transformJSON); ImportTransforms importTransforms = zipSource.getImportTransform(); assertTrue(importTransforms.getTransforms().containsKey("Asset")); assertTrue(importTransforms.getTransforms().containsKey("hive_table")); assertTrue(importTransforms.getTransforms().containsKey("hive_column")); assertEquals(importTransforms.getTransforms().get("hive_table").get("qualifiedName").size(), 2); }
0
masterStatus.addSortableColumn("#&nbsp;Tablets", new NumberType<Integer>(0, Integer.MAX_VALUE, 2, Integer.MAX_VALUE), null);
0
public class SimpleAnnotationsTest extends AnnotationBase
0
import org.apache.hc.core5.reactor.ssl.SSLBufferMode; final SSLBufferMode sslBufferMode, sslBufferMode,
0
import org.osgi.util.converter.ConversionException; import org.osgi.util.converter.ConvertFunction; import org.osgi.util.converter.Converter; import org.osgi.util.converter.ConverterBuilder; import org.osgi.util.converter.Converting; import org.osgi.util.converter.Function; import org.osgi.util.converter.Rule; import org.osgi.util.converter.TypeReference;
0
import org.apache.beam.sdk.extensions.sql.QueryTransform; QueryTransform.withQueryString( customersFromWonderland.apply( QueryTransform.withQueryString("SELECT COUNT(id) FROM PCOLLECTION")); QueryTransform.withQueryString(
0
AsynchronousSocketChannel socket = setSocketOptions(openAsynchronousSocketChannel(address, group));
1
private MultiIterator(List<SortedKeyValueIterator<Key,Value>> iters, Range seekFence, boolean init) { public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException { public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException {
0
import org.apache.felix.dm.annotation.api.ServiceDependency.Any;
0
package org.apache.hc.core5.http.impl.nio; import org.apache.hc.core5.http.ContentLengthStrategy; import org.apache.hc.core5.http.nio.NHttpConnectionFactory; import org.apache.hc.core5.http.nio.NHttpMessageParserFactory; import org.apache.hc.core5.http.nio.NHttpMessageWriterFactory; import org.apache.hc.core5.util.ByteBufferAllocator;
1
@org.junit.AfterClass public static void cleanup() throws Exception { Security.removeProvider("org.bouncycastle.jce.provider.BouncyCastleProvider"); }
0
log.debug("EXCEPTION {}", e.getMessage()); log.debug("EXCEPTION {}", e.getMessage());
0
public interface MetricCell<DataT> {
0