Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
import org.apache.http.util.CharArrayBuffer; CharArrayBuffer buffer = new CharArrayBuffer(64); buffer.append(Integer.toString(this.statusCode));
0
public Coder<T> getOutputCoder() {
0
import java.util.Map; Map<String, Integer> assignedPorts);
0
for (Pipe pipe : pipes) { if (pipe.exception != null) { // can't throw exception, as result is defined by last pipe System.err.println("pipe: " + pipe.exception); } }
0
synchronized(authFailed) { authFailed.incrementAndGet(); authFailed.notify(); } // wait for authFailed event from client's EventThread. synchronized(authFailed) { authFailed.wait(); }
0
private HashMap<String,Object> stateMap = new HashMap<>();
1
protected HttpMessage createMessage(final CharArrayBuffer buffer)
0
* * * * *
0
* @version $Revision$ $Date$
0
package org.apache.cocoon.thread.impl; import org.apache.cocoon.thread.Queue; * @see org.apache.cocoon.thread.Queue#getQueueSize()
0
public class PTransformTranslation { private PTransformTranslation() {}
0
@Parameterized.Parameters(name = "{0}-{1}-{2}-{3}")
0
TokenSecurityEvent<?> tokenSecurityEvent = XMLSecurityUtils.createTokenSecurityEvent(inboundSecurityToken, encryptedDataType.getId());
0
/** * HTTP response writer that serializes its output to an instance * of {@link SessionOutputBuffer}. * * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a> */ lineFormatter.formatStatusLine(this.lineBuf, ((HttpResponse) message).getStatusLine()); this.sessionBuffer.writeLine(this.lineBuf);
0
m_extensionManager.startExtensionBundle(this, bundle); m_extensionManager.startExtensionBundle(this, bundle);
0
RequestStageContainer requestStages = doUpdateResources(null, request, predicate, false, false, false); public RequestStatusResponse install(String cluster, String hostname, Collection<String> skipInstallForComponents, Collection<String> dontSkipInstallForComponents, boolean skipFailure, boolean useClusterHostInfo) throws SystemException, requestStages = doUpdateResources(null, installRequest, installPredicate, true, true, useClusterHostInfo); return this.start(cluster, hostName, Collections.emptySet(), false, false); public RequestStatusResponse start(String cluster, String hostName, Collection<String> installOnlyComponents, boolean skipFailure, boolean useClusterHostInfo) throws SystemException, requestStages = doUpdateResources(null, startRequest, startPredicate, true, true, useClusterHostInfo); boolean runSmokeTest, boolean useGeneratedConfigs, boolean useClusterHostInfo) throws AmbariException, AuthorizationException { changedScHosts, ignoredScHosts, runSmokeTest, false, useGeneratedConfigs, useClusterHostInfo); * @param useGeneratedConfigs should update request contains actual configs * @param useClusterHostInfo should update request contain cluster topology info Predicate predicate, boolean performQueryEvaluation, boolean useGeneratedConfigs, boolean useClusterHostInfo) runSmokeTest, useGeneratedConfigs, useClusterHostInfo);
0
import com.google.common.collect.ImmutableSetMultimap; ImmutableMultimap.Builder<String, PreemptionVictim> victims = ImmutableSetMultimap.builder(); assertEquals(victims.build(), state.getSlavesToActiveTasks());
0
import java.util.Arrays; System.out.println(" operations: " + Arrays.asList(ops));
0
if (path.contains(fsSeparator)) { StringBuilder result = new StringBuilder();
0
* @version CVS $Id: ComposedJXPathBindingBase.java,v 1.7 2004/02/03 12:22:08 joerg Exp $ public void doLoad(Widget frmModel, JXPathContext jxpc) throws BindingException {
0
* The specified deletion strategy is used. * The specified deletion strategy is used. * loader it was started from terminates. This can constitute a memory leak.
0
* or more contributor license agreements. See the NOTICE file * regarding copyright ownership. The ASF licenses this file * with the License. You may obtain a copy of the License at * KIND, either express or implied. See the License for the
0
index = handleAEIOUY(result, index); private int handleAEIOUY(DoubleMetaphoneResult result, int
0
session.setSocketTimeoutMillis(timeout.toMillisIntBound());
0
* @throws ConfigurationException
0
String tableName = getUniqueNames(1)[0]; String tableName = getUniqueNames(1)[0]; String tableName = getUniqueNames(1)[0]; String tableName = getUniqueNames(1)[0]; String tableName = getUniqueNames(1)[0]; String tableName = getUniqueNames(1)[0]; String tableName = getUniqueNames(1)[0]; String tableName = getUniqueNames(1)[0]; String tableName = getUniqueNames(1)[0]; String table = getUniqueNames(1)[0]; String table = getUniqueNames(1)[0]; String table = getUniqueNames(1)[0]; String table = getUniqueNames(1)[0]; String table = getUniqueNames(1)[0]; String table = getUniqueNames(1)[0]; String tableName = getUniqueNames(1)[0];
0
import com.twitter.common.quantity.Data; taskFactory = new MesosTaskFactoryImpl(new ExecutorConfig(EXECUTOR_PATH)); .setExecutorId(MesosTaskFactoryImpl.getExecutorId(TASK.getTaskId())) .setScalar(Scalar.newBuilder().setValue(MesosTaskFactoryImpl.CPUS))) .setScalar(Scalar.newBuilder().setValue(MesosTaskFactoryImpl.RAM.as(Data.MB))))
0
import org.w3c.dom.Document; * Wraps the 'parseXML' method of the Window interface. */ public static Object jsFunction_parseXML(Context cx, Scriptable thisObj, Object[] args, Function funObj) throws JavaScriptException { int len = args.length; WindowWrapper ww = (WindowWrapper)thisObj; Window window = ww.window; if (len >= 2) { return window.parseXML ((String)NativeJavaObject.coerceType(String.class, args[0]), (Document)NativeJavaObject.coerceType(Document.class, args[1])); } return null; } /**
0
import org.apache.flink.core.memory.DataInputView;
0
* or more contributor license agreements. See the NOTICE file * regarding copyright ownership. The ASF licenses this file * with the License. You may obtain a copy of the License at * KIND, either express or implied. See the License for the
0
d1 = sdf1.parse("31 d\u00e9c 2004"); d2 = sdf2.parse("dhj 31, 2004"); d3 = sdf3.parse("DEC 31, 2004"); d1 = sdf1.parse("dec 31, 2004"); d2 = sdf2.parse("hij 31, 2004"); d2 = sdf1.parse("hij 31, 2004"); d2 = sdf2.parse("dec 31, 2004");
0
protected boolean sslQuorumReloadCertFiles = false; } else if (key.equals("sslQuorumReloadCertFiles")) { sslQuorumReloadCertFiles = Boolean.parseBoolean(value); try (ClientX509Util clientX509Util = new ClientX509Util()) { String sslAuthProp = "zookeeper.authProvider." + System.getProperty(clientX509Util.getSslAuthProviderProperty(), "x509"); if (System.getProperty(sslAuthProp) == null) { if ("zookeeper.authProvider.x509".equals(sslAuthProp)) { System.setProperty("zookeeper.authProvider.x509", "org.apache.zookeeper.server.auth.X509AuthenticationProvider"); } else { throw new ConfigException("No auth provider configured for the SSL authentication scheme '" + System.getProperty(clientX509Util.getSslAuthProviderProperty()) + "'."); }
0
addReturnToSelf(); getFirstChild(), Constants._TAG_REFERENCE new Reference(getDocument(), baseURI, referenceURI, this, transforms, digestURI); appendSelf(ref); addReturnToSelf(); setLocalIdAttribute(Constants._ATT_ID, Id); return getLocalAttribute(Constants._ATT_ID); getFirstChild(), Constants._TAG_REFERENCE
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/jelly-tags/junit/src/java/org/apache/commons/jelly/tags/junit/RunTag.java,v 1.2 2003/01/25 17:56:53 morgand Exp $ * $Revision: 1.2 $ * $Date: 2003/01/25 17:56:53 $ * $Id: RunTag.java,v 1.2 2003/01/25 17:56:53 morgand Exp $ import org.apache.commons.jelly.JellyTagException; * @version $Revision: 1.2 $ public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException {
0
// It is important here that our first serialization goes to our most basic // type so that we handle the case when we don't know the types of certain // properties because the intermediate instance of PipelineOptions never // saw their interface. serializeDeserialize(PipelineOptions.class, options)); @Test expectedException.expect(JsonMappingException.class); expectedException.expectMessage("Failed to serialize and deserialize property 'value'");
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/decorators/Attic/AbstractBufferDecorator.java,v 1.2 2003/08/31 17:24:46 scolebourne Exp $ * any, must include the following acknowledgement: * Alternately, this acknowledgement may appear in the software itself, * if and wherever such third-party acknowledgements normally appear. * @version $Revision: 1.2 $ $Date: 2003/08/31 17:24:46 $
0
import org.apache.http.HttpHeaders; response.addHeader(HttpHeaders.WWW_AUTHENTICATE, "Digest realm=\"test realm\" invalid"); response.addHeader(HttpHeaders.WWW_AUTHENTICATE, "Basic realm=\"test realm\"");
0
* Copyright (c) 2001-2004 The Apache Software Foundation. All rights
0
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; import java.util.concurrent.atomic.AtomicInteger; /** * Test that {@link ParDo} aligns both setup and teardown calls in streaming pipelines. See * https://issues.apache.org/jira/browse/BEAM-6859. */ @Test public void testParDoCallsSetupAndTeardown() { Instant instant = new Instant(0); p.apply( CreateStream.of(VarIntCoder.of(), batchDuration()) .emptyBatch() .advanceWatermarkForNextBatch(instant.plus(Duration.standardMinutes(5))) .nextBatch( TimestampedValue.of(1, instant), TimestampedValue.of(2, instant), TimestampedValue.of(3, instant)) .advanceNextBatchWatermarkToInfinity()) .apply(ParDo.of(new LifecycleDoFn())); p.run(); assertThat( "Function should have been torn down", LifecycleDoFn.teardownCalls.intValue(), is(equalTo(LifecycleDoFn.setupCalls.intValue()))); } private static class LifecycleDoFn extends DoFn<Integer, Integer> { static AtomicInteger setupCalls = new AtomicInteger(0); static AtomicInteger teardownCalls = new AtomicInteger(0); @Setup public void setup() { setupCalls.incrementAndGet(); } @Teardown public void teardown() { teardownCalls.incrementAndGet(); } @SuppressWarnings("unused") @ProcessElement public void process(ProcessContext context) { Integer element = context.element(); context.output(element); } }
0
StatsProvider statsProvider) { // for updates or preemption. chosenOffer = Optional.ofNullable(Iterables.getFirst(matchingOffers, null)); chosenOffer.ifPresent(hostOffer -> matchesByOffer.put( hostOffer.getOffer().getId().getValue(), new SchedulingMatch(task, hostOffer)));
0
* Get the cache used to cache file objects.
0
package org.apache.accumulo.core.dataImpl; import org.apache.accumulo.core.clientImpl.Table; import org.apache.accumulo.core.dataImpl.thrift.TKeyExtent;
0
package org.apache.commons.ognl;
0
final Map<String, String> propertiesExpectedOozieEnv = new HashMap<>(); final Map<String, String> propertiesExpectedHiveEnv = new HashMap<>(); final Map<String, String> propertiesExpectedFalconEnv = new HashMap<>(); final Map<String, String> falconStartupConfigProperties= new HashMap<>(); .andReturn(new HashSet<>(Arrays.asList(privilegeAdmin))) .andReturn(new HashSet<>(Arrays.asList(privilegeClusterUserC1))) .andReturn(new HashSet<>(Arrays.asList(privilegeClusterUserC1, privilegeClusterOperatorC1))) .andReturn(new HashSet<>(Arrays.asList(privilegeClusterUserC1, privilegeClusterOperatorC1, privilegeClusterUserC2, privilegeClusterOperatorC2))) .andReturn(new HashSet<>(Arrays.asList(privilegeAdmin, privilegeClusterOperatorC1))) .andReturn(new HashSet<>(Arrays.asList(privilegeAdmin, privilegeClusterUserC1, privilegeClusterOperatorC1))) .andReturn(new HashSet<>(Arrays.asList(privilegeAdmin, privilegeClusterUserC1, privilegeClusterOperatorC1, privilegeClusterUserC2, privilegeClusterOperatorC2))) List<ViewInstanceEntity> instances = new ArrayList<>(); Map<String,String> propertyMap = new HashMap<>(); final Map<String, String> newPqsProperties = new HashMap<>(); final Map<String, String> newProperties = new HashMap<>();
0
// A coder to use for the WriteOperation.
0
* Cloud Datastore has a limit of 10MB per RPC, so we also flush if the total size of mutations * exceeds this limit. This is set lower than the 10MB limit on the RPC, as this only accounts for * the mutations themselves and not the CommitRequest wrapper around them. */ static final int DATASTORE_BATCH_UPDATE_BYTES_LIMIT = 5_000_000; /** private int mutationsSize = 0; // Accumulated size of protos in mutations. Mutation write = c.element(); int size = write.getSerializedSize(); if (mutations.size() > 0 && mutationsSize + size >= DatastoreV1.DATASTORE_BATCH_UPDATE_BYTES_LIMIT) { flushBatch(); } mutationsSize += size; mutationsSize = 0;
0
assertTrue("Verification failed for " + filename, verify); ResourceResolverSpi resolver = new OfflineResolver(); assertTrue("Verification failed for " + filename, verify);
0
* @version $Revision: 1.49 $ /** The Map of the namespace prefix -&gt; URIs defined for the current element */
0
* @version $Id: DecoderException.java,v 1.11 2004/09/09 16:00:13 ggregory Exp $ * @see <a href="http://c2.com/cgi/wiki?AlwaysDeclareSerialVersionUid">Always Declare Serial Version Uid</a>
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
assertEquals(9, FilenameUtils.getPrefixLength("//server/a/b/c.txt")); assertEquals(-1, FilenameUtils.getPrefixLength("\\\\\\a\\b\\c.txt")); assertEquals(-1, FilenameUtils.getPrefixLength("///a/b/c.txt")); }
0
/* * $HeadURL$ * $Revision$ * $Date$ * ==================================================================== * * 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. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * */ package org.apache.http.impl; import junit.framework.*; public class TestAllImpl extends TestCase { public TestAllImpl(String testName) { super(testName); } public static Test suite() { TestSuite suite = new TestSuite(); suite.addTest(TestNIOHttpTransmitterAndReceiver.suite()); return suite; } public static void main(String args[]) { String[] testCaseName = { TestAllImpl.class.getName() }; junit.textui.TestRunner.main(testCaseName); } }
0
boolean failed = false; String defaultFsSchema = FileSystem.getDefaultUri(conf).getScheme(); String fsName = null; URI targetURI = new URI(resource.getTarget()); String targetSchema = targetURI.getScheme(); if(targetSchema != null && !targetSchema.equals(defaultFsSchema)) { String authority = targetURI.getAuthority(); if(authority == null) { authority = ""; } fsName = String.format("%s://%s/", targetSchema, authority); } else if(resource.getNameservice() != null) { fsName = resource.getNameservice(); } if(!fileSystemNameToInstance.containsKey(fsName)) { if(fsName == null) { fileSystemUrl = new URI(fsName); fileSystemNameToInstance.put(fsName, dfs); if(!fileSystemToResource.containsKey(fsName)) { fileSystemToResource.put(fsName, new ArrayList<Resource>()); fileSystemToResource.get(fsName).add(resource); failed = true; if(!failed) { System.out.println("All resources created."); } else { System.exit(1); }
0
Document doc = XMLUtils.read(fileIn, false);
0
import com.twitter.aurora.gen.TaskConfig; new Function<TaskConfig, String>() { @Override public String apply(TaskConfig task) { TaskConfig newConfiguration =
0
* $Id: TestCollectionUtils.java,v 1.15 2003/04/04 22:22:28 scolebourne Exp $ * $Revision: 1.15 $ * $Date: 2003/04/04 22:22:28 $ * Tests for CollectionUtils. * * @author Matthew Hawthorne * @author Stephen Colebourne * * @version $Revision: 1.15 $ $Date: 2003/04/04 22:22:28 $ public BulkTest bulkTestTypedCollection() { return new TestTypedCollection("") { public Collection typedCollection() { return CollectionUtils.typedCollection( new ArrayList(), super.getType()); } public BulkTest bulkTestAll() { return new TestCollection("") { public Collection makeCollection() { return typedCollection(); } public Collection makeConfirmedCollection() { return new ArrayList(); } public Collection makeConfirmedFullCollection() { ArrayList list = new ArrayList(); list.addAll(java.util.Arrays.asList(getFullElements())); return list; } public Object[] getFullElements() { return getFullNonNullStringElements(); } public Object[] getOtherElements() { return getOtherNonNullStringElements(); } }; } }; }
0
: DefaultExpressionEngine.INSTANCE;
0
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ambari.server.controller.spi; /** * Marker interface for metadata embedded in {@link RequestStatus}. */ public interface RequestStatusMetaData { }
0
class Properties implements Destroyable, Map<String,char[]> { public Set<Map.Entry<String,char[]>> entrySet() { static class TokenProperty implements Comparable<TokenProperty> {
0
import org.apache.atlas.notification.NotificationEntityChangeListener;
1
import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger log = LoggerFactory.getLogger(DefaultCryptoModule.class);
0
import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger LOG = LoggerFactory.getLogger(Titan0Graph.class); public ScriptEngine getGremlinScriptEngine() { ScriptEngineManager manager = new ScriptEngineManager(); ScriptEngine engine = manager.getEngineByName("gremlin-groovy"); //Do not cache script compilations due to memory implications engine.getContext().setAttribute("#jsr223.groovy.engine.keep.globals", "phantom", ScriptContext.ENGINE_SCOPE); return engine; } @Override public void releaseGremlinScriptEngine(ScriptEngine scriptEngine) { // no action needed } @Override public Object executeGremlinScript(ScriptEngine scriptEngine, Map<? extends String, ? extends Object> userBindings, String query, boolean isPath) throws ScriptException { if (LOG.isDebugEnabled()) { LOG.debug("executeGremlinScript(query={}, userBindings={})", query, userBindings); } Bindings bindings = scriptEngine.createBindings(); if (userBindings != null) { bindings.putAll(userBindings); bindings.put("g", getGraph()); return convertGremlinScriptResult(isPath, result); Object result = null; ScriptEngine engine = getGremlinScriptEngine(); try { Bindings bindings = engine.createBindings(); bindings.put("g", getGraph()); result = engine.eval(gremlinQuery, bindings); } finally { releaseGremlinScriptEngine(engine); }
0
properties = getProperties( properties, config.getPidString(), service );
0
* @version $Revision$ $Date$
0
* Copyright 2016 Seznam.cz, a.s.
0
(int) type};
0
public static <T> Predicate<T> notNullPredicate() {
0
import org.apache.beam.vendor.grpc.v1p21p0.com.google.protobuf.ByteString; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.io.ByteStreams;
0
/** * The SocketClient provides the basic operations that are required of * client objects accessing sockets. It is meant to be * method, which allows you to control the type of Socket the SocketClient * creates for initiating network connections. This is especially useful * for adding SSL or proxy support as well as better support for applets. For */ /** */ /** The default SocketFactory shared by all SocketClient instances. */ /** The timeout to use after opening a socket. */ /** The socket used for the connection. */ /** */ /** The default port the client should connect to. */ /** The socket's InputStream. */ /** The socket's OutputStream. */ /** The socket's SocketFactory. */ /** * <a href="org.apache.commons.net.DefaultSocketFactory.html">DefaultSocketFactory </a>. */ /** */ /** */ /** */ /** */ /** */ /** */ /** */ /** */ /** */ /** */ /** */ /** */ /** */ /** */ /** */ /** */ /** */ /** */ /** */ /** */ /** */ /** */ /** */ /** */ /** */
0
package org.apache.atlas.repository.converters;
0
import com.google.common.collect.ImmutableMap; import com.google.common.collect.Sets; /** * The key property ids for a RequestSchedule resource. */ private static Map<Resource.Type, String> keyPropertyIds = ImmutableMap.<Resource.Type, String>builder() .put(Resource.Type.Cluster, REQUEST_SCHEDULE_CLUSTER_NAME_PROPERTY_ID) .put(Resource.Type.RequestSchedule, REQUEST_SCHEDULE_ID_PROPERTY_ID) .build(); /** * The property ids for a RequestSchedule resource. */ private static Set<String> propertyIds = Sets.newHashSet( REQUEST_SCHEDULE_ID_PROPERTY_ID, REQUEST_SCHEDULE_CLUSTER_NAME_PROPERTY_ID, REQUEST_SCHEDULE_DESC_PROPERTY_ID, REQUEST_SCHEDULE_STATUS_PROPERTY_ID, REQUEST_SCHEDULE_LAST_STATUS_PROPERTY_ID, REQUEST_SCHEDULE_BATCH_PROPERTY_ID, REQUEST_SCHEDULE_SCHEDULE_PROPERTY_ID, REQUEST_SCHEDULE_CREATE_USER_PROPERTY_ID, REQUEST_SCHEDULE_AUTHENTICATED_USER_PROPERTY_ID, REQUEST_SCHEDULE_UPDATE_USER_PROPERTY_ID, REQUEST_SCHEDULE_CREATE_TIME_PROPERTY_ID, REQUEST_SCHEDULE_UPDATE_TIME_PROPERTY_ID, REQUEST_SCHEDULE_BATCH_SEPARATION_PROPERTY_ID, REQUEST_SCHEDULE_BATCH_TOLERATION_PROPERTY_ID, REQUEST_SCHEDULE_BATCH_REQUESTS_PROPERTY_ID, BATCH_REQUEST_TYPE_PROPERTY_ID, BATCH_REQUEST_URI_PROPERTY_ID, BATCH_REQUEST_ORDER_ID_PROPERTY_ID, BATCH_REQUEST_BODY_PROPERTY_ID, SCHEDULE_DAYS_OF_MONTH_PROPERTY_ID, SCHEDULE_MINUTES_PROPERTY_ID, SCHEDULE_HOURS_PROPERTY_ID, SCHEDULE_YEAR_PROPERTY_ID, SCHEDULE_DAY_OF_WEEK_PROPERTY_ID, SCHEDULE_MONTH_PROPERTY_ID, SCHEDULE_START_TIME_PROPERTY_ID, SCHEDULE_END_TIME_PROPERTY_ID); protected RequestScheduleResourceProvider(AmbariManagementController managementController) { super(Resource.Type.RequestSchedule, propertyIds, keyPropertyIds, managementController); return new HashSet<>(keyPropertyIds.values());
0
/* * Copyright (C) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.google.cloud.dataflow.sdk.runners; import javax.annotation.Nullable; /** * Signals there was an error retrieving information about a job from the Cloud Dataflow Service. */ public class ServiceException extends AbstractJobException { private static final long serialVersionUID = 0L; ServiceException(DataflowPipelineJob job, String message) { this(job, message, null); } ServiceException(DataflowPipelineJob job, String message, @Nullable Throwable cause) { super(job, message, cause); } }
0
import javax.annotation.CheckForNull; public FilterHandler[] getFilterHandlers(@CheckForNull final ServletHandler servletHandler, @Nonnull final DispatcherType dispatcherType, @Nonnull final String requestURI)
0
public ThreadMonitorTestCase(final String name) { final Thread monitor = ThreadMonitor.start(100); } catch (final InterruptedException e) { final Thread monitor = ThreadMonitor.start(200); } catch (final InterruptedException e) { final Thread monitor = ThreadMonitor.start(-1); } catch (final Exception e) { final Thread monitor = ThreadMonitor.start(0); } catch (final Exception e) {
1
+ "|OSGi/Minimum-1\\.[1-9]" + "|JavaSE-1\\.6" for ( Map.Entry<String, Resource> entry : dot.getResources().entrySet()) { if ( entry.getKey().startsWith(jarOrDir)) sub.putResource( entry.getKey().substring(jarOrDir.length()+1), entry.getValue()); } verifyBundleClasspath(); public void verifyBundleClasspath() { Map<String,Map<String,String>> bcp = parseHeader(getHeader(Analyzer.BUNDLE_CLASSPATH)); if ( bcp.isEmpty() || bcp.containsKey(".")) return; for ( String path : dot.getResources().keySet()) { if ( path.endsWith(".class")) { warning("The Bundle-Classpath does not contain the actual bundle JAR (as specified with '.' in the Bundle-Classpath) but the JAR does contain classes. Is this intentional?"); return; } } }
0
package org.apache.beam.sdk.extensions.gcp.util;
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
@org.apache.felix.ipojo.extender.Extender(extension= "foo", onArrival="onArrival", onDeparture="onDeparture")
0
* @version CVS $Revision: 1.25 $ $Date: 2004/05/01 16:12:05 $ public void addConfiguredXMLCatalog(XMLCatalog newXMLCatalog) { this.xmlCatalog.addConfiguredXMLCatalog(newXMLCatalog); Document document = DocumentCache.getDocument(this.file, this); DocumentCache.storeDocument(this.file, document, this); * @param patchFile Patch file final File patchFile) throws TransformerException, IOException, DOMException, SAXException { Document component = DocumentCache.getDocument(patchFile, this); String filename = patchFile.toString(); private String basename(String fileName) { int start = fileName.lastIndexOf(FSEP)+1; // last '/' int end = fileName.lastIndexOf("."); // last '.' end = fileName.length(); return fileName.substring(start, end);
0
public class RuntimeInvisibleParameterAnnotations extends ParameterAnnotations
0
} catch (WebApplicationException e) { LOG.error("Unable to get entity list for dslQuery {}", dslQuery, e); throw e; } catch (WebApplicationException e) { LOG.error("Unable to get entity list for gremlinQuery {}", gremlinQuery, e); throw e; } catch (WebApplicationException e) { LOG.error("Unable to get entity list for query {}", query, e); throw e;
0
import java.lang.reflect.InvocationTargetException; protected FileObject decorateFileObject(FileObject file) throws FileSystemException file = new OnCallRefreshFileObject(file); } if (getFileSystemManager().getFileObjectDecoratorConst() != null) { try { file = (FileObject) getFileSystemManager().getFileObjectDecoratorConst().newInstance(new Object[]{file}); } catch (InstantiationException e) { throw new FileSystemException("vfs.impl/invalid-decorator.error", getFileSystemManager().getFileObjectDecorator().getName(), e); } catch (IllegalAccessException e) { throw new FileSystemException("vfs.impl/invalid-decorator.error", getFileSystemManager().getFileObjectDecorator().getName(), e); } catch (InvocationTargetException e) { throw new FileSystemException("vfs.impl/invalid-decorator.error", getFileSystemManager().getFileObjectDecorator().getName(), e); }
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
SystemLogger.init(context); SystemLogger.destroy();
0
* @author <a * href="http://jakarta.apache.org/commons/configuration/team-list.html">Commons * Configuration team</a>
0
* <h3>Permissions</h3> * <p>When reading from a Dataflow source or writing to a Dataflow sink using * {@code DataflowRunner}, the Google cloudservices account and the Google compute engine service * account of the GCP project running the Dataflow Job will need access to the corresponding * source/sink.
0
private static String decodePath(String path, String encoding)
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.felix.cm.integration.helper; import java.util.Dictionary; import org.osgi.framework.BundleContext; import org.osgi.framework.Constants; import org.osgi.framework.ServiceRegistration; import org.osgi.service.cm.ManagedService; public class ManagedServiceTestActivator extends BaseTestActivator { public static ManagedServiceTestActivator INSTANCE; private Dictionary registrationProps; private ServiceRegistration registration; public void start( BundleContext context ) throws Exception { this.registrationProps = getServiceProperties( context ); this.registration = context.registerService( ManagedService.class.getName(), this, this.registrationProps ); INSTANCE = this; } public void stop( BundleContext arg0 ) throws Exception { INSTANCE = null; } public void changePid( final String newPid ) { this.registrationProps.put( Constants.SERVICE_PID, toServicePidObject( newPid ) ); this.registration.setProperties( this.registrationProps ); } }
0
List<Integer> current = new ArrayList<>(); Capture<DBColumnInfo> repoVersionHiddenColumnCapture = newCapture(); expectUpdateRepositoryVersionTableTable(repoVersionHiddenColumnCapture); verifyUpdateRepositoryVersionTableTable(repoVersionHiddenColumnCapture); /** * Sets expectations for DDL work on the * {@link UpgradeCatalog260#REPO_VERSION_TABLE}. * * @param hiddenColumnCapture * @throws SQLException */ public void expectUpdateRepositoryVersionTableTable(Capture<DBColumnInfo> hiddenColumnCapture) throws SQLException { dbAccessor.addColumn(eq(UpgradeCatalog260.REPO_VERSION_TABLE), capture(hiddenColumnCapture)); expectLastCall().once(); } public void verifyUpdateRepositoryVersionTableTable(Capture<DBColumnInfo> hiddenColumnCapture) { DBColumnInfo hiddenColumn = hiddenColumnCapture.getValue(); Assert.assertEquals(0, hiddenColumn.getDefaultValue()); Assert.assertEquals(UpgradeCatalog260.REPO_VERSION_HIDDEN_COLUMN, hiddenColumn.getName()); Assert.assertEquals(false, hiddenColumn.isNullable()); }
0
package org.apache.accumulo.examples.simple.helloworld;
0
import org.apache.http.client.methods.HttpUriRequest; if (request instanceof HttpUriRequest) { requestURI = ((HttpUriRequest) request).getURI(); } else { try { requestURI = new URI(request.getRequestLine().getUri()); } catch (final URISyntaxException ignore) { }
0
@Override @Override @Override @Override @Override @Override @Override @Override @Override
0
exp = exp*10+(current-'0');
0
CODER.encode(valueInGlobalWindow(data), output);
0
private static final String REVOKE_AGENT_CRT = "openssl ca " + "-config {0}/ca.config -keyfile {0}/{4} -revoke {0}/{2} -batch " + "-passin pass:{3} -cert {0}/{5}"; Object[] scriptArgs = {srvrKstrDir,agentCrtReqName,agentCrtName, srvrCrtPass,srvrKeyName,srvrCrtName}; //Revoke previous agent certificate if exists File agentCrtFile = new File(srvrKstrDir + File.separator + agentCrtName); if (agentCrtFile.exists()) { LOG.info("Revoking of " + agentHostname + " certificate."); String command = MessageFormat.format(REVOKE_AGENT_CRT, scriptArgs); int commandExitCode = runCommand(command); if (commandExitCode != 0) { response.setResult(SignCertResponse.ERROR_STATUS); response.setMessage(ShellCommandUtil.getOpenSslCommandResult(command, commandExitCode)); return response; } }
0
* @since 1.2
0
package org.apache.cocoon.portal.sitemap.modules; import org.apache.cocoon.portal.sitemap.Constants; * The module will insert the boolean value specifying whether the coplet is * maxpageable or not as value of attribute "value" in &lt;map:parameter&gt;. * There are two possibilities how the module obtains the information required for * 2) Otherwise the portal name and the coplet id must be passed in the object model public class CopletModule public Object getAttribute(String name, Configuration modeConf, Map objectModel) String copletId = null;
0
import org.apache.batik.util.CSSConstants; case CSSPrimitiveValue.CSS_IDENT: { String str = value.getStringValue(); if (str.equalsIgnoreCase(CSSConstants.CSS_NONE_VALUE)) { } else if (str.equalsIgnoreCase (CSSConstants.CSS_CURRENTCOLOR_VALUE)) { return SVG_PAINTTYPE_CURRENTCOLOR; return SVG_PAINTTYPE_RGBCOLOR; } case CSSPrimitiveValue.CSS_IDENT: return SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR; if (v1.getCssValueType() == CSSValue.CSS_VALUE_LIST) // Should probably check this more deeply... return SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR; case CSSPrimitiveValue.CSS_IDENT: { String str = v1.getStringValue(); if (str.equalsIgnoreCase(CSSConstants.CSS_NONE_VALUE)) { } else if (str.equalsIgnoreCase (CSSConstants.CSS_CURRENTCOLOR_VALUE)) { return SVG_PAINTTYPE_URI_CURRENTCOLOR; return SVG_PAINTTYPE_URI_RGBCOLOR; } return SVG_PAINTTYPE_UNKNOWN;
0
import java.util.Arrays; import java.util.List; import java.util.Optional;
0
private final FtpFileNameParser parser = new FtpFileNameParser(); return parser.parseFtpUri( uri ); final FileName rootName = new DefaultFileName( parser, ftpUri.getRootUri(), "/" ); if ( username == null ) if ( password == null )
0