code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public static <T> String toJsonQuietly(final T object)
{
try
{
return ObjectToJsonExtensions.toJson(object);
}
catch (final JsonProcessingException e)
{
log.log(Level.SEVERE,
"An error occured when converting object to String.\nGiven object:"
+ object.toString() + "\n",
e);
}
return nu... | class class_name[name] begin[{]
method[toJsonQuietly, return_type[type[String]], modifier[public static], parameter[object]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=object, postfix_operators=[], prefix_operators=[], qualifier=, selector... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[String] identifier[toJsonQuietly] operator[SEP] Keyword[final] identifier[T] identifier[object] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[ObjectToJsonExtensions] operator[SEP] identifier[toJson] operator[S... |
public Attributes getMainAttributes() throws IOException {
Manifest man = getManifest();
return man != null ? man.getMainAttributes() : null;
} | class class_name[name] begin[{]
method[getMainAttributes, return_type[type[Attributes]], modifier[public], parameter[]] begin[{]
local_variable[type[Manifest], man]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=man, postfix_operators=[], prefix_operators=[],... | Keyword[public] identifier[Attributes] identifier[getMainAttributes] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[Manifest] identifier[man] operator[=] identifier[getManifest] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[man] operator[!=] Other[null] op... |
private void removePool(IThriftPool pool)
{
Pelops.removePool(PelopsUtils.getPoolName(pool));
Node[] nodes = ((CommonsBackedPool) pool).getCluster().getNodes();
logger.warn("{} :{} host appears to be down, trying for next ", nodes, ((CommonsBackedPool) pool).getCluster()
... | class class_name[name] begin[{]
method[removePool, return_type[void], modifier[private], parameter[pool]] begin[{]
call[Pelops.removePool, parameter[call[PelopsUtils.getPoolName, parameter[member[.pool]]]]]
local_variable[type[Node], nodes]
call[logger.warn, parameter[li... | Keyword[private] Keyword[void] identifier[removePool] operator[SEP] identifier[IThriftPool] identifier[pool] operator[SEP] {
identifier[Pelops] operator[SEP] identifier[removePool] operator[SEP] identifier[PelopsUtils] operator[SEP] identifier[getPoolName] operator[SEP] identifier[pool] operator[SEP] operator[SE... |
@BetaApi
public final Operation removeRuleSecurityPolicy(Integer priority, String securityPolicy) {
RemoveRuleSecurityPolicyHttpRequest request =
RemoveRuleSecurityPolicyHttpRequest.newBuilder()
.setPriority(priority)
.setSecurityPolicy(securityPolicy)
.build();
re... | class class_name[name] begin[{]
method[removeRuleSecurityPolicy, return_type[type[Operation]], modifier[final public], parameter[priority, securityPolicy]] begin[{]
local_variable[type[RemoveRuleSecurityPolicyHttpRequest], request]
return[call[.removeRuleSecurityPolicy, parameter[member[.reques... | annotation[@] identifier[BetaApi] Keyword[public] Keyword[final] identifier[Operation] identifier[removeRuleSecurityPolicy] operator[SEP] identifier[Integer] identifier[priority] , identifier[String] identifier[securityPolicy] operator[SEP] {
identifier[RemoveRuleSecurityPolicyHttpRequest] identifier[request] o... |
public static Promise<Void> createDirectories(Executor executor, Path dir, FileAttribute... attrs) {
return ofBlockingRunnable(executor, () -> {
try {
Files.createDirectories(dir, attrs);
} catch (IOException e) {
throw new UncheckedException(e);
}
});
} | class class_name[name] begin[{]
method[createDirectories, return_type[type[Promise]], modifier[public static], parameter[executor, dir, attrs]] begin[{]
return[call[.ofBlockingRunnable, parameter[member[.executor], LambdaExpression(body=[TryStatement(block=[StatementExpression(expression=MethodInvocati... | Keyword[public] Keyword[static] identifier[Promise] operator[<] identifier[Void] operator[>] identifier[createDirectories] operator[SEP] identifier[Executor] identifier[executor] , identifier[Path] identifier[dir] , identifier[FileAttribute] operator[...] identifier[attrs] operator[SEP] {
Keyword[return] ident... |
public void addJavaLibraries() {
Vector packages = JavaEnvUtils.getJrePackages();
Enumeration e = packages.elements();
while (e.hasMoreElements()) {
String packageName = (String) e.nextElement();
addSystemPackageRoot(packageName);
}
} | class class_name[name] begin[{]
method[addJavaLibraries, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[Vector], packages]
local_variable[type[Enumeration], e]
while[call[e.hasMoreElements, parameter[]]] begin[{]
local_variable[type[St... | Keyword[public] Keyword[void] identifier[addJavaLibraries] operator[SEP] operator[SEP] {
identifier[Vector] identifier[packages] operator[=] identifier[JavaEnvUtils] operator[SEP] identifier[getJrePackages] operator[SEP] operator[SEP] operator[SEP] identifier[Enumeration] identifier[e] operator[=] identifier[pac... |
public static int[] trim(TIntFloatHashMap data, float v) {
int[][] idx = getTop(data, v);
setZero(data, idx[1]);
return idx[0];
} | class class_name[name] begin[{]
method[trim, return_type[type[int]], modifier[public static], parameter[data, v]] begin[{]
local_variable[type[int], idx]
call[.setZero, parameter[member[.data], member[.idx]]]
return[member[.idx]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[int] operator[SEP] operator[SEP] identifier[trim] operator[SEP] identifier[TIntFloatHashMap] identifier[data] , Keyword[float] identifier[v] operator[SEP] {
Keyword[int] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[idx] operator[=] identifier[getTop]... |
final SupportedResourceType getSupportedResourceTypeForProcessor(final Object processor) {
SupportedResourceType supportedType = processor.getClass().getAnnotation(SupportedResourceType.class);
/**
* This is a special case for processors which implement {@link SupportedResourceTypeProvider} interface. This... | class class_name[name] begin[{]
method[getSupportedResourceTypeForProcessor, return_type[type[SupportedResourceType]], modifier[final], parameter[processor]] begin[{]
local_variable[type[SupportedResourceType], supportedType]
if[binary_operation[member[.processor], instanceof, type[Supp... | Keyword[final] identifier[SupportedResourceType] identifier[getSupportedResourceTypeForProcessor] operator[SEP] Keyword[final] identifier[Object] identifier[processor] operator[SEP] {
identifier[SupportedResourceType] identifier[supportedType] operator[=] identifier[processor] operator[SEP] identifier[getClass] ... |
public String normalizeCAP(String input,boolean b) {
char[] c = input.toCharArray();
normalise(c);
for (int i = 0; i< c.length; i++) {
if(b){
if(c[i] > 96 && c[i] < 123){
c[i] -= 32;
}
}
else{
if(c[i] > 64 && c[i] < 91){
c[i] += 32;
}
}
}
return new String(c);
} | class class_name[name] begin[{]
method[normalizeCAP, return_type[type[String]], modifier[public], parameter[input, b]] begin[{]
local_variable[type[char], c]
call[.normalise, parameter[member[.c]]]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=Me... | Keyword[public] identifier[String] identifier[normalizeCAP] operator[SEP] identifier[String] identifier[input] , Keyword[boolean] identifier[b] operator[SEP] {
Keyword[char] operator[SEP] operator[SEP] identifier[c] operator[=] identifier[input] operator[SEP] identifier[toCharArray] operator[SEP] operator[SEP] ... |
private void initXSSFChartsMap(final XSSFWorkbook wb,
final ChartsData chartsData) {
initAnchorsMap(wb, chartsData);
Map<String, ClientAnchor> anchorMap = chartsData
.getChartAnchorsMap();
Map<String, BufferedImage> chartMap = chartsData.getChartsMap();
Map<String, ChartData> chartDataMap = cha... | class class_name[name] begin[{]
method[initXSSFChartsMap, return_type[void], modifier[private], parameter[wb, chartsData]] begin[{]
call[.initAnchorsMap, parameter[member[.wb], member[.chartsData]]]
local_variable[type[Map], anchorMap]
local_variable[type[Map], chartMap]
... | Keyword[private] Keyword[void] identifier[initXSSFChartsMap] operator[SEP] Keyword[final] identifier[XSSFWorkbook] identifier[wb] , Keyword[final] identifier[ChartsData] identifier[chartsData] operator[SEP] {
identifier[initAnchorsMap] operator[SEP] identifier[wb] , identifier[chartsData] operator[SEP] operato... |
public final EObject ruleRichStringLiteral() throws RecognitionException {
EObject current = null;
Token lv_value_1_0=null;
enterRule();
try {
// InternalSARL.g:10827:2: ( ( () ( (lv_value_1_0= RULE_RICH_TEXT ) ) ) )
// InternalSARL.g:10828:2: ( () ( (lv_valu... | class class_name[name] begin[{]
method[ruleRichStringLiteral, return_type[type[EObject]], modifier[final public], parameter[]] begin[{]
local_variable[type[EObject], current]
local_variable[type[Token], lv_value_1_0]
call[.enterRule, parameter[]]
TryStatement(block=[Bloc... | Keyword[public] Keyword[final] identifier[EObject] identifier[ruleRichStringLiteral] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
identifier[EObject] identifier[current] operator[=] Other[null] operator[SEP] identifier[Token] identifier[lv_value_1_0] operator[=] Other[null] oper... |
public final EObject ruleXTryCatchFinallyExpression() throws RecognitionException {
EObject current = null;
Token otherlv_1=null;
Token otherlv_4=null;
Token otherlv_6=null;
EObject lv_expression_2_0 = null;
EObject lv_catchClauses_3_0 = null;
EObject lv_finall... | class class_name[name] begin[{]
method[ruleXTryCatchFinallyExpression, return_type[type[EObject]], modifier[final public], parameter[]] begin[{]
local_variable[type[EObject], current]
local_variable[type[Token], otherlv_1]
local_variable[type[Token], otherlv_4]
local_variable[ty... | Keyword[public] Keyword[final] identifier[EObject] identifier[ruleXTryCatchFinallyExpression] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
identifier[EObject] identifier[current] operator[=] Other[null] operator[SEP] identifier[Token] identifier[otherlv_1] operator[=] Other[null... |
public static void handle(final Throwable t, final boolean throwRuntimeException) {
final JKExceptionHandlerFactory factory = JKExceptionHandlerFactory.getInstance();
final JKExceptionHandlerInfo info = factory.getHandler(t);
if (info != null) {
info.getHandler().handle(info.getException(), throwRuntimeExcepti... | class class_name[name] begin[{]
method[handle, return_type[void], modifier[public static], parameter[t, throwRuntimeException]] begin[{]
local_variable[type[JKExceptionHandlerFactory], factory]
local_variable[type[JKExceptionHandlerInfo], info]
if[binary_operation[member[.info],... | Keyword[public] Keyword[static] Keyword[void] identifier[handle] operator[SEP] Keyword[final] identifier[Throwable] identifier[t] , Keyword[final] Keyword[boolean] identifier[throwRuntimeException] operator[SEP] {
Keyword[final] identifier[JKExceptionHandlerFactory] identifier[factory] operator[=] identifier[JK... |
public static void extract(final File aJarFile, final String aFilePath, final File aDestDir) throws IOException {
extract(new JarFile(aJarFile), aFilePath, aDestDir);
} | class class_name[name] begin[{]
method[extract, return_type[void], modifier[public static], parameter[aJarFile, aFilePath, aDestDir]] begin[{]
call[.extract, parameter[ClassCreator(arguments=[MemberReference(member=aJarFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])],... | Keyword[public] Keyword[static] Keyword[void] identifier[extract] operator[SEP] Keyword[final] identifier[File] identifier[aJarFile] , Keyword[final] identifier[String] identifier[aFilePath] , Keyword[final] identifier[File] identifier[aDestDir] operator[SEP] Keyword[throws] identifier[IOException] {
identifie... |
@Override
public R visitSince(SinceTree node, P p) {
return defaultAction(node, p);
} | class class_name[name] begin[{]
method[visitSince, return_type[type[R]], modifier[public], parameter[node, p]] begin[{]
return[call[.defaultAction, parameter[member[.node], member[.p]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[R] identifier[visitSince] operator[SEP] identifier[SinceTree] identifier[node] , identifier[P] identifier[p] operator[SEP] {
Keyword[return] identifier[defaultAction] operator[SEP] identifier[node] , identifier[p] operator[SEP] operator[SEP]
}
|
public boolean validateHexColor(String hexColor, DiagnosticChain diagnostics, Map<Object, Object> context) {
boolean result = validateHexColor_Pattern(hexColor, diagnostics, context);
return result;
} | class class_name[name] begin[{]
method[validateHexColor, return_type[type[boolean]], modifier[public], parameter[hexColor, diagnostics, context]] begin[{]
local_variable[type[boolean], result]
return[member[.result]]
end[}]
END[}] | Keyword[public] Keyword[boolean] identifier[validateHexColor] operator[SEP] identifier[String] identifier[hexColor] , identifier[DiagnosticChain] identifier[diagnostics] , identifier[Map] operator[<] identifier[Object] , identifier[Object] operator[>] identifier[context] operator[SEP] {
Keyword[boolean] ident... |
public void setEncryption(Certificate[] certs, int[] permissions, int encryptionType) throws DocumentException {
if (stamper.isAppend())
throw new DocumentException("Append mode does not support changing the encryption status.");
if (stamper.isContentWritten())
throw new Document... | class class_name[name] begin[{]
method[setEncryption, return_type[void], modifier[public], parameter[certs, permissions, encryptionType]] begin[{]
if[call[stamper.isAppend, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[]... | Keyword[public] Keyword[void] identifier[setEncryption] operator[SEP] identifier[Certificate] operator[SEP] operator[SEP] identifier[certs] , Keyword[int] operator[SEP] operator[SEP] identifier[permissions] , Keyword[int] identifier[encryptionType] operator[SEP] Keyword[throws] identifier[DocumentException] {
... |
public static void deleteSchema(GeoPackageCore geoPackage, String table) {
DataColumnsDao dataColumnsDao = geoPackage.getDataColumnsDao();
try {
if (dataColumnsDao.isTableExists()) {
dataColumnsDao.deleteByTableName(table);
}
} catch (SQLException e) {
throw new GeoPackageException(
"Failed to ... | class class_name[name] begin[{]
method[deleteSchema, return_type[void], modifier[public static], parameter[geoPackage, table]] begin[{]
local_variable[type[DataColumnsDao], dataColumnsDao]
TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isTableExists, postfix_ope... | Keyword[public] Keyword[static] Keyword[void] identifier[deleteSchema] operator[SEP] identifier[GeoPackageCore] identifier[geoPackage] , identifier[String] identifier[table] operator[SEP] {
identifier[DataColumnsDao] identifier[dataColumnsDao] operator[=] identifier[geoPackage] operator[SEP] identifier[getDataC... |
Rule IfieldArea() {
return Sequence(String("[A:"),
ZeroOrMore(WSP()).suppressNode(),
TexTextIfield(),
String("]"))
.label(IfieldArea);
} | class class_name[name] begin[{]
method[IfieldArea, return_type[type[Rule]], modifier[default], parameter[]] begin[{]
return[call[.Sequence, parameter[call[.String, parameter[literal["[A:"]]], call[.ZeroOrMore, parameter[call[.WSP, parameter[]]]], call[.TexTextIfield, parameter[]], call[.String, paramet... | identifier[Rule] identifier[IfieldArea] operator[SEP] operator[SEP] {
Keyword[return] identifier[Sequence] operator[SEP] identifier[String] operator[SEP] literal[String] operator[SEP] , identifier[ZeroOrMore] operator[SEP] identifier[WSP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[suppre... |
public List<Path> getDefaultUserRulesDirectories()
{
List<Path> paths = getOptionValue(DEFAULT_USER_RULES_DIRECTORIES_OPTION);
if (paths == null)
{
return Collections.emptyList();
}
return Collections.unmodifiableList(paths);
} | class class_name[name] begin[{]
method[getDefaultUserRulesDirectories, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[List], paths]
if[binary_operation[member[.paths], ==, literal[null]]] begin[{]
return[call[Collections.emptyList, param... | Keyword[public] identifier[List] operator[<] identifier[Path] operator[>] identifier[getDefaultUserRulesDirectories] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[Path] operator[>] identifier[paths] operator[=] identifier[getOptionValue] operator[SEP] identifier[DEFAULT_USER_RULES_DIRECTO... |
private void notifyListenersIfUninhibited(R oldValue, R newValue) {
if (inhibited) {
inhibitCount++;
lastInhibitedValue = newValue;
} else {
lastInhibitedValue = newValue; // Just in case, even though not really necessary
lastNonInhibitedValue = newValue;
... | class class_name[name] begin[{]
method[notifyListenersIfUninhibited, return_type[void], modifier[private], parameter[oldValue, newValue]] begin[{]
if[member[.inhibited]] begin[{]
member[.inhibitCount]
assign[member[.lastInhibitedValue], member[.ne... | Keyword[private] Keyword[void] identifier[notifyListenersIfUninhibited] operator[SEP] identifier[R] identifier[oldValue] , identifier[R] identifier[newValue] operator[SEP] {
Keyword[if] operator[SEP] identifier[inhibited] operator[SEP] {
identifier[inhibitCount] operator[++] operator[SEP] identifier[... |
void sendSubscriptionEvent(String topic, int nb) {
Collection<Session> sessions = getSessionsForTopic(topic);
if (!sessions.isEmpty()) {
MessageToClient messageToClient = new MessageToClient();
messageToClient.setId(topic);
messageToClient.setType(MessageType.MESSAGE);
messageToClient.setResponse(... | class class_name[name] begin[{]
method[sendSubscriptionEvent, return_type[void], modifier[default], parameter[topic, nb]] begin[{]
local_variable[type[Collection], sessions]
if[call[sessions.isEmpty, parameter[]]] begin[{]
local_variable[type[MessageToClient], messageToClien... | Keyword[void] identifier[sendSubscriptionEvent] operator[SEP] identifier[String] identifier[topic] , Keyword[int] identifier[nb] operator[SEP] {
identifier[Collection] operator[<] identifier[Session] operator[>] identifier[sessions] operator[=] identifier[getSessionsForTopic] operator[SEP] identifier[topic] ope... |
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case AfplibPackage.BRG__RGRP_NAME:
return RGRP_NAME_EDEFAULT == null ? rGrpName != null : !RGRP_NAME_EDEFAULT.equals(rGrpName);
case AfplibPackage.BRG__TRIPLETS:
return triplets != null && !triplets.isEmpty();
}
return super.eIsS... | class class_name[name] begin[{]
method[eIsSet, return_type[type[boolean]], modifier[public], parameter[featureID]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=BRG__RGRP_NAME, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], stateme... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[eIsSet] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] {
Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] {
Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[BRG__RGRP_NAME] o... |
public static auditnslogpolicy_authenticationvserver_binding[] get(nitro_service service, String name) throws Exception{
auditnslogpolicy_authenticationvserver_binding obj = new auditnslogpolicy_authenticationvserver_binding();
obj.set_name(name);
auditnslogpolicy_authenticationvserver_binding response[] = (audit... | class class_name[name] begin[{]
method[get, return_type[type[auditnslogpolicy_authenticationvserver_binding]], modifier[public static], parameter[service, name]] begin[{]
local_variable[type[auditnslogpolicy_authenticationvserver_binding], obj]
call[obj.set_name, parameter[member[.name]... | Keyword[public] Keyword[static] identifier[auditnslogpolicy_authenticationvserver_binding] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[auditnslogpoli... |
@Override
public CWFAuthenticationDetails buildDetails(HttpServletRequest request) {
log.trace("Building details");
CWFAuthenticationDetails details = new CWFAuthenticationDetails(request);
return details;
} | class class_name[name] begin[{]
method[buildDetails, return_type[type[CWFAuthenticationDetails]], modifier[public], parameter[request]] begin[{]
call[log.trace, parameter[literal["Building details"]]]
local_variable[type[CWFAuthenticationDetails], details]
return[member[.details... | annotation[@] identifier[Override] Keyword[public] identifier[CWFAuthenticationDetails] identifier[buildDetails] operator[SEP] identifier[HttpServletRequest] identifier[request] operator[SEP] {
identifier[log] operator[SEP] identifier[trace] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[CW... |
public float angleCos(Vector3fc v) {
double length1Squared = x * x + y * y + z * z;
double length2Squared = v.x() * v.x() + v.y() * v.y() + v.z() * v.z();
double dot = x * v.x() + y * v.y() + z * v.z();
return (float) (dot / (Math.sqrt(length1Squared * length2Squared)));
} | class class_name[name] begin[{]
method[angleCos, return_type[type[float]], modifier[public], parameter[v]] begin[{]
local_variable[type[double], length1Squared]
local_variable[type[double], length2Squared]
local_variable[type[double], dot]
return[Cast(expression=BinaryOperation(... | Keyword[public] Keyword[float] identifier[angleCos] operator[SEP] identifier[Vector3fc] identifier[v] operator[SEP] {
Keyword[double] identifier[length1Squared] operator[=] identifier[x] operator[*] identifier[x] operator[+] identifier[y] operator[*] identifier[y] operator[+] identifier[z] operator[*] identifier... |
protected void computeCostEstimates(long childOutputTupleCountEstimate,
DatabaseEstimates estimates,
ScalarValueHints[] paramHints)
{
m_estimatedOutputTupleCount = childOutputTupleCountEstimate;
m_estimatedProcessedTuple... | class class_name[name] begin[{]
method[computeCostEstimates, return_type[void], modifier[protected], parameter[childOutputTupleCountEstimate, estimates, paramHints]] begin[{]
assign[member[.m_estimatedOutputTupleCount], member[.childOutputTupleCountEstimate]]
assign[member[.m_es... | Keyword[protected] Keyword[void] identifier[computeCostEstimates] operator[SEP] Keyword[long] identifier[childOutputTupleCountEstimate] , identifier[DatabaseEstimates] identifier[estimates] , identifier[ScalarValueHints] operator[SEP] operator[SEP] identifier[paramHints] operator[SEP] {
identifier[m_estimatedO... |
private void readProjectProperties(Gantt gantt)
{
Gantt.File file = gantt.getFile();
ProjectProperties props = m_projectFile.getProjectProperties();
props.setLastSaved(file.getSaved());
props.setCreationDate(file.getCreated());
props.setName(file.getName());
} | class class_name[name] begin[{]
method[readProjectProperties, return_type[void], modifier[private], parameter[gantt]] begin[{]
local_variable[type[Gantt], file]
local_variable[type[ProjectProperties], props]
call[props.setLastSaved, parameter[call[file.getSaved, parameter[]]]]
... | Keyword[private] Keyword[void] identifier[readProjectProperties] operator[SEP] identifier[Gantt] identifier[gantt] operator[SEP] {
identifier[Gantt] operator[SEP] identifier[File] identifier[file] operator[=] identifier[gantt] operator[SEP] identifier[getFile] operator[SEP] operator[SEP] operator[SEP] identifier... |
private static Class<?>[] convertArgumentTypesToPrimitive(Class<?>[] paramTypes, Object[] arguments) {
Class<?>[] types = new Class<?>[arguments.length];
for (int i = 0; i < arguments.length; i++) {
Class<?> argumentType = null;
if (arguments[i] == null) {
argumen... | class class_name[name] begin[{]
method[convertArgumentTypesToPrimitive, return_type[type[Class]], modifier[private static], parameter[paramTypes, arguments]] begin[{]
local_variable[type[Class], types]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations... | Keyword[private] Keyword[static] identifier[Class] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[convertArgumentTypesToPrimitive] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[paramTypes] , identifier[Object] operator[SEP] operat... |
protected void bindBlobLiteral(int index, byte[] value) {
if (blobLiterals == null) {
blobLiterals = new LinkedHashMap<>();
}
blobLiterals.put(index, value);
} | class class_name[name] begin[{]
method[bindBlobLiteral, return_type[void], modifier[protected], parameter[index, value]] begin[{]
if[binary_operation[member[.blobLiterals], ==, literal[null]]] begin[{]
assign[member[.blobLiterals], ClassCreator(arguments=[], body=None, c... | Keyword[protected] Keyword[void] identifier[bindBlobLiteral] operator[SEP] Keyword[int] identifier[index] , Keyword[byte] operator[SEP] operator[SEP] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[blobLiterals] operator[==] Other[null] operator[SEP] {
identifier[blobLiterals] ... |
@JsonCreator
public static Partitioning jsonCreate(
@JsonProperty("handle") PartitioningHandle handle,
@JsonProperty("arguments") List<ArgumentBinding> arguments)
{
return new Partitioning(handle, arguments);
} | class class_name[name] begin[{]
method[jsonCreate, return_type[type[Partitioning]], modifier[public static], parameter[handle, arguments]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=handle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=... | annotation[@] identifier[JsonCreator] Keyword[public] Keyword[static] identifier[Partitioning] identifier[jsonCreate] operator[SEP] annotation[@] identifier[JsonProperty] operator[SEP] literal[String] operator[SEP] identifier[PartitioningHandle] identifier[handle] , annotation[@] identifier[JsonProperty] operator[SEP]... |
public boolean process(ContentEvent event) {
InstanceContentEvent inEvent = (InstanceContentEvent) event; //((s4Event) event).getContentEvent();
//InstanceEvent inEvent = (InstanceEvent) event;
if (inEvent.getInstanceIndex() < 0) {
// End learning
predictionStream.put(event);
return false;
}
... | class class_name[name] begin[{]
method[process, return_type[type[boolean]], modifier[public], parameter[event]] begin[{]
local_variable[type[InstanceContentEvent], inEvent]
if[binary_operation[call[inEvent.getInstanceIndex, parameter[]], <, literal[0]]] begin[{]
... | Keyword[public] Keyword[boolean] identifier[process] operator[SEP] identifier[ContentEvent] identifier[event] operator[SEP] {
identifier[InstanceContentEvent] identifier[inEvent] operator[=] operator[SEP] identifier[InstanceContentEvent] operator[SEP] identifier[event] operator[SEP] Keyword[if] operator[SEP] ide... |
public StringIndex getNameIndex() {
try {
if (nameIndex == null) {
FileSystemResource res = new FileSystemResource(context.getFileSystem(), RES_NAME_INDEX);
if (res.exists()) {
nameIndex = super.getNameIndex();
} else {
... | class class_name[name] begin[{]
method[getNameIndex, return_type[type[StringIndex]], modifier[public], parameter[]] begin[{]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=nameIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operand... | Keyword[public] identifier[StringIndex] identifier[getNameIndex] operator[SEP] operator[SEP] {
Keyword[try] {
Keyword[if] operator[SEP] identifier[nameIndex] operator[==] Other[null] operator[SEP] {
identifier[FileSystemResource] identifier[res] operator[=] Keyword[new] identifier[FileS... |
public static BufferedImage loadPGM( String fileName , BufferedImage storage ) throws IOException {
return loadPGM(new FileInputStream(fileName), storage);
} | class class_name[name] begin[{]
method[loadPGM, return_type[type[BufferedImage]], modifier[public static], parameter[fileName, storage]] begin[{]
return[call[.loadPGM, parameter[ClassCreator(arguments=[MemberReference(member=fileName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])... | Keyword[public] Keyword[static] identifier[BufferedImage] identifier[loadPGM] operator[SEP] identifier[String] identifier[fileName] , identifier[BufferedImage] identifier[storage] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[return] identifier[loadPGM] operator[SEP] Keyword[new] identifier[Fi... |
public List<T> pollN(int n) {
if (n >= size) {
return pollAll();
}
List<T> retList = new ArrayList<T>(n);
if (n == 0) {
return retList;
}
boolean done = false;
int currentBucketIndex = 0;
while (!done) {
LinkedElement<T> current = entries[currentBucketIndex];
whi... | class class_name[name] begin[{]
method[pollN, return_type[type[List]], modifier[public], parameter[n]] begin[{]
if[binary_operation[member[.n], >=, member[.size]]] begin[{]
return[call[.pollAll, parameter[]]]
else begin[{]
None
end[}]
local_variable[type[List... | Keyword[public] identifier[List] operator[<] identifier[T] operator[>] identifier[pollN] operator[SEP] Keyword[int] identifier[n] operator[SEP] {
Keyword[if] operator[SEP] identifier[n] operator[>=] identifier[size] operator[SEP] {
Keyword[return] identifier[pollAll] operator[SEP] operator[SEP] operat... |
public void stopChecking() {
// synchronize with other attempts to update the running task
synchronized(runningTaskLock){
if(runningTask != null) {
// cancel task (let it complete its current run if running)
runningTaskFuture.cancel(false);
// ... | class class_name[name] begin[{]
method[stopChecking, return_type[void], modifier[public], parameter[]] begin[{]
SYNCHRONIZED[member[.runningTaskLock]] BEGIN[{]
if[binary_operation[member[.runningTask], !=, literal[null]]] begin[{]
call[run... | Keyword[public] Keyword[void] identifier[stopChecking] operator[SEP] operator[SEP] {
Keyword[synchronized] operator[SEP] identifier[runningTaskLock] operator[SEP] {
Keyword[if] operator[SEP] identifier[runningTask] operator[!=] Other[null] operator[SEP] {
identifier[runningTaskFuture] o... |
static public String getSFTimeAsString(
SFTime sft, int scale, SnowflakeDateTimeFormat timeFormatter)
{
return timeFormatter.format(sft, scale);
} | class class_name[name] begin[{]
method[getSFTimeAsString, return_type[type[String]], modifier[public static], parameter[sft, scale, timeFormatter]] begin[{]
return[call[timeFormatter.format, parameter[member[.sft], member[.scale]]]]
end[}]
END[}] | Keyword[static] Keyword[public] identifier[String] identifier[getSFTimeAsString] operator[SEP] identifier[SFTime] identifier[sft] , Keyword[int] identifier[scale] , identifier[SnowflakeDateTimeFormat] identifier[timeFormatter] operator[SEP] {
Keyword[return] identifier[timeFormatter] operator[SEP] identifier[f... |
public static <T> T[] append(T[] array1, T[] array2) {
T[] dst = (T[]) Array.newInstance(array1.getClass().getComponentType(), array1.length + array2.length);
System.arraycopy(array1, 0, dst, 0, array1.length);
System.arraycopy(array2, 0, dst, array1.length, array2.length);
return dst;
... | class class_name[name] begin[{]
method[append, return_type[type[T]], modifier[public static], parameter[array1, array2]] begin[{]
local_variable[type[T], dst]
call[System.arraycopy, parameter[member[.array1], literal[0], member[.dst], literal[0], member[array1.length]]]
... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[T] operator[SEP] operator[SEP] identifier[array1] , identifier[T] operator[SEP] operator[SEP] identifier[array2] operator[SEP] {
identifier[T] operator[SEP]... |
public Pair<IntDiGraph, IntObjectBimap<DiEdge>> edgeGraph(boolean selfAvoiding) {
IntDiGraph g = new IntDiGraph();
IntObjectBimap<DiEdge> edgeToNodeMap = new IntObjectBimap<>(g.edges.size());
edgeToNodeMap.startGrowth();
for (DiEdge e : edges) {
g.addNode(edgeToNodeMap.lookup... | class class_name[name] begin[{]
method[edgeGraph, return_type[type[Pair]], modifier[public], parameter[selfAvoiding]] begin[{]
local_variable[type[IntDiGraph], g]
local_variable[type[IntObjectBimap], edgeToNodeMap]
call[edgeToNodeMap.startGrowth, parameter[]]
ForStatemen... | Keyword[public] identifier[Pair] operator[<] identifier[IntDiGraph] , identifier[IntObjectBimap] operator[<] identifier[DiEdge] operator[>] operator[>] identifier[edgeGraph] operator[SEP] Keyword[boolean] identifier[selfAvoiding] operator[SEP] {
identifier[IntDiGraph] identifier[g] operator[=] Keyword[new] iden... |
public String invokeUpdateHandler(String updateHandlerUri, String docId, Params params) {
assertNotEmpty(updateHandlerUri, "uri");
final String[] v = updateHandlerUri.split("/");
final InputStream response;
final URI uri;
DatabaseURIHelper uriHelper = new DatabaseURIHelper(dbUri)... | class class_name[name] begin[{]
method[invokeUpdateHandler, return_type[type[String]], modifier[public], parameter[updateHandlerUri, docId, params]] begin[{]
call[.assertNotEmpty, parameter[member[.updateHandlerUri], literal["uri"]]]
local_variable[type[String], v]
local_variabl... | Keyword[public] identifier[String] identifier[invokeUpdateHandler] operator[SEP] identifier[String] identifier[updateHandlerUri] , identifier[String] identifier[docId] , identifier[Params] identifier[params] operator[SEP] {
identifier[assertNotEmpty] operator[SEP] identifier[updateHandlerUri] , literal[String... |
public void setGregorianChange(Date date) {
gregorianCutover = date.getTime();
// If the cutover has an extreme value, then create a pure
// Gregorian or pure Julian calendar by giving the cutover year and
// JD extreme values.
if (gregorianCutover <= MIN_MILLIS) {
g... | class class_name[name] begin[{]
method[setGregorianChange, return_type[void], modifier[public], parameter[date]] begin[{]
assign[member[.gregorianCutover], call[date.getTime, parameter[]]]
if[binary_operation[member[.gregorianCutover], <=, member[.MIN_MILLIS]]] begin[{]
... | Keyword[public] Keyword[void] identifier[setGregorianChange] operator[SEP] identifier[Date] identifier[date] operator[SEP] {
identifier[gregorianCutover] operator[=] identifier[date] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[gregorianCutover]... |
public static int Minimum(ImageSource fastBitmap, int startX, int startY, int width, int height) {
int min = 255;
if (fastBitmap.isGrayscale()) {
for (int i = startX; i < height; i++) {
for (int j = startY; j < width; j++) {
int gray = fastBitmap.getR... | class class_name[name] begin[{]
method[Minimum, return_type[type[int]], modifier[public static], parameter[fastBitmap, startX, startY, width, height]] begin[{]
local_variable[type[int], min]
if[call[fastBitmap.isGrayscale, parameter[]]] begin[{]
ForStatement(body=BlockStatem... | Keyword[public] Keyword[static] Keyword[int] identifier[Minimum] operator[SEP] identifier[ImageSource] identifier[fastBitmap] , Keyword[int] identifier[startX] , Keyword[int] identifier[startY] , Keyword[int] identifier[width] , Keyword[int] identifier[height] operator[SEP] {
Keyword[int] identifier[min] ope... |
public CreateProvisioningArtifactResult withInfo(java.util.Map<String, String> info) {
setInfo(info);
return this;
} | class class_name[name] begin[{]
method[withInfo, return_type[type[CreateProvisioningArtifactResult]], modifier[public], parameter[info]] begin[{]
call[.setInfo, parameter[member[.info]]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[CreateProvisioningArtifactResult] identifier[withInfo] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[info] operator[SEP] {
identifier[setInfo] operator[SEP] identif... |
public static base_response save(nitro_service client, cachecontentgroup resource) throws Exception {
cachecontentgroup saveresource = new cachecontentgroup();
saveresource.name = resource.name;
return saveresource.perform_operation(client,"save");
} | class class_name[name] begin[{]
method[save, return_type[type[base_response]], modifier[public static], parameter[client, resource]] begin[{]
local_variable[type[cachecontentgroup], saveresource]
assign[member[saveresource.name], member[resource.name]]
return[call[saveresource.p... | Keyword[public] Keyword[static] identifier[base_response] identifier[save] operator[SEP] identifier[nitro_service] identifier[client] , identifier[cachecontentgroup] identifier[resource] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[cachecontentgroup] identifier[saveresource] operator[=] Keyw... |
public boolean reportChecksumFailure(Path f,
FSDataInputStream in, long inPos,
FSDataInputStream sums, long sumsPos) {
LocatedBlock lblocks[] = new LocatedBlock[2];
// Find block in data stream.
DFSClient.DFSDataInputStream dfsIn = (DFSClient.DFSDataInputStream) in;
Block dataBlock = dfsIn.g... | class class_name[name] begin[{]
method[reportChecksumFailure, return_type[type[boolean]], modifier[public], parameter[f, in, inPos, sums, sumsPos]] begin[{]
local_variable[type[LocatedBlock], lblocks]
local_variable[type[DFSClient], dfsIn]
local_variable[type[Block], dataBlock]
... | Keyword[public] Keyword[boolean] identifier[reportChecksumFailure] operator[SEP] identifier[Path] identifier[f] , identifier[FSDataInputStream] identifier[in] , Keyword[long] identifier[inPos] , identifier[FSDataInputStream] identifier[sums] , Keyword[long] identifier[sumsPos] operator[SEP] {
identifier[Loca... |
private static int writeUncompressedLength(byte[] compressed, int compressedOffset, int uncompressedLength) {
int highBitMask = 0x80;
if (uncompressedLength < (1 << 7) && uncompressedLength >= 0) {
compressed[compressedOffset++] = (byte) (uncompressedLength);
} else if (uncompressedL... | class class_name[name] begin[{]
method[writeUncompressedLength, return_type[type[int]], modifier[private static], parameter[compressed, compressedOffset, uncompressedLength]] begin[{]
local_variable[type[int], highBitMask]
if[binary_operation[binary_operation[member[.uncompressedLength]... | Keyword[private] Keyword[static] Keyword[int] identifier[writeUncompressedLength] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[compressed] , Keyword[int] identifier[compressedOffset] , Keyword[int] identifier[uncompressedLength] operator[SEP] {
Keyword[int] identifier[highBitMask] operato... |
@Deprecated
public static <T> Collection<T> concat(Collection<? extends T> left,
Collection<? extends T> right) {
return new ConcattedCollectionView<T>(left, right);
} | class class_name[name] begin[{]
method[concat, return_type[type[Collection]], modifier[public static], parameter[left, right]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=left, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=right, postfix... | annotation[@] identifier[Deprecated] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Collection] operator[<] identifier[T] operator[>] identifier[concat] operator[SEP] identifier[Collection] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] identifier[left] , identifie... |
private static String toJson(Object x) {
try {
if (x == null || x instanceof String || x instanceof Number || x instanceof Character
|| x.getClass().isArray() || x instanceof Iterable<?>) {
return new JSONObject().put("JSON", x).toString(2);
} else if (x instanceof Map<?, ?>) {
... | class class_name[name] begin[{]
method[toJson, return_type[type[String]], modifier[private static], parameter[x]] begin[{]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperati... | Keyword[private] Keyword[static] identifier[String] identifier[toJson] operator[SEP] identifier[Object] identifier[x] operator[SEP] {
Keyword[try] {
Keyword[if] operator[SEP] identifier[x] operator[==] Other[null] operator[||] identifier[x] Keyword[instanceof] identifier[String] operator[||] identifie... |
public List<Object> parseArray() throws IOException {
Type t = lexer.readNextToken();
if (t != Type.START_ARRAY) {
throw new IOException("Unexpected token: " + t);
}
return parseArrayInternal();
} | class class_name[name] begin[{]
method[parseArray, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[Type], t]
if[binary_operation[member[.t], !=, member[Type.START_ARRAY]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryO... | Keyword[public] identifier[List] operator[<] identifier[Object] operator[>] identifier[parseArray] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[Type] identifier[t] operator[=] identifier[lexer] operator[SEP] identifier[readNextToken] operator[SEP] operator[SEP] operator[SEP] K... |
protected LightweightTypeReference getFirstArgumentType() {
if (!isExtension())
return null;
LightweightTypeReference result = getImplicitFirstArgumentType();
if (result != null)
return result;
return getSyntacticReceiverType();
} | class class_name[name] begin[{]
method[getFirstArgumentType, return_type[type[LightweightTypeReference]], modifier[protected], parameter[]] begin[{]
if[call[.isExtension, parameter[]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_variable[type[Lightweig... | Keyword[protected] identifier[LightweightTypeReference] identifier[getFirstArgumentType] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[isExtension] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] identifier[LightweightTypeReference] identifier[... |
public void setHSV(int hue, int sat, int val) throws Exception {
if ((hue < 0) || (hue > 360)) {
throw new Exception();
}
if ((sat < 0) || (sat > 100)) {
throw new Exception();
}
if ((val < 0) || (val > 100)) {
throw new Exception();
... | class class_name[name] begin[{]
method[setHSV, return_type[void], modifier[public], parameter[hue, sat, val]] begin[{]
if[binary_operation[binary_operation[member[.hue], <, literal[0]], ||, binary_operation[member[.hue], >, literal[360]]]] begin[{]
ThrowStatement(expression=ClassCre... | Keyword[public] Keyword[void] identifier[setHSV] operator[SEP] Keyword[int] identifier[hue] , Keyword[int] identifier[sat] , Keyword[int] identifier[val] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[if] operator[SEP] operator[SEP] identifier[hue] operator[<] Other[0] operator[SEP] operator[||]... |
public Map<String, OptionalFailure<Object>> getAccumulators(JobID jobID) throws Exception {
return getAccumulators(jobID, ClassLoader.getSystemClassLoader());
} | class class_name[name] begin[{]
method[getAccumulators, return_type[type[Map]], modifier[public], parameter[jobID]] begin[{]
return[call[.getAccumulators, parameter[member[.jobID], call[ClassLoader.getSystemClassLoader, parameter[]]]]]
end[}]
END[}] | Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[OptionalFailure] operator[<] identifier[Object] operator[>] operator[>] identifier[getAccumulators] operator[SEP] identifier[JobID] identifier[jobID] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[return] identifier[getAc... |
@Pure
public int getPointIndex(int groupIndex, int position) {
final int groupMemberCount = getPointCountInGroup(groupIndex);
final int pos;
if (position < 0) {
pos = 0;
} else if (position >= groupMemberCount) {
pos = groupMemberCount - 1;
} else {
pos = position;
}
// Move the start/end index... | class class_name[name] begin[{]
method[getPointIndex, return_type[type[int]], modifier[public], parameter[groupIndex, position]] begin[{]
local_variable[type[int], groupMemberCount]
local_variable[type[int], pos]
if[binary_operation[member[.position], <, literal[0]]] begin[{]
... | annotation[@] identifier[Pure] Keyword[public] Keyword[int] identifier[getPointIndex] operator[SEP] Keyword[int] identifier[groupIndex] , Keyword[int] identifier[position] operator[SEP] {
Keyword[final] Keyword[int] identifier[groupMemberCount] operator[=] identifier[getPointCountInGroup] operator[SEP] identifi... |
public void resizeTempBlockMeta(TempBlockMeta tempBlockMeta, long newSize)
throws InvalidWorkerStateException {
long oldSize = tempBlockMeta.getBlockSize();
if (newSize > oldSize) {
reserveSpace(newSize - oldSize, false);
tempBlockMeta.setBlockSize(newSize);
} else if (newSize < oldSize) {... | class class_name[name] begin[{]
method[resizeTempBlockMeta, return_type[void], modifier[public], parameter[tempBlockMeta, newSize]] begin[{]
local_variable[type[long], oldSize]
if[binary_operation[member[.newSize], >, member[.oldSize]]] begin[{]
call[.reserveSpac... | Keyword[public] Keyword[void] identifier[resizeTempBlockMeta] operator[SEP] identifier[TempBlockMeta] identifier[tempBlockMeta] , Keyword[long] identifier[newSize] operator[SEP] Keyword[throws] identifier[InvalidWorkerStateException] {
Keyword[long] identifier[oldSize] operator[=] identifier[tempBlockMeta] oper... |
public char getChar(String key) {
try {
String str = this.getStringImpl(key);
if (str.length() > 0) {
return str.charAt(0);
}
} catch (Exception e) {
// Not defined
}
return '\u0000';
} | class class_name[name] begin[{]
method[getChar, return_type[type[char]], modifier[public], parameter[key]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, sel... | Keyword[public] Keyword[char] identifier[getChar] operator[SEP] identifier[String] identifier[key] operator[SEP] {
Keyword[try] {
identifier[String] identifier[str] operator[=] Keyword[this] operator[SEP] identifier[getStringImpl] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] o... |
public <RT> Union<RT> unionAll(SubQueryExpression<RT>... sq) {
unionAll = true;
return innerUnion(sq);
} | class class_name[name] begin[{]
method[unionAll, return_type[type[Union]], modifier[public], parameter[sq]] begin[{]
assign[member[.unionAll], literal[true]]
return[call[.innerUnion, parameter[member[.sq]]]]
end[}]
END[}] | Keyword[public] operator[<] identifier[RT] operator[>] identifier[Union] operator[<] identifier[RT] operator[>] identifier[unionAll] operator[SEP] identifier[SubQueryExpression] operator[<] identifier[RT] operator[>] operator[...] identifier[sq] operator[SEP] {
identifier[unionAll] operator[=] literal[boolean] o... |
@TargetApi(18)
public void notifyScannedDevice(BluetoothDevice device, BluetoothAdapter.LeScanCallback scanner) {
int oldSize, newSize;
oldSize = distinctBluetoothAddresses.size();
synchronized(distinctBluetoothAddresses) {
distinctBluetoothAddresses.add(device.getAddress());
... | class class_name[name] begin[{]
method[notifyScannedDevice, return_type[void], modifier[public], parameter[device, scanner]] begin[{]
local_variable[type[int], oldSize]
assign[member[.oldSize], call[distinctBluetoothAddresses.size, parameter[]]]
SYNCHRONIZED[member[.dist... | annotation[@] identifier[TargetApi] operator[SEP] Other[18] operator[SEP] Keyword[public] Keyword[void] identifier[notifyScannedDevice] operator[SEP] identifier[BluetoothDevice] identifier[device] , identifier[BluetoothAdapter] operator[SEP] identifier[LeScanCallback] identifier[scanner] operator[SEP] {
Keyword... |
public static void delete(FileSystem fs, String name) throws IOException {
Path dir = new Path(name);
Path data = new Path(dir, DATA_FILE_NAME);
Path index = new Path(dir, INDEX_FILE_NAME);
fs.delete(data, true);
fs.delete(index, true);
fs.delete(dir, true);
} | class class_name[name] begin[{]
method[delete, return_type[void], modifier[public static], parameter[fs, name]] begin[{]
local_variable[type[Path], dir]
local_variable[type[Path], data]
local_variable[type[Path], index]
call[fs.delete, parameter[member[.data], literal[tr... | Keyword[public] Keyword[static] Keyword[void] identifier[delete] operator[SEP] identifier[FileSystem] identifier[fs] , identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[Path] identifier[dir] operator[=] Keyword[new] identifier[Path] operator[SEP] identifier[n... |
@XmlElementDecl(namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", name = "extension", scope = GetContentStream.class)
public JAXBElement<CmisExtensionType> createGetContentStreamExtension(
CmisExtensionType value) {
return new JAXBElement<CmisExtensionType>(
_GetPropertiesExtension_QNAME... | class class_name[name] begin[{]
method[createGetContentStreamExtension, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_GetPropertiesExtension_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]),... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] , identifier[scope] operator[=] identifier[GetContentStream] operator[SEP] Keyword[class] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier... |
public OvhHostProfile location_pccZone_hostProfile_id_GET(String pccZone, Long id) throws IOException {
String qPath = "/dedicatedCloud/location/{pccZone}/hostProfile/{id}";
StringBuilder sb = path(qPath, pccZone, id);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, OvhHostProfile.... | class class_name[name] begin[{]
method[location_pccZone_hostProfile_id_GET, return_type[type[OvhHostProfile]], modifier[public], parameter[pccZone, id]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilder], sb]
local_variable[type[String], resp]
return... | Keyword[public] identifier[OvhHostProfile] identifier[location_pccZone_hostProfile_id_GET] operator[SEP] identifier[String] identifier[pccZone] , identifier[Long] identifier[id] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[qPath] operator[=] literal[String] operator[SEP]... |
private static <T extends Comparable<T>> List<T> lcs(List<T> arg0, List<T> arg1, int i, int j) {
if (arg0.size() == i || arg1.size() == j) {
return new ArrayList<>(Math.min(arg0.size(), arg1.size()));
}
if (arg0.get(i) != null && arg1.get(j) != null && arg0.get(i).compareTo(arg1.get... | class class_name[name] begin[{]
method[lcs, return_type[type[List]], modifier[private static], parameter[arg0, arg1, i, j]] begin[{]
if[binary_operation[binary_operation[call[arg0.size, parameter[]], ==, member[.i]], ||, binary_operation[call[arg1.size, parameter[]], ==, member[.j]]]] begin[{]
... | Keyword[private] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Comparable] operator[<] identifier[T] operator[>] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[lcs] operator[SEP] identifier[List] operator[<] identifier[T] operator[>] identifier[arg0] , identifier[... |
public String rate(RateCondition condition) {
String description;
if (condition.getContext() != null && condition.getContext().get(CONTEXT_PROPERTY_DESCRIPTION) != null) {
description = condition.getContext().get(CONTEXT_PROPERTY_DESCRIPTION);
} else {
description = condi... | class class_name[name] begin[{]
method[rate, return_type[type[String]], modifier[public], parameter[condition]] begin[{]
local_variable[type[String], description]
if[binary_operation[binary_operation[call[condition.getContext, parameter[]], !=, literal[null]], &&, binary_operation[call[... | Keyword[public] identifier[String] identifier[rate] operator[SEP] identifier[RateCondition] identifier[condition] operator[SEP] {
identifier[String] identifier[description] operator[SEP] Keyword[if] operator[SEP] identifier[condition] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] operator[!=] ... |
protected DateFormat getDateTimeFormat( final Locale browserLocale )
{
return SimpleDateFormat.getDateTimeInstance( SimpleDateFormat.SHORT, SimpleDateFormat.MEDIUM, browserLocale );
} | class class_name[name] begin[{]
method[getDateTimeFormat, return_type[type[DateFormat]], modifier[protected], parameter[browserLocale]] begin[{]
return[call[SimpleDateFormat.getDateTimeInstance, parameter[member[SimpleDateFormat.SHORT], member[SimpleDateFormat.MEDIUM], member[.browserLocale]]]]
end... | Keyword[protected] identifier[DateFormat] identifier[getDateTimeFormat] operator[SEP] Keyword[final] identifier[Locale] identifier[browserLocale] operator[SEP] {
Keyword[return] identifier[SimpleDateFormat] operator[SEP] identifier[getDateTimeInstance] operator[SEP] identifier[SimpleDateFormat] operator[SEP] ide... |
public void validate(String currentTestAction, Object contentToValidate) throws Exception {
if (!isExpectationForAction(currentTestAction)) {
return;
}
Log.info(thisClass, "validate", "Checking " + this);
validate(contentToValidate);
} | class class_name[name] begin[{]
method[validate, return_type[void], modifier[public], parameter[currentTestAction, contentToValidate]] begin[{]
if[call[.isExpectationForAction, parameter[member[.currentTestAction]]]] begin[{]
return[None]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[void] identifier[validate] operator[SEP] identifier[String] identifier[currentTestAction] , identifier[Object] identifier[contentToValidate] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[if] operator[SEP] operator[!] identifier[isExpectationForAction] operator[SEP] identi... |
@Override
public final void close(CloseReason status) throws IOException {
checkNativeSessionInitialized();
if (logger.isDebugEnabled()) {
logger.debug("Closing " + this);
}
closeInternal(status);
} | class class_name[name] begin[{]
method[close, return_type[void], modifier[final public], parameter[status]] begin[{]
call[.checkNativeSessionInitialized, parameter[]]
if[call[logger.isDebugEnabled, parameter[]]] begin[{]
call[logger.debug, parameter[binar... | annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[close] operator[SEP] identifier[CloseReason] identifier[status] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[checkNativeSessionInitialized] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operat... |
private Object manageListIfNecessary(List<Object> value) {
boolean containsRuntimeRefs = false;
for (ListIterator<Object> i = value.listIterator(); i.hasNext();) {
Object e = i.next();
if(e instanceof RuntimeBeanReference) {
containsRuntimeRefs = true;
}
if (e instanceof BeanConfiguration) ... | class class_name[name] begin[{]
method[manageListIfNecessary, return_type[type[Object]], modifier[private], parameter[value]] begin[{]
local_variable[type[boolean], containsRuntimeRefs]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators... | Keyword[private] identifier[Object] identifier[manageListIfNecessary] operator[SEP] identifier[List] operator[<] identifier[Object] operator[>] identifier[value] operator[SEP] {
Keyword[boolean] identifier[containsRuntimeRefs] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[ListI... |
public static CommerceAddress remove(long commerceAddressId)
throws com.liferay.commerce.exception.NoSuchAddressException {
return getPersistence().remove(commerceAddressId);
} | class class_name[name] begin[{]
method[remove, return_type[type[CommerceAddress]], modifier[public static], parameter[commerceAddressId]] begin[{]
return[call[.getPersistence, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[CommerceAddress] identifier[remove] operator[SEP] Keyword[long] identifier[commerceAddressId] operator[SEP] Keyword[throws] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[exception] operator[SEP] identifier[NoSuchA... |
public Router options(@NotNull final Pattern regex, @NotNull final IMiddleware... handlers) {
addRegEx("OPTIONS", regex, handlers, optionsBindings);
return this;
} | class class_name[name] begin[{]
method[options, return_type[type[Router]], modifier[public], parameter[regex, handlers]] begin[{]
call[.addRegEx, parameter[literal["OPTIONS"], member[.regex], member[.handlers], member[.optionsBindings]]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[Router] identifier[options] operator[SEP] annotation[@] identifier[NotNull] Keyword[final] identifier[Pattern] identifier[regex] , annotation[@] identifier[NotNull] Keyword[final] identifier[IMiddleware] operator[...] identifier[handlers] operator[SEP] {
identifier[addRegEx] operator[... |
@Override
public void visit(final Attribute attribute) {
for (final GedObject gob : attribute.getAttributes()) {
gob.accept(this);
}
} | class class_name[name] begin[{]
method[visit, return_type[void], modifier[public], parameter[attribute]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[visit] operator[SEP] Keyword[final] identifier[Attribute] identifier[attribute] operator[SEP] {
Keyword[for] operator[SEP] Keyword[final] identifier[GedObject] identifier[gob] operator[:] identifier[attribute] operator[SEP] identifier[g... |
private List<WComponent> getComponentsForTerm(final String term) {
List<WComponent> childList = content.getComponentModel().getChildren();
List<WComponent> result = new ArrayList<>();
if (childList != null) {
for (int i = 0; i < childList.size(); i++) {
WComponent child = childList.get(i);
if (term.e... | class class_name[name] begin[{]
method[getComponentsForTerm, return_type[type[List]], modifier[private], parameter[term]] begin[{]
local_variable[type[List], childList]
local_variable[type[List], result]
if[binary_operation[member[.childList], !=, literal[null]]] begin[{]
... | Keyword[private] identifier[List] operator[<] identifier[WComponent] operator[>] identifier[getComponentsForTerm] operator[SEP] Keyword[final] identifier[String] identifier[term] operator[SEP] {
identifier[List] operator[<] identifier[WComponent] operator[>] identifier[childList] operator[=] identifier[content] ... |
public static boolean isRectValue (@Nullable final String sCSSValue)
{
final String sRealValue = StringHelper.trim (sCSSValue);
if (StringHelper.hasText (sRealValue))
{
// Current syntax: rect(a,b,c,d)
if (RegExHelper.stringMatchesPattern (PATTERN_CURRENT_SYNTAX, sRealValue))
return tr... | class class_name[name] begin[{]
method[isRectValue, return_type[type[boolean]], modifier[public static], parameter[sCSSValue]] begin[{]
local_variable[type[String], sRealValue]
if[call[StringHelper.hasText, parameter[member[.sRealValue]]]] begin[{]
if[call[RegExH... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isRectValue] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[sCSSValue] operator[SEP] {
Keyword[final] identifier[String] identifier[sRealValue] operator[=] identifier[StringHelper] operator[SEP] identifier[... |
public ServiceFuture<DeploymentExtendedInner> createOrUpdateAsync(String resourceGroupName, String deploymentName, DeploymentProperties properties, final ServiceCallback<DeploymentExtendedInner> serviceCallback) {
return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, deploy... | class class_name[name] begin[{]
method[createOrUpdateAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, deploymentName, properties, serviceCallback]] begin[{]
return[call[ServiceFuture.fromResponse, parameter[call[.createOrUpdateWithServiceResponseAsync, parameter[m... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[DeploymentExtendedInner] operator[>] identifier[createOrUpdateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[deploymentName] , identifier[DeploymentProperties] identifier[properties] , Keyword[fina... |
public String match(String text){
if(null == text){
return null;
}
List<String> matchAll = matchAll(text, 1);
if(CollectionUtil.isNotEmpty(matchAll)){
return matchAll.get(0);
}
return null;
} | class class_name[name] begin[{]
method[match, return_type[type[String]], modifier[public], parameter[text]] begin[{]
if[binary_operation[literal[null], ==, member[.text]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_variable[type[List], mat... | Keyword[public] identifier[String] identifier[match] operator[SEP] identifier[String] identifier[text] operator[SEP] {
Keyword[if] operator[SEP] Other[null] operator[==] identifier[text] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
identifier[List] operator[<] identifier[S... |
@Embedded
@AttributeOverrides({
@AttributeOverride(name = "value", column = @Column(name = "INDICATOR_VALUE")),
@AttributeOverride(name = "id", column = @Column(name = "INDICATOR_ID"))
})
public Indicator getIndicator() {
return indicator;
} | class class_name[name] begin[{]
method[getIndicator, return_type[type[Indicator]], modifier[public], parameter[]] begin[{]
return[member[.indicator]]
end[}]
END[}] | annotation[@] identifier[Embedded] annotation[@] identifier[AttributeOverrides] operator[SEP] {
annotation[@] identifier[AttributeOverride] operator[SEP] identifier[name] operator[=] literal[String] , identifier[column] operator[=] annotation[@] identifier[Column] operator[SEP] identifier[name] operator[=] lite... |
private void enabledSslCipherSuites(SSLSocket sslSocket) throws SQLException {
if (options.enabledSslCipherSuites != null) {
List<String> possibleCiphers = Arrays.asList(sslSocket.getSupportedCipherSuites());
String[] ciphers = options.enabledSslCipherSuites.split("[,;\\s]+");
for (String cipher :... | class class_name[name] begin[{]
method[enabledSslCipherSuites, return_type[void], modifier[private], parameter[sslSocket]] begin[{]
if[binary_operation[member[options.enabledSslCipherSuites], !=, literal[null]]] begin[{]
local_variable[type[List], possibleCiphers]
local_... | Keyword[private] Keyword[void] identifier[enabledSslCipherSuites] operator[SEP] identifier[SSLSocket] identifier[sslSocket] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[if] operator[SEP] identifier[options] operator[SEP] identifier[enabledSslCipherSuites] operator[!=] Other[null] operator[SEP... |
public FessMessages addErrorsFailedToStartJob(String property, String arg0) {
assertPropertyNotNull(property);
add(property, new UserMessage(ERRORS_failed_to_start_job, arg0));
return this;
} | class class_name[name] begin[{]
method[addErrorsFailedToStartJob, return_type[type[FessMessages]], modifier[public], parameter[property, arg0]] begin[{]
call[.assertPropertyNotNull, parameter[member[.property]]]
call[.add, parameter[member[.property], ClassCreator(arguments=[Mem... | Keyword[public] identifier[FessMessages] identifier[addErrorsFailedToStartJob] operator[SEP] identifier[String] identifier[property] , identifier[String] identifier[arg0] operator[SEP] {
identifier[assertPropertyNotNull] operator[SEP] identifier[property] operator[SEP] operator[SEP] identifier[add] operator[SEP... |
public void marshall(GetUpgradeStatusRequest getUpgradeStatusRequest, ProtocolMarshaller protocolMarshaller) {
if (getUpgradeStatusRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(getUpgrade... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[getUpgradeStatusRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.getUpgradeStatusRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[GetUpgradeStatusRequest] identifier[getUpgradeStatusRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[getUpgradeStatusRequest] operator[==] Other[null] operator... |
private static void deleteEveryIn(DirectoryStream<Path> caches) {
for (Path notActualCache : caches) {
LOGGER.debug("Deleting redundant cache dir {}", notActualCache);
try {
FileUtils.deleteDirectory(notActualCache.toFile());
} catch (IOException e) {
... | class class_name[name] begin[{]
method[deleteEveryIn, return_type[void], modifier[private static], parameter[caches]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier... | Keyword[private] Keyword[static] Keyword[void] identifier[deleteEveryIn] operator[SEP] identifier[DirectoryStream] operator[<] identifier[Path] operator[>] identifier[caches] operator[SEP] {
Keyword[for] operator[SEP] identifier[Path] identifier[notActualCache] operator[:] identifier[caches] operator[SEP] {
... |
@Pure
public static int compareAttrs(Attribute arg0, Attribute arg1) {
if (arg0 == arg1) {
return 0;
}
if (arg0 == null) {
return 1;
}
if (arg1 == null) {
return -1;
}
final String n0 = arg0.getName();
final String n1 = arg1.getName();
final int cmp = compareAttrNames(n0, n1);
if (cmp ==... | class class_name[name] begin[{]
method[compareAttrs, return_type[type[int]], modifier[public static], parameter[arg0, arg1]] begin[{]
if[binary_operation[member[.arg0], ==, member[.arg1]]] begin[{]
return[literal[0]]
else begin[{]
None
end[}]
if[binar... | annotation[@] identifier[Pure] Keyword[public] Keyword[static] Keyword[int] identifier[compareAttrs] operator[SEP] identifier[Attribute] identifier[arg0] , identifier[Attribute] identifier[arg1] operator[SEP] {
Keyword[if] operator[SEP] identifier[arg0] operator[==] identifier[arg1] operator[SEP] {
K... |
public void populateSMMetadata(final SoftwareModule swModule) {
removeAllItems();
if (null == swModule) {
return;
}
selectedSWModuleId = swModule.getId();
final List<SoftwareModuleMetadata> swMetadataList = softwareModuleManagement
.findMetaDataBySoftw... | class class_name[name] begin[{]
method[populateSMMetadata, return_type[void], modifier[public], parameter[swModule]] begin[{]
call[.removeAllItems, parameter[]]
if[binary_operation[literal[null], ==, member[.swModule]]] begin[{]
return[None]
else begin[{]
Non... | Keyword[public] Keyword[void] identifier[populateSMMetadata] operator[SEP] Keyword[final] identifier[SoftwareModule] identifier[swModule] operator[SEP] {
identifier[removeAllItems] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[==] identifier[swModule] operator[SEP] {
... |
@Nonnull
public IFileItemIterator getItemIterator (@Nonnull final HttpServletRequest aHttpRequest) throws FileUploadException,
IOException
{
return super.getItemIterator (new ServletRequestContext (aHttpRequest));
} | class class_name[name] begin[{]
method[getItemIterator, return_type[type[IFileItemIterator]], modifier[public], parameter[aHttpRequest]] begin[{]
return[SuperMethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=aHttpRequest, postfix_operators=[], prefix_operators=[], qualifier=, s... | annotation[@] identifier[Nonnull] Keyword[public] identifier[IFileItemIterator] identifier[getItemIterator] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[HttpServletRequest] identifier[aHttpRequest] operator[SEP] Keyword[throws] identifier[FileUploadException] , identifier[IOException] {
... |
public static JsExpr concatJsExprs(List<? extends JsExpr> jsExprs) {
if (jsExprs.isEmpty()) {
return EMPTY_STRING;
}
if (jsExprs.size() == 1) {
return jsExprs.get(0);
}
int plusOpPrec = Operator.PLUS.getPrecedence();
StringBuilder resultSb = new StringBuilder();
boolean isFirs... | class class_name[name] begin[{]
method[concatJsExprs, return_type[type[JsExpr]], modifier[public static], parameter[jsExprs]] begin[{]
if[call[jsExprs.isEmpty, parameter[]]] begin[{]
return[member[.EMPTY_STRING]]
else begin[{]
None
end[}]
if[binary_op... | Keyword[public] Keyword[static] identifier[JsExpr] identifier[concatJsExprs] operator[SEP] identifier[List] operator[<] operator[?] Keyword[extends] identifier[JsExpr] operator[>] identifier[jsExprs] operator[SEP] {
Keyword[if] operator[SEP] identifier[jsExprs] operator[SEP] identifier[isEmpty] operator[SEP] ope... |
public ServerAzureADAdministratorInner createOrUpdate(String resourceGroupName, String serverName, ServerAzureADAdministratorInner properties) {
return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, properties).toBlocking().last().body();
} | class class_name[name] begin[{]
method[createOrUpdate, return_type[type[ServerAzureADAdministratorInner]], modifier[public], parameter[resourceGroupName, serverName, properties]] begin[{]
return[call[.createOrUpdateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.serverName], mem... | Keyword[public] identifier[ServerAzureADAdministratorInner] identifier[createOrUpdate] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[serverName] , identifier[ServerAzureADAdministratorInner] identifier[properties] operator[SEP] {
Keyword[return] identifier[creat... |
@Override
public void write(Iterable<QueryResult> results) {
logger.debug("Export to '{}', proxy {} metrics {}", url, proxy, results);
List<QueryResult> counters = new ArrayList<QueryResult>();
List<QueryResult> gauges = new ArrayList<QueryResult>();
for (QueryResult result : result... | class class_name[name] begin[{]
method[write, return_type[void], modifier[public], parameter[results]] begin[{]
call[logger.debug, parameter[literal["Export to '{}', proxy {} metrics {}"], member[.url], member[.proxy], member[.results]]]
local_variable[type[List], counters]
loca... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[write] operator[SEP] identifier[Iterable] operator[<] identifier[QueryResult] operator[>] identifier[results] operator[SEP] {
identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[url] , identifi... |
public Observable<Page<DscCompilationJobInner>> listByAutomationAccountNextAsync(final String nextPageLink) {
return listByAutomationAccountNextWithServiceResponseAsync(nextPageLink)
.map(new Func1<ServiceResponse<Page<DscCompilationJobInner>>, Page<DscCompilationJobInner>>() {
@Over... | class class_name[name] begin[{]
method[listByAutomationAccountNextAsync, return_type[type[Observable]], modifier[public], parameter[nextPageLink]] begin[{]
return[call[.listByAutomationAccountNextWithServiceResponseAsync, parameter[member[.nextPageLink]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[DscCompilationJobInner] operator[>] operator[>] identifier[listByAutomationAccountNextAsync] operator[SEP] Keyword[final] identifier[String] identifier[nextPageLink] operator[SEP] {
Keyword[return] identifier[listByAutomat... |
protected ORole createRole(final ODocument roleDoc) {
ORole role = null;
// If databaseName is set, then only allow roles with the same databaseName.
if (databaseName != null && !databaseName.isEmpty()) {
if (roleDoc != null && roleDoc.containsField(OSystemRole.DB_FILTER) && roleDoc.fieldType(OSystem... | class class_name[name] begin[{]
method[createRole, return_type[type[ORole]], modifier[protected], parameter[roleDoc]] begin[{]
local_variable[type[ORole], role]
if[binary_operation[binary_operation[member[.databaseName], !=, literal[null]], &&, call[databaseName.isEmpty, parameter[]]]] ... | Keyword[protected] identifier[ORole] identifier[createRole] operator[SEP] Keyword[final] identifier[ODocument] identifier[roleDoc] operator[SEP] {
identifier[ORole] identifier[role] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[databaseName] operator[!=] Other[null] operator[&&] oper... |
public static int andNotCardinality(final ImmutableRoaringBitmap x1,
final ImmutableRoaringBitmap x2) {
return x1.getCardinality() - andCardinality(x1, x2);
} | class class_name[name] begin[{]
method[andNotCardinality, return_type[type[int]], modifier[public static], parameter[x1, x2]] begin[{]
return[binary_operation[call[x1.getCardinality, parameter[]], -, call[.andCardinality, parameter[member[.x1], member[.x2]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[int] identifier[andNotCardinality] operator[SEP] Keyword[final] identifier[ImmutableRoaringBitmap] identifier[x1] , Keyword[final] identifier[ImmutableRoaringBitmap] identifier[x2] operator[SEP] {
Keyword[return] identifier[x1] operator[SEP] identifier[getCardinality] ope... |
@SuppressWarnings("unchecked")
public static List<Boolean> getAt(boolean[] array, ObjectRange range) {
return primitiveArrayGet(array, range);
} | class class_name[name] begin[{]
method[getAt, return_type[type[List]], modifier[public static], parameter[array, range]] begin[{]
return[call[.primitiveArrayGet, parameter[member[.array], member[.range]]]]
end[}]
END[}] | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] identifier[List] operator[<] identifier[Boolean] operator[>] identifier[getAt] operator[SEP] Keyword[boolean] operator[SEP] operator[SEP] identifier[array] , identifier[ObjectRange] identifier[range] ... |
@Override
public boolean put(K key, V value) throws Exception {
if(key == null) {
throw new NullPointerException("key");
}
if(value == null) {
return _store.delete(_keySerializer.serialize(key));
} else {
return _store.put(_keySerializer.s... | class class_name[name] begin[{]
method[put, return_type[type[boolean]], modifier[public], parameter[key, value]] begin[{]
if[binary_operation[member[.key], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[put] operator[SEP] identifier[K] identifier[key] , identifier[V] identifier[value] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[if] operator[SEP] identifier[key] operator[==] Other[null] operator[SEP] {
Ke... |
public void editable(boolean isEditable, String filename) throws JspException {
if (isEditable) {
CmsJspTagEditable.editableTagAction(
getJspContext(),
CmsDirectEditJspIncludeProvider.class.getName(),
CmsDirectEditMode.AUTO,
filename);... | class class_name[name] begin[{]
method[editable, return_type[void], modifier[public], parameter[isEditable, filename]] begin[{]
if[member[.isEditable]] begin[{]
call[CmsJspTagEditable.editableTagAction, parameter[call[.getJspContext, parameter[]], ClassReference(postfix_... | Keyword[public] Keyword[void] identifier[editable] operator[SEP] Keyword[boolean] identifier[isEditable] , identifier[String] identifier[filename] operator[SEP] Keyword[throws] identifier[JspException] {
Keyword[if] operator[SEP] identifier[isEditable] operator[SEP] {
identifier[CmsJspTagEditable] op... |
private void terminateSubscriptions(IoSession session, Subscription.CloseReason reason) {
Multiset<String> heapsForThisClient;
try {
subTermLock.lock();
heapsForThisClient = heapsByClient.remove(session);
} finally {
subTermLock.unlock();
}
if... | class class_name[name] begin[{]
method[terminateSubscriptions, return_type[void], modifier[private], parameter[session, reason]] begin[{]
local_variable[type[Multiset], heapsForThisClient]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=lock, postfix_ope... | Keyword[private] Keyword[void] identifier[terminateSubscriptions] operator[SEP] identifier[IoSession] identifier[session] , identifier[Subscription] operator[SEP] identifier[CloseReason] identifier[reason] operator[SEP] {
identifier[Multiset] operator[<] identifier[String] operator[>] identifier[heapsForThisCli... |
private int bufferCrypt(ByteBuffer input, ByteBuffer output,
boolean isUpdate) throws ShortBufferException,
IllegalBlockSizeException, BadPaddingException {
if ((input == null) || (output == null)) {
throw new NullPointerException
("Input and output buffers mu... | class class_name[name] begin[{]
method[bufferCrypt, return_type[type[int]], modifier[private], parameter[input, output, isUpdate]] begin[{]
if[binary_operation[binary_operation[member[.input], ==, literal[null]], ||, binary_operation[member[.output], ==, literal[null]]]] begin[{]
Th... | Keyword[private] Keyword[int] identifier[bufferCrypt] operator[SEP] identifier[ByteBuffer] identifier[input] , identifier[ByteBuffer] identifier[output] , Keyword[boolean] identifier[isUpdate] operator[SEP] Keyword[throws] identifier[ShortBufferException] , identifier[IllegalBlockSizeException] , identifier[BadPadd... |
public <T extends ChronoEntity<T>> T now(Chronology<T> chronology) {
Timezone tz = (this.timezone == null) ? Timezone.ofSystem() : this.timezone;
Attributes attrs = new Attributes.Builder().setTimezone(tz.getID()).build();
T result = chronology.createFrom(this.timeSource, attrs);
if (r... | class class_name[name] begin[{]
method[now, return_type[type[T]], modifier[public], parameter[chronology]] begin[{]
local_variable[type[Timezone], tz]
local_variable[type[Attributes], attrs]
local_variable[type[T], result]
if[binary_operation[member[.result], ==, literal... | Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[ChronoEntity] operator[<] identifier[T] operator[>] operator[>] identifier[T] identifier[now] operator[SEP] identifier[Chronology] operator[<] identifier[T] operator[>] identifier[chronology] operator[SEP] {
identifier[Timezone] identifier[tz]... |
@UiChild(limit = 1, tagname = "valuebox")
public void setValueBox(ValueBoxBase<T> widget) {
contents.add(widget);
setEditor(widget.asEditor());
} | class class_name[name] begin[{]
method[setValueBox, return_type[void], modifier[public], parameter[widget]] begin[{]
call[contents.add, parameter[member[.widget]]]
call[.setEditor, parameter[call[widget.asEditor, parameter[]]]]
end[}]
END[}] | annotation[@] identifier[UiChild] operator[SEP] identifier[limit] operator[=] Other[1] , identifier[tagname] operator[=] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[setValueBox] operator[SEP] identifier[ValueBoxBase] operator[<] identifier[T] operator[>] identifier[widget] operator[SEP] {
... |
public ObjectValue newInstance(SClassDefinition node,
PDefinition ctorDefinition, ValueList argvals, Context ctxt)
throws AnalysisException
{
if (node instanceof ABusClassDefinition)
{
return newInstance((ABusClassDefinition) node, ctorDefinition, argvals, ctxt);
} else if (node instanceof AClassClassDe... | class class_name[name] begin[{]
method[newInstance, return_type[type[ObjectValue]], modifier[public], parameter[node, ctorDefinition, argvals, ctxt]] begin[{]
if[binary_operation[member[.node], instanceof, type[ABusClassDefinition]]] begin[{]
return[call[.newInstance, parameter[Cast... | Keyword[public] identifier[ObjectValue] identifier[newInstance] operator[SEP] identifier[SClassDefinition] identifier[node] , identifier[PDefinition] identifier[ctorDefinition] , identifier[ValueList] identifier[argvals] , identifier[Context] identifier[ctxt] operator[SEP] Keyword[throws] identifier[AnalysisExceptio... |
public static String toUnicodeString(String s) {
if (Strings.isNullOrEmpty(s)) return "";
int length = s.length();
StringBuilder sbd = new StringBuilder(length * 6);
for (int i=0; i< length; i++) {
char c = s.charAt(i);
int hi = c >>> 8;
int lo = c & 0x0ff;
sbd.append('\\').appen... | class class_name[name] begin[{]
method[toUnicodeString, return_type[type[String]], modifier[public static], parameter[s]] begin[{]
if[call[Strings.isNullOrEmpty, parameter[member[.s]]]] begin[{]
return[literal[""]]
else begin[{]
None
end[}]
local_variable[type[int], leng... | Keyword[public] Keyword[static] identifier[String] identifier[toUnicodeString] operator[SEP] identifier[String] identifier[s] operator[SEP] {
Keyword[if] operator[SEP] identifier[Strings] operator[SEP] identifier[isNullOrEmpty] operator[SEP] identifier[s] operator[SEP] operator[SEP] Keyword[return] literal[Strin... |
@Override
public AbstractMessage copy()
{
ObjectMessageImpl clone = new ObjectMessageImpl();
copyCommonFields(clone);
clone.body = this.body;
return clone;
} | class class_name[name] begin[{]
method[copy, return_type[type[AbstractMessage]], modifier[public], parameter[]] begin[{]
local_variable[type[ObjectMessageImpl], clone]
call[.copyCommonFields, parameter[member[.clone]]]
assign[member[clone.body], THIS[member[None.body]]]
... | annotation[@] identifier[Override] Keyword[public] identifier[AbstractMessage] identifier[copy] operator[SEP] operator[SEP] {
identifier[ObjectMessageImpl] identifier[clone] operator[=] Keyword[new] identifier[ObjectMessageImpl] operator[SEP] operator[SEP] operator[SEP] identifier[copyCommonFields] operator[SEP]... |
public com.google.protobuf.Duration getIdleTimeout() {
return idleTimeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : idleTimeout_;
} | class class_name[name] begin[{]
method[getIdleTimeout, return_type[type[com]], modifier[public], parameter[]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=idleTimeout_, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(... | Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[Duration] identifier[getIdleTimeout] operator[SEP] operator[SEP] {
Keyword[return] identifier[idleTimeout_] operator[==] Other[null] operator[?] identifier[com] operator[SEP] identifier[go... |
@Override
public HTableDescriptor[] disableTables(Pattern pattern) throws IOException {
HTableDescriptor[] tableDescriptors = listTables(pattern);
for (HTableDescriptor descriptor : tableDescriptors) {
disableTable(descriptor.getTableName());
}
return tableDescriptors;
} | class class_name[name] begin[{]
method[disableTables, return_type[type[HTableDescriptor]], modifier[public], parameter[pattern]] begin[{]
local_variable[type[HTableDescriptor], tableDescriptors]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvoca... | annotation[@] identifier[Override] Keyword[public] identifier[HTableDescriptor] operator[SEP] operator[SEP] identifier[disableTables] operator[SEP] identifier[Pattern] identifier[pattern] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[HTableDescriptor] operator[SEP] operator[SEP] identifier[t... |
@Override
public ConfigurationParser get() {
try {
ConfigurationParser parser = parserConstructor.newInstance();
parser.setConfigurationClasses(configurationClasses);
parser.setEnvironment(System.getProperty("com.meltmedia.cadmium.environment"));
return parser;
} catch (Exception e) {
... | class class_name[name] begin[{]
method[get, return_type[type[ConfigurationParser]], modifier[public], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=newInstance, postfix_... | annotation[@] identifier[Override] Keyword[public] identifier[ConfigurationParser] identifier[get] operator[SEP] operator[SEP] {
Keyword[try] {
identifier[ConfigurationParser] identifier[parser] operator[=] identifier[parserConstructor] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP]... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.