code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public double horizontalForce(Double T, double d)
{
return AE*Math.sqrt(Math.pow(T/AE+1, 2)-2*w*d/AE)-AE;
} | class class_name[name] begin[{]
method[horizontalForce, return_type[type[double]], modifier[public], parameter[T, d]] begin[{]
return[binary_operation[binary_operation[member[.AE], *, call[Math.sqrt, parameter[binary_operation[call[Math.pow, parameter[binary_operation[binary_operation[member[.T], /, me... | Keyword[public] Keyword[double] identifier[horizontalForce] operator[SEP] identifier[Double] identifier[T] , Keyword[double] identifier[d] operator[SEP] {
Keyword[return] identifier[AE] operator[*] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] identifier[Math] operator[SEP] identifier[pow] opera... |
public static <C extends Comparable> boolean isLessThan(final Range<C> range, final C value) {
checkNotNull(range);
checkNotNull(value);
if (!range.hasUpperBound()) {
return false;
}
if (range.upperBoundType() == BoundType.OPEN && range.upperEndpoint().equals(value))... | class class_name[name] begin[{]
method[isLessThan, return_type[type[boolean]], modifier[public static], parameter[range, value]] begin[{]
call[.checkNotNull, parameter[member[.range]]]
call[.checkNotNull, parameter[member[.value]]]
if[call[range.hasUpperBound, pa... | Keyword[public] Keyword[static] operator[<] identifier[C] Keyword[extends] identifier[Comparable] operator[>] Keyword[boolean] identifier[isLessThan] operator[SEP] Keyword[final] identifier[Range] operator[<] identifier[C] operator[>] identifier[range] , Keyword[final] identifier[C] identifier[value] operator[SEP] {
... |
protected void fillStatement(PreparedStatement stmt, Object[] params)
throws SQLException {
fillStatement(stmt, params, null);
} | class class_name[name] begin[{]
method[fillStatement, return_type[void], modifier[protected], parameter[stmt, params]] begin[{]
call[.fillStatement, parameter[member[.stmt], member[.params], literal[null]]]
end[}]
END[}] | Keyword[protected] Keyword[void] identifier[fillStatement] operator[SEP] identifier[PreparedStatement] identifier[stmt] , identifier[Object] operator[SEP] operator[SEP] identifier[params] operator[SEP] Keyword[throws] identifier[SQLException] {
identifier[fillStatement] operator[SEP] identifier[stmt] , identif... |
private URI datasetURNtoURI(String datasetURN) {
try {
return new URI(PathUtils.mergePaths(new Path(this.storeRoot), new Path(datasetURN)).toString());
}catch (URISyntaxException e) {
log.error("Dataset with URN:" + datasetURN + " cannot be converted into URI. Skip the dataset");
return null;
... | class class_name[name] begin[{]
method[datasetURNtoURI, return_type[type[URI]], modifier[private], parameter[datasetURN]] begin[{]
TryStatement(block=[ReturnStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], q... | Keyword[private] identifier[URI] identifier[datasetURNtoURI] operator[SEP] identifier[String] identifier[datasetURN] operator[SEP] {
Keyword[try] {
Keyword[return] Keyword[new] identifier[URI] operator[SEP] identifier[PathUtils] operator[SEP] identifier[mergePaths] operator[SEP] Keyword[new] identifie... |
public String getPrefix(int index) {
if (index < 0 || index >= mAttrCount) {
throwIndex(index);
}
return mAttributes[index].mPrefix;
} | class class_name[name] begin[{]
method[getPrefix, return_type[type[String]], modifier[public], parameter[index]] begin[{]
if[binary_operation[binary_operation[member[.index], <, literal[0]], ||, binary_operation[member[.index], >=, member[.mAttrCount]]]] begin[{]
call[.t... | Keyword[public] identifier[String] identifier[getPrefix] operator[SEP] Keyword[int] identifier[index] operator[SEP] {
Keyword[if] operator[SEP] identifier[index] operator[<] Other[0] operator[||] identifier[index] operator[>=] identifier[mAttrCount] operator[SEP] {
identifier[throwIndex] operator[SEP]... |
public byte[] toByteArray() {
int size = getSize();
final ByteBuffer buff = ByteBuffer.allocate(size);
// add revision
buff.put(revision.getValue());
// add reserved
buff.put((byte) 0x00);
// add size (2 bytes reversed)
byte[] sizeSRC = NumberFacility... | class class_name[name] begin[{]
method[toByteArray, return_type[type[byte]], modifier[public], parameter[]] begin[{]
local_variable[type[int], size]
local_variable[type[ByteBuffer], buff]
call[buff.put, parameter[call[revision.getValue, parameter[]]]]
call[buff.p... | Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[toByteArray] operator[SEP] operator[SEP] {
Keyword[int] identifier[size] operator[=] identifier[getSize] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[ByteBuffer] identifier[buff] operator[=] identifier[ByteBuffer] operato... |
public IfcVoidingFeatureTypeEnum createIfcVoidingFeatureTypeEnumFromString(EDataType eDataType,
String initialValue) {
IfcVoidingFeatureTypeEnum result = IfcVoidingFeatureTypeEnum.get(initialValue);
if (result == null)
throw new IllegalArgumentException(
"The value '" + initialValue + "' is not a va... | class class_name[name] begin[{]
method[createIfcVoidingFeatureTypeEnumFromString, return_type[type[IfcVoidingFeatureTypeEnum]], modifier[public], parameter[eDataType, initialValue]] begin[{]
local_variable[type[IfcVoidingFeatureTypeEnum], result]
if[binary_operation[member[.result], ==,... | Keyword[public] identifier[IfcVoidingFeatureTypeEnum] identifier[createIfcVoidingFeatureTypeEnumFromString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[String] identifier[initialValue] operator[SEP] {
identifier[IfcVoidingFeatureTypeEnum] identifier[result] operator[=] identifier[IfcV... |
public Result<Series> createSeries(Series series) {
checkNotNull(series);
URI uri = null;
try {
URIBuilder builder = new URIBuilder(String.format("/%s/series/", API_VERSION));
uri = builder.build();
} catch (URISyntaxException e) {
String message = "Could not build URI";
throw n... | class class_name[name] begin[{]
method[createSeries, return_type[type[Result]], modifier[public], parameter[series]] begin[{]
call[.checkNotNull, parameter[member[.series]]]
local_variable[type[URI], uri]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[... | Keyword[public] identifier[Result] operator[<] identifier[Series] operator[>] identifier[createSeries] operator[SEP] identifier[Series] identifier[series] operator[SEP] {
identifier[checkNotNull] operator[SEP] identifier[series] operator[SEP] operator[SEP] identifier[URI] identifier[uri] operator[=] Other[null] ... |
@Override
public INDArray get(INDArrayIndex... indexes) {
//check for row/column vector and point index being 0
if (indexes.length == 1 && indexes[0] instanceof NDArrayIndexAll || (indexes.length == 2 && (isRowVector()
&& indexes[0] instanceof PointIndex && indexes[0].offset(... | class class_name[name] begin[{]
method[get, return_type[type[INDArray]], modifier[public], parameter[indexes]] begin[{]
if[binary_operation[binary_operation[binary_operation[member[indexes.length], ==, literal[1]], &&, binary_operation[member[.indexes], instanceof, type[NDArrayIndexAll]]], ||, ... | annotation[@] identifier[Override] Keyword[public] identifier[INDArray] identifier[get] operator[SEP] identifier[INDArrayIndex] operator[...] identifier[indexes] operator[SEP] {
Keyword[if] operator[SEP] identifier[indexes] operator[SEP] identifier[length] operator[==] Other[1] operator[&&] identifier[indexes] o... |
public ColumnResult<SqlResultSetMapping<T>> getOrCreateColumnResult()
{
List<Node> nodeList = childNode.get("column-result");
if (nodeList != null && nodeList.size() > 0)
{
return new ColumnResultImpl<SqlResultSetMapping<T>>(this, "column-result", childNode, nodeList.get(0));
}
... | class class_name[name] begin[{]
method[getOrCreateColumnResult, return_type[type[ColumnResult]], modifier[public], parameter[]] begin[{]
local_variable[type[List], nodeList]
if[binary_operation[binary_operation[member[.nodeList], !=, literal[null]], &&, binary_operation[call[nodeList.si... | Keyword[public] identifier[ColumnResult] operator[<] identifier[SqlResultSetMapping] operator[<] identifier[T] operator[>] operator[>] identifier[getOrCreateColumnResult] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[Node] operator[>] identifier[nodeList] operator[=] identifier[childNode]... |
public StringExpression geometryType() {
if (geometryType == null) {
geometryType = Expressions.stringOperation(SpatialOps.GEOMETRY_TYPE, mixin);
}
return geometryType;
} | class class_name[name] begin[{]
method[geometryType, return_type[type[StringExpression]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.geometryType], ==, literal[null]]] begin[{]
assign[member[.geometryType], call[Expressions.stringOperation, param... | Keyword[public] identifier[StringExpression] identifier[geometryType] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[geometryType] operator[==] Other[null] operator[SEP] {
identifier[geometryType] operator[=] identifier[Expressions] operator[SEP] identifier[stringOperation] operato... |
public String readPeptide(String peptide) throws FastaFormatException,
org.helm.notation2.parser.exceptionparser.NotationException, ChemistryException {
return SequenceConverter.readPeptide(peptide).toHELM2();
} | class class_name[name] begin[{]
method[readPeptide, return_type[type[String]], modifier[public], parameter[peptide]] begin[{]
return[call[SequenceConverter.readPeptide, parameter[member[.peptide]]]]
end[}]
END[}] | Keyword[public] identifier[String] identifier[readPeptide] operator[SEP] identifier[String] identifier[peptide] operator[SEP] Keyword[throws] identifier[FastaFormatException] , identifier[org] operator[SEP] identifier[helm] operator[SEP] identifier[notation2] operator[SEP] identifier[parser] operator[SEP] identifier[e... |
@Override
public void setConfiguration(
final Properties config
)
throws ValidityException
{
String pattern = config.getProperty( "pattern" );
if (pattern == null) {
throw new ValidityException( "no 'pattern' parameter" );
}
... | class class_name[name] begin[{]
method[setConfiguration, return_type[void], modifier[public], parameter[config]] begin[{]
local_variable[type[String], pattern]
if[binary_operation[member[.pattern], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setConfiguration] operator[SEP] Keyword[final] identifier[Properties] identifier[config] operator[SEP] Keyword[throws] identifier[ValidityException] {
identifier[String] identifier[pattern] operator[=] identifier[config] operator[SEP] id... |
private boolean waitForPermissionIfNecessary(final long timeoutInNanos, final long nanosToWait) {
boolean canAcquireImmediately = nanosToWait <= 0;
boolean canAcquireInTime = timeoutInNanos >= nanosToWait;
if (canAcquireImmediately) {
return true;
}
if (canAcquireInT... | class class_name[name] begin[{]
method[waitForPermissionIfNecessary, return_type[type[boolean]], modifier[private], parameter[timeoutInNanos, nanosToWait]] begin[{]
local_variable[type[boolean], canAcquireImmediately]
local_variable[type[boolean], canAcquireInTime]
if[member[.ca... | Keyword[private] Keyword[boolean] identifier[waitForPermissionIfNecessary] operator[SEP] Keyword[final] Keyword[long] identifier[timeoutInNanos] , Keyword[final] Keyword[long] identifier[nanosToWait] operator[SEP] {
Keyword[boolean] identifier[canAcquireImmediately] operator[=] identifier[nanosToWait] operator[... |
Path dumpXmlReport(Report report) {
if (!settings.getBoolean(PROPERTY_GENERATE_XML).orElse(false)) {
return null;
}
try {
final String reportAsString = reportToString(report);
final Path reportFile = writeToWorkingDirectory(reportAsString, PMD_RESULT_XML);
... | class class_name[name] begin[{]
method[dumpXmlReport, return_type[type[Path]], modifier[default], parameter[report]] begin[{]
if[call[settings.getBoolean, parameter[member[.PROPERTY_GENERATE_XML]]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
Try... | identifier[Path] identifier[dumpXmlReport] operator[SEP] identifier[Report] identifier[report] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[settings] operator[SEP] identifier[getBoolean] operator[SEP] identifier[PROPERTY_GENERATE_XML] operator[SEP] operator[SEP] identifier[orElse] operator[SE... |
@SuppressWarnings("unchecked")
public CassandraJavaPairRDD<K, V> perPartitionLimit(Long rowsNumber) {
CassandraRDD<Tuple2<K, V>> newRDD = rdd().perPartitionLimit(rowsNumber);
return wrap(newRDD);
} | class class_name[name] begin[{]
method[perPartitionLimit, return_type[type[CassandraJavaPairRDD]], modifier[public], parameter[rowsNumber]] begin[{]
local_variable[type[CassandraRDD], newRDD]
return[call[.wrap, parameter[member[.newRDD]]]]
end[}]
END[}] | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[CassandraJavaPairRDD] operator[<] identifier[K] , identifier[V] operator[>] identifier[perPartitionLimit] operator[SEP] identifier[Long] identifier[rowsNumber] operator[SEP] {
identifier[CassandraRD... |
public static Indexer create(String mapTxt) {
Context cx = Context.enter();
try {
return new Indexer(mapTxt, cx);
} finally {
Context.exit();
}
} | class class_name[name] begin[{]
method[create, return_type[type[Indexer]], modifier[public static], parameter[mapTxt]] begin[{]
local_variable[type[Context], cx]
TryStatement(block=[ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=mapTxt, postfix_operators=[], prefix_op... | Keyword[public] Keyword[static] identifier[Indexer] identifier[create] operator[SEP] identifier[String] identifier[mapTxt] operator[SEP] {
identifier[Context] identifier[cx] operator[=] identifier[Context] operator[SEP] identifier[enter] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
Keyword... |
public static ConnectionType getConnectionType(byte type) {
switch (type) {
case TYPE_OUTBOUND:
return OUTBOUND;
case TYPE_OUTBOUND_CR_TO_REMOTE:
return OUTBOUND_CR_TO_REMOTE;
case TYPE_OUTBOUND_SR_TO_CR_REMOTE:
return OUTBOUND_... | class class_name[name] begin[{]
method[getConnectionType, return_type[type[ConnectionType]], modifier[public static], parameter[type]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=['TYPE_OUTBOUND'], statements=[ReturnStatement(expression=MemberReference(member=OUTBOUND, postfix_operators=[]... | Keyword[public] Keyword[static] identifier[ConnectionType] identifier[getConnectionType] operator[SEP] Keyword[byte] identifier[type] operator[SEP] {
Keyword[switch] operator[SEP] identifier[type] operator[SEP] {
Keyword[case] identifier[TYPE_OUTBOUND] operator[:] Keyword[return] identifier[OUTBOUND]... |
public static SetOperation wrap(final Memory srcMem, final long seed) {
final byte famID = srcMem.getByte(FAMILY_BYTE);
final Family family = idToFamily(famID);
final int serVer = srcMem.getByte(SER_VER_BYTE);
if (serVer != 3) {
throw new SketchesArgumentException("SerVer must be 3: " + serVer);
... | class class_name[name] begin[{]
method[wrap, return_type[type[SetOperation]], modifier[public static], parameter[srcMem, seed]] begin[{]
local_variable[type[byte], famID]
local_variable[type[Family], family]
local_variable[type[int], serVer]
if[binary_operation[member[.s... | Keyword[public] Keyword[static] identifier[SetOperation] identifier[wrap] operator[SEP] Keyword[final] identifier[Memory] identifier[srcMem] , Keyword[final] Keyword[long] identifier[seed] operator[SEP] {
Keyword[final] Keyword[byte] identifier[famID] operator[=] identifier[srcMem] operator[SEP] identifier[getB... |
public final BufferedImage decode() throws IOException {
if (!validPNG) {
return null;
}
ColorModel cmodel = new ComponentColorModel(COLOR_SPACE, BITS, false, false, Transparency.OPAQUE, DATA_TYPE);
SampleModel smodel = new ComponentSampleModel(DATA_TYPE, width, height, 3, width * 3, BAND_OFFSETS);
byte[]... | class class_name[name] begin[{]
method[decode, return_type[type[BufferedImage]], modifier[final public], parameter[]] begin[{]
if[member[.validPNG]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_variable[type[ColorModel], cmodel]
loca... | Keyword[public] Keyword[final] identifier[BufferedImage] identifier[decode] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] operator[!] identifier[validPNG] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
identifier[ColorModel] ... |
public void setRuleId(String v) {
if (GrammarError_Type.featOkTst
&& ((GrammarError_Type) jcasType).casFeat_ruleId == null)
jcasType.jcas.throwFeatMissing("ruleId", "cogroo.uima.GrammarError");
jcasType.ll_cas.ll_setStringValue(addr,
((GrammarError_Type) jcasType).casFeatCode_ruleId, v);
... | class class_name[name] begin[{]
method[setRuleId, return_type[void], modifier[public], parameter[v]] begin[{]
if[binary_operation[member[GrammarError_Type.featOkTst], &&, binary_operation[Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, sel... | Keyword[public] Keyword[void] identifier[setRuleId] operator[SEP] identifier[String] identifier[v] operator[SEP] {
Keyword[if] operator[SEP] identifier[GrammarError_Type] operator[SEP] identifier[featOkTst] operator[&&] operator[SEP] operator[SEP] identifier[GrammarError_Type] operator[SEP] identifier[jcasType] ... |
public static Basic2DMatrix diagonal(int size, double diagonal) {
double[][] array = new double[size][size];
for (int i = 0; i < size; i++) {
array[i][i] = diagonal;
}
return new Basic2DMatrix(array);
} | class class_name[name] begin[{]
method[diagonal, return_type[type[Basic2DMatrix]], modifier[public static], parameter[size, diagonal]] begin[{]
local_variable[type[double], array]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=Memb... | Keyword[public] Keyword[static] identifier[Basic2DMatrix] identifier[diagonal] operator[SEP] Keyword[int] identifier[size] , Keyword[double] identifier[diagonal] operator[SEP] {
Keyword[double] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[array] operator[=] Keyword[new] Keyword[double] ope... |
public void deleteMessage(DeleteMessageRequest deleteMessageRequest) throws JMSException {
try {
prepareRequest(deleteMessageRequest);
amazonSQSClient.deleteMessage(deleteMessageRequest);
} catch (AmazonClientException e) {
throw handleException(e, "deleteMessage");
... | class class_name[name] begin[{]
method[deleteMessage, return_type[void], modifier[public], parameter[deleteMessageRequest]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=deleteMessageRequest, postfix_operators=[], prefix_operators=[], qua... | Keyword[public] Keyword[void] identifier[deleteMessage] operator[SEP] identifier[DeleteMessageRequest] identifier[deleteMessageRequest] operator[SEP] Keyword[throws] identifier[JMSException] {
Keyword[try] {
identifier[prepareRequest] operator[SEP] identifier[deleteMessageRequest] operator[SEP] operat... |
public static <T extends Comparable<T>> RelationalOperator<T> greaterThanEqualTo(T lowerBound) {
return new GreaterThanEqualToOperator<>(lowerBound);
} | class class_name[name] begin[{]
method[greaterThanEqualTo, return_type[type[RelationalOperator]], modifier[public static], parameter[lowerBound]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=lowerBound, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, ... | Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Comparable] operator[<] identifier[T] operator[>] operator[>] identifier[RelationalOperator] operator[<] identifier[T] operator[>] identifier[greaterThanEqualTo] operator[SEP] identifier[T] identifier[lowerBound] operator[SEP] {
... |
@Override
protected WebResponse newWebResponse(final WebRequest webRequest,
final HttpServletResponse httpServletResponse)
{
return new ServletWebResponse((ServletWebRequest)webRequest, httpServletResponse)
{
@Override
public String encodeRedirectURL(final CharSequence url)
{
return isRobot(webReq... | class class_name[name] begin[{]
method[newWebResponse, return_type[type[WebResponse]], modifier[protected], parameter[webRequest, httpServletResponse]] begin[{]
return[ClassCreator(arguments=[Cast(expression=MemberReference(member=webRequest, postfix_operators=[], prefix_operators=[], qualifier=, selec... | annotation[@] identifier[Override] Keyword[protected] identifier[WebResponse] identifier[newWebResponse] operator[SEP] Keyword[final] identifier[WebRequest] identifier[webRequest] , Keyword[final] identifier[HttpServletResponse] identifier[httpServletResponse] operator[SEP] {
Keyword[return] Keyword[new] identi... |
public void quickLoad(Component component) throws Exception {
if (component.isAggregating()) {
logger.trace("Needn't real load aggregating component {}", component);
loadedFeatures.put(component, FeatureResolver.AggregatingFlag);
} else if (component.isPlain()) {
logg... | class class_name[name] begin[{]
method[quickLoad, return_type[void], modifier[public], parameter[component]] begin[{]
if[call[component.isAggregating, parameter[]]] begin[{]
call[logger.trace, parameter[literal["Needn't real load aggregating component {}"], member[.compo... | Keyword[public] Keyword[void] identifier[quickLoad] operator[SEP] identifier[Component] identifier[component] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[if] operator[SEP] identifier[component] operator[SEP] identifier[isAggregating] operator[SEP] operator[SEP] operator[SEP] {
identi... |
@Override
public AuthenticationRequest setRealm(String realm) {
if (hasLegacyPath()) {
Log.w(TAG, "Not setting the 'realm' parameter as the request is using a Legacy Authorization API endpoint that doesn't support it.");
return this;
}
addParameter(REALM_KEY, realm);
... | class class_name[name] begin[{]
method[setRealm, return_type[type[AuthenticationRequest]], modifier[public], parameter[realm]] begin[{]
if[call[.hasLegacyPath, parameter[]]] begin[{]
call[Log.w, parameter[member[.TAG], literal["Not setting the 'realm' parameter as the re... | annotation[@] identifier[Override] Keyword[public] identifier[AuthenticationRequest] identifier[setRealm] operator[SEP] identifier[String] identifier[realm] operator[SEP] {
Keyword[if] operator[SEP] identifier[hasLegacyPath] operator[SEP] operator[SEP] operator[SEP] {
identifier[Log] operator[SEP] ide... |
public static double median(AssociativeArray2D survivalFunction) {
Double ApointTi = null;
Double BpointTi = null;
int n = survivalFunction.size();
if(n==0) {
throw new IllegalArgumentException("The provided collection can't be empty.");
}
f... | class class_name[name] begin[{]
method[median, return_type[type[double]], modifier[public static], parameter[survivalFunction]] begin[{]
local_variable[type[Double], ApointTi]
local_variable[type[Double], BpointTi]
local_variable[type[int], n]
if[binary_operation[member[... | Keyword[public] Keyword[static] Keyword[double] identifier[median] operator[SEP] identifier[AssociativeArray2D] identifier[survivalFunction] operator[SEP] {
identifier[Double] identifier[ApointTi] operator[=] Other[null] operator[SEP] identifier[Double] identifier[BpointTi] operator[=] Other[null] operator[SEP] ... |
public static Session create(SessionStore sessionStore, HttpRequest<?> request) {
Session session = sessionStore.newSession();
request.getAttributes().put(HttpSessionFilter.SESSION_ATTRIBUTE, session);
return session;
} | class class_name[name] begin[{]
method[create, return_type[type[Session]], modifier[public static], parameter[sessionStore, request]] begin[{]
local_variable[type[Session], session]
call[request.getAttributes, parameter[]]
return[member[.session]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Session] identifier[create] operator[SEP] identifier[SessionStore] identifier[sessionStore] , identifier[HttpRequest] operator[<] operator[?] operator[>] identifier[request] operator[SEP] {
identifier[Session] identifier[session] operator[=] identifier[sessionStore] op... |
@Beta
public static <A, B, R> Stream<R> zip(
Stream<A> streamA, Stream<B> streamB, BiFunction<? super A, ? super B, R> function) {
checkNotNull(streamA);
checkNotNull(streamB);
checkNotNull(function);
boolean isParallel = streamA.isParallel() || streamB.isParallel(); // same as Stream.concat
... | class class_name[name] begin[{]
method[zip, return_type[type[Stream]], modifier[public static], parameter[streamA, streamB, function]] begin[{]
call[.checkNotNull, parameter[member[.streamA]]]
call[.checkNotNull, parameter[member[.streamB]]]
call[.checkNotNull, p... | annotation[@] identifier[Beta] Keyword[public] Keyword[static] operator[<] identifier[A] , identifier[B] , identifier[R] operator[>] identifier[Stream] operator[<] identifier[R] operator[>] identifier[zip] operator[SEP] identifier[Stream] operator[<] identifier[A] operator[>] identifier[streamA] , identifier[Stream]... |
public <T> Stream maxBy(String inputFieldName, Comparator<T> comparator) {
Aggregator<ComparisonAggregator.State> max = new MaxWithComparator<>(inputFieldName, comparator);
return comparableAggregateStream(inputFieldName, max);
} | class class_name[name] begin[{]
method[maxBy, return_type[type[Stream]], modifier[public], parameter[inputFieldName, comparator]] begin[{]
local_variable[type[Aggregator], max]
return[call[.comparableAggregateStream, parameter[member[.inputFieldName], member[.max]]]]
end[}]
END[}] | Keyword[public] operator[<] identifier[T] operator[>] identifier[Stream] identifier[maxBy] operator[SEP] identifier[String] identifier[inputFieldName] , identifier[Comparator] operator[<] identifier[T] operator[>] identifier[comparator] operator[SEP] {
identifier[Aggregator] operator[<] identifier[ComparisonAgg... |
public static void setLogLevel(Level level) {
// all other ubench loggers inherit from here.
LOGGER.finer("Changing logging from " + LOGGER.getLevel());
LOGGER.setLevel(level);
if (!LOGGER.getUseParentHandlers()) {
LOGGER.setLevel(level);
Stream.of(LOGGER.getHandl... | class class_name[name] begin[{]
method[setLogLevel, return_type[void], modifier[public static], parameter[level]] begin[{]
call[LOGGER.finer, parameter[binary_operation[literal["Changing logging from "], +, call[LOGGER.getLevel, parameter[]]]]]
call[LOGGER.setLevel, parameter[me... | Keyword[public] Keyword[static] Keyword[void] identifier[setLogLevel] operator[SEP] identifier[Level] identifier[level] operator[SEP] {
identifier[LOGGER] operator[SEP] identifier[finer] operator[SEP] literal[String] operator[+] identifier[LOGGER] operator[SEP] identifier[getLevel] operator[SEP] operator[SEP] op... |
public void reset() {
this.rawPatterns.clear();
this.compiledPatterns.clear();
this.inlineFormat = DEFAULT_INLINE_FORMAT;
this.blockFormat = null;
this.outlineOutputTag = DEFAULT_OUTLINE_OUTPUT_TAG;
this.dynamicNameExtractionPattern = DEFAULT_TAG_NAME_PATTERN;
this.lineContinuation = DEFAULT_LINE_C... | class class_name[name] begin[{]
method[reset, return_type[void], modifier[public], parameter[]] begin[{]
THIS[member[None.rawPatterns]call[None.clear, parameter[]]]
THIS[member[None.compiledPatterns]call[None.clear, parameter[]]]
assign[THIS[member[None.inlineFor... | Keyword[public] Keyword[void] identifier[reset] operator[SEP] operator[SEP] {
Keyword[this] operator[SEP] identifier[rawPatterns] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[compiledPatterns] operator[SEP] identifier[clear] operator[SEP] operat... |
public static List<HostAddress> resolveXMPPServiceDomain(DnsName domain, List<HostAddress> failedAddresses, DnssecMode dnssecMode) {
return resolveDomain(domain, DomainType.client, failedAddresses, dnssecMode);
} | class class_name[name] begin[{]
method[resolveXMPPServiceDomain, return_type[type[List]], modifier[public static], parameter[domain, failedAddresses, dnssecMode]] begin[{]
return[call[.resolveDomain, parameter[member[.domain], member[DomainType.client], member[.failedAddresses], member[.dnssecMode]]]]
... | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[HostAddress] operator[>] identifier[resolveXMPPServiceDomain] operator[SEP] identifier[DnsName] identifier[domain] , identifier[List] operator[<] identifier[HostAddress] operator[>] identifier[failedAddresses] , identifier[DnssecMode] identifier[... |
public void setProcessorFeatures(java.util.Collection<ProcessorFeature> processorFeatures) {
if (processorFeatures == null) {
this.processorFeatures = null;
return;
}
this.processorFeatures = new com.amazonaws.internal.SdkInternalList<ProcessorFeature>(processorFeatures)... | class class_name[name] begin[{]
method[setProcessorFeatures, return_type[void], modifier[public], parameter[processorFeatures]] begin[{]
if[binary_operation[member[.processorFeatures], ==, literal[null]]] begin[{]
assign[THIS[member[None.processorFeatures]], literal[null... | Keyword[public] Keyword[void] identifier[setProcessorFeatures] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[ProcessorFeature] operator[>] identifier[processorFeatures] operator[SEP] {
Keyword[if] operator[SEP] identifier[processorFeatur... |
public ByteBuffer clearAllLocal(ByteBuffer context)
{
int count = Math.abs(context.getShort(context.position()));
if (count == 0)
return context; // no local or global shards present.
List<Short> globalShardIndexes = new ArrayList<>(count);
for (int i = 0; i < count; i++... | class class_name[name] begin[{]
method[clearAllLocal, return_type[type[ByteBuffer]], modifier[public], parameter[context]] begin[{]
local_variable[type[int], count]
if[binary_operation[member[.count], ==, literal[0]]] begin[{]
return[member[.context]]
else begin[{]
None
... | Keyword[public] identifier[ByteBuffer] identifier[clearAllLocal] operator[SEP] identifier[ByteBuffer] identifier[context] operator[SEP] {
Keyword[int] identifier[count] operator[=] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[context] operator[SEP] identifier[getShort] operator[SEP] id... |
private void applyOverviewDocumentExtension(Context context) {
extensionRegistry.getOverviewDocumentExtensions().forEach(extension -> extension.apply(context));
} | class class_name[name] begin[{]
method[applyOverviewDocumentExtension, return_type[void], modifier[private], parameter[context]] begin[{]
call[extensionRegistry.getOverviewDocumentExtensions, parameter[]]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[applyOverviewDocumentExtension] operator[SEP] identifier[Context] identifier[context] operator[SEP] {
identifier[extensionRegistry] operator[SEP] identifier[getOverviewDocumentExtensions] operator[SEP] operator[SEP] operator[SEP] identifier[forEach] operator[SEP] identif... |
public void register(Object value) {
if (JSONzip.probe) {
int integer = find(value);
if (integer >= 0) {
JSONzip.log("\nDuplicate key " + value);
}
}
if (this.length >= this.capacity) {
compact();
}
this.list[this.le... | class class_name[name] begin[{]
method[register, return_type[void], modifier[public], parameter[value]] begin[{]
if[member[JSONzip.probe]] begin[{]
local_variable[type[int], integer]
if[binary_operation[member[.integer], >=, literal[0]]] begin[{]
... | Keyword[public] Keyword[void] identifier[register] operator[SEP] identifier[Object] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[JSONzip] operator[SEP] identifier[probe] operator[SEP] {
Keyword[int] identifier[integer] operator[=] identifier[find] operator[SEP] identifier[val... |
public void setCharacterStream(final int parameterIndex, final Reader reader, final int length) throws SQLException {
try {
setParameter(parameterIndex, new ReaderParameter(reader, length));
} catch (IOException e) {
throw SQLExceptionMapper.getSQLException("Could not read stream... | class class_name[name] begin[{]
method[setCharacterStream, return_type[void], modifier[public], parameter[parameterIndex, reader, length]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=parameterIndex, postfix_operators=[], prefix_operator... | Keyword[public] Keyword[void] identifier[setCharacterStream] operator[SEP] Keyword[final] Keyword[int] identifier[parameterIndex] , Keyword[final] identifier[Reader] identifier[reader] , Keyword[final] Keyword[int] identifier[length] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[try] {
... |
protected final void setKetamaNodes(List<MemcachedNode> nodes) {
TreeMap<Long, MemcachedNode> newNodeMap = new TreeMap<Long, MemcachedNode>();
final int numReps = config.getNodeRepetitions();
for (MemcachedNode node : nodes) {
// Ketama does some special work with md5 where it reuses... | class class_name[name] begin[{]
method[setKetamaNodes, return_type[void], modifier[final protected], parameter[nodes]] begin[{]
local_variable[type[TreeMap], newNodeMap]
local_variable[type[int], numReps]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=Bin... | Keyword[protected] Keyword[final] Keyword[void] identifier[setKetamaNodes] operator[SEP] identifier[List] operator[<] identifier[MemcachedNode] operator[>] identifier[nodes] operator[SEP] {
identifier[TreeMap] operator[<] identifier[Long] , identifier[MemcachedNode] operator[>] identifier[newNodeMap] operator[=... |
public Object getField(Object instance, String fieldname, boolean isStatic) throws IllegalAccessException {
FieldReaderWriter fieldReaderWriter = locateField(fieldname);
if (isStatic && !fieldReaderWriter.isStatic()) {
throw new IncompatibleClassChangeError("Expected static field "
+ fieldReaderWriter.theFi... | class class_name[name] begin[{]
method[getField, return_type[type[Object]], modifier[public], parameter[instance, fieldname, isStatic]] begin[{]
local_variable[type[FieldReaderWriter], fieldReaderWriter]
if[binary_operation[member[.isStatic], &&, call[fieldReaderWriter.isStatic, paramet... | Keyword[public] identifier[Object] identifier[getField] operator[SEP] identifier[Object] identifier[instance] , identifier[String] identifier[fieldname] , Keyword[boolean] identifier[isStatic] operator[SEP] Keyword[throws] identifier[IllegalAccessException] {
identifier[FieldReaderWriter] identifier[fieldReade... |
@Override
public final void setItsId(final SeGoodsPriceId pItsId) {
this.itsId = pItsId;
if (this.itsId != null) {
this.priceCategory = this.itsId.getPriceCategory();
this.item = this.itsId.getItem();
} else {
this.priceCategory = null;
this.item = null;
}
} | class class_name[name] begin[{]
method[setItsId, return_type[void], modifier[final public], parameter[pItsId]] begin[{]
assign[THIS[member[None.itsId]], member[.pItsId]]
if[binary_operation[THIS[member[None.itsId]], !=, literal[null]]] begin[{]
assign[THI... | annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[setItsId] operator[SEP] Keyword[final] identifier[SeGoodsPriceId] identifier[pItsId] operator[SEP] {
Keyword[this] operator[SEP] identifier[itsId] operator[=] identifier[pItsId] operator[SEP] Keyword[if] operator[SEP] Keyw... |
public static ApruveResponse<SubscriptionAdjustmentDeleteResponse> delete(
String subscriptionId, String adjustmentId) {
return ApruveClient.getInstance().delete(
getSubscriptionAdjustmentsPath(subscriptionId) + adjustmentId,
SubscriptionAdjustmentDeleteResponse.class);
} | class class_name[name] begin[{]
method[delete, return_type[type[ApruveResponse]], modifier[public static], parameter[subscriptionId, adjustmentId]] begin[{]
return[call[ApruveClient.getInstance, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[ApruveResponse] operator[<] identifier[SubscriptionAdjustmentDeleteResponse] operator[>] identifier[delete] operator[SEP] identifier[String] identifier[subscriptionId] , identifier[String] identifier[adjustmentId] operator[SEP] {
Keyword[return] identifier[ApruveClient... |
public final Object convertValue(Object value, IType intrType)
{
//==================================================================================
// Null handling
//==================================================================================
if( intrType == null )
{
return null;
... | class class_name[name] begin[{]
method[convertValue, return_type[type[Object]], modifier[final public], parameter[value, intrType]] begin[{]
if[binary_operation[member[.intrType], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[final] identifier[Object] identifier[convertValue] operator[SEP] identifier[Object] identifier[value] , identifier[IType] identifier[intrType] operator[SEP] {
Keyword[if] operator[SEP] identifier[intrType] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[null] op... |
public String addSelectParams(String seekSign, int iAreaDesc, boolean bAddOnlyMods, boolean bIncludeFileName, boolean bUseCurrentValues, Vector<BaseField> vParamList, boolean bForceUniqueKey, boolean bIncludeTempFields)
{
if (iAreaDesc == DBConstants.START_SELECT_KEY)
if (bAddOnlyMods)
... | class class_name[name] begin[{]
method[addSelectParams, return_type[type[String]], modifier[public], parameter[seekSign, iAreaDesc, bAddOnlyMods, bIncludeFileName, bUseCurrentValues, vParamList, bForceUniqueKey, bIncludeTempFields]] begin[{]
if[binary_operation[member[.iAreaDesc], ==, member[DB... | Keyword[public] identifier[String] identifier[addSelectParams] operator[SEP] identifier[String] identifier[seekSign] , Keyword[int] identifier[iAreaDesc] , Keyword[boolean] identifier[bAddOnlyMods] , Keyword[boolean] identifier[bIncludeFileName] , Keyword[boolean] identifier[bUseCurrentValues] , identifier[Vector]... |
Observable<List<ChatConversationBase>> loadAllConversations() {
return Observable.create(emitter -> storeFactory.execute(new StoreTransaction<ChatStore>() {
@Override
protected void execute(ChatStore store) {
store.open();
List<ChatConversationBase> conve... | class class_name[name] begin[{]
method[loadAllConversations, return_type[type[Observable]], modifier[default], parameter[]] begin[{]
return[call[Observable.create, parameter[LambdaExpression(body=MethodInvocation(arguments=[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(elem... | identifier[Observable] operator[<] identifier[List] operator[<] identifier[ChatConversationBase] operator[>] operator[>] identifier[loadAllConversations] operator[SEP] operator[SEP] {
Keyword[return] identifier[Observable] operator[SEP] identifier[create] operator[SEP] identifier[emitter] operator[->] identifier... |
public Sequence setSequence(Integer sequence) {
Sequence prop = (sequence == null) ? null : new Sequence(sequence);
setSequence(prop);
return prop;
} | class class_name[name] begin[{]
method[setSequence, return_type[type[Sequence]], modifier[public], parameter[sequence]] begin[{]
local_variable[type[Sequence], prop]
call[.setSequence, parameter[member[.prop]]]
return[member[.prop]]
end[}]
END[}] | Keyword[public] identifier[Sequence] identifier[setSequence] operator[SEP] identifier[Integer] identifier[sequence] operator[SEP] {
identifier[Sequence] identifier[prop] operator[=] operator[SEP] identifier[sequence] operator[==] Other[null] operator[SEP] operator[?] Other[null] operator[:] Keyword[new] identif... |
public String addUserParamsToURL(String strURL)
{
strURL = Util.addURLParam(strURL, Constants.SYSTEM_NAME, this.getProperty(Constants.SYSTEM_NAME), false);
strURL = Util.addURLParam(strURL, Params.USER_ID, this.getProperty(Params.USER_ID));
if (this.getProperty(Params.AUTH_TOKEN) != null)
... | class class_name[name] begin[{]
method[addUserParamsToURL, return_type[type[String]], modifier[public], parameter[strURL]] begin[{]
assign[member[.strURL], call[Util.addURLParam, parameter[member[.strURL], member[Constants.SYSTEM_NAME], THIS[call[None.getProperty, parameter[member[Constants.SYS... | Keyword[public] identifier[String] identifier[addUserParamsToURL] operator[SEP] identifier[String] identifier[strURL] operator[SEP] {
identifier[strURL] operator[=] identifier[Util] operator[SEP] identifier[addURLParam] operator[SEP] identifier[strURL] , identifier[Constants] operator[SEP] identifier[SYSTEM_NAM... |
private byte[] getFileContents(File file) {
if (file.exists()) {
try {
return FileUtil.getFileContents(file);
} catch (IOException e) {
e.printStackTrace();
}
}
return null;
} | class class_name[name] begin[{]
method[getFileContents, return_type[type[byte]], modifier[private], parameter[file]] begin[{]
if[call[file.exists, parameter[]]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=file, postfix_o... | Keyword[private] Keyword[byte] operator[SEP] operator[SEP] identifier[getFileContents] operator[SEP] identifier[File] identifier[file] operator[SEP] {
Keyword[if] operator[SEP] identifier[file] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] {
Keyword[try] {
K... |
public String getHrefResolved() {
if (Atom10Parser.isAbsoluteURI(href)) {
return href;
} else if (baseURI != null && categoriesElement != null) {
return Atom10Parser.resolveURI(baseURI, categoriesElement, href);
}
return null;
} | class class_name[name] begin[{]
method[getHrefResolved, return_type[type[String]], modifier[public], parameter[]] begin[{]
if[call[Atom10Parser.isAbsoluteURI, parameter[member[.href]]]] begin[{]
return[member[.href]]
else begin[{]
if[binary_operation[binary_opera... | Keyword[public] identifier[String] identifier[getHrefResolved] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[Atom10Parser] operator[SEP] identifier[isAbsoluteURI] operator[SEP] identifier[href] operator[SEP] operator[SEP] {
Keyword[return] identifier[href] operator[SEP]
}
... |
public JobStepInner getByVersion(String resourceGroupName, String serverName, String jobAgentName, String jobName, int jobVersion, String stepName) {
return getByVersionWithServiceResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobVersion, stepName).toBlocking().single().body();
} | class class_name[name] begin[{]
method[getByVersion, return_type[type[JobStepInner]], modifier[public], parameter[resourceGroupName, serverName, jobAgentName, jobName, jobVersion, stepName]] begin[{]
return[call[.getByVersionWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.server... | Keyword[public] identifier[JobStepInner] identifier[getByVersion] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[serverName] , identifier[String] identifier[jobAgentName] , identifier[String] identifier[jobName] , Keyword[int] identifier[jobVersion] , identifier[Stri... |
public int nextNode()
{
if(m_foundLast)
return DTM.NULL;
int next;
m_lastFetched = next = (DTM.NULL == m_lastFetched)
? m_cdtm.getFirstChild(m_context)
: m_cdtm.getNextSibling(m_lastFetched);
// m_lastFetched = next;
if (DTM.NULL != next)... | class class_name[name] begin[{]
method[nextNode, return_type[type[int]], modifier[public], parameter[]] begin[{]
if[member[.m_foundLast]] begin[{]
return[member[DTM.NULL]]
else begin[{]
None
end[}]
local_variable[type[int], next]
assign[member[.m_lastFetc... | Keyword[public] Keyword[int] identifier[nextNode] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[m_foundLast] operator[SEP] Keyword[return] identifier[DTM] operator[SEP] identifier[NULL] operator[SEP] Keyword[int] identifier[next] operator[SEP] identifier[m_lastFetched] operator[=] identifier... |
public String getJobStatus(final String jobId, final String title) throws IOException, InterruptedException {
final AtomicReference<String> ar = new AtomicReference<String>();
IWorkbench wb = PlatformUI.getWorkbench();
IProgressService ps = wb.getProgressService();
try {
ps.busyCursorWhile(new IRunnableWith... | class class_name[name] begin[{]
method[getJobStatus, return_type[type[String]], modifier[public], parameter[jobId, title]] begin[{]
local_variable[type[AtomicReference], ar]
local_variable[type[IWorkbench], wb]
local_variable[type[IProgressService], ps]
TryStatement(block=[State... | Keyword[public] identifier[String] identifier[getJobStatus] operator[SEP] Keyword[final] identifier[String] identifier[jobId] , Keyword[final] identifier[String] identifier[title] operator[SEP] Keyword[throws] identifier[IOException] , identifier[InterruptedException] {
Keyword[final] identifier[AtomicReferenc... |
public static Iterator<EncodedPair> iterate(List<Param> params, Charset charset, boolean encodeIfNeeded){
return new ProcessIterator(params, charset, encodeIfNeeded);
} | class class_name[name] begin[{]
method[iterate, return_type[type[Iterator]], modifier[public static], parameter[params, charset, encodeIfNeeded]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=params, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(... | Keyword[public] Keyword[static] identifier[Iterator] operator[<] identifier[EncodedPair] operator[>] identifier[iterate] operator[SEP] identifier[List] operator[<] identifier[Param] operator[>] identifier[params] , identifier[Charset] identifier[charset] , Keyword[boolean] identifier[encodeIfNeeded] operator[SEP] {
... |
@CheckReturnValue
public static <ReqT, RespT> Builder<ReqT, RespT> newBuilder(
Marshaller<ReqT> requestMarshaller, Marshaller<RespT> responseMarshaller) {
return new Builder<ReqT, RespT>()
.setRequestMarshaller(requestMarshaller)
.setResponseMarshaller(responseMarshaller);
} | class class_name[name] begin[{]
method[newBuilder, return_type[type[Builder]], modifier[public static], parameter[requestMarshaller, responseMarshaller]] begin[{]
return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, sel... | annotation[@] identifier[CheckReturnValue] Keyword[public] Keyword[static] operator[<] identifier[ReqT] , identifier[RespT] operator[>] identifier[Builder] operator[<] identifier[ReqT] , identifier[RespT] operator[>] identifier[newBuilder] operator[SEP] identifier[Marshaller] operator[<] identifier[ReqT] operator[>] ... |
public static String between(String text, String after, String before) {
text = after(text, after);
if (text == null) {
return null;
}
return before(text, before);
} | class class_name[name] begin[{]
method[between, return_type[type[String]], modifier[public static], parameter[text, after, before]] begin[{]
assign[member[.text], call[.after, parameter[member[.text], member[.after]]]]
if[binary_operation[member[.text], ==, literal[null]]] begin... | Keyword[public] Keyword[static] identifier[String] identifier[between] operator[SEP] identifier[String] identifier[text] , identifier[String] identifier[after] , identifier[String] identifier[before] operator[SEP] {
identifier[text] operator[=] identifier[after] operator[SEP] identifier[text] , identifier[aft... |
public VectorApproximation calculateApproximation(DBID id, V dv) {
int[] approximation = new int[dv.getDimensionality()];
for(int d = 0; d < splitPositions.length; d++) {
final double val = dv.doubleValue(d);
final int lastBorderIndex = splitPositions[d].length - 1;
// Value is below data gri... | class class_name[name] begin[{]
method[calculateApproximation, return_type[type[VectorApproximation]], modifier[public], parameter[id, dv]] begin[{]
local_variable[type[int], approximation]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declara... | Keyword[public] identifier[VectorApproximation] identifier[calculateApproximation] operator[SEP] identifier[DBID] identifier[id] , identifier[V] identifier[dv] operator[SEP] {
Keyword[int] operator[SEP] operator[SEP] identifier[approximation] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[dv] op... |
public <E extends Model> LazyList<E> load() {
if (hydrated()) { throw new DBException("load() must be the last on the chain of methods"); }
hydrate();
return (LazyList<E>) this;
} | class class_name[name] begin[{]
method[load, return_type[type[LazyList]], modifier[public], parameter[]] begin[{]
if[call[.hydrated, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=... | Keyword[public] operator[<] identifier[E] Keyword[extends] identifier[Model] operator[>] identifier[LazyList] operator[<] identifier[E] operator[>] identifier[load] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[hydrated] operator[SEP] operator[SEP] operator[SEP] {
Keyword[throw] K... |
@Override
protected void initViews(List<View> views) throws IOException {
BranchListView v = new BranchListView("All", this);
v.setIncludeRegex(".*");
views.add(v);
v.save();
} | class class_name[name] begin[{]
method[initViews, return_type[void], modifier[protected], parameter[views]] begin[{]
local_variable[type[BranchListView], v]
call[v.setIncludeRegex, parameter[literal[".*"]]]
call[views.add, parameter[member[.v]]]
call[v.sa... | annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[initViews] operator[SEP] identifier[List] operator[<] identifier[View] operator[>] identifier[views] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[BranchListView] identifier[v] operator[=] Keyword[new] identifier[... |
public NodeList convertToNodeset()
{
if (m_obj instanceof NodeList)
return (NodeList) m_obj;
else
return new org.apache.xml.dtm.ref.DTMNodeList(asNodeIterator());
} | class class_name[name] begin[{]
method[convertToNodeset, return_type[type[NodeList]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.m_obj], instanceof, type[NodeList]]] begin[{]
return[Cast(expression=MemberReference(member=m_obj, postfix_operators=[], prefix_operators=[],... | Keyword[public] identifier[NodeList] identifier[convertToNodeset] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[m_obj] Keyword[instanceof] identifier[NodeList] operator[SEP] Keyword[return] operator[SEP] identifier[NodeList] operator[SEP] identifier[m_obj] operator[SEP] Keyword[else] Keyword... |
public void marshall(CreateAccountRequest createAccountRequest, ProtocolMarshaller protocolMarshaller) {
if (createAccountRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(createAccountReques... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[createAccountRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.createAccountRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Liter... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[CreateAccountRequest] identifier[createAccountRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[createAccountRequest] operator[==] Other[null] operator[SEP] {
... |
public static synchronized void deleteSoonerOrLater(File fileToDelete) {
pendingDeletes.add(fileToDelete);
// if things are getting out of hand, force gc/finalization
if(pendingDeletes.size()>50) {
LOGGER.warning(">50 pending Files to delete; forcing gc/finalization");
Sy... | class class_name[name] begin[{]
method[deleteSoonerOrLater, return_type[void], modifier[synchronized public static], parameter[fileToDelete]] begin[{]
call[pendingDeletes.add, parameter[member[.fileToDelete]]]
if[binary_operation[call[pendingDeletes.size, parameter[]], >, litera... | Keyword[public] Keyword[static] Keyword[synchronized] Keyword[void] identifier[deleteSoonerOrLater] operator[SEP] identifier[File] identifier[fileToDelete] operator[SEP] {
identifier[pendingDeletes] operator[SEP] identifier[add] operator[SEP] identifier[fileToDelete] operator[SEP] operator[SEP] Keyword[if] opera... |
protected Label newItemLinkLabel(final String id, final LinkItem model)
{
final Label itemLinkLabel = ComponentFactory.newLabel(id,
ResourceModelFactory.newResourceModel(model.getResourceModelKey(), this));
// add css class to current page.
if ((model.getPageClass() != null) && model.getPageClass().equals(get... | class class_name[name] begin[{]
method[newItemLinkLabel, return_type[type[Label]], modifier[protected], parameter[id, model]] begin[{]
local_variable[type[Label], itemLinkLabel]
if[binary_operation[binary_operation[call[model.getPageClass, parameter[]], !=, literal[null]], &&, call[mode... | Keyword[protected] identifier[Label] identifier[newItemLinkLabel] operator[SEP] Keyword[final] identifier[String] identifier[id] , Keyword[final] identifier[LinkItem] identifier[model] operator[SEP] {
Keyword[final] identifier[Label] identifier[itemLinkLabel] operator[=] identifier[ComponentFactory] operator[SE... |
CompletableFuture<Void> configure(Member.Type type) {
CompletableFuture<Void> future = new CompletableFuture<>();
cluster.getContext().getThreadContext().executor().execute(() -> configure(type, future));
return future;
} | class class_name[name] begin[{]
method[configure, return_type[type[CompletableFuture]], modifier[default], parameter[type]] begin[{]
local_variable[type[CompletableFuture], future]
call[cluster.getContext, parameter[]]
return[member[.future]]
end[}]
END[}] | identifier[CompletableFuture] operator[<] identifier[Void] operator[>] identifier[configure] operator[SEP] identifier[Member] operator[SEP] identifier[Type] identifier[type] operator[SEP] {
identifier[CompletableFuture] operator[<] identifier[Void] operator[>] identifier[future] operator[=] Keyword[new] identifi... |
public void complete() {
m_completed = true;
// Prevent changing of the cached lists
if (m_headers != null) {
m_headers = Collections.unmodifiableMap(m_headers);
}
if (m_elements != null) {
m_elements = Collections.unmodifiableList(m_elements);
}
... | class class_name[name] begin[{]
method[complete, return_type[void], modifier[public], parameter[]] begin[{]
assign[member[.m_completed], literal[true]]
if[binary_operation[member[.m_headers], !=, literal[null]]] begin[{]
assign[member[.m_headers], call[Co... | Keyword[public] Keyword[void] identifier[complete] operator[SEP] operator[SEP] {
identifier[m_completed] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[m_headers] operator[!=] Other[null] operator[SEP] {
identifier[m_headers] operator[=] identifier[Collections] operato... |
@Override
public RandomVariable floor(double floor) {
return apply(new DoubleUnaryOperator() {
@Override
public double applyAsDouble(double x) {
return Math.max(x, floor);
}
});
} | class class_name[name] begin[{]
method[floor, return_type[type[RandomVariable]], modifier[public], parameter[floor]] begin[{]
return[call[.apply, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodIn... | annotation[@] identifier[Override] Keyword[public] identifier[RandomVariable] identifier[floor] operator[SEP] Keyword[double] identifier[floor] operator[SEP] {
Keyword[return] identifier[apply] operator[SEP] Keyword[new] identifier[DoubleUnaryOperator] operator[SEP] operator[SEP] {
annotation[@] ident... |
protected final OutputStream getHTMLOutputStream(WebSiteRequest req, HttpServletResponse resp) throws IOException {
resp.setContentType("text/html");
resp.setCharacterEncoding("UTF-8");
String[] headers=getAdditionalHeaders(req);
if(headers!=null) {
int len=headers.length;
for(int c=0; c<len; c+=2) resp.s... | class class_name[name] begin[{]
method[getHTMLOutputStream, return_type[type[OutputStream]], modifier[final protected], parameter[req, resp]] begin[{]
call[resp.setContentType, parameter[literal["text/html"]]]
call[resp.setCharacterEncoding, parameter[literal["UTF-8"]]]
... | Keyword[protected] Keyword[final] identifier[OutputStream] identifier[getHTMLOutputStream] operator[SEP] identifier[WebSiteRequest] identifier[req] , identifier[HttpServletResponse] identifier[resp] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[resp] operator[SEP] identifier[setContentType]... |
private <T extends Number> Map < String, Object > getCobolAlphanumType(
List < XmlSchemaFacet > facets) {
Map < String, Object > props = new LinkedHashMap < String, Object >();
props.put(COBOL_TYPE_NAME_PROP_NAME, "CobolStringType");
props.put(CHAR_NUM_PROP_NAME, getMaxLength(facets)... | class class_name[name] begin[{]
method[getCobolAlphanumType, return_type[type[Map]], modifier[private], parameter[facets]] begin[{]
local_variable[type[Map], props]
call[props.put, parameter[member[.COBOL_TYPE_NAME_PROP_NAME], literal["CobolStringType"]]]
call[props.put,... | Keyword[private] operator[<] identifier[T] Keyword[extends] identifier[Number] operator[>] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[getCobolAlphanumType] operator[SEP] identifier[List] operator[<] identifier[XmlSchemaFacet] operator[>] identifier[facets] operator[SEP] ... |
public void clear() {
// The alternative is to iterate through the keys and call #remove(),
// which
// adds unnecessary contention on the eviction lock and buffers.
evictionLock.lock();
try {
Node node;
while ((node = evictionDeque.poll()) != null) {
... | class class_name[name] begin[{]
method[clear, return_type[void], modifier[public], parameter[]] begin[{]
call[evictionLock.lock, parameter[]]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=node)], modifi... | Keyword[public] Keyword[void] identifier[clear] operator[SEP] operator[SEP] {
identifier[evictionLock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
identifier[Node] identifier[node] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[node] ope... |
public void setResponseCharacterEncoding(String encoding)
{
ExternalContext ctx = _MyFacesExternalContextHelper.firstInstance.get();
if (ctx == null)
{
throw new UnsupportedOperationException();
}
ctx.setResponseCharacterEncoding(encoding);
} | class class_name[name] begin[{]
method[setResponseCharacterEncoding, return_type[void], modifier[public], parameter[encoding]] begin[{]
local_variable[type[ExternalContext], ctx]
if[binary_operation[member[.ctx], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCr... | Keyword[public] Keyword[void] identifier[setResponseCharacterEncoding] operator[SEP] identifier[String] identifier[encoding] operator[SEP] {
identifier[ExternalContext] identifier[ctx] operator[=] identifier[_MyFacesExternalContextHelper] operator[SEP] identifier[firstInstance] operator[SEP] identifier[get] oper... |
public Future<AggregationResponse> sign(DataHash dataHash, Long level) throws KSIException {
Util.notNull(dataHash, "dataHash");
Util.notNull(level, "level");
final Collection<Callable<AggregationResponse>> tasks = new ArrayList<>(subservices.size());
for (KSISigningService subservice : ... | class class_name[name] begin[{]
method[sign, return_type[type[Future]], modifier[public], parameter[dataHash, level]] begin[{]
call[Util.notNull, parameter[member[.dataHash], literal["dataHash"]]]
call[Util.notNull, parameter[member[.level], literal["level"]]]
local_vari... | Keyword[public] identifier[Future] operator[<] identifier[AggregationResponse] operator[>] identifier[sign] operator[SEP] identifier[DataHash] identifier[dataHash] , identifier[Long] identifier[level] operator[SEP] Keyword[throws] identifier[KSIException] {
identifier[Util] operator[SEP] identifier[notNull] ope... |
public static void applySnowFlakeIdGen(int machineLen, long machineId) {
SnowFlakeGenerator.Factory factory = new SnowFlakeGenerator.Factory(machineLen, 0);
SnowFlakeGenerator snowFlakeGenerator = factory.create(0, machineId);
RandomUtils.init(() -> String.valueOf(snowFlakeGenerator.nextId()));
... | class class_name[name] begin[{]
method[applySnowFlakeIdGen, return_type[void], modifier[public static], parameter[machineLen, machineId]] begin[{]
local_variable[type[SnowFlakeGenerator], factory]
local_variable[type[SnowFlakeGenerator], snowFlakeGenerator]
call[RandomUtils.init... | Keyword[public] Keyword[static] Keyword[void] identifier[applySnowFlakeIdGen] operator[SEP] Keyword[int] identifier[machineLen] , Keyword[long] identifier[machineId] operator[SEP] {
identifier[SnowFlakeGenerator] operator[SEP] identifier[Factory] identifier[factory] operator[=] Keyword[new] identifier[SnowFlake... |
@Override
public void destroy() {
try {
ContextClassLoaderUtils.doWithClassLoader(jasperClassLoader,
new Callable<Void>() {
@Override
public Void call() throws Exception {
jasperServlet.destroy();
return null;
}
});
//CHECKSTYLE:OFF
} catch (Exception... | class class_name[name] begin[{]
method[destroy, return_type[void], modifier[public], parameter[]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=jasperClassLoader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Class... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[destroy] operator[SEP] operator[SEP] {
Keyword[try] {
identifier[ContextClassLoaderUtils] operator[SEP] identifier[doWithClassLoader] operator[SEP] identifier[jasperClassLoader] , Keyword[new] identifier[Callable] operator[<]... |
public static ProductType createType(ProductDimensionType productDimensionType,
@Nullable String productTypeValue) {
Preconditions.checkNotNull(productDimensionType,
"ProductDimensionType is required when creating a ProductType");
ProductType productType = new ProductType();
productType.setTyp... | class class_name[name] begin[{]
method[createType, return_type[type[ProductType]], modifier[public static], parameter[productDimensionType, productTypeValue]] begin[{]
call[Preconditions.checkNotNull, parameter[member[.productDimensionType], literal["ProductDimensionType is required when creati... | Keyword[public] Keyword[static] identifier[ProductType] identifier[createType] operator[SEP] identifier[ProductDimensionType] identifier[productDimensionType] , annotation[@] identifier[Nullable] identifier[String] identifier[productTypeValue] operator[SEP] {
identifier[Preconditions] operator[SEP] identifier[c... |
private static String[] readFlagFile(String path) throws ParseException {
Path p = Paths.get(path);
if (!Files.isRegularFile(p)) {
throw new ParseException("--flagfile specified a file that does not exist: " + path);
}
StringBuilder sb = new StringBuilder();
try {
... | class class_name[name] begin[{]
method[readFlagFile, return_type[type[String]], modifier[private static], parameter[path]] begin[{]
local_variable[type[Path], p]
if[call[Files.isRegularFile, parameter[member[.p]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[B... | Keyword[private] Keyword[static] identifier[String] operator[SEP] operator[SEP] identifier[readFlagFile] operator[SEP] identifier[String] identifier[path] operator[SEP] Keyword[throws] identifier[ParseException] {
identifier[Path] identifier[p] operator[=] identifier[Paths] operator[SEP] identifier[get] operator... |
@Override
public CreateResponse createFlowConfig(FlowConfig flowConfig)
throws FlowConfigLoggedException {
String flowName = flowConfig.getId().getFlowName();
String flowGroup = flowConfig.getId().getFlowGroup();
checkHelixConnection(ServiceConfigKeys.HELIX_FLOWSPEC_ADD, flowName, flowGroup);
... | class class_name[name] begin[{]
method[createFlowConfig, return_type[type[CreateResponse]], modifier[public], parameter[flowConfig]] begin[{]
local_variable[type[String], flowName]
local_variable[type[String], flowGroup]
call[.checkHelixConnection, parameter[member[ServiceConfig... | annotation[@] identifier[Override] Keyword[public] identifier[CreateResponse] identifier[createFlowConfig] operator[SEP] identifier[FlowConfig] identifier[flowConfig] operator[SEP] Keyword[throws] identifier[FlowConfigLoggedException] {
identifier[String] identifier[flowName] operator[=] identifier[flowConfig] o... |
public double sumOfSquaresOfSums() {
double sum = 0.;
for(int i = 0; i < ls.length; i++) {
double v = ls[i];
sum += v * v;
}
return sum;
} | class class_name[name] begin[{]
method[sumOfSquaresOfSums, return_type[type[double]], modifier[public], parameter[]] begin[{]
local_variable[type[double], sum]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimen... | Keyword[public] Keyword[double] identifier[sumOfSquaresOfSums] operator[SEP] operator[SEP] {
Keyword[double] identifier[sum] operator[=] literal[Float] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[ls] operator[SEP] ide... |
@Override
@SuppressWarnings("unchecked")
public void collectParameters(Object pojo, List<Object> parameters) {
F facetValue = getFacetValue(pojo);
if (facetValue == null) {
parameters.add(nullColumnValue());
} else {
parameters.add(toColumnValue(facetValue));
... | class class_name[name] begin[{]
method[collectParameters, return_type[void], modifier[public], parameter[pojo, parameters]] begin[{]
local_variable[type[F], facetValue]
if[binary_operation[member[.facetValue], ==, literal[null]]] begin[{]
call[parameters.add, par... | annotation[@] identifier[Override] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[collectParameters] operator[SEP] identifier[Object] identifier[pojo] , identifier[List] operator[<] identifier[Object] operator[>] identifier[parameters] op... |
public static <V> Closure<V> buildSoftReferenceMemoizeFunction(final int protectedCacheSize, final MemoizeCache<Object, SoftReference<Object>> cache, final Closure<V> closure) {
final ProtectionStorage lruProtectionStorage = protectedCacheSize > 0 ?
new LRUProtectionStorage(protectedCacheSize) :... | class class_name[name] begin[{]
method[buildSoftReferenceMemoizeFunction, return_type[type[Closure]], modifier[public static], parameter[protectedCacheSize, cache, closure]] begin[{]
local_variable[type[ProtectionStorage], lruProtectionStorage]
local_variable[type[ReferenceQueue], queue]
... | Keyword[public] Keyword[static] operator[<] identifier[V] operator[>] identifier[Closure] operator[<] identifier[V] operator[>] identifier[buildSoftReferenceMemoizeFunction] operator[SEP] Keyword[final] Keyword[int] identifier[protectedCacheSize] , Keyword[final] identifier[MemoizeCache] operator[<] identifier[Object]... |
private static boolean multiPointContainsPoint_(MultiPoint multipoint_a,
Point point_b, double tolerance, ProgressTracker progress_tracker) {
return !multiPointDisjointPoint_(multipoint_a, point_b, tolerance,
progress_tracker);
} | class class_name[name] begin[{]
method[multiPointContainsPoint_, return_type[type[boolean]], modifier[private static], parameter[multipoint_a, point_b, tolerance, progress_tracker]] begin[{]
return[call[.multiPointDisjointPoint_, parameter[member[.multipoint_a], member[.point_b], member[.tolerance], me... | Keyword[private] Keyword[static] Keyword[boolean] identifier[multiPointContainsPoint_] operator[SEP] identifier[MultiPoint] identifier[multipoint_a] , identifier[Point] identifier[point_b] , Keyword[double] identifier[tolerance] , identifier[ProgressTracker] identifier[progress_tracker] operator[SEP] {
Keywor... |
@Nonnull
@ReturnsMutableCopy
public static byte [] encodeCharToBytes (@Nonnull final char [] aCharArray,
@Nonnegative final int nOfs,
@Nonnegative final int nLen,
@Nonnull final Charset a... | class class_name[name] begin[{]
method[encodeCharToBytes, return_type[type[byte]], modifier[public static], parameter[aCharArray, nOfs, nLen, aCharset]] begin[{]
call[ValueEnforcer.isArrayOfsLen, parameter[member[.aCharArray], member[.nOfs], member[.nLen]]]
local_variable[type[CharsetEn... | annotation[@] identifier[Nonnull] annotation[@] identifier[ReturnsMutableCopy] Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[encodeCharToBytes] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] Keyword[char] operator[SEP] operator[SEP] identifier[aCharArray] , annota... |
public static List<ArtifactoryServer> getArtifactoryServers() {
ArtifactoryBuilder.DescriptorImpl descriptor = (ArtifactoryBuilder.DescriptorImpl)
Hudson.getInstance().getDescriptor(ArtifactoryBuilder.class);
return descriptor.getArtifactoryServers();
} | class class_name[name] begin[{]
method[getArtifactoryServers, return_type[type[List]], modifier[public static], parameter[]] begin[{]
local_variable[type[ArtifactoryBuilder], descriptor]
return[call[descriptor.getArtifactoryServers, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[ArtifactoryServer] operator[>] identifier[getArtifactoryServers] operator[SEP] operator[SEP] {
identifier[ArtifactoryBuilder] operator[SEP] identifier[DescriptorImpl] identifier[descriptor] operator[=] operator[SEP] identifier[ArtifactoryBui... |
public static STextualDS getTextualDSForNode(SNode node, SDocumentGraph graph)
{
if (node != null)
{
List<DataSourceSequence> dataSources = graph.getOverlappedDataSourceSequence(
node,
SALT_TYPE.STEXT_OVERLAPPING_RELATION);
if (dataSources != null)
{
for (DataSourceSe... | class class_name[name] begin[{]
method[getTextualDSForNode, return_type[type[STextualDS]], modifier[public static], parameter[node, graph]] begin[{]
if[binary_operation[member[.node], !=, literal[null]]] begin[{]
local_variable[type[List], dataSources]
if[bin... | Keyword[public] Keyword[static] identifier[STextualDS] identifier[getTextualDSForNode] operator[SEP] identifier[SNode] identifier[node] , identifier[SDocumentGraph] identifier[graph] operator[SEP] {
Keyword[if] operator[SEP] identifier[node] operator[!=] Other[null] operator[SEP] {
identifier[List] o... |
public ReadRecordStatus readRecord(byte[] hostBytes, int processed) throws IOException {
int bytesRead = 0;
if (getBytesPrefetched() == 0) {
bytesRead = readFully(hostBytes, 0, RDW_LEN);
if (bytesRead < RDW_LEN) {
throw new IOException(
"No... | class class_name[name] begin[{]
method[readRecord, return_type[type[ReadRecordStatus]], modifier[public], parameter[hostBytes, processed]] begin[{]
local_variable[type[int], bytesRead]
if[binary_operation[call[.getBytesPrefetched, parameter[]], ==, literal[0]]] begin[{]
... | Keyword[public] identifier[ReadRecordStatus] identifier[readRecord] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[hostBytes] , Keyword[int] identifier[processed] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[int] identifier[bytesRead] operator[=] Other[0] operator[SEP] Key... |
public static <E extends Enum<E>> EnumSet<E> complementOf(
Collection<E> collection, Class<E> type) {
checkNotNull(collection);
return (collection instanceof EnumSet)
? EnumSet.complementOf((EnumSet<E>) collection)
: makeComplementByHand(collection, type);
} | class class_name[name] begin[{]
method[complementOf, return_type[type[EnumSet]], modifier[public static], parameter[collection, type]] begin[{]
call[.checkNotNull, parameter[member[.collection]]]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=collecti... | Keyword[public] Keyword[static] operator[<] identifier[E] Keyword[extends] identifier[Enum] operator[<] identifier[E] operator[>] operator[>] identifier[EnumSet] operator[<] identifier[E] operator[>] identifier[complementOf] operator[SEP] identifier[Collection] operator[<] identifier[E] operator[>] identifier[collectio... |
public int getSortOrder(Element element) {
String deepName = getDeepName(element);
return elementNameSortOrderMap.get(deepName);
} | class class_name[name] begin[{]
method[getSortOrder, return_type[type[int]], modifier[public], parameter[element]] begin[{]
local_variable[type[String], deepName]
return[call[elementNameSortOrderMap.get, parameter[member[.deepName]]]]
end[}]
END[}] | Keyword[public] Keyword[int] identifier[getSortOrder] operator[SEP] identifier[Element] identifier[element] operator[SEP] {
identifier[String] identifier[deepName] operator[=] identifier[getDeepName] operator[SEP] identifier[element] operator[SEP] operator[SEP] Keyword[return] identifier[elementNameSortOrderMap]... |
public void close() {
if (connected.compareAndSet(true, false)) {
// remove handshake flag
session.removeAttribute(Constants.HANDSHAKE_COMPLETE);
// clear the delay queue
queue.clear();
// whether to attempt a nice close or a forceful one
i... | class class_name[name] begin[{]
method[close, return_type[void], modifier[public], parameter[]] begin[{]
if[call[connected.compareAndSet, parameter[literal[true], literal[false]]]] begin[{]
call[session.removeAttribute, parameter[member[Constants.HANDSHAKE_COMPLETE]]]
... | Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[connected] operator[SEP] identifier[compareAndSet] operator[SEP] literal[boolean] , literal[boolean] operator[SEP] operator[SEP] {
identifier[session] operator[SEP] identifier[removeAttr... |
public Quartz with(final Class<? extends Job> jobClass,
final BiConsumer<JobBuilder, TriggerBuilder<Trigger>> configurer) {
requireNonNull(jobClass, "Job class is required.");
JobBuilder job = JobBuilder.newJob(jobClass)
.withIdentity(
JobKey.jobKey(jobClass.getSimpleName(), jobClass.g... | class class_name[name] begin[{]
method[with, return_type[type[Quartz]], modifier[public], parameter[jobClass, configurer]] begin[{]
call[.requireNonNull, parameter[member[.jobClass], literal["Job class is required."]]]
local_variable[type[JobBuilder], job]
local_variable[type[Tr... | Keyword[public] identifier[Quartz] identifier[with] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Job] operator[>] identifier[jobClass] , Keyword[final] identifier[BiConsumer] operator[<] identifier[JobBuilder] , identifier[TriggerBuilder] operator[<] identifier[Tr... |
protected Charset guessContentTypeCharset(final HttpURLConnection connection) {
String contentType = connection.getHeaderField(CONTENT_TYPE_HEADER);
if (contentType == null) {
return UTF8;
}
String charset = null;
for (String param : contentType.replace(" ", "").split(";")) {
if (param.startsWith("char... | class class_name[name] begin[{]
method[guessContentTypeCharset, return_type[type[Charset]], modifier[protected], parameter[connection]] begin[{]
local_variable[type[String], contentType]
if[binary_operation[member[.contentType], ==, literal[null]]] begin[{]
return[member[.UT... | Keyword[protected] identifier[Charset] identifier[guessContentTypeCharset] operator[SEP] Keyword[final] identifier[HttpURLConnection] identifier[connection] operator[SEP] {
identifier[String] identifier[contentType] operator[=] identifier[connection] operator[SEP] identifier[getHeaderField] operator[SEP] identif... |
public ICalComponentScribe<? extends ICalComponent> getComponentScribe(String componentName, ICalVersion version) {
componentName = componentName.toUpperCase();
ICalComponentScribe<? extends ICalComponent> scribe = experimentalCompByName.get(componentName);
if (scribe == null) {
scribe = standardCompByName.ge... | class class_name[name] begin[{]
method[getComponentScribe, return_type[type[ICalComponentScribe]], modifier[public], parameter[componentName, version]] begin[{]
assign[member[.componentName], call[componentName.toUpperCase, parameter[]]]
local_variable[type[ICalComponentScribe], scribe]... | Keyword[public] identifier[ICalComponentScribe] operator[<] operator[?] Keyword[extends] identifier[ICalComponent] operator[>] identifier[getComponentScribe] operator[SEP] identifier[String] identifier[componentName] , identifier[ICalVersion] identifier[version] operator[SEP] {
identifier[componentName] operato... |
@SuppressWarnings("unchecked")
/* @Nullable */
public <T> T get(Object receiver, String fieldName) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException {
Preconditions.checkNotNull(receiver,"receiver");
Preconditions.checkNotNull(fieldName,"fieldName");
Class<? ext... | class class_name[name] begin[{]
method[get, return_type[type[T]], modifier[public], parameter[receiver, fieldName]] begin[{]
call[Preconditions.checkNotNull, parameter[member[.receiver], literal["receiver"]]]
call[Preconditions.checkNotNull, parameter[member[.fieldName], literal... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[get] operator[SEP] identifier[Object] identifier[receiver] , identifier[String] identifier[fieldName] operator[SEP] Keyword[throws] identifier[SecurityEx... |
int insertPacket(
final int termId,
final int termOffset,
final UnsafeBuffer buffer,
final int length,
final int transportIndex,
final InetSocketAddress srcAddress)
{
final boolean isHeartbeat = DataHeaderFlyweight.isHeartbeat(buffer, length);
final lo... | class class_name[name] begin[{]
method[insertPacket, return_type[type[int]], modifier[default], parameter[termId, termOffset, buffer, length, transportIndex, srcAddress]] begin[{]
local_variable[type[boolean], isHeartbeat]
local_variable[type[long], packetPosition]
local_variable[type[l... | Keyword[int] identifier[insertPacket] operator[SEP] Keyword[final] Keyword[int] identifier[termId] , Keyword[final] Keyword[int] identifier[termOffset] , Keyword[final] identifier[UnsafeBuffer] identifier[buffer] , Keyword[final] Keyword[int] identifier[length] , Keyword[final] Keyword[int] identifier[transportInde... |
public final void addParam(String key, int value) {
//System.out.println(" adding " + key + " = " + value);
paramInt.put(key, new Integer(value));
paramStr.put(key, Integer.toString(value));
} | class class_name[name] begin[{]
method[addParam, return_type[void], modifier[final public], parameter[key, value]] begin[{]
call[paramInt.put, parameter[member[.key], ClassCreator(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], bod... | Keyword[public] Keyword[final] Keyword[void] identifier[addParam] operator[SEP] identifier[String] identifier[key] , Keyword[int] identifier[value] operator[SEP] {
identifier[paramInt] operator[SEP] identifier[put] operator[SEP] identifier[key] , Keyword[new] identifier[Integer] operator[SEP] identifier[value]... |
public double add(int index, double delta) {
checkIndex(index);
double value = get(index) + delta;
set(index, value);
return value;
} | class class_name[name] begin[{]
method[add, return_type[type[double]], modifier[public], parameter[index, delta]] begin[{]
call[.checkIndex, parameter[member[.index]]]
local_variable[type[double], value]
call[.set, parameter[member[.index], member[.value]]]
retur... | Keyword[public] Keyword[double] identifier[add] operator[SEP] Keyword[int] identifier[index] , Keyword[double] identifier[delta] operator[SEP] {
identifier[checkIndex] operator[SEP] identifier[index] operator[SEP] operator[SEP] Keyword[double] identifier[value] operator[=] identifier[get] operator[SEP] identifi... |
public T findOne(T query, T fields) {
return findOne(query, fields, getReadPreference());
} | class class_name[name] begin[{]
method[findOne, return_type[type[T]], modifier[public], parameter[query, fields]] begin[{]
return[call[.findOne, parameter[member[.query], member[.fields], call[.getReadPreference, parameter[]]]]]
end[}]
END[}] | Keyword[public] identifier[T] identifier[findOne] operator[SEP] identifier[T] identifier[query] , identifier[T] identifier[fields] operator[SEP] {
Keyword[return] identifier[findOne] operator[SEP] identifier[query] , identifier[fields] , identifier[getReadPreference] operator[SEP] operator[SEP] operator[SEP] ... |
public VersionInfo getVersionOfLibrary(String name, boolean inEmbeddedDir) throws IOException {
Path startPath;
if(inEmbeddedDir) {
startPath = Paths.get(embeddedDirectory, name);
}
else {
Path ardDir = getArduinoDirectory().orElseThrow(IOException::new);
... | class class_name[name] begin[{]
method[getVersionOfLibrary, return_type[type[VersionInfo]], modifier[public], parameter[name, inEmbeddedDir]] begin[{]
local_variable[type[Path], startPath]
if[member[.inEmbeddedDir]] begin[{]
assign[member[.startPath], call[Paths.... | Keyword[public] identifier[VersionInfo] identifier[getVersionOfLibrary] operator[SEP] identifier[String] identifier[name] , Keyword[boolean] identifier[inEmbeddedDir] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[Path] identifier[startPath] operator[SEP] Keyword[if] operator[SEP] identifier... |
@Override
protected void deleteColumn(String indexColumnFamily, String rowKey, byte[] superColumnName,
String persistenceUnit, ConsistencyLevel consistencyLevel, byte[] columnName)
{
ColumnPath cp = new ColumnPath(indexColumnFamily);
cp.setSuper_column(superColumnName);
Conne... | class class_name[name] begin[{]
method[deleteColumn, return_type[void], modifier[protected], parameter[indexColumnFamily, rowKey, superColumnName, persistenceUnit, consistencyLevel, columnName]] begin[{]
local_variable[type[ColumnPath], cp]
call[cp.setSuper_column, parameter[member[.sup... | annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[deleteColumn] operator[SEP] identifier[String] identifier[indexColumnFamily] , identifier[String] identifier[rowKey] , Keyword[byte] operator[SEP] operator[SEP] identifier[superColumnName] , identifier[String] identifier[persistenceUnit] ... |
public static void writeRow(Row row, Iterable<?> rowData, StyleSet styleSet, boolean isHeader) {
int i = 0;
Cell cell;
for (Object value : rowData) {
cell = row.createCell(i);
CellUtil.setCellValue(cell, value, styleSet, isHeader);
i++;
}
} | class class_name[name] begin[{]
method[writeRow, return_type[void], modifier[public static], parameter[row, rowData, styleSet, isHeader]] begin[{]
local_variable[type[int], i]
local_variable[type[Cell], cell]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(e... | Keyword[public] Keyword[static] Keyword[void] identifier[writeRow] operator[SEP] identifier[Row] identifier[row] , identifier[Iterable] operator[<] operator[?] operator[>] identifier[rowData] , identifier[StyleSet] identifier[styleSet] , Keyword[boolean] identifier[isHeader] operator[SEP] {
Keyword[int] ident... |
public void marshall(PipelineIdName pipelineIdName, ProtocolMarshaller protocolMarshaller) {
if (pipelineIdName == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(pipelineIdName.getId(), ID_BINDING);
... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[pipelineIdName, protocolMarshaller]] begin[{]
if[binary_operation[member[.pipelineIdName], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_o... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[PipelineIdName] identifier[pipelineIdName] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[pipelineIdName] operator[==] Other[null] operator[SEP] {
Keyword[... |
private void instrument(CtClass proxy, final SchemaPropertyRef ref) throws Exception {
final Schema schema = schemas.get(ref.getSchemaName());
checkNotNull(schema, "Schema not found for SchemaPropertyRef ["+ref+"]");
final String fieldName = ref.getFieldName();
// for help on javassist s... | class class_name[name] begin[{]
method[instrument, return_type[void], modifier[private], parameter[proxy, ref]] begin[{]
local_variable[type[Schema], schema]
call[.checkNotNull, parameter[member[.schema], binary_operation[binary_operation[literal["Schema not found for SchemaPropertyRef ... | Keyword[private] Keyword[void] identifier[instrument] operator[SEP] identifier[CtClass] identifier[proxy] , Keyword[final] identifier[SchemaPropertyRef] identifier[ref] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[final] identifier[Schema] identifier[schema] operator[=] identifier[schemas] oper... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.