code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
@SneakyThrows
private CloseableHttpClient buildHttpClient() {
val plainSocketFactory = PlainConnectionSocketFactory.getSocketFactory();
val registry = RegistryBuilder.<ConnectionSocketFactory>create()
.register("http", plainSocketFactory)
.register("https", this.sslSocketFact... | class class_name[name] begin[{]
method[buildHttpClient, return_type[type[CloseableHttpClient]], modifier[private], parameter[]] begin[{]
local_variable[type[val], plainSocketFactory]
local_variable[type[val], registry]
local_variable[type[val], connectionManager]
call[co... | annotation[@] identifier[SneakyThrows] Keyword[private] identifier[CloseableHttpClient] identifier[buildHttpClient] operator[SEP] operator[SEP] {
identifier[val] identifier[plainSocketFactory] operator[=] identifier[PlainConnectionSocketFactory] operator[SEP] identifier[getSocketFactory] operator[SEP] operator[S... |
public synchronized void onRunning() {
LOG.entering(CLASS_NAME, "onRunning");
if (this.driverStatus == DriverStatus.PRE_INIT) {
this.onInit();
}
this.clientConnection.send(this.getRunningMessage());
this.setStatus(DriverStatus.RUNNING);
LOG.exiting(CLASS_NAME, "onRunning");
} | class class_name[name] begin[{]
method[onRunning, return_type[void], modifier[synchronized public], parameter[]] begin[{]
call[LOG.entering, parameter[member[.CLASS_NAME], literal["onRunning"]]]
if[binary_operation[THIS[member[None.driverStatus]], ==, member[DriverStatus.PRE_INI... | Keyword[public] Keyword[synchronized] Keyword[void] identifier[onRunning] operator[SEP] operator[SEP] {
identifier[LOG] operator[SEP] identifier[entering] operator[SEP] identifier[CLASS_NAME] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[driverSta... |
public static void destroyPageFlowStack( HttpServletRequest request )
{
ServletContext servletContext = InternalUtils.getServletContext( request );
PageFlowStack.get( request, servletContext ).destroy( request );
} | class class_name[name] begin[{]
method[destroyPageFlowStack, return_type[void], modifier[public static], parameter[request]] begin[{]
local_variable[type[ServletContext], servletContext]
call[PageFlowStack.get, parameter[member[.request], member[.servletContext]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[destroyPageFlowStack] operator[SEP] identifier[HttpServletRequest] identifier[request] operator[SEP] {
identifier[ServletContext] identifier[servletContext] operator[=] identifier[InternalUtils] operator[SEP] identifier[getServletContext] operator[SEP] ide... |
public OvhPortability billingAccount_portability_id_GET(String billingAccount, Long id) throws IOException {
String qPath = "/telephony/{billingAccount}/portability/{id}";
StringBuilder sb = path(qPath, billingAccount, id);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, OvhPortabi... | class class_name[name] begin[{]
method[billingAccount_portability_id_GET, return_type[type[OvhPortability]], modifier[public], parameter[billingAccount, id]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilder], sb]
local_variable[type[String], resp]
r... | Keyword[public] identifier[OvhPortability] identifier[billingAccount_portability_id_GET] operator[SEP] identifier[String] identifier[billingAccount] , identifier[Long] identifier[id] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[qPath] operator[=] literal[String] operator... |
public boolean add (int[] values)
{
boolean modified = false;
int vlength = values.length;
for (int i = 0; i < vlength; i++) {
modified = (add(values[i]) || modified);
}
return modified;
} | class class_name[name] begin[{]
method[add, return_type[type[boolean]], modifier[public], parameter[values]] begin[{]
local_variable[type[boolean], modified]
local_variable[type[int], vlength]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assign... | Keyword[public] Keyword[boolean] identifier[add] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[values] operator[SEP] {
Keyword[boolean] identifier[modified] operator[=] literal[boolean] operator[SEP] Keyword[int] identifier[vlength] operator[=] identifier[values] operator[SEP] identifier[leng... |
private static void setConfigurationFromSystemProperties(Configuration configuration,
PropertyKey[] propertyNames) {
for (PropertyKey propertyName : propertyNames) {
setConfigurationFromSystemProperty(configuration, propertyName.toString());
}
} | class class_name[name] begin[{]
method[setConfigurationFromSystemProperties, return_type[void], modifier[private static], parameter[configuration, propertyNames]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference... | Keyword[private] Keyword[static] Keyword[void] identifier[setConfigurationFromSystemProperties] operator[SEP] identifier[Configuration] identifier[configuration] , identifier[PropertyKey] operator[SEP] operator[SEP] identifier[propertyNames] operator[SEP] {
Keyword[for] operator[SEP] identifier[PropertyKey] ide... |
public static SparseMatrix randomSymmetric(int size, double density, Random random) {
return CRSMatrix.randomSymmetric(size, density, random);
} | class class_name[name] begin[{]
method[randomSymmetric, return_type[type[SparseMatrix]], modifier[public static], parameter[size, density, random]] begin[{]
return[call[CRSMatrix.randomSymmetric, parameter[member[.size], member[.density], member[.random]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[SparseMatrix] identifier[randomSymmetric] operator[SEP] Keyword[int] identifier[size] , Keyword[double] identifier[density] , identifier[Random] identifier[random] operator[SEP] {
Keyword[return] identifier[CRSMatrix] operator[SEP] identifier[randomSymmetric] operator... |
protected void intializeCollection(final String annotationType) {
final Field field = getUnderlyingField();
final Object callerArguments = containingObject;
try {
if (field.get(containingObject) == null) {
field.set(callerArguments, field.getType().newInstance());
... | class class_name[name] begin[{]
method[intializeCollection, return_type[void], modifier[protected], parameter[annotationType]] begin[{]
local_variable[type[Field], field]
local_variable[type[Object], callerArguments]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=Met... | Keyword[protected] Keyword[void] identifier[intializeCollection] operator[SEP] Keyword[final] identifier[String] identifier[annotationType] operator[SEP] {
Keyword[final] identifier[Field] identifier[field] operator[=] identifier[getUnderlyingField] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identi... |
private String getFormattedFilter(String searchFilter, String caller, String attribute) {
//Allow %v in addition to %s for string replacement
String filter = searchFilter.replaceAll("%v", "%s");
if (!(filter.startsWith("(") && filter.endsWith(")")) && !filter.isEmpty()) {
filter = "(... | class class_name[name] begin[{]
method[getFormattedFilter, return_type[type[String]], modifier[private], parameter[searchFilter, caller, attribute]] begin[{]
local_variable[type[String], filter]
if[binary_operation[binary_operation[call[filter.startsWith, parameter[literal["("]]], &&, c... | Keyword[private] identifier[String] identifier[getFormattedFilter] operator[SEP] identifier[String] identifier[searchFilter] , identifier[String] identifier[caller] , identifier[String] identifier[attribute] operator[SEP] {
identifier[String] identifier[filter] operator[=] identifier[searchFilter] operator[SEP... |
public boolean equivalent(final String method1,
final ClassReader class1,
final String method2,
final ClassReader class2) {
return getMethodBytecode( method1, class1 ).equals( getMethodBytecode( method2, class2 ) );
} | class class_name[name] begin[{]
method[equivalent, return_type[type[boolean]], modifier[public], parameter[method1, class1, method2, class2]] begin[{]
return[call[.getMethodBytecode, parameter[member[.method1], member[.class1]]]]
end[}]
END[}] | Keyword[public] Keyword[boolean] identifier[equivalent] operator[SEP] Keyword[final] identifier[String] identifier[method1] , Keyword[final] identifier[ClassReader] identifier[class1] , Keyword[final] identifier[String] identifier[method2] , Keyword[final] identifier[ClassReader] identifier[class2] operator[SEP] {
... |
public HttpExecutor getHttpExecutor(BodyType bodyType) {
if (httpClient == null) {
synchronized (HttpExecutorFactory.class) {
if (httpClient == null) {
httpClient = HttpClients.createDefault();
}
}
}
return getHttpExecutor(bodyType, httpClient);
} | class class_name[name] begin[{]
method[getHttpExecutor, return_type[type[HttpExecutor]], modifier[public], parameter[bodyType]] begin[{]
if[binary_operation[member[.httpClient], ==, literal[null]]] begin[{]
SYNCHRONIZED[ClassReference(postfix_operators=[], prefix_operato... | Keyword[public] identifier[HttpExecutor] identifier[getHttpExecutor] operator[SEP] identifier[BodyType] identifier[bodyType] operator[SEP] {
Keyword[if] operator[SEP] identifier[httpClient] operator[==] Other[null] operator[SEP] {
Keyword[synchronized] operator[SEP] identifier[HttpExecutorFactory] ope... |
public static List<ListViewColumn> createDefaultInitialColumnList(View view) {
return createDefaultInitialColumnList(DescriptorVisibilityFilter.apply(view, ListViewColumn.all()));
} | class class_name[name] begin[{]
method[createDefaultInitialColumnList, return_type[type[List]], modifier[public static], parameter[view]] begin[{]
return[call[.createDefaultInitialColumnList, parameter[call[DescriptorVisibilityFilter.apply, parameter[member[.view], call[ListViewColumn.all, parameter[]]... | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[ListViewColumn] operator[>] identifier[createDefaultInitialColumnList] operator[SEP] identifier[View] identifier[view] operator[SEP] {
Keyword[return] identifier[createDefaultInitialColumnList] operator[SEP] identifier[DescriptorVisibilityFi... |
@Override
public boolean removeCalendar(String calendarName, JedisCluster jedis) throws JobPersistenceException {
final String calendarTriggersSetKey = redisSchema.calendarTriggersSetKey(calendarName);
if (jedis.scard(calendarTriggersSetKey) > 0) {
throw new JobPersistenceException(Stri... | class class_name[name] begin[{]
method[removeCalendar, return_type[type[boolean]], modifier[public], parameter[calendarName, jedis]] begin[{]
local_variable[type[String], calendarTriggersSetKey]
if[binary_operation[call[jedis.scard, parameter[member[.calendarTriggersSetKey]]], >, litera... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[removeCalendar] operator[SEP] identifier[String] identifier[calendarName] , identifier[JedisCluster] identifier[jedis] operator[SEP] Keyword[throws] identifier[JobPersistenceException] {
Keyword[final] identifier[String] identifier[c... |
@Override
public Object set(PageContext pc, Collection.Key propertyName, Object value) throws PageException {
Dispatch.put(dispatch, propertyName.getString(), value);
return value;
} | class class_name[name] begin[{]
method[set, return_type[type[Object]], modifier[public], parameter[pc, propertyName, value]] begin[{]
call[Dispatch.put, parameter[member[.dispatch], call[propertyName.getString, parameter[]], member[.value]]]
return[member[.value]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[set] operator[SEP] identifier[PageContext] identifier[pc] , identifier[Collection] operator[SEP] identifier[Key] identifier[propertyName] , identifier[Object] identifier[value] operator[SEP] Keyword[throws] identifier[PageException] {
... |
public void setValue(T value)
{
try
{
lock.writeLock().lock();
this.value = value;
}
finally
{
lock.writeLock().unlock();
}
} | class class_name[name] begin[{]
method[setValue, return_type[void], modifier[public], parameter[value]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=writeLock, postfix_operators=[], prefix_operators=[], qualifier=lock, selectors=[MethodInvocation(arg... | Keyword[public] Keyword[void] identifier[setValue] operator[SEP] identifier[T] identifier[value] operator[SEP] {
Keyword[try] {
identifier[lock] operator[SEP] identifier[writeLock] operator[SEP] operator[SEP] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operat... |
public void setDocuments(FSArray v) {
if (SourceFile_Type.featOkTst && ((SourceFile_Type)jcasType).casFeat_documents == null)
jcasType.jcas.throwFeatMissing("documents", "de.julielab.jules.types.ace.SourceFile");
jcasType.ll_cas.ll_setRefValue(addr, ((SourceFile_Type)jcasType).casFeatCode_documents, jcasT... | class class_name[name] begin[{]
method[setDocuments, return_type[void], modifier[public], parameter[v]] begin[{]
if[binary_operation[member[SourceFile_Type.featOkTst], &&, binary_operation[Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, se... | Keyword[public] Keyword[void] identifier[setDocuments] operator[SEP] identifier[FSArray] identifier[v] operator[SEP] {
Keyword[if] operator[SEP] identifier[SourceFile_Type] operator[SEP] identifier[featOkTst] operator[&&] operator[SEP] operator[SEP] identifier[SourceFile_Type] operator[SEP] identifier[jcasType] ... |
public void setBrand(boolean _brand) {
if (_brand) {
AddResourcesListener.setFontAwesomeVersion(5, this);
}
getStateHelper().put(PropertyKeys.brand, _brand);
} | class class_name[name] begin[{]
method[setBrand, return_type[void], modifier[public], parameter[_brand]] begin[{]
if[member[._brand]] begin[{]
call[AddResourcesListener.setFontAwesomeVersion, parameter[literal[5], THIS[]]]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[void] identifier[setBrand] operator[SEP] Keyword[boolean] identifier[_brand] operator[SEP] {
Keyword[if] operator[SEP] identifier[_brand] operator[SEP] {
identifier[AddResourcesListener] operator[SEP] identifier[setFontAwesomeVersion] operator[SEP] Other[5] , Keyword[this] ope... |
@Override
public Map<String, Object> toSource() {
Map<String, Object> sourceMap = new HashMap<>();
if (accessType != null) {
addFieldToSource(sourceMap, "accessType", accessType);
}
if (clientIp != null) {
addFieldToSource(sourceMap, "clientIp", clientIp);
... | class class_name[name] begin[{]
method[toSource, return_type[type[Map]], modifier[public], parameter[]] begin[{]
local_variable[type[Map], sourceMap]
if[binary_operation[member[.accessType], !=, literal[null]]] begin[{]
call[.addFieldToSource, parameter[member[.s... | annotation[@] identifier[Override] Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[toSource] operator[SEP] operator[SEP] {
identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[sourceMap] operator[=] Keyword[new] id... |
protected NodeTypes with( Collection<JcrNodeType> addedNodeTypes ) {
if (addedNodeTypes.isEmpty()) return this;
Collection<JcrNodeType> nodeTypes = new HashSet<JcrNodeType>(this.nodeTypes.values());
// if there are updated node types, remove them first (hashcode is based on name alone),
... | class class_name[name] begin[{]
method[with, return_type[type[NodeTypes]], modifier[protected], parameter[addedNodeTypes]] begin[{]
if[call[addedNodeTypes.isEmpty, parameter[]]] begin[{]
return[THIS[]]
else begin[{]
None
end[}]
local_variable[type[Collection], nodeTypes]... | Keyword[protected] identifier[NodeTypes] identifier[with] operator[SEP] identifier[Collection] operator[<] identifier[JcrNodeType] operator[>] identifier[addedNodeTypes] operator[SEP] {
Keyword[if] operator[SEP] identifier[addedNodeTypes] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP... |
public boolean add(T item) {
ListNode<T> node = new ListNode<>(item);
synchronized (this.lock) {
if (this.tail == null) {
// List is currently empty.
this.head = node;
} else {
if (item.getSequenceNumber() <= this.tail.item.getSeque... | class class_name[name] begin[{]
method[add, return_type[type[boolean]], modifier[public], parameter[item]] begin[{]
local_variable[type[ListNode], node]
SYNCHRONIZED[THIS[member[None.lock]]] BEGIN[{]
if[binary_operation[THIS[member[None.tail]], ==, literal[null]]... | Keyword[public] Keyword[boolean] identifier[add] operator[SEP] identifier[T] identifier[item] operator[SEP] {
identifier[ListNode] operator[<] identifier[T] operator[>] identifier[node] operator[=] Keyword[new] identifier[ListNode] operator[<] operator[>] operator[SEP] identifier[item] operator[SEP] operator[SEP... |
public String getTitle() {
PdfString title = (PdfString)get(PdfName.TITLE);
return title.toString();
} | class class_name[name] begin[{]
method[getTitle, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[PdfString], title]
return[call[title.toString, parameter[]]]
end[}]
END[}] | Keyword[public] identifier[String] identifier[getTitle] operator[SEP] operator[SEP] {
identifier[PdfString] identifier[title] operator[=] operator[SEP] identifier[PdfString] operator[SEP] identifier[get] operator[SEP] identifier[PdfName] operator[SEP] identifier[TITLE] operator[SEP] operator[SEP] Keyword[return]... |
private Set<Tuple> getBinaryTupledSet() {
List<byte[]> membersWithScores = client.getBinaryMultiBulkReply();
Set<Tuple> set = new LinkedHashSet<Tuple>();
if (membersWithScores == null) {
return set;
}
Iterator<byte[]> iterator = membersWithScores.iterator();
... | class class_name[name] begin[{]
method[getBinaryTupledSet, return_type[type[Set]], modifier[private], parameter[]] begin[{]
local_variable[type[List], membersWithScores]
local_variable[type[Set], set]
if[binary_operation[member[.membersWithScores], ==, literal[null]]] begin[{]
... | Keyword[private] identifier[Set] operator[<] identifier[Tuple] operator[>] identifier[getBinaryTupledSet] operator[SEP] operator[SEP] {
identifier[List] operator[<] Keyword[byte] operator[SEP] operator[SEP] operator[>] identifier[membersWithScores] operator[=] identifier[client] operator[SEP] identifier[getBinar... |
@Override
public Object convertRequest(ServiceRequestContext ctx, AggregatedHttpMessage request,
Class<?> expectedResultType) throws Exception {
final String path = getPath(ctx);
final Optional<Iterable<String>> jsonPaths = getJsonPaths(ctx);
if (jsonPaths.is... | class class_name[name] begin[{]
method[convertRequest, return_type[type[Object]], modifier[public], parameter[ctx, request, expectedResultType]] begin[{]
local_variable[type[String], path]
local_variable[type[Optional], jsonPaths]
if[call[jsonPaths.isPresent, parameter[]]] begin... | annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[convertRequest] operator[SEP] identifier[ServiceRequestContext] identifier[ctx] , identifier[AggregatedHttpMessage] identifier[request] , identifier[Class] operator[<] operator[?] operator[>] identifier[expectedResultType] operator[SEP] ... |
public static boolean checkCriticalValue(double score, int n, int k, boolean is_twoTailed, double aLevel) {
/*
if(n<=200 && k<=20) {
//Calculate it from tables
//http://www3.nd.edu/~wevans1/econ30331/Durbin_Watson_tables.pdf
}
*/
//Follows normal ... | class class_name[name] begin[{]
method[checkCriticalValue, return_type[type[boolean]], modifier[public static], parameter[score, n, k, is_twoTailed, aLevel]] begin[{]
local_variable[type[double], z]
local_variable[type[double], probability]
local_variable[type[boolean], rejectH0]
... | Keyword[public] Keyword[static] Keyword[boolean] identifier[checkCriticalValue] operator[SEP] Keyword[double] identifier[score] , Keyword[int] identifier[n] , Keyword[int] identifier[k] , Keyword[boolean] identifier[is_twoTailed] , Keyword[double] identifier[aLevel] operator[SEP] {
Keyword[double] identifier... |
@Nullable
Optional<String> writeFunctionCounter(FunctionCounter counter) {
double count = counter.count();
if (Double.isFinite(count) && count > 0) {
// can't use "count" field because sum is required whenever count is set.
return Optional.of(write(counter.getId(), "functionC... | class class_name[name] begin[{]
method[writeFunctionCounter, return_type[type[Optional]], modifier[default], parameter[counter]] begin[{]
local_variable[type[double], count]
if[binary_operation[call[Double.isFinite, parameter[member[.count]]], &&, binary_operation[member[.count], >, lit... | annotation[@] identifier[Nullable] identifier[Optional] operator[<] identifier[String] operator[>] identifier[writeFunctionCounter] operator[SEP] identifier[FunctionCounter] identifier[counter] operator[SEP] {
Keyword[double] identifier[count] operator[=] identifier[counter] operator[SEP] identifier[count] opera... |
private Map<String, String> extractVariables(final String variablesBody) {
final Map<String, String> map = new HashMap<String, String>();
final Matcher m = PATTERN_VARIABLES_BODY.matcher(variablesBody);
LOG.debug("parsing variables body");
while (m.find()) {
final String key = m.group(1);
... | class class_name[name] begin[{]
method[extractVariables, return_type[type[Map]], modifier[private], parameter[variablesBody]] begin[{]
local_variable[type[Map], map]
local_variable[type[Matcher], m]
call[LOG.debug, parameter[literal["parsing variables body"]]]
wh... | Keyword[private] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[extractVariables] operator[SEP] Keyword[final] identifier[String] identifier[variablesBody] operator[SEP] {
Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] ... |
public void setFileViewSettings(CmsObject cms, CmsRfsFileViewer fileViewSettings) throws CmsRoleViolationException {
if (OpenCms.getRunLevel() > OpenCms.RUNLEVEL_2_INITIALIZING) {
OpenCms.getRoleManager().checkRole(cms, CmsRole.ROOT_ADMIN);
}
m_fileViewSettings = fileViewSettings;
... | class class_name[name] begin[{]
method[setFileViewSettings, return_type[void], modifier[public], parameter[cms, fileViewSettings]] begin[{]
if[binary_operation[call[OpenCms.getRunLevel, parameter[]], >, member[OpenCms.RUNLEVEL_2_INITIALIZING]]] begin[{]
call[OpenCms.getR... | Keyword[public] Keyword[void] identifier[setFileViewSettings] operator[SEP] identifier[CmsObject] identifier[cms] , identifier[CmsRfsFileViewer] identifier[fileViewSettings] operator[SEP] Keyword[throws] identifier[CmsRoleViolationException] {
Keyword[if] operator[SEP] identifier[OpenCms] operator[SEP] identifi... |
@Override
public void start(Future<Void> startFuture) throws Exception {
CountDownLatch latch = new CountDownLatch(servers.size());
final boolean[] inError = {false};
for (Server server : servers) {
server.bind(ar -> {
if (ar.failed()) {
inErro... | class class_name[name] begin[{]
method[start, return_type[void], modifier[public], parameter[startFuture]] begin[{]
local_variable[type[CountDownLatch], latch]
local_variable[type[boolean], inError]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[start] operator[SEP] identifier[Future] operator[<] identifier[Void] operator[>] identifier[startFuture] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[CountDownLatch] identifier[latch] operator[=] Keyword[new] identifi... |
public void setHeartBeatInterval(long heartBeatInterval) {
if (heartBeatInterval < 100)
return;
if(logger.isLoggingEnabled(StackLogger.TRACE_DEBUG)) {
logger.logDebug("Setting HeartBeatInterval from " + this.heartBeatInterval + " to " + heartBeatInterval);
}
this.heartBeatInterval = heartBeatInterva... | class class_name[name] begin[{]
method[setHeartBeatInterval, return_type[void], modifier[public], parameter[heartBeatInterval]] begin[{]
if[binary_operation[member[.heartBeatInterval], <, literal[100]]] begin[{]
return[None]
else begin[{]
None
end[}]
if[call[logg... | Keyword[public] Keyword[void] identifier[setHeartBeatInterval] operator[SEP] Keyword[long] identifier[heartBeatInterval] operator[SEP] {
Keyword[if] operator[SEP] identifier[heartBeatInterval] operator[<] Other[100] operator[SEP] Keyword[return] operator[SEP] Keyword[if] operator[SEP] identifier[logger] operator... |
public static boolean isAlive(String pid) {
ShellCommandExecutor shexec = null;
try {
String[] args = { "kill", "-0", pid };
shexec = new ShellCommandExecutor(args);
shexec.execute();
} catch (ExitCodeException ee) {
return false;
} catch (IOException ioe) {
LOG.warn("Error... | class class_name[name] begin[{]
method[isAlive, return_type[type[boolean]], modifier[public static], parameter[pid]] begin[{]
local_variable[type[ShellCommandExecutor], shexec]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initialize... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isAlive] operator[SEP] identifier[String] identifier[pid] operator[SEP] {
identifier[ShellCommandExecutor] identifier[shexec] operator[=] Other[null] operator[SEP] Keyword[try] {
identifier[String] operator[SEP] operator[SEP] identifier[args]... |
public void run(final SocialGraph graph) {
final Transaction transaction = graph.beginTx();
if (this.execute(graph)) {
transaction.success();
}
transaction.finish();
this.servlet.finish();
} | class class_name[name] begin[{]
method[run, return_type[void], modifier[public], parameter[graph]] begin[{]
local_variable[type[Transaction], transaction]
if[THIS[call[None.execute, parameter[member[.graph]]]]] begin[{]
call[transaction.success, parameter[]]
... | Keyword[public] Keyword[void] identifier[run] operator[SEP] Keyword[final] identifier[SocialGraph] identifier[graph] operator[SEP] {
Keyword[final] identifier[Transaction] identifier[transaction] operator[=] identifier[graph] operator[SEP] identifier[beginTx] operator[SEP] operator[SEP] operator[SEP] Keyword[if]... |
public java.util.List<String> getAppIds() {
if (appIds == null) {
appIds = new com.amazonaws.internal.SdkInternalList<String>();
}
return appIds;
} | class class_name[name] begin[{]
method[getAppIds, return_type[type[java]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.appIds], ==, literal[null]]] begin[{]
assign[member[.appIds], ClassCreator(arguments=[], body=None, constructor_type_arguments=N... | Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[getAppIds] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[appIds] operator[==] Other[null] operator[SEP] {
identifier[appIds] operato... |
@Override
public void close() throws IOException {
if (this.stream != null) {
this.stream.write(this.buffer, 0, this.pos);
}
// close file stream
super.close();
} | class class_name[name] begin[{]
method[close, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[THIS[member[None.stream]], !=, literal[null]]] begin[{]
THIS[member[None.stream]call[None.write, parameter[THIS[member[None.buffer]], literal[0], ... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[stream] operator[!=] Other[null] operator[SEP] {
Keyword[this] operator[SEP] identif... |
@Override
public ListNotebookInstancesResult listNotebookInstances(ListNotebookInstancesRequest request) {
request = beforeClientExecution(request);
return executeListNotebookInstances(request);
} | class class_name[name] begin[{]
method[listNotebookInstances, return_type[type[ListNotebookInstancesResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeListNotebookInstances, par... | annotation[@] identifier[Override] Keyword[public] identifier[ListNotebookInstancesResult] identifier[listNotebookInstances] operator[SEP] identifier[ListNotebookInstancesRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[reques... |
public void marshall(GetSubscriptionDefinitionVersionRequest getSubscriptionDefinitionVersionRequest, ProtocolMarshaller protocolMarshaller) {
if (getSubscriptionDefinitionVersionRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[getSubscriptionDefinitionVersionRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.getSubscriptionDefinitionVersionRequest], ==, literal[null]]] begin[{]
ThrowStatement(ex... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[GetSubscriptionDefinitionVersionRequest] identifier[getSubscriptionDefinitionVersionRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[getSubscriptionDefinitionV... |
private void setCorsHeader(HttpServletRequest pReq, HttpServletResponse pResp) {
String origin = requestHandler.extractCorsOrigin(pReq.getHeader("Origin"));
if (origin != null) {
pResp.setHeader("Access-Control-Allow-Origin", origin);
pResp.setHeader("Access-Control-Allow-Credent... | class class_name[name] begin[{]
method[setCorsHeader, return_type[void], modifier[private], parameter[pReq, pResp]] begin[{]
local_variable[type[String], origin]
if[binary_operation[member[.origin], !=, literal[null]]] begin[{]
call[pResp.setHeader, parameter[lit... | Keyword[private] Keyword[void] identifier[setCorsHeader] operator[SEP] identifier[HttpServletRequest] identifier[pReq] , identifier[HttpServletResponse] identifier[pResp] operator[SEP] {
identifier[String] identifier[origin] operator[=] identifier[requestHandler] operator[SEP] identifier[extractCorsOrigin] oper... |
@SuppressWarnings("unchecked")
@Override
protected String getReadOnlyValue(final AbstractUIField _abstractUIField)
throws EFapsException
{
String strValue = "";
if (_abstractUIField.getValue().getDbValue() != null) {
final Object valueObj = _abstractUIField.getValue().get... | class class_name[name] begin[{]
method[getReadOnlyValue, return_type[type[String]], modifier[protected], parameter[_abstractUIField]] begin[{]
local_variable[type[String], strValue]
if[binary_operation[call[_abstractUIField.getValue, parameter[]], !=, literal[null]]] begin[{]
... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[protected] identifier[String] identifier[getReadOnlyValue] operator[SEP] Keyword[final] identifier[AbstractUIField] identifier[_abstractUIField] operator[SEP] Keyword[throws] identifier[EFap... |
@Override
public final UsedMaterialLine process(
final Map<String, Object> pAddParam,
final UsedMaterialLine pEntity,
final IRequestData pRequestData) throws Exception {
if (pEntity.getIsNew()) {
if (pEntity.getItsQuantity().doubleValue() <= 0
&& pEntity.getReversedId() == null) {... | class class_name[name] begin[{]
method[process, return_type[type[UsedMaterialLine]], modifier[final public], parameter[pAddParam, pEntity, pRequestData]] begin[{]
if[call[pEntity.getIsNew, parameter[]]] begin[{]
if[binary_operation[binary_operation[call[pEntity.getItsQua... | annotation[@] identifier[Override] Keyword[public] Keyword[final] identifier[UsedMaterialLine] identifier[process] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[pAddParam] , Keyword[final] identifier[UsedMaterialLine] identifier[pEntity] , Key... |
private void populateOperators() {
operators = new HashMap();
registerContentOperator("q", new PushGraphicsState());
registerContentOperator("Q", new PopGraphicsState());
registerContentOperator("cm", new ModifyCurrentTransformationMatrix());
registerContentOperator("gs", new ProcessGraphicsStateResour... | class class_name[name] begin[{]
method[populateOperators, return_type[void], modifier[private], parameter[]] begin[{]
assign[member[.operators], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=R... | Keyword[private] Keyword[void] identifier[populateOperators] operator[SEP] operator[SEP] {
identifier[operators] operator[=] Keyword[new] identifier[HashMap] operator[SEP] operator[SEP] operator[SEP] identifier[registerContentOperator] operator[SEP] literal[String] , Keyword[new] identifier[PushGraphicsState] o... |
private void checkEs6ConstructorInvocationVisibility(Node target) {
FunctionType ctorType = target.getJSType().toMaybeFunctionType();
ObjectType prototypeType = ctorType.getPrototype();
// We use the class definition site because classes automatically get a implicit constructor,
// so there may not be ... | class class_name[name] begin[{]
method[checkEs6ConstructorInvocationVisibility, return_type[void], modifier[private], parameter[target]] begin[{]
local_variable[type[FunctionType], ctorType]
local_variable[type[ObjectType], prototypeType]
local_variable[type[Node], classDefinition]
... | Keyword[private] Keyword[void] identifier[checkEs6ConstructorInvocationVisibility] operator[SEP] identifier[Node] identifier[target] operator[SEP] {
identifier[FunctionType] identifier[ctorType] operator[=] identifier[target] operator[SEP] identifier[getJSType] operator[SEP] operator[SEP] operator[SEP] identifie... |
@Nonnegative
public static int readFully (@Nonnull final InputStream aIS, @Nonnull final byte [] aBuffer) throws IOException
{
return readFully (aIS, aBuffer, 0, aBuffer.length);
} | class class_name[name] begin[{]
method[readFully, return_type[type[int]], modifier[public static], parameter[aIS, aBuffer]] begin[{]
return[call[.readFully, parameter[member[.aIS], member[.aBuffer], literal[0], member[aBuffer.length]]]]
end[}]
END[}] | annotation[@] identifier[Nonnegative] Keyword[public] Keyword[static] Keyword[int] identifier[readFully] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[InputStream] identifier[aIS] , annotation[@] identifier[Nonnull] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[aBuffer... |
public static FloatMatrix symmetricGeneralizedEigenvalues(FloatMatrix A, FloatMatrix B) {
A.assertSquare();
B.assertSquare();
FloatMatrix W = new FloatMatrix(A.rows);
SimpleBlas.sygvd(1, 'N', 'U', A.dup(), B.dup(), W);
return W;
} | class class_name[name] begin[{]
method[symmetricGeneralizedEigenvalues, return_type[type[FloatMatrix]], modifier[public static], parameter[A, B]] begin[{]
call[A.assertSquare, parameter[]]
call[B.assertSquare, parameter[]]
local_variable[type[FloatMatrix], W]
... | Keyword[public] Keyword[static] identifier[FloatMatrix] identifier[symmetricGeneralizedEigenvalues] operator[SEP] identifier[FloatMatrix] identifier[A] , identifier[FloatMatrix] identifier[B] operator[SEP] {
identifier[A] operator[SEP] identifier[assertSquare] operator[SEP] operator[SEP] operator[SEP] identifie... |
public Observable<JobInner> createAsync(String resourceGroupName, String automationAccountName, UUID jobId, JobCreateParameters parameters) {
return createWithServiceResponseAsync(resourceGroupName, automationAccountName, jobId, parameters).map(new Func1<ServiceResponse<JobInner>, JobInner>() {
@Ove... | class class_name[name] begin[{]
method[createAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, automationAccountName, jobId, parameters]] begin[{]
return[call[.createWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.automationAccountName], member... | Keyword[public] identifier[Observable] operator[<] identifier[JobInner] operator[>] identifier[createAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[automationAccountName] , identifier[UUID] identifier[jobId] , identifier[JobCreateParameters] identifier[parameter... |
@Override
public void write(byte[] b) throws IOException {
if (b.length == 0)
return;
fos().write(b);
currFileBytesWritten += b.length;
totalBytesWritten += b.length;
} | class class_name[name] begin[{]
method[write, return_type[void], modifier[public], parameter[b]] begin[{]
if[binary_operation[member[b.length], ==, literal[0]]] begin[{]
return[None]
else begin[{]
None
end[}]
call[.fos, parameter[]]
assign[member[... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[write] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[b] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[b] operator[SEP] identifier[length] operator[==] Other[0] operator[... |
public final Date getTime(final Date start) {
final Calendar cal;
if (start instanceof net.fortuna.ical4j.model.Date) {
cal = Dates.getCalendarInstance((net.fortuna.ical4j.model.Date)start);
} else {
cal = Calendar.getInstance();
}
cal.setTime(start);
... | class class_name[name] begin[{]
method[getTime, return_type[type[Date]], modifier[final public], parameter[start]] begin[{]
local_variable[type[Calendar], cal]
if[binary_operation[member[.start], instanceof, type[net]]] begin[{]
assign[member[.cal], call[Dates.ge... | Keyword[public] Keyword[final] identifier[Date] identifier[getTime] operator[SEP] Keyword[final] identifier[Date] identifier[start] operator[SEP] {
Keyword[final] identifier[Calendar] identifier[cal] operator[SEP] Keyword[if] operator[SEP] identifier[start] Keyword[instanceof] identifier[net] operator[SEP] ident... |
@Override
public void execute() throws BuildException {
if (skip) {
return;
}
if (source == null) {
log("source attribute is required but was not set");
return;
}
// attempt to parse the url
URL sourceURL;
try {
... | class class_name[name] begin[{]
method[execute, return_type[void], modifier[public], parameter[]] begin[{]
if[member[.skip]] begin[{]
return[None]
else begin[{]
None
end[}]
if[binary_operation[member[.source], ==, literal[null]]] begin[{]
... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[execute] operator[SEP] operator[SEP] Keyword[throws] identifier[BuildException] {
Keyword[if] operator[SEP] identifier[skip] operator[SEP] {
Keyword[return] operator[SEP]
}
Keyword[if] operator[SEP] identifier[so... |
public SmartHandle permuteWith(SmartHandle target) {
String[] argNames = target.signature().argNames();
return new SmartHandle(this, permuteWith(target.handle(), argNames));
} | class class_name[name] begin[{]
method[permuteWith, return_type[type[SmartHandle]], modifier[public], parameter[target]] begin[{]
local_variable[type[String], argNames]
return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MethodInvocation... | Keyword[public] identifier[SmartHandle] identifier[permuteWith] operator[SEP] identifier[SmartHandle] identifier[target] operator[SEP] {
identifier[String] operator[SEP] operator[SEP] identifier[argNames] operator[=] identifier[target] operator[SEP] identifier[signature] operator[SEP] operator[SEP] operator[SEP]... |
RBBINode cloneTree() {
RBBINode n;
if (fType == RBBINode.varRef) {
// If the current node is a variable reference, skip over it
// and clone the definition of the variable instead.
n = fLeftChild.cloneTree();
} else if (fType == RBBINode.uset) {
... | class class_name[name] begin[{]
method[cloneTree, return_type[type[RBBINode]], modifier[default], parameter[]] begin[{]
local_variable[type[RBBINode], n]
if[binary_operation[member[.fType], ==, member[RBBINode.varRef]]] begin[{]
assign[member[.n], call[fLeftChild... | identifier[RBBINode] identifier[cloneTree] operator[SEP] operator[SEP] {
identifier[RBBINode] identifier[n] operator[SEP] Keyword[if] operator[SEP] identifier[fType] operator[==] identifier[RBBINode] operator[SEP] identifier[varRef] operator[SEP] {
identifier[n] operator[=] identifier[fLeftChild] oper... |
private static String checkTransparentNodata(BufferedImage buffImage,
Node node) throws Exception {
String transparentNodata = "NA";
boolean noData = false;
boolean transparent = true;
int[] bandIndexes = new int[4];
bandIndexes[0] = 3; // A
bandIndexes[1] = 2... | class class_name[name] begin[{]
method[checkTransparentNodata, return_type[type[String]], modifier[private static], parameter[buffImage, node]] begin[{]
local_variable[type[String], transparentNodata]
local_variable[type[boolean], noData]
local_variable[type[boolean], transparent]
... | Keyword[private] Keyword[static] identifier[String] identifier[checkTransparentNodata] operator[SEP] identifier[BufferedImage] identifier[buffImage] , identifier[Node] identifier[node] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[String] identifier[transparentNodata] operator[=] literal[Stri... |
protected KafkaQueueFactory<T, ID, DATA> setDefaultKafkaClient(KafkaClient kafkaClient,
boolean setMyOwnKafkaClient) {
if (this.defaultKafkaClient != null && myOwnKafkaClient) {
this.defaultKafkaClient.destroy();
}
this.defaultKafkaClient = kafkaClient;
myOwnKafka... | class class_name[name] begin[{]
method[setDefaultKafkaClient, return_type[type[KafkaQueueFactory]], modifier[protected], parameter[kafkaClient, setMyOwnKafkaClient]] begin[{]
if[binary_operation[binary_operation[THIS[member[None.defaultKafkaClient]], !=, literal[null]], &&, member[.myOwnKafkaCl... | Keyword[protected] identifier[KafkaQueueFactory] operator[<] identifier[T] , identifier[ID] , identifier[DATA] operator[>] identifier[setDefaultKafkaClient] operator[SEP] identifier[KafkaClient] identifier[kafkaClient] , Keyword[boolean] identifier[setMyOwnKafkaClient] operator[SEP] {
Keyword[if] operator[SEP... |
void saveAction() {
Map<Object, Object> filters = getFilters();
m_table.clearFilters();
try {
m_model.save();
disableSaveButtons();
} catch (CmsException e) {
LOG.error(m_messages.key(Messages.ERR_SAVING_CHANGES_0), e);
CmsErrorDialog.s... | class class_name[name] begin[{]
method[saveAction, return_type[void], modifier[default], parameter[]] begin[{]
local_variable[type[Map], filters]
call[m_table.clearFilters, parameter[]]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=save... | Keyword[void] identifier[saveAction] operator[SEP] operator[SEP] {
identifier[Map] operator[<] identifier[Object] , identifier[Object] operator[>] identifier[filters] operator[=] identifier[getFilters] operator[SEP] operator[SEP] operator[SEP] identifier[m_table] operator[SEP] identifier[clearFilters] operator[... |
@Override
public void setProperty(JMeterProperty property) {
if (property instanceof StringProperty) {
final String pn = property.getName();
if (pn.equals("exportMode")) {
final Object objectValue = property.getObjectValue();
try {
... | class class_name[name] begin[{]
method[setProperty, return_type[void], modifier[public], parameter[property]] begin[{]
if[binary_operation[member[.property], instanceof, type[StringProperty]]] begin[{]
local_variable[type[String], pn]
if[call[pn.equals, param... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setProperty] operator[SEP] identifier[JMeterProperty] identifier[property] operator[SEP] {
Keyword[if] operator[SEP] identifier[property] Keyword[instanceof] identifier[StringProperty] operator[SEP] {
Keyword[final] identifier... |
public static PrivateKey readPrivateKey(final byte[] privateKeyBytes)
throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchProviderException
{
return readPrivateKey(privateKeyBytes, KeyPairGeneratorAlgorithm.RSA.getAlgorithm());
} | class class_name[name] begin[{]
method[readPrivateKey, return_type[type[PrivateKey]], modifier[public static], parameter[privateKeyBytes]] begin[{]
return[call[.readPrivateKey, parameter[member[.privateKeyBytes], call[KeyPairGeneratorAlgorithm.RSA.getAlgorithm, parameter[]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[PrivateKey] identifier[readPrivateKey] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[privateKeyBytes] operator[SEP] Keyword[throws] identifier[NoSuchAlgorithmException] , identifier[InvalidKeySpecException] , identifier[NoSuchProviderExcep... |
public void init(Record record, BaseRecordMessageFilter recordMessageFilter, boolean bCloseOnFree)
{
super.init(record, recordMessageFilter, bCloseOnFree);
// Should work in the server, if created on the server (but don't replicate down to the server)
this.updateListener(null); // Stop list... | class class_name[name] begin[{]
method[init, return_type[void], modifier[public], parameter[record, recordMessageFilter, bCloseOnFree]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=record, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(... | Keyword[public] Keyword[void] identifier[init] operator[SEP] identifier[Record] identifier[record] , identifier[BaseRecordMessageFilter] identifier[recordMessageFilter] , Keyword[boolean] identifier[bCloseOnFree] operator[SEP] {
Keyword[super] operator[SEP] identifier[init] operator[SEP] identifier[record] , ... |
public Set<ElementDescriptor<?>> getProperties()
{
return mProp == null ? null : Collections.unmodifiableSet(mProp.keySet());
} | class class_name[name] begin[{]
method[getProperties, return_type[type[Set]], modifier[public], parameter[]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=mProp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_... | Keyword[public] identifier[Set] operator[<] identifier[ElementDescriptor] operator[<] operator[?] operator[>] operator[>] identifier[getProperties] operator[SEP] operator[SEP] {
Keyword[return] identifier[mProp] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[Collections] operator[SEP] i... |
public @NotNull MediaArgs dragDropSupport(DragDropSupport value) {
if (value == null) {
throw new IllegalArgumentException("No null value allowed for drag&drop support.");
}
this.dragDropSupport = value;
return this;
} | class class_name[name] begin[{]
method[dragDropSupport, return_type[type[MediaArgs]], modifier[public], parameter[value]] begin[{]
if[binary_operation[member[.value], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_... | Keyword[public] annotation[@] identifier[NotNull] identifier[MediaArgs] identifier[dragDropSupport] operator[SEP] identifier[DragDropSupport] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[Il... |
@Override
public void connect() {
try {
// Create MQTT client config
final MqttClientConfig config = new MqttClientConfig();
String uri = url;
if (uri.indexOf(':') == -1) {
uri = uri + ":1883";
}
uri = uri.replace("mqtt://", "tcp://");
if (url.indexOf("://") == -1) {
uri = "... | class class_name[name] begin[{]
method[connect, return_type[void], modifier[public], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postf... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[connect] operator[SEP] operator[SEP] {
Keyword[try] {
Keyword[final] identifier[MqttClientConfig] identifier[config] operator[=] Keyword[new] identifier[MqttClientConfig] operator[SEP] operator[SEP] operator[SEP] identifier[St... |
public static String createSign(Map<String, String> params, String partnerKey) {
// 生成签名前先去除sign
params.remove("sign");
String stringA = packageSign(params, false);
String stringSignTemp = stringA + "&key=" + partnerKey;
return HashKit.md5(stringSignTemp).toUpperCase();
} | class class_name[name] begin[{]
method[createSign, return_type[type[String]], modifier[public static], parameter[params, partnerKey]] begin[{]
call[params.remove, parameter[literal["sign"]]]
local_variable[type[String], stringA]
local_variable[type[String], stringSignTemp]
... | Keyword[public] Keyword[static] identifier[String] identifier[createSign] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[params] , identifier[String] identifier[partnerKey] operator[SEP] {
identifier[params] operator[SEP] identifier[remove] operator[SEP... |
private void clean(String theParamName, List<List<IQueryParameterType>> theAndOrParams) {
for (int andListIdx = 0; andListIdx < theAndOrParams.size(); andListIdx++) {
List<? extends IQueryParameterType> nextOrList = theAndOrParams.get(andListIdx);
for (int orListIdx = 0; orListIdx < nextOrList.size(); orListId... | class class_name[name] begin[{]
method[clean, return_type[void], modifier[private], parameter[theParamName, theAndOrParams]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvoca... | Keyword[private] Keyword[void] identifier[clean] operator[SEP] identifier[String] identifier[theParamName] , identifier[List] operator[<] identifier[List] operator[<] identifier[IQueryParameterType] operator[>] operator[>] identifier[theAndOrParams] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identi... |
public static void print(final Object obj)
{
System.out.println(getInstance(obj.getClass()).serialise(obj));
} | class class_name[name] begin[{]
method[print, return_type[void], modifier[public static], parameter[obj]] begin[{]
call[System.out.println, parameter[call[.getInstance, parameter[call[obj.getClass, parameter[]]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[print] operator[SEP] Keyword[final] identifier[Object] identifier[obj] operator[SEP] {
identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[getInstance] operator[SEP] identifier[obj] operator[SEP] iden... |
public void setDATAPOS(Integer newDATAPOS) {
Integer oldDATAPOS = datapos;
datapos = newDATAPOS;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.TILE_TOCRG__DATAPOS, oldDATAPOS, datapos));
} | class class_name[name] begin[{]
method[setDATAPOS, return_type[void], modifier[public], parameter[newDATAPOS]] begin[{]
local_variable[type[Integer], oldDATAPOS]
assign[member[.datapos], member[.newDATAPOS]]
if[call[.eNotificationRequired, parameter[]]] begin[{]
... | Keyword[public] Keyword[void] identifier[setDATAPOS] operator[SEP] identifier[Integer] identifier[newDATAPOS] operator[SEP] {
identifier[Integer] identifier[oldDATAPOS] operator[=] identifier[datapos] operator[SEP] identifier[datapos] operator[=] identifier[newDATAPOS] operator[SEP] Keyword[if] operator[SEP] ide... |
public List<String> toList ()
{
ComparableArrayList<String> list = new ComparableArrayList<String>();
list.addAll(_imports);
list.sort();
return list;
} | class class_name[name] begin[{]
method[toList, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[ComparableArrayList], list]
call[list.addAll, parameter[member[._imports]]]
call[list.sort, parameter[]]
return[member[.list]]
... | Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[toList] operator[SEP] operator[SEP] {
identifier[ComparableArrayList] operator[<] identifier[String] operator[>] identifier[list] operator[=] Keyword[new] identifier[ComparableArrayList] operator[<] identifier[String] operator... |
private CmsSearch getSearchBean(Map<String, String> params) {
if (m_searchBean == null) {
m_searchBean = new CmsSearch();
m_searchBean.init(getWp().getCms());
m_searchBean.setParameters(getSearchParameters(params));
if (CmsStringUtil.isEmptyOrWhitespaceOnly(m_sea... | class class_name[name] begin[{]
method[getSearchBean, return_type[type[CmsSearch]], modifier[private], parameter[params]] begin[{]
if[binary_operation[member[.m_searchBean], ==, literal[null]]] begin[{]
assign[member[.m_searchBean], ClassCreator(arguments=[], body=None, ... | Keyword[private] identifier[CmsSearch] identifier[getSearchBean] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[params] operator[SEP] {
Keyword[if] operator[SEP] identifier[m_searchBean] operator[==] Other[null] operator[SEP] {
identifier[m_se... |
void composeTemplates(ElemTemplateElement templ) throws TransformerException
{
templ.compose(this);
for (ElemTemplateElement child = templ.getFirstChildElem();
child != null; child = child.getNextSiblingElem())
{
composeTemplates(child);
}
templ.endCompose(this);
} | class class_name[name] begin[{]
method[composeTemplates, return_type[void], modifier[default], parameter[templ]] begin[{]
call[templ.compose, parameter[THIS[]]]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberRefe... | Keyword[void] identifier[composeTemplates] operator[SEP] identifier[ElemTemplateElement] identifier[templ] operator[SEP] Keyword[throws] identifier[TransformerException] {
identifier[templ] operator[SEP] identifier[compose] operator[SEP] Keyword[this] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identi... |
@Override
public void setCenter(Point3D center) {
this.cxProperty.set(center.getX());
this.cyProperty.set(center.getY());
this.czProperty.set(center.getZ());
} | class class_name[name] begin[{]
method[setCenter, return_type[void], modifier[public], parameter[center]] begin[{]
THIS[member[None.cxProperty]call[None.set, parameter[call[center.getX, parameter[]]]]]
THIS[member[None.cyProperty]call[None.set, parameter[call[center.getY, parame... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setCenter] operator[SEP] identifier[Point3D] identifier[center] operator[SEP] {
Keyword[this] operator[SEP] identifier[cxProperty] operator[SEP] identifier[set] operator[SEP] identifier[center] operator[SEP] identifier[getX] operator[SEP... |
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID)
{
case SimpleExpressionsPackage.NOT_EXPRESSION__EXPRESSION:
return getExpression();
}
return super.eGet(featureID, resolve, coreType);
} | class class_name[name] begin[{]
method[eGet, return_type[type[Object]], modifier[public], parameter[featureID, resolve, coreType]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=NOT_EXPRESSION__EXPRESSION, postfix_operators=[], prefix_operators=[], qualifier=SimpleExpr... | annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[eGet] operator[SEP] Keyword[int] identifier[featureID] , Keyword[boolean] identifier[resolve] , Keyword[boolean] identifier[coreType] operator[SEP] {
Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] {
K... |
public String getTextAt(final int row, final int column) {
final Object value = getValueAt(row, column);
String text = "";
if (value != null) {
final TableCellRenderer renderer = getCellRenderer(row, column);
final Component rendererComponent = renderer.getTableCellRendererComponent(this, value,
... | class class_name[name] begin[{]
method[getTextAt, return_type[type[String]], modifier[public], parameter[row, column]] begin[{]
local_variable[type[Object], value]
local_variable[type[String], text]
if[binary_operation[member[.value], !=, literal[null]]] begin[{]
loc... | Keyword[public] identifier[String] identifier[getTextAt] operator[SEP] Keyword[final] Keyword[int] identifier[row] , Keyword[final] Keyword[int] identifier[column] operator[SEP] {
Keyword[final] identifier[Object] identifier[value] operator[=] identifier[getValueAt] operator[SEP] identifier[row] , identifier[c... |
public String getSummaryRow(final File directory) {
StringBuilder builder = new StringBuilder();
Counts counts = getSummary();
builder.append("<tr bgcolor=\"");
builder.append(color(counts));
builder.append("\"><th style=\"text-align: left\">");
builder.append(directory.getName());
builder.append("</th><... | class class_name[name] begin[{]
method[getSummaryRow, return_type[type[String]], modifier[public], parameter[directory]] begin[{]
local_variable[type[StringBuilder], builder]
local_variable[type[Counts], counts]
call[builder.append, parameter[literal["<tr bgcolor=\""]]]
... | Keyword[public] identifier[String] identifier[getSummaryRow] operator[SEP] Keyword[final] identifier[File] identifier[directory] operator[SEP] {
identifier[StringBuilder] identifier[builder] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[Counts] identifier... |
@Nullable
public static BigDecimal parseCurrencyFormat (@Nullable final ECurrency eCurrency,
@Nullable final String sTextValue,
@Nullable final BigDecimal aDefault)
{
final PerCurrencySettings aPCS = getSettings (eCu... | class class_name[name] begin[{]
method[parseCurrencyFormat, return_type[type[BigDecimal]], modifier[public static], parameter[eCurrency, sTextValue, aDefault]] begin[{]
local_variable[type[PerCurrencySettings], aPCS]
local_variable[type[DecimalFormat], aCurrencyFormat]
local_variable[ty... | annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[BigDecimal] identifier[parseCurrencyFormat] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[ECurrency] identifier[eCurrency] , annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[sTextVa... |
public Identifier getIdentifier(int i) {
return mIdentifiers.size() > i ? mIdentifiers.get(i) : null;
} | class class_name[name] begin[{]
method[getIdentifier, return_type[type[Identifier]], modifier[public], parameter[i]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=mIdentifiers, select... | Keyword[public] identifier[Identifier] identifier[getIdentifier] operator[SEP] Keyword[int] identifier[i] operator[SEP] {
Keyword[return] identifier[mIdentifiers] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] identifier[i] operator[?] identifier[mIdentifiers] operator[SEP] identifier[get... |
public java.util.List<AggregateResourceIdentifier> getUnprocessedResourceIdentifiers() {
if (unprocessedResourceIdentifiers == null) {
unprocessedResourceIdentifiers = new com.amazonaws.internal.SdkInternalList<AggregateResourceIdentifier>();
}
return unprocessedResourceIdentifiers;
... | class class_name[name] begin[{]
method[getUnprocessedResourceIdentifiers, return_type[type[java]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.unprocessedResourceIdentifiers], ==, literal[null]]] begin[{]
assign[member[.unprocessedResourceIdentifi... | Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[AggregateResourceIdentifier] operator[>] identifier[getUnprocessedResourceIdentifiers] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[unprocessedResourceIdentifiers] operator[... |
public static String getLocalFileOwner(String filePath) throws IOException {
PosixFileAttributes attr =
Files.readAttributes(Paths.get(filePath), PosixFileAttributes.class);
return attr.owner().getName();
} | class class_name[name] begin[{]
method[getLocalFileOwner, return_type[type[String]], modifier[public static], parameter[filePath]] begin[{]
local_variable[type[PosixFileAttributes], attr]
return[call[attr.owner, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[getLocalFileOwner] operator[SEP] identifier[String] identifier[filePath] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[PosixFileAttributes] identifier[attr] operator[=] identifier[Files] operator[SEP] identifier[readAttributes] op... |
public void addInclusion(SVar<T> s1, SVar<T> s2) {
this.add(new LtConstraint<SVar<T>,Set<T>>(s1, s2));
} | class class_name[name] begin[{]
method[addInclusion, return_type[void], modifier[public], parameter[s1, s2]] begin[{]
THIS[call[None.add, parameter[ClassCreator(arguments=[MemberReference(member=s1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=s2,... | Keyword[public] Keyword[void] identifier[addInclusion] operator[SEP] identifier[SVar] operator[<] identifier[T] operator[>] identifier[s1] , identifier[SVar] operator[<] identifier[T] operator[>] identifier[s2] operator[SEP] {
Keyword[this] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[LtC... |
public Request listIndexesAsync(@Nullable final RequestOptions requestOptions, @NonNull CompletionHandler completionHandler) {
return new AsyncTaskRequest(completionHandler) {
@NonNull
@Override
protected JSONObject run() throws AlgoliaException {
return listI... | class class_name[name] begin[{]
method[listIndexesAsync, return_type[type[Request]], modifier[public], parameter[requestOptions, completionHandler]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=completionHandler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], b... | Keyword[public] identifier[Request] identifier[listIndexesAsync] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[RequestOptions] identifier[requestOptions] , annotation[@] identifier[NonNull] identifier[CompletionHandler] identifier[completionHandler] operator[SEP] {
Keyword[return] K... |
public ServiceCall<QueryResponse> federatedQuery(FederatedQueryOptions federatedQueryOptions) {
Validator.notNull(federatedQueryOptions, "federatedQueryOptions cannot be null");
String[] pathSegments = { "v1/environments", "query" };
String[] pathParameters = { federatedQueryOptions.environmentId() };
R... | class class_name[name] begin[{]
method[federatedQuery, return_type[type[ServiceCall]], modifier[public], parameter[federatedQueryOptions]] begin[{]
call[Validator.notNull, parameter[member[.federatedQueryOptions], literal["federatedQueryOptions cannot be null"]]]
local_variable[type[Str... | Keyword[public] identifier[ServiceCall] operator[<] identifier[QueryResponse] operator[>] identifier[federatedQuery] operator[SEP] identifier[FederatedQueryOptions] identifier[federatedQueryOptions] operator[SEP] {
identifier[Validator] operator[SEP] identifier[notNull] operator[SEP] identifier[federatedQueryOpt... |
public Response andTextBody(String text) {
this.contentType = MediaType.PLAIN_TEXT_UTF_8.withoutParameters().toString();
this.body = text;
this.rendered = false;
return this;
} | class class_name[name] begin[{]
method[andTextBody, return_type[type[Response]], modifier[public], parameter[text]] begin[{]
assign[THIS[member[None.contentType]], call[MediaType.PLAIN_TEXT_UTF_8.withoutParameters, parameter[]]]
assign[THIS[member[None.body]], member[.text]]
... | Keyword[public] identifier[Response] identifier[andTextBody] operator[SEP] identifier[String] identifier[text] operator[SEP] {
Keyword[this] operator[SEP] identifier[contentType] operator[=] identifier[MediaType] operator[SEP] identifier[PLAIN_TEXT_UTF_8] operator[SEP] identifier[withoutParameters] operator[SEP]... |
public static long parseDuration(Object configAlias, String propertyKey, Object obj, long defaultValue) {
return parseDuration(configAlias, propertyKey, obj, defaultValue, TimeUnit.MILLISECONDS);
} | class class_name[name] begin[{]
method[parseDuration, return_type[type[long]], modifier[public static], parameter[configAlias, propertyKey, obj, defaultValue]] begin[{]
return[call[.parseDuration, parameter[member[.configAlias], member[.propertyKey], member[.obj], member[.defaultValue], member[TimeUnit... | Keyword[public] Keyword[static] Keyword[long] identifier[parseDuration] operator[SEP] identifier[Object] identifier[configAlias] , identifier[String] identifier[propertyKey] , identifier[Object] identifier[obj] , Keyword[long] identifier[defaultValue] operator[SEP] {
Keyword[return] identifier[parseDuration] ... |
protected List<CmsResource> getMovedFolders(CmsObject cms) throws CmsException {
CmsProject onlineProject = cms.readProject(CmsProject.ONLINE_PROJECT_ID);
List<CmsResource> movedFolders = new ArrayList<CmsResource>();
for (CmsResource folder : m_folderList) {
if (folder.getState().i... | class class_name[name] begin[{]
method[getMovedFolders, return_type[type[List]], modifier[protected], parameter[cms]] begin[{]
local_variable[type[CmsProject], onlineProject]
local_variable[type[List], movedFolders]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(co... | Keyword[protected] identifier[List] operator[<] identifier[CmsResource] operator[>] identifier[getMovedFolders] operator[SEP] identifier[CmsObject] identifier[cms] operator[SEP] Keyword[throws] identifier[CmsException] {
identifier[CmsProject] identifier[onlineProject] operator[=] identifier[cms] operator[SEP] i... |
public int delete(String table, String whereClause, String[] whereArgs) {
acquireReference();
try {
com.couchbase.lite.internal.database.sqlite.SQLiteStatement statement = new com.couchbase.lite.internal.database.sqlite.SQLiteStatement(this, "DELETE FROM " + table +
(!Te... | class class_name[name] begin[{]
method[delete, return_type[type[int]], modifier[public], parameter[table, whereClause, whereArgs]] begin[{]
call[.acquireReference, parameter[]]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], in... | Keyword[public] Keyword[int] identifier[delete] operator[SEP] identifier[String] identifier[table] , identifier[String] identifier[whereClause] , identifier[String] operator[SEP] operator[SEP] identifier[whereArgs] operator[SEP] {
identifier[acquireReference] operator[SEP] operator[SEP] operator[SEP] Keyword[t... |
public void setVertexOrder(List<String> vertex_list)
{
if (!vertex_list.containsAll(getGraph().getVertices()))
throw new IllegalArgumentException("Supplied list must include " +
"all vertices of the graph");
this.vertex_ordered_list = vertex_list;
} | class class_name[name] begin[{]
method[setVertexOrder, return_type[void], modifier[public], parameter[vertex_list]] begin[{]
if[call[vertex_list.containsAll, parameter[call[.getGraph, parameter[]]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(pos... | Keyword[public] Keyword[void] identifier[setVertexOrder] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[vertex_list] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[vertex_list] operator[SEP] identifier[containsAll] operator[SEP] identifier[getGraph] operato... |
public boolean proofStep(ResolutionState state)
{
Functor goalTerm = state.getGoalStack().poll().getFunctor();
Term argument = goalTerm.getArgument(0).getValue();
// Check that the argument is not a free variable.
if (argument.isVar())
{
throw new IllegalStateExc... | class class_name[name] begin[{]
method[proofStep, return_type[type[boolean]], modifier[public], parameter[state]] begin[{]
local_variable[type[Functor], goalTerm]
local_variable[type[Term], argument]
if[call[argument.isVar, parameter[]]] begin[{]
ThrowStatement(expre... | Keyword[public] Keyword[boolean] identifier[proofStep] operator[SEP] identifier[ResolutionState] identifier[state] operator[SEP] {
identifier[Functor] identifier[goalTerm] operator[=] identifier[state] operator[SEP] identifier[getGoalStack] operator[SEP] operator[SEP] operator[SEP] identifier[poll] operator[SEP]... |
private Object getValue(final ResultSet rs, final ResultSetMetaData rsmd, final int columnIndex)
throws SQLException {
JavaType javaType = this.dialect.getJavaType(rsmd.getColumnType(columnIndex),
rsmd.getColumnTypeName(columnIndex));
return this.mapperManager.getValue(javaType, rs, columnIndex);
} | class class_name[name] begin[{]
method[getValue, return_type[type[Object]], modifier[private], parameter[rs, rsmd, columnIndex]] begin[{]
local_variable[type[JavaType], javaType]
return[THIS[member[None.mapperManager]call[None.getValue, parameter[member[.javaType], member[.rs], member[.columnIn... | Keyword[private] identifier[Object] identifier[getValue] operator[SEP] Keyword[final] identifier[ResultSet] identifier[rs] , Keyword[final] identifier[ResultSetMetaData] identifier[rsmd] , Keyword[final] Keyword[int] identifier[columnIndex] operator[SEP] Keyword[throws] identifier[SQLException] {
identifier[Ja... |
public static void main(final String[] args) throws BindException, InjectionException {
final Tang tang = Tang.Factory.getTang();
final JavaConfigurationBuilder cb = tang.newConfigurationBuilder();
try{
new CommandLine(cb)
.registerShortNameOfClass(NodeListFilePath.class)
.regis... | class class_name[name] begin[{]
method[main, return_type[void], modifier[public static], parameter[args]] begin[{]
local_variable[type[Tang], tang]
local_variable[type[JavaConfigurationBuilder], cb]
TryStatement(block=[StatementExpression(expression=ClassCreator(arguments=[MemberReferen... | Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[BindException] , identifier[InjectionException] {
Keyword[final] identifier[Tang] identifier[tang] operator[=] iden... |
public void subscribeToEvent(Class<? extends SystemEvent> eventClass,
ComponentSystemEventListener componentListener) {
if (eventClass == null) {
throw new NullPointerException();
}
if (componentListener == null) {
throw new NullPointerEx... | class class_name[name] begin[{]
method[subscribeToEvent, return_type[void], modifier[public], parameter[eventClass, componentListener]] begin[{]
if[binary_operation[member[.eventClass], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, cons... | Keyword[public] Keyword[void] identifier[subscribeToEvent] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[SystemEvent] operator[>] identifier[eventClass] , identifier[ComponentSystemEventListener] identifier[componentListener] operator[SEP] {
Keyword[if] operator[SEP] identi... |
public void success(T result) {
synchronized (mutex) {
state = State.SUCCESS;
this.result = result;
while (!callbacks.isEmpty()) {
callbacks.poll().onSuccess(result);
}
}
} | class class_name[name] begin[{]
method[success, return_type[void], modifier[public], parameter[result]] begin[{]
SYNCHRONIZED[member[.mutex]] BEGIN[{]
assign[member[.state], member[State.SUCCESS]]
assign[THIS[member[None.result]], member[.result]]... | Keyword[public] Keyword[void] identifier[success] operator[SEP] identifier[T] identifier[result] operator[SEP] {
Keyword[synchronized] operator[SEP] identifier[mutex] operator[SEP] {
identifier[state] operator[=] identifier[State] operator[SEP] identifier[SUCCESS] operator[SEP] Keyword[this] operator[... |
public void setUserLocalService(
com.liferay.portal.kernel.service.UserLocalService userLocalService) {
this.userLocalService = userLocalService;
} | class class_name[name] begin[{]
method[setUserLocalService, return_type[void], modifier[public], parameter[userLocalService]] begin[{]
assign[THIS[member[None.userLocalService]], member[.userLocalService]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setUserLocalService] operator[SEP] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[portal] operator[SEP] identifier[kernel] operator[SEP] identifier[service] operator[SEP] identifier[UserLocalService] identifier[userLocalService] operator[SEP] {
... |
private MessageDigest getDigest(String algorithm)
{
if (createdDigests == null)
createdDigests = new HashMap<String, MessageDigest>();
MessageDigest digest = createdDigests.get(algorithm);
if (digest == null) {
try {
digest = MessageDigest.getInstanc... | class class_name[name] begin[{]
method[getDigest, return_type[type[MessageDigest]], modifier[private], parameter[algorithm]] begin[{]
if[binary_operation[member[.createdDigests], ==, literal[null]]] begin[{]
assign[member[.createdDigests], ClassCreator(arguments=[], body=None, const... | Keyword[private] identifier[MessageDigest] identifier[getDigest] operator[SEP] identifier[String] identifier[algorithm] operator[SEP] {
Keyword[if] operator[SEP] identifier[createdDigests] operator[==] Other[null] operator[SEP] identifier[createdDigests] operator[=] Keyword[new] identifier[HashMap] operator[<] i... |
public void write(ICalendar ical) throws IOException {
Collection<Class<?>> unregistered = findScribeless(ical);
if (!unregistered.isEmpty()) {
List<String> classNames = new ArrayList<String>(unregistered.size());
for (Class<?> clazz : unregistered) {
classNames.add(clazz.getName());
}
throw Message... | class class_name[name] begin[{]
method[write, return_type[void], modifier[public], parameter[ical]] begin[{]
local_variable[type[Collection], unregistered]
if[call[unregistered.isEmpty, parameter[]]] begin[{]
local_variable[type[List], classNames]
ForStatement(bo... | Keyword[public] Keyword[void] identifier[write] operator[SEP] identifier[ICalendar] identifier[ical] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[Collection] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[unregistered] operator[=] identifier[findScr... |
@Override
public Result<Void> addAdminToNS(AuthzTrans trans, HttpServletResponse resp, String ns, String id) {
TimeTaken tt = trans.start(ADD_NS_ADMIN + ' ' + ns + ' ' + id, Env.SUB|Env.ALWAYS);
try {
Result<Void> rp = service.addAdminNS(trans,ns,id);
switch(rp.status) {
case OK:
//TODO Perm... | class class_name[name] begin[{]
method[addAdminToNS, return_type[type[Result]], modifier[public], parameter[trans, resp, ns, id]] begin[{]
local_variable[type[TimeTaken], tt]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=... | annotation[@] identifier[Override] Keyword[public] identifier[Result] operator[<] identifier[Void] operator[>] identifier[addAdminToNS] operator[SEP] identifier[AuthzTrans] identifier[trans] , identifier[HttpServletResponse] identifier[resp] , identifier[String] identifier[ns] , identifier[String] identifier[id] ope... |
public BoundCodeDt<NarrativeStatusEnum> getStatus() {
if (myStatus == null) {
myStatus = new BoundCodeDt<NarrativeStatusEnum>(NarrativeStatusEnum.VALUESET_BINDER);
}
return myStatus;
} | class class_name[name] begin[{]
method[getStatus, return_type[type[BoundCodeDt]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.myStatus], ==, literal[null]]] begin[{]
assign[member[.myStatus], ClassCreator(arguments=[MemberReference(member=VALUESET... | Keyword[public] identifier[BoundCodeDt] operator[<] identifier[NarrativeStatusEnum] operator[>] identifier[getStatus] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[myStatus] operator[==] Other[null] operator[SEP] {
identifier[myStatus] operator[=] Keyword[new] identifier[BoundCode... |
@SneakyThrows
public static OidcClientRegistrationResponse getClientRegistrationResponse(final OidcRegisteredService registeredService,
final String serverPrefix) {
val clientResponse = new OidcClientRegistrationResponse();
... | class class_name[name] begin[{]
method[getClientRegistrationResponse, return_type[type[OidcClientRegistrationResponse]], modifier[public static], parameter[registeredService, serverPrefix]] begin[{]
local_variable[type[val], clientResponse]
call[clientResponse.setApplicationType, parame... | annotation[@] identifier[SneakyThrows] Keyword[public] Keyword[static] identifier[OidcClientRegistrationResponse] identifier[getClientRegistrationResponse] operator[SEP] Keyword[final] identifier[OidcRegisteredService] identifier[registeredService] , Keyword[final] identifier[String] identifier[serverPrefix] operator[... |
private static InputStream createInputStream(GraphicFactory graphicFactory, String relativePathPrefix, String src) throws IOException {
InputStream inputStream;
if (src.startsWith(PREFIX_ASSETS)) {
src = src.substring(PREFIX_ASSETS.length());
inputStream = inputStreamFromAssets(g... | class class_name[name] begin[{]
method[createInputStream, return_type[type[InputStream]], modifier[private static], parameter[graphicFactory, relativePathPrefix, src]] begin[{]
local_variable[type[InputStream], inputStream]
if[call[src.startsWith, parameter[member[.PREFIX_ASSETS]]]] beg... | Keyword[private] Keyword[static] identifier[InputStream] identifier[createInputStream] operator[SEP] identifier[GraphicFactory] identifier[graphicFactory] , identifier[String] identifier[relativePathPrefix] , identifier[String] identifier[src] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[... |
public static ContentInfo findExtensionMatch(String name) {
name = name.toLowerCase();
// look up the whole name first
ContentType type = ContentType.fromFileExtension(name);
if (type != ContentType.OTHER) {
return new ContentInfo(type);
}
// now find the .ext part, if any
int index = name.lastIndexO... | class class_name[name] begin[{]
method[findExtensionMatch, return_type[type[ContentInfo]], modifier[public static], parameter[name]] begin[{]
assign[member[.name], call[name.toLowerCase, parameter[]]]
local_variable[type[ContentType], type]
if[binary_operation[member[.ty... | Keyword[public] Keyword[static] identifier[ContentInfo] identifier[findExtensionMatch] operator[SEP] identifier[String] identifier[name] operator[SEP] {
identifier[name] operator[=] identifier[name] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] identifier[ContentType] identifier... |
public static BinaryAttachment with(String fieldName, String filename, byte[] data) {
return new BinaryAttachment(fieldName, filename, data);
} | class class_name[name] begin[{]
method[with, return_type[type[BinaryAttachment]], modifier[public static], parameter[fieldName, filename, data]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=fieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReferenc... | Keyword[public] Keyword[static] identifier[BinaryAttachment] identifier[with] operator[SEP] identifier[String] identifier[fieldName] , identifier[String] identifier[filename] , Keyword[byte] operator[SEP] operator[SEP] identifier[data] operator[SEP] {
Keyword[return] Keyword[new] identifier[BinaryAttachment] o... |
public ArrayList getPrimaryKeys()
{
ArrayList result = new ArrayList();
FieldDescriptorDef fieldDef;
for (Iterator it = getFields(); it.hasNext();)
{
fieldDef = (FieldDescriptorDef)it.next();
if (fieldDef.getBooleanProperty(PropertyHelper.OJB... | class class_name[name] begin[{]
method[getPrimaryKeys, return_type[type[ArrayList]], modifier[public], parameter[]] begin[{]
local_variable[type[ArrayList], result]
local_variable[type[FieldDescriptorDef], fieldDef]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpre... | Keyword[public] identifier[ArrayList] identifier[getPrimaryKeys] operator[SEP] operator[SEP] {
identifier[ArrayList] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[SEP] operator[SEP] operator[SEP] identifier[FieldDescriptorDef] identifier[fieldDef] operator[SEP] Keyword[for] operator[... |
public void validate(String propertyName) {
if (whitelist != null && whitelist.contains(propertyName)) {
lastValid = true;
return;
}
if (blacklist != null && blacklist.contains(propertyName)) {
lastValid = false;
getUnknownProperties().add(property... | class class_name[name] begin[{]
method[validate, return_type[void], modifier[public], parameter[propertyName]] begin[{]
if[binary_operation[binary_operation[member[.whitelist], !=, literal[null]], &&, call[whitelist.contains, parameter[member[.propertyName]]]]] begin[{]
... | Keyword[public] Keyword[void] identifier[validate] operator[SEP] identifier[String] identifier[propertyName] operator[SEP] {
Keyword[if] operator[SEP] identifier[whitelist] operator[!=] Other[null] operator[&&] identifier[whitelist] operator[SEP] identifier[contains] operator[SEP] identifier[propertyName] operat... |
public void keepAliveSessions(long index, long timestamp) {
log.debug("Resetting session timeouts");
this.currentIndex = index;
this.currentTimestamp = Math.max(currentTimestamp, timestamp);
for (RaftSession session : sessions.getSessions(primitiveId)) {
session.setLastUpdated(timestamp);
}
... | class class_name[name] begin[{]
method[keepAliveSessions, return_type[void], modifier[public], parameter[index, timestamp]] begin[{]
call[log.debug, parameter[literal["Resetting session timeouts"]]]
assign[THIS[member[None.currentIndex]], member[.index]]
assign[T... | Keyword[public] Keyword[void] identifier[keepAliveSessions] operator[SEP] Keyword[long] identifier[index] , Keyword[long] identifier[timestamp] operator[SEP] {
identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[current... |
private List<CmsModelPageEntry> buildModelPageList(List<CmsModelPageConfig> modelPageConfigs) {
List<CmsModelPageEntry> result = Lists.newArrayList();
Locale wpLocale = OpenCms.getWorkplaceManager().getWorkplaceLocale(m_cms);
for (CmsModelPageConfig config : modelPageConfigs) {
CmsU... | class class_name[name] begin[{]
method[buildModelPageList, return_type[type[List]], modifier[private], parameter[modelPageConfigs]] begin[{]
local_variable[type[List], result]
local_variable[type[Locale], wpLocale]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDe... | Keyword[private] identifier[List] operator[<] identifier[CmsModelPageEntry] operator[>] identifier[buildModelPageList] operator[SEP] identifier[List] operator[<] identifier[CmsModelPageConfig] operator[>] identifier[modelPageConfigs] operator[SEP] {
identifier[List] operator[<] identifier[CmsModelPageEntry] oper... |
@SuppressWarnings("unchecked")
@Override
public EList<IfcRepresentationMap> getRepresentationMaps() {
return (EList<IfcRepresentationMap>) eGet(Ifc4Package.Literals.IFC_TYPE_PRODUCT__REPRESENTATION_MAPS, true);
} | class class_name[name] begin[{]
method[getRepresentationMaps, return_type[type[EList]], modifier[public], parameter[]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=IFC_TYPE_PRODUCT__REPRESENTATION_MAPS, postfix_operators=[], prefix_operators=[], qualifier=Ifc4Packa... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] identifier[EList] operator[<] identifier[IfcRepresentationMap] operator[>] identifier[getRepresentationMaps] operator[SEP] operator[SEP] {
Keyword[return] operator[SEP] identi... |
protected String captureStackTrace(String message) {
StringBuilder stringBuilder = new StringBuilder(String.format(message, Thread.currentThread().getName()));
StackTraceElement[] trace = Thread.currentThread().getStackTrace();
for (int i = 0; i < trace.length; i++) {
stringBuilder.append(' ').append(trace[i])... | class class_name[name] begin[{]
method[captureStackTrace, return_type[type[String]], modifier[protected], parameter[message]] begin[{]
local_variable[type[StringBuilder], stringBuilder]
local_variable[type[StackTraceElement], trace]
ForStatement(body=BlockStatement(label=None, statement... | Keyword[protected] identifier[String] identifier[captureStackTrace] operator[SEP] identifier[String] identifier[message] operator[SEP] {
identifier[StringBuilder] identifier[stringBuilder] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[String] operator[SEP] identifier[format] operato... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.