Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
AccumuloClient client; client = context.getClient(creds.getPrincipal(), creds.getToken()); try (Scanner scan = client.createScanner(RootTable.NAME, Authorizations.EMPTY)) {
0
StreamingApplication apexApp = (dag, conf) -> copyShallow(params.dag, dag);
0
public ImportedClassReference(IPackageImport packageImport, String typeName)
0
import java.util.Collection; import org.osgi.framework.ServiceFactory; import org.osgi.framework.ServiceObjects; @SuppressWarnings({ "unchecked", "rawtypes" }) public ServiceRegistration registerService(String[] clazzes, Object service, Dictionary properties) { public ServiceRegistration registerService(String clazz, Object service, Dictionary properties) { @Override public <S> ServiceRegistration<S> registerService(Class<S> clazz, S service, Dictionary<String, ?> properties) { return m_context.registerService(clazz, service, properties); } @Override public <S> ServiceRegistration<S> registerService(Class<S> clazz, ServiceFactory<S> factory, Dictionary<String, ?> properties) { return m_context.registerService(clazz, factory, properties); } @Override public <S> ServiceReference<S> getServiceReference(Class<S> clazz) { return m_context.getServiceReference(clazz); } @Override public <S> Collection<ServiceReference<S>> getServiceReferences(Class<S> clazz, String filter) throws InvalidSyntaxException { return m_context.getServiceReferences(clazz, filter); } @Override public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) { return m_context.getServiceObjects(reference); } @Override public Bundle getBundle(String location) { return m_context.getBundle(location); }
0
/** * The bridge context for the referenced document. */ protected BridgeContext subCtx; associateSVGContext(ctx, e, gn); (BridgeContext ctx, Element e, CompositeGraphicsNode gn) { throw new BridgeException(ctx, e, ERR_ATTRIBUTE_MISSING, associateSVGContext(ctx, e, node); (SVGUtilities.convertTransform(e, SVG_TRANSFORM_ATTRIBUTE, s, ctx)); if (evtNode.getNamespaceURI() == null && (attrName.equals(SVG_X_ATTRIBUTE) || attrName.equals(SVG_Y_ATTRIBUTE) || attrName.equals(SVG_TRANSFORM_ATTRIBUTE))) { } else if (evtNode.getNamespaceURI() == null && (attrName.equals(SVG_WIDTH_ATTRIBUTE) || attrName.equals(SVG_HEIGHT_ATTRIBUTE)) || XLINK_NAMESPACE_URI.equals(evtNode.getNamespaceURI()) && XLINK_HREF_ATTRIBUTE.equals(evtNode.getLocalName())) {
1
@Override @Override AccumuloInputFormat.setInputInfo(job, args[0], args[1].getBytes(), args[2], new Authorizations()); AccumuloInputFormat.setZooKeeperInstance(job, args[3], args[4]); AccumuloOutputFormat.setOutputInfo(job, args[0], args[1].getBytes(), true, args[5]); AccumuloOutputFormat.setZooKeeperInstance(job, args[3], args[4]);
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
* Copyright 2002,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 $Revision: 1.4 $
0
public class ManagedDataSource<C extends Connection> extends PoolingDataSource<C> { public ManagedDataSource(ObjectPool<C> pool,
0
static class ListDirectoryWalker extends DirectoryWalker<File> { protected void handleDirectoryStart(File directory, int depth, Collection<File> results) throws IOException { protected void handleFile(File file, int depth, Collection<File> results) throws IOException {
0
doNamespaceFateOperation(FateOperation.NAMESPACE_CREATE, Arrays.asList(ByteBuffer.wrap(namespace.getBytes(UTF_8))), Collections.emptyMap(), namespace);
0
import org.apache.commons.vfs.FileSystemException; protected FileName createFileName(String rootURI, String scheme, final String rootFile, final String path) return new LocalFileName(rootURI, scheme, rootFile, path);
0
@Deprecated
0
import java.util.Map; * @param propertyAttributes Attributes map public StackConfigurationResponse(String propertyName, String propertyValue, String propertyDescription, String type, Map<String, String> propertyAttributes) { setPropertyAttributes(propertyAttributes); * @param propertyAttributes Attributes map Boolean isRequired, String propertyType, Map<String, String> propertyAttributes) { setPropertyAttributes(propertyAttributes); private Map<String, String> propertyAttributes; /** * Provides attributes of this configuration. * * @return Map of attribute name to attribute value */ public Map<String, String> getPropertyAttributes() { return propertyAttributes; /** * Sets attributes for this configuration. * * @param propertyAttributes Map of attribute name to attribute value */ public void setPropertyAttributes(Map<String, String> propertyAttributes) { this.propertyAttributes = propertyAttributes;
0
import org.apache.http.Header; import org.apache.http.auth.ContextAwareAuthScheme; Header header; if (authScheme instanceof ContextAwareAuthScheme) { header = ((ContextAwareAuthScheme) authScheme).authenticate( creds, request, context); } else { header = authScheme.authenticate(creds, request); } request.addHeader(header);
0
PAYLOAD_CODER.encode(value.getPayload(), outStream); byte[] payload = PAYLOAD_CODER.decode(inStream);
0
import com.google.common.collect.Sets; import com.twitter.mesos.gen.JobConfiguration; import java.util.Collections; import java.util.Comparator; import java.util.List; user.jobCount = Sets.newHashSet(Iterables.transform(activeUserTasks, new Function<TrackedTask, String>() { @Override public String apply(TrackedTask task) { return task.getJobName(); } })).size(); template.setAttribute("users", DisplayUtils.sort(users.values(), DisplayUtils.SORT_USERS_BY_NAME)); template.setAttribute("cronJobs", DisplayUtils.sort(cronScheduler.getJobs(), DisplayUtils.SORT_JOB_CONFIG_BY_NAME)); static class User {
0
@Override public AtlasVertexQuery<AtlasJanusVertex, AtlasJanusEdge> label(String label) { query.labels(label); return this; } @Override public AtlasVertexQuery<AtlasJanusVertex, AtlasJanusEdge> has(String key, Object value) { query.has(key, value); return this; }
1
* * @deprecated since 2.0. This class maintained for backwards compatibility please do not remove. * New users should use org.apache.accumulo.hadoop.mapred.AccumuloInputFormat @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.felix.ipojo.runtime.core.test.components; public class ParentClass { public void parentStart() { } public void parentStop() { } protected String[] strings; protected String string; protected int upStrings; protected int upString; public void updateStrings(String[] bb) { strings = bb; upStrings++; } public void updateString(String bb) { string = bb; upString++; } }
0
* $HeadURL$
0
* @exception TranscoderException if the method want to forward * the exception * @exception TranscoderException if the method want to forward * the exception * @exception TranscoderException if the method want to forward * the exception
0
@Override public String toString() { return "Late binding task of reference " + serviceReference + " for dependencyManagers " + dependencyManagers; }
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.bundlerepository.impl; import org.apache.felix.bundlerepository.Reason; import org.apache.felix.bundlerepository.Requirement; import org.apache.felix.bundlerepository.Resource; public class ReasonImpl implements Reason { private final Resource resource; private final Requirement requirement; public ReasonImpl(Resource resource, Requirement requirement) { this.resource = resource; this.requirement = requirement; } public Resource getResource() { return resource; } public Requirement getRequirement() { return requirement; } }
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.framework.capabilityset; import org.apache.felix.framework.resolver.Module; import java.util.List; public interface Capability { static final String MODULE_NAMESPACE = "module"; static final String HOST_NAMESPACE = "host"; static final String PACKAGE_NAMESPACE = "package"; public static final String PACKAGE_ATTR = "package"; public static final String VERSION_ATTR = "version"; Module getModule(); String getNamespace(); Directive getDirective(String name); List<Directive> getDirectives(); Attribute getAttribute(String name); List<Attribute> getAttributes(); List<String> getUses(); }
0
import org.apache.commons.collections.TransformerUtils; * @version $Revision: 1.6 $ $Date: 2004/04/10 22:22:57 $ return TransformedSortedMap.decorate(new TreeMap(), TransformerUtils.nopTransformer(), TransformerUtils.nopTransformer());
0
xscale = yscale = (double) i / 0x4000; xscale = (double) i / 0x4000; yscale = (double) i / 0x4000; xscale = (double) i / 0x4000; scale01 = (double) i / 0x4000; scale10 = (double) i / 0x4000; yscale = (double) i / 0x4000;
0
import org.apache.sshd.common.util.buffer.Buffer;
0
if ((tx1 < tx0) || (ty1 < ty0)) return;
0
public class TestStaticBucketMap extends AbstractTestMap { protected Map makeEmptyMap() {
0
static int findOffline(ServerContext context, String tableName) throws TableNotFoundException { Iterator<TabletLocationState> zooScanner = new ZooTabletStateStore(context).iterator();
0
import org.apache.batik.util.SoftDoublyIndexedTable; protected SoftDoublyIndexedTable styles = new SoftDoublyIndexedTable(); CSSOMReadOnlyStyleDeclaration result; result = (CSSOMReadOnlyStyleDeclaration)styles.get(elt, pseudoElt); styles.put(elt, pseudoElt, sd); * Clears the caches. styles.clear(); if (elt instanceof HiddenChildElement) { result = ((HiddenChildElement)elt).getCascadedStyle(); if (result != null) { return new CSSOMReadOnlyStyleDeclaration(result); } } result = getCascadedStyle(elt, pseudoElt); addUserAgentProperties(elt, pseudoElt, result); addUserProperties(elt, pseudoElt, result); addNonCSSPresentationalHints(elt, pseudoElt, result); addAuthorStyleSheetProperties(elt, pseudoElt, result); addInlineStyleProperties(elt, pseudoElt, result); addOverrideStyleProperties(elt, pseudoElt, result); /* if (value.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) { if (value.getPrimitiveType() == CSSPrimitiveValue.CSS_URI) { value.setImmutableValue (new ImmutableString (CSSPrimitiveValue.CSS_URI, new ParsedURL(basePURL, value.getStringValue()).toString())); } } */
0
import org.apache.ambari.datastore.DataStoreFactory; import org.apache.ambari.datastore.DataStore; private final DataStore dataStore; DataStoreFactory dataStore, this.dataStore = dataStore.getInstance(); DataStoreFactory dataStore,
0
import org.apache.accumulo.fate.Repo; import org.apache.accumulo.fate.zookeeper.IZooReaderWriter; import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
1
import java.util.Comparator; import java.util.stream.StreamSupport; public Iterable<PTransformNode> getTopologicallyOrderedTransforms() { return StreamSupport.stream( Networks.topologicalOrder(pipelineNetwork, Comparator.comparing(PipelineNode::getId)) .spliterator(), false) .filter(PTransformNode.class::isInstance) .map(PTransformNode.class::cast) .collect(Collectors.toList()); }
0
hc.append(conf);
0
if (this.credentialsStore != null) { final Credentials credentials = this.credentialsStore.getCredentials(new AuthScope(host)); if (credentials == null) { final BasicScheme basicScheme = new BasicScheme(); basicScheme.initPreemptive(credentials); this.authCache.put(host, basicScheme); } if (this.credentialsStore != null) { final Credentials credentials = this.credentialsStore.getCredentials(new AuthScope(proxy)); if (credentials == null) { final BasicScheme basicScheme = new BasicScheme(); basicScheme.initPreemptive(credentials); this.authCache.put(proxy, basicScheme); }
0
XMLUtils.addReturnToNode(nl); XMLUtils.addReturnToNode(nl); XMLUtils.addReturnToNode(nl);
0
*/ public L2D() { super(org.apache.bcel.Constants.L2D); } /** * Call corresponding visitor method(s). The order is: * Call visitor methods of implemented interfaces first, then * call methods according to the class hierarchy in descending order, * i.e., the most specific visitXXX() call comes last. * * @param v Visitor object */ public void accept( Visitor v ) { v.visitTypedInstruction(this); v.visitStackProducer(this); v.visitStackConsumer(this); v.visitConversionInstruction(this); v.visitL2D(this); }
0
SINGLE, BATCH
1
import org.apache.solr.common.StringUtils; if(!performAccessChecks(importDirectory)) { return; } private boolean performAccessChecks(String path) { boolean ret = false; if(StringUtils.isEmpty(path)) { ret = false; } else { File f = new File(path); ret = f.exists() && f.isDirectory() && f.canRead(); } if (ret) { LOG.info("will migrate data in directory {}", importDirectory); } else { LOG.error("cannot read migration data in directory {}", importDirectory); } return ret; } storeInitializer.instanceIsActive(); processIncomingTypesDef(getFileFromImportDirectory(importDirectory, ATLAS_MIGRATION_TYPESDEF_NAME));
0
@Deprecated
0
public void setup() throws Exception {
0
import java.util.Optional; Optional.empty()); Optional.empty(), Optional.empty());
0
@Override protected void setUp() {
0
import org.apache.felix.http.base.internal.service.listener.ServletRequestAttributeListenerManager; import org.apache.felix.http.base.internal.service.listener.ServletRequestListenerManager;
0
if (saslEnabled()) { opts.updateKerberosCredentials(); if (saslEnabled()) { vopts.updateKerberosCredentials();
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.hc.core5.annotation.Contract; import org.apache.hc.core5.annotation.ThreadingBehavior; @Contract(threading = ThreadingBehavior.IMMUTABLE_CONDITIONAL)
0
* * <p>TODO: Consider making the interface in terms of (1-column) rows. reuvenlax
0
/* * Copyright 2003,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.commons.vfs.provider.webdav; import org.apache.commons.vfs.provider.FileNameParser; import org.apache.commons.vfs.provider.URLFileNameParser; /** * Implementation for the webdav filesystem. * < p/> * Additionally encodes every character below space (' ') */ public class WebdavFileNameParser extends URLFileNameParser { private final static WebdavFileNameParser INSTANCE = new WebdavFileNameParser(); public WebdavFileNameParser() { super(80); } public boolean encodeCharacter(char ch) { return super.encodeCharacter(ch) || ch < ' '; } public static FileNameParser getInstance() { return INSTANCE; } }
0
* @version CVS $Id: AuthenticationContext.java,v 1.16 2004/03/19 13:59:22 cziegeler Exp $ resolver); resolver); resolver); resolver); resolver); resolver); resolver); resolver); resolver); resolver); SourceResolver resolver) SourceResolver resolver) SourceResolver resolver) SourceResolver resolver)
0
if (singularAttribute != null) { if (null == path) { path = m_root.get(singularAttribute.getName()); } else { path = path.get(singularAttribute.getName()); } if (lastSingularAttribute != null) { Class<?> clazz = lastSingularAttribute.getJavaType(); if (clazz.isEnum()) { Class<? extends Enum> enumClass = (Class<? extends Enum>) clazz; value = Enum.valueOf(enumClass, value.toString()); }
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
@Test public void testBadRequest() throws Exception { final HttpHost target = start(); final Future<SimpleHttpResponse> future = httpclient.execute( SimpleHttpRequest.get(target, "/random/boom"), null); final SimpleHttpResponse response = future.get(); Assert.assertThat(response, CoreMatchers.notNullValue()); Assert.assertThat(response.getCode(), CoreMatchers.equalTo(400)); }
0
package org.osgi.util.converter;
0
package org.apache.batik.svggen;
0
import java.awt.geom.Rectangle2D; * Returns the bounds of the area painted by this shape painter */ public Rectangle2D getPaintedBounds(){ if (shape != null){ return shape.getBounds2D(); } else { return null; } } /**
0
* @throws ArrayStoreException if the arrayClass is invalid @SuppressWarnings("unchecked")
0
this._constructionElement.setAttributeNS(null, EncryptionConstants._ATT_URI, URI); .getAttributeNS(null, EncryptionConstants._ATT_URI);
0
for (String key : layout.getKeys()) assertEquals("Wrong header comment", layout.getHeaderComment(), l2.getHeaderComment()); assertEquals("Wrong footer comment", layout.getFooterComment(), l2.getFooterComment()); builder.addComment("A footer comment");
0
import static org.ops4j.pax.exam.CoreOptions.*; import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.*; mavenBundle().groupId("org.ow2.chameleon").artifactId("transaction-geronimo").version(asInProject()), ), repository("http://maven.ow2.org/maven2-snapshot/")
0
import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.util.zip.InflaterInputStream; import com.google.common.io.ByteStreams; import com.twitter.mesos.gen.storage.LogEntry._Fields; final AtomicLong deflatedEntriesRead = Stats.exportLong("scheduler_log_deflated_entries_read"); if (logEntry.isSet(_Fields.DEFLATED_ENTRY)) { // Decompress the entry before replaying. ByteArrayOutputStream inflated = new ByteArrayOutputStream(); ByteBuffer data = logEntry.getDeflatedEntry(); LOG.info("Inflating deflated log entry of size " + data.remaining()); InflaterInputStream inflater = new InflaterInputStream( new ByteArrayInputStream(data.array(), data.position(), data.remaining())); try { ByteStreams.copy(inflater, inflated); logEntry = decodeLogEntry(inflated.toByteArray()); vars.deflatedEntriesRead.incrementAndGet(); } catch (IOException e) { throw new CodingException("Failed to inflate compressed log entry.", e); } }
0
context = contexts.get(contextName);
1
return new ReduceFnRunner<>( KEY, objectStrategy, stateInternals, timerInternals, windowingInternals, droppedDueToClosedWindow, reduceFn);
0
import org.apache.accumulo.core.client.TableExistsException; String table = getTableNames(1)[0]; String table = getTableNames(1)[0]; String table = getTableNames(1)[0]; String table = getTableNames(1)[0]; String table = getTableNames(1)[0]; @Test(expected = IllegalArgumentException.class) public void testNoConditions() throws AccumuloException, AccumuloSecurityException, TableExistsException, TableNotFoundException { String table = getTableNames(1)[0]; Connector conn = getConnector(); conn.tableOperations().create(table); ConditionalWriter cw = conn.createConditionalWriter(table, new ConditionalWriterConfig()); ConditionalMutation cm1 = new ConditionalMutation("r1"); cm1.put("tx", "seq", "1"); cm1.put("data", "x", "a"); cw.write(cm1); }
0
put(Resource.Type.ClusterStackVersion, REPOSITORY_STACK_VERSION_PROPERTY_ID);
0
import java.util.List; private final List<Destination> destinations; private LoadPlan(List<Destination> destinations) {
0
* Copyright 2001-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.
0
throw new FileSystemException("vfs.provider/get-type.error", e, name); throw new FileSystemException("vfs.provider/list-children.error", exc, name); throw new FileSystemException("vfs.provider/list-children.error", exc, name); throw new FileSystemException("vfs.provider/delete.error", exc, name); throw new FileSystemException("vfs.provider/copy-file.error", e, srcFile, destFile); throw new FileSystemException("vfs.provider/rename-parent-read-only.error", getName(), getParent().getName()); throw new FileSystemException("vfs.provider/rename.error", exc, destFile.getName()); throw new FileSystemException("vfs.provider/write.error", exc, name); throw new FileSystemException("vfs.provider/get-type.error", exc, name);
0
* @version $Id: CopyStreamEvent.java,v 1.4 2003/01/26 00:21:41 dfs Exp $
0
* Extracting given query_parameter value from the predicate * @param queryParameterId query parameter id * @param predicate predicate * @return the query parameter
0
import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite;
0
* any, must include the following acknowledgement: * Alternately, this acknowledgement may appear in the software itself, * if and wherever such third-party acknowledgements normally appear. * permission of the Apache Software Foundation.
0
sources[i] = new RFileSource(getFileSystem().open(paths[i]), getFileSystem().getFileStatus(paths[i]).getLen()); sources[i] = new RFileSource(new FSDataInputStream(sources[i].getInputStream()), sources[i].getLength());
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. */ if (allLoggers.size() == 0) return allLoggers; if (allLoggers.contains(preferred)) result.add(preferred);
0
// create garbage: final byte[] b = new byte[bytz]; bytz = bytz * 2; // create garbage: final byte[] b = new byte[bytz]; bytz = bytz * 2; // create garbage: final byte[] b = new byte[bytz]; bytz = bytz * 2;
0
WebContinuation wk = this.continuationsMgr.createWebContinuation(app, null, 0, this);
0
ots.addTestSuite(ManagedServiceConfigurableProperties.class);
0
import org.apache.beam.sdk.nexmark.queries.BoundedSideInputJoin; import org.apache.beam.sdk.nexmark.queries.BoundedSideInputJoinModel; if (query.needsSideInput()) { query.setSideInput(NexmarkUtils.prepareSideInput(p, configuration)); } .put(NexmarkQueryName.BOUNDED_SIDE_INPUT_JOIN, new BoundedSideInputJoinModel(configuration)) .put(NexmarkQueryName.BOUNDED_SIDE_INPUT_JOIN, new BoundedSideInputJoin(configuration))
0
@Test public void duTest() throws IOException { Shell.log.debug("Starting DU test --------------------------"); exec("createtable t", true); exec("du t", true, "0 [t]"); exec("deletetable t -f", true, "Table: [t] has been deleted"); } @Test public void duPatternTest() throws IOException { Shell.log.debug("Starting DU with pattern test --------------------------"); exec("createtable t", true); exec("createtable tt", true); exec("du -p t.*", true, "0 [t, tt]"); exec("deletetable t -f", true, "Table: [t] has been deleted"); exec("deletetable tt -f", true, "Table: [tt] has been deleted"); }
0
import org.apache.beam.sdk.extensions.euphoria.core.translate.provider.GenericTranslatorProvider; return GenericTranslatorProvider.createWithDefaultTranslators();
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 com.google.common.collect.Iterators; Iterators.size(conn.createScanner(table, Authorizations.EMPTY).iterator()); Iterators.size(conn.createScanner(table, Authorizations.EMPTY).iterator()); Iterators.size(conn.createScanner(table, Authorizations.EMPTY).iterator());
0
socket.setSoLinger(true, linger);
0
Document destDocument = dest.getDocument(); Document destDocument = dest.getDocument();
0
e.waitForStep(1, 5000); // s2 called in init e.waitForStep(3, 5000); // s1 called in updated(), then in init() m.remove(s2); // remove conf e.waitForStep(6, 5000); // s2 destroyed, s1 called in updated(null), s1 called in destroy() if (cfg != null) { Assert.assertNotNull(component); Assert.assertNotNull(cfg); m_ensure.step(2); if (!"testvalue".equals(cfg.getTestkey())) { Assert.fail("Could not find the configured property."); } } else { m_ensure.step(); } m_ensure.step();
0
Flow flow = Flow.create("Test"); Dataset<String> lines = flow.createInput(ListDataSource.bounded( asList("one two three four", "one two three", "one two", "one"))); ListDataSink<Pair<String, Long>> f = ListDataSink.get(1); streamOutput.persist(f); assertNotNull(f.getOutput(0)); ImmutableMap<String, Pair<String, Long>> idx = Maps.uniqueIndex(f.getOutput(0), Pair::getFirst);
0
package org.apache.felix.karaf.jaas.config.impl;
0
package org.apache.beam.sdk.coders;
0
ranges = new ArrayList<>(numRanges);
0
package org.apache.http.impl.io;
0
import java.awt.EventQueue; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.PrintWriter; import java.io.StringWriter; import javax.swing.JDialog; import javax.swing.JOptionPane; public void displayError(final String msg) { Runnable r = new Runnable() { public void run() { JOptionPane pane = new JOptionPane(msg, JOptionPane.ERROR_MESSAGE); JDialog dialog = pane.createDialog(ViewerFrame.this, "ERROR"); dialog.show(); } }; if (!EventQueue.isDispatchThread()) { EventQueue.invokeLater(r); } else { r.run(); } } /** * Displays an error resulting from the specified Exception. */ public void displayError(final Exception ex) { displayError(ex.getMessage()); Thread t = DocumentLoadRunnable.createLoaderThread(uri, this, df); Thread t = DocumentLoadRunnable.createLoaderThread(uri, ViewerFrame.this, df); String uri = getClass().getResource("resources/authors.svg").toString(); Thread t = DocumentLoadRunnable.createLoaderThread(uri, ViewerFrame.this, df);
0
import org.apache.commons.jelly.JellyException; public Tag createTag(String name, Attributes attributes) throws JellyException { throws JellyException {
0
public class DefaultTypeCache implements TypeCache { * org.apache.atlas.typesystem.types.cache.TypeCache#has(java.lang * @see org.apache.atlas.typesystem.types.cache.TypeCache#has(org. * org.apache.atlas.typesystem.types.cache.TypeCache#get(java.lang * @see org.apache.atlas.typesystem.types.cache.TypeCache#get(org.apache. * org.apache.atlas.typesystem.types.cache.TypeCache#getNames(org * org.apache.atlas.typesystem.types.cache.TypeCache#getAllNames() * org.apache.atlas.typesystem.types.cache.TypeCache#put(org.apache * org.apache.atlas.typesystem.types.cache.TypeCache#putAll(java * org.apache.atlas.typesystem.types.cache.TypeCache#remove(java * @see org.apache.atlas.typesystem.types.cache.TypeCache#remove(org. * @see org.apache.atlas.typesystem.types.cache.TypeCache#clear()
0
this.settings.setWorkDirectory(this.workDir.getAbsolutePath()); this.settings.setUploadDirectory(this.uploadDir.getAbsolutePath()); this.settings.setCacheDirectory(this.cacheDir.getAbsolutePath());
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.fn.harness.fn; import java.util.function.BiFunction; /** * A {@link BiFunction} which can throw {@link Exception}s. * * <p>Used to expand the allowed set of method references to be used by Java 8 * functional interfaces. */ @FunctionalInterface public interface ThrowingBiFunction<T1, T2, T3> { T3 apply(T1 t1, T2 t2) throws Exception; }
0
* @author Apache Software Foundation
0
import org.apache.batik.ext.awt.image.codec.util.ImageEncodeParam; import org.apache.batik.ext.awt.image.codec.util.ImageEncoderImpl; import org.apache.batik.ext.awt.image.codec.util.SeekableOutputStream;
0