Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
.getWatermarkThatGuaranteesFiring(window)); .getWatermarkThatGuaranteesFiring(window));
0
Element nsctx = doc.createElementNS(null, "nsctx"); nsctx.setAttributeNS(Constants.NamespaceSpecNS, "xmlns:ds", Constants.SignatureSpecNS); boolean thisOneWasSigned = sig.getSignedInfo().getVerificationResult(i); System.out .println(new String(sig.getSignedInfo() .getSignedContentItem(i))); System.out .println(new String(sig.getSignedInfo() .getReferencedContentBeforeTransformsItem(0).getBytes()));
0
import org.apache.felix.sigil.common.model.ModelElementFactory; import org.apache.felix.sigil.common.model.eclipse.ISigilBundle; import org.apache.felix.sigil.common.model.osgi.IRequiredBundle; import org.apache.felix.sigil.common.repository.IBundleResolver; import org.apache.felix.sigil.common.repository.IRepositoryManager; import org.apache.felix.sigil.common.repository.IResolution; import org.apache.felix.sigil.common.repository.ResolutionConfig; import org.apache.felix.sigil.common.repository.ResolutionException;
0
* TODO: Check if blueprint in cluster definition AND its parents already exists Blueprints.getInstance().createDummyBlueprint("cluster123-site-site-site-blueprint", "0", null, null); Blueprints.getInstance().createDummyBlueprint("cluster123-site-site-blueprint", "0", "cluster123-site-site-site-blueprint", "0"); Blueprints.getInstance().createDummyBlueprint("cluster123-site-blueprint", "0", "cluster123-site-site-blueprint", "0"); /* * Check if the cluster blueprint and its parents exist * getBlueprint would throw exception if it does not find the blueprint */ Blueprint bp = Blueprints.getInstance() .getBlueprint(cdef.getBlueprintName(), Integer.parseInt(cdef.getBlueprintRevision())); while (bp.getParentName() != null) { if (bp.getParentRevision() == null) { bp = Blueprints.getInstance() .getBlueprint(bp.getParentName(), -1); } else { bp = Blueprints.getInstance() .getBlueprint(bp.getParentName(), Integer.parseInt(bp.getParentRevision())); } }
0
import org.apache.http.HttpResponse; HttpRequest request = this.conn.receiveRequestHeader(this.params); if (((HttpEntityEnclosingRequest) request).expectContinue()) { this.conn.receiveRequestEntity((HttpEntityEnclosingRequest) request); protected void handleException(final HttpException ex, final HttpResponse response) { protected void doService(final HttpRequest request, final HttpResponse response)
0
import org.apache.hc.core5.util.CharArrayBuffer;
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
1
Set<String> nameSet = params.getNames(); Set<String> localnameSet = params.getLocalNames(); Set<String> defaultnameSet = params.getDefaultNames();
0
public Set<KeyExtent> migrationsSnapshot() { return Collections.emptySet();
0
public void awaitTermination(final long time, final TimeUnit timeUnit) throws InterruptedException { thread.join((timeUnit != null ? timeUnit : TimeUnit.MILLISECONDS).toMillis(time));
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/test/org/apache/commons/validator/RequiredNameTest.java,v 1.14 2003/10/05 16:41:09 dgraham Exp $ * $Revision: 1.14 $ * $Date: 2003/10/05 16:41:09 $ * @version $Revision: 1.14 $ $Date: 2003/10/05 16:41:09 $
0
if (log.isDebugEnabled()) log.debug("Created SignatureDSA using " + algorithmID.getAlgorithmID()
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
public static final String USER = "userName"; public static final String DB_STORE_TYPE = "dbStoreType"; public static final String DB_STORE_USAGE = "storeUse"; public static final String SOURCE = "source"; public static final String DESCRIPTION = "description"; public static final String STORE_URI = "storeUri"; public static final String OPERATION = "operation"; public static final String START_TIME = "startTime"; public static final String END_TIME = "endTime"; public static final String CMD_LINE_OPTS = "commandlineOpts"; // multiple inputs and outputs for process public static final String INPUTS = "inputs"; public static final String OUTPUTS = "outputs"; tableRef.set(HiveMetaStoreBridge.DB, dbRef); storeRef.set(SqoopHook.DB_STORE_TYPE, data.getStoreType()); storeRef.set(SqoopHook.DB_STORE_USAGE, usage); storeRef.set(SqoopHook.STORE_URI, data.getUrl()); storeRef.set(SqoopHook.SOURCE, source); storeRef.set(SqoopHook.DESCRIPTION, ""); procRef.set(SqoopHook.OPERATION, data.getOperation()); procRef.set(SqoopHook.INPUTS, dbStoreRef); procRef.set(SqoopHook.OUTPUTS, hiveTableRef); procRef.set(SqoopHook.INPUTS, hiveTableRef); procRef.set(SqoopHook.OUTPUTS, dbStoreRef); procRef.set(SqoopHook.USER, data.getUser()); procRef.set(SqoopHook.START_TIME, new Date(data.getStartTime())); procRef.set(SqoopHook.END_TIME, new Date(data.getEndTime())); procRef.set(SqoopHook.CMD_LINE_OPTS, sqoopOptionsMap);
0
public boolean hasInputStream(int index, String urlPath) throws IOException public InputStream getInputStream(int index, String urlPath) throws IOException
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/axes/AttributeContext.java,v 1.3 2002/04/10 03:40:20 dmitri Exp $ * $Revision: 1.3 $ * $Date: 2002/04/10 03:40:20 $ * @version $Revision: 1.3 $ $Date: 2002/04/10 03:40:20 $ public void reset(){ setStarted = false; iterator = null; super.reset(); } if (position < getCurrentPosition()){ reset();
0
* Copyright 2016-2017 Seznam.cz, a.s.
0
* @version $Id$ /** * Recursively resolves references. */
0
import org.apache.beam.sdk.coders.CustomCoder; private static class PartitionedGlobalWindowCoder extends CustomCoder<PartitionedGlobalWindow> { @Override public void verifyDeterministic() {}
0
try { OutputCommitter committer = getHadoopFormatInstance() .getOutputCommitter( HadoopUtils.createTaskContext(conf.getWritable(), 0)); committer.setupJob(HadoopUtils.createJobContext(conf.getWritable())); } catch (Exception ex) { throw new RuntimeException(ex); } try { TaskAttemptContext ctx = HadoopUtils.createTaskContext(conf.getWritable(), partitionId); RecordWriter<K, V> writer = getHadoopFormatInstance().getRecordWriter(ctx); OutputCommitter committer = getHadoopFormatInstance().getOutputCommitter(ctx); return new HadoopWriter<>(writer, committer, ctx); } catch (Exception ex) { throw new RuntimeException(ex); } try { OutputCommitter committer = getHadoopFormatInstance() .getOutputCommitter( HadoopUtils.createTaskContext(conf.getWritable(), 0)); committer.commitJob(HadoopUtils.createJobContext(conf.getWritable())); } catch (Exception ex) { throw new IOException(ex); } public void rollback() throws IOException { try { OutputCommitter committer = getHadoopFormatInstance() .getOutputCommitter( HadoopUtils.createTaskContext(conf.getWritable(), 0)); committer.abortJob(HadoopUtils.createJobContext( conf.getWritable()), JobStatus.State.FAILED); } catch (Exception ex) { throw new IOException(ex); }
0
final class BeanPropertySetterRule extends AbstractXmlRule { public BeanPropertySetterRule( RulesBinder targetRulesBinder, PatternStack patternStack ) { super( targetRulesBinder, patternStack ); protected void bindRule( LinkedRuleBuilder linkedRuleBuilder, Attributes attributes ) throws Exception { linkedRuleBuilder.setBeanProperty().withName( attributes.getValue( "propertyname" ) );
0
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkNotNull;
0
writer.write("<form action=\"iPOJO\" method=\"get\">" writer.write("<form action=\"iPOJO\" method=\"get\">" return "<a href=\"iPOJO?factory=" + n + "\">" + n + "</a>"; return "<a href=\"iPOJO?instance=" + name + "\">" + name + "</a>"; s += "<a href=\"iPOJO?instance=" + "<td><a href=\"iPOJO?factory=" + name + "\">"
0
package org.apache.felix.sigil.model;
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.components.accessor; import org.apache.cocoon.environment.ObjectModelHelper; import org.apache.cocoon.environment.Request; import org.apache.cocoon.environment.Session; /** * @version SVN $Id$ */ public class SessionAccessor extends ObjectModelAccessor { public Object getObject() { Request request = ObjectModelHelper.getRequest(getObjectModel()); Session session = request.getSession(false); return session; } }
0
import org.apache.beam.sdk.coders.NullableCoder; static <T> NullableCoder<T> inferCoder( return NullableCoder.of(coderRegistry.getDefaultCoder(clazz));
0
throw new SCRDescriptorException("Unable to add methods to " + this.getName(), className, 0, e);
0
/* * Copyright 1999-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.cocoon.forms.formmodel; /** * The {@link WidgetDefinition} part of a GoogleMap widget, see {@link GoogleMap} for more information. */ public class GoogleMapDefinition extends AbstractWidgetDefinition { private GoogleMapValue initialValue; public Widget createInstance() { return new GoogleMap(this); } /** * initialize this definition with the other, sort of like a copy constructor */ public void initializeFrom(WidgetDefinition definition) throws Exception { super.initializeFrom(definition); if(definition instanceof GoogleMapDefinition) { GoogleMapDefinition other = (GoogleMapDefinition)definition; this.initialValue = other.initialValue; } else { throw new Exception("Definition to inherit from is not of the right type! (at "+getLocation()+")"); } } public void setInitialValue(GoogleMapValue value) { checkMutable(); this.initialValue = value; } public GoogleMapValue getInitialValue() { return this.initialValue; } }
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/test/org/apache/commons/beanutils/locale/LocaleConvertUtilsTestCase.java,v 1.2 2003/05/07 19:30:51 rdonkin Exp $ * $Revision: 1.2 $ * $Date: 2003/05/07 19:30:51 $ import java.util.Locale; import java.text.DecimalFormat; import java.text.NumberFormat; * @author Paul Hamamnt & Rune Johannesen (pairing) - patches. * @version $Revision: 1.2 $ $Date: 2003/05/07 19:30:51 $ private char m_decimalSeparator; NumberFormat nf = DecimalFormat.getNumberInstance(); String result = nf.format(1.1); // could be commas instead of stops in Europe. m_decimalSeparator = result.charAt(1); assertEquals("Double->String", "123" + m_decimalSeparator + "4", assertEquals("Float->String", "123" + m_decimalSeparator + "4", value = LocaleConvertUtils.convert("123" + m_decimalSeparator + "456", Double.TYPE); value = LocaleConvertUtils.convert("123" + m_decimalSeparator + "456", Double.class); value = LocaleConvertUtils.convert("123" + m_decimalSeparator + "456", Float.TYPE); value = LocaleConvertUtils.convert("123" + m_decimalSeparator + "456", Float.class);
0
$Id: ActionImpl.java,v 1.2 2004/03/01 10:36:22 andreas Exp $
0
* Gets the key at the specified index. * The index enumeration starts at 0. * Gets the size of the list of keys, this number is the number of values this object was created with.
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
* * private DelegatingConnection<? extends Connection> conn = null; conn = new DelegatingConnection<>(delegateConn); DelegatingConnection<Connection> conn2 = new DelegatingConnection<>(delegateConn); DelegatingConnection<Connection> conn2 = new DelegatingConnection<>(delegateConn2); DelegatingConnection<Connection> conn2 = new DelegatingConnection<>(delegateConn); DelegatingConnection<Connection> conn3 = new DelegatingConnection<>(null); assertTrue(conn3.equals(new DelegatingConnection<>(null))); } conn = new DelegatingConnection<>(null); conn._closed = true; conn = new DelegatingConnection<>(pc); } conn = new DelegatingConnection<>(new RTEGeneratingConnection());
0
* @since 3.0
0
List<String> expectedList1 = new ArrayList<String>(); } List<String> expectedList2 = new ArrayList<String>(); List<String> actualList = EnumerationUtils.toList(new StringTokenizer(TO_LIST_FIXTURE)); Hashtable<String, Integer> expected = new Hashtable<String, Integer>(); List<Integer> actualEltList = EnumerationUtils.toList(expected.elements()); List<Integer> expectedEltList = new ArrayList<Integer>(); List<String> actualKeyList = EnumerationUtils.toList(expected.keys()); List<String> expectedKeyList = new ArrayList<String>();
0
private static final long serialVersionUID = 1L;
0
assertNotNull(expected + ": Null DH created", expected.create()); assertArrayEquals("P1", DHGroupData.getP1(), DHGroupData.getOakleyGroupPrimeValue("group2.prime")); assertArrayEquals("P14", DHGroupData.getP14(), DHGroupData.getOakleyGroupPrimeValue("group14.prime"));
0
import org.apache.zookeeper.common.HostNameUtils; public String getElectionAddress() { return HostNameUtils.getHostString(peer.getElectionAddress()) + ":" + peer.getElectionAddress().getPort(); } public String getClientAddress() { return HostNameUtils.getHostString(peer.getClientAddress()) + ":" + peer.getClientAddress().getPort(); } public String getLearnerType(){ return peer.getLearnerType().toString(); } public long getConfigVersion(){ return peer.getQuorumVerifier().getVersion(); } @Override public String getQuorumSystemInfo() { return peer.getQuorumVerifier().toString(); } @Override public boolean isPartOfEnsemble() { return peer.getView().containsKey(peer.getId()); }
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/servlet/JellyServlet.java,v 1.2 2002/12/11 12:41:02 jstrachan Exp $ * $Revision: 1.2 $ * $Date: 2002/12/11 12:41:02 $ * $Id: JellyServlet.java,v 1.2 2002/12/11 12:41:02 jstrachan Exp $ * @version $Revision: 1.2 $
0
* * @since 4.0
0
import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.discovery.TimelineMetricMetadataManager; private final TimelineMetricReadHelper readHelper; TimelineMetricMetadataManager metricMetadataManager, readHelper = new TimelineMetricReadHelper(metricMetadataManager, true); condition.addOrderByColumn("UUID");
0
package org.apache.felix.sigil.model;
0
"Authentication method (i.e password," + " kerberos, provider). Set more properties for chosen method below.", "Max amount" + " of time (in seconds) an unresponsive server will be re-tried. An" + " exception is thrown when this timeout is exceeded. Set to zero for no timeout."), "Change the" + " durability for the BatchWriter session. To use the table's durability" + " setting. use \"default\" which is the table's durability setting."),
0
import org.apache.cocoon.xml.NamespacesTable; import org.apache.cocoon.xml.NamespacesTable.Declaration; /** A {@link NamespacesTable} used to filter namespace declarations. */ protected NamespacesTable namespaces; /** this.namespaces = new NamespacesTable(); this.namespaces = null; /** * @see org.apache.cocoon.transformation.AbstractSAXTransformer#startTransformingElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes) */ /** * @see org.apache.cocoon.transformation.AbstractSAXTransformer#endTransformingElement(java.lang.String, java.lang.String, java.lang.String) */ * <p>Receive notification of the start of a prefix mapping.</p> * * <p>This transformer will remove all prefix mapping declarations for those * prefixes associated with the <code>http://apache.org/cocoon/include/1.0</code> * namespace.</p> * * @see org.xml.sax.ContentHandler#startPrefixMapping(String, String) */ public void startPrefixMapping(String prefix, String nsuri) throws SAXException { // Skipping mapping for our namespace this.namespaces.addDeclaration(prefix, nsuri); if (!CINCLUDE_NAMESPACE_URI.equals(nsuri)) { super.startPrefixMapping(prefix, nsuri); } } /** * <p>Receive notification of the end of a prefix mapping.</p> * * <p>This transformer will remove all prefix mapping declarations for those * prefixes associated with the <code>http://apache.org/cocoon/include/1.0</code> * namespace.</p> * * @see org.xml.sax.ContentHandler#endPrefixMapping(java.lang.String) */ public void endPrefixMapping(String prefix) throws SAXException { Declaration d = this.namespaces.removeDeclaration(prefix); if ( d == null || !CINCLUDE_INCLUDE_ELEMENT.equals(d.getUri()) ) { super.endPrefixMapping(prefix); } } /**
0
logicalTaskMap.put(installTask, new HashMap<>()); logicalTaskMap.put(startTask, new HashMap<>()); logicalTaskMap.put(installTask, new HashMap<>()); logicalTaskMap.put(startTask, new HashMap<>());
0
case Setting: return new SettingResourceProvider();
0
package org.apache.sling.felix.webconsole.internal.obr; import org.apache.sling.felix.webconsole.Action;
0
private Collection<ViewInstancePropertyEntity> properties = new HashSet<>(); private Collection<ViewInstanceDataEntity> data = new HashSet<>(); private Collection<ViewEntityEntity> entities = new HashSet<>(); private final Map<Resource.Type, ResourceProvider> resourceProviders = new HashMap<>(); private final Map<String, Object> services = new HashMap<>(); Map<String, String> propertyMap = new HashMap<>(); Map<String, String> applicationData = new HashMap<>(); Map<String, ValidationResult> propertyResults = new HashMap<>(); Set<String> requiredParameterNames = new HashSet<>();
0
List<ParallelInstruction> instructions = Arrays.asList(createReadInstruction("Read"), createParDoInstruction(0, 0, "DoFn1", "DoFnUserName"), createParDoInstruction(1, 0, "DoFnWithContext", "DoFnWithContextUserName"), createWriteInstruction(2, 0, "Write")); return createParDoInstruction(producerIndex, producerOutputNum, systemName, ""); } static ParallelInstruction createParDoInstruction( int producerIndex, int producerOutputNum, String systemName, String userName) { instruction.setName(userName);
0
reconfig(zkArr[leaderIndex], joiningServers, null, null, -1);
0
setBundleProtectionDomain(((BundleImpl) bundle).adapt(BundleRevisionImpl.class)); void setBundleProtectionDomain(BundleRevisionImpl revisionImpl) throws Exception BundleImpl bundleImpl = revisionImpl.getBundle(); certificates = signers.keySet().toArray(new java.security.cert.Certificate[signers.size()]); new BundleProtectionDomain(revisionImpl, certificates));
1
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ambari.server.actionmanager; public enum RequestStatus { /// At least, one task is pending/queued or in progress IN_PROGRESS, /// All tasks are completed COMPLETED, /// At least, one task is failed/timed out or aborted FAILED }
1
properties.setProperty(Configuration.SERVER_VERSION_FILE, "../version");
0
package org.apache.commons.digester3.xmlrules; /* * 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
* Gets a copy of all of the configuration properties that back this * {@link Configuration} instance. * * @return a copy of all of the properties. */ public Properties getProperties() { return new Properties(properties); } /**
0
* Creates a new instance of {@code MapConfiguration} which uses the * specified {@code Properties} object as its data store. All changes of * this configuration affect the given {@code Properties} object and * vice versa. Note that while {@code Properties} actually * implements {@code Map<Object, Object>}, we expect it to contain only * string keys. Other key types will lead to {@code ClassCastException} * exceptions on certain methods. * Helper method for converting the type of the {@code Properties} object * to a supported map type. As stated by the comment of the constructor, * we expect the {@code Properties} object to contain only String key; * therefore, it is safe to do this cast. @SuppressWarnings("unchecked") @SuppressWarnings("rawtypes") Map map = props;
0
initPropMap.put("HBASE_MASTER", new String[]{"hbase.ssl.enabled"}); initPropMap.put("HBASE_REGIONSERVER", new String[]{"hbase.ssl.enabled"}); boolean isHttpsEnabled; String propetyVal = protocolMap.get(componentName); if (service.equals(Service.Type.HBASE)) { isHttpsEnabled = Boolean.valueOf(propetyVal); } else { isHttpsEnabled = PROPERTY_HDFS_HTTP_POLICY_VALUE_HTTPS_ONLY.equals(propetyVal); } jmxProtocolString = getJMXProtocolStringFromBool(isHttpsEnabled); private String getJMXProtocolStringFromBool(boolean isHttpsEnabled) { return isHttpsEnabled ? "https" : "http";
0
* @version $Id$
0
@Test public void testGetAmbariBlacklistFile() { Properties ambariProperties = new Properties(); Configuration conf = new Configuration(ambariProperties); Assert.assertEquals(null, conf.getAmbariBlacklistFile()); ambariProperties = new Properties(); ambariProperties.setProperty(Configuration.PROPERTY_MASK_FILE.getKey(), "ambari-blacklist.properties"); conf = new Configuration(ambariProperties); Assert.assertEquals("ambari-blacklist.properties", conf.getAmbariBlacklistFile()); }
0
final int statusCode = response.getStatusLine().getStatusCode(); final HttpRequest request = (HttpRequest) context.getAttribute( final String method = request.getRequestLine().getMethod(); final Header locationHeader = response.getFirstHeader("location"); final String location = locationHeader.getValue(); } catch (final URISyntaxException ex) { final HttpParams params = response.getParams(); final HttpHost target = (HttpHost) context.getAttribute( final HttpRequest request = (HttpRequest) context.getAttribute( final URI requestURI = new URI(request.getRequestLine().getUri()); final URI absoluteRequestURI = URIUtils.rewriteURI(requestURI, target, true); } catch (final URISyntaxException ex) { final HttpHost target = new HttpHost( } catch (final URISyntaxException ex) {
0
public void processHeaders( Analyzer analyzer ) throws MojoExecutionException String embedDependencyHeader = analyzer.getProperty( EMBED_DEPENDENCY ); m_embedDirectory = analyzer.getProperty( EMBED_DIRECTORY ); m_embedStripGroup = analyzer.getProperty( EMBED_STRIP_GROUP, "true" ); m_embedStripVersion = analyzer.getProperty( EMBED_STRIP_VERSION ); if ( analyzer.getProperty( Analyzer.BUNDLE_CLASSPATH ) == null ) analyzer.setProperty( Analyzer.BUNDLE_CLASSPATH, "." ); appendDependencies( analyzer, Analyzer.INCLUDE_RESOURCE, includeResource.toString() ); appendDependencies( analyzer, Analyzer.BUNDLE_CLASSPATH, bundleClassPath.toString() ); private static void appendDependencies( Analyzer analyzer, String directiveName, String mavenDependencies ) final String instruction = analyzer.getProperty( directiveName ); analyzer.setProperty( directiveName, cleanInstruction ); analyzer.setProperty( directiveName, mergedInstruction ); analyzer.setProperty( directiveName, mavenDependencies + ',' + instruction ); analyzer.setProperty( directiveName, instruction + ',' + mavenDependencies ); analyzer.setProperty( directiveName, mavenDependencies );
0
public PoolingDataSource(ObjectPool<Connection> pool) { public void setPool(ObjectPool<Connection> pool) throws IllegalStateException, NullPointerException { Connection conn = _pool.borrowObject(); protected ObjectPool<Connection> _pool = null; public Map<String,Class<?>> getTypeMap() throws SQLException { public void setTypeMap(Map<String,Class<?>> map) throws SQLException {
0
InvocationHandler handler = new RpcServerInvocationHandler<>(instance); InvocationHandler handler = new RpcClientInvocationHandler<>(instance);
1
package org.apache.ambari.server.api.services; import org.apache.ambari.server.api.resources.ResourceDefinition; import org.apache.ambari.server.controller.utilities.PropertyHelper; import org.apache.ambari.server.api.query.Query;
0
* Copyright (c) 2001-2004 The Apache Software Foundation. All rights
0
StateSampler stateSampler, StateSampler.StateKind stateKind) { super(operationName, receivers, counterPrefix, addCounterMutator, stateSampler, stateKind); } public ReceivingOperation(String operationName, OutputReceiver[] receivers, String counterPrefix, CounterSet.AddCounterMutator addCounterMutator, counterPrefix, addCounterMutator, stateSampler);
0
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at
0
import org.apache.ambari.datastore.DataStoreFactory; import org.apache.ambari.datastore.DataStore; private final DataStore dataStore; Stacks(DataStoreFactory dataStore) throws IOException { this.dataStore = dataStore.getInstance();
0
public void incTotalBytesRecv(final long n) { public void incTotalBytesSent(final long n) { public void setContentLength(final long contentLength) {
0
String typeAndSubTypeNamesQryStr = context.getEntityType().getTypeAndAllSubTypesQryStr(); if (typeAndSubTypeNamesQryStr.length() <= MAX_QUERY_STR_LENGTH_TYPES) { queryString.append(AND_STR).append(typeAndSubTypeNamesQryStr); LOG.warn("'{}' has too many subtypes (query-string-length={}) to include in index-query; might cause poor performance", context.getEntityType().getTypeName(), typeAndSubTypeNamesQryStr.length()); String typeAndSubTypeNamesStr = context.getClassificationType().getTypeAndAllSubTypesQryStr(); if (typeAndSubTypeNamesStr.length() <= MAX_QUERY_STR_LENGTH_TAGS) { queryString.append(AND_STR).append(typeAndSubTypeNamesStr); LOG.warn("'{}' has too many subtypes (query-string-length={}) to include in index-query; might cause poor performance", context.getClassificationType().getTypeName(), typeAndSubTypeNamesStr.length());
0
public void testSimpleVsArgument() throws OptionException { public void testSimpleVsBurst() throws OptionException { public void testSimpleVsChildren() throws OptionException { public void testSimpleVsArgumentVsBurst() throws OptionException { public void testSimpleVsArgumentVsChildren() throws OptionException { public void testSimpleVsBurstVsChildren() throws OptionException { public void testSimpleVsArgumentVsBurstVsChildren()
0
* Proxy method for {@link java.security.Signature#initSign(java.security.PrivateKey, protected abstract void engineInitSign(Key signingKey, SecureRandom secureRandom)
1
import java.io.DataInput; * Construct object from input stream. * * @param input Input stream StackMap(int name_index, int length, DataInput input, ConstantPool constant_pool) throws IOException { map_length = input.readUnsignedShort(); map[i] = new StackMapEntry(input, constant_pool);
0
if (memberEntity.getUser() != null) { users.add(new User(memberEntity.getUser())); } else { LOG.error("Wrong state, not found user for member '{}' (group: '{}')", memberEntity.getMemberId(), memberEntity.getGroup().getGroupName()); }
0
* CVS $Id: ContainerDelegate.java,v 1.3 2004/01/06 12:36:07 joerg Exp $ // private WidgetDefinition definition; private static final String WIDGETS_EL = "widgets"; // this.definition = definition;
0
String tableName = OptUtil.getTableOpt(cl, shellState);
0
createAggregator(SUCCESS_COUNTER, Sum.ofIntegers()); createAggregator(FAILURE_COUNTER, Sum.ofIntegers()); createAggregator(SUCCESS_COUNTER, Sum.ofIntegers()); createAggregator(FAILURE_COUNTER, Sum.ofIntegers()); createAggregator(SUCCESS_COUNTER, Sum.ofIntegers()); createAggregator(FAILURE_COUNTER, Sum.ofIntegers());
0
cid.setTemporaryAttribute("portlet-mode", mode.toString()); cid.setTemporaryAttribute("window-state", state.toString()); int size = CopletInstanceData.SIZE_NORMAL; if ( state.equals(WindowState.MAXIMIZED) ) { size = CopletInstanceData.SIZE_MAXIMIZED; } else if ( state.equals(WindowState.MINIMIZED) ) { size = CopletInstanceData.SIZE_MINIMIZED; } if ( size != cid.getSize() ) {
0
private InetSocketAddress start() throws Exception { this.server.start(); this.server.registerHandler("*", new HttpAsyncRequestHandler<HttpRequest>() { final InetSocketAddress address = start(); this.server.registerHandler("*", new HttpAsyncRequestHandler<HttpRequest>() { final InetSocketAddress address = start(); this.server.registerHandler("*", new HttpAsyncRequestHandler<HttpRequest>() { final InetSocketAddress address = start();
0
List<ByteBuffer> tableSplits = tpc.proxy().listSplits(userpass, testtable, 10); List<ByteBuffer> tableSplits = tpc.proxy().listSplits(userpass, testtable, 10);
0
package org.apache.beam.runners.core.metrics; import org.apache.beam.sdk.metrics.MetricQueryResults; /** * This is the default Metrics Sink that just store in a static field the first counter (if it * exists) attempted value. This is usefull for tests. */ public class DummyMetricsSink extends MetricsSink<Long> { private static long counterValue; @Override protected MetricsSerializer<Long> provideSerializer() { return new MetricsSerializer<Long>() { @Override public Long serializeMetrics(MetricQueryResults metricQueryResults) throws Exception { return metricQueryResults.counters().iterator().hasNext() ? metricQueryResults.counters().iterator().next().attempted() : null; } }; } @Override protected void writeSerializedMetrics(Long metrics) throws Exception { counterValue = metrics != null ? metrics : 0L; } public static long getCounterValue(){ return counterValue; } }
0
* An alternative solution is to generate only cinclude tags by using the * {@link org.apache.cocoon.portal.layout.renderer.aspect.impl.CIncludeCopletAspect} * and include the coplet contents later. That would allow caching up to the point * of the cinclude transformer. * * <h2>Example XML:</h2> * <pre> * &lt;content&gt; * &lt;!-- content streamed from coplet --&gt; * &lt;/content&gt; * </pre> * * <h2>Applicable to:</h2> * <ul> * <li>{@link org.apache.cocoon.portal.layout.impl.CopletLayout}</li> * </ul> * @version CVS $Id: DefaultCopletAspect.java,v 1.5 2004/04/25 20:09:34 haul Exp $
0
import org.apache.batik.ext.awt.image.ARGBChannel;
0
* @version $Id: RefinedSoundex.java,v 1.19 2004/05/24 00:23:17 ggregory Exp $ return soundex((String) pObject);
0
* @deprecated Replaced by the new {@link ArrayConverter} implementation
0
private List<DependencyInfo> dependencies = new ArrayList<>(); logs = new ArrayList<>(); customCommands = new ArrayList<>();
1
package org.apache.ambari.server.state.live;
0
public class TestHashBag<T> extends AbstractTestBag<T> { public Bag<T> makeObject() { return new HashBag<T>();
0
package org.apache.bookkeeper.util; /** * 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. */ /** * Provides misc math functions that dont come standard */ public class MathUtils { public static int signSafeMod(long dividend, int divisor){ int mod = (int) (dividend % divisor); if (mod < 0){ mod += divisor; } return mod; } }
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
@Deprecated
0
@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 * * 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.configuration.tree.xpath; import org.apache.commons.configuration.tree.NodeHandler; import org.apache.commons.jxpath.JXPathContext; /** * <p> * An internally used helper class for creating new XPath context objects. * </p> * <p> * This class is used by {@link XPathExpressionEngine}. It simplifies testing. * </p> * * @version $Id$ */ class XPathContextFactory { /** * Creates a new {@code JXPathContext} based on the passed in arguments. * * @param root the root node * @param handler the node handler * @param <T> the type of the nodes to be handled * @return the newly created context */ public <T> JXPathContext createContext(T root, NodeHandler<T> handler) { JXPathContext context = JXPathContext.newContext(ConfigurationNodePointerFactory .wrapNode(root, handler)); context.setLenient(true); return context; } }
0
DataNode dataNode = new DataNode(oldDataNode.data,
0
* Install bundle metadata to local OBR. * * * @parameter expression="${repository-path}" alias="repository-path"
0
Adapter ca = converter.newAdapter(); Adapter ca = converter.newAdapter(); Adapter ca2 = ca.newAdapter(); assertEquals(5, (int) ca2.convert("Hello").to(Integer.class)); Adapter ca = converter.newAdapter(); Adapter ca = converter.newAdapter();
0
import java.util.Arrays; import java.util.Collection; import java.util.Collections; import org.apache.commons.vfs2.util.UserAuthenticatorUtils; import com.jcraft.jsch.Session;
0
import org.apache.beam.dsls.sql.interpreter.operator.comparison.BeamSqlIsNotNullExpression; import org.apache.beam.dsls.sql.interpreter.operator.comparison.BeamSqlIsNullExpression;
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
public class IntHashMap<K extends Number, V> implements Map<K, V> private Entry<V> table[]; private Entry<T> next; public Entry<T> getNext() public void setNext( Entry<T> next ) Entry<V> oldTable[] = table; Entry<V> newTable[] = new Entry[newCapacity]; for ( Entry<V> old = oldTable[i]; old != null; ) Entry<V> e = old; for ( Entry<V> e = table[index]; e != null; e = e.next ) public final V get( int key ) for ( Entry<V> e = table[index]; e != null; e = e.getNext() ) public final V put( int key, V value ) for ( Entry<V> e = table[index]; e != null; e = e.next ) V old = e.getValue(); Entry<V> e = new Entry<V>( key, key, value ); public final V remove( int key ) for ( Entry<V> e = table[index], prev = null; e != null; prev = e, e = e.next ) public V get( Object key ) public V put( K key, V value ) public void putAll( Map<? extends K, ? extends V> otherMap ) for ( Iterator<? extends K> it = otherMap.keySet().iterator(); it.hasNext(); ) K k = it.next(); public V remove( Object key ) Entry<V> tab[] = table; Entry<V> tab[] = table; for ( Entry<V> e = tab[i]; e != null; e = e.next ) public Set<K> keySet() Set<K> result = new HashSet<K>(); for ( Iterator<K> it = new IntHashMapIterator( table, true ); it.hasNext(); ) public Collection<V> values() List<V> result = new ArrayList<V>(); for ( Iterator<V> it = new IntHashMapIterator( table, false ); it.hasNext(); ) public Set<Map.Entry<K, V>> entrySet()
0