code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
void displayError(String messageHTML) {
// m_fakeWindow.addStyleName("waggler");
m_error.setValue(messageHTML);
m_error.setVisible(true);
CmsVaadinUtils.waggleMeOnce(m_fakeWindow);
//
//Add JavaScript code, which adds the wiggle class and removes it after a short time.
... | class class_name[name] begin[{]
method[displayError, return_type[void], modifier[default], parameter[messageHTML]] begin[{]
call[m_error.setValue, parameter[member[.messageHTML]]]
call[m_error.setVisible, parameter[literal[true]]]
call[CmsVaadinUtils.waggleMeOnce... | Keyword[void] identifier[displayError] operator[SEP] identifier[String] identifier[messageHTML] operator[SEP] {
identifier[m_error] operator[SEP] identifier[setValue] operator[SEP] identifier[messageHTML] operator[SEP] operator[SEP] identifier[m_error] operator[SEP] identifier[setVisible] operator[SEP] literal[b... |
public float getNextFrequency(float delta) throws IOException
{
float last = frequencyCounter.getFrequency();
float min = last-delta;
float max = last+delta;
while (true)
{
int sample = getSample();
if (frequencyCounter.update(sample))
... | class class_name[name] begin[{]
method[getNextFrequency, return_type[type[float]], modifier[public], parameter[delta]] begin[{]
local_variable[type[float], last]
local_variable[type[float], min]
local_variable[type[float], max]
while[literal[true]] begin[{]
l... | Keyword[public] Keyword[float] identifier[getNextFrequency] operator[SEP] Keyword[float] identifier[delta] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[float] identifier[last] operator[=] identifier[frequencyCounter] operator[SEP] identifier[getFrequency] operator[SEP] operator[SEP] operator[S... |
@Override
public JsonElement serialize(AlertChannel channel, Type type, JsonSerializationContext context)
{
JsonElement element = gson.toJsonTree(channel, type);
JsonObject obj = new JsonObject();
obj.add("channel", element);
return obj;
} | class class_name[name] begin[{]
method[serialize, return_type[type[JsonElement]], modifier[public], parameter[channel, type, context]] begin[{]
local_variable[type[JsonElement], element]
local_variable[type[JsonObject], obj]
call[obj.add, parameter[literal["channel"], member[.el... | annotation[@] identifier[Override] Keyword[public] identifier[JsonElement] identifier[serialize] operator[SEP] identifier[AlertChannel] identifier[channel] , identifier[Type] identifier[type] , identifier[JsonSerializationContext] identifier[context] operator[SEP] {
identifier[JsonElement] identifier[element] ... |
@Override
public JobStatus getJobStatus(final JobId jobId) {
final ZooKeeperClient client = provider.get("getJobStatus");
final Job job = getJob(client, jobId);
if (job == null) {
return null;
}
final List<String> hosts;
try {
hosts = listJobHosts(client, jobId);
} catch (Job... | class class_name[name] begin[{]
method[getJobStatus, return_type[type[JobStatus]], modifier[public], parameter[jobId]] begin[{]
local_variable[type[ZooKeeperClient], client]
local_variable[type[Job], job]
if[binary_operation[member[.job], ==, literal[null]]] begin[{]
... | annotation[@] identifier[Override] Keyword[public] identifier[JobStatus] identifier[getJobStatus] operator[SEP] Keyword[final] identifier[JobId] identifier[jobId] operator[SEP] {
Keyword[final] identifier[ZooKeeperClient] identifier[client] operator[=] identifier[provider] operator[SEP] identifier[get] operator[... |
protected Violation createViolation(HtmlElement htmlElement, Page page, String message) {
if (htmlElement == null)
htmlElement = page.findHtmlTag();
return new Violation(this, htmlElement, message);
} | class class_name[name] begin[{]
method[createViolation, return_type[type[Violation]], modifier[protected], parameter[htmlElement, page, message]] begin[{]
if[binary_operation[member[.htmlElement], ==, literal[null]]] begin[{]
assign[member[.htmlElement], call[page.findHtmlTag, param... | Keyword[protected] identifier[Violation] identifier[createViolation] operator[SEP] identifier[HtmlElement] identifier[htmlElement] , identifier[Page] identifier[page] , identifier[String] identifier[message] operator[SEP] {
Keyword[if] operator[SEP] identifier[htmlElement] operator[==] Other[null] operator[SEP... |
public static String getMultiBlockJmolString(MultipleAlignment multAln,
List<Atom[]> transformedAtoms, ColorBrewer colorPalette,
boolean colorByBlocks) {
StringWriter jmol = new StringWriter();
jmol.append(DEFAULT_SCRIPT);
jmol.append("select *; color lightgrey; backbone 0.1; ");
int blockNum = multAln.... | class class_name[name] begin[{]
method[getMultiBlockJmolString, return_type[type[String]], modifier[public static], parameter[multAln, transformedAtoms, colorPalette, colorByBlocks]] begin[{]
local_variable[type[StringWriter], jmol]
call[jmol.append, parameter[member[.DEFAULT_SCRIPT]]]
... | Keyword[public] Keyword[static] identifier[String] identifier[getMultiBlockJmolString] operator[SEP] identifier[MultipleAlignment] identifier[multAln] , identifier[List] operator[<] identifier[Atom] operator[SEP] operator[SEP] operator[>] identifier[transformedAtoms] , identifier[ColorBrewer] identifier[colorPalette]... |
private SofaRpcException clientTimeoutWhenSendResponse(String appName, String serviceName, String remoteAddress) {
String errorMsg = LogCodes.getLog(
LogCodes.ERROR_DISCARD_TIMEOUT_RESPONSE, serviceName, remoteAddress);
if (LOGGER.isWarnEnabled(appName)) {
LOGGER.warnWithApp(appN... | class class_name[name] begin[{]
method[clientTimeoutWhenSendResponse, return_type[type[SofaRpcException]], modifier[private], parameter[appName, serviceName, remoteAddress]] begin[{]
local_variable[type[String], errorMsg]
if[call[LOGGER.isWarnEnabled, parameter[member[.appName]]]] begin... | Keyword[private] identifier[SofaRpcException] identifier[clientTimeoutWhenSendResponse] operator[SEP] identifier[String] identifier[appName] , identifier[String] identifier[serviceName] , identifier[String] identifier[remoteAddress] operator[SEP] {
identifier[String] identifier[errorMsg] operator[=] identifier... |
public static Type getType(final Class<?> clazz) {
if (clazz.isPrimitive()) {
if (clazz == Integer.TYPE) {
return INT_TYPE;
} else if (clazz == Void.TYPE) {
return VOID_TYPE;
} else if (clazz == Boolean.TYPE) {
return BOOLEAN_TYPE;
} else if (clazz == Byte.TYPE) {
... | class class_name[name] begin[{]
method[getType, return_type[type[Type]], modifier[public static], parameter[clazz]] begin[{]
if[call[clazz.isPrimitive, parameter[]]] begin[{]
if[binary_operation[member[.clazz], ==, member[Integer.TYPE]]] begin[{]
return[m... | Keyword[public] Keyword[static] identifier[Type] identifier[getType] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[SEP] {
Keyword[if] operator[SEP] identifier[clazz] operator[SEP] identifier[isPrimitive] operator[SEP] operator[SEP] operator[SEP] {
... |
public static Boolean checkInfrontBehind(MatchResult r, Sentence s) {
Boolean ok = true;
// get rid of expressions such as "1999" in 53453.1999
if (r.start() > 1) {
if ((s.getCoveredText().substring(r.start() - 2, r.start()).matches("\\d\\."))){
ok = false;
}
}
// get rid of expressions if the... | class class_name[name] begin[{]
method[checkInfrontBehind, return_type[type[Boolean]], modifier[public static], parameter[r, s]] begin[{]
local_variable[type[Boolean], ok]
if[binary_operation[call[r.start, parameter[]], >, literal[1]]] begin[{]
if[call[s.getCover... | Keyword[public] Keyword[static] identifier[Boolean] identifier[checkInfrontBehind] operator[SEP] identifier[MatchResult] identifier[r] , identifier[Sentence] identifier[s] operator[SEP] {
identifier[Boolean] identifier[ok] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[r] operat... |
protected void writePackageFiles(QualifiedName name, String lineSeparator,
IExtraLanguageGeneratorContext context) {
final IFileSystemAccess2 fsa = context.getFileSystemAccess();
final String outputConfiguration = getOutputConfigurationName();
QualifiedName libraryName = null;
for (final String segment : nam... | class class_name[name] begin[{]
method[writePackageFiles, return_type[void], modifier[protected], parameter[name, lineSeparator, context]] begin[{]
local_variable[type[IFileSystemAccess2], fsa]
local_variable[type[String], outputConfiguration]
local_variable[type[QualifiedName], library... | Keyword[protected] Keyword[void] identifier[writePackageFiles] operator[SEP] identifier[QualifiedName] identifier[name] , identifier[String] identifier[lineSeparator] , identifier[IExtraLanguageGeneratorContext] identifier[context] operator[SEP] {
Keyword[final] identifier[IFileSystemAccess2] identifier[fsa] o... |
public JsCodeBuilder appendLine(String... codeFragments) {
code.append(indent);
append(codeFragments);
code.append("\n");
return this;
} | class class_name[name] begin[{]
method[appendLine, return_type[type[JsCodeBuilder]], modifier[public], parameter[codeFragments]] begin[{]
call[code.append, parameter[member[.indent]]]
call[.append, parameter[member[.codeFragments]]]
call[code.append, parameter[li... | Keyword[public] identifier[JsCodeBuilder] identifier[appendLine] operator[SEP] identifier[String] operator[...] identifier[codeFragments] operator[SEP] {
identifier[code] operator[SEP] identifier[append] operator[SEP] identifier[indent] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[code... |
protected void initialize() {
if (fields != null) {
Iterator<FieldEditor> e = fields.iterator();
while (e.hasNext()) {
FieldEditor pe = e.next();
pe.setPage(this);
pe.setPropertyChangeListener(this);
pe.setPreferenceStore(getPreferenceStore());
pe.load();
}
}
} | class class_name[name] begin[{]
method[initialize, return_type[void], modifier[protected], parameter[]] begin[{]
if[binary_operation[member[.fields], !=, literal[null]]] begin[{]
local_variable[type[Iterator], e]
while[call[e.hasNext, parameter[]]] begin[{]
... | Keyword[protected] Keyword[void] identifier[initialize] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[fields] operator[!=] Other[null] operator[SEP] {
identifier[Iterator] operator[<] identifier[FieldEditor] operator[>] identifier[e] operator[=] identifier[fields] operator[SEP] id... |
@SuppressWarnings("unchecked")
public static <T> T add(T op1, T op2) {
if (op1.getClass() != op2.getClass()) {
throw new RuntimeException("Arguments of different classes: " + op1 + " " + op2);
}
if (Byte.class.isInstance(op1)) {
return (T)(Byte)(byte)(((Byte) op1).byteValue() + ((Byte) op2).b... | class class_name[name] begin[{]
method[add, return_type[type[T]], modifier[public static], parameter[op1, op2]] begin[{]
if[binary_operation[call[op1.getClass, parameter[]], !=, call[op2.getClass, parameter[]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperat... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[add] operator[SEP] identifier[T] identifier[op1] , identifier[T] identifier[op2] operator[SEP] {
Keyword[if] operator[SEP] identif... |
public void cloneActionState(final ActionState source, final ActionState target) {
source.getActionList().forEach(a -> target.getActionList().add(a));
source.getExitActionList().forEach(a -> target.getExitActionList().add(a));
source.getAttributes().asMap().forEach((k, v) -> target.getAttributes... | class class_name[name] begin[{]
method[cloneActionState, return_type[void], modifier[public], parameter[source, target]] begin[{]
call[source.getActionList, parameter[]]
call[source.getExitActionList, parameter[]]
call[source.getAttributes, parameter[]]
... | Keyword[public] Keyword[void] identifier[cloneActionState] operator[SEP] Keyword[final] identifier[ActionState] identifier[source] , Keyword[final] identifier[ActionState] identifier[target] operator[SEP] {
identifier[source] operator[SEP] identifier[getActionList] operator[SEP] operator[SEP] operator[SEP] iden... |
public static Container create(Map<String, Object> params) throws EasyPostException {
return create(params, null);
} | class class_name[name] begin[{]
method[create, return_type[type[Container]], modifier[public static], parameter[params]] begin[{]
return[call[.create, parameter[member[.params], literal[null]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Container] identifier[create] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[params] operator[SEP] Keyword[throws] identifier[EasyPostException] {
Keyword[return] identifier[create] operator[SEP] identifier[para... |
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case AfplibPackage.GSECOL__COLOR:
return COLOR_EDEFAULT == null ? color != null : !COLOR_EDEFAULT.equals(color);
}
return super.eIsSet(featureID);
} | class class_name[name] begin[{]
method[eIsSet, return_type[type[boolean]], modifier[public], parameter[featureID]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=GSECOL__COLOR, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statemen... | 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[GSECOL__COLOR] op... |
public void selectMainWindow() {
String action = "Switching to main window";
String expected = "Main window is selected";
try {
driver.switchTo().defaultContent();
} catch (Exception e) {
reporter.fail(action, expected, "Main window was not selected. " + e.getMess... | class class_name[name] begin[{]
method[selectMainWindow, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[String], action]
local_variable[type[String], expected]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=switch... | Keyword[public] Keyword[void] identifier[selectMainWindow] operator[SEP] operator[SEP] {
identifier[String] identifier[action] operator[=] literal[String] operator[SEP] identifier[String] identifier[expected] operator[=] literal[String] operator[SEP] Keyword[try] {
identifier[driver] operator[SEP] ide... |
private void processProject(PrimaveraDatabaseReader reader, int projectID, String outputFile) throws Exception
{
long start = System.currentTimeMillis();
reader.setProjectID(projectID);
ProjectFile projectFile = reader.read();
long elapsed = System.currentTimeMillis() - start;
System.ou... | class class_name[name] begin[{]
method[processProject, return_type[void], modifier[private], parameter[reader, projectID, outputFile]] begin[{]
local_variable[type[long], start]
call[reader.setProjectID, parameter[member[.projectID]]]
local_variable[type[ProjectFile], projectFil... | Keyword[private] Keyword[void] identifier[processProject] operator[SEP] identifier[PrimaveraDatabaseReader] identifier[reader] , Keyword[int] identifier[projectID] , identifier[String] identifier[outputFile] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[long] identifier[start] operator[=] ident... |
public void sendHeartBeat(String ipAddress, int port) throws Exception {
MBeanServer mbeanServer = getMBeanServer();
Set<ObjectName> queryNames = mbeanServer.queryNames(new ObjectName("*:type=Service,*"), null);
for(ObjectName objectName : queryNames) {
mbeanServer.invoke(objectName, "sendHeartB... | class class_name[name] begin[{]
method[sendHeartBeat, return_type[void], modifier[public], parameter[ipAddress, port]] begin[{]
local_variable[type[MBeanServer], mbeanServer]
local_variable[type[Set], queryNames]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpressi... | Keyword[public] Keyword[void] identifier[sendHeartBeat] operator[SEP] identifier[String] identifier[ipAddress] , Keyword[int] identifier[port] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[MBeanServer] identifier[mbeanServer] operator[=] identifier[getMBeanServer] operator[SEP] operator[SEP] ... |
private static String format(String message, Object... messageArgs) {
StringBuilder sb = new StringBuilder(message.length() + 8 * messageArgs.length);
int templateStart = 0;
for (Object argument : messageArgs) {
int placeholderStart = message.indexOf("%s", templateStart);
if (placeholderStart ==... | class class_name[name] begin[{]
method[format, return_type[type[String]], modifier[private static], parameter[message, messageArgs]] begin[{]
local_variable[type[StringBuilder], sb]
local_variable[type[int], templateStart]
ForStatement(body=BlockStatement(label=None, statements=[LocalVa... | Keyword[private] Keyword[static] identifier[String] identifier[format] operator[SEP] identifier[String] identifier[message] , identifier[Object] operator[...] identifier[messageArgs] operator[SEP] {
identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identif... |
@Override
public Client query(String name, Object... values) {
addMatrixQueryParamsToBuilder(getCurrentBuilder(), name, ParameterType.QUERY, null, values);
return this;
} | class class_name[name] begin[{]
method[query, return_type[type[Client]], modifier[public], parameter[name, values]] begin[{]
call[.addMatrixQueryParamsToBuilder, parameter[call[.getCurrentBuilder, parameter[]], member[.name], member[ParameterType.QUERY], literal[null], member[.values]]]
... | annotation[@] identifier[Override] Keyword[public] identifier[Client] identifier[query] operator[SEP] identifier[String] identifier[name] , identifier[Object] operator[...] identifier[values] operator[SEP] {
identifier[addMatrixQueryParamsToBuilder] operator[SEP] identifier[getCurrentBuilder] operator[SEP] oper... |
@Override
public void saturate(IAtomContainer atomContainer) throws CDKException {
logger.info("Saturating atomContainer by adjusting bond orders...");
boolean allSaturated = allSaturated(atomContainer);
if (!allSaturated) {
logger.info("Saturating bond orders is needed...");
... | class class_name[name] begin[{]
method[saturate, return_type[void], modifier[public], parameter[atomContainer]] begin[{]
call[logger.info, parameter[literal["Saturating atomContainer by adjusting bond orders..."]]]
local_variable[type[boolean], allSaturated]
if[member[.a... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[saturate] operator[SEP] identifier[IAtomContainer] identifier[atomContainer] operator[SEP] Keyword[throws] identifier[CDKException] {
identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[... |
public static boolean isAndroid(HttpServletRequest httpRequest) {
String requestedWith = httpRequest.getHeader(X_REQUESTED_WITH);
return requestedWith != null ? requestedWith.equalsIgnoreCase(ANDROID_USER_AGENT) : false;
} | class class_name[name] begin[{]
method[isAndroid, return_type[type[boolean]], modifier[public static], parameter[httpRequest]] begin[{]
local_variable[type[String], requestedWith]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=requestedWith, postfix_operators... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isAndroid] operator[SEP] identifier[HttpServletRequest] identifier[httpRequest] operator[SEP] {
identifier[String] identifier[requestedWith] operator[=] identifier[httpRequest] operator[SEP] identifier[getHeader] operator[SEP] identifier[X_REQUESTED_WIT... |
public static <T> String join(final Collection<T> collection, final String separator) {
if (isEmpty(collection)) {
return "";
}
StringBuffer stringBuffer = new StringBuffer();
boolean isFirstVisited = true;
for (Object object : collection) {
if (isFirstVi... | class class_name[name] begin[{]
method[join, return_type[type[String]], modifier[public static], parameter[collection, separator]] begin[{]
if[call[.isEmpty, parameter[member[.collection]]]] begin[{]
return[literal[""]]
else begin[{]
None
end[}]
local_variabl... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[String] identifier[join] operator[SEP] Keyword[final] identifier[Collection] operator[<] identifier[T] operator[>] identifier[collection] , Keyword[final] identifier[String] identifier[separator] operator[SEP] {
Keyword[if] operato... |
public void repairRelations(CmsObject cms, String resourceName) throws CmsException {
repairRelations(cms, cms.readResource(resourceName));
} | class class_name[name] begin[{]
method[repairRelations, return_type[void], modifier[public], parameter[cms, resourceName]] begin[{]
call[.repairRelations, parameter[member[.cms], call[cms.readResource, parameter[member[.resourceName]]]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[repairRelations] operator[SEP] identifier[CmsObject] identifier[cms] , identifier[String] identifier[resourceName] operator[SEP] Keyword[throws] identifier[CmsException] {
identifier[repairRelations] operator[SEP] identifier[cms] , identifier[cms] operator[SEP] identifi... |
public void readMessage(final MessageLite.Builder builder,
final ExtensionRegistryLite extensionRegistry)
throws IOException {
final int length = readRawVarint32();
if (recursionDepth >= recursionLimit) {
throw InvalidProtocolBufferException.recursionLimitExceeded();
}
... | class class_name[name] begin[{]
method[readMessage, return_type[void], modifier[public], parameter[builder, extensionRegistry]] begin[{]
local_variable[type[int], length]
if[binary_operation[member[.recursionDepth], >=, member[.recursionLimit]]] begin[{]
ThrowStatement(expre... | Keyword[public] Keyword[void] identifier[readMessage] operator[SEP] Keyword[final] identifier[MessageLite] operator[SEP] identifier[Builder] identifier[builder] , Keyword[final] identifier[ExtensionRegistryLite] identifier[extensionRegistry] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[final]... |
public static MessageFactory newInstance()
throws SOAPException {
try {
MessageFactory factory = (MessageFactory)
FactoryFinder.find(MESSAGE_FACTORY_PROPERTY);
if (factory != null)
return factory;
return newInstance(SOAPConstants.SOAP... | class class_name[name] begin[{]
method[newInstance, return_type[type[MessageFactory]], modifier[public static], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[Membe... | Keyword[public] Keyword[static] identifier[MessageFactory] identifier[newInstance] operator[SEP] operator[SEP] Keyword[throws] identifier[SOAPException] {
Keyword[try] {
identifier[MessageFactory] identifier[factory] operator[=] operator[SEP] identifier[MessageFactory] operator[SEP] identifier[Factory... |
@Override
public boolean setNotificationOptions(long interval, boolean useMBean) {
//can just pass these thru, the other impl's will not trigger listening until a registration is placed.
overlaidContainer.getArtifactNotifier().setNotificationOptions(interval, useMBean);
overlayContainer.getA... | class class_name[name] begin[{]
method[setNotificationOptions, return_type[type[boolean]], modifier[public], parameter[interval, useMBean]] begin[{]
call[overlaidContainer.getArtifactNotifier, parameter[]]
call[overlayContainer.getArtifactNotifier, parameter[]]
return[li... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[setNotificationOptions] operator[SEP] Keyword[long] identifier[interval] , Keyword[boolean] identifier[useMBean] operator[SEP] {
identifier[overlaidContainer] operator[SEP] identifier[getArtifactNotifier] operator[SEP] operator[SEP] ... |
private SqlNode registerFrom(
SqlValidatorScope parentScope,
SqlValidatorScope usingScope,
boolean register,
final SqlNode node,
SqlNode enclosingNode,
String alias,
SqlNodeList extendList,
boolean forceNullable,
final boolean lateral) {
final SqlKind kind = node.getKind();
SqlNode expr;
SqlNod... | class class_name[name] begin[{]
method[registerFrom, return_type[type[SqlNode]], modifier[private], parameter[parentScope, usingScope, register, node, enclosingNode, alias, extendList, forceNullable, lateral]] begin[{]
local_variable[type[SqlKind], kind]
local_variable[type[SqlNode], expr]
... | Keyword[private] identifier[SqlNode] identifier[registerFrom] operator[SEP] identifier[SqlValidatorScope] identifier[parentScope] , identifier[SqlValidatorScope] identifier[usingScope] , Keyword[boolean] identifier[register] , Keyword[final] identifier[SqlNode] identifier[node] , identifier[SqlNode] identifier[encl... |
protected void resource(String template, String packageName, String resourceName, Supplier<Map<String, Object>> context) {
StringBuffer code = generate(template, context);
writeResource(packageName, resourceName, code);
} | class class_name[name] begin[{]
method[resource, return_type[void], modifier[protected], parameter[template, packageName, resourceName, context]] begin[{]
local_variable[type[StringBuffer], code]
call[.writeResource, parameter[member[.packageName], member[.resourceName], member[.code]]]... | Keyword[protected] Keyword[void] identifier[resource] operator[SEP] identifier[String] identifier[template] , identifier[String] identifier[packageName] , identifier[String] identifier[resourceName] , identifier[Supplier] operator[<] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] op... |
private OnPreferenceChangeListener createBreadCrumbElevationChangeListener() {
return new OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
int elevation = Integer.valueOf((String) newValue);
... | class class_name[name] begin[{]
method[createBreadCrumbElevationChangeListener, return_type[type[OnPreferenceChangeListener]], modifier[private], parameter[]] begin[{]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[LocalVariableDec... | Keyword[private] identifier[OnPreferenceChangeListener] identifier[createBreadCrumbElevationChangeListener] operator[SEP] operator[SEP] {
Keyword[return] Keyword[new] identifier[OnPreferenceChangeListener] operator[SEP] operator[SEP] {
annotation[@] identifier[Override] Keyword[public] Keyword[boolean... |
public Pager<Pipeline> getPipelines(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException {
return (new Pager<Pipeline>(this, Pipeline.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "pipelines"));
} | class class_name[name] begin[{]
method[getPipelines, return_type[type[Pager]], modifier[public], parameter[projectIdOrPath, itemsPerPage]] begin[{]
return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), ClassReference(postfix_operators=[], prefix_o... | Keyword[public] identifier[Pager] operator[<] identifier[Pipeline] operator[>] identifier[getPipelines] operator[SEP] identifier[Object] identifier[projectIdOrPath] , Keyword[int] identifier[itemsPerPage] operator[SEP] Keyword[throws] identifier[GitLabApiException] {
Keyword[return] operator[SEP] Keyword[new] i... |
public void join(Address address)
{
if (trace)
log.tracef("join(%s)", address);
workManagers.add(address);
if (!initialized && own != null && transport != null && !own.equals(address) && transport.isInitialized())
{
DistributedWorkManagerStatisticsValues values = transport... | class class_name[name] begin[{]
method[join, return_type[void], modifier[public], parameter[address]] begin[{]
if[member[.trace]] begin[{]
call[log.tracef, parameter[literal["join(%s)"], member[.address]]]
else begin[{]
None
end[}]
call[workManagers.a... | Keyword[public] Keyword[void] identifier[join] operator[SEP] identifier[Address] identifier[address] operator[SEP] {
Keyword[if] operator[SEP] identifier[trace] operator[SEP] identifier[log] operator[SEP] identifier[tracef] operator[SEP] literal[String] , identifier[address] operator[SEP] operator[SEP] identifi... |
private void _doLogicalClear() {
// Only use one orphan command per panel to avoid object creation.
if (orphanCommand == null) {
orphanCommand = new AttachDetachException.Command() {
@Override
public void execute(Widget w) {
orphan(w);
}
... | class class_name[name] begin[{]
method[_doLogicalClear, return_type[void], modifier[private], parameter[]] begin[{]
if[binary_operation[member[.orphanCommand], ==, literal[null]]] begin[{]
assign[member[.orphanCommand], ClassCreator(arguments=[], body=[MethodDeclaration(... | Keyword[private] Keyword[void] identifier[_doLogicalClear] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[orphanCommand] operator[==] Other[null] operator[SEP] {
identifier[orphanCommand] operator[=] Keyword[new] identifier[AttachDetachException] operator[SEP] identifier[Command] o... |
public List<ISubmission> getExternalStats(String resourceUrl) throws Exception{
return getExternalSubmissions(resourceUrl, IStats.VERB);
} | class class_name[name] begin[{]
method[getExternalStats, return_type[type[List]], modifier[public], parameter[resourceUrl]] begin[{]
return[call[.getExternalSubmissions, parameter[member[.resourceUrl], member[IStats.VERB]]]]
end[}]
END[}] | Keyword[public] identifier[List] operator[<] identifier[ISubmission] operator[>] identifier[getExternalStats] operator[SEP] identifier[String] identifier[resourceUrl] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[return] identifier[getExternalSubmissions] operator[SEP] identifier[resourceUrl] , ... |
private synchronized void makeOrphans(@Nullable ArrayList<Entry<K, V>> oldEntries) {
if (oldEntries != null) {
for (Entry<K, V> oldEntry : oldEntries) {
makeOrphan(oldEntry);
}
}
} | class class_name[name] begin[{]
method[makeOrphans, return_type[void], modifier[synchronized private], parameter[oldEntries]] begin[{]
if[binary_operation[member[.oldEntries], !=, literal[null]]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(e... | Keyword[private] Keyword[synchronized] Keyword[void] identifier[makeOrphans] operator[SEP] annotation[@] identifier[Nullable] identifier[ArrayList] operator[<] identifier[Entry] operator[<] identifier[K] , identifier[V] operator[>] operator[>] identifier[oldEntries] operator[SEP] {
Keyword[if] operator[SEP] ide... |
public com.cloudant.client.api.Replicator replicator() {
Replicator couchDbReplicator = couchDbClient.replicator();
com.cloudant.client.api.Replicator replicator = new com.cloudant.client.api.Replicator
(couchDbReplicator);
return replicator;
} | class class_name[name] begin[{]
method[replicator, return_type[type[com]], modifier[public], parameter[]] begin[{]
local_variable[type[Replicator], couchDbReplicator]
local_variable[type[com], replicator]
return[member[.replicator]]
end[}]
END[}] | Keyword[public] identifier[com] operator[SEP] identifier[cloudant] operator[SEP] identifier[client] operator[SEP] identifier[api] operator[SEP] identifier[Replicator] identifier[replicator] operator[SEP] operator[SEP] {
identifier[Replicator] identifier[couchDbReplicator] operator[=] identifier[couchDbClient] op... |
protected Link nextLink(Link start,
Transaction transaction,
long transactionUnlockPoint)
throws ObjectManagerException
{
if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
trace.entry(this, cclass,
... | class class_name[name] begin[{]
method[nextLink, return_type[type[Link]], modifier[protected], parameter[start, transaction, transactionUnlockPoint]] begin[{]
if[binary_operation[call[Tracing.isAnyTracingEnabled, parameter[]], &&, call[trace.isEntryEnabled, parameter[]]]] begin[{]
c... | Keyword[protected] identifier[Link] identifier[nextLink] operator[SEP] identifier[Link] identifier[start] , identifier[Transaction] identifier[transaction] , Keyword[long] identifier[transactionUnlockPoint] operator[SEP] Keyword[throws] identifier[ObjectManagerException] {
Keyword[if] operator[SEP] identifier[... |
public void clearMessagesAtSource(IndoubtAction indoubtAction)
throws SIMPControllableNotFoundException, SIMPRuntimeOperationFailedException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "clearMessagesAtSource");
assertValidControllable();
synchronized(_st... | class class_name[name] begin[{]
method[clearMessagesAtSource, return_type[void], modifier[public], parameter[indoubtAction]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, para... | Keyword[public] Keyword[void] identifier[clearMessagesAtSource] operator[SEP] identifier[IndoubtAction] identifier[indoubtAction] operator[SEP] Keyword[throws] identifier[SIMPControllableNotFoundException] , identifier[SIMPRuntimeOperationFailedException] {
Keyword[if] operator[SEP] identifier[TraceComponent] o... |
public static BindingCreation bind( Object source, String propertyPath )
{
return createBinder( new CompositePropertyAdapter( source, propertyPath ) );
} | class class_name[name] begin[{]
method[bind, return_type[type[BindingCreation]], modifier[public static], parameter[source, propertyPath]] begin[{]
return[call[.createBinder, parameter[ClassCreator(arguments=[MemberReference(member=source, postfix_operators=[], prefix_operators=[], qualifier=, selector... | Keyword[public] Keyword[static] identifier[BindingCreation] identifier[bind] operator[SEP] identifier[Object] identifier[source] , identifier[String] identifier[propertyPath] operator[SEP] {
Keyword[return] identifier[createBinder] operator[SEP] Keyword[new] identifier[CompositePropertyAdapter] operator[SEP] id... |
static public DataTypeFactory<?> getInstance(String tname) {
DataTypeFactory<?> factory = factories.get(tname);
if( factory == null ) {
throw new InvalidAttributeException("Unknown type name: " + tname);
}
return factory;
} | class class_name[name] begin[{]
method[getInstance, return_type[type[DataTypeFactory]], modifier[public static], parameter[tname]] begin[{]
local_variable[type[DataTypeFactory], factory]
if[binary_operation[member[.factory], ==, literal[null]]] begin[{]
ThrowStatement(expres... | Keyword[static] Keyword[public] identifier[DataTypeFactory] operator[<] operator[?] operator[>] identifier[getInstance] operator[SEP] identifier[String] identifier[tname] operator[SEP] {
identifier[DataTypeFactory] operator[<] operator[?] operator[>] identifier[factory] operator[=] identifier[factories] operator... |
public static boolean contained( Box3D_I32 box , Point3D_I32 point ) {
return( box.p0.x <= point.x && point.x < box.p1.x &&
box.p0.y <= point.y && point.y < box.p1.y &&
box.p0.z <= point.z && point.z < box.p1.z );
} | class class_name[name] begin[{]
method[contained, return_type[type[boolean]], modifier[public static], parameter[box, point]] begin[{]
return[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[member[box.p0.x], <=, member[point.x]], &&, binary_operatio... | Keyword[public] Keyword[static] Keyword[boolean] identifier[contained] operator[SEP] identifier[Box3D_I32] identifier[box] , identifier[Point3D_I32] identifier[point] operator[SEP] {
Keyword[return] operator[SEP] identifier[box] operator[SEP] identifier[p0] operator[SEP] identifier[x] operator[<=] identifier[po... |
private synchronized QueueBuffer getQBuffer(String qUrl) {
QueueBuffer toReturn = buffers.get(qUrl);
if (null == toReturn) {
QueueBufferConfig config = new QueueBufferConfig(bufferConfigExemplar);
toReturn = new QueueBuffer(config, qUrl, realSQS);
buffers.put(qUrl, to... | class class_name[name] begin[{]
method[getQBuffer, return_type[type[QueueBuffer]], modifier[synchronized private], parameter[qUrl]] begin[{]
local_variable[type[QueueBuffer], toReturn]
if[binary_operation[literal[null], ==, member[.toReturn]]] begin[{]
local_variable[type[Qu... | Keyword[private] Keyword[synchronized] identifier[QueueBuffer] identifier[getQBuffer] operator[SEP] identifier[String] identifier[qUrl] operator[SEP] {
identifier[QueueBuffer] identifier[toReturn] operator[=] identifier[buffers] operator[SEP] identifier[get] operator[SEP] identifier[qUrl] operator[SEP] operator[... |
public Session createSession(Properties properties, boolean debug) {
Properties props = setup.configureJavaMailSessionProperties(properties, debug);
if (log.isDebugEnabled()) {
StringBuilder buf = new StringBuilder("Server Mail session properties are :");
for (Map.Entry<Object, ... | class class_name[name] begin[{]
method[createSession, return_type[type[Session]], modifier[public], parameter[properties, debug]] begin[{]
local_variable[type[Properties], props]
if[call[log.isDebugEnabled, parameter[]]] begin[{]
local_variable[type[StringBuilder], buf]
... | Keyword[public] identifier[Session] identifier[createSession] operator[SEP] identifier[Properties] identifier[properties] , Keyword[boolean] identifier[debug] operator[SEP] {
identifier[Properties] identifier[props] operator[=] identifier[setup] operator[SEP] identifier[configureJavaMailSessionProperties] opera... |
private static int predictedPosition(final Object[] array, final Object object, final int hash)
{
int arraySize = array.length;
int i = Math.abs(hash) % arraySize;
Object element = array[i];
while (element != null) // the load factor guarantees that there is always at least one free... | class class_name[name] begin[{]
method[predictedPosition, return_type[type[int]], modifier[private static], parameter[array, object, hash]] begin[{]
local_variable[type[int], arraySize]
local_variable[type[int], i]
local_variable[type[Object], element]
while[binary_opera... | Keyword[private] Keyword[static] Keyword[int] identifier[predictedPosition] operator[SEP] Keyword[final] identifier[Object] operator[SEP] operator[SEP] identifier[array] , Keyword[final] identifier[Object] identifier[object] , Keyword[final] Keyword[int] identifier[hash] operator[SEP] {
Keyword[int] identifier... |
Client createClient() throws InterruptedException {
Client client = retryTemplate.execute(this::tryCreateClient);
LOG.info("Connected to Elasticsearch cluster '{}'.", clusterName);
return client;
} | class class_name[name] begin[{]
method[createClient, return_type[type[Client]], modifier[default], parameter[]] begin[{]
local_variable[type[Client], client]
call[LOG.info, parameter[literal["Connected to Elasticsearch cluster '{}'."], member[.clusterName]]]
return[member[.clien... | identifier[Client] identifier[createClient] operator[SEP] operator[SEP] Keyword[throws] identifier[InterruptedException] {
identifier[Client] identifier[client] operator[=] identifier[retryTemplate] operator[SEP] identifier[execute] operator[SEP] Keyword[this] operator[::] identifier[tryCreateClient] operator[SE... |
@Override
public final void recycle()
{
attacking = false;
attacked = false;
stop = false;
frameAttack = 1;
attackPause = 1;
target = null;
state = AttackState.NONE;
} | class class_name[name] begin[{]
method[recycle, return_type[void], modifier[final public], parameter[]] begin[{]
assign[member[.attacking], literal[false]]
assign[member[.attacked], literal[false]]
assign[member[.stop], literal[false]]
assign[memb... | annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[recycle] operator[SEP] operator[SEP] {
identifier[attacking] operator[=] literal[boolean] operator[SEP] identifier[attacked] operator[=] literal[boolean] operator[SEP] identifier[stop] operator[=] literal[boolean] operator... |
private List<Deployment> archiveDeployments(List<Deployment> deployments) {
List<Deployment> archives = new ArrayList<Deployment>();
for (Deployment deployment : deployments) {
if (deployment.getDescription().isArchiveDeployment()) {
archives.add(deployment);
}
... | class class_name[name] begin[{]
method[archiveDeployments, return_type[type[List]], modifier[private], parameter[deployments]] begin[{]
local_variable[type[List], archives]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getDe... | Keyword[private] identifier[List] operator[<] identifier[Deployment] operator[>] identifier[archiveDeployments] operator[SEP] identifier[List] operator[<] identifier[Deployment] operator[>] identifier[deployments] operator[SEP] {
identifier[List] operator[<] identifier[Deployment] operator[>] identifier[archives... |
private GinjectorBindings computeInitialPosition(Key<?> key) {
GinjectorBindings initialPosition = output.getGraph().getOrigin();
boolean pinned = initialPosition.isPinned(key);
// If the key is pinned (explicitly bound) at the origin, we may be in a situation where we need
// to install a binding at t... | class class_name[name] begin[{]
method[computeInitialPosition, return_type[type[GinjectorBindings]], modifier[private], parameter[key]] begin[{]
local_variable[type[GinjectorBindings], initialPosition]
local_variable[type[boolean], pinned]
if[member[.pinned]] begin[{]
... | Keyword[private] identifier[GinjectorBindings] identifier[computeInitialPosition] operator[SEP] identifier[Key] operator[<] operator[?] operator[>] identifier[key] operator[SEP] {
identifier[GinjectorBindings] identifier[initialPosition] operator[=] identifier[output] operator[SEP] identifier[getGraph] operator[... |
public GSBMXMODE createGSBMXMODEFromString(EDataType eDataType, String initialValue) {
GSBMXMODE result = GSBMXMODE.get(initialValue);
if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
return result;
} | class class_name[name] begin[{]
method[createGSBMXMODEFromString, return_type[type[GSBMXMODE]], modifier[public], parameter[eDataType, initialValue]] begin[{]
local_variable[type[GSBMXMODE], result]
if[binary_operation[member[.result], ==, literal[null]]] begin[{]
ThrowStatement(express... | Keyword[public] identifier[GSBMXMODE] identifier[createGSBMXMODEFromString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[String] identifier[initialValue] operator[SEP] {
identifier[GSBMXMODE] identifier[result] operator[=] identifier[GSBMXMODE] operator[SEP] identifier[get] operator[SE... |
public void setCompanions(com.google.api.ads.admanager.axis.v201811.AdUnitSize[] companions) {
this.companions = companions;
} | class class_name[name] begin[{]
method[setCompanions, return_type[void], modifier[public], parameter[companions]] begin[{]
assign[THIS[member[None.companions]], member[.companions]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setCompanions] operator[SEP] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[admanager] operator[SEP] identifier[axis] operator[SEP] identifier[v201811] operator[SEP] identifier[AdUnitSize] ope... |
private void appendListOfValues(StringBuffer stmt)
{
int cnt = getColumns().length;
stmt.append(" VALUES (");
for (int i = 0; i < cnt; i++)
{
if (i > 0)
{
stmt.append(',');
}
stmt.append('?');
}
... | class class_name[name] begin[{]
method[appendListOfValues, return_type[void], modifier[private], parameter[stmt]] begin[{]
local_variable[type[int], cnt]
call[stmt.append, parameter[literal[" VALUES ("]]]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condi... | Keyword[private] Keyword[void] identifier[appendListOfValues] operator[SEP] identifier[StringBuffer] identifier[stmt] operator[SEP] {
Keyword[int] identifier[cnt] operator[=] identifier[getColumns] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] identifier[stmt] operator[SEP] identifie... |
public static void waitUntilAllElementsArePresent(final String... locators) {
logger.entering(new Object[] { Arrays.toString(locators) });
Preconditions.checkArgument(locators != null, "Please provide a valid set of locators.");
for (String eachLocator : locators) {
waitUntilElementI... | class class_name[name] begin[{]
method[waitUntilAllElementsArePresent, return_type[void], modifier[public static], parameter[locators]] begin[{]
call[logger.entering, parameter[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[MemberReference... | Keyword[public] Keyword[static] Keyword[void] identifier[waitUntilAllElementsArePresent] operator[SEP] Keyword[final] identifier[String] operator[...] identifier[locators] operator[SEP] {
identifier[logger] operator[SEP] identifier[entering] operator[SEP] Keyword[new] identifier[Object] operator[SEP] operator[SE... |
@Override
public ChangeMessageVisibilityResult changeMessageVisibility(ChangeMessageVisibilityRequest request) {
request = beforeClientExecution(request);
return executeChangeMessageVisibility(request);
} | class class_name[name] begin[{]
method[changeMessageVisibility, return_type[type[ChangeMessageVisibilityResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeChangeMessageVisibilit... | annotation[@] identifier[Override] Keyword[public] identifier[ChangeMessageVisibilityResult] identifier[changeMessageVisibility] operator[SEP] identifier[ChangeMessageVisibilityRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[... |
@Override
public void destroy() {
// SDC-6258 - destroy() is called from a different thread, so we
// need to signal produce() to terminate early
destroyed.set(true);
if (job != null) {
try {
try {
bulkConnection.abortJob(job.getId());
} catch (AsyncApiException e) {
... | class class_name[name] begin[{]
method[destroy, return_type[void], modifier[public], parameter[]] begin[{]
call[destroyed.set, parameter[literal[true]]]
if[binary_operation[member[.job], !=, literal[null]]] begin[{]
TryStatement(block=[TryStatement(block=[StatementEx... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[destroy] operator[SEP] operator[SEP] {
identifier[destroyed] operator[SEP] identifier[set] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[job] operator[!=] Other[null] operator[SEP] {
... |
public static List<CommerceAccountOrganizationRel> findByOrganizationId(
long organizationId, int start, int end,
OrderByComparator<CommerceAccountOrganizationRel> orderByComparator) {
return getPersistence()
.findByOrganizationId(organizationId, start, end,
orderByComparator);
} | class class_name[name] begin[{]
method[findByOrganizationId, return_type[type[List]], modifier[public static], parameter[organizationId, start, end, orderByComparator]] begin[{]
return[call[.getPersistence, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[CommerceAccountOrganizationRel] operator[>] identifier[findByOrganizationId] operator[SEP] Keyword[long] identifier[organizationId] , Keyword[int] identifier[start] , Keyword[int] identifier[end] , identifier[OrderByComparator] operator[<] ident... |
public synchronized DoubleHistogram getIntervalHistogram(DoubleHistogram histogramToRecycle) {
// Verify that replacement histogram can validly be used as an inactive histogram replacement:
validateFitAsReplacementHistogram(histogramToRecycle);
inactiveHistogram = (InternalConcurrentDoubleHistog... | class class_name[name] begin[{]
method[getIntervalHistogram, return_type[type[DoubleHistogram]], modifier[synchronized public], parameter[histogramToRecycle]] begin[{]
call[.validateFitAsReplacementHistogram, parameter[member[.histogramToRecycle]]]
assign[member[.inactiveHistogr... | Keyword[public] Keyword[synchronized] identifier[DoubleHistogram] identifier[getIntervalHistogram] operator[SEP] identifier[DoubleHistogram] identifier[histogramToRecycle] operator[SEP] {
identifier[validateFitAsReplacementHistogram] operator[SEP] identifier[histogramToRecycle] operator[SEP] operator[SEP] identi... |
public static <T> Iterator<T> takeWhile(Iterator<T> self, @ClosureParams(FirstParam.FirstGenericType.class) Closure condition) {
return new TakeWhileIterator<T>(self, condition);
} | class class_name[name] begin[{]
method[takeWhile, return_type[type[Iterator]], modifier[public static], parameter[self, condition]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=self, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=condition... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Iterator] operator[<] identifier[T] operator[>] identifier[takeWhile] operator[SEP] identifier[Iterator] operator[<] identifier[T] operator[>] identifier[self] , annotation[@] identifier[ClosureParams] operator[SEP] identifier[FirstParam]... |
public Element getContainer(PlotItem item, VisualizationTask task) {
Pair<Element, Visualization> pair = map.get(key(item, task));
return pair == null ? null : pair.first;
} | class class_name[name] begin[{]
method[getContainer, return_type[type[Element]], modifier[public], parameter[item, task]] begin[{]
local_variable[type[Pair], pair]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=pair, postfix_operators=[], prefix_operators=[],... | Keyword[public] identifier[Element] identifier[getContainer] operator[SEP] identifier[PlotItem] identifier[item] , identifier[VisualizationTask] identifier[task] operator[SEP] {
identifier[Pair] operator[<] identifier[Element] , identifier[Visualization] operator[>] identifier[pair] operator[=] identifier[map]... |
public Object get(Object obj, Object... args)
throws IllegalArgumentException, IllegalAccessException,
InvocationTargetException, BeanPropertyException,
NoSuchMethodException {
if (m_f != null)
return m_f.get(obj);
if (m_mGet != null)
if (args == null || args.length == 0)
return m_mGet.invoke(ob... | class class_name[name] begin[{]
method[get, return_type[type[Object]], modifier[public], parameter[obj, args]] begin[{]
if[binary_operation[member[.m_f], !=, literal[null]]] begin[{]
return[call[m_f.get, parameter[member[.obj]]]]
else begin[{]
None
end[}]
if[bina... | Keyword[public] identifier[Object] identifier[get] operator[SEP] identifier[Object] identifier[obj] , identifier[Object] operator[...] identifier[args] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] , identifier[IllegalAccessException] , identifier[InvocationTargetException] , identifier[BeanPro... |
private List<Class<?>> scanClassAndPutMetadata(InputStream bits, Reader reader,
Map<String, EntityMetadata> entityMetadataMap, Map<String, Class<?>> entityNameToClassMap,
String persistenceUnit, String client, Map<String, List<String>> clazzToPuMap,
Map<String, IdDiscriptor> entit... | class class_name[name] begin[{]
method[scanClassAndPutMetadata, return_type[type[List]], modifier[private], parameter[bits, reader, entityMetadataMap, entityNameToClassMap, persistenceUnit, client, clazzToPuMap, entityNameToKeyDiscriptorMap]] begin[{]
local_variable[type[DataInputStream], dstream]
... | Keyword[private] identifier[List] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[scanClassAndPutMetadata] operator[SEP] identifier[InputStream] identifier[bits] , identifier[Reader] identifier[reader] , identifier[Map] operator[<] identifier[String] , identifier[EntityMetada... |
File getSyncLogTemporaryFile(long segmentTxId, long endTxId, long stamp) {
String name = NNStorage.getFinalizedEditsFileName(segmentTxId, endTxId) +
".tmp=" + stamp;
return new File(sd.getCurrentDir(), name);
} | class class_name[name] begin[{]
method[getSyncLogTemporaryFile, return_type[type[File]], modifier[default], parameter[segmentTxId, endTxId, stamp]] begin[{]
local_variable[type[String], name]
return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getCurrentDir, postfix_operators=[... | identifier[File] identifier[getSyncLogTemporaryFile] operator[SEP] Keyword[long] identifier[segmentTxId] , Keyword[long] identifier[endTxId] , Keyword[long] identifier[stamp] operator[SEP] {
identifier[String] identifier[name] operator[=] identifier[NNStorage] operator[SEP] identifier[getFinalizedEditsFileName... |
@Nonnull
public static String getWithTrailing (@Nullable final String sSrc, @Nonnegative final int nMinLen, final char cEnd)
{
return _getWithLeadingOrTrailing (sSrc, nMinLen, cEnd, false);
} | class class_name[name] begin[{]
method[getWithTrailing, return_type[type[String]], modifier[public static], parameter[sSrc, nMinLen, cEnd]] begin[{]
return[call[._getWithLeadingOrTrailing, parameter[member[.sSrc], member[.nMinLen], member[.cEnd], literal[false]]]]
end[}]
END[}] | annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] identifier[String] identifier[getWithTrailing] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[sSrc] , annotation[@] identifier[Nonnegative] Keyword[final] Keyword[int] identifier[nMinLen] , Keyword[final] ... |
public WhiteSpaceInfo getStripSpace(int i) throws ArrayIndexOutOfBoundsException
{
if (null == m_whitespaceStrippingElements)
throw new ArrayIndexOutOfBoundsException();
return (WhiteSpaceInfo) m_whitespaceStrippingElements.elementAt(i);
} | class class_name[name] begin[{]
method[getStripSpace, return_type[type[WhiteSpaceInfo]], modifier[public], parameter[i]] begin[{]
if[binary_operation[literal[null], ==, member[.m_whitespaceStrippingElements]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_... | Keyword[public] identifier[WhiteSpaceInfo] identifier[getStripSpace] operator[SEP] Keyword[int] identifier[i] operator[SEP] Keyword[throws] identifier[ArrayIndexOutOfBoundsException] {
Keyword[if] operator[SEP] Other[null] operator[==] identifier[m_whitespaceStrippingElements] operator[SEP] Keyword[throw] Keywor... |
private static String determineGlobalRoot() throws IOException {
String userhome = System.getProperty("user.home");
String whileydir = userhome + File.separator + ".whiley";
return whileydir;
} | class class_name[name] begin[{]
method[determineGlobalRoot, return_type[type[String]], modifier[private static], parameter[]] begin[{]
local_variable[type[String], userhome]
local_variable[type[String], whileydir]
return[member[.whileydir]]
end[}]
END[}] | Keyword[private] Keyword[static] identifier[String] identifier[determineGlobalRoot] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[userhome] operator[=] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operat... |
public void clearOutputs() {
unCache();
for (TransactionOutput output : outputs) {
output.setParent(null);
}
outputs.clear();
// You wanted to reserialize, right?
this.length = this.unsafeBitcoinSerialize().length;
} | class class_name[name] begin[{]
method[clearOutputs, return_type[void], modifier[public], parameter[]] begin[{]
call[.unCache, parameter[]]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], p... | Keyword[public] Keyword[void] identifier[clearOutputs] operator[SEP] operator[SEP] {
identifier[unCache] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[TransactionOutput] identifier[output] operator[:] identifier[outputs] operator[SEP] {
identifier[output] operator[SE... |
public @NotNull ShortAssert isLessThanOrEqualTo(short other) {
if (actual <= other) {
return this;
}
failIfCustomMessageIsSet();
throw failure(unexpectedGreaterThan(actual, other));
} | class class_name[name] begin[{]
method[isLessThanOrEqualTo, return_type[type[ShortAssert]], modifier[public], parameter[other]] begin[{]
if[binary_operation[member[.actual], <=, member[.other]]] begin[{]
return[THIS[]]
else begin[{]
None
end[}]
call[.... | Keyword[public] annotation[@] identifier[NotNull] identifier[ShortAssert] identifier[isLessThanOrEqualTo] operator[SEP] Keyword[short] identifier[other] operator[SEP] {
Keyword[if] operator[SEP] identifier[actual] operator[<=] identifier[other] operator[SEP] {
Keyword[return] Keyword[this] operator[SE... |
public synchronized void done(TaskAttemptID taskid)
throws IOException {
TaskInProgress tip = tasks.get(taskid);
commitResponses.remove(taskid);
if (tip != null) {
tip.reportDone();
} else {
LOG.warn("Unknown child task done: "+taskid+". Ignored.");
}
} | class class_name[name] begin[{]
method[done, return_type[void], modifier[synchronized public], parameter[taskid]] begin[{]
local_variable[type[TaskInProgress], tip]
call[commitResponses.remove, parameter[member[.taskid]]]
if[binary_operation[member[.tip], !=, literal[nul... | Keyword[public] Keyword[synchronized] Keyword[void] identifier[done] operator[SEP] identifier[TaskAttemptID] identifier[taskid] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[TaskInProgress] identifier[tip] operator[=] identifier[tasks] operator[SEP] identifier[get] operator[SEP] identifier[t... |
public double score(StringWrapper s,StringWrapper t) {
if (scaling) {
int minLen = Math.min( s.unwrap().length(), t.unwrap().length() );
return super.score(s,t) / (minLen * CHAR_EXACT_MATCH_SCORE);
} else {
return super.score(s,t);
}
} | class class_name[name] begin[{]
method[score, return_type[type[double]], modifier[public], parameter[s, t]] begin[{]
if[member[.scaling]] begin[{]
local_variable[type[int], minLen]
return[binary_operation[SuperMethodInvocation(arguments=[MemberReference(member=s, postfix... | Keyword[public] Keyword[double] identifier[score] operator[SEP] identifier[StringWrapper] identifier[s] , identifier[StringWrapper] identifier[t] operator[SEP] {
Keyword[if] operator[SEP] identifier[scaling] operator[SEP] {
Keyword[int] identifier[minLen] operator[=] identifier[Math] operator[SEP] id... |
public GetUsersSuccessResponse getUsers(Integer limit, Integer offset, String order, String sortBy, String filterName, String filterParameters, String roles, String skills, Boolean userEnabled, String userValid) throws ApiException {
ApiResponse<GetUsersSuccessResponse> resp = getUsersWithHttpInfo(limit, offset... | class class_name[name] begin[{]
method[getUsers, return_type[type[GetUsersSuccessResponse]], modifier[public], parameter[limit, offset, order, sortBy, filterName, filterParameters, roles, skills, userEnabled, userValid]] begin[{]
local_variable[type[ApiResponse], resp]
return[call[resp.getData,... | Keyword[public] identifier[GetUsersSuccessResponse] identifier[getUsers] operator[SEP] identifier[Integer] identifier[limit] , identifier[Integer] identifier[offset] , identifier[String] identifier[order] , identifier[String] identifier[sortBy] , identifier[String] identifier[filterName] , identifier[String] ident... |
private void marshalUpdatedTimestamp() {
PropertyMetadata updatedTimestampMetadata = entityMetadata.getUpdatedTimestampMetadata();
if (updatedTimestampMetadata != null) {
applyAutoTimestamp(updatedTimestampMetadata, System.currentTimeMillis());
}
} | class class_name[name] begin[{]
method[marshalUpdatedTimestamp, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[PropertyMetadata], updatedTimestampMetadata]
if[binary_operation[member[.updatedTimestampMetadata], !=, literal[null]]] begin[{]
... | Keyword[private] Keyword[void] identifier[marshalUpdatedTimestamp] operator[SEP] operator[SEP] {
identifier[PropertyMetadata] identifier[updatedTimestampMetadata] operator[=] identifier[entityMetadata] operator[SEP] identifier[getUpdatedTimestampMetadata] operator[SEP] operator[SEP] operator[SEP] Keyword[if] ope... |
private void write(final byte memAddr, final int value) throws IOException {
// bit 8 of value
byte firstBit = (byte) ((value >> 8) & 0x000001);
// ask device for setting a value - see FIGURE 7-2
byte cmd = (byte) ((memAddr << 4) | CMD_WRITE | firstBit);
// 7 bits of value
byte data = (byte) (value & 0x0... | class class_name[name] begin[{]
method[write, return_type[void], modifier[private], parameter[memAddr, value]] begin[{]
local_variable[type[byte], firstBit]
local_variable[type[byte], cmd]
local_variable[type[byte], data]
local_variable[type[byte], sequence]
call... | Keyword[private] Keyword[void] identifier[write] operator[SEP] Keyword[final] Keyword[byte] identifier[memAddr] , Keyword[final] Keyword[int] identifier[value] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[byte] identifier[firstBit] operator[=] operator[SEP] Keyword[byte] operator[SEP] operato... |
public void marshall(FunctionExecutionConfig functionExecutionConfig, ProtocolMarshaller protocolMarshaller) {
if (functionExecutionConfig == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(functionEx... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[functionExecutionConfig, protocolMarshaller]] begin[{]
if[binary_operation[member[.functionExecutionConfig], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[FunctionExecutionConfig] identifier[functionExecutionConfig] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[functionExecutionConfig] operator[==] Other[null] operator... |
public static void getComments (Activity context, CommentListListener listener, long...ids) {
proxy.getComments(context, listener, ids);
} | class class_name[name] begin[{]
method[getComments, return_type[void], modifier[public static], parameter[context, listener, ids]] begin[{]
call[proxy.getComments, parameter[member[.context], member[.listener], member[.ids]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[getComments] operator[SEP] identifier[Activity] identifier[context] , identifier[CommentListListener] identifier[listener] , Keyword[long] operator[...] identifier[ids] operator[SEP] {
identifier[proxy] operator[SEP] identifier[getComments] operator[SEP]... |
public static int getNextPow2TwinPrime(int m)
{
int pos = Arrays.binarySearch(twinPrimesP2, m+1);
if(pos >= 0)
return twinPrimesP2[pos];
else
return twinPrimesP2[-pos - 1];
} | class class_name[name] begin[{]
method[getNextPow2TwinPrime, return_type[type[int]], modifier[public static], parameter[m]] begin[{]
local_variable[type[int], pos]
if[binary_operation[member[.pos], >=, literal[0]]] begin[{]
return[member[.twinPrimesP2]]
else begin[{]
return[memb... | Keyword[public] Keyword[static] Keyword[int] identifier[getNextPow2TwinPrime] operator[SEP] Keyword[int] identifier[m] operator[SEP] {
Keyword[int] identifier[pos] operator[=] identifier[Arrays] operator[SEP] identifier[binarySearch] operator[SEP] identifier[twinPrimesP2] , identifier[m] operator[+] Other[1] op... |
public void prepare (int tint, AffineTransform xf) {
prepare(tint, xf.m00, xf.m01, xf.m10, xf.m11, xf.tx, xf.ty);
} | class class_name[name] begin[{]
method[prepare, return_type[void], modifier[public], parameter[tint, xf]] begin[{]
call[.prepare, parameter[member[.tint], member[xf.m00], member[xf.m01], member[xf.m10], member[xf.m11], member[xf.tx], member[xf.ty]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[prepare] operator[SEP] Keyword[int] identifier[tint] , identifier[AffineTransform] identifier[xf] operator[SEP] {
identifier[prepare] operator[SEP] identifier[tint] , identifier[xf] operator[SEP] identifier[m00] , identifier[xf] operator[SEP] identifier[m01] , identif... |
private void initUpperLeftComponent() {
m_upperLeftComponent = new HorizontalLayout();
m_upperLeftComponent.setHeight("100%");
m_upperLeftComponent.setSpacing(true);
m_upperLeftComponent.setDefaultComponentAlignment(Alignment.MIDDLE_RIGHT);
m_upperLeftComponent.addComponent(m_la... | class class_name[name] begin[{]
method[initUpperLeftComponent, return_type[void], modifier[private], parameter[]] begin[{]
assign[member[.m_upperLeftComponent], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, sele... | Keyword[private] Keyword[void] identifier[initUpperLeftComponent] operator[SEP] operator[SEP] {
identifier[m_upperLeftComponent] operator[=] Keyword[new] identifier[HorizontalLayout] operator[SEP] operator[SEP] operator[SEP] identifier[m_upperLeftComponent] operator[SEP] identifier[setHeight] operator[SEP] liter... |
public Subscription withEventSubscriptions(EventSubscription... eventSubscriptions) {
if (this.eventSubscriptions == null) {
setEventSubscriptions(new java.util.ArrayList<EventSubscription>(eventSubscriptions.length));
}
for (EventSubscription ele : eventSubscriptions) {
... | class class_name[name] begin[{]
method[withEventSubscriptions, return_type[type[Subscription]], modifier[public], parameter[eventSubscriptions]] begin[{]
if[binary_operation[THIS[member[None.eventSubscriptions]], ==, literal[null]]] begin[{]
call[.setEventSubscriptions, ... | Keyword[public] identifier[Subscription] identifier[withEventSubscriptions] operator[SEP] identifier[EventSubscription] operator[...] identifier[eventSubscriptions] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[eventSubscriptions] operator[==] Other[null] operator[SEP] {
... |
@Override
public void deleteSelectedText()
{
if (!selectingText)
return;
int start = Math.min(selectionCursor.index, cursor.index);
int end = Math.max(selectionCursor.index, cursor.index);
password.delete(start, end);
updateText();
selectingText = false;
cursor.jumpTo(start);
} | class class_name[name] begin[{]
method[deleteSelectedText, return_type[void], modifier[public], parameter[]] begin[{]
if[member[.selectingText]] begin[{]
return[None]
else begin[{]
None
end[}]
local_variable[type[int], start]
local_variable[type[int], end]
... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[deleteSelectedText] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[selectingText] operator[SEP] Keyword[return] operator[SEP] Keyword[int] identifier[start] operator[=] identifier[Math] operator[SEP] ident... |
@Override
protected Parcelable onSaveInstanceState() {
final Bundle bundle = new Bundle();
bundle.putParcelable("SUPER", super.onSaveInstanceState());
bundle.putDouble("MIN", normalizedMinValue);
bundle.putDouble("MAX", normalizedMaxValue);
return bundle;
} | class class_name[name] begin[{]
method[onSaveInstanceState, return_type[type[Parcelable]], modifier[protected], parameter[]] begin[{]
local_variable[type[Bundle], bundle]
call[bundle.putParcelable, parameter[literal["SUPER"], SuperMethodInvocation(arguments=[], member=onSaveInstanceStat... | annotation[@] identifier[Override] Keyword[protected] identifier[Parcelable] identifier[onSaveInstanceState] operator[SEP] operator[SEP] {
Keyword[final] identifier[Bundle] identifier[bundle] operator[=] Keyword[new] identifier[Bundle] operator[SEP] operator[SEP] operator[SEP] identifier[bundle] operator[SEP] id... |
public static MozuUrl performPaymentActionUrl(String orderId, String paymentId, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/payments/{paymentId}/actions?responseFields={responseFields}");
formatter.formatUrl("orderId", orderId);
formatter.formatUrl("paym... | class class_name[name] begin[{]
method[performPaymentActionUrl, return_type[type[MozuUrl]], modifier[public static], parameter[orderId, paymentId, responseFields]] begin[{]
local_variable[type[UrlFormatter], formatter]
call[formatter.formatUrl, parameter[literal["orderId"], member[.orde... | Keyword[public] Keyword[static] identifier[MozuUrl] identifier[performPaymentActionUrl] operator[SEP] identifier[String] identifier[orderId] , identifier[String] identifier[paymentId] , identifier[String] identifier[responseFields] operator[SEP] {
identifier[UrlFormatter] identifier[formatter] operator[=] Keyw... |
public UnprotectedStringBuffer getAttributeValueByLocalName(CharSequence name) {
for (Attribute attr : event.attributes)
if (attr.localName.equals(name))
return attr.value;
return null;
} | class class_name[name] begin[{]
method[getAttributeValueByLocalName, return_type[type[UnprotectedStringBuffer]], modifier[public], parameter[name]] begin[{]
ForStatement(body=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualif... | Keyword[public] identifier[UnprotectedStringBuffer] identifier[getAttributeValueByLocalName] operator[SEP] identifier[CharSequence] identifier[name] operator[SEP] {
Keyword[for] operator[SEP] identifier[Attribute] identifier[attr] operator[:] identifier[event] operator[SEP] identifier[attributes] operator[SEP] ... |
protected Supplier<DataSource<IMAGE>> obtainDataSourceSupplier(
final DraweeController controller, final String controllerId) {
if (mDataSourceSupplier != null) {
return mDataSourceSupplier;
}
Supplier<DataSource<IMAGE>> supplier = null;
// final image supplier;
if (mImageRequest != nu... | class class_name[name] begin[{]
method[obtainDataSourceSupplier, return_type[type[Supplier]], modifier[protected], parameter[controller, controllerId]] begin[{]
if[binary_operation[member[.mDataSourceSupplier], !=, literal[null]]] begin[{]
return[member[.mDataSourceSupplier]]
... | Keyword[protected] identifier[Supplier] operator[<] identifier[DataSource] operator[<] identifier[IMAGE] operator[>] operator[>] identifier[obtainDataSourceSupplier] operator[SEP] Keyword[final] identifier[DraweeController] identifier[controller] , Keyword[final] identifier[String] identifier[controllerId] operator[SE... |
private static AbstractExpression transformExpressionRidofPVE(AbstractExpression src) {
AbstractExpression left = src.getLeft(), right = src.getRight();
if (left != null) {
left = transformExpressionRidofPVE(left);
}
if (right != null) {
right = transformExpressio... | class class_name[name] begin[{]
method[transformExpressionRidofPVE, return_type[type[AbstractExpression]], modifier[private static], parameter[src]] begin[{]
local_variable[type[AbstractExpression], left]
if[binary_operation[member[.left], !=, literal[null]]] begin[{]
... | Keyword[private] Keyword[static] identifier[AbstractExpression] identifier[transformExpressionRidofPVE] operator[SEP] identifier[AbstractExpression] identifier[src] operator[SEP] {
identifier[AbstractExpression] identifier[left] operator[=] identifier[src] operator[SEP] identifier[getLeft] operator[SEP] operator... |
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case AfplibPackage.FND__TYPE_FC_DESC:
return getTypeFcDesc();
case AfplibPackage.FND__FT_WT_CLASS:
return getFtWtClass();
case AfplibPackage.FND__FT_WD_CLASS:
return getFtWdClass();
case Afpl... | class class_name[name] begin[{]
method[eGet, return_type[type[Object]], modifier[public], parameter[featureID, resolve, coreType]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=FND__TYPE_FC_DESC, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, sele... | 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 void setDrawMode(int mode) {
predraw();
currentDrawingMode = mode;
if (currentDrawingMode == MODE_NORMAL) {
GL.glEnable(SGL.GL_BLEND);
GL.glColorMask(true, true, true, true);
GL.glBlendFunc(SGL.GL_SRC_ALPHA, SGL.GL_ONE_MINUS_SRC_ALPHA);
}
if (currentDrawingMode == MODE_ALPHA_MAP) {
... | class class_name[name] begin[{]
method[setDrawMode, return_type[void], modifier[public], parameter[mode]] begin[{]
call[.predraw, parameter[]]
assign[member[.currentDrawingMode], member[.mode]]
if[binary_operation[member[.currentDrawingMode], ==, member[.MODE_NOR... | Keyword[public] Keyword[void] identifier[setDrawMode] operator[SEP] Keyword[int] identifier[mode] operator[SEP] {
identifier[predraw] operator[SEP] operator[SEP] operator[SEP] identifier[currentDrawingMode] operator[=] identifier[mode] operator[SEP] Keyword[if] operator[SEP] identifier[currentDrawingMode] operat... |
@SuppressWarnings({"SynchronizationOnLocalVariableOrMethodParameter"})
public void registerEventListener(EventModel event, EventListenerModel eventListener) throws IllegalIDException {
registerEventListener(event.getAllInformations(), eventListener);
} | class class_name[name] begin[{]
method[registerEventListener, return_type[void], modifier[public], parameter[event, eventListener]] begin[{]
call[.registerEventListener, parameter[call[event.getAllInformations, parameter[]], member[.eventListener]]]
end[}]
END[}] | annotation[@] identifier[SuppressWarnings] operator[SEP] {
literal[String]
} operator[SEP] Keyword[public] Keyword[void] identifier[registerEventListener] operator[SEP] identifier[EventModel] identifier[event] , identifier[EventListenerModel] identifier[eventListener] operator[SEP] Keyword[throws] identifier... |
public static File createDirectory(File parent, String name) {
File created = new File(parent, name);
checkDirectory(created);
return created;
} | class class_name[name] begin[{]
method[createDirectory, return_type[type[File]], modifier[public static], parameter[parent, name]] begin[{]
local_variable[type[File], created]
call[.checkDirectory, parameter[member[.created]]]
return[member[.created]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[File] identifier[createDirectory] operator[SEP] identifier[File] identifier[parent] , identifier[String] identifier[name] operator[SEP] {
identifier[File] identifier[created] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[parent] , identifier[name]... |
public int create(User registrar) throws IdentityException, InvalidArgumentException {
if (this.deleted) {
throw new IdentityException("Identity has been deleted");
}
if (registrar == null) {
throw new InvalidArgumentException("Registrar should be a valid member");
... | class class_name[name] begin[{]
method[create, return_type[type[int]], modifier[public], parameter[registrar]] begin[{]
if[THIS[member[None.deleted]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, select... | Keyword[public] Keyword[int] identifier[create] operator[SEP] identifier[User] identifier[registrar] operator[SEP] Keyword[throws] identifier[IdentityException] , identifier[InvalidArgumentException] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[deleted] operator[SEP] {
Keyword[t... |
@Override
public Map<String, String> getMaterialsDescription() {
return matDesc == null
? encryptionMaterials.getMaterialsDescription()
: matDesc
;
} | class class_name[name] begin[{]
method[getMaterialsDescription, return_type[type[Map]], modifier[public], parameter[]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=matDesc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Lite... | annotation[@] identifier[Override] Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[getMaterialsDescription] operator[SEP] operator[SEP] {
Keyword[return] identifier[matDesc] operator[==] Other[null] operator[?] identifier[encryptionMaterials] operator[S... |
public TrackerClient getCurrentTrackerClient(AnnounceableInformation torrent) {
final URI uri = getURIForTorrent(torrent);
if (uri == null) return null;
return this.clients.get(uri.toString());
} | class class_name[name] begin[{]
method[getCurrentTrackerClient, return_type[type[TrackerClient]], modifier[public], parameter[torrent]] begin[{]
local_variable[type[URI], uri]
if[binary_operation[member[.uri], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None... | Keyword[public] identifier[TrackerClient] identifier[getCurrentTrackerClient] operator[SEP] identifier[AnnounceableInformation] identifier[torrent] operator[SEP] {
Keyword[final] identifier[URI] identifier[uri] operator[=] identifier[getURIForTorrent] operator[SEP] identifier[torrent] operator[SEP] operator[SEP]... |
public boolean isValidPosixFileChar(char c) {
if ((((c >= 'A') && (c <= 'Z')) || ((c >= 'a') && (c <= 'z')) ||
((c >= '0') && (c <= '9'))
|| (c == '.') || (c == '_') || (c == '-'))) {
return true;
} else {
return false;
}
} | class class_name[name] begin[{]
method[isValidPosixFileChar, return_type[type[boolean]], modifier[public], parameter[c]] begin[{]
if[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[member[.c], >=, literal['A']], &&, binary_o... | Keyword[public] Keyword[boolean] identifier[isValidPosixFileChar] operator[SEP] Keyword[char] identifier[c] operator[SEP] {
Keyword[if] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[c] operator[>=] literal[String] operator[SEP] operator[&&] operator[SEP] identifier[c] operator[<=] literal[St... |
public static void log(IoSession session, Logger logger, String message, Throwable t) {
boolean isIOException = t instanceof IOException;
if (isIOException && !logger.isInfoEnabled()) {
return;
}
if (logger.isWarnEnabled()) {
String finalMessage = t.getCause() == ... | class class_name[name] begin[{]
method[log, return_type[void], modifier[public static], parameter[session, logger, message, t]] begin[{]
local_variable[type[boolean], isIOException]
if[binary_operation[member[.isIOException], &&, call[logger.isInfoEnabled, parameter[]]]] begin[{]
... | Keyword[public] Keyword[static] Keyword[void] identifier[log] operator[SEP] identifier[IoSession] identifier[session] , identifier[Logger] identifier[logger] , identifier[String] identifier[message] , identifier[Throwable] identifier[t] operator[SEP] {
Keyword[boolean] identifier[isIOException] operator[=] id... |
public void mergeDuplicate() {
for(int i = 0; i < labels.size(); i++)
for(int j = i + 1; j < labels.size(); j++){
T tagi = labels.get(i);
T tagj = labels.get(j);
if(tagi.equals(tagj)){
scores.set(i, scores.get(i) + scores.get(j));
labels.remove(j);
scores.remove(j);
j--;
... | class class_name[name] begin[{]
method[mergeDuplicate, return_type[void], modifier[public], parameter[]] begin[{]
ForStatement(body=ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocati... | Keyword[public] Keyword[void] identifier[mergeDuplicate] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[labels] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] opera... |
void recoverExchangeBindings(Iterable<Binding> exchangeBindings) throws Exception {
if (exchangeBindings != null)
synchronized (exchangeBindings) {
for (Binding binding : exchangeBindings)
try {
log.info("Recovering exchange binding from {} to {} with {} via {}", binding.source,
... | class class_name[name] begin[{]
method[recoverExchangeBindings, return_type[void], modifier[default], parameter[exchangeBindings]] begin[{]
if[binary_operation[member[.exchangeBindings], !=, literal[null]]] begin[{]
SYNCHRONIZED[member[.exchangeBindings]] BEGIN[{]
Fo... | Keyword[void] identifier[recoverExchangeBindings] operator[SEP] identifier[Iterable] operator[<] identifier[Binding] operator[>] identifier[exchangeBindings] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[if] operator[SEP] identifier[exchangeBindings] operator[!=] Other[null] operator[SEP] Keyword... |
public static int v(String tag, String msg, Throwable tr) {
return println_native(LOG_ID_MAIN, VERBOSE, tag, msg + '\n' + getStackTraceString(tr));
} | class class_name[name] begin[{]
method[v, return_type[type[int]], modifier[public static], parameter[tag, msg, tr]] begin[{]
return[call[.println_native, parameter[member[.LOG_ID_MAIN], member[.VERBOSE], member[.tag], binary_operation[binary_operation[member[.msg], +, literal['\n']], +, call[.getStackT... | Keyword[public] Keyword[static] Keyword[int] identifier[v] operator[SEP] identifier[String] identifier[tag] , identifier[String] identifier[msg] , identifier[Throwable] identifier[tr] operator[SEP] {
Keyword[return] identifier[println_native] operator[SEP] identifier[LOG_ID_MAIN] , identifier[VERBOSE] , iden... |
@SuppressWarnings("LockNotBeforeTry")
public void init() {
connectionLock.lock();
state = State.Initial;
failureException = null;
smackWrappedExcpetion = null;
connectionLock.unlock();
} | class class_name[name] begin[{]
method[init, return_type[void], modifier[public], parameter[]] begin[{]
call[connectionLock.lock, parameter[]]
assign[member[.state], member[State.Initial]]
assign[member[.failureException], literal[null]]
assign[me... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[init] operator[SEP] operator[SEP] {
identifier[connectionLock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[=] identifier[State] o... |
public StyleSet setFont(short color, short fontSize, String fontName, boolean ignoreHead) {
final Font font = StyleUtil.createFont(this.workbook, color, fontSize, fontName);
return setFont(font, ignoreHead);
} | class class_name[name] begin[{]
method[setFont, return_type[type[StyleSet]], modifier[public], parameter[color, fontSize, fontName, ignoreHead]] begin[{]
local_variable[type[Font], font]
return[call[.setFont, parameter[member[.font], member[.ignoreHead]]]]
end[}]
END[}] | Keyword[public] identifier[StyleSet] identifier[setFont] operator[SEP] Keyword[short] identifier[color] , Keyword[short] identifier[fontSize] , identifier[String] identifier[fontName] , Keyword[boolean] identifier[ignoreHead] operator[SEP] {
Keyword[final] identifier[Font] identifier[font] operator[=] identif... |
public void begin(Tx beginTx, Contexts pushContexts) throws CSIException {
final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
if (isTraceOn && tc.isEntryEnabled())
Tr.entry(tc, "begin: tx=" + beginTx + ", contexts=" + pushContexts);
ivThreadData = EJSContainer.getThread... | class class_name[name] begin[{]
method[begin, return_type[void], modifier[public], parameter[beginTx, pushContexts]] begin[{]
local_variable[type[boolean], isTraceOn]
if[binary_operation[member[.isTraceOn], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[Tr.entry, p... | Keyword[public] Keyword[void] identifier[begin] operator[SEP] identifier[Tx] identifier[beginTx] , identifier[Contexts] identifier[pushContexts] operator[SEP] Keyword[throws] identifier[CSIException] {
Keyword[final] Keyword[boolean] identifier[isTraceOn] operator[=] identifier[TraceComponent] operator[SEP] ide... |
@PublicEvolving
public <OUT> DataStreamSource<OUT> createInput(InputFormat<OUT, ?> inputFormat) {
return createInput(inputFormat, TypeExtractor.getInputFormatTypes(inputFormat));
} | class class_name[name] begin[{]
method[createInput, return_type[type[DataStreamSource]], modifier[public], parameter[inputFormat]] begin[{]
return[call[.createInput, parameter[member[.inputFormat], call[TypeExtractor.getInputFormatTypes, parameter[member[.inputFormat]]]]]]
end[}]
END[}] | annotation[@] identifier[PublicEvolving] Keyword[public] operator[<] identifier[OUT] operator[>] identifier[DataStreamSource] operator[<] identifier[OUT] operator[>] identifier[createInput] operator[SEP] identifier[InputFormat] operator[<] identifier[OUT] , operator[?] operator[>] identifier[inputFormat] operator[SEP]... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.