code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public ResidueNumber getResidue(int positionInRange, AtomPositionMap map) {
if (map == null) throw new NullPointerException("The AtomPositionMap must be non-null");
int i = 0;
for (Map.Entry<ResidueNumber, Integer> entry : map.getNavMap().entrySet()) {
if (i == positionInRange) return entry.getKey();
if (co... | class class_name[name] begin[{]
method[getResidue, return_type[type[ResidueNumber]], modifier[public], parameter[positionInRange, map]] begin[{]
if[binary_operation[member[.map], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_... | Keyword[public] identifier[ResidueNumber] identifier[getResidue] operator[SEP] Keyword[int] identifier[positionInRange] , identifier[AtomPositionMap] identifier[map] operator[SEP] {
Keyword[if] operator[SEP] identifier[map] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[NullPointe... |
public final CircuitBreakerStatus withThroughputOneMinute(double value) {
double newValue = value;
return new CircuitBreakerStatus(
this.id,
this.timestamp,
this.state,
this.totalSuccessCount,
this.totalFailureCount,
this.latencyMicros,
newValue,
t... | class class_name[name] begin[{]
method[withThroughputOneMinute, return_type[type[CircuitBreakerStatus]], modifier[final public], parameter[value]] begin[{]
local_variable[type[double], newValue]
return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selec... | Keyword[public] Keyword[final] identifier[CircuitBreakerStatus] identifier[withThroughputOneMinute] operator[SEP] Keyword[double] identifier[value] operator[SEP] {
Keyword[double] identifier[newValue] operator[=] identifier[value] operator[SEP] Keyword[return] Keyword[new] identifier[CircuitBreakerStatus] operat... |
public static void showTextAligned(PdfContentByte canvas, int alignment, Phrase phrase, float x, float y, float rotation, int runDirection, int arabicOptions) {
if (alignment != Element.ALIGN_LEFT && alignment != Element.ALIGN_CENTER
&& alignment != Element.ALIGN_RIGHT)
alignment = Eleme... | class class_name[name] begin[{]
method[showTextAligned, return_type[void], modifier[public static], parameter[canvas, alignment, phrase, x, y, rotation, runDirection, arabicOptions]] begin[{]
if[binary_operation[binary_operation[binary_operation[member[.alignment], !=, member[Element.ALIGN_LEFT... | Keyword[public] Keyword[static] Keyword[void] identifier[showTextAligned] operator[SEP] identifier[PdfContentByte] identifier[canvas] , Keyword[int] identifier[alignment] , identifier[Phrase] identifier[phrase] , Keyword[float] identifier[x] , Keyword[float] identifier[y] , Keyword[float] identifier[rotation] , K... |
protected byte[] toByteArray(HttpEntity entity, int maxBytes) throws IOException {
if (entity == null) {
return new byte[0];
}
try (InputStream is = entity.getContent()) {
int size = (int) entity.getContentLength();
int readBufferLength = size;
if... | class class_name[name] begin[{]
method[toByteArray, return_type[type[byte]], modifier[protected], parameter[entity, maxBytes]] begin[{]
if[binary_operation[member[.entity], ==, literal[null]]] begin[{]
return[ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[]... | Keyword[protected] Keyword[byte] operator[SEP] operator[SEP] identifier[toByteArray] operator[SEP] identifier[HttpEntity] identifier[entity] , Keyword[int] identifier[maxBytes] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[entity] operator[==] Other[null] operator[... |
@SuppressWarnings("unchecked")
public void setAccessToken(String token) {
if (!StringUtils.isBlank(token)) {
try {
String payload = Utils.base64dec(StringUtils.substringBetween(token, ".", "."));
Map<String, Object> decoded = ParaObjectUtils.getJsonMapper().readValue(payload, Map.class);
if (decoded !... | class class_name[name] begin[{]
method[setAccessToken, return_type[void], modifier[public], parameter[token]] begin[{]
if[call[StringUtils.isBlank, parameter[member[.token]]]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimen... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[setAccessToken] operator[SEP] identifier[String] identifier[token] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[StringUtils] operator[SEP] identifier[isBlank] operat... |
@Programmatic
public CommunicationChannelOwnerLink findByCommunicationChannel(final CommunicationChannel communicationChannel) {
return container.firstMatch(
new QueryDefault<>(CommunicationChannelOwnerLink.class,
"findByCommunicationChannel",
... | class class_name[name] begin[{]
method[findByCommunicationChannel, return_type[type[CommunicationChannelOwnerLink]], modifier[public], parameter[communicationChannel]] begin[{]
return[call[container.firstMatch, parameter[ClassCreator(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], ... | annotation[@] identifier[Programmatic] Keyword[public] identifier[CommunicationChannelOwnerLink] identifier[findByCommunicationChannel] operator[SEP] Keyword[final] identifier[CommunicationChannel] identifier[communicationChannel] operator[SEP] {
Keyword[return] identifier[container] operator[SEP] identifier[fir... |
public JsonWriter object() {
startValue();
stack.push(context);
context = new JsonContext(JsonContext.Mode.MAP);
writer.write('{');
return this;
} | class class_name[name] begin[{]
method[object, return_type[type[JsonWriter]], modifier[public], parameter[]] begin[{]
call[.startValue, parameter[]]
call[stack.push, parameter[member[.context]]]
assign[member[.context], ClassCreator(arguments=[MemberReference(mem... | Keyword[public] identifier[JsonWriter] identifier[object] operator[SEP] operator[SEP] {
identifier[startValue] operator[SEP] operator[SEP] operator[SEP] identifier[stack] operator[SEP] identifier[push] operator[SEP] identifier[context] operator[SEP] operator[SEP] identifier[context] operator[=] Keyword[new] iden... |
public void initFrom(SessionFactory sessionFactory) {
Assert.notNull(sessionFactory);
Stopwatch watch = new Stopwatch().start();
Map<String, ClassMetadata> classMetadatas = sessionFactory.getAllClassMetadata();
int entityCount = entityTypes.size();
int collectionCount = collectionTypes.size();
f... | class class_name[name] begin[{]
method[initFrom, return_type[void], modifier[public], parameter[sessionFactory]] begin[{]
call[Assert.notNull, parameter[member[.sessionFactory]]]
local_variable[type[Stopwatch], watch]
local_variable[type[Map], classMetadatas]
local_varia... | Keyword[public] Keyword[void] identifier[initFrom] operator[SEP] identifier[SessionFactory] identifier[sessionFactory] operator[SEP] {
identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] identifier[sessionFactory] operator[SEP] operator[SEP] identifier[Stopwatch] identifier[watch] operator[=] Keyw... |
public static BufferedImage getDestination(final ImageReadParam param, final Iterator<ImageTypeSpecifier> types,
final int width, final int height) throws IIOException {
// Adapted from http://java.net/jira/secure/attachment/29712/TIFFImageReader.java.patch,
... | class class_name[name] begin[{]
method[getDestination, return_type[type[BufferedImage]], modifier[public static], parameter[param, types, width, height]] begin[{]
if[binary_operation[binary_operation[member[.types], ==, literal[null]], ||, call[types.hasNext, parameter[]]]] begin[{]
... | Keyword[public] Keyword[static] identifier[BufferedImage] identifier[getDestination] operator[SEP] Keyword[final] identifier[ImageReadParam] identifier[param] , Keyword[final] identifier[Iterator] operator[<] identifier[ImageTypeSpecifier] operator[>] identifier[types] , Keyword[final] Keyword[int] identifier[width] ... |
@SuppressWarnings("unchecked")
public static Set<Reference> toReferencesList(Vector<Object> referencesParams) throws GreenPepperServerException
{
Set<Reference> references = new TreeSet<Reference>();
for(Object referenceParams : referencesParams)
{
references.add(toReference(... | class class_name[name] begin[{]
method[toReferencesList, return_type[type[Set]], modifier[public static], parameter[referencesParams]] begin[{]
local_variable[type[Set], references]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(argument... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] identifier[Set] operator[<] identifier[Reference] operator[>] identifier[toReferencesList] operator[SEP] identifier[Vector] operator[<] identifier[Object] operator[>] identifier[referencesParams] opera... |
public static String escapeAttributeValue(Object value, Context cx)
{
XMLLib xmlLib = currentXMLLib(cx);
return xmlLib.escapeAttributeValue(value);
} | class class_name[name] begin[{]
method[escapeAttributeValue, return_type[type[String]], modifier[public static], parameter[value, cx]] begin[{]
local_variable[type[XMLLib], xmlLib]
return[call[xmlLib.escapeAttributeValue, parameter[member[.value]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[escapeAttributeValue] operator[SEP] identifier[Object] identifier[value] , identifier[Context] identifier[cx] operator[SEP] {
identifier[XMLLib] identifier[xmlLib] operator[=] identifier[currentXMLLib] operator[SEP] identifier[cx] operator[SEP] opera... |
private boolean isVisibleInFrontend(AccessControllable node) {
if (node == null) {
return false;
}
// check hidden flag
if (node.isHidden()) {
return false;
}
// Fetch already logged-in user, if present (don't try to login)
final Principal user = getUser(false);
if (user != null) {
final... | class class_name[name] begin[{]
method[isVisibleInFrontend, return_type[type[boolean]], modifier[private], parameter[node]] begin[{]
if[binary_operation[member[.node], ==, literal[null]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
if[ca... | Keyword[private] Keyword[boolean] identifier[isVisibleInFrontend] operator[SEP] identifier[AccessControllable] identifier[node] operator[SEP] {
Keyword[if] operator[SEP] identifier[node] operator[==] Other[null] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
Keyword[if]... |
public static ExpectedCondition<Boolean> invisibilityOf(final WebElement element) {
return new ExpectedCondition<Boolean>() {
@Override
public Boolean apply(WebDriver webDriver) {
return isInvisible(element);
}
@Override
public String toString() {
return "invisibility... | class class_name[name] begin[{]
method[invisibilityOf, return_type[type[ExpectedCondition]], modifier[public static], parameter[element]] begin[{]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvo... | Keyword[public] Keyword[static] identifier[ExpectedCondition] operator[<] identifier[Boolean] operator[>] identifier[invisibilityOf] operator[SEP] Keyword[final] identifier[WebElement] identifier[element] operator[SEP] {
Keyword[return] Keyword[new] identifier[ExpectedCondition] operator[<] identifier[Boolean] o... |
public static Replacer makeTable(Map<String, String> dict)
{
if(dict == null || dict.isEmpty())
return new Replacer(Pattern.compile("$"), new DummySubstitution(""));
TableSubstitution tab = new TableSubstitution(new LinkedHashMap<String, String>(dict));
StringBuilder sb = new Str... | class class_name[name] begin[{]
method[makeTable, return_type[type[Replacer]], modifier[public static], parameter[dict]] begin[{]
if[binary_operation[binary_operation[member[.dict], ==, literal[null]], ||, call[dict.isEmpty, parameter[]]]] begin[{]
return[ClassCreator(arguments=[MethodInvocatio... | Keyword[public] Keyword[static] identifier[Replacer] identifier[makeTable] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[dict] operator[SEP] {
Keyword[if] operator[SEP] identifier[dict] operator[==] Other[null] operator[||] identifier[dict] operator[SEP... |
@Override
public CompletableFuture<Acknowledge> triggerCheckpoint(
ExecutionAttemptID executionAttemptID,
long checkpointId,
long checkpointTimestamp,
CheckpointOptions checkpointOptions,
boolean advanceToEndOfEventTime) {
log.debug("Trigger checkpoint {}@{} for {}.", checkpointId, checkpointTimestamp... | class class_name[name] begin[{]
method[triggerCheckpoint, return_type[type[CompletableFuture]], modifier[public], parameter[executionAttemptID, checkpointId, checkpointTimestamp, checkpointOptions, advanceToEndOfEventTime]] begin[{]
call[log.debug, parameter[literal["Trigger checkpoint {}@{} fo... | annotation[@] identifier[Override] Keyword[public] identifier[CompletableFuture] operator[<] identifier[Acknowledge] operator[>] identifier[triggerCheckpoint] operator[SEP] identifier[ExecutionAttemptID] identifier[executionAttemptID] , Keyword[long] identifier[checkpointId] , Keyword[long] identifier[checkpointTimes... |
@XmlElementDecl(namespace = "http://www.w3.org/ns/prov#", name = "others")
public JAXBElement<Other> createOthers(Other value) {
return new JAXBElement<Other>(_Others_QNAME, Other.class, null, value);
} | class class_name[name] begin[{]
method[createOthers, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_Others_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[Other] operator[>] identifier[createOthers] operator[SEP] identifier[Other] identifier[val... |
public Enumeration<String> getKeys() {
Set<String> handleKeys = properties.stringPropertyNames();
return Collections.enumeration(handleKeys);
} | class class_name[name] begin[{]
method[getKeys, return_type[type[Enumeration]], modifier[public], parameter[]] begin[{]
local_variable[type[Set], handleKeys]
return[call[Collections.enumeration, parameter[member[.handleKeys]]]]
end[}]
END[}] | Keyword[public] identifier[Enumeration] operator[<] identifier[String] operator[>] identifier[getKeys] operator[SEP] operator[SEP] {
identifier[Set] operator[<] identifier[String] operator[>] identifier[handleKeys] operator[=] identifier[properties] operator[SEP] identifier[stringPropertyNames] operator[SEP] ope... |
public List<String> listDefaultString(final List<?> target, final Object defaultValue) {
if (target == null) {
return null;
}
final List<String> result = new ArrayList<String>(target.size() + 2);
for (final Object element : target) {
result.add(defaultString(eleme... | class class_name[name] begin[{]
method[listDefaultString, return_type[type[List]], modifier[public], parameter[target, defaultValue]] begin[{]
if[binary_operation[member[.target], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
lo... | Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[listDefaultString] operator[SEP] Keyword[final] identifier[List] operator[<] operator[?] operator[>] identifier[target] , Keyword[final] identifier[Object] identifier[defaultValue] operator[SEP] {
Keyword[if] operator[SEP] id... |
@Override
public Object[] findIdsByColumn(String schemaName, String tableName, String pKeyName, String columnName,
Object columnValue, Class entityClazz)
{
TermQueryBuilder filter = QueryBuilders.termQuery(columnName, columnValue);
SearchResponse response = txClient.prepareSearch(s... | class class_name[name] begin[{]
method[findIdsByColumn, return_type[type[Object]], modifier[public], parameter[schemaName, tableName, pKeyName, columnName, columnValue, entityClazz]] begin[{]
local_variable[type[TermQueryBuilder], filter]
local_variable[type[SearchResponse], response]
l... | annotation[@] identifier[Override] Keyword[public] identifier[Object] operator[SEP] operator[SEP] identifier[findIdsByColumn] operator[SEP] identifier[String] identifier[schemaName] , identifier[String] identifier[tableName] , identifier[String] identifier[pKeyName] , identifier[String] identifier[columnName] , ide... |
public static void cursorIntToContentValues(Cursor cursor, String field, ContentValues values,
String key) {
int colIndex = cursor.getColumnIndex(field);
if (!cursor.isNull(colIndex)) {
values.put(key, cursor.getInt(colIndex));
} else {
values.put(key, (Intege... | class class_name[name] begin[{]
method[cursorIntToContentValues, return_type[void], modifier[public static], parameter[cursor, field, values, key]] begin[{]
local_variable[type[int], colIndex]
if[call[cursor.isNull, parameter[member[.colIndex]]]] begin[{]
call[va... | Keyword[public] Keyword[static] Keyword[void] identifier[cursorIntToContentValues] operator[SEP] identifier[Cursor] identifier[cursor] , identifier[String] identifier[field] , identifier[ContentValues] identifier[values] , identifier[String] identifier[key] operator[SEP] {
Keyword[int] identifier[colIndex] op... |
public static void copyStream(final File aFile, final OutputStream aOutStream) throws IOException {
final FileInputStream input = new FileInputStream(aFile);
final FileChannel channel = input.getChannel();
final byte[] buffer = new byte[256 * 1024];
final ByteBuffer byteBuffer = ByteBuff... | class class_name[name] begin[{]
method[copyStream, return_type[void], modifier[public static], parameter[aFile, aOutStream]] begin[{]
local_variable[type[FileInputStream], input]
local_variable[type[FileChannel], channel]
local_variable[type[byte], buffer]
local_variable[type[By... | Keyword[public] Keyword[static] Keyword[void] identifier[copyStream] operator[SEP] Keyword[final] identifier[File] identifier[aFile] , Keyword[final] identifier[OutputStream] identifier[aOutStream] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[final] identifier[FileInputStream] identifier[inpu... |
public void setPhoneNumbers(java.util.Collection<String> phoneNumbers) {
if (phoneNumbers == null) {
this.phoneNumbers = null;
return;
}
this.phoneNumbers = new com.amazonaws.internal.SdkInternalList<String>(phoneNumbers);
} | class class_name[name] begin[{]
method[setPhoneNumbers, return_type[void], modifier[public], parameter[phoneNumbers]] begin[{]
if[binary_operation[member[.phoneNumbers], ==, literal[null]]] begin[{]
assign[THIS[member[None.phoneNumbers]], literal[null]]
retur... | Keyword[public] Keyword[void] identifier[setPhoneNumbers] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[phoneNumbers] operator[SEP] {
Keyword[if] operator[SEP] identifier[phoneNumbers] operator[==] Other[nu... |
private void doVerify(Parameter p) throws NamespaceSyntaxWarning {
if (p.getValue() == null) {
throw new InvalidArgument("parameter value is null");
}
Namespace ns = p.getNamespace();
String resourceLocation = ns.getResourceLocation();
if (resourceLocation == null) ... | class class_name[name] begin[{]
method[doVerify, return_type[void], modifier[private], parameter[p]] begin[{]
if[binary_operation[call[p.getValue, parameter[]], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operat... | Keyword[private] Keyword[void] identifier[doVerify] operator[SEP] identifier[Parameter] identifier[p] operator[SEP] Keyword[throws] identifier[NamespaceSyntaxWarning] {
Keyword[if] operator[SEP] identifier[p] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] {... |
protected final void finish(Split split) {
if (split != null) {
SimonManager.getStopwatch(sqlCmdLabel).addSplit(split.stop());
}
} | class class_name[name] begin[{]
method[finish, return_type[void], modifier[final protected], parameter[split]] begin[{]
if[binary_operation[member[.split], !=, literal[null]]] begin[{]
call[SimonManager.getStopwatch, parameter[member[.sqlCmdLabel]]]
else begin[{]... | Keyword[protected] Keyword[final] Keyword[void] identifier[finish] operator[SEP] identifier[Split] identifier[split] operator[SEP] {
Keyword[if] operator[SEP] identifier[split] operator[!=] Other[null] operator[SEP] {
identifier[SimonManager] operator[SEP] identifier[getStopwatch] operator[SEP] identi... |
private void checkEncodingLiteral(String encodingName) throws SAXException {
if (encodingName == null) {
return;
}
if (encodingName.length() == 0) {
fatal("The empty string does not a legal encoding name.");
}
char c = encodingName.charAt(0);
if (!... | class class_name[name] begin[{]
method[checkEncodingLiteral, return_type[void], modifier[private], parameter[encodingName]] begin[{]
if[binary_operation[member[.encodingName], ==, literal[null]]] begin[{]
return[None]
else begin[{]
None
end[}]
if[bina... | Keyword[private] Keyword[void] identifier[checkEncodingLiteral] operator[SEP] identifier[String] identifier[encodingName] operator[SEP] Keyword[throws] identifier[SAXException] {
Keyword[if] operator[SEP] identifier[encodingName] operator[==] Other[null] operator[SEP] {
Keyword[return] operator[SEP]
... |
private Class<?> getClassForType(String typeName) throws GPUdbException {
typeName = typeName.replace(" ", "");
if (typeName.equalsIgnoreCase(STRING_TYPE_NAME)) {
return String.class;
} else if (typeName.equalsIgnoreCase(LONG_TYPE_NAME)) {
return Long.class;
} else if (typeName.equalsIgnore... | class class_name[name] begin[{]
method[getClassForType, return_type[type[Class]], modifier[private], parameter[typeName]] begin[{]
assign[member[.typeName], call[typeName.replace, parameter[literal[" "], literal[""]]]]
if[call[typeName.equalsIgnoreCase, parameter[member[.STRING_... | Keyword[private] identifier[Class] operator[<] operator[?] operator[>] identifier[getClassForType] operator[SEP] identifier[String] identifier[typeName] operator[SEP] Keyword[throws] identifier[GPUdbException] {
identifier[typeName] operator[=] identifier[typeName] operator[SEP] identifier[replace] operator[SEP]... |
public boolean isAssignableFrom(final Type<?> type) {
Utils.validateNotNull(type, "Type cannot be null");
final TypeRegistry typeRegistry = TypeRegistry.getInstance();
return typeRegistry.isAssignableFrom(this, type);
} | class class_name[name] begin[{]
method[isAssignableFrom, return_type[type[boolean]], modifier[public], parameter[type]] begin[{]
call[Utils.validateNotNull, parameter[member[.type], literal["Type cannot be null"]]]
local_variable[type[TypeRegistry], typeRegistry]
return[call[typ... | Keyword[public] Keyword[boolean] identifier[isAssignableFrom] operator[SEP] Keyword[final] identifier[Type] operator[<] operator[?] operator[>] identifier[type] operator[SEP] {
identifier[Utils] operator[SEP] identifier[validateNotNull] operator[SEP] identifier[type] , literal[String] operator[SEP] operator[SEP... |
public static List<Pipe> getAllGramsPipes(String name, File inputFile,
boolean ignoreCase) throws Exception {
return getAllGramsPipes(name, inputFile, ignoreCase, 1);
} | class class_name[name] begin[{]
method[getAllGramsPipes, return_type[type[List]], modifier[public static], parameter[name, inputFile, ignoreCase]] begin[{]
return[call[.getAllGramsPipes, parameter[member[.name], member[.inputFile], member[.ignoreCase], literal[1]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[Pipe] operator[>] identifier[getAllGramsPipes] operator[SEP] identifier[String] identifier[name] , identifier[File] identifier[inputFile] , Keyword[boolean] identifier[ignoreCase] operator[SEP] Keyword[throws] identifier[Exception] {
Keywo... |
public Iterable<BoxTaskAssignment.Info> getAllAssignments(String ... fields) {
final QueryStringBuilder builder = new QueryStringBuilder();
if (fields.length > 0) {
builder.appendParam("fields", fields);
}
return new Iterable<BoxTaskAssignment.Info>() {
public Ite... | class class_name[name] begin[{]
method[getAllAssignments, return_type[type[Iterable]], modifier[public], parameter[fields]] begin[{]
local_variable[type[QueryStringBuilder], builder]
if[binary_operation[member[fields.length], >, literal[0]]] begin[{]
call[builder... | Keyword[public] identifier[Iterable] operator[<] identifier[BoxTaskAssignment] operator[SEP] identifier[Info] operator[>] identifier[getAllAssignments] operator[SEP] identifier[String] operator[...] identifier[fields] operator[SEP] {
Keyword[final] identifier[QueryStringBuilder] identifier[builder] operator[=] K... |
public Span nextSpan(Message<?> message) {
MessageHeaderAccessor headers = mutableHeaderAccessor(message);
TraceContextOrSamplingFlags extracted = this.extractor.extract(headers);
headers.setImmutable();
Span result = this.tracer.nextSpan(extracted);
if (extracted.context() == null && !result.isNoop()) {
a... | class class_name[name] begin[{]
method[nextSpan, return_type[type[Span]], modifier[public], parameter[message]] begin[{]
local_variable[type[MessageHeaderAccessor], headers]
local_variable[type[TraceContextOrSamplingFlags], extracted]
call[headers.setImmutable, parameter[]]
... | Keyword[public] identifier[Span] identifier[nextSpan] operator[SEP] identifier[Message] operator[<] operator[?] operator[>] identifier[message] operator[SEP] {
identifier[MessageHeaderAccessor] identifier[headers] operator[=] identifier[mutableHeaderAccessor] operator[SEP] identifier[message] operator[SEP] opera... |
@ShellMethod(key = "validate-endpoint", value = "Test connections to an endpoint to verify connectivity, SSL, etc")
public void validateEndpoint(
@ShellOption(value = {"url"},
help = "Endpoint URL to test") final String url,
@ShellOption(value = {"proxy"},
help = "Proxy addre... | class class_name[name] begin[{]
method[validateEndpoint, return_type[void], modifier[public], parameter[url, proxy, timeout]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="T... | annotation[@] identifier[ShellMethod] operator[SEP] identifier[key] operator[=] literal[String] , identifier[value] operator[=] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[validateEndpoint] operator[SEP] annotation[@] identifier[ShellOption] operator[SEP] identifier[value] operator[=] {
... |
public static RePairGrammar parse(String inputStr) {
Date start0 = new Date();
LOGGER.debug("input string (" + String.valueOf(countSpaces(inputStr) + 1) + " tokens) ");
RePairGrammar grammar = new RePairGrammar();
// two data structures
//
// 1.0. - the string
ArrayList<RePairSymbolRecord... | class class_name[name] begin[{]
method[parse, return_type[type[RePairGrammar]], modifier[public static], parameter[inputStr]] begin[{]
local_variable[type[Date], start0]
call[LOGGER.debug, parameter[binary_operation[binary_operation[literal["input string ("], +, call[String.valueOf, par... | Keyword[public] Keyword[static] identifier[RePairGrammar] identifier[parse] operator[SEP] identifier[String] identifier[inputStr] operator[SEP] {
identifier[Date] identifier[start0] operator[=] Keyword[new] identifier[Date] operator[SEP] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[deb... |
@Override
public String invoke(Object connection, String request, int timeout, Map<String,String> headers)
throws ConnectionException, AdapterException {
HttpHelper httpHelper = null;
try {
// invoke service over http
// allow users to override
httpHelper = ge... | class class_name[name] begin[{]
method[invoke, return_type[type[String]], modifier[public], parameter[connection, request, timeout, headers]] begin[{]
local_variable[type[HttpHelper], httpHelper]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=ht... | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[invoke] operator[SEP] identifier[Object] identifier[connection] , identifier[String] identifier[request] , Keyword[int] identifier[timeout] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[he... |
public static LongBinding decrementExact(final ObservableLongValue a) {
return createLongBinding(() -> Math.decrementExact(a.get()), a);
} | class class_name[name] begin[{]
method[decrementExact, return_type[type[LongBinding]], modifier[public static], parameter[a]] begin[{]
return[call[.createLongBinding, parameter[LambdaExpression(body=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_oper... | Keyword[public] Keyword[static] identifier[LongBinding] identifier[decrementExact] operator[SEP] Keyword[final] identifier[ObservableLongValue] identifier[a] operator[SEP] {
Keyword[return] identifier[createLongBinding] operator[SEP] operator[SEP] operator[SEP] operator[->] identifier[Math] operator[SEP] identif... |
public static String getTableNameFromId(Database catalog, int tableId) {
String tableName = null;
for (Table table: catalog.getTables()) {
if (table.getRelativeIndex() == tableId) {
tableName = table.getTypeName();
}
}
return tableName;
} | class class_name[name] begin[{]
method[getTableNameFromId, return_type[type[String]], modifier[public static], parameter[catalog, tableId]] begin[{]
local_variable[type[String], tableName]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=Me... | Keyword[public] Keyword[static] identifier[String] identifier[getTableNameFromId] operator[SEP] identifier[Database] identifier[catalog] , Keyword[int] identifier[tableId] operator[SEP] {
identifier[String] identifier[tableName] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[Table] ... |
private static <T> T statementToObject(final PreparedStatement stmt, final T target, final Object... args) throws SQLException
{
populateStatementParameters(stmt, args);
try (final ResultSet resultSet = stmt.executeQuery()) {
if (resultSet.next()) {
return resultSetToObject(resultSe... | class class_name[name] begin[{]
method[statementToObject, return_type[type[T]], modifier[private static], parameter[stmt, target, args]] begin[{]
call[.populateStatementParameters, parameter[member[.stmt], member[.args]]]
TryStatement(block=[IfStatement(condition=MethodInvocation(argume... | Keyword[private] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[statementToObject] operator[SEP] Keyword[final] identifier[PreparedStatement] identifier[stmt] , Keyword[final] identifier[T] identifier[target] , Keyword[final] identifier[Object] operator[...] identifier[args] operator[S... |
@Override
public LambdaExpression visitStandardLambdaExpression(StandardLambdaExpressionContext ctx) {
return configureAST(this.createLambda(ctx.standardLambdaParameters(), ctx.lambdaBody()), ctx);
} | class class_name[name] begin[{]
method[visitStandardLambdaExpression, return_type[type[LambdaExpression]], modifier[public], parameter[ctx]] begin[{]
return[call[.configureAST, parameter[THIS[call[None.createLambda, parameter[call[ctx.standardLambdaParameters, parameter[]], call[ctx.lambdaBody, paramet... | annotation[@] identifier[Override] Keyword[public] identifier[LambdaExpression] identifier[visitStandardLambdaExpression] operator[SEP] identifier[StandardLambdaExpressionContext] identifier[ctx] operator[SEP] {
Keyword[return] identifier[configureAST] operator[SEP] Keyword[this] operator[SEP] identifier[createL... |
public static <S extends Sequence<S>> int calculateScore(S seq1, Mutations<S> mutations,
AlignmentScoring<S> scoring) {
return calculateScore(seq1, new Range(0, seq1.size()), mutations, scoring);
} | class class_name[name] begin[{]
method[calculateScore, return_type[type[int]], modifier[public static], parameter[seq1, mutations, scoring]] begin[{]
return[call[.calculateScore, parameter[member[.seq1], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selector... | Keyword[public] Keyword[static] operator[<] identifier[S] Keyword[extends] identifier[Sequence] operator[<] identifier[S] operator[>] operator[>] Keyword[int] identifier[calculateScore] operator[SEP] identifier[S] identifier[seq1] , identifier[Mutations] operator[<] identifier[S] operator[>] identifier[mutations] , i... |
protected String parseLocalName2(int start, int hash)
throws XMLStreamException
{
int ptr = mInputEnd - start;
// Let's assume fairly short names
char[] outBuf = getNameBuffer(ptr+8);
if (ptr > 0) {
System.arraycopy(mInputBuffer, start, outBuf, 0, ptr);
}... | class class_name[name] begin[{]
method[parseLocalName2, return_type[type[String]], modifier[protected], parameter[start, hash]] begin[{]
local_variable[type[int], ptr]
local_variable[type[char], outBuf]
if[binary_operation[member[.ptr], >, literal[0]]] begin[{]
... | Keyword[protected] identifier[String] identifier[parseLocalName2] operator[SEP] Keyword[int] identifier[start] , Keyword[int] identifier[hash] operator[SEP] Keyword[throws] identifier[XMLStreamException] {
Keyword[int] identifier[ptr] operator[=] identifier[mInputEnd] operator[-] identifier[start] operator[SEP]... |
private UserProfile removeUserProfile(Session session, String userName, boolean broadcast) throws Exception
{
Node profileNode;
try
{
profileNode = utils.getProfileNode(session, userName);
}
catch (PathNotFoundException e)
{
return null;
}
UserProfil... | class class_name[name] begin[{]
method[removeUserProfile, return_type[type[UserProfile]], modifier[private], parameter[session, userName, broadcast]] begin[{]
local_variable[type[Node], profileNode]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member... | Keyword[private] identifier[UserProfile] identifier[removeUserProfile] operator[SEP] identifier[Session] identifier[session] , identifier[String] identifier[userName] , Keyword[boolean] identifier[broadcast] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[Node] identifier[profileNode] operator... |
@Override
public void dispose() throws Exception {
Exception exception = null;
StreamTask<?, ?> containingTask = getContainingTask();
CloseableRegistry taskCloseableRegistry = containingTask != null ?
containingTask.getCancelables() :
null;
try {
if (taskCloseableRegistry == null ||
taskCloseab... | class class_name[name] begin[{]
method[dispose, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[Exception], exception]
local_variable[type[StreamTask], containingTask]
local_variable[type[CloseableRegistry], taskCloseableRegistry]
TryStatement(bloc... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[dispose] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[Exception] identifier[exception] operator[=] Other[null] operator[SEP] identifier[StreamTask] operator[<] operator[?] , operator[?] operator[>] iden... |
public static BigInteger getVarIntBI(byte[] varInt) {
BigInteger result=BigInteger.ZERO;
if (varInt.length==0) {
return result;
}
int unsignedByte=varInt[0] & 0xFF;
if (unsignedByte<0xFD) {
return new BigInteger(new byte[] {(byte) unsignedByte});
}
int intSize=0;
if (unsignedByte==0xFD) {
intSize=3;
}
... | class class_name[name] begin[{]
method[getVarIntBI, return_type[type[BigInteger]], modifier[public static], parameter[varInt]] begin[{]
local_variable[type[BigInteger], result]
if[binary_operation[member[varInt.length], ==, literal[0]]] begin[{]
return[member[.result]]
... | Keyword[public] Keyword[static] identifier[BigInteger] identifier[getVarIntBI] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[varInt] operator[SEP] {
identifier[BigInteger] identifier[result] operator[=] identifier[BigInteger] operator[SEP] identifier[ZERO] operator[SEP] Keyword[if] operator[... |
void putAll(BaseRow sortKey, Collection<BaseRow> values) {
treeMap.put(sortKey, values);
currentTopNum += values.size();
} | class class_name[name] begin[{]
method[putAll, return_type[void], modifier[default], parameter[sortKey, values]] begin[{]
call[treeMap.put, parameter[member[.sortKey], member[.values]]]
assign[member[.currentTopNum], call[values.size, parameter[]]]
end[}]
END[}] | Keyword[void] identifier[putAll] operator[SEP] identifier[BaseRow] identifier[sortKey] , identifier[Collection] operator[<] identifier[BaseRow] operator[>] identifier[values] operator[SEP] {
identifier[treeMap] operator[SEP] identifier[put] operator[SEP] identifier[sortKey] , identifier[values] operator[SEP] o... |
public static PredicateTemplate predicateTemplate(String template, Object... args) {
return predicateTemplate(TemplateFactory.DEFAULT.create(template), ImmutableList.copyOf(args));
} | class class_name[name] begin[{]
method[predicateTemplate, return_type[type[PredicateTemplate]], modifier[public static], parameter[template, args]] begin[{]
return[call[.predicateTemplate, parameter[call[TemplateFactory.DEFAULT.create, parameter[member[.template]]], call[ImmutableList.copyOf, parameter... | Keyword[public] Keyword[static] identifier[PredicateTemplate] identifier[predicateTemplate] operator[SEP] identifier[String] identifier[template] , identifier[Object] operator[...] identifier[args] operator[SEP] {
Keyword[return] identifier[predicateTemplate] operator[SEP] identifier[TemplateFactory] operator[S... |
static Key str2Key(String s) {
Key k = str2Key_impl(s);
assert key2Str_impl(k, decodeType(s)).equals(s) : "bijection fail " + s + " <-> " + k;
return k;
} | class class_name[name] begin[{]
method[str2Key, return_type[type[Key]], modifier[static], parameter[s]] begin[{]
local_variable[type[Key], k]
AssertStatement(condition=MethodInvocation(arguments=[MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Met... | Keyword[static] identifier[Key] identifier[str2Key] operator[SEP] identifier[String] identifier[s] operator[SEP] {
identifier[Key] identifier[k] operator[=] identifier[str2Key_impl] operator[SEP] identifier[s] operator[SEP] operator[SEP] Keyword[assert] identifier[key2Str_impl] operator[SEP] identifier[k] , ide... |
public static CurrencyFunction currency(String fieldName) {
Assert.hasText(fieldName, "FieldName must not be empty!");
return currency(fieldName, null);
} | class class_name[name] begin[{]
method[currency, return_type[type[CurrencyFunction]], modifier[public static], parameter[fieldName]] begin[{]
call[Assert.hasText, parameter[member[.fieldName], literal["FieldName must not be empty!"]]]
return[call[.currency, parameter[member[.fieldName],... | Keyword[public] Keyword[static] identifier[CurrencyFunction] identifier[currency] operator[SEP] identifier[String] identifier[fieldName] operator[SEP] {
identifier[Assert] operator[SEP] identifier[hasText] operator[SEP] identifier[fieldName] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifi... |
public List<CmsResource> readResourcesVisitedBy(CmsDbContext dbc, String poolName, CmsVisitedByFilter filter)
throws CmsException {
List<CmsResource> result = getSubscriptionDriver().readResourcesVisitedBy(dbc, poolName, filter);
result = filterPermissions(dbc, result, CmsResourceFilter.DEFAULT);
... | class class_name[name] begin[{]
method[readResourcesVisitedBy, return_type[type[List]], modifier[public], parameter[dbc, poolName, filter]] begin[{]
local_variable[type[List], result]
assign[member[.result], call[.filterPermissions, parameter[member[.dbc], member[.result], member[CmsRes... | Keyword[public] identifier[List] operator[<] identifier[CmsResource] operator[>] identifier[readResourcesVisitedBy] operator[SEP] identifier[CmsDbContext] identifier[dbc] , identifier[String] identifier[poolName] , identifier[CmsVisitedByFilter] identifier[filter] operator[SEP] Keyword[throws] identifier[CmsException... |
protected void percolateDownMaxHeap(final int index) {
final Activation element = elements[index];
int hole = index;
while ((hole * 2) <= size) {
int child = hole * 2;
// if we have a right child and that child can not be percolated
// up then move onto othe... | class class_name[name] begin[{]
method[percolateDownMaxHeap, return_type[void], modifier[protected], parameter[index]] begin[{]
local_variable[type[Activation], element]
local_variable[type[int], hole]
while[binary_operation[binary_operation[member[.hole], *, literal[2]], <=, me... | Keyword[protected] Keyword[void] identifier[percolateDownMaxHeap] operator[SEP] Keyword[final] Keyword[int] identifier[index] operator[SEP] {
Keyword[final] identifier[Activation] identifier[element] operator[=] identifier[elements] operator[SEP] identifier[index] operator[SEP] operator[SEP] Keyword[int] identif... |
@NotNull
public Optional<T> executeIfAbsent(@NotNull Runnable action) {
if (value == null)
action.run();
return this;
} | class class_name[name] begin[{]
method[executeIfAbsent, return_type[type[Optional]], modifier[public], parameter[action]] begin[{]
if[binary_operation[member[.value], ==, literal[null]]] begin[{]
call[action.run, parameter[]]
else begin[{]
None
end[}]
return[... | annotation[@] identifier[NotNull] Keyword[public] identifier[Optional] operator[<] identifier[T] operator[>] identifier[executeIfAbsent] operator[SEP] annotation[@] identifier[NotNull] identifier[Runnable] identifier[action] operator[SEP] {
Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] ope... |
@Override
public boolean satisfies(Match match, int... ind)
{
BioPAXElement ele = match.get(ind[0]);
if (!idMap.containsKey(ele))
idMap.put(ele, idFetcher.fetchID(ele));
return idMap.get(ele) != null && !idMap.get(ele).isEmpty();
} | class class_name[name] begin[{]
method[satisfies, return_type[type[boolean]], modifier[public], parameter[match, ind]] begin[{]
local_variable[type[BioPAXElement], ele]
if[call[idMap.containsKey, parameter[member[.ele]]]] begin[{]
call[idMap.put, parameter[member[.ele], call... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[satisfies] operator[SEP] identifier[Match] identifier[match] , Keyword[int] operator[...] identifier[ind] operator[SEP] {
identifier[BioPAXElement] identifier[ele] operator[=] identifier[match] operator[SEP] identifier[get] operator[... |
public CmsElementSettingsConfig getElementSettingsConfig(
CmsResource page,
CmsContainerElementBean element,
String containerId,
Collection<CmsContainer> containers)
throws CmsException {
Locale wpLocale = OpenCms.getWorkplaceManager().getWorkplaceLocale(m_cms);
Loca... | class class_name[name] begin[{]
method[getElementSettingsConfig, return_type[type[CmsElementSettingsConfig]], modifier[public], parameter[page, element, containerId, containers]] begin[{]
local_variable[type[Locale], wpLocale]
local_variable[type[Locale], requestLocale]
call[m_c... | Keyword[public] identifier[CmsElementSettingsConfig] identifier[getElementSettingsConfig] operator[SEP] identifier[CmsResource] identifier[page] , identifier[CmsContainerElementBean] identifier[element] , identifier[String] identifier[containerId] , identifier[Collection] operator[<] identifier[CmsContainer] operato... |
public static Object getProperty(Stanza packet, String name) {
Object res = null;
JivePropertiesExtension jpe = (JivePropertiesExtension) packet.getExtension(JivePropertiesExtension.NAMESPACE);
if (jpe != null) {
res = jpe.getProperty(name);
}
return res;
} | class class_name[name] begin[{]
method[getProperty, return_type[type[Object]], modifier[public static], parameter[packet, name]] begin[{]
local_variable[type[Object], res]
local_variable[type[JivePropertiesExtension], jpe]
if[binary_operation[member[.jpe], !=, literal[null]]] be... | Keyword[public] Keyword[static] identifier[Object] identifier[getProperty] operator[SEP] identifier[Stanza] identifier[packet] , identifier[String] identifier[name] operator[SEP] {
identifier[Object] identifier[res] operator[=] Other[null] operator[SEP] identifier[JivePropertiesExtension] identifier[jpe] operat... |
public ImmutableRangeSet<C> union(RangeSet<C> other) {
return unionOf(Iterables.concat(asRanges(), other.asRanges()));
} | class class_name[name] begin[{]
method[union, return_type[type[ImmutableRangeSet]], modifier[public], parameter[other]] begin[{]
return[call[.unionOf, parameter[call[Iterables.concat, parameter[call[.asRanges, parameter[]], call[other.asRanges, parameter[]]]]]]]
end[}]
END[}] | Keyword[public] identifier[ImmutableRangeSet] operator[<] identifier[C] operator[>] identifier[union] operator[SEP] identifier[RangeSet] operator[<] identifier[C] operator[>] identifier[other] operator[SEP] {
Keyword[return] identifier[unionOf] operator[SEP] identifier[Iterables] operator[SEP] identifier[concat]... |
boolean subSequenceEquals(CharSequence cs1, int offset1, CharSequence cs2, int offset2, int length) {
if (offset1 + length > cs1.length() || offset2 + length > cs2.length()) {
return false;
}
if (isCaseSensitive()) {
for (int i = 0; i < length; i++) {
char... | class class_name[name] begin[{]
method[subSequenceEquals, return_type[type[boolean]], modifier[default], parameter[cs1, offset1, cs2, offset2, length]] begin[{]
if[binary_operation[binary_operation[binary_operation[member[.offset1], +, member[.length]], >, call[cs1.length, parameter[]]], ||, bi... | Keyword[boolean] identifier[subSequenceEquals] operator[SEP] identifier[CharSequence] identifier[cs1] , Keyword[int] identifier[offset1] , identifier[CharSequence] identifier[cs2] , Keyword[int] identifier[offset2] , Keyword[int] identifier[length] operator[SEP] {
Keyword[if] operator[SEP] identifier[offset1... |
private static Field findIdField(final Object value) {
Field res = null;
final Class<?> type = value.getClass();
if (ODatabaseRecordThreadLocal.instance().isDefined()) {
res = OObjectEntitySerializer.getIdField(type);
} else {
final String idField = OObjectSeriali... | class class_name[name] begin[{]
method[findIdField, return_type[type[Field]], modifier[private static], parameter[value]] begin[{]
local_variable[type[Field], res]
local_variable[type[Class], type]
if[call[ODatabaseRecordThreadLocal.instance, parameter[]]] begin[{]
... | Keyword[private] Keyword[static] identifier[Field] identifier[findIdField] operator[SEP] Keyword[final] identifier[Object] identifier[value] operator[SEP] {
identifier[Field] identifier[res] operator[=] Other[null] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[type... |
public <X> X newProxy(Class<X> interfaces) {
return (X) newProxy(new Class[] {interfaces});
} | class class_name[name] begin[{]
method[newProxy, return_type[type[X]], modifier[public], parameter[interfaces]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=interfaces, postfix_operators=[],... | Keyword[public] operator[<] identifier[X] operator[>] identifier[X] identifier[newProxy] operator[SEP] identifier[Class] operator[<] identifier[X] operator[>] identifier[interfaces] operator[SEP] {
Keyword[return] operator[SEP] identifier[X] operator[SEP] identifier[newProxy] operator[SEP] Keyword[new] identifie... |
public static TimerJobEntity createTimerEntityForTimerEventDefinition(TimerEventDefinition timerEventDefinition, boolean isInterruptingTimer,
ExecutionEntity executionEntity, String jobHandlerType, String jobHandlerConfig) {
ProcessEngineConfigurationImpl processEngineConfiguration = Context.getProcessEngin... | class class_name[name] begin[{]
method[createTimerEntityForTimerEventDefinition, return_type[type[TimerJobEntity]], modifier[public static], parameter[timerEventDefinition, isInterruptingTimer, executionEntity, jobHandlerType, jobHandlerConfig]] begin[{]
local_variable[type[ProcessEngineConfigurationIm... | Keyword[public] Keyword[static] identifier[TimerJobEntity] identifier[createTimerEntityForTimerEventDefinition] operator[SEP] identifier[TimerEventDefinition] identifier[timerEventDefinition] , Keyword[boolean] identifier[isInterruptingTimer] , identifier[ExecutionEntity] identifier[executionEntity] , identifier[Str... |
public <T> Future<T> executeMethod(Callable<T> call,Content content){
LogProcessContext logProcessContext = getLogProcessContext();
return logProcessContext.getExecuteManager().cacheCall(call, content);
} | class class_name[name] begin[{]
method[executeMethod, return_type[type[Future]], modifier[public], parameter[call, content]] begin[{]
local_variable[type[LogProcessContext], logProcessContext]
return[call[logProcessContext.getExecuteManager, parameter[]]]
end[}]
END[}] | Keyword[public] operator[<] identifier[T] operator[>] identifier[Future] operator[<] identifier[T] operator[>] identifier[executeMethod] operator[SEP] identifier[Callable] operator[<] identifier[T] operator[>] identifier[call] , identifier[Content] identifier[content] operator[SEP] {
identifier[LogProcessContex... |
public void logTimes(String src, long mtime, long atime) {
TimesOp op = TimesOp.getInstance();
op.set(src, mtime, atime);
logEdit(op);
} | class class_name[name] begin[{]
method[logTimes, return_type[void], modifier[public], parameter[src, mtime, atime]] begin[{]
local_variable[type[TimesOp], op]
call[op.set, parameter[member[.src], member[.mtime], member[.atime]]]
call[.logEdit, parameter[member[.op]]]
... | Keyword[public] Keyword[void] identifier[logTimes] operator[SEP] identifier[String] identifier[src] , Keyword[long] identifier[mtime] , Keyword[long] identifier[atime] operator[SEP] {
identifier[TimesOp] identifier[op] operator[=] identifier[TimesOp] operator[SEP] identifier[getInstance] operator[SEP] operator... |
@Override
public synchronized void close() throws SecurityException {
if (logging != null) {
try {
logging.close();
} catch (Exception ex) {
// ignore
}
}
logging = null;
} | class class_name[name] begin[{]
method[close, return_type[void], modifier[synchronized public], parameter[]] begin[{]
if[binary_operation[member[.logging], !=, literal[null]]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, po... | annotation[@] identifier[Override] Keyword[public] Keyword[synchronized] Keyword[void] identifier[close] operator[SEP] operator[SEP] Keyword[throws] identifier[SecurityException] {
Keyword[if] operator[SEP] identifier[logging] operator[!=] Other[null] operator[SEP] {
Keyword[try] {
iden... |
static <T> CompletableFuture<T> toFuture(Call<T> callToWrap) {
final CallbackAdaptor<T> completableFuture = new CallbackAdaptor<>();
callToWrap.enqueue(completableFuture);
return completableFuture;
} | class class_name[name] begin[{]
method[toFuture, return_type[type[CompletableFuture]], modifier[static], parameter[callToWrap]] begin[{]
local_variable[type[CallbackAdaptor], completableFuture]
call[callToWrap.enqueue, parameter[member[.completableFuture]]]
return[member[.comple... | Keyword[static] operator[<] identifier[T] operator[>] identifier[CompletableFuture] operator[<] identifier[T] operator[>] identifier[toFuture] operator[SEP] identifier[Call] operator[<] identifier[T] operator[>] identifier[callToWrap] operator[SEP] {
Keyword[final] identifier[CallbackAdaptor] operator[<] identif... |
public static <E> E checkNotInstanceOf(Class type, E object, String errorMessage) {
isNotNull(type, "type");
if (type.isInstance(object)) {
throw new IllegalArgumentException(errorMessage);
}
return object;
} | class class_name[name] begin[{]
method[checkNotInstanceOf, return_type[type[E]], modifier[public static], parameter[type, object, errorMessage]] begin[{]
call[.isNotNull, parameter[member[.type], literal["type"]]]
if[call[type.isInstance, parameter[member[.object]]]] begin[{]
... | Keyword[public] Keyword[static] operator[<] identifier[E] operator[>] identifier[E] identifier[checkNotInstanceOf] operator[SEP] identifier[Class] identifier[type] , identifier[E] identifier[object] , identifier[String] identifier[errorMessage] operator[SEP] {
identifier[isNotNull] operator[SEP] identifier[typ... |
public
void doConfigure(final InputStream inputStream, LoggerRepository repository)
throws FactoryConfigurationError {
ParseAction action = new ParseAction() {
public Document parse(final DocumentBuilder parser) throws SAXException, IOException {
... | class class_name[name] begin[{]
method[doConfigure, return_type[void], modifier[public], parameter[inputStream, repository]] begin[{]
local_variable[type[ParseAction], action]
call[.doConfigure, parameter[member[.action], member[.repository]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[doConfigure] operator[SEP] Keyword[final] identifier[InputStream] identifier[inputStream] , identifier[LoggerRepository] identifier[repository] operator[SEP] Keyword[throws] identifier[FactoryConfigurationError] {
identifier[ParseAction] identifier[action] operator[=] Ke... |
public Matrix4d scale(Vector3dc xyz, Matrix4d dest) {
return scale(xyz.x(), xyz.y(), xyz.z(), dest);
} | class class_name[name] begin[{]
method[scale, return_type[type[Matrix4d]], modifier[public], parameter[xyz, dest]] begin[{]
return[call[.scale, parameter[call[xyz.x, parameter[]], call[xyz.y, parameter[]], call[xyz.z, parameter[]], member[.dest]]]]
end[}]
END[}] | Keyword[public] identifier[Matrix4d] identifier[scale] operator[SEP] identifier[Vector3dc] identifier[xyz] , identifier[Matrix4d] identifier[dest] operator[SEP] {
Keyword[return] identifier[scale] operator[SEP] identifier[xyz] operator[SEP] identifier[x] operator[SEP] operator[SEP] , identifier[xyz] operator[S... |
private File withPath(Path path, File dir) {
return new File(dir, path.getPath());
} | class class_name[name] begin[{]
method[withPath, return_type[type[File]], modifier[private], parameter[path, dir]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=dir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getPath, pos... | Keyword[private] identifier[File] identifier[withPath] operator[SEP] identifier[Path] identifier[path] , identifier[File] identifier[dir] operator[SEP] {
Keyword[return] Keyword[new] identifier[File] operator[SEP] identifier[dir] , identifier[path] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] ... |
public static void elementMult( DMatrix3 a , DMatrix3 b) {
a.a1 *= b.a1;
a.a2 *= b.a2;
a.a3 *= b.a3;
} | class class_name[name] begin[{]
method[elementMult, return_type[void], modifier[public static], parameter[a, b]] begin[{]
assign[member[a.a1], member[b.a1]]
assign[member[a.a2], member[b.a2]]
assign[member[a.a3], member[b.a3]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[elementMult] operator[SEP] identifier[DMatrix3] identifier[a] , identifier[DMatrix3] identifier[b] operator[SEP] {
identifier[a] operator[SEP] identifier[a1] operator[*=] identifier[b] operator[SEP] identifier[a1] operator[SEP] identifier[a] operator[SEP]... |
public static String decryptByDES(SecretKey key, String sInfo) {
// 定义 加密算法,
String algorithm = "DES";
// 加密随机数生成器 (RNG)
SecureRandom sr = new SecureRandom();
byte[] cipherByte = null;
try {
// 得到加密/解密器
Cipher c1 = Cipher.getInstance(algorithm);
// 用指定的密钥和模式初始化Cipher对象
c1.init(Cipher.DECRYPT_MOD... | class class_name[name] begin[{]
method[decryptByDES, return_type[type[String]], modifier[public static], parameter[key, sInfo]] begin[{]
local_variable[type[String], algorithm]
local_variable[type[SecureRandom], sr]
local_variable[type[byte], cipherByte]
TryStatement(block=[Loca... | Keyword[public] Keyword[static] identifier[String] identifier[decryptByDES] operator[SEP] identifier[SecretKey] identifier[key] , identifier[String] identifier[sInfo] operator[SEP] {
identifier[String] identifier[algorithm] operator[=] literal[String] operator[SEP] identifier[SecureRandom] identifier[sr] operat... |
public static Condition like(final String content, final String value) {
int attrIndex = content.lastIndexOf('.');
String paramName = ":" + (
attrIndex == -1 ?
content + System.currentTimeMillis()
: content.substring(attrIndex + 1) + System.currentTimeMillis()
);
... | class class_name[name] begin[{]
method[like, return_type[type[Condition]], modifier[public static], parameter[content, value]] begin[{]
local_variable[type[int], attrIndex]
local_variable[type[String], paramName]
return[ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(op... | Keyword[public] Keyword[static] identifier[Condition] identifier[like] operator[SEP] Keyword[final] identifier[String] identifier[content] , Keyword[final] identifier[String] identifier[value] operator[SEP] {
Keyword[int] identifier[attrIndex] operator[=] identifier[content] operator[SEP] identifier[lastIndexOf... |
protected void selectBusSlave(final I2CDevice device) throws IOException {
final int addr = device.getAddress();
if (lastAddress != addr) {
lastAddress = addr;
file.ioctl(I2CConstants.I2C_SLAVE, addr & 0xFF);
}
} | class class_name[name] begin[{]
method[selectBusSlave, return_type[void], modifier[protected], parameter[device]] begin[{]
local_variable[type[int], addr]
if[binary_operation[member[.lastAddress], !=, member[.addr]]] begin[{]
assign[member[.lastAddress], member[.... | Keyword[protected] Keyword[void] identifier[selectBusSlave] operator[SEP] Keyword[final] identifier[I2CDevice] identifier[device] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[final] Keyword[int] identifier[addr] operator[=] identifier[device] operator[SEP] identifier[getAddress] operator[SEP] ... |
<T> Gauge gauge(Meter.Id id, @Nullable T obj, ToDoubleFunction<T> valueFunction) {
return registerMeterIfNecessary(Gauge.class, id, id2 -> newGauge(id2, obj, valueFunction), NoopGauge::new);
} | class class_name[name] begin[{]
method[gauge, return_type[type[Gauge]], modifier[default], parameter[id, obj, valueFunction]] begin[{]
return[call[.registerMeterIfNecessary, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, ... | operator[<] identifier[T] operator[>] identifier[Gauge] identifier[gauge] operator[SEP] identifier[Meter] operator[SEP] identifier[Id] identifier[id] , annotation[@] identifier[Nullable] identifier[T] identifier[obj] , identifier[ToDoubleFunction] operator[<] identifier[T] operator[>] identifier[valueFunction] operat... |
public OvhExchangeInformation serviceName_account_userPrincipalName_exchange_GET(String serviceName, String userPrincipalName) throws IOException {
String qPath = "/msServices/{serviceName}/account/{userPrincipalName}/exchange";
StringBuilder sb = path(qPath, serviceName, userPrincipalName);
String resp = exec(qP... | class class_name[name] begin[{]
method[serviceName_account_userPrincipalName_exchange_GET, return_type[type[OvhExchangeInformation]], modifier[public], parameter[serviceName, userPrincipalName]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilder], sb]
local_v... | Keyword[public] identifier[OvhExchangeInformation] identifier[serviceName_account_userPrincipalName_exchange_GET] operator[SEP] identifier[String] identifier[serviceName] , identifier[String] identifier[userPrincipalName] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[qPat... |
protected boolean isPersistedLockHolder(NodeData node) throws RepositoryException
{
LockData lData = lockManager.getExactNodeOrCloseParentLock(node);
return lData != null && isLockHolder(lData);
} | class class_name[name] begin[{]
method[isPersistedLockHolder, return_type[type[boolean]], modifier[protected], parameter[node]] begin[{]
local_variable[type[LockData], lData]
return[binary_operation[binary_operation[member[.lData], !=, literal[null]], &&, call[.isLockHolder, parameter[member[.l... | Keyword[protected] Keyword[boolean] identifier[isPersistedLockHolder] operator[SEP] identifier[NodeData] identifier[node] operator[SEP] Keyword[throws] identifier[RepositoryException] {
identifier[LockData] identifier[lData] operator[=] identifier[lockManager] operator[SEP] identifier[getExactNodeOrCloseParentLo... |
public DataSink<T> write(FileOutputFormat<T> outputFormat, String filePath) {
Preconditions.checkNotNull(filePath, "File path must not be null.");
Preconditions.checkNotNull(outputFormat, "Output format must not be null.");
outputFormat.setOutputFilePath(new Path(filePath));
return output(outputFormat);
} | class class_name[name] begin[{]
method[write, return_type[type[DataSink]], modifier[public], parameter[outputFormat, filePath]] begin[{]
call[Preconditions.checkNotNull, parameter[member[.filePath], literal["File path must not be null."]]]
call[Preconditions.checkNotNull, parame... | Keyword[public] identifier[DataSink] operator[<] identifier[T] operator[>] identifier[write] operator[SEP] identifier[FileOutputFormat] operator[<] identifier[T] operator[>] identifier[outputFormat] , identifier[String] identifier[filePath] operator[SEP] {
identifier[Preconditions] operator[SEP] identifier[chec... |
static String computeMd5ChecksumLimit6(String inAsHex2)
{
byte[] bytes = computeMd5ChecksumFull(inAsHex2);
String md5checksum = bytesToHexString(bytes[2],
bytes[1],
bytes[0]);
return md5checksum;
... | class class_name[name] begin[{]
method[computeMd5ChecksumLimit6, return_type[type[String]], modifier[static], parameter[inAsHex2]] begin[{]
local_variable[type[byte], bytes]
local_variable[type[String], md5checksum]
return[member[.md5checksum]]
end[}]
END[}] | Keyword[static] identifier[String] identifier[computeMd5ChecksumLimit6] operator[SEP] identifier[String] identifier[inAsHex2] operator[SEP] {
Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] operator[=] identifier[computeMd5ChecksumFull] operator[SEP] identifier[inAsHex2] operator[SEP] operator[SEP] i... |
public <K, C> ColumnMutation prepareColumnMutation(ColumnFamily<K, C> cf, K rowKey, C column, ConsistencyLevel consistency) {
return _astyanaxKeyspace.prepareColumnMutation(cf, rowKey, column).setConsistencyLevel(clamp(consistency));
} | class class_name[name] begin[{]
method[prepareColumnMutation, return_type[type[ColumnMutation]], modifier[public], parameter[cf, rowKey, column, consistency]] begin[{]
return[call[_astyanaxKeyspace.prepareColumnMutation, parameter[member[.cf], member[.rowKey], member[.column]]]]
end[}]
END[}] | Keyword[public] operator[<] identifier[K] , identifier[C] operator[>] identifier[ColumnMutation] identifier[prepareColumnMutation] operator[SEP] identifier[ColumnFamily] operator[<] identifier[K] , identifier[C] operator[>] identifier[cf] , identifier[K] identifier[rowKey] , identifier[C] identifier[column] , iden... |
@Nonnull
public JSFormatter outdentAlways ()
{
if (m_nIndentLevel == 0)
throw new IllegalStateException ("Nothing left to outdent!");
m_nIndentLevel--;
m_sIndentCache = m_sIndentCache.substring (0, m_nIndentLevel * m_aSettings.getIndent ().length ());
return this;
} | class class_name[name] begin[{]
method[outdentAlways, return_type[type[JSFormatter]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.m_nIndentLevel], ==, literal[0]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[... | annotation[@] identifier[Nonnull] Keyword[public] identifier[JSFormatter] identifier[outdentAlways] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[m_nIndentLevel] operator[==] Other[0] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] op... |
public boolean search(Collection<String> names) {
while (next()) {
if (names.contains(getName())) {
return true;
}
}
return false;
} | class class_name[name] begin[{]
method[search, return_type[type[boolean]], modifier[public], parameter[names]] begin[{]
while[call[.next, parameter[]]] begin[{]
if[call[names.contains, parameter[call[.getName, parameter[]]]]] begin[{]
return[literal[true]... | Keyword[public] Keyword[boolean] identifier[search] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[names] operator[SEP] {
Keyword[while] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[names] op... |
private Collection<ImmutableMember> handleSync(ImmutableMember member) {
updateState(member);
return new ArrayList<>(members.values().stream().map(SwimMember::copy).collect(Collectors.toList()));
} | class class_name[name] begin[{]
method[handleSync, return_type[type[Collection]], modifier[private], parameter[member]] begin[{]
call[.updateState, parameter[member[.member]]]
return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_opera... | Keyword[private] identifier[Collection] operator[<] identifier[ImmutableMember] operator[>] identifier[handleSync] operator[SEP] identifier[ImmutableMember] identifier[member] operator[SEP] {
identifier[updateState] operator[SEP] identifier[member] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identif... |
private Trigger getTrigger(JobKey jobKey, Properties jobProps) {
// Build a trigger for the job with the given cron-style schedule
return TriggerBuilder.newTrigger()
.withIdentity(jobProps.getProperty(ConfigurationKeys.JOB_NAME_KEY),
Strings.nullToEmpty(jobProps.getProperty(ConfigurationKeys... | class class_name[name] begin[{]
method[getTrigger, return_type[type[Trigger]], modifier[private], parameter[jobKey, jobProps]] begin[{]
return[call[TriggerBuilder.newTrigger, parameter[]]]
end[}]
END[}] | Keyword[private] identifier[Trigger] identifier[getTrigger] operator[SEP] identifier[JobKey] identifier[jobKey] , identifier[Properties] identifier[jobProps] operator[SEP] {
Keyword[return] identifier[TriggerBuilder] operator[SEP] identifier[newTrigger] operator[SEP] operator[SEP] operator[SEP] identifier[withI... |
private Graph<Module> buildGraph(Map<Module, Set<Module>> edges) {
Graph.Builder<Module> builder = new Graph.Builder<>();
Set<Module> visited = new HashSet<>();
Deque<Module> deque = new LinkedList<>();
edges.entrySet().stream().forEach(e -> {
Module m = e.getKey();
... | class class_name[name] begin[{]
method[buildGraph, return_type[type[Graph]], modifier[private], parameter[edges]] begin[{]
local_variable[type[Graph], builder]
local_variable[type[Set], visited]
local_variable[type[Deque], deque]
call[edges.entrySet, parameter[]]
... | Keyword[private] identifier[Graph] operator[<] identifier[Module] operator[>] identifier[buildGraph] operator[SEP] identifier[Map] operator[<] identifier[Module] , identifier[Set] operator[<] identifier[Module] operator[>] operator[>] identifier[edges] operator[SEP] {
identifier[Graph] operator[SEP] identifier[... |
public void setDefaultTimeout(Duration timeout) {
LettuceAssert.notNull(timeout, "Timeout duration must not be null");
LettuceAssert.isTrue(!timeout.isNegative(), "Timeout duration must be greater or equal to zero");
this.timeout = timeout;
} | class class_name[name] begin[{]
method[setDefaultTimeout, return_type[void], modifier[public], parameter[timeout]] begin[{]
call[LettuceAssert.notNull, parameter[member[.timeout], literal["Timeout duration must not be null"]]]
call[LettuceAssert.isTrue, parameter[call[timeout.is... | Keyword[public] Keyword[void] identifier[setDefaultTimeout] operator[SEP] identifier[Duration] identifier[timeout] operator[SEP] {
identifier[LettuceAssert] operator[SEP] identifier[notNull] operator[SEP] identifier[timeout] , literal[String] operator[SEP] operator[SEP] identifier[LettuceAssert] operator[SEP] i... |
public static InetAddress[]
getAllByName(String name) throws UnknownHostException {
try {
InetAddress addr = getByAddress(name);
return new InetAddress[]{addr};
} catch (UnknownHostException e) {
Record[] records = lookupHostName(name);
InetAddress[] a... | class class_name[name] begin[{]
method[getAllByName, return_type[type[InetAddress]], modifier[public static], parameter[name]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(mem... | Keyword[public] Keyword[static] identifier[InetAddress] operator[SEP] operator[SEP] identifier[getAllByName] operator[SEP] identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[UnknownHostException] {
Keyword[try] {
identifier[InetAddress] identifier[addr] operator[=] identifier... |
private DateTime parseFromDate(String fromDate) {
// Default to the last 30 days
DateTime defaultFrom = new DateTime().withZone(DateTimeZone.UTC).minusDays(30).withHourOfDay(0)
.withMinuteOfHour(0).withSecondOfMinute(0).withMillisOfSecond(0);
return parseDate(fromDate, defaultFro... | class class_name[name] begin[{]
method[parseFromDate, return_type[type[DateTime]], modifier[private], parameter[fromDate]] begin[{]
local_variable[type[DateTime], defaultFrom]
return[call[.parseDate, parameter[member[.fromDate], member[.defaultFrom], literal[true]]]]
end[}]
END[}] | Keyword[private] identifier[DateTime] identifier[parseFromDate] operator[SEP] identifier[String] identifier[fromDate] operator[SEP] {
identifier[DateTime] identifier[defaultFrom] operator[=] Keyword[new] identifier[DateTime] operator[SEP] operator[SEP] operator[SEP] identifier[withZone] operator[SEP] identifier[... |
public boolean useReturnValueWithPath(JmxRequest pJmxRequest) {
JsonRequestHandler handler = requestHandlerManager.getRequestHandler(pJmxRequest.getType());
return handler.useReturnValueWithPath();
} | class class_name[name] begin[{]
method[useReturnValueWithPath, return_type[type[boolean]], modifier[public], parameter[pJmxRequest]] begin[{]
local_variable[type[JsonRequestHandler], handler]
return[call[handler.useReturnValueWithPath, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[boolean] identifier[useReturnValueWithPath] operator[SEP] identifier[JmxRequest] identifier[pJmxRequest] operator[SEP] {
identifier[JsonRequestHandler] identifier[handler] operator[=] identifier[requestHandlerManager] operator[SEP] identifier[getRequestHandler] operator[SEP] identifier[pJ... |
@Override
protected Scorer createScorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer) throws IOException {
return new MatchAllScorer(reader, field);
} | class class_name[name] begin[{]
method[createScorer, return_type[type[Scorer]], modifier[protected], parameter[reader, scoreDocsInOrder, topScorer]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReferen... | annotation[@] identifier[Override] Keyword[protected] identifier[Scorer] identifier[createScorer] operator[SEP] identifier[IndexReader] identifier[reader] , Keyword[boolean] identifier[scoreDocsInOrder] , Keyword[boolean] identifier[topScorer] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[ret... |
@Override
public <T extends Query> T setSpellcheckOptions(SpellcheckOptions spellcheckOptions) {
return query.setSpellcheckOptions(spellcheckOptions);
} | class class_name[name] begin[{]
method[setSpellcheckOptions, return_type[type[T]], modifier[public], parameter[spellcheckOptions]] begin[{]
return[call[query.setSpellcheckOptions, parameter[member[.spellcheckOptions]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[Query] operator[>] identifier[T] identifier[setSpellcheckOptions] operator[SEP] identifier[SpellcheckOptions] identifier[spellcheckOptions] operator[SEP] {
Keyword[return] identifier[query] operator[SEP] iden... |
public void addInterceptor(Interceptor interceptor) {
if (interceptor == null) {
throw new NullPointerException("interceptor can't be null");
}
if (interceptorChain == null) {
interceptorChain = new InterceptorChain();
}
interceptorChain.addInterceptor(interceptor);
} | class class_name[name] begin[{]
method[addInterceptor, return_type[void], modifier[public], parameter[interceptor]] begin[{]
if[binary_operation[member[.interceptor], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_... | Keyword[public] Keyword[void] identifier[addInterceptor] operator[SEP] identifier[Interceptor] identifier[interceptor] operator[SEP] {
Keyword[if] operator[SEP] identifier[interceptor] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] l... |
public static ConcurrentRuntimeException extractCauseUnchecked(
final ExecutionException ex) {
if (ex == null || ex.getCause() == null) {
return null;
}
throwCause(ex);
return new ConcurrentRuntimeException(ex.getMessage(), ex.getCause());
} | class class_name[name] begin[{]
method[extractCauseUnchecked, return_type[type[ConcurrentRuntimeException]], modifier[public static], parameter[ex]] begin[{]
if[binary_operation[binary_operation[member[.ex], ==, literal[null]], ||, binary_operation[call[ex.getCause, parameter[]], ==, literal[nu... | Keyword[public] Keyword[static] identifier[ConcurrentRuntimeException] identifier[extractCauseUnchecked] operator[SEP] Keyword[final] identifier[ExecutionException] identifier[ex] operator[SEP] {
Keyword[if] operator[SEP] identifier[ex] operator[==] Other[null] operator[||] identifier[ex] operator[SEP] identifie... |
@RequirePOST
public synchronized void doConfigSubmit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException {
JSONObject src = req.getSubmittedForm();
String newName = src.getString("name"), redirect = ".";
XmlFile oldFile = null;
if(!name.equals(newName)) {... | class class_name[name] begin[{]
method[doConfigSubmit, return_type[void], modifier[synchronized public], parameter[req, rsp]] begin[{]
local_variable[type[JSONObject], src]
local_variable[type[String], newName]
local_variable[type[XmlFile], oldFile]
if[call[name.equals, ... | annotation[@] identifier[RequirePOST] Keyword[public] Keyword[synchronized] Keyword[void] identifier[doConfigSubmit] operator[SEP] identifier[StaplerRequest] identifier[req] , identifier[StaplerResponse] identifier[rsp] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ServletException] {
iden... |
public static Date getYear(String string) {
if (string == null) {
return null;
}
Date date = null;
try {
date = ((SimpleDateFormat)year.clone()) .parse(string);
}
catch (ParseException ex) {
return null;
}
return date;
} | class class_name[name] begin[{]
method[getYear, return_type[type[Date]], modifier[public static], parameter[string]] begin[{]
if[binary_operation[member[.string], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_variable[type... | Keyword[public] Keyword[static] identifier[Date] identifier[getYear] operator[SEP] identifier[String] identifier[string] operator[SEP] {
Keyword[if] operator[SEP] identifier[string] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
identifier[Date] iden... |
public static PhasedBackoffWaitStrategy withLiteLock(
long spinTimeout,
long yieldTimeout,
TimeUnit units)
{
return new PhasedBackoffWaitStrategy(
spinTimeout, yieldTimeout,
units, new LiteBlockingWaitStrategy());
} | class class_name[name] begin[{]
method[withLiteLock, return_type[type[PhasedBackoffWaitStrategy]], modifier[public static], parameter[spinTimeout, yieldTimeout, units]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=spinTimeout, postfix_operators=[], prefix_operators=[], qualifier=, sel... | Keyword[public] Keyword[static] identifier[PhasedBackoffWaitStrategy] identifier[withLiteLock] operator[SEP] Keyword[long] identifier[spinTimeout] , Keyword[long] identifier[yieldTimeout] , identifier[TimeUnit] identifier[units] operator[SEP] {
Keyword[return] Keyword[new] identifier[PhasedBackoffWaitStrategy]... |
@Override
public void link(Activity context, String token, String secret, SocializeAuthListener listener) {
TwitterAuthProviderInfo twInfo = new TwitterAuthProviderInfo();
twInfo.setConsumerKey(config.getProperty(SocializeConfig.TWITTER_CONSUMER_KEY));
twInfo.setConsumerSecret(config.getProperty(SocializeConf... | class class_name[name] begin[{]
method[link, return_type[void], modifier[public], parameter[context, token, secret, listener]] begin[{]
local_variable[type[TwitterAuthProviderInfo], twInfo]
call[twInfo.setConsumerKey, parameter[call[config.getProperty, parameter[member[SocializeConfig.T... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[link] operator[SEP] identifier[Activity] identifier[context] , identifier[String] identifier[token] , identifier[String] identifier[secret] , identifier[SocializeAuthListener] identifier[listener] operator[SEP] {
identifier[TwitterAut... |
public static String format(final LocalDate self, FormatStyle dateStyle) {
return self.format(DateTimeFormatter.ofLocalizedDate(dateStyle));
} | class class_name[name] begin[{]
method[format, return_type[type[String]], modifier[public static], parameter[self, dateStyle]] begin[{]
return[call[self.format, parameter[call[DateTimeFormatter.ofLocalizedDate, parameter[member[.dateStyle]]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[format] operator[SEP] Keyword[final] identifier[LocalDate] identifier[self] , identifier[FormatStyle] identifier[dateStyle] operator[SEP] {
Keyword[return] identifier[self] operator[SEP] identifier[format] operator[SEP] identifier[DateTimeFormatter] ... |
public Observable<ServiceResponseWithHeaders<CloudTask, TaskGetHeaders>> getWithServiceResponseAsync(String jobId, String taskId, TaskGetOptions taskGetOptions) {
if (this.client.batchUrl() == null) {
throw new IllegalArgumentException("Parameter this.client.batchUrl() is required and cannot be null... | class class_name[name] begin[{]
method[getWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[jobId, taskId, taskGetOptions]] begin[{]
if[binary_operation[THIS[member[None.client]call[None.batchUrl, parameter[]]], ==, literal[null]]] begin[{]
ThrowSt... | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponseWithHeaders] operator[<] identifier[CloudTask] , identifier[TaskGetHeaders] operator[>] operator[>] identifier[getWithServiceResponseAsync] operator[SEP] identifier[String] identifier[jobId] , identifier[String] identifier[taskId] , identif... |
public Response serveFile( String uri, Properties header, File homeDir,
boolean allowDirectoryListing )
{
Response res = null;
// Make sure we won't die of an exception later
if ( !homeDir.isDirectory())
res = new Response( HTTP_INTERNALERROR, MIME... | class class_name[name] begin[{]
method[serveFile, return_type[type[Response]], modifier[public], parameter[uri, header, homeDir, allowDirectoryListing]] begin[{]
local_variable[type[Response], res]
if[call[homeDir.isDirectory, parameter[]]] begin[{]
assign[member[.res], Clas... | Keyword[public] identifier[Response] identifier[serveFile] operator[SEP] identifier[String] identifier[uri] , identifier[Properties] identifier[header] , identifier[File] identifier[homeDir] , Keyword[boolean] identifier[allowDirectoryListing] operator[SEP] {
identifier[Response] identifier[res] operator[=] O... |
public void setParseGit(boolean parseGit) {
this.parseGit = parseGit;
getConfig().setProperty(SPIDER_PARSE_GIT, Boolean.toString(parseGit));
} | class class_name[name] begin[{]
method[setParseGit, return_type[void], modifier[public], parameter[parseGit]] begin[{]
assign[THIS[member[None.parseGit]], member[.parseGit]]
call[.getConfig, parameter[]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setParseGit] operator[SEP] Keyword[boolean] identifier[parseGit] operator[SEP] {
Keyword[this] operator[SEP] identifier[parseGit] operator[=] identifier[parseGit] operator[SEP] identifier[getConfig] operator[SEP] operator[SEP] operator[SEP] identifier[setProperty] operato... |
public static List<String> split(@Nullable final String str, final char separatorChar) {
return split(str, separatorChar, 10);
} | class class_name[name] begin[{]
method[split, return_type[type[List]], modifier[public static], parameter[str, separatorChar]] begin[{]
return[call[.split, parameter[member[.str], member[.separatorChar], literal[10]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[String] operator[>] identifier[split] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[str] , Keyword[final] Keyword[char] identifier[separatorChar] operator[SEP] {
Keyword[return] identifier[spl... |
public static String generateLoginHtmlFragment(CmsObject cms, VaadinRequest request) throws IOException {
LoginParameters parameters = CmsLoginHelper.getLoginParameters(cms, (HttpServletRequest)request, true);
request.getWrappedSession().setAttribute(CmsLoginUI.INIT_DATA_SESSION_ATTR, parameters);
... | class class_name[name] begin[{]
method[generateLoginHtmlFragment, return_type[type[String]], modifier[public static], parameter[cms, request]] begin[{]
local_variable[type[LoginParameters], parameters]
call[request.getWrappedSession, parameter[]]
local_variable[type[byte], pageB... | Keyword[public] Keyword[static] identifier[String] identifier[generateLoginHtmlFragment] operator[SEP] identifier[CmsObject] identifier[cms] , identifier[VaadinRequest] identifier[request] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[LoginParameters] identifier[parameters] operator[=] iden... |
public boolean moreRBSPData() throws IOException {
if (nBit == 8) {
advance();
}
int tail = 1 << (8 - nBit - 1);
int mask = ((tail << 1) - 1);
boolean hasTail = (curByte & mask) == tail;
return !(curByte == -1 || (nextByte == -1 && hasTail));
} | class class_name[name] begin[{]
method[moreRBSPData, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.nBit], ==, literal[8]]] begin[{]
call[.advance, parameter[]]
else begin[{]
None
end[}]
local_varia... | Keyword[public] Keyword[boolean] identifier[moreRBSPData] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[nBit] operator[==] Other[8] operator[SEP] {
identifier[advance] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[int] id... |
public void throwException(CmsMessageContainer message, Throwable throwable) throws CmsVfsException, CmsException {
if (throwable instanceof CmsException) {
throw ((CmsException)throwable).createException(message, throwable);
} else if (throwable instanceof CmsRuntimeException) {
... | class class_name[name] begin[{]
method[throwException, return_type[void], modifier[public], parameter[message, throwable]] begin[{]
if[binary_operation[member[.throwable], instanceof, type[CmsException]]] begin[{]
ThrowStatement(expression=Cast(expression=MemberReference(member=thro... | Keyword[public] Keyword[void] identifier[throwException] operator[SEP] identifier[CmsMessageContainer] identifier[message] , identifier[Throwable] identifier[throwable] operator[SEP] Keyword[throws] identifier[CmsVfsException] , identifier[CmsException] {
Keyword[if] operator[SEP] identifier[throwable] Keyword... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.