Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
PCollection<BeamSQLRow> upstream = planCreator.popUpstream(); planCreator.pushUpstream(projectStream);
0
import jline.console.ConsoleReader; /** * Prompts user for a password * * @return user entered Password object, null if no console exists */ public static Password promptUser() throws IOException { if (System.console() == null) { throw new IOException("Attempted to prompt user on the console when System.console = null"); } ConsoleReader reader = new ConsoleReader(); String enteredPass = reader.readLine("Enter password: ", '*'); return new Password(enteredPass); } // other token types should have resolved by this point, so return PasswordToken Password pass = null; if (securePassword != null) { pass = securePassword; } else if (password != null) { pass = password; } else { try { pass = Password.promptUser(); } catch (IOException e) { throw new RuntimeException(e); } } return new PasswordToken(pass.value);
0
* Creates and starts an embedded Apache HTTP Server (HttpComponents).
0
SortedMap<TServerInstance,TabletServerStatus> dp = new TreeMap<>(current.comparator());
0
package com.google.cloud.dataflow.examples.cookbook;
0
answer = new TagScript( return new TagScript( return new TagScript(
0
PCollection<String> pCollection = pipeline.apply("CreateFoo", Create.of("foo")); pCollection.apply("CountAll", Count.<String>globally());
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/iterators/TestArrayIterator.java,v 1.5 2003/10/01 21:54:54 scolebourne Exp $ * Copyright (c) 2001-2003 The Apache Software Foundation. All rights * permission of the Apache Software Foundation. * The code of this test was supplied by Mauricio S. Moura. * * @version $Revision: 1.5 $ $Date: 2003/10/01 21:54:54 $ public class TestArrayIterator extends AbstractTestIterator {
0
/** * @deprecated Since 1.7.0 */ @Override @Deprecated public Integer decode(byte[] b) { // This concrete implementation is provided for backwards compatibility with 1.6; it can be removed in 2.0. See ACCUMULO-3789. return super.decode(b); }
0
import org.apache.ambari.view.HttpImpersonator; /** * Get the HTTP Impersonator. * * @return the HTTP Impersonator, which internally uses the App Cookie Manager */ public HttpImpersonator getHttpImpersonator(); /** * Get the default settings for the Impersonator. * * @return the Impersonator settings. */ public ImpersonatorSetting getImpersonatorSetting();
0
CollisionHook ch = getFramework().getService(getFramework(), hook, false);
1
import java.util.Map; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /** * Gets this script pragmas. * * @return the (non null, may be empty) pragmas map */ Map<String, Object> getPragmas(); * * * * * * *
0
import org.apache.ambari.annotations.ApiIgnore; @GET @ApiIgnore // until documented @GET @ApiIgnore // until documented @POST @ApiIgnore // until documented @DELETE @ApiIgnore // until documented @PUT @ApiIgnore // until documented @PUT @ApiIgnore // until documented
0
* Copyright 1999-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. */
1
import org.apache.hc.core5.util.SocketTimeoutExceptionFactory; int getTimeoutMillis() { void onTimeout(final int timeoutMillis) throws IOException { sessionRequest.failed(SocketTimeoutExceptionFactory.create(timeoutMillis));
0
package org.apache.accumulo.core.data; public class ArrayByteSequence extends ByteSequence { protected byte data[]; protected int offset; protected int length; public ArrayByteSequence(byte data[]){ this.data = data; this.offset = 0; this.length = data.length; } public ArrayByteSequence(byte data[], int offset, int length) { if(offset < 0 || offset > data.length || length < 0 || (offset+length) > data.length){ throw new IllegalArgumentException(" Bad offset and/or length data.length = "+data.length+" offset = "+offset+" length = "+length); } this.data = data; this.offset = offset; this.length = length; } public ArrayByteSequence(String s) { this(s.getBytes()); } @Override public byte byteAt(int i) { if(i < 0){ throw new IllegalArgumentException("i < 0, "+i); } if(i >= length){ throw new IllegalArgumentException("i >= length, "+i+" >= "+length); } return data[offset + i]; } @Override public byte[] getBackingArray() { return data; } @Override public boolean isBackedByArray() { return true; } @Override public int length() { return length; } @Override public int offset() { return offset; } @Override public ByteSequence subSequence(int start, int end) { if(start > end || start < 0 || end > length){ throw new IllegalArgumentException("Bad start and/end start = "+start+" end="+end+" offset="+offset+" length="+length); } return new ArrayByteSequence(data, offset+start, end - start); } @Override public byte[] toArray() { if(offset == 0 && length == data.length) return data; byte[] copy = new byte[length]; System.arraycopy(data, offset, copy, 0, length); return copy; } public String toString(){ return new String(data, offset, length); } }
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.hedwig; import java.util.ArrayList; import java.util.List; import org.apache.hedwig.protocol.PubSubProtocol.Message; import org.apache.hedwig.server.persistence.ScanCallback; public class StubScanCallback implements ScanCallback { List<Message> messages = new ArrayList<Message>(); boolean success = false, failed = false; public void messageScanned(Object ctx, Message message) { messages.add(message); success = true; } public void scanFailed(Object ctx, Exception exception) { failed = true; success = false; } public void scanFinished(Object ctx, ReasonForFinish reason) { success = true; failed = false; } public List<Message> getMessages() { return messages; } public boolean isSuccess() { return success; } public boolean isFailed() { return failed; } }
0
* @version $Revision: 1.8 $ $Date: 2004/05/17 20:13:20 $ /* */
0
.apply( "Reify Timestamps", ParDo.of( new DoFn<KV<K, V>, KV<K, TimestampedValue<V>>>() { @ProcessElement public void processElement(ProcessContext c) { c.output( KV.of( c.element().getKey(), TimestampedValue.of(c.element().getValue(), c.timestamp()))); } })) .setCoder( KvCoder.of( inputCoder.getKeyCoder(), TimestampedValue.TimestampedValueCoder.of(inputCoder.getValueCoder()))) .setCoder(inputCoder);
0
return; } return 1; } return; } lastUpdate = Long.valueOf(0L); }
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
/* * 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.dm.lambda.itest; import static org.apache.felix.dm.lambda.DependencyManagerActivator.component; import org.apache.felix.dm.Component; import org.apache.felix.dm.DependencyManager; import org.junit.Assert; /** * @author <a href="mailto:[email protected]">Felix Project Team</a> */ public class Felix5244Test extends TestBase { private final Ensure m_ensure = new Ensure(); public void testAbstractBindMethod() throws Exception { final DependencyManager dm = getDM(); Component myService = component(dm).impl(new MyService()).withSvc(MyDependency.class, svc -> svc.required().add(AbstractService::bind)).build(); Component myDependency = component(dm).impl(new MyDependency() {}).provides(MyDependency.class).build(); dm.add(myService); dm.add(myDependency); m_ensure.waitForStep(1, 5000); dm.clear(); } interface MyDependency {} public abstract class AbstractService { void bind(MyDependency myDependency) { Assert.assertNotNull(myDependency); m_ensure.step(1); } } public class MyService extends AbstractService { } }
0
String ns = System.getProperty("hc.benchmark.n-requests", "200000"); String nc = System.getProperty("hc.benchmark.concurrent", "100"); new TestJettyHttpClient(), new TestNingHttpClient()
0
import org.apache.beam.runners.fnexecution.control.TimerReceiverFactory; import org.apache.beam.runners.fnexecution.translation.PipelineTranslatorUtils; PipelineTranslatorUtils.fireEligibleTimers( }, currentTimerKey);
0
import org.apache.accumulo.core.client.Accumulo; try (AccumuloClient client = Accumulo.newClient().from(getClientProps()).build()) {
0
lockKeyMapper.insert(lock.getKey().newBuilder());
0
import com.google.cloud.dataflow.sdk.transforms.windowing.PaneInfo; WindowedValue.of( KV.of(key, value), timestamp, Lists.newArrayList(window), PaneInfo.DEFAULT)));
0
import org.apache.commons.vfs.FileSystem;
0
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import org.apache.commons.vfs.util.UserAuthenticatorUtils;
0
if (!isRemoveSupported() || !isAddSupported()) {
0
public void failed(final Exception cause) { releaseResources(); } @Override
0
@Override @Override @Override
0
if (c == 0x0D) { } else {
0
@Deprecated
0
import java.util.List; final List<DynaProperty> list = new ArrayList<DynaProperty>();
0
package org.apache.http.impl.nio.reactor;
0
import org.apache.ambari.server.security.SecurityHelper; import org.apache.ambari.server.security.SecurityHelperImpl; bind(SecurityHelper.class).toInstance(SecurityHelperImpl.getInstance());
0
* the plugins module. Because the pre-existing Digester API doesn't provide * any option for throwing checked exceptions at some points where Plugins * can potentially fail, this exception extends RuntimeException so that it * can "tunnel" through these points.
0
import org.apache.accumulo.core.client.impl.ClientContext; import org.apache.accumulo.core.security.Credentials; ClientContext context = new ClientContext(instance, new Credentials("root", new PasswordToken("unchecked")), getClientConfig()); client = MasterClient.getConnectionWithRetry(context); stats = client.getMasterStats(Tracer.traceInfo(), context.rpcCreds());
1
package org.apache.hc.core5.http.nio; int consume(ByteBuffer src) throws IOException;
1
Document doc = XMLUtils.newDocument(false); Document document = XMLUtils.newDocument(false);
0
import org.springframework.stereotype.Service; @Service
0
// check if this instance is the active instance Configuration config = injector.getInstance(Configuration.class); if (!config.isActiveInstance()) { String errMsg = "This instance of ambari server is not designated as active. Cannot start ambari server." + "The property active.instance is set to false in ambari.properties"; throw new AmbariException(errMsg); }
0
import java.awt.Graphics2D; import java.awt.geom.Rectangle2D;
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.sshd.server.session; /** * @author <a href="mailto:[email protected]">Apache MINA SSHD Project</a> */ public interface ServerProxyAcceptorHolder { ServerProxyAcceptor getServerProxyAcceptor(); void setServerProxyAcceptor(ServerProxyAcceptor proxyAcceptor); }
0
public class HiveLineage extends AEnitityBean implements Serializable {
0
create(new HashSet<>(Arrays.asList(group)));
0
throw new RuntimeException("Failed to create a workflow job: " // Obtain all of the extractors from the PTransforms used in the pipeline so the // DataflowPipelineJob has access to them. AggregatorPipelineExtractor aggregatorExtractor = new AggregatorPipelineExtractor(pipeline); Map<Aggregator<?, ?>, Collection<PTransform<?, ?>>> aggregatorSteps = aggregatorExtractor.getAggregatorSteps(); DataflowAggregatorTransforms aggregatorTransforms = new DataflowAggregatorTransforms(aggregatorSteps, jobSpecification.getStepNames()); // Use a raw client for post-launch monitoring, as status calls may fail // regularly and need not be retried automatically. DataflowPipelineJob dataflowPipelineJob = new DataflowPipelineJob(options.getProject(), jobResult.getId(), Transport.newRawDataflowClient(options).build(), aggregatorTransforms); // DataflowJobAlreadyExistsException or DataflowJobAlreadyUpdatedExcetpion // depending on whether this is a reload or not. throw new DataflowJobAlreadyUpdatedException(dataflowPipelineJob, String.format("The job named %s with id: %s has already been updated into job id: %s " + "and cannot be updated again.", newJob.getName(), jobIdToUpdate, jobResult.getId())); throw new DataflowJobAlreadyExistsException(dataflowPipelineJob, String.format("There is already an active job named %s with id: %s. If you want " + "to submit a second job, try again by setting a different name using --jobName.", newJob.getName(), jobResult.getId()));
0
ph.append(str); for (final Rule rule : rules) { final String pattern = rule.getPattern(); patternLength = pattern.length(); if (rule.patternAndContextMatches(this.input, this.i)) { this.phonemeBuilder = this.phonemeBuilder.apply(rule.getPhoneme(), maxPhonemes); this.found = true; break; } }
0
* @throws DaemonInitException An exception that prevented * @throws Exception Any exception preventing a successful
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 ValueAndCoderKryoSerializable() {}
1
private String description = null; /** * @return the description for the definition or {@code null} if none. */ @JsonProperty("description") public String getDescription() { return description; } /** * Sets the description for this definition. * * @param definitionDescription */ public void setDescription(String definitionDescription) { description = definitionDescription; } response.setDescription(entity.getDescription());
0
CharArrayBuffer previous = this.trailerBufs.get(count - 1); CharArrayBuffer buffer = this.trailerBufs.get(i);
0
* Copyright 2002-2005 The Apache Software Foundation.
0
* @param path The path String. * @param contentStatus The content status.
0
at = svgCanvas.getRenderingTransform().createInverse();
0
import org.apache.accumulo.core.conf.Property; FileStatus[] files = fs.globStatus(new Path(acuConf.get(Property.INSTANCE_DFS_DIR) + "/tables/" + tableId + "/*/*"));
0
import org.apache.accumulo.core.data.KeyExtent; LogEntry logEntry = new LogEntry(new KeyExtent(new Text(tableId), null, null), 0, "127.0.0.1:12345", emptyWalog.toURI().toString()); LogEntry logEntry = new LogEntry(null, 0, "127.0.0.1:12345", partialHeaderWalog.toURI().toString());
1
@SuppressWarnings("unused")
0
input = p.apply(Create.of(list) .withCoder(KvCoder.of(BigEndianIntegerCoder.of(), StringUtf8Coder.of()))); input = p.apply(Create.timestamped(list, timestamps) .withCoder(KvCoder.of(BigEndianIntegerCoder.of(), StringUtf8Coder.of())));
0
* Output a nicely formatted manifest that still respects the 72 character line limit. * * @parameter expression="${niceManifest}" default-value="false" */ protected boolean niceManifest; /** ManifestPlugin.writeManifest( manifest, outputFile, niceManifest );
0
if (options.getStepOptions() != null) { this.stepOptions = fromJsonString(options.getStepOptions(), SyntheticStep.Options.class); }
0
* http://www.apache.org/licenses/LICENSE-2.0
0
package org.apache.beam.runners.spark.io;
0
package org.apache.atlas; String confLocation = System.getProperty("atlas.conf");
1
final GSSContext gssContext = createGSSContext(manager, oid, serverName, gssCredential); if (input != null) { return gssContext.initSecContext(input, 0, input.length); } else { return gssContext.initSecContext(new byte[] {}, 0, 0); } * @since 5.0 */ protected GSSContext createGSSContext( final GSSManager manager, final Oid oid, final GSSName serverName, final GSSCredential gssCredential) throws GSSException { final GSSContext gssContext = manager.createContext(serverName.canonicalize(oid), oid, gssCredential, GSSContext.DEFAULT_LIFETIME); gssContext.requestMutualAuth(true); return gssContext; } /**
0
// This is true if GlyphVector.getGlyphOutline returns glyph outlines // that are positioned (if it is false the outlines are always at 0,0). // This is true if Graphics2D.drawGlyphVector works for the // current JDK/OS combination. private static final boolean drawGlyphVectorWorks; // This is true if Graphics2D.drawGlyphVector will correctly // render Glyph Vectors with per glyph transforms. drawGlyphVectorWorks = true; drawGlyphVectorWorks = false; glyphVectorTransformWorks = false; drawGlyphVectorWorks = true; // Returns true if GlyphVector.getGlyphOutlines returns glyph outlines // that are positioned (otherwise they are always at 0,0). boolean useHinting = drawGlyphVectorWorks;
0
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */
0
import static org.apache.calcite.util.Static.RESOURCE; import org.apache.beam.sdk.extensions.sql.impl.BeamCalciteSchema; import org.apache.calcite.jdbc.CalcitePrepare; import org.apache.calcite.jdbc.CalciteSchema; import org.apache.calcite.sql.SqlExecutableStatement; import org.apache.calcite.sql.SqlUtil; abstract class SqlDropObject extends SqlDrop implements SqlExecutableStatement { public void execute(CalcitePrepare.Context context) { final List<String> path = context.getDefaultSchemaPath(); CalciteSchema schema = context.getRootSchema(); for (String p : path) { schema = schema.getSubSchema(p, true); } final boolean existed; switch (getKind()) { case DROP_TABLE: if (schema.schema instanceof BeamCalciteSchema) { BeamCalciteSchema beamSchema = (BeamCalciteSchema) schema.schema; beamSchema.getTableProvider().dropTable(name.getSimple().toLowerCase()); existed = true; } else { existed = schema.removeTable(name.getSimple()); } if (!existed && !ifExists) { throw SqlUtil.newContextException(name.getParserPosition(), RESOURCE.tableNotFound(name.getSimple())); } break; default: throw new AssertionError(getKind()); }
0
* resolver needed for Coder definitions. * <p>This resolver resolves coders. If the Coder ID is a particular * well-known identifier, it's replaced with the corresponding class. * All other Coder instances are resolved by class name, using the package * org.apache.beam.sdk.coders if there are no "."s in the ID. * during deserialization requested by the Apache Beam SDK. super("BeamCoders");
0
@Override
0
* * * * * * * *
0
import org.apache.atlas.typesystem.exception.SchemaNotFoundException; @Test(expectedExceptions = SchemaNotFoundException.class) public void testGetSchemaForDBEntity() throws Exception { String dbId = getEntityId(DATASET_SUBTYPE, "name", "dataSetSubTypeInst1"); JSONObject results = new JSONObject(lineageService.getSchemaForEntity(dbId)); }
0
Optional.of(PENDING), return updateTaskAndExternalState( taskId, task, Optional.of(targetState), transitionMessage); final Optional<ScheduleStatus> targetState, mutableTask.setStatus(targetState.get()); .setStatus(targetState.get()) Optional.of(newState), for (String taskId : taskIds) { updateTaskAndExternalState( taskId, Optional.<IScheduledTask>absent(), Optional.<ScheduleStatus>absent(), Optional.<String>absent()); }
0
import org.apache.commons.io.IOUtils; IOUtils.copy(is, os); IOUtils.copy(is, os);
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.base.Charsets; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ArrayListMultimap; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableMap; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ListMultimap;
0
* A Flink combine runner that builds a map of merged windows and produces output after seeing all * input. This is similar to what{@link org.apache.beam.runners.core.ReduceFnRunner} does. public class HashingFlinkCombineRunner<K, InputT, AccumT, OutputT, W extends BoundedWindow> Collector<WindowedValue<KV<K, OutputT>>> out) throws Exception { AccumT accumT = flinkCombiner.firstInput( key, currentValue.getValue().getValue(), options, sideInputReader, singletonW); accumAndInstant.f0 = flinkCombiner.addInput( key, accumAndInstant.f0, currentValue.getValue().getValue(), options, sideInputReader, singletonW); KV.of( key, flinkCombiner.extractOutput( key, accumulator, options, sideInputReader, Collections.singleton(entry.getKey()))), private Map<W, W> mergeWindows(WindowingStrategy<Object, W> windowingStrategy, Set<W> windows) throws Exception {
1
* * * /** /** * This method <strong>must</strong> be called after
1
import javax.ws.rs.GET; import javax.ws.rs.PathParam; import org.apache.ambari.server.agent.ComponentsResponse; /** * Retrieves the components category map for stack used on cluster * (Internal API to be used by Ambari agent). * * @response.representation.200.doc This API is invoked by Ambari agent running * on a cluster to update the components category map of stack used by this cluster * @response.representation.200.mediaType application/json * @response.representation.408.doc Request Timed out * @param clusterName of cluster * @throws Exception */ @Path("components/{clusterName}") @GET @Produces({MediaType.APPLICATION_JSON}) public ComponentsResponse components( @PathParam("clusterName") String clusterName) { if (LOG.isDebugEnabled()) { LOG.debug("Received Components request for cluster " + clusterName); } ComponentsResponse componentsResponse; try { componentsResponse = hh.handleComponents(clusterName); if (LOG.isDebugEnabled()) { LOG.debug("Sending components response"); LOG.debug("Response details " + componentsResponse); } } catch (Exception e) { LOG.warn("Error in Components", e); throw new WebApplicationException(500); } return componentsResponse; }
0
import org.apache.beam.sdk.transforms.windowing.Triggers; TriggerStateMachines.stateMachineForTrigger( Triggers.toProto(windowingStrategy.getTrigger())), TriggerStateMachines.stateMachineForTrigger(Triggers.toProto(strategy.getTrigger())), TriggerStateMachines.stateMachineForTrigger(Triggers.toProto(strategy.getTrigger())),
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableMap;
0
import org.apache.batik.constants.XMLConstants;
0
javax.swing.ListModel {
0
public final class TransformerPredicate<T> implements Predicate<T>, Serializable { private final Transformer<? super T, Boolean> iTransformer; * public static <T> Predicate<T> getInstance(Transformer<? super T, Boolean> transformer) { return new TransformerPredicate<T>(transformer); * public TransformerPredicate(Transformer<? super T, Boolean> transformer) { * public boolean evaluate(T object) { Boolean result = iTransformer.transform(object); if (result == null) { "Transformer must return an instanceof Boolean, it was a null object"); return result; * public Transformer<? super T, Boolean> getTransformer() {
0
/** * 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
* <p/> * http://www.apache.org/licenses/LICENSE-2.0 * <p/> public String tezVerticesListForDAGUrl(String dagId) { return null; } @Override @Override public JSONObject hiveQueryIdByOperationId(String operationId) { throw new NotImplementedException(); } @Override @Override public JSONObject tezVerticesListForDAG(String dagId) { return null; }
0
@Nullable private final String jmsMessageID; @Nullable String jmsMessageID, return jmsDestination.equals(other.jmsDestination)
0
final Class<?> mgrClass = Class.forName(managerClassName);
0
import org.apache.excalibur.source.SourceValidity; SourceValidity compileTime; if (startEvent != null) { int valid = startEvent.compileTime.isValid(); if ( valid == SourceValidity.UNKNOWN ) { SourceValidity validity = inputSource.getValidity(); valid = startEvent.compileTime.isValid(validity); } if ( valid != SourceValidity.VALID) { cache.remove(uri); } SourceValidity validity = inputSource.getValidity(); startEvent.compileTime = validity; SourceValidity validity = null; boolean recompile = false; if ( doc.compileTime == null) { recompile = true; } else { int valid = doc.compileTime.isValid(); if ( valid == SourceValidity.UNKNOWN ) { validity = input.getValidity(); valid = doc.compileTime.isValid(validity); } if ( valid != SourceValidity.VALID ) { recompile = true; } } if ( recompile ) { if ( validity == null ) { validity = input.getValidity(); } doc.compileTime = validity;
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableMap;
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
AccumuloInputFormat.setConnectorInfo(job, user, new PasswordToken(pass));
1
return null == getFieldValue(idx); return "BeamSqlRow [dataValues=" + dataValues + ", dataType=" + dataType + "]"; return 31 * getDataType().hashCode() + getDataValues().hashCode();
0
import org.apache.beam.runners.apex.translation.operators.ApexProcessFnOperator; import org.apache.beam.runners.core.SplittableParDo; import org.apache.beam.sdk.values.KV; registerTransformTranslator(SplittableParDo.ProcessElements.class, new ParDoTranslator.SplittableProcessElementsTranslator()); registerTransformTranslator(SplittableParDo.GBKIntoKeyedWorkItems.class, new GBKIntoKeyedWorkItemsTranslator()); private static class GBKIntoKeyedWorkItemsTranslator<K, InputT> implements TransformTranslator<SplittableParDo.GBKIntoKeyedWorkItems<K, InputT>> { @Override public void translate( SplittableParDo.GBKIntoKeyedWorkItems<K, InputT> transform, TranslationContext context) { // https://issues.apache.org/jira/browse/BEAM-1850 ApexProcessFnOperator<KV<K, InputT>> operator = ApexProcessFnOperator.toKeyedWorkItems( context.getPipelineOptions()); context.addOperator(operator, operator.outputPort); context.addStream(context.getInput(), operator.inputPort); } }
0
public static <T extends TBase<T, ?>> T decode(Class<T> clazz, @Nullable byte[] buffer) public static <T extends TBase<T, ?>> T decodeNonNull(Class<T> clazz, byte[] buffer) public static byte[] encode(@Nullable TBase<?, ?> tBase) throws CodingException { public static byte[] encodeNonNull(TBase<?, ?> tBase) throws CodingException {
0
public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws AccumuloException, AccumuloSecurityException, IOException { final boolean valid = shellState.getConnector().securityOperations().authenticateUser(user, new PasswordToken(password)); public void registerCompletion(final Token root, final Map<Command.CompletionSet,Set<String>> completionSet) {
0
import java.util.ArrayList; import java.util.List; /** * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager) */ /** * @see org.apache.cocoon.forms.formmodel.tree.builder.TreeModelDefinitionBuilder#build(org.w3c.dom.Element) */ protected List getPatterns(Element parent, String name) throws Exception { final List result = new ArrayList(); final String pattern = DomHelper.getAttribute(children[i], "pattern"); result.add(pattern);
0
setExpression = CtNewMethod.setter( "setExpression", nodeMember ); newClass.addMethod( setExpression );
0
private Blocks blocks; * @param blocks public BlockDispatcherProcessor(Blocks blocks) { this.blocks = blocks; Block block = this.blocks.getMountedBlock(uri);
0