code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
@Override protected void initialize(final char[] input) { super.initialize(input); this.tag = new ParsedTag(); this.doctype = new ParsedDoctype(); this.text = new char[1024]; this.textLen = 0; this.parsingTime = -1; }
class class_name[name] begin[{] method[initialize, return_type[void], modifier[protected], parameter[input]] begin[{] SuperMethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=initialize, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) assign[THIS[member[None.tag]], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ParsedTag, sub_type=None))] assign[THIS[member[None.doctype]], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ParsedDoctype, sub_type=None))] assign[THIS[member[None.text]], ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1024)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=char))] assign[THIS[member[None.textLen]], literal[0]] assign[THIS[member[None.parsingTime]], literal[1]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[initialize] operator[SEP] Keyword[final] Keyword[char] operator[SEP] operator[SEP] identifier[input] operator[SEP] { Keyword[super] operator[SEP] identifier[initialize] operator[SEP] identifier[input] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[tag] operator[=] Keyword[new] identifier[ParsedTag] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[doctype] operator[=] Keyword[new] identifier[ParsedDoctype] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[text] operator[=] Keyword[new] Keyword[char] operator[SEP] Other[1024] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[textLen] operator[=] Other[0] operator[SEP] Keyword[this] operator[SEP] identifier[parsingTime] operator[=] operator[-] Other[1] operator[SEP] }
public Release createRelease(Object projectIdOrPath, String tagName, String releaseNotes) throws GitLabApiException { Form formData = new GitLabApiForm().withParam("description", releaseNotes); Response response = post(Response.Status.CREATED, formData.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "repository", "tags", tagName, "release"); return (response.readEntity(Release.class)); }
class class_name[name] begin[{] method[createRelease, return_type[type[Release]], modifier[public], parameter[projectIdOrPath, tagName, releaseNotes]] begin[{] local_variable[type[Form], formData] local_variable[type[Response], response] return[call[response.readEntity, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Release, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[Release] identifier[createRelease] operator[SEP] identifier[Object] identifier[projectIdOrPath] , identifier[String] identifier[tagName] , identifier[String] identifier[releaseNotes] operator[SEP] Keyword[throws] identifier[GitLabApiException] { identifier[Form] identifier[formData] operator[=] Keyword[new] identifier[GitLabApiForm] operator[SEP] operator[SEP] operator[SEP] identifier[withParam] operator[SEP] literal[String] , identifier[releaseNotes] operator[SEP] operator[SEP] identifier[Response] identifier[response] operator[=] identifier[post] operator[SEP] identifier[Response] operator[SEP] identifier[Status] operator[SEP] identifier[CREATED] , identifier[formData] operator[SEP] identifier[asMap] operator[SEP] operator[SEP] , literal[String] , identifier[getProjectIdOrPath] operator[SEP] identifier[projectIdOrPath] operator[SEP] , literal[String] , literal[String] , identifier[tagName] , literal[String] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[response] operator[SEP] identifier[readEntity] operator[SEP] identifier[Release] operator[SEP] Keyword[class] operator[SEP] operator[SEP] operator[SEP] }
public void setRejectedPatches(java.util.Collection<String> rejectedPatches) { if (rejectedPatches == null) { this.rejectedPatches = null; return; } this.rejectedPatches = new com.amazonaws.internal.SdkInternalList<String>(rejectedPatches); }
class class_name[name] begin[{] method[setRejectedPatches, return_type[void], modifier[public], parameter[rejectedPatches]] begin[{] if[binary_operation[member[.rejectedPatches], ==, literal[null]]] begin[{] assign[THIS[member[None.rejectedPatches]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.rejectedPatches]], ClassCreator(arguments=[MemberReference(member=rejectedPatches, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=amazonaws, sub_type=ReferenceType(arguments=None, dimensions=None, name=internal, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setRejectedPatches] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[rejectedPatches] operator[SEP] { Keyword[if] operator[SEP] identifier[rejectedPatches] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[rejectedPatches] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[rejectedPatches] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[String] operator[>] operator[SEP] identifier[rejectedPatches] operator[SEP] operator[SEP] }
public Matrix4d set(float m[], int off) { m00 = m[off+0]; m01 = m[off+1]; m02 = m[off+2]; m03 = m[off+3]; m10 = m[off+4]; m11 = m[off+5]; m12 = m[off+6]; m13 = m[off+7]; m20 = m[off+8]; m21 = m[off+9]; m22 = m[off+10]; m23 = m[off+11]; m30 = m[off+12]; m31 = m[off+13]; m32 = m[off+14]; m33 = m[off+15]; properties = 0; return this; }
class class_name[name] begin[{] method[set, return_type[type[Matrix4d]], modifier[public], parameter[m, off]] begin[{] assign[member[.m00], member[.m]] assign[member[.m01], member[.m]] assign[member[.m02], member[.m]] assign[member[.m03], member[.m]] assign[member[.m10], member[.m]] assign[member[.m11], member[.m]] assign[member[.m12], member[.m]] assign[member[.m13], member[.m]] assign[member[.m20], member[.m]] assign[member[.m21], member[.m]] assign[member[.m22], member[.m]] assign[member[.m23], member[.m]] assign[member[.m30], member[.m]] assign[member[.m31], member[.m]] assign[member[.m32], member[.m]] assign[member[.m33], member[.m]] assign[member[.properties], literal[0]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[Matrix4d] identifier[set] operator[SEP] Keyword[float] identifier[m] operator[SEP] operator[SEP] , Keyword[int] identifier[off] operator[SEP] { identifier[m00] operator[=] identifier[m] operator[SEP] identifier[off] operator[+] Other[0] operator[SEP] operator[SEP] identifier[m01] operator[=] identifier[m] operator[SEP] identifier[off] operator[+] Other[1] operator[SEP] operator[SEP] identifier[m02] operator[=] identifier[m] operator[SEP] identifier[off] operator[+] Other[2] operator[SEP] operator[SEP] identifier[m03] operator[=] identifier[m] operator[SEP] identifier[off] operator[+] Other[3] operator[SEP] operator[SEP] identifier[m10] operator[=] identifier[m] operator[SEP] identifier[off] operator[+] Other[4] operator[SEP] operator[SEP] identifier[m11] operator[=] identifier[m] operator[SEP] identifier[off] operator[+] Other[5] operator[SEP] operator[SEP] identifier[m12] operator[=] identifier[m] operator[SEP] identifier[off] operator[+] Other[6] operator[SEP] operator[SEP] identifier[m13] operator[=] identifier[m] operator[SEP] identifier[off] operator[+] Other[7] operator[SEP] operator[SEP] identifier[m20] operator[=] identifier[m] operator[SEP] identifier[off] operator[+] Other[8] operator[SEP] operator[SEP] identifier[m21] operator[=] identifier[m] operator[SEP] identifier[off] operator[+] Other[9] operator[SEP] operator[SEP] identifier[m22] operator[=] identifier[m] operator[SEP] identifier[off] operator[+] Other[10] operator[SEP] operator[SEP] identifier[m23] operator[=] identifier[m] operator[SEP] identifier[off] operator[+] Other[11] operator[SEP] operator[SEP] identifier[m30] operator[=] identifier[m] operator[SEP] identifier[off] operator[+] Other[12] operator[SEP] operator[SEP] identifier[m31] operator[=] identifier[m] operator[SEP] identifier[off] operator[+] Other[13] operator[SEP] operator[SEP] identifier[m32] operator[=] identifier[m] operator[SEP] identifier[off] operator[+] Other[14] operator[SEP] operator[SEP] identifier[m33] operator[=] identifier[m] operator[SEP] identifier[off] operator[+] Other[15] operator[SEP] operator[SEP] identifier[properties] operator[=] Other[0] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
void lock(final DeviceProxy deviceProxy, final int validity) throws DevFailed { deviceProxy.import_admin_device("lock"); final DevVarLongStringArray lsa = new DevVarLongStringArray(); lsa.svalue = new String[1]; lsa.lvalue = new int[1]; lsa.svalue[0] = deviceProxy.get_name(); lsa.lvalue[0] = validity; final DeviceData argin = new DeviceData(); argin.insert(lsa); deviceProxy.getAdm_dev().command_inout("LockDevice", argin); addToRelockList(deviceProxy, validity); }
class class_name[name] begin[{] method[lock, return_type[void], modifier[default], parameter[deviceProxy, validity]] begin[{] call[deviceProxy.import_admin_device, parameter[literal["lock"]]] local_variable[type[DevVarLongStringArray], lsa] assign[member[lsa.svalue], ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))] assign[member[lsa.lvalue], ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int))] assign[member[lsa.svalue], call[deviceProxy.get_name, parameter[]]] assign[member[lsa.lvalue], member[.validity]] local_variable[type[DeviceData], argin] call[argin.insert, parameter[member[.lsa]]] call[deviceProxy.getAdm_dev, parameter[]] call[.addToRelockList, parameter[member[.deviceProxy], member[.validity]]] end[}] END[}]
Keyword[void] identifier[lock] operator[SEP] Keyword[final] identifier[DeviceProxy] identifier[deviceProxy] , Keyword[final] Keyword[int] identifier[validity] operator[SEP] Keyword[throws] identifier[DevFailed] { identifier[deviceProxy] operator[SEP] identifier[import_admin_device] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[DevVarLongStringArray] identifier[lsa] operator[=] Keyword[new] identifier[DevVarLongStringArray] operator[SEP] operator[SEP] operator[SEP] identifier[lsa] operator[SEP] identifier[svalue] operator[=] Keyword[new] identifier[String] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[lsa] operator[SEP] identifier[lvalue] operator[=] Keyword[new] Keyword[int] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[lsa] operator[SEP] identifier[svalue] operator[SEP] Other[0] operator[SEP] operator[=] identifier[deviceProxy] operator[SEP] identifier[get_name] operator[SEP] operator[SEP] operator[SEP] identifier[lsa] operator[SEP] identifier[lvalue] operator[SEP] Other[0] operator[SEP] operator[=] identifier[validity] operator[SEP] Keyword[final] identifier[DeviceData] identifier[argin] operator[=] Keyword[new] identifier[DeviceData] operator[SEP] operator[SEP] operator[SEP] identifier[argin] operator[SEP] identifier[insert] operator[SEP] identifier[lsa] operator[SEP] operator[SEP] identifier[deviceProxy] operator[SEP] identifier[getAdm_dev] operator[SEP] operator[SEP] operator[SEP] identifier[command_inout] operator[SEP] literal[String] , identifier[argin] operator[SEP] operator[SEP] identifier[addToRelockList] operator[SEP] identifier[deviceProxy] , identifier[validity] operator[SEP] operator[SEP] }
public static HtmlTree FRAME(String src, String name, String title) { return FRAME(src, name, title, null); }
class class_name[name] begin[{] method[FRAME, return_type[type[HtmlTree]], modifier[public static], parameter[src, name, title]] begin[{] return[call[.FRAME, parameter[member[.src], member[.name], member[.title], literal[null]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[HtmlTree] identifier[FRAME] operator[SEP] identifier[String] identifier[src] , identifier[String] identifier[name] , identifier[String] identifier[title] operator[SEP] { Keyword[return] identifier[FRAME] operator[SEP] identifier[src] , identifier[name] , identifier[title] , Other[null] operator[SEP] operator[SEP] }
public void readyToWrite() { addSignatureIfNeed(); this.name_index = ((SubClass)classFile).resolveNameIndex(getSimpleName()); this.descriptor_index = ((SubClass)classFile).resolveNameIndex(Descriptor.getDesriptor(this)); readyToWrite = true; }
class class_name[name] begin[{] method[readyToWrite, return_type[void], modifier[public], parameter[]] begin[{] call[.addSignatureIfNeed, parameter[]] assign[THIS[member[None.name_index]], Cast(expression=MemberReference(member=classFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=SubClass, sub_type=None))] assign[THIS[member[None.descriptor_index]], Cast(expression=MemberReference(member=classFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=SubClass, sub_type=None))] assign[member[.readyToWrite], literal[true]] end[}] END[}]
Keyword[public] Keyword[void] identifier[readyToWrite] operator[SEP] operator[SEP] { identifier[addSignatureIfNeed] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[name_index] operator[=] operator[SEP] operator[SEP] identifier[SubClass] operator[SEP] identifier[classFile] operator[SEP] operator[SEP] identifier[resolveNameIndex] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[descriptor_index] operator[=] operator[SEP] operator[SEP] identifier[SubClass] operator[SEP] identifier[classFile] operator[SEP] operator[SEP] identifier[resolveNameIndex] operator[SEP] identifier[Descriptor] operator[SEP] identifier[getDesriptor] operator[SEP] Keyword[this] operator[SEP] operator[SEP] operator[SEP] identifier[readyToWrite] operator[=] literal[boolean] operator[SEP] }
@Override public <TYPE extends Assignable> TYPE as(final Class<TYPE> clazz) { return archive.as(clazz); }
class class_name[name] begin[{] method[as, return_type[type[TYPE]], modifier[public], parameter[clazz]] begin[{] return[call[archive.as, parameter[member[.clazz]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] operator[<] identifier[TYPE] Keyword[extends] identifier[Assignable] operator[>] identifier[TYPE] identifier[as] operator[SEP] Keyword[final] identifier[Class] operator[<] identifier[TYPE] operator[>] identifier[clazz] operator[SEP] { Keyword[return] identifier[archive] operator[SEP] identifier[as] operator[SEP] identifier[clazz] operator[SEP] operator[SEP] }
public static <T, BT extends ObjectIntProcedure<? super T>> void forEachWithIndex( Iterable<T> iterable, BT procedure, int minForkSize, int taskCount) { ParallelIterate.forEachWithIndex( iterable, new PassThruObjectIntProcedureFactory<BT>(procedure), new PassThruCombiner<BT>(), minForkSize, taskCount); }
class class_name[name] begin[{] method[forEachWithIndex, return_type[void], modifier[public static], parameter[iterable, procedure, minForkSize, taskCount]] begin[{] call[ParallelIterate.forEachWithIndex, parameter[member[.iterable], ClassCreator(arguments=[MemberReference(member=procedure, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=BT, sub_type=None))], dimensions=None, name=PassThruObjectIntProcedureFactory, sub_type=None)), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=BT, sub_type=None))], dimensions=None, name=PassThruCombiner, sub_type=None)), member[.minForkSize], member[.taskCount]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[BT] Keyword[extends] identifier[ObjectIntProcedure] operator[<] operator[?] Keyword[super] identifier[T] operator[>] operator[>] Keyword[void] identifier[forEachWithIndex] operator[SEP] identifier[Iterable] operator[<] identifier[T] operator[>] identifier[iterable] , identifier[BT] identifier[procedure] , Keyword[int] identifier[minForkSize] , Keyword[int] identifier[taskCount] operator[SEP] { identifier[ParallelIterate] operator[SEP] identifier[forEachWithIndex] operator[SEP] identifier[iterable] , Keyword[new] identifier[PassThruObjectIntProcedureFactory] operator[<] identifier[BT] operator[>] operator[SEP] identifier[procedure] operator[SEP] , Keyword[new] identifier[PassThruCombiner] operator[<] identifier[BT] operator[>] operator[SEP] operator[SEP] , identifier[minForkSize] , identifier[taskCount] operator[SEP] operator[SEP] }
private void parseHeaderChangeLimit(Map<Object, Object> props) { Object value = props.get(HttpConfigConstants.PROPNAME_HEADER_CHANGE_LIMIT); if (null != value) { try { this.headerChangeLimit = convertInteger(value); if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) { Tr.event(tc, "Config: header change limit is " + getHeaderChangeLimit()); } } catch (NumberFormatException nfe) { FFDCFilter.processException(nfe, getClass().getName() + ".parseHeaderChangeLimit", "1"); if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) { Tr.event(tc, "Config: Invalid header change count of " + value); } } } }
class class_name[name] begin[{] method[parseHeaderChangeLimit, return_type[void], modifier[private], parameter[props]] begin[{] local_variable[type[Object], value] if[binary_operation[literal[null], !=, member[.value]]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=headerChangeLimit, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convertInteger, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isEventEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Config: header change limit is "), operandr=MethodInvocation(arguments=[], member=getHeaderChangeLimit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+)], member=event, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=nfe, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".parseHeaderChangeLimit"), operator=+), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1")], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isEventEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Config: Invalid header change count of "), operandr=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=event, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=nfe, types=['NumberFormatException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[parseHeaderChangeLimit] operator[SEP] identifier[Map] operator[<] identifier[Object] , identifier[Object] operator[>] identifier[props] operator[SEP] { identifier[Object] identifier[value] operator[=] identifier[props] operator[SEP] identifier[get] operator[SEP] identifier[HttpConfigConstants] operator[SEP] identifier[PROPNAME_HEADER_CHANGE_LIMIT] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[value] operator[SEP] { Keyword[try] { Keyword[this] operator[SEP] identifier[headerChangeLimit] operator[=] identifier[convertInteger] operator[SEP] identifier[value] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEventEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[event] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[getHeaderChangeLimit] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[NumberFormatException] identifier[nfe] operator[SEP] { identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[nfe] , identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEventEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[event] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[value] operator[SEP] operator[SEP] } } } }
public void addAttachment(CmsDocumentDependency dep) { // don't add attachment if this is a language version of an already existing attachment boolean exist = false; for (CmsDocumentDependency att : m_attachments) { if (att.getAttachmentNumber() == dep.getAttachmentNumber()) { if (m_locale.equals(dep.getLocale())) { // if dependency has same locale as main document it is added as attachment // and gets the old attachment as a language-version with all previous language-versions for (CmsDocumentDependency langAtt : att.getVariants()) { dep.addVariant(langAtt); } dep.addVariant(att); m_attachments.remove(att); } else { exist = true; att.addVariant(dep); } break; } } if (!exist) { dep.setType(DependencyType.attachment); m_attachments.add(dep); } else { dep.setType(DependencyType.variant); } addDependency(dep); }
class class_name[name] begin[{] method[addAttachment, return_type[void], modifier[public], parameter[dep]] begin[{] local_variable[type[boolean], exist] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getAttachmentNumber, postfix_operators=[], prefix_operators=[], qualifier=att, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getAttachmentNumber, postfix_operators=[], prefix_operators=[], qualifier=dep, selectors=[], type_arguments=None), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLocale, postfix_operators=[], prefix_operators=[], qualifier=dep, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=[], qualifier=m_locale, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=exist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=dep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addVariant, postfix_operators=[], prefix_operators=[], qualifier=att, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=langAtt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addVariant, postfix_operators=[], prefix_operators=[], qualifier=dep, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getVariants, postfix_operators=[], prefix_operators=[], qualifier=att, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=langAtt)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CmsDocumentDependency, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=att, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addVariant, postfix_operators=[], prefix_operators=[], qualifier=dep, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=att, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=m_attachments, selectors=[], type_arguments=None), label=None)])), BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=m_attachments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=att)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CmsDocumentDependency, sub_type=None))), label=None) if[member[.exist]] begin[{] call[dep.setType, parameter[member[DependencyType.attachment]]] call[m_attachments.add, parameter[member[.dep]]] else begin[{] call[dep.setType, parameter[member[DependencyType.variant]]] end[}] call[.addDependency, parameter[member[.dep]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addAttachment] operator[SEP] identifier[CmsDocumentDependency] identifier[dep] operator[SEP] { Keyword[boolean] identifier[exist] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[CmsDocumentDependency] identifier[att] operator[:] identifier[m_attachments] operator[SEP] { Keyword[if] operator[SEP] identifier[att] operator[SEP] identifier[getAttachmentNumber] operator[SEP] operator[SEP] operator[==] identifier[dep] operator[SEP] identifier[getAttachmentNumber] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[m_locale] operator[SEP] identifier[equals] operator[SEP] identifier[dep] operator[SEP] identifier[getLocale] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[CmsDocumentDependency] identifier[langAtt] operator[:] identifier[att] operator[SEP] identifier[getVariants] operator[SEP] operator[SEP] operator[SEP] { identifier[dep] operator[SEP] identifier[addVariant] operator[SEP] identifier[langAtt] operator[SEP] operator[SEP] } identifier[dep] operator[SEP] identifier[addVariant] operator[SEP] identifier[att] operator[SEP] operator[SEP] identifier[m_attachments] operator[SEP] identifier[remove] operator[SEP] identifier[att] operator[SEP] operator[SEP] } Keyword[else] { identifier[exist] operator[=] literal[boolean] operator[SEP] identifier[att] operator[SEP] identifier[addVariant] operator[SEP] identifier[dep] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] } } Keyword[if] operator[SEP] operator[!] identifier[exist] operator[SEP] { identifier[dep] operator[SEP] identifier[setType] operator[SEP] identifier[DependencyType] operator[SEP] identifier[attachment] operator[SEP] operator[SEP] identifier[m_attachments] operator[SEP] identifier[add] operator[SEP] identifier[dep] operator[SEP] operator[SEP] } Keyword[else] { identifier[dep] operator[SEP] identifier[setType] operator[SEP] identifier[DependencyType] operator[SEP] identifier[variant] operator[SEP] operator[SEP] } identifier[addDependency] operator[SEP] identifier[dep] operator[SEP] operator[SEP] }
public void setAmbientLight(int i, Color color, boolean enableColor) { float ambient[] = { (float)color.getRed(), (float)color.getGreen(), (float)color.getBlue(), (float)color.getAlpha() }; gl.glEnable(GL2.GL_LIGHTING); gl.glEnable(GL2.GL_LIGHT0 + i); if(enableColor) gl.glLightfv(GL2.GL_LIGHT0 + i, GL2.GL_AMBIENT, ambient, 0); }
class class_name[name] begin[{] method[setAmbientLight, return_type[void], modifier[public], parameter[i, color, enableColor]] begin[{] local_variable[type[float], ambient] call[gl.glEnable, parameter[member[GL2.GL_LIGHTING]]] call[gl.glEnable, parameter[binary_operation[member[GL2.GL_LIGHT0], +, member[.i]]]] if[member[.enableColor]] begin[{] call[gl.glLightfv, parameter[binary_operation[member[GL2.GL_LIGHT0], +, member[.i]], member[GL2.GL_AMBIENT], member[.ambient], literal[0]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setAmbientLight] operator[SEP] Keyword[int] identifier[i] , identifier[Color] identifier[color] , Keyword[boolean] identifier[enableColor] operator[SEP] { Keyword[float] identifier[ambient] operator[SEP] operator[SEP] operator[=] { operator[SEP] Keyword[float] operator[SEP] identifier[color] operator[SEP] identifier[getRed] operator[SEP] operator[SEP] , operator[SEP] Keyword[float] operator[SEP] identifier[color] operator[SEP] identifier[getGreen] operator[SEP] operator[SEP] , operator[SEP] Keyword[float] operator[SEP] identifier[color] operator[SEP] identifier[getBlue] operator[SEP] operator[SEP] , operator[SEP] Keyword[float] operator[SEP] identifier[color] operator[SEP] identifier[getAlpha] operator[SEP] operator[SEP] } operator[SEP] identifier[gl] operator[SEP] identifier[glEnable] operator[SEP] identifier[GL2] operator[SEP] identifier[GL_LIGHTING] operator[SEP] operator[SEP] identifier[gl] operator[SEP] identifier[glEnable] operator[SEP] identifier[GL2] operator[SEP] identifier[GL_LIGHT0] operator[+] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[enableColor] operator[SEP] identifier[gl] operator[SEP] identifier[glLightfv] operator[SEP] identifier[GL2] operator[SEP] identifier[GL_LIGHT0] operator[+] identifier[i] , identifier[GL2] operator[SEP] identifier[GL_AMBIENT] , identifier[ambient] , Other[0] operator[SEP] operator[SEP] }
public boolean add(ExtendedPropositionDefinition def) { if (def != null && this.defs.add(def)) { this.defsAsListOutdated = true; recalculateChildren(); return true; } else { return false; } }
class class_name[name] begin[{] method[add, return_type[type[boolean]], modifier[public], parameter[def]] begin[{] if[binary_operation[binary_operation[member[.def], !=, literal[null]], &&, THIS[member[None.defs]call[None.add, parameter[member[.def]]]]]] begin[{] assign[THIS[member[None.defsAsListOutdated]], literal[true]] call[.recalculateChildren, parameter[]] return[literal[true]] else begin[{] return[literal[false]] end[}] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[add] operator[SEP] identifier[ExtendedPropositionDefinition] identifier[def] operator[SEP] { Keyword[if] operator[SEP] identifier[def] operator[!=] Other[null] operator[&&] Keyword[this] operator[SEP] identifier[defs] operator[SEP] identifier[add] operator[SEP] identifier[def] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[defsAsListOutdated] operator[=] literal[boolean] operator[SEP] identifier[recalculateChildren] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { Keyword[return] literal[boolean] operator[SEP] } }
private void propagateAsError(Throwable t) { if ( t instanceof InvocationTargetException) { t = t.getCause(); } if ( Error.class.isAssignableFrom(t.getClass())) { throw (Error)t; } throw new PolledAssertionError(t); }
class class_name[name] begin[{] method[propagateAsError, return_type[void], modifier[private], parameter[t]] begin[{] if[binary_operation[member[.t], instanceof, type[InvocationTargetException]]] begin[{] assign[member[.t], call[t.getCause, parameter[]]] else begin[{] None end[}] if[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[], type_arguments=None)], member=isAssignableFrom, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Error, sub_type=None))] begin[{] ThrowStatement(expression=Cast(expression=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Error, sub_type=None)), label=None) else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PolledAssertionError, sub_type=None)), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[propagateAsError] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { Keyword[if] operator[SEP] identifier[t] Keyword[instanceof] identifier[InvocationTargetException] operator[SEP] { identifier[t] operator[=] identifier[t] operator[SEP] identifier[getCause] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[Error] operator[SEP] Keyword[class] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[t] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] operator[SEP] identifier[Error] operator[SEP] identifier[t] operator[SEP] } Keyword[throw] Keyword[new] identifier[PolledAssertionError] operator[SEP] identifier[t] operator[SEP] operator[SEP] }
public void marshall(UpdateAccountRequest updateAccountRequest, ProtocolMarshaller protocolMarshaller) { if (updateAccountRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(updateAccountRequest.getAccountId(), ACCOUNTID_BINDING); protocolMarshaller.marshall(updateAccountRequest.getName(), NAME_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[updateAccountRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.updateAccountRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid argument passed to marshall(...)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAccountId, postfix_operators=[], prefix_operators=[], qualifier=updateAccountRequest, selectors=[], type_arguments=None), MemberReference(member=ACCOUNTID_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=updateAccountRequest, selectors=[], type_arguments=None), MemberReference(member=NAME_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[UpdateAccountRequest] identifier[updateAccountRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[updateAccountRequest] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[updateAccountRequest] operator[SEP] identifier[getAccountId] operator[SEP] operator[SEP] , identifier[ACCOUNTID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[updateAccountRequest] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[NAME_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
@Override public Statement createStatement() throws SQLException { checkClosed(); try { return new JDBC4Statement(this); } catch(Exception x) { throw SQLError.get(x); } }
class class_name[name] begin[{] method[createStatement, return_type[type[Statement]], modifier[public], parameter[]] begin[{] call[.checkClosed, parameter[]] TryStatement(block=[ReturnStatement(expression=ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JDBC4Statement, sub_type=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=SQLError, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=x, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Statement] identifier[createStatement] operator[SEP] operator[SEP] Keyword[throws] identifier[SQLException] { identifier[checkClosed] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[return] Keyword[new] identifier[JDBC4Statement] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[x] operator[SEP] { Keyword[throw] identifier[SQLError] operator[SEP] identifier[get] operator[SEP] identifier[x] operator[SEP] operator[SEP] } }
public T find(Predicate<T> decision, T defaultValue) { return Iterables.find(result(), decision, defaultValue); }
class class_name[name] begin[{] method[find, return_type[type[T]], modifier[public], parameter[decision, defaultValue]] begin[{] return[call[Iterables.find, parameter[call[.result, parameter[]], member[.decision], member[.defaultValue]]]] end[}] END[}]
Keyword[public] identifier[T] identifier[find] operator[SEP] identifier[Predicate] operator[<] identifier[T] operator[>] identifier[decision] , identifier[T] identifier[defaultValue] operator[SEP] { Keyword[return] identifier[Iterables] operator[SEP] identifier[find] operator[SEP] identifier[result] operator[SEP] operator[SEP] , identifier[decision] , identifier[defaultValue] operator[SEP] operator[SEP] }
@Deprecated protected ZAgent agent(Socket phone, String secret) { return ZAgent.Creator.create(phone, secret); }
class class_name[name] begin[{] method[agent, return_type[type[ZAgent]], modifier[protected], parameter[phone, secret]] begin[{] return[call[ZAgent.Creator.create, parameter[member[.phone], member[.secret]]]] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[protected] identifier[ZAgent] identifier[agent] operator[SEP] identifier[Socket] identifier[phone] , identifier[String] identifier[secret] operator[SEP] { Keyword[return] identifier[ZAgent] operator[SEP] identifier[Creator] operator[SEP] identifier[create] operator[SEP] identifier[phone] , identifier[secret] operator[SEP] operator[SEP] }
public static void generateSessionIdIfNecessary(final TraceeBackend backend, final String sessionId) { if (backend != null && !backend.containsKey(TraceeConstants.SESSION_ID_KEY) && backend.getConfiguration().shouldGenerateSessionId()) { backend.put(TraceeConstants.SESSION_ID_KEY, Utilities.createAlphanumericHash(sessionId, backend.getConfiguration().generatedSessionIdLength())); } }
class class_name[name] begin[{] method[generateSessionIdIfNecessary, return_type[void], modifier[public static], parameter[backend, sessionId]] begin[{] if[binary_operation[binary_operation[binary_operation[member[.backend], !=, literal[null]], &&, call[backend.containsKey, parameter[member[TraceeConstants.SESSION_ID_KEY]]]], &&, call[backend.getConfiguration, parameter[]]]] begin[{] call[backend.put, parameter[member[TraceeConstants.SESSION_ID_KEY], call[Utilities.createAlphanumericHash, parameter[member[.sessionId], call[backend.getConfiguration, parameter[]]]]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[generateSessionIdIfNecessary] operator[SEP] Keyword[final] identifier[TraceeBackend] identifier[backend] , Keyword[final] identifier[String] identifier[sessionId] operator[SEP] { Keyword[if] operator[SEP] identifier[backend] operator[!=] Other[null] operator[&&] operator[!] identifier[backend] operator[SEP] identifier[containsKey] operator[SEP] identifier[TraceeConstants] operator[SEP] identifier[SESSION_ID_KEY] operator[SEP] operator[&&] identifier[backend] operator[SEP] identifier[getConfiguration] operator[SEP] operator[SEP] operator[SEP] identifier[shouldGenerateSessionId] operator[SEP] operator[SEP] operator[SEP] { identifier[backend] operator[SEP] identifier[put] operator[SEP] identifier[TraceeConstants] operator[SEP] identifier[SESSION_ID_KEY] , identifier[Utilities] operator[SEP] identifier[createAlphanumericHash] operator[SEP] identifier[sessionId] , identifier[backend] operator[SEP] identifier[getConfiguration] operator[SEP] operator[SEP] operator[SEP] identifier[generatedSessionIdLength] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public boolean createRelatedTable( UserTable<? extends UserColumn> relatedTable) { boolean created = false; String relatedTableName = relatedTable.getTableName(); if (!geoPackage.isTable(relatedTableName)) { geoPackage.createUserTable(relatedTable); try { // Create the contents Contents contents = new Contents(); contents.setTableName(relatedTableName); contents.setDataTypeString(relatedTable.getDataType()); contents.setIdentifier(relatedTableName); ContentsDao contentsDao = geoPackage.getContentsDao(); contentsDao.create(contents); contentsDao.refresh(contents); relatedTable.setContents(contents); } catch (RuntimeException e) { geoPackage.deleteTableQuietly(relatedTableName); throw e; } catch (SQLException e) { geoPackage.deleteTableQuietly(relatedTableName); throw new GeoPackageException( "Failed to create table and metadata: " + relatedTableName, e); } created = true; } return created; }
class class_name[name] begin[{] method[createRelatedTable, return_type[type[boolean]], modifier[public], parameter[relatedTable]] begin[{] local_variable[type[boolean], created] local_variable[type[String], relatedTableName] if[call[geoPackage.isTable, parameter[member[.relatedTableName]]]] begin[{] call[geoPackage.createUserTable, parameter[member[.relatedTable]]] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Contents, sub_type=None)), name=contents)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Contents, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=relatedTableName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setTableName, postfix_operators=[], prefix_operators=[], qualifier=contents, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getDataType, postfix_operators=[], prefix_operators=[], qualifier=relatedTable, selectors=[], type_arguments=None)], member=setDataTypeString, postfix_operators=[], prefix_operators=[], qualifier=contents, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=relatedTableName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setIdentifier, postfix_operators=[], prefix_operators=[], qualifier=contents, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getContentsDao, postfix_operators=[], prefix_operators=[], qualifier=geoPackage, selectors=[], type_arguments=None), name=contentsDao)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ContentsDao, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=contents, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=create, postfix_operators=[], prefix_operators=[], qualifier=contentsDao, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=contents, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=refresh, postfix_operators=[], prefix_operators=[], qualifier=contentsDao, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=contents, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setContents, postfix_operators=[], prefix_operators=[], qualifier=relatedTable, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=relatedTableName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=deleteTableQuietly, postfix_operators=[], prefix_operators=[], qualifier=geoPackage, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['RuntimeException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=relatedTableName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=deleteTableQuietly, postfix_operators=[], prefix_operators=[], qualifier=geoPackage, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to create table and metadata: "), operandr=MemberReference(member=relatedTableName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GeoPackageException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SQLException']))], finally_block=None, label=None, resources=None) assign[member[.created], literal[true]] else begin[{] None end[}] return[member[.created]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[createRelatedTable] operator[SEP] identifier[UserTable] operator[<] operator[?] Keyword[extends] identifier[UserColumn] operator[>] identifier[relatedTable] operator[SEP] { Keyword[boolean] identifier[created] operator[=] literal[boolean] operator[SEP] identifier[String] identifier[relatedTableName] operator[=] identifier[relatedTable] operator[SEP] identifier[getTableName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[geoPackage] operator[SEP] identifier[isTable] operator[SEP] identifier[relatedTableName] operator[SEP] operator[SEP] { identifier[geoPackage] operator[SEP] identifier[createUserTable] operator[SEP] identifier[relatedTable] operator[SEP] operator[SEP] Keyword[try] { identifier[Contents] identifier[contents] operator[=] Keyword[new] identifier[Contents] operator[SEP] operator[SEP] operator[SEP] identifier[contents] operator[SEP] identifier[setTableName] operator[SEP] identifier[relatedTableName] operator[SEP] operator[SEP] identifier[contents] operator[SEP] identifier[setDataTypeString] operator[SEP] identifier[relatedTable] operator[SEP] identifier[getDataType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[contents] operator[SEP] identifier[setIdentifier] operator[SEP] identifier[relatedTableName] operator[SEP] operator[SEP] identifier[ContentsDao] identifier[contentsDao] operator[=] identifier[geoPackage] operator[SEP] identifier[getContentsDao] operator[SEP] operator[SEP] operator[SEP] identifier[contentsDao] operator[SEP] identifier[create] operator[SEP] identifier[contents] operator[SEP] operator[SEP] identifier[contentsDao] operator[SEP] identifier[refresh] operator[SEP] identifier[contents] operator[SEP] operator[SEP] identifier[relatedTable] operator[SEP] identifier[setContents] operator[SEP] identifier[contents] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[RuntimeException] identifier[e] operator[SEP] { identifier[geoPackage] operator[SEP] identifier[deleteTableQuietly] operator[SEP] identifier[relatedTableName] operator[SEP] operator[SEP] Keyword[throw] identifier[e] operator[SEP] } Keyword[catch] operator[SEP] identifier[SQLException] identifier[e] operator[SEP] { identifier[geoPackage] operator[SEP] identifier[deleteTableQuietly] operator[SEP] identifier[relatedTableName] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[GeoPackageException] operator[SEP] literal[String] operator[+] identifier[relatedTableName] , identifier[e] operator[SEP] operator[SEP] } identifier[created] operator[=] literal[boolean] operator[SEP] } Keyword[return] identifier[created] operator[SEP] }
@Nullable public static Long parseLongObj (@Nullable final String sStr, @Nullable final Long aDefault) { return parseLongObj (sStr, DEFAULT_RADIX, aDefault); }
class class_name[name] begin[{] method[parseLongObj, return_type[type[Long]], modifier[public static], parameter[sStr, aDefault]] begin[{] return[call[.parseLongObj, parameter[member[.sStr], member[.DEFAULT_RADIX], member[.aDefault]]]] end[}] END[}]
annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[Long] identifier[parseLongObj] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[sStr] , annotation[@] identifier[Nullable] Keyword[final] identifier[Long] identifier[aDefault] operator[SEP] { Keyword[return] identifier[parseLongObj] operator[SEP] identifier[sStr] , identifier[DEFAULT_RADIX] , identifier[aDefault] operator[SEP] operator[SEP] }
public static String removeSessionId(String uri, HttpResponse httpResponse) { CookieSpec cookieSpec = new DefaultCookieSpec(); // Dummy origin, used only by CookieSpec for setting the domain for the // cookie but we don't need it CookieOrigin cookieOrigin = new CookieOrigin("dummy", Http.DEFAULT_HTTP_PORT, "/", false); Header[] responseHeaders = httpResponse.getHeaders("Set-cookie"); String jsessionid = null; for (Header header : responseHeaders) { try { List<Cookie> cookies = cookieSpec.parse(header, cookieOrigin); for (Cookie cookie : cookies) { if ("JSESSIONID".equalsIgnoreCase(cookie.getName())) { jsessionid = cookie.getValue(); } break; } } catch (MalformedCookieException ex) { LOG.warn("Malformed header: " + header.getName() + ": " + header.getValue()); } if (jsessionid != null) { break; } } if (jsessionid == null) { return uri; } return UriUtils.removeSessionId(jsessionid, uri); }
class class_name[name] begin[{] method[removeSessionId, return_type[type[String]], modifier[public static], parameter[uri, httpResponse]] begin[{] local_variable[type[CookieSpec], cookieSpec] local_variable[type[CookieOrigin], cookieOrigin] local_variable[type[Header], responseHeaders] local_variable[type[String], jsessionid] ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=header, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cookieOrigin, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parse, postfix_operators=[], prefix_operators=[], qualifier=cookieSpec, selectors=[], type_arguments=None), name=cookies)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Cookie, sub_type=None))], dimensions=[], name=List, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=cookie, selectors=[], type_arguments=None)], member=equalsIgnoreCase, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], value="JSESSIONID"), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=jsessionid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=cookie, selectors=[], type_arguments=None)), label=None)])), BreakStatement(goto=None, label=None)]), control=EnhancedForControl(iterable=MemberReference(member=cookies, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=cookie)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Cookie, sub_type=None))), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Malformed header: "), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=header, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=": "), operator=+), operandr=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=header, selectors=[], type_arguments=None), operator=+)], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['MalformedCookieException']))], finally_block=None, label=None, resources=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=jsessionid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=responseHeaders, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=header)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Header, sub_type=None))), label=None) if[binary_operation[member[.jsessionid], ==, literal[null]]] begin[{] return[member[.uri]] else begin[{] None end[}] return[call[UriUtils.removeSessionId, parameter[member[.jsessionid], member[.uri]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[removeSessionId] operator[SEP] identifier[String] identifier[uri] , identifier[HttpResponse] identifier[httpResponse] operator[SEP] { identifier[CookieSpec] identifier[cookieSpec] operator[=] Keyword[new] identifier[DefaultCookieSpec] operator[SEP] operator[SEP] operator[SEP] identifier[CookieOrigin] identifier[cookieOrigin] operator[=] Keyword[new] identifier[CookieOrigin] operator[SEP] literal[String] , identifier[Http] operator[SEP] identifier[DEFAULT_HTTP_PORT] , literal[String] , literal[boolean] operator[SEP] operator[SEP] identifier[Header] operator[SEP] operator[SEP] identifier[responseHeaders] operator[=] identifier[httpResponse] operator[SEP] identifier[getHeaders] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[jsessionid] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[Header] identifier[header] operator[:] identifier[responseHeaders] operator[SEP] { Keyword[try] { identifier[List] operator[<] identifier[Cookie] operator[>] identifier[cookies] operator[=] identifier[cookieSpec] operator[SEP] identifier[parse] operator[SEP] identifier[header] , identifier[cookieOrigin] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Cookie] identifier[cookie] operator[:] identifier[cookies] operator[SEP] { Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[cookie] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[jsessionid] operator[=] identifier[cookie] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] } } Keyword[catch] operator[SEP] identifier[MalformedCookieException] identifier[ex] operator[SEP] { identifier[LOG] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[header] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[header] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[jsessionid] operator[!=] Other[null] operator[SEP] { Keyword[break] operator[SEP] } } Keyword[if] operator[SEP] identifier[jsessionid] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[uri] operator[SEP] } Keyword[return] identifier[UriUtils] operator[SEP] identifier[removeSessionId] operator[SEP] identifier[jsessionid] , identifier[uri] operator[SEP] operator[SEP] }
public static void copyJoins(From<?, ?> from, From<?, ?> to) { for (Join<?, ?> j : from.getJoins()) { Join<?, ?> toJoin = to.join(j.getAttribute().getName(), j.getJoinType()); toJoin.alias(getOrCreateAlias(j)); copyJoins(j, toJoin); } for (Fetch<?, ?> f : from.getFetches()) { Fetch<?, ?> toFetch = to.fetch(f.getAttribute().getName()); copyFetches(f, toFetch); } }
class class_name[name] begin[{] method[copyJoins, return_type[void], modifier[public static], parameter[from, to]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAttribute, postfix_operators=[], prefix_operators=[], qualifier=j, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MethodInvocation(arguments=[], member=getJoinType, postfix_operators=[], prefix_operators=[], qualifier=j, selectors=[], type_arguments=None)], member=join, postfix_operators=[], prefix_operators=[], qualifier=to, selectors=[], type_arguments=None), name=toJoin)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None), TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Join, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getOrCreateAlias, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=alias, postfix_operators=[], prefix_operators=[], qualifier=toJoin, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=toJoin, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=copyJoins, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getJoins, postfix_operators=[], prefix_operators=[], qualifier=from, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=j)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None), TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Join, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAttribute, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=fetch, postfix_operators=[], prefix_operators=[], qualifier=to, selectors=[], type_arguments=None), name=toFetch)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None), TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Fetch, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=toFetch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=copyFetches, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getFetches, postfix_operators=[], prefix_operators=[], qualifier=from, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=f)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None), TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Fetch, sub_type=None))), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[copyJoins] operator[SEP] identifier[From] operator[<] operator[?] , operator[?] operator[>] identifier[from] , identifier[From] operator[<] operator[?] , operator[?] operator[>] identifier[to] operator[SEP] { Keyword[for] operator[SEP] identifier[Join] operator[<] operator[?] , operator[?] operator[>] identifier[j] operator[:] identifier[from] operator[SEP] identifier[getJoins] operator[SEP] operator[SEP] operator[SEP] { identifier[Join] operator[<] operator[?] , operator[?] operator[>] identifier[toJoin] operator[=] identifier[to] operator[SEP] identifier[join] operator[SEP] identifier[j] operator[SEP] identifier[getAttribute] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[j] operator[SEP] identifier[getJoinType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[toJoin] operator[SEP] identifier[alias] operator[SEP] identifier[getOrCreateAlias] operator[SEP] identifier[j] operator[SEP] operator[SEP] operator[SEP] identifier[copyJoins] operator[SEP] identifier[j] , identifier[toJoin] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[Fetch] operator[<] operator[?] , operator[?] operator[>] identifier[f] operator[:] identifier[from] operator[SEP] identifier[getFetches] operator[SEP] operator[SEP] operator[SEP] { identifier[Fetch] operator[<] operator[?] , operator[?] operator[>] identifier[toFetch] operator[=] identifier[to] operator[SEP] identifier[fetch] operator[SEP] identifier[f] operator[SEP] identifier[getAttribute] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[copyFetches] operator[SEP] identifier[f] , identifier[toFetch] operator[SEP] operator[SEP] } }
public static String prettyDateTime(String time) { if (time.length() < 12) return time; StringBuilder sb = new StringBuilder(); sb.append(time.substring(0, 4)).append("-").append(time.substring(4, 6)).append("-").append(time.substring(6, 8)); sb.append(" ").append(time.substring(8, 10)).append(":").append(time.substring(10, 12)); return sb.toString(); }
class class_name[name] begin[{] method[prettyDateTime, return_type[type[String]], modifier[public static], parameter[time]] begin[{] if[binary_operation[call[time.length, parameter[]], <, literal[12]]] begin[{] return[member[.time]] else begin[{] None end[}] local_variable[type[StringBuilder], sb] call[sb.append, parameter[call[time.substring, parameter[literal[0], literal[4]]]]] call[sb.append, parameter[literal[" "]]] return[call[sb.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[prettyDateTime] operator[SEP] identifier[String] identifier[time] operator[SEP] { Keyword[if] operator[SEP] identifier[time] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[<] Other[12] operator[SEP] Keyword[return] identifier[time] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[time] operator[SEP] identifier[substring] operator[SEP] Other[0] , Other[4] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[time] operator[SEP] identifier[substring] operator[SEP] Other[4] , Other[6] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[time] operator[SEP] identifier[substring] operator[SEP] Other[6] , Other[8] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[time] operator[SEP] identifier[substring] operator[SEP] Other[8] , Other[10] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[time] operator[SEP] identifier[substring] operator[SEP] Other[10] , Other[12] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public double distanceSquared(Vector3d v) { double dx = x - v.x; double dy = y - v.y; double dz = z - v.z; return dx * dx + dy * dy + dz * dz; }
class class_name[name] begin[{] method[distanceSquared, return_type[type[double]], modifier[public], parameter[v]] begin[{] local_variable[type[double], dx] local_variable[type[double], dy] local_variable[type[double], dz] return[binary_operation[binary_operation[binary_operation[member[.dx], *, member[.dx]], +, binary_operation[member[.dy], *, member[.dy]]], +, binary_operation[member[.dz], *, member[.dz]]]] end[}] END[}]
Keyword[public] Keyword[double] identifier[distanceSquared] operator[SEP] identifier[Vector3d] identifier[v] operator[SEP] { Keyword[double] identifier[dx] operator[=] identifier[x] operator[-] identifier[v] operator[SEP] identifier[x] operator[SEP] Keyword[double] identifier[dy] operator[=] identifier[y] operator[-] identifier[v] operator[SEP] identifier[y] operator[SEP] Keyword[double] identifier[dz] operator[=] identifier[z] operator[-] identifier[v] operator[SEP] identifier[z] operator[SEP] Keyword[return] identifier[dx] operator[*] identifier[dx] operator[+] identifier[dy] operator[*] identifier[dy] operator[+] identifier[dz] operator[*] identifier[dz] operator[SEP] }
public ChannelFuture bindAsync(final SocketAddress localAddress) { if (localAddress == null) { throw new NullPointerException("localAddress"); } ChannelPipeline pipeline; try { pipeline = getPipelineFactory().getPipeline(); } catch (Exception e) { throw new ChannelPipelineException("Failed to initialize a pipeline.", e); } Channel ch = getFactory().newChannel(pipeline); // Apply options. boolean success = false; try { ch.getConfig().setOptions(getOptions()); success = true; } finally { if (!success) { ch.close(); } } // Bind ChannelFuture future = ch.bind(localAddress); return future; }
class class_name[name] begin[{] method[bindAsync, return_type[type[ChannelFuture]], modifier[public], parameter[localAddress]] begin[{] if[binary_operation[member[.localAddress], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="localAddress")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NullPointerException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[ChannelPipeline], pipeline] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=pipeline, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getPipelineFactory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getPipeline, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to initialize a pipeline."), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ChannelPipelineException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) local_variable[type[Channel], ch] local_variable[type[boolean], success] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=getConfig, postfix_operators=[], prefix_operators=[], qualifier=ch, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getOptions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=setOptions, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=success, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)], catches=None, finally_block=[IfStatement(condition=MemberReference(member=success, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=ch, selectors=[], type_arguments=None), label=None)]))], label=None, resources=None) local_variable[type[ChannelFuture], future] return[member[.future]] end[}] END[}]
Keyword[public] identifier[ChannelFuture] identifier[bindAsync] operator[SEP] Keyword[final] identifier[SocketAddress] identifier[localAddress] operator[SEP] { Keyword[if] operator[SEP] identifier[localAddress] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[ChannelPipeline] identifier[pipeline] operator[SEP] Keyword[try] { identifier[pipeline] operator[=] identifier[getPipelineFactory] operator[SEP] operator[SEP] operator[SEP] identifier[getPipeline] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ChannelPipelineException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } identifier[Channel] identifier[ch] operator[=] identifier[getFactory] operator[SEP] operator[SEP] operator[SEP] identifier[newChannel] operator[SEP] identifier[pipeline] operator[SEP] operator[SEP] Keyword[boolean] identifier[success] operator[=] literal[boolean] operator[SEP] Keyword[try] { identifier[ch] operator[SEP] identifier[getConfig] operator[SEP] operator[SEP] operator[SEP] identifier[setOptions] operator[SEP] identifier[getOptions] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[success] operator[=] literal[boolean] operator[SEP] } Keyword[finally] { Keyword[if] operator[SEP] operator[!] identifier[success] operator[SEP] { identifier[ch] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } } identifier[ChannelFuture] identifier[future] operator[=] identifier[ch] operator[SEP] identifier[bind] operator[SEP] identifier[localAddress] operator[SEP] operator[SEP] Keyword[return] identifier[future] operator[SEP] }
@SuppressWarnings("fallthrough") public void add(int field, int amount) { if (amount == 0) { return; // Do nothing! } // We handle most fields in the same way. The algorithm is to add // a computed amount of millis to the current millis. The only // wrinkle is with DST (and/or a change to the zone's UTC offset, which // we'll include with DST) -- for some fields, like the DAY_OF_MONTH, // we don't want the wall time to shift due to changes in DST. If the // result of the add operation is to move from DST to Standard, or // vice versa, we need to adjust by an hour forward or back, // respectively. For such fields we set keepWallTimeInvariant to true. // We only adjust the DST for fields larger than an hour. For // fields smaller than an hour, we cannot adjust for DST without // causing problems. for instance, if you add one hour to April 5, // 1998, 1:00 AM, in PST, the time becomes "2:00 AM PDT" (an // illegal value), but then the adjustment sees the change and // compensates by subtracting an hour. As a result the time // doesn't advance at all. // For some fields larger than a day, such as a MONTH, we pin the // DAY_OF_MONTH. This allows <March 31>.add(MONTH, 1) to be // <April 30>, rather than <April 31> => <May 1>. long delta = amount; // delta in ms boolean keepWallTimeInvariant = true; switch (field) { case ERA: set(field, get(field) + amount); pinField(ERA); return; case YEAR: case YEAR_WOY: // * If era=0 and years go backwards in time, change sign of amount. // * Until we have new API per #9393, we temporarily hardcode knowledge of // which calendars have era 0 years that go backwards. // * Note that for YEAR (but not YEAR_WOY) we could instead handle // this by applying the amount to the EXTENDED_YEAR field; but since // we would still need to handle YEAR_WOY as below, might as well // also handle YEAR the same way. { int era = get(ERA); if (era == 0) { String calType = getType(); if (calType.equals("gregorian") || calType.equals("roc") || calType.equals("coptic")) { amount = -amount; } } } // Fall through into standard handling case EXTENDED_YEAR: case MONTH: { boolean oldLenient = isLenient(); setLenient(true); set(field, get(field) + amount); pinField(DAY_OF_MONTH); if(oldLenient==false) { complete(); setLenient(oldLenient); } } return; case WEEK_OF_YEAR: case WEEK_OF_MONTH: case DAY_OF_WEEK_IN_MONTH: delta *= ONE_WEEK; break; case AM_PM: delta *= 12 * ONE_HOUR; break; case DAY_OF_MONTH: case DAY_OF_YEAR: case DAY_OF_WEEK: case DOW_LOCAL: case JULIAN_DAY: delta *= ONE_DAY; break; case HOUR_OF_DAY: case HOUR: delta *= ONE_HOUR; keepWallTimeInvariant = false; break; case MINUTE: delta *= ONE_MINUTE; keepWallTimeInvariant = false; break; case SECOND: delta *= ONE_SECOND; keepWallTimeInvariant = false; break; case MILLISECOND: case MILLISECONDS_IN_DAY: keepWallTimeInvariant = false; break; default: throw new IllegalArgumentException("Calendar.add(" + fieldName(field) + ") not supported"); } // In order to keep the wall time invariant (for fields where this is // appropriate), check the combined DST & ZONE offset before and // after the add() operation. If it changes, then adjust the millis // to compensate. int prevOffset = 0; int prevWallTime = 0; if (keepWallTimeInvariant) { prevOffset = get(DST_OFFSET) + get(ZONE_OFFSET); prevWallTime = get(MILLISECONDS_IN_DAY); } setTimeInMillis(getTimeInMillis() + delta); if (keepWallTimeInvariant) { int newWallTime = get(MILLISECONDS_IN_DAY); if (newWallTime != prevWallTime) { // There is at least one zone transition between the base // time and the result time. As the result, wall time has // changed. long t = internalGetTimeInMillis(); int newOffset = get(DST_OFFSET) + get(ZONE_OFFSET); if (newOffset != prevOffset) { // When the difference of the previous UTC offset and // the new UTC offset exceeds 1 full day, we do not want // to roll over/back the date. For now, this only happens // in Samoa (Pacific/Apia) on Dec 30, 2011. See ticket:9452. long adjAmount = (prevOffset - newOffset) % ONE_DAY; if (adjAmount != 0) { setTimeInMillis(t + adjAmount); newWallTime = get(MILLISECONDS_IN_DAY); } if (newWallTime != prevWallTime) { // The result wall time or adjusted wall time was shifted because // the target wall time does not exist on the result date. switch (skippedWallTime) { case WALLTIME_FIRST: if (adjAmount > 0) { setTimeInMillis(t); } break; case WALLTIME_LAST: if (adjAmount < 0) { setTimeInMillis(t); } break; case WALLTIME_NEXT_VALID: long tmpT = adjAmount > 0 ? internalGetTimeInMillis() : t; Long immediatePrevTrans = getImmediatePreviousZoneTransition(tmpT); if (immediatePrevTrans != null) { setTimeInMillis(immediatePrevTrans); } else { throw new RuntimeException("Could not locate a time zone transition before " + tmpT); } break; } } } } } }
class class_name[name] begin[{] method[add, return_type[void], modifier[public], parameter[field, amount]] begin[{] if[binary_operation[member[.amount], ==, literal[0]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[long], delta] local_variable[type[boolean], keepWallTimeInvariant] SwitchStatement(cases=[SwitchStatementCase(case=['ERA'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operandr=MemberReference(member=amount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=set, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ERA, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pinField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)]), SwitchStatementCase(case=['YEAR', 'YEAR_WOY'], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=ERA, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=era)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=era, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=calType)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="gregorian")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=calType, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="roc")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=calType, selectors=[], type_arguments=None), operator=||), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="coptic")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=calType, selectors=[], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=amount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=amount, postfix_operators=[], prefix_operators=['-'], qualifier=, selectors=[])), label=None)]))]))])]), SwitchStatementCase(case=['EXTENDED_YEAR', 'MONTH'], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=isLenient, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=oldLenient)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setLenient, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operandr=MemberReference(member=amount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=set, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=DAY_OF_MONTH, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pinField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=oldLenient, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=complete, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=oldLenient, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setLenient, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), ReturnStatement(expression=None, label=None)]), SwitchStatementCase(case=['WEEK_OF_YEAR', 'WEEK_OF_MONTH', 'DAY_OF_WEEK_IN_MONTH'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=delta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=*=, value=MemberReference(member=ONE_WEEK, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['AM_PM'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=delta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=*=, value=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=12), operandr=MemberReference(member=ONE_HOUR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['DAY_OF_MONTH', 'DAY_OF_YEAR', 'DAY_OF_WEEK', 'DOW_LOCAL', 'JULIAN_DAY'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=delta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=*=, value=MemberReference(member=ONE_DAY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['HOUR_OF_DAY', 'HOUR'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=delta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=*=, value=MemberReference(member=ONE_HOUR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=keepWallTimeInvariant, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['MINUTE'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=delta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=*=, value=MemberReference(member=ONE_MINUTE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=keepWallTimeInvariant, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['SECOND'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=delta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=*=, value=MemberReference(member=ONE_SECOND, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=keepWallTimeInvariant, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['MILLISECOND', 'MILLISECONDS_IN_DAY'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=keepWallTimeInvariant, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Calendar.add("), operandr=MethodInvocation(arguments=[MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=") not supported"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None)])], expression=MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) local_variable[type[int], prevOffset] local_variable[type[int], prevWallTime] if[member[.keepWallTimeInvariant]] begin[{] assign[member[.prevOffset], binary_operation[call[.get, parameter[member[.DST_OFFSET]]], +, call[.get, parameter[member[.ZONE_OFFSET]]]]] assign[member[.prevWallTime], call[.get, parameter[member[.MILLISECONDS_IN_DAY]]]] else begin[{] None end[}] call[.setTimeInMillis, parameter[binary_operation[call[.getTimeInMillis, parameter[]], +, member[.delta]]]] if[member[.keepWallTimeInvariant]] begin[{] local_variable[type[int], newWallTime] if[binary_operation[member[.newWallTime], !=, member[.prevWallTime]]] begin[{] local_variable[type[long], t] local_variable[type[int], newOffset] if[binary_operation[member[.newOffset], !=, member[.prevOffset]]] begin[{] local_variable[type[long], adjAmount] if[binary_operation[member[.adjAmount], !=, literal[0]]] begin[{] call[.setTimeInMillis, parameter[binary_operation[member[.t], +, member[.adjAmount]]]] assign[member[.newWallTime], call[.get, parameter[member[.MILLISECONDS_IN_DAY]]]] else begin[{] None end[}] if[binary_operation[member[.newWallTime], !=, member[.prevWallTime]]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['WALLTIME_FIRST'], statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=adjAmount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setTimeInMillis, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['WALLTIME_LAST'], statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=adjAmount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setTimeInMillis, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['WALLTIME_NEXT_VALID'], statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=adjAmount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), if_false=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[], member=internalGetTimeInMillis, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), name=tmpT)], modifiers=set(), type=BasicType(dimensions=[], name=long)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=tmpT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getImmediatePreviousZoneTransition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=immediatePrevTrans)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Long, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=immediatePrevTrans, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not locate a time zone transition before "), operandr=MemberReference(member=tmpT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=immediatePrevTrans, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setTimeInMillis, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=skippedWallTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[add] operator[SEP] Keyword[int] identifier[field] , Keyword[int] identifier[amount] operator[SEP] { Keyword[if] operator[SEP] identifier[amount] operator[==] Other[0] operator[SEP] { Keyword[return] operator[SEP] } Keyword[long] identifier[delta] operator[=] identifier[amount] operator[SEP] Keyword[boolean] identifier[keepWallTimeInvariant] operator[=] literal[boolean] operator[SEP] Keyword[switch] operator[SEP] identifier[field] operator[SEP] { Keyword[case] identifier[ERA] operator[:] identifier[set] operator[SEP] identifier[field] , identifier[get] operator[SEP] identifier[field] operator[SEP] operator[+] identifier[amount] operator[SEP] operator[SEP] identifier[pinField] operator[SEP] identifier[ERA] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[case] identifier[YEAR] operator[:] Keyword[case] identifier[YEAR_WOY] operator[:] { Keyword[int] identifier[era] operator[=] identifier[get] operator[SEP] identifier[ERA] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[era] operator[==] Other[0] operator[SEP] { identifier[String] identifier[calType] operator[=] identifier[getType] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[calType] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[||] identifier[calType] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[||] identifier[calType] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[amount] operator[=] operator[-] identifier[amount] operator[SEP] } } } Keyword[case] identifier[EXTENDED_YEAR] operator[:] Keyword[case] identifier[MONTH] operator[:] { Keyword[boolean] identifier[oldLenient] operator[=] identifier[isLenient] operator[SEP] operator[SEP] operator[SEP] identifier[setLenient] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[set] operator[SEP] identifier[field] , identifier[get] operator[SEP] identifier[field] operator[SEP] operator[+] identifier[amount] operator[SEP] operator[SEP] identifier[pinField] operator[SEP] identifier[DAY_OF_MONTH] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[oldLenient] operator[==] literal[boolean] operator[SEP] { identifier[complete] operator[SEP] operator[SEP] operator[SEP] identifier[setLenient] operator[SEP] identifier[oldLenient] operator[SEP] operator[SEP] } } Keyword[return] operator[SEP] Keyword[case] identifier[WEEK_OF_YEAR] operator[:] Keyword[case] identifier[WEEK_OF_MONTH] operator[:] Keyword[case] identifier[DAY_OF_WEEK_IN_MONTH] operator[:] identifier[delta] operator[*=] identifier[ONE_WEEK] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[AM_PM] operator[:] identifier[delta] operator[*=] Other[12] operator[*] identifier[ONE_HOUR] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[DAY_OF_MONTH] operator[:] Keyword[case] identifier[DAY_OF_YEAR] operator[:] Keyword[case] identifier[DAY_OF_WEEK] operator[:] Keyword[case] identifier[DOW_LOCAL] operator[:] Keyword[case] identifier[JULIAN_DAY] operator[:] identifier[delta] operator[*=] identifier[ONE_DAY] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[HOUR_OF_DAY] operator[:] Keyword[case] identifier[HOUR] operator[:] identifier[delta] operator[*=] identifier[ONE_HOUR] operator[SEP] identifier[keepWallTimeInvariant] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[MINUTE] operator[:] identifier[delta] operator[*=] identifier[ONE_MINUTE] operator[SEP] identifier[keepWallTimeInvariant] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[SECOND] operator[:] identifier[delta] operator[*=] identifier[ONE_SECOND] operator[SEP] identifier[keepWallTimeInvariant] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[MILLISECOND] operator[:] Keyword[case] identifier[MILLISECONDS_IN_DAY] operator[:] identifier[keepWallTimeInvariant] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[fieldName] operator[SEP] identifier[field] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[int] identifier[prevOffset] operator[=] Other[0] operator[SEP] Keyword[int] identifier[prevWallTime] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[keepWallTimeInvariant] operator[SEP] { identifier[prevOffset] operator[=] identifier[get] operator[SEP] identifier[DST_OFFSET] operator[SEP] operator[+] identifier[get] operator[SEP] identifier[ZONE_OFFSET] operator[SEP] operator[SEP] identifier[prevWallTime] operator[=] identifier[get] operator[SEP] identifier[MILLISECONDS_IN_DAY] operator[SEP] operator[SEP] } identifier[setTimeInMillis] operator[SEP] identifier[getTimeInMillis] operator[SEP] operator[SEP] operator[+] identifier[delta] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[keepWallTimeInvariant] operator[SEP] { Keyword[int] identifier[newWallTime] operator[=] identifier[get] operator[SEP] identifier[MILLISECONDS_IN_DAY] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[newWallTime] operator[!=] identifier[prevWallTime] operator[SEP] { Keyword[long] identifier[t] operator[=] identifier[internalGetTimeInMillis] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[newOffset] operator[=] identifier[get] operator[SEP] identifier[DST_OFFSET] operator[SEP] operator[+] identifier[get] operator[SEP] identifier[ZONE_OFFSET] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[newOffset] operator[!=] identifier[prevOffset] operator[SEP] { Keyword[long] identifier[adjAmount] operator[=] operator[SEP] identifier[prevOffset] operator[-] identifier[newOffset] operator[SEP] operator[%] identifier[ONE_DAY] operator[SEP] Keyword[if] operator[SEP] identifier[adjAmount] operator[!=] Other[0] operator[SEP] { identifier[setTimeInMillis] operator[SEP] identifier[t] operator[+] identifier[adjAmount] operator[SEP] operator[SEP] identifier[newWallTime] operator[=] identifier[get] operator[SEP] identifier[MILLISECONDS_IN_DAY] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[newWallTime] operator[!=] identifier[prevWallTime] operator[SEP] { Keyword[switch] operator[SEP] identifier[skippedWallTime] operator[SEP] { Keyword[case] identifier[WALLTIME_FIRST] operator[:] Keyword[if] operator[SEP] identifier[adjAmount] operator[>] Other[0] operator[SEP] { identifier[setTimeInMillis] operator[SEP] identifier[t] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] identifier[WALLTIME_LAST] operator[:] Keyword[if] operator[SEP] identifier[adjAmount] operator[<] Other[0] operator[SEP] { identifier[setTimeInMillis] operator[SEP] identifier[t] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] identifier[WALLTIME_NEXT_VALID] operator[:] Keyword[long] identifier[tmpT] operator[=] identifier[adjAmount] operator[>] Other[0] operator[?] identifier[internalGetTimeInMillis] operator[SEP] operator[SEP] operator[:] identifier[t] operator[SEP] identifier[Long] identifier[immediatePrevTrans] operator[=] identifier[getImmediatePreviousZoneTransition] operator[SEP] identifier[tmpT] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[immediatePrevTrans] operator[!=] Other[null] operator[SEP] { identifier[setTimeInMillis] operator[SEP] identifier[immediatePrevTrans] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[+] identifier[tmpT] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] } } } } } }
void addSelectionBinding(ReadOnlyObjectProperty<Change> currentChange) { currentChange.addListener( (observable, oldValue, newValue) -> getSelectionModel().select(newValue) ); }
class class_name[name] begin[{] method[addSelectionBinding, return_type[void], modifier[default], parameter[currentChange]] begin[{] call[currentChange.addListener, parameter[LambdaExpression(body=MethodInvocation(arguments=[], member=getSelectionModel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=newValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=select, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), parameters=[InferredFormalParameter(name=observable), InferredFormalParameter(name=oldValue), InferredFormalParameter(name=newValue)])]] end[}] END[}]
Keyword[void] identifier[addSelectionBinding] operator[SEP] identifier[ReadOnlyObjectProperty] operator[<] identifier[Change] operator[>] identifier[currentChange] operator[SEP] { identifier[currentChange] operator[SEP] identifier[addListener] operator[SEP] operator[SEP] identifier[observable] , identifier[oldValue] , identifier[newValue] operator[SEP] operator[->] identifier[getSelectionModel] operator[SEP] operator[SEP] operator[SEP] identifier[select] operator[SEP] identifier[newValue] operator[SEP] operator[SEP] operator[SEP] }
public void cleanup() { htDictionary.clear(); memoryEstimate.decrementTotalMemory(byteArray.getSizeInBytes()); memoryEstimate.decrementTotalMemory(getSizeOfIntArrays()); memoryEstimate.decrementDictionaryMemory(byteArray.size()); }
class class_name[name] begin[{] method[cleanup, return_type[void], modifier[public], parameter[]] begin[{] call[htDictionary.clear, parameter[]] call[memoryEstimate.decrementTotalMemory, parameter[call[byteArray.getSizeInBytes, parameter[]]]] call[memoryEstimate.decrementTotalMemory, parameter[call[.getSizeOfIntArrays, parameter[]]]] call[memoryEstimate.decrementDictionaryMemory, parameter[call[byteArray.size, parameter[]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[cleanup] operator[SEP] operator[SEP] { identifier[htDictionary] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[memoryEstimate] operator[SEP] identifier[decrementTotalMemory] operator[SEP] identifier[byteArray] operator[SEP] identifier[getSizeInBytes] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[memoryEstimate] operator[SEP] identifier[decrementTotalMemory] operator[SEP] identifier[getSizeOfIntArrays] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[memoryEstimate] operator[SEP] identifier[decrementDictionaryMemory] operator[SEP] identifier[byteArray] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@SuppressWarnings("unused") // Public API public void setAutoScaleEnabled(boolean isAutoScaleEnabled) { this.isAutoScaleEnabled = isAutoScaleEnabled; for (int i = 0, size = foldableItemsMap.size(); i < size; i++) { foldableItemsMap.valueAt(i).setAutoScaleEnabled(isAutoScaleEnabled); } }
class class_name[name] begin[{] method[setAutoScaleEnabled, return_type[void], modifier[public], parameter[isAutoScaleEnabled]] begin[{] assign[THIS[member[None.isAutoScaleEnabled]], member[.isAutoScaleEnabled]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueAt, postfix_operators=[], prefix_operators=[], qualifier=foldableItemsMap, selectors=[MethodInvocation(arguments=[MemberReference(member=isAutoScaleEnabled, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setAutoScaleEnabled, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i), VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=foldableItemsMap, selectors=[], type_arguments=None), name=size)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[setAutoScaleEnabled] operator[SEP] Keyword[boolean] identifier[isAutoScaleEnabled] operator[SEP] { Keyword[this] operator[SEP] identifier[isAutoScaleEnabled] operator[=] identifier[isAutoScaleEnabled] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] , identifier[size] operator[=] identifier[foldableItemsMap] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[<] identifier[size] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[foldableItemsMap] operator[SEP] identifier[valueAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[setAutoScaleEnabled] operator[SEP] identifier[isAutoScaleEnabled] operator[SEP] operator[SEP] } }
public void tinc(String name, int con) throws IOException { TypeMirror cn = getLocalType(name); int index = getLocalVariableIndex(name); tinc(cn, index, con); }
class class_name[name] begin[{] method[tinc, return_type[void], modifier[public], parameter[name, con]] begin[{] local_variable[type[TypeMirror], cn] local_variable[type[int], index] call[.tinc, parameter[member[.cn], member[.index], member[.con]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[tinc] operator[SEP] identifier[String] identifier[name] , Keyword[int] identifier[con] operator[SEP] Keyword[throws] identifier[IOException] { identifier[TypeMirror] identifier[cn] operator[=] identifier[getLocalType] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[int] identifier[index] operator[=] identifier[getLocalVariableIndex] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[tinc] operator[SEP] identifier[cn] , identifier[index] , identifier[con] operator[SEP] operator[SEP] }
public static Request newMeRequest(Session session, final GraphUserCallback callback) { Callback wrapper = new Callback() { @Override public void onCompleted(Response response) { if (callback != null) { callback.onCompleted(response.getGraphObjectAs(GraphUser.class), response); } } }; return new Request(session, ME, null, null, wrapper); }
class class_name[name] begin[{] method[newMeRequest, return_type[type[Request]], modifier[public static], parameter[session, callback]] begin[{] local_variable[type[Callback], wrapper] return[ClassCreator(arguments=[MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=wrapper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Request, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Request] identifier[newMeRequest] operator[SEP] identifier[Session] identifier[session] , Keyword[final] identifier[GraphUserCallback] identifier[callback] operator[SEP] { identifier[Callback] identifier[wrapper] operator[=] Keyword[new] identifier[Callback] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onCompleted] operator[SEP] identifier[Response] identifier[response] operator[SEP] { Keyword[if] operator[SEP] identifier[callback] operator[!=] Other[null] operator[SEP] { identifier[callback] operator[SEP] identifier[onCompleted] operator[SEP] identifier[response] operator[SEP] identifier[getGraphObjectAs] operator[SEP] identifier[GraphUser] operator[SEP] Keyword[class] operator[SEP] , identifier[response] operator[SEP] operator[SEP] } } } operator[SEP] Keyword[return] Keyword[new] identifier[Request] operator[SEP] identifier[session] , identifier[ME] , Other[null] , Other[null] , identifier[wrapper] operator[SEP] operator[SEP] }
public CreditPayments getCreditPayments(final String accountCode, final QueryParams params) { final String path = Accounts.ACCOUNTS_RESOURCE + "/" + accountCode + CreditPayments.CREDIT_PAYMENTS_RESOURCE; return doGET(path, CreditPayments.class, params); }
class class_name[name] begin[{] method[getCreditPayments, return_type[type[CreditPayments]], modifier[public], parameter[accountCode, params]] begin[{] local_variable[type[String], path] return[call[.doGET, parameter[member[.path], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CreditPayments, sub_type=None)), member[.params]]]] end[}] END[}]
Keyword[public] identifier[CreditPayments] identifier[getCreditPayments] operator[SEP] Keyword[final] identifier[String] identifier[accountCode] , Keyword[final] identifier[QueryParams] identifier[params] operator[SEP] { Keyword[final] identifier[String] identifier[path] operator[=] identifier[Accounts] operator[SEP] identifier[ACCOUNTS_RESOURCE] operator[+] literal[String] operator[+] identifier[accountCode] operator[+] identifier[CreditPayments] operator[SEP] identifier[CREDIT_PAYMENTS_RESOURCE] operator[SEP] Keyword[return] identifier[doGET] operator[SEP] identifier[path] , identifier[CreditPayments] operator[SEP] Keyword[class] , identifier[params] operator[SEP] operator[SEP] }
public void setCaseCanonicalizationLocale(final Locale caseCanonicalizationLocale) { if (caseCanonicalizationLocale == null) { this.caseCanonicalizationLocale = Locale.getDefault(); } else { this.caseCanonicalizationLocale = caseCanonicalizationLocale; } }
class class_name[name] begin[{] method[setCaseCanonicalizationLocale, return_type[void], modifier[public], parameter[caseCanonicalizationLocale]] begin[{] if[binary_operation[member[.caseCanonicalizationLocale], ==, literal[null]]] begin[{] assign[THIS[member[None.caseCanonicalizationLocale]], call[Locale.getDefault, parameter[]]] else begin[{] assign[THIS[member[None.caseCanonicalizationLocale]], member[.caseCanonicalizationLocale]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setCaseCanonicalizationLocale] operator[SEP] Keyword[final] identifier[Locale] identifier[caseCanonicalizationLocale] operator[SEP] { Keyword[if] operator[SEP] identifier[caseCanonicalizationLocale] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[caseCanonicalizationLocale] operator[=] identifier[Locale] operator[SEP] identifier[getDefault] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[this] operator[SEP] identifier[caseCanonicalizationLocale] operator[=] identifier[caseCanonicalizationLocale] operator[SEP] } }
public void forward(HttpServletRequest request, HttpServletResponse response, final String target) throws ServletException, IOException { if (target.startsWith("/WEB-INF/classes") || target.startsWith("/WEB-INF/lib") || target.matches("^/WEB-INF/.+\\.xml")) { throw new IOException("Not allowed"); } this.contentJsp = target; this.originalRequestURL = request.getRequestURL().toString(); request.setAttribute(FERRET_NAME, this); RequestDispatcher dispatcher = request.getRequestDispatcher(target); if(dispatcher == null) { throw new IOException("No dispatcher for " + target); } dispatcher.forward(request, response); }
class class_name[name] begin[{] method[forward, return_type[void], modifier[public], parameter[request, response, target]] begin[{] if[binary_operation[binary_operation[call[target.startsWith, parameter[literal["/WEB-INF/classes"]]], ||, call[target.startsWith, parameter[literal["/WEB-INF/lib"]]]], ||, call[target.matches, parameter[literal["^/WEB-INF/.+\\.xml"]]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Not allowed")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None) else begin[{] None end[}] assign[THIS[member[None.contentJsp]], member[.target]] assign[THIS[member[None.originalRequestURL]], call[request.getRequestURL, parameter[]]] call[request.setAttribute, parameter[member[.FERRET_NAME], THIS[]]] local_variable[type[RequestDispatcher], dispatcher] if[binary_operation[member[.dispatcher], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No dispatcher for "), operandr=MemberReference(member=target, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None) else begin[{] None end[}] call[dispatcher.forward, parameter[member[.request], member[.response]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[forward] operator[SEP] identifier[HttpServletRequest] identifier[request] , identifier[HttpServletResponse] identifier[response] , Keyword[final] identifier[String] identifier[target] operator[SEP] Keyword[throws] identifier[ServletException] , identifier[IOException] { Keyword[if] operator[SEP] identifier[target] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[target] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[target] operator[SEP] identifier[matches] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[contentJsp] operator[=] identifier[target] operator[SEP] Keyword[this] operator[SEP] identifier[originalRequestURL] operator[=] identifier[request] operator[SEP] identifier[getRequestURL] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[request] operator[SEP] identifier[setAttribute] operator[SEP] identifier[FERRET_NAME] , Keyword[this] operator[SEP] operator[SEP] identifier[RequestDispatcher] identifier[dispatcher] operator[=] identifier[request] operator[SEP] identifier[getRequestDispatcher] operator[SEP] identifier[target] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dispatcher] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[target] operator[SEP] operator[SEP] } identifier[dispatcher] operator[SEP] identifier[forward] operator[SEP] identifier[request] , identifier[response] operator[SEP] operator[SEP] }
@Benchmark @BenchmarkMode(Mode.SampleTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public StatsTraceContext newServerContext_empty() { return StatsTraceContext.newServerContext( serverStreamTracerFactories, methodName, emptyMetadata); }
class class_name[name] begin[{] method[newServerContext_empty, return_type[type[StatsTraceContext]], modifier[public], parameter[]] begin[{] return[call[StatsTraceContext.newServerContext, parameter[member[.serverStreamTracerFactories], member[.methodName], member[.emptyMetadata]]]] end[}] END[}]
annotation[@] identifier[Benchmark] annotation[@] identifier[BenchmarkMode] operator[SEP] identifier[Mode] operator[SEP] identifier[SampleTime] operator[SEP] annotation[@] identifier[OutputTimeUnit] operator[SEP] identifier[TimeUnit] operator[SEP] identifier[NANOSECONDS] operator[SEP] Keyword[public] identifier[StatsTraceContext] identifier[newServerContext_empty] operator[SEP] operator[SEP] { Keyword[return] identifier[StatsTraceContext] operator[SEP] identifier[newServerContext] operator[SEP] identifier[serverStreamTracerFactories] , identifier[methodName] , identifier[emptyMetadata] operator[SEP] operator[SEP] }
@Override public SetAttribute<X, ?> getDeclaredSet(String paramName) { PluralAttribute<X, ?, ?> declaredAttrib = getDeclaredPluralAttribute(paramName); if (isSetAttribute(declaredAttrib)) { return (SetAttribute<X, ?>) declaredAttrib; } throw new IllegalArgumentException( "attribute of the given name and type is not present in the managed type, for name:" + paramName); }
class class_name[name] begin[{] method[getDeclaredSet, return_type[type[SetAttribute]], modifier[public], parameter[paramName]] begin[{] local_variable[type[PluralAttribute], declaredAttrib] if[call[.isSetAttribute, parameter[member[.declaredAttrib]]]] begin[{] return[Cast(expression=MemberReference(member=declaredAttrib, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=X, sub_type=None)), TypeArgument(pattern_type=?, type=None)], dimensions=[], name=SetAttribute, sub_type=None))] else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="attribute of the given name and type is not present in the managed type, for name:"), operandr=MemberReference(member=paramName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[SetAttribute] operator[<] identifier[X] , operator[?] operator[>] identifier[getDeclaredSet] operator[SEP] identifier[String] identifier[paramName] operator[SEP] { identifier[PluralAttribute] operator[<] identifier[X] , operator[?] , operator[?] operator[>] identifier[declaredAttrib] operator[=] identifier[getDeclaredPluralAttribute] operator[SEP] identifier[paramName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isSetAttribute] operator[SEP] identifier[declaredAttrib] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] identifier[SetAttribute] operator[<] identifier[X] , operator[?] operator[>] operator[SEP] identifier[declaredAttrib] operator[SEP] } Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[paramName] operator[SEP] operator[SEP] }
@Override public EClass getIfcBoolean() { if (ifcBooleanEClass == null) { ifcBooleanEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI).getEClassifiers() .get(785); } return ifcBooleanEClass; }
class class_name[name] begin[{] method[getIfcBoolean, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcBooleanEClass], ==, literal[null]]] begin[{] assign[member[.ifcBooleanEClass], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=Ifc4Package, selectors=[])], member=getEPackage, postfix_operators=[], prefix_operators=[], qualifier=EPackage.Registry.INSTANCE, selectors=[MethodInvocation(arguments=[], member=getEClassifiers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=785)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=EClass, sub_type=None))] else begin[{] None end[}] return[member[.ifcBooleanEClass]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcBoolean] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcBooleanEClass] operator[==] Other[null] operator[SEP] { identifier[ifcBooleanEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[Ifc4Package] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[785] operator[SEP] operator[SEP] } Keyword[return] identifier[ifcBooleanEClass] operator[SEP] }
public BoundSet reduce(TypeSolver typeSolver) { List<ConstraintFormula> constraints = new LinkedList<>(constraintFormulas); BoundSet boundSet = BoundSet.empty(); while (constraints.size() > 0) { ConstraintFormula constraintFormula = constraints.remove(0); ConstraintFormula.ReductionResult reductionResult = constraintFormula.reduce(boundSet); constraints.addAll(reductionResult.getConstraintFormulas()); boundSet.incorporate(reductionResult.getBoundSet(), typeSolver); } return boundSet; }
class class_name[name] begin[{] method[reduce, return_type[type[BoundSet]], modifier[public], parameter[typeSolver]] begin[{] local_variable[type[List], constraints] local_variable[type[BoundSet], boundSet] while[binary_operation[call[constraints.size, parameter[]], >, literal[0]]] begin[{] local_variable[type[ConstraintFormula], constraintFormula] local_variable[type[ConstraintFormula], reductionResult] call[constraints.addAll, parameter[call[reductionResult.getConstraintFormulas, parameter[]]]] call[boundSet.incorporate, parameter[call[reductionResult.getBoundSet, parameter[]], member[.typeSolver]]] end[}] return[member[.boundSet]] end[}] END[}]
Keyword[public] identifier[BoundSet] identifier[reduce] operator[SEP] identifier[TypeSolver] identifier[typeSolver] operator[SEP] { identifier[List] operator[<] identifier[ConstraintFormula] operator[>] identifier[constraints] operator[=] Keyword[new] identifier[LinkedList] operator[<] operator[>] operator[SEP] identifier[constraintFormulas] operator[SEP] operator[SEP] identifier[BoundSet] identifier[boundSet] operator[=] identifier[BoundSet] operator[SEP] identifier[empty] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[constraints] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[ConstraintFormula] identifier[constraintFormula] operator[=] identifier[constraints] operator[SEP] identifier[remove] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[ConstraintFormula] operator[SEP] identifier[ReductionResult] identifier[reductionResult] operator[=] identifier[constraintFormula] operator[SEP] identifier[reduce] operator[SEP] identifier[boundSet] operator[SEP] operator[SEP] identifier[constraints] operator[SEP] identifier[addAll] operator[SEP] identifier[reductionResult] operator[SEP] identifier[getConstraintFormulas] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[boundSet] operator[SEP] identifier[incorporate] operator[SEP] identifier[reductionResult] operator[SEP] identifier[getBoundSet] operator[SEP] operator[SEP] , identifier[typeSolver] operator[SEP] operator[SEP] } Keyword[return] identifier[boundSet] operator[SEP] }
public <T> List<T> collectionFromJson(String json, Class<T> clazz) throws JsonException { if (json == null) { return null; } try { List<T> result = new ArrayList<T>(); List tempParseResult = (List) mapper.readValue(json, new TypeReference<List<T>>() { }); for (Object temp : tempParseResult) { result.add(fromJson(toJson(temp), clazz)); } return result; } catch (JsonParseException e) { throw new JsonException(e.getMessage(), e); } catch (JsonMappingException e) { throw new JsonException(e.getMessage(), e); } catch (IOException e) { throw new JsonException(e.getMessage(), e); } }
class class_name[name] begin[{] method[collectionFromJson, return_type[type[List]], modifier[public], parameter[json, clazz]] begin[{] if[binary_operation[member[.json], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None)), name=result)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=List, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=json, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[], body=[], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=List, sub_type=None))], dimensions=None, name=TypeReference, sub_type=None))], member=readValue, postfix_operators=[], prefix_operators=[], qualifier=mapper, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=List, sub_type=None)), name=tempParseResult)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=List, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=temp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toJson, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fromJson, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=tempParseResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=temp)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))), label=None), ReturnStatement(expression=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JsonException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['JsonParseException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JsonException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['JsonMappingException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JsonException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[collectionFromJson] operator[SEP] identifier[String] identifier[json] , identifier[Class] operator[<] identifier[T] operator[>] identifier[clazz] operator[SEP] Keyword[throws] identifier[JsonException] { Keyword[if] operator[SEP] identifier[json] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[try] { identifier[List] operator[<] identifier[T] operator[>] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[T] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] identifier[tempParseResult] operator[=] operator[SEP] identifier[List] operator[SEP] identifier[mapper] operator[SEP] identifier[readValue] operator[SEP] identifier[json] , Keyword[new] identifier[TypeReference] operator[<] identifier[List] operator[<] identifier[T] operator[>] operator[>] operator[SEP] operator[SEP] { } operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Object] identifier[temp] operator[:] identifier[tempParseResult] operator[SEP] { identifier[result] operator[SEP] identifier[add] operator[SEP] identifier[fromJson] operator[SEP] identifier[toJson] operator[SEP] identifier[temp] operator[SEP] , identifier[clazz] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] } Keyword[catch] operator[SEP] identifier[JsonParseException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[JsonException] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[JsonMappingException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[JsonException] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[JsonException] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
private String normalize(String str){ str = StringUtils.trimToEmpty(str); str = StringUtils.normalizeSpace(str); // remove whitespace before punctuation. not using \p{Punct}, // because it includes to many special characters. str = str.replaceAll("\\s+(?=[.!,\\?;:])", ""); return str; }
class class_name[name] begin[{] method[normalize, return_type[type[String]], modifier[private], parameter[str]] begin[{] assign[member[.str], call[StringUtils.trimToEmpty, parameter[member[.str]]]] assign[member[.str], call[StringUtils.normalizeSpace, parameter[member[.str]]]] assign[member[.str], call[str.replaceAll, parameter[literal["\\s+(?=[.!,\\?;:])"], literal[""]]]] return[member[.str]] end[}] END[}]
Keyword[private] identifier[String] identifier[normalize] operator[SEP] identifier[String] identifier[str] operator[SEP] { identifier[str] operator[=] identifier[StringUtils] operator[SEP] identifier[trimToEmpty] operator[SEP] identifier[str] operator[SEP] operator[SEP] identifier[str] operator[=] identifier[StringUtils] operator[SEP] identifier[normalizeSpace] operator[SEP] identifier[str] operator[SEP] operator[SEP] identifier[str] operator[=] identifier[str] operator[SEP] identifier[replaceAll] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[str] operator[SEP] }
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "parameterValue", substitutionHeadNamespace = "http://www.opengis.net/gml", substitutionHeadName = "_generalParameterValue") public JAXBElement<ParameterValueType> createParameterValue(ParameterValueType value) { return new JAXBElement<ParameterValueType>(_ParameterValue_QNAME, ParameterValueType.class, null, value); }
class class_name[name] begin[{] method[createParameterValue, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=_ParameterValue_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ParameterValueType, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ParameterValueType, sub_type=None))], dimensions=None, name=JAXBElement, sub_type=None))] end[}] END[}]
annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] , identifier[substitutionHeadNamespace] operator[=] literal[String] , identifier[substitutionHeadName] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[ParameterValueType] operator[>] identifier[createParameterValue] operator[SEP] identifier[ParameterValueType] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[JAXBElement] operator[<] identifier[ParameterValueType] operator[>] operator[SEP] identifier[_ParameterValue_QNAME] , identifier[ParameterValueType] operator[SEP] Keyword[class] , Other[null] , identifier[value] operator[SEP] operator[SEP] }
private void initLanguageDetection() { try { // use a seed for initializing the language detection for making sure the // same probabilities are detected for the same document contents DetectorFactory.clear(); DetectorFactory.setSeed(42L); DetectorFactory.loadProfile(loadProfiles(getAvailableLocales())); } catch (Exception e) { LOG.error(Messages.get().getBundle().key(Messages.INIT_I18N_LANG_DETECT_FAILED_0), e); } }
class class_name[name] begin[{] method[initLanguageDetection, return_type[void], modifier[private], parameter[]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=clear, postfix_operators=[], prefix_operators=[], qualifier=DetectorFactory, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=42L)], member=setSeed, postfix_operators=[], prefix_operators=[], qualifier=DetectorFactory, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAvailableLocales, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=loadProfiles, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=loadProfile, postfix_operators=[], prefix_operators=[], qualifier=DetectorFactory, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[MethodInvocation(arguments=[], member=getBundle, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=INIT_I18N_LANG_DETECT_FAILED_0, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[])], member=key, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[initLanguageDetection] operator[SEP] operator[SEP] { Keyword[try] { identifier[DetectorFactory] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[DetectorFactory] operator[SEP] identifier[setSeed] operator[SEP] Other[42L] operator[SEP] operator[SEP] identifier[DetectorFactory] operator[SEP] identifier[loadProfile] operator[SEP] identifier[loadProfiles] operator[SEP] identifier[getAvailableLocales] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[getBundle] operator[SEP] operator[SEP] operator[SEP] identifier[key] operator[SEP] identifier[Messages] operator[SEP] identifier[INIT_I18N_LANG_DETECT_FAILED_0] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
@Implementation(minSdk = P) protected static @Nullable @AttrRes int[] nativeGetStyleAttributes(long ptr, @StyleRes int resid) { CppAssetManager2 assetmanager = AssetManagerFromLong(ptr); ResolvedBag bag = assetmanager.GetBag(resid); if (bag == null) { return null; } int[] array = new int[bag.entry_count]; // if (env.ExceptionCheck()) { // return null; // } for (int i = 0; i < bag.entry_count; i++) { int attr_resid = bag.entries[i].key; // env.SetIntArrayRegion(array, i, 1, &attr_resid); array[i] = attr_resid; } return array; }
class class_name[name] begin[{] method[nativeGetStyleAttributes, return_type[type[int]], modifier[static protected], parameter[ptr, resid]] begin[{] local_variable[type[CppAssetManager2], assetmanager] local_variable[type[ResolvedBag], bag] if[binary_operation[member[.bag], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[int], array] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=entries, postfix_operators=[], prefix_operators=[], qualifier=bag, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=key, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), name=attr_resid)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=attr_resid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=entry_count, postfix_operators=[], prefix_operators=[], qualifier=bag, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.array]] end[}] END[}]
annotation[@] identifier[Implementation] operator[SEP] identifier[minSdk] operator[=] identifier[P] operator[SEP] Keyword[protected] Keyword[static] annotation[@] identifier[Nullable] annotation[@] identifier[AttrRes] Keyword[int] operator[SEP] operator[SEP] identifier[nativeGetStyleAttributes] operator[SEP] Keyword[long] identifier[ptr] , annotation[@] identifier[StyleRes] Keyword[int] identifier[resid] operator[SEP] { identifier[CppAssetManager2] identifier[assetmanager] operator[=] identifier[AssetManagerFromLong] operator[SEP] identifier[ptr] operator[SEP] operator[SEP] identifier[ResolvedBag] identifier[bag] operator[=] identifier[assetmanager] operator[SEP] identifier[GetBag] operator[SEP] identifier[resid] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[bag] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[int] operator[SEP] operator[SEP] identifier[array] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[bag] operator[SEP] identifier[entry_count] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[bag] operator[SEP] identifier[entry_count] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[int] identifier[attr_resid] operator[=] identifier[bag] operator[SEP] identifier[entries] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[key] operator[SEP] identifier[array] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[attr_resid] operator[SEP] } Keyword[return] identifier[array] operator[SEP] }
public static List<ExportsDirective> exportsIn(Iterable<? extends Directive> directives) { return listFilter(directives, DirectiveKind.EXPORTS, ExportsDirective.class); }
class class_name[name] begin[{] method[exportsIn, return_type[type[List]], modifier[public static], parameter[directives]] begin[{] return[call[.listFilter, parameter[member[.directives], member[DirectiveKind.EXPORTS], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ExportsDirective, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[ExportsDirective] operator[>] identifier[exportsIn] operator[SEP] identifier[Iterable] operator[<] operator[?] Keyword[extends] identifier[Directive] operator[>] identifier[directives] operator[SEP] { Keyword[return] identifier[listFilter] operator[SEP] identifier[directives] , identifier[DirectiveKind] operator[SEP] identifier[EXPORTS] , identifier[ExportsDirective] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
private Map<String, String> getOptionsFromConfigFile(String newConfigFile) throws MojoExecutionException { this.getLog().debug("Using search path at: " + this.basedir.getAbsolutePath()); this.resourceManager.addSearchPath(FileResourceLoader.ID, this.basedir.getAbsolutePath()); try (InputStream configInput = this.resourceManager.getResourceAsInputStream(newConfigFile)) { return new ConfigReader().read(configInput); } catch (ResourceNotFoundException e) { throw new MojoExecutionException("Cannot find config file [" + newConfigFile + "]"); } catch (IOException e) { throw new MojoExecutionException("Cannot read config file [" + newConfigFile + "]", e); } catch (SAXException e) { throw new MojoExecutionException("Cannot parse config file [" + newConfigFile + "]", e); } catch (ConfigReadException e) { throw new MojoExecutionException(e.getMessage(), e); } }
class class_name[name] begin[{] method[getOptionsFromConfigFile, return_type[type[Map]], modifier[private], parameter[newConfigFile]] begin[{] THIS[call[None.getLog, parameter[]]call[None.debug, parameter[binary_operation[literal["Using search path at: "], +, THIS[member[None.basedir]call[None.getAbsolutePath, parameter[]]]]]]] THIS[member[None.resourceManager]call[None.addSearchPath, parameter[member[FileResourceLoader.ID], THIS[member[None.basedir]call[None.getAbsolutePath, parameter[]]]]]] TryStatement(block=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=configInput, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=read, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=ConfigReader, sub_type=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot find config file ["), operandr=MemberReference(member=newConfigFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="]"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MojoExecutionException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ResourceNotFoundException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot read config file ["), operandr=MemberReference(member=newConfigFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="]"), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MojoExecutionException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot parse config file ["), operandr=MemberReference(member=newConfigFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="]"), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MojoExecutionException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SAXException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MojoExecutionException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ConfigReadException']))], finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=configInput, type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None), value=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=resourceManager, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=newConfigFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getResourceAsInputStream, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]))]) end[}] END[}]
Keyword[private] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[getOptionsFromConfigFile] operator[SEP] identifier[String] identifier[newConfigFile] operator[SEP] Keyword[throws] identifier[MojoExecutionException] { Keyword[this] operator[SEP] identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] Keyword[this] operator[SEP] identifier[basedir] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[resourceManager] operator[SEP] identifier[addSearchPath] operator[SEP] identifier[FileResourceLoader] operator[SEP] identifier[ID] , Keyword[this] operator[SEP] identifier[basedir] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[try] operator[SEP] identifier[InputStream] identifier[configInput] operator[=] Keyword[this] operator[SEP] identifier[resourceManager] operator[SEP] identifier[getResourceAsInputStream] operator[SEP] identifier[newConfigFile] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[ConfigReader] operator[SEP] operator[SEP] operator[SEP] identifier[read] operator[SEP] identifier[configInput] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ResourceNotFoundException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[MojoExecutionException] operator[SEP] literal[String] operator[+] identifier[newConfigFile] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[MojoExecutionException] operator[SEP] literal[String] operator[+] identifier[newConfigFile] operator[+] literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SAXException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[MojoExecutionException] operator[SEP] literal[String] operator[+] identifier[newConfigFile] operator[+] literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ConfigReadException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[MojoExecutionException] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public Socket call() throws InterruptedException { useDefaultsForMissingFields(); Socket socket = createSocket(); while (socket == null && !Thread.currentThread().isInterrupted()) { Thread.sleep(delayStrategy.nextDelay()); socket = createSocket(); } return socket; }
class class_name[name] begin[{] method[call, return_type[type[Socket]], modifier[public], parameter[]] begin[{] call[.useDefaultsForMissingFields, parameter[]] local_variable[type[Socket], socket] while[binary_operation[binary_operation[member[.socket], ==, literal[null]], &&, call[Thread.currentThread, parameter[]]]] begin[{] call[Thread.sleep, parameter[call[delayStrategy.nextDelay, parameter[]]]] assign[member[.socket], call[.createSocket, parameter[]]] end[}] return[member[.socket]] end[}] END[}]
Keyword[public] identifier[Socket] identifier[call] operator[SEP] operator[SEP] Keyword[throws] identifier[InterruptedException] { identifier[useDefaultsForMissingFields] operator[SEP] operator[SEP] operator[SEP] identifier[Socket] identifier[socket] operator[=] identifier[createSocket] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[socket] operator[==] Other[null] operator[&&] operator[!] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] identifier[isInterrupted] operator[SEP] operator[SEP] operator[SEP] { identifier[Thread] operator[SEP] identifier[sleep] operator[SEP] identifier[delayStrategy] operator[SEP] identifier[nextDelay] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[socket] operator[=] identifier[createSocket] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[socket] operator[SEP] }
public static Object loadInstance(Class clazz, Object[] args, Object defaultValue) { if (args == null || args.length == 0) return loadInstance(clazz, defaultValue); try { Class[] cArgs = new Class[args.length]; for (int i = 0; i < args.length; i++) { if (args[i] == null) cArgs[i] = Object.class; else cArgs[i] = args[i].getClass(); } Constructor c = clazz.getConstructor(cArgs); return c.newInstance(args); } catch (Throwable t) { ExceptionUtil.rethrowIfNecessary(t); return defaultValue; } }
class class_name[name] begin[{] method[loadInstance, return_type[type[Object]], modifier[public static], parameter[clazz, args, defaultValue]] begin[{] if[binary_operation[binary_operation[member[.args], ==, literal[null]], ||, binary_operation[member[args.length], ==, literal[0]]]] begin[{] return[call[.loadInstance, parameter[member[.clazz], member[.defaultValue]]]] else begin[{] None end[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=args, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Class, sub_type=None)), name=cArgs)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=Class, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=cArgs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=getClass, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])), label=None), label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=cArgs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))), label=None))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=args, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=cArgs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getConstructor, postfix_operators=[], prefix_operators=[], qualifier=clazz, selectors=[], type_arguments=None), name=c)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Constructor, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rethrowIfNecessary, postfix_operators=[], prefix_operators=[], qualifier=ExceptionUtil, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=defaultValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[Object] identifier[loadInstance] operator[SEP] identifier[Class] identifier[clazz] , identifier[Object] operator[SEP] operator[SEP] identifier[args] , identifier[Object] identifier[defaultValue] operator[SEP] { Keyword[if] operator[SEP] identifier[args] operator[==] Other[null] operator[||] identifier[args] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] Keyword[return] identifier[loadInstance] operator[SEP] identifier[clazz] , identifier[defaultValue] operator[SEP] operator[SEP] Keyword[try] { identifier[Class] operator[SEP] operator[SEP] identifier[cArgs] operator[=] Keyword[new] identifier[Class] operator[SEP] identifier[args] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[args] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[args] operator[SEP] identifier[i] operator[SEP] operator[==] Other[null] operator[SEP] identifier[cArgs] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[Object] operator[SEP] Keyword[class] operator[SEP] Keyword[else] identifier[cArgs] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[args] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] } identifier[Constructor] identifier[c] operator[=] identifier[clazz] operator[SEP] identifier[getConstructor] operator[SEP] identifier[cArgs] operator[SEP] operator[SEP] Keyword[return] identifier[c] operator[SEP] identifier[newInstance] operator[SEP] identifier[args] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { identifier[ExceptionUtil] operator[SEP] identifier[rethrowIfNecessary] operator[SEP] identifier[t] operator[SEP] operator[SEP] Keyword[return] identifier[defaultValue] operator[SEP] } }
private void applyWait(int fullTimes) { int newFullTimes = fullTimes > maxFullTimes ? maxFullTimes : fullTimes; if (fullTimes <= 3) { // 3次以内 Thread.yield(); } else { // 超过3次,最多只sleep 10ms LockSupport.parkNanos(1000 * 1000L * newFullTimes); } }
class class_name[name] begin[{] method[applyWait, return_type[void], modifier[private], parameter[fullTimes]] begin[{] local_variable[type[int], newFullTimes] if[binary_operation[member[.fullTimes], <=, literal[3]]] begin[{] call[Thread.yield, parameter[]] else begin[{] call[LockSupport.parkNanos, parameter[binary_operation[binary_operation[literal[1000], *, literal[1000L]], *, member[.newFullTimes]]]] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[applyWait] operator[SEP] Keyword[int] identifier[fullTimes] operator[SEP] { Keyword[int] identifier[newFullTimes] operator[=] identifier[fullTimes] operator[>] identifier[maxFullTimes] operator[?] identifier[maxFullTimes] operator[:] identifier[fullTimes] operator[SEP] Keyword[if] operator[SEP] identifier[fullTimes] operator[<=] Other[3] operator[SEP] { identifier[Thread] operator[SEP] identifier[yield] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[LockSupport] operator[SEP] identifier[parkNanos] operator[SEP] Other[1000] operator[*] Other[1000L] operator[*] identifier[newFullTimes] operator[SEP] operator[SEP] } }
private Node<T> rotateRight(Node<T> h) { // assert (h != null) && isRed(h.left); Node<T> x = h.left; h.left = x.right; x.right = h; x.red = x.right.red; x.right.red = true; x.n = h.n; h.n = (h.left == null ? 0 : h.left.n) + (h.right == null ? 0 : h.right.n) + 1; return x; }
class class_name[name] begin[{] method[rotateRight, return_type[type[Node]], modifier[private], parameter[h]] begin[{] local_variable[type[Node], x] assign[member[h.left], member[x.right]] assign[member[x.right], member[.h]] assign[member[x.red], member[x.right.red]] assign[member[x.right.red], literal[true]] assign[member[x.n], member[h.n]] assign[member[h.n], binary_operation[binary_operation[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=left, postfix_operators=[], prefix_operators=[], qualifier=h, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=h.left, selectors=[]), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), +, TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=right, postfix_operators=[], prefix_operators=[], qualifier=h, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=h.right, selectors=[]), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))], +, literal[1]]] return[member[.x]] end[}] END[}]
Keyword[private] identifier[Node] operator[<] identifier[T] operator[>] identifier[rotateRight] operator[SEP] identifier[Node] operator[<] identifier[T] operator[>] identifier[h] operator[SEP] { identifier[Node] operator[<] identifier[T] operator[>] identifier[x] operator[=] identifier[h] operator[SEP] identifier[left] operator[SEP] identifier[h] operator[SEP] identifier[left] operator[=] identifier[x] operator[SEP] identifier[right] operator[SEP] identifier[x] operator[SEP] identifier[right] operator[=] identifier[h] operator[SEP] identifier[x] operator[SEP] identifier[red] operator[=] identifier[x] operator[SEP] identifier[right] operator[SEP] identifier[red] operator[SEP] identifier[x] operator[SEP] identifier[right] operator[SEP] identifier[red] operator[=] literal[boolean] operator[SEP] identifier[x] operator[SEP] identifier[n] operator[=] identifier[h] operator[SEP] identifier[n] operator[SEP] identifier[h] operator[SEP] identifier[n] operator[=] operator[SEP] identifier[h] operator[SEP] identifier[left] operator[==] Other[null] operator[?] Other[0] operator[:] identifier[h] operator[SEP] identifier[left] operator[SEP] identifier[n] operator[SEP] operator[+] operator[SEP] identifier[h] operator[SEP] identifier[right] operator[==] Other[null] operator[?] Other[0] operator[:] identifier[h] operator[SEP] identifier[right] operator[SEP] identifier[n] operator[SEP] operator[+] Other[1] operator[SEP] Keyword[return] identifier[x] operator[SEP] }
public List<? extends Solution<?>> normalize(List<? extends Solution<?>> solutionList) { Front normalizedFront ; if (solutionList == null) { throw new JMetalException("The front is null") ; } normalizedFront = getNormalizedFront(new ArrayFront(solutionList), maximumValues, minimumValues); return FrontUtils.convertFrontToSolutionList(normalizedFront) ; }
class class_name[name] begin[{] method[normalize, return_type[type[List]], modifier[public], parameter[solutionList]] begin[{] local_variable[type[Front], normalizedFront] if[binary_operation[member[.solutionList], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The front is null")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JMetalException, sub_type=None)), label=None) else begin[{] None end[}] assign[member[.normalizedFront], call[.getNormalizedFront, parameter[ClassCreator(arguments=[MemberReference(member=solutionList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ArrayFront, sub_type=None)), member[.maximumValues], member[.minimumValues]]]] return[call[FrontUtils.convertFrontToSolutionList, parameter[member[.normalizedFront]]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] operator[?] Keyword[extends] identifier[Solution] operator[<] operator[?] operator[>] operator[>] identifier[normalize] operator[SEP] identifier[List] operator[<] operator[?] Keyword[extends] identifier[Solution] operator[<] operator[?] operator[>] operator[>] identifier[solutionList] operator[SEP] { identifier[Front] identifier[normalizedFront] operator[SEP] Keyword[if] operator[SEP] identifier[solutionList] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[JMetalException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[normalizedFront] operator[=] identifier[getNormalizedFront] operator[SEP] Keyword[new] identifier[ArrayFront] operator[SEP] identifier[solutionList] operator[SEP] , identifier[maximumValues] , identifier[minimumValues] operator[SEP] operator[SEP] Keyword[return] identifier[FrontUtils] operator[SEP] identifier[convertFrontToSolutionList] operator[SEP] identifier[normalizedFront] operator[SEP] operator[SEP] }
public DbDatum getClassPipeProperty(String className, String pipeName, String propertyName) throws DevFailed { DbPipe dbPipe = databaseDAO.getClassPipeProperties(this, className, pipeName); DbDatum datum = dbPipe.getDatum(propertyName); if (datum==null) Except.throw_exception("TangoApi_PropertyNotFound", "Property " + propertyName + " not found for pipe " + pipeName); return datum; }
class class_name[name] begin[{] method[getClassPipeProperty, return_type[type[DbDatum]], modifier[public], parameter[className, pipeName, propertyName]] begin[{] local_variable[type[DbPipe], dbPipe] local_variable[type[DbDatum], datum] if[binary_operation[member[.datum], ==, literal[null]]] begin[{] call[Except.throw_exception, parameter[literal["TangoApi_PropertyNotFound"], binary_operation[binary_operation[binary_operation[literal["Property "], +, member[.propertyName]], +, literal[" not found for pipe "]], +, member[.pipeName]]]] else begin[{] None end[}] return[member[.datum]] end[}] END[}]
Keyword[public] identifier[DbDatum] identifier[getClassPipeProperty] operator[SEP] identifier[String] identifier[className] , identifier[String] identifier[pipeName] , identifier[String] identifier[propertyName] operator[SEP] Keyword[throws] identifier[DevFailed] { identifier[DbPipe] identifier[dbPipe] operator[=] identifier[databaseDAO] operator[SEP] identifier[getClassPipeProperties] operator[SEP] Keyword[this] , identifier[className] , identifier[pipeName] operator[SEP] operator[SEP] identifier[DbDatum] identifier[datum] operator[=] identifier[dbPipe] operator[SEP] identifier[getDatum] operator[SEP] identifier[propertyName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[datum] operator[==] Other[null] operator[SEP] identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , literal[String] operator[+] identifier[propertyName] operator[+] literal[String] operator[+] identifier[pipeName] operator[SEP] operator[SEP] Keyword[return] identifier[datum] operator[SEP] }
@XmlElementDecl(namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", name = "extension", scope = GetRenditions.class) public JAXBElement<CmisExtensionType> createGetRenditionsExtension( CmisExtensionType value) { return new JAXBElement<CmisExtensionType>( _GetPropertiesExtension_QNAME, CmisExtensionType.class, GetRenditions.class, value); }
class class_name[name] begin[{] method[createGetRenditionsExtension, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=_GetPropertiesExtension_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CmisExtensionType, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GetRenditions, sub_type=None)), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=CmisExtensionType, sub_type=None))], dimensions=None, name=JAXBElement, sub_type=None))] end[}] END[}]
annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] , identifier[scope] operator[=] identifier[GetRenditions] operator[SEP] Keyword[class] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[CmisExtensionType] operator[>] identifier[createGetRenditionsExtension] operator[SEP] identifier[CmisExtensionType] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[JAXBElement] operator[<] identifier[CmisExtensionType] operator[>] operator[SEP] identifier[_GetPropertiesExtension_QNAME] , identifier[CmisExtensionType] operator[SEP] Keyword[class] , identifier[GetRenditions] operator[SEP] Keyword[class] , identifier[value] operator[SEP] operator[SEP] }
public static double getAngle(AFPChain afpChain, Atom[] ca1, Atom[] ca2) { Matrix rotation = afpChain.getBlockRotationMatrix()[0]; return Math.acos(rotation.trace() - 1) * 180 / Math.PI; }
class class_name[name] begin[{] method[getAngle, return_type[type[double]], modifier[public static], parameter[afpChain, ca1, ca2]] begin[{] local_variable[type[Matrix], rotation] return[binary_operation[binary_operation[call[Math.acos, parameter[binary_operation[call[rotation.trace, parameter[]], -, literal[1]]]], *, literal[180]], /, member[Math.PI]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] identifier[getAngle] operator[SEP] identifier[AFPChain] identifier[afpChain] , identifier[Atom] operator[SEP] operator[SEP] identifier[ca1] , identifier[Atom] operator[SEP] operator[SEP] identifier[ca2] operator[SEP] { identifier[Matrix] identifier[rotation] operator[=] identifier[afpChain] operator[SEP] identifier[getBlockRotationMatrix] operator[SEP] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[return] identifier[Math] operator[SEP] identifier[acos] operator[SEP] identifier[rotation] operator[SEP] identifier[trace] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[*] Other[180] operator[/] identifier[Math] operator[SEP] identifier[PI] operator[SEP] }
private boolean filter(Event event) { if (null == filters) return false; for (EventFilter filter : filters) { if (filter.filter(event)) { return true; } } return false; }
class class_name[name] begin[{] method[filter, return_type[type[boolean]], modifier[private], parameter[event]] begin[{] if[binary_operation[literal[null], ==, member[.filters]]] begin[{] return[literal[false]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=filter, postfix_operators=[], prefix_operators=[], qualifier=filter, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=filters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=filter)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=EventFilter, sub_type=None))), label=None) return[literal[false]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[filter] operator[SEP] identifier[Event] identifier[event] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[==] identifier[filters] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[EventFilter] identifier[filter] operator[:] identifier[filters] operator[SEP] { Keyword[if] operator[SEP] identifier[filter] operator[SEP] identifier[filter] operator[SEP] identifier[event] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
public static final void setBounds(UIObject o, Rect bounds) { setPosition(o, bounds); setSize(o, bounds); }
class class_name[name] begin[{] method[setBounds, return_type[void], modifier[final public static], parameter[o, bounds]] begin[{] call[.setPosition, parameter[member[.o], member[.bounds]]] call[.setSize, parameter[member[.o], member[.bounds]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[final] Keyword[void] identifier[setBounds] operator[SEP] identifier[UIObject] identifier[o] , identifier[Rect] identifier[bounds] operator[SEP] { identifier[setPosition] operator[SEP] identifier[o] , identifier[bounds] operator[SEP] operator[SEP] identifier[setSize] operator[SEP] identifier[o] , identifier[bounds] operator[SEP] operator[SEP] }
protected final void closeConnection(final JsMessagingEngine messagingEngine) { final String methodName = "closeConnection"; if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) { SibTr.entry(this, TRACE, methodName, messagingEngine); } closeConnection(messagingEngine.getUuid().toString()); if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) { SibTr.exit(this, TRACE, methodName); } }
class class_name[name] begin[{] method[closeConnection, return_type[void], modifier[final protected], parameter[messagingEngine]] begin[{] local_variable[type[String], methodName] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[TRACE.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[THIS[], member[.TRACE], member[.methodName], member[.messagingEngine]]] else begin[{] None end[}] call[.closeConnection, parameter[call[messagingEngine.getUuid, parameter[]]]] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[TRACE.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[THIS[], member[.TRACE], member[.methodName]]] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[final] Keyword[void] identifier[closeConnection] operator[SEP] Keyword[final] identifier[JsMessagingEngine] identifier[messagingEngine] operator[SEP] { Keyword[final] identifier[String] identifier[methodName] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[TRACE] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] Keyword[this] , identifier[TRACE] , identifier[methodName] , identifier[messagingEngine] operator[SEP] operator[SEP] } identifier[closeConnection] operator[SEP] identifier[messagingEngine] operator[SEP] identifier[getUuid] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[TRACE] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[TRACE] , identifier[methodName] operator[SEP] operator[SEP] } }
protected void init() { // 読み込み用の登録 registerForReading(conversionHandler); registerForReading(new ParseProcessorFactory<>()); registerForReading(constraintHandler); // 書き込み用の登録 registerForWriting(constraintHandler); registerForWriting(new PrintProcessorFactory<>()); registerForWriting(conversionHandler); // 変換用の登録 registerForConversion(CsvNullConvert.class, new NullConvertFactory()); registerForConversion(CsvDefaultValue.class, new DefaultValueFactory()); registerForConversion(CsvTrim.class, new TrimFactory()); registerForConversion(CsvUpper.class, new UpperFactory()); registerForConversion(CsvLower.class, new LowerFactory()); registerForConversion(CsvRegexReplace.class, new RegexReplaceFactory()); registerForConversion(CsvWordReplace.class, new WordReplaceFactory()); registerForConversion(CsvFullChar.class, new FullCharFactory()); registerForConversion(CsvHalfChar.class, new HalfCharFactory()); registerForConversion(CsvLeftPad.class, new LeftPadFactory()); registerForConversion(CsvRightPad.class, new RightPadFactory()); registerForConversion(CsvMultiPad.class, new MultiPadFactory()); registerForConversion(CsvOneSideTrim.class, new OneSideTrimFactory()); // 制約用の登録 registerForConstraint(CsvRequire.class, new RequireFactory()); registerForConstraint(CsvUnique.class, new UniqueFactory<>()); registerForConstraint(CsvUniqueHashCode.class, new UniqueHashCodeFactory<>()); registerForConstraint(CsvEquals.class, new EqualsFactory<>()); }
class class_name[name] begin[{] method[init, return_type[void], modifier[protected], parameter[]] begin[{] call[.registerForReading, parameter[member[.conversionHandler]]] call[.registerForReading, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ParseProcessorFactory, sub_type=None))]] call[.registerForReading, parameter[member[.constraintHandler]]] call[.registerForWriting, parameter[member[.constraintHandler]]] call[.registerForWriting, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=PrintProcessorFactory, sub_type=None))]] call[.registerForWriting, parameter[member[.conversionHandler]]] call[.registerForConversion, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CsvNullConvert, sub_type=None)), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NullConvertFactory, sub_type=None))]] call[.registerForConversion, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CsvDefaultValue, sub_type=None)), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DefaultValueFactory, sub_type=None))]] call[.registerForConversion, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CsvTrim, sub_type=None)), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TrimFactory, sub_type=None))]] call[.registerForConversion, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CsvUpper, sub_type=None)), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UpperFactory, sub_type=None))]] call[.registerForConversion, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CsvLower, sub_type=None)), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LowerFactory, sub_type=None))]] call[.registerForConversion, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CsvRegexReplace, sub_type=None)), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RegexReplaceFactory, sub_type=None))]] call[.registerForConversion, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CsvWordReplace, sub_type=None)), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WordReplaceFactory, sub_type=None))]] call[.registerForConversion, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CsvFullChar, sub_type=None)), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FullCharFactory, sub_type=None))]] call[.registerForConversion, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CsvHalfChar, sub_type=None)), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HalfCharFactory, sub_type=None))]] call[.registerForConversion, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CsvLeftPad, sub_type=None)), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LeftPadFactory, sub_type=None))]] call[.registerForConversion, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CsvRightPad, sub_type=None)), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RightPadFactory, sub_type=None))]] call[.registerForConversion, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CsvMultiPad, sub_type=None)), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MultiPadFactory, sub_type=None))]] call[.registerForConversion, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CsvOneSideTrim, sub_type=None)), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OneSideTrimFactory, sub_type=None))]] call[.registerForConstraint, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CsvRequire, sub_type=None)), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RequireFactory, sub_type=None))]] call[.registerForConstraint, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CsvUnique, sub_type=None)), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=UniqueFactory, sub_type=None))]] call[.registerForConstraint, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CsvUniqueHashCode, sub_type=None)), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=UniqueHashCodeFactory, sub_type=None))]] call[.registerForConstraint, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CsvEquals, sub_type=None)), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=EqualsFactory, sub_type=None))]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[init] operator[SEP] operator[SEP] { identifier[registerForReading] operator[SEP] identifier[conversionHandler] operator[SEP] operator[SEP] identifier[registerForReading] operator[SEP] Keyword[new] identifier[ParseProcessorFactory] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[registerForReading] operator[SEP] identifier[constraintHandler] operator[SEP] operator[SEP] identifier[registerForWriting] operator[SEP] identifier[constraintHandler] operator[SEP] operator[SEP] identifier[registerForWriting] operator[SEP] Keyword[new] identifier[PrintProcessorFactory] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[registerForWriting] operator[SEP] identifier[conversionHandler] operator[SEP] operator[SEP] identifier[registerForConversion] operator[SEP] identifier[CsvNullConvert] operator[SEP] Keyword[class] , Keyword[new] identifier[NullConvertFactory] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[registerForConversion] operator[SEP] identifier[CsvDefaultValue] operator[SEP] Keyword[class] , Keyword[new] identifier[DefaultValueFactory] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[registerForConversion] operator[SEP] identifier[CsvTrim] operator[SEP] Keyword[class] , Keyword[new] identifier[TrimFactory] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[registerForConversion] operator[SEP] identifier[CsvUpper] operator[SEP] Keyword[class] , Keyword[new] identifier[UpperFactory] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[registerForConversion] operator[SEP] identifier[CsvLower] operator[SEP] Keyword[class] , Keyword[new] identifier[LowerFactory] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[registerForConversion] operator[SEP] identifier[CsvRegexReplace] operator[SEP] Keyword[class] , Keyword[new] identifier[RegexReplaceFactory] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[registerForConversion] operator[SEP] identifier[CsvWordReplace] operator[SEP] Keyword[class] , Keyword[new] identifier[WordReplaceFactory] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[registerForConversion] operator[SEP] identifier[CsvFullChar] operator[SEP] Keyword[class] , Keyword[new] identifier[FullCharFactory] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[registerForConversion] operator[SEP] identifier[CsvHalfChar] operator[SEP] Keyword[class] , Keyword[new] identifier[HalfCharFactory] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[registerForConversion] operator[SEP] identifier[CsvLeftPad] operator[SEP] Keyword[class] , Keyword[new] identifier[LeftPadFactory] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[registerForConversion] operator[SEP] identifier[CsvRightPad] operator[SEP] Keyword[class] , Keyword[new] identifier[RightPadFactory] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[registerForConversion] operator[SEP] identifier[CsvMultiPad] operator[SEP] Keyword[class] , Keyword[new] identifier[MultiPadFactory] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[registerForConversion] operator[SEP] identifier[CsvOneSideTrim] operator[SEP] Keyword[class] , Keyword[new] identifier[OneSideTrimFactory] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[registerForConstraint] operator[SEP] identifier[CsvRequire] operator[SEP] Keyword[class] , Keyword[new] identifier[RequireFactory] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[registerForConstraint] operator[SEP] identifier[CsvUnique] operator[SEP] Keyword[class] , Keyword[new] identifier[UniqueFactory] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[registerForConstraint] operator[SEP] identifier[CsvUniqueHashCode] operator[SEP] Keyword[class] , Keyword[new] identifier[UniqueHashCodeFactory] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[registerForConstraint] operator[SEP] identifier[CsvEquals] operator[SEP] Keyword[class] , Keyword[new] identifier[EqualsFactory] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@SuppressWarnings("unchecked") public static MethodSpec<ReceiveEventsAnn>[] getReceiveEventsSpecs(Class<?> cls) { MethodSpec<ReceiveEventsAnn>[] specs = RECEIVE_EVENTS_SPECS.get(cls); if (specs == null) { ArrayList<MethodSpec<ReceiveEventsAnn>> list = new ArrayList<MethodSpec<ReceiveEventsAnn>>(); for (Method method : getMethodHierarchy(cls)) { ReceiveEventsAnn ann = getReceiveEventsAnn(method); if (ann != null) { list.add(new MethodSpec<ReceiveEventsAnn>(method, ann)); } } specs = list.toArray(new MethodSpec[list.size()]); RECEIVE_EVENTS_SPECS.put(cls, specs); } return specs; }
class class_name[name] begin[{] method[getReceiveEventsSpecs, return_type[type[MethodSpec]], modifier[public static], parameter[cls]] begin[{] local_variable[type[MethodSpec], specs] if[binary_operation[member[.specs], ==, literal[null]]] begin[{] local_variable[type[ArrayList], list] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getReceiveEventsAnn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=ann)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ReceiveEventsAnn, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ann, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ann, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ReceiveEventsAnn, sub_type=None))], dimensions=None, name=MethodSpec, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=cls, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getMethodHierarchy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=method)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None))), label=None) assign[member[.specs], call[list.toArray, parameter[ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MethodSpec, sub_type=None))]]] call[RECEIVE_EVENTS_SPECS.put, parameter[member[.cls], member[.specs]]] else begin[{] None end[}] return[member[.specs]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] identifier[MethodSpec] operator[<] identifier[ReceiveEventsAnn] operator[>] operator[SEP] operator[SEP] identifier[getReceiveEventsSpecs] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[cls] operator[SEP] { identifier[MethodSpec] operator[<] identifier[ReceiveEventsAnn] operator[>] operator[SEP] operator[SEP] identifier[specs] operator[=] identifier[RECEIVE_EVENTS_SPECS] operator[SEP] identifier[get] operator[SEP] identifier[cls] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[specs] operator[==] Other[null] operator[SEP] { identifier[ArrayList] operator[<] identifier[MethodSpec] operator[<] identifier[ReceiveEventsAnn] operator[>] operator[>] identifier[list] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[MethodSpec] operator[<] identifier[ReceiveEventsAnn] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Method] identifier[method] operator[:] identifier[getMethodHierarchy] operator[SEP] identifier[cls] operator[SEP] operator[SEP] { identifier[ReceiveEventsAnn] identifier[ann] operator[=] identifier[getReceiveEventsAnn] operator[SEP] identifier[method] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ann] operator[!=] Other[null] operator[SEP] { identifier[list] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[MethodSpec] operator[<] identifier[ReceiveEventsAnn] operator[>] operator[SEP] identifier[method] , identifier[ann] operator[SEP] operator[SEP] operator[SEP] } } identifier[specs] operator[=] identifier[list] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[MethodSpec] operator[SEP] identifier[list] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[RECEIVE_EVENTS_SPECS] operator[SEP] identifier[put] operator[SEP] identifier[cls] , identifier[specs] operator[SEP] operator[SEP] } Keyword[return] identifier[specs] operator[SEP] }
public static float requiredFloatAttribute(final XMLStreamReader reader, final String localName) throws XMLStreamException { return requiredFloatAttribute(reader, null, localName); }
class class_name[name] begin[{] method[requiredFloatAttribute, return_type[type[float]], modifier[public static], parameter[reader, localName]] begin[{] return[call[.requiredFloatAttribute, parameter[member[.reader], literal[null], member[.localName]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[float] identifier[requiredFloatAttribute] operator[SEP] Keyword[final] identifier[XMLStreamReader] identifier[reader] , Keyword[final] identifier[String] identifier[localName] operator[SEP] Keyword[throws] identifier[XMLStreamException] { Keyword[return] identifier[requiredFloatAttribute] operator[SEP] identifier[reader] , Other[null] , identifier[localName] operator[SEP] operator[SEP] }
public static ResourceList<MediaFile> list(final int page, final int size) throws IOException { return list(BandwidthClient.getInstance(), page, size); }
class class_name[name] begin[{] method[list, return_type[type[ResourceList]], modifier[public static], parameter[page, size]] begin[{] return[call[.list, parameter[call[BandwidthClient.getInstance, parameter[]], member[.page], member[.size]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ResourceList] operator[<] identifier[MediaFile] operator[>] identifier[list] operator[SEP] Keyword[final] Keyword[int] identifier[page] , Keyword[final] Keyword[int] identifier[size] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[return] identifier[list] operator[SEP] identifier[BandwidthClient] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] , identifier[page] , identifier[size] operator[SEP] operator[SEP] }
public void marshall(ListEntitiesDetectionJobsRequest listEntitiesDetectionJobsRequest, ProtocolMarshaller protocolMarshaller) { if (listEntitiesDetectionJobsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(listEntitiesDetectionJobsRequest.getFilter(), FILTER_BINDING); protocolMarshaller.marshall(listEntitiesDetectionJobsRequest.getNextToken(), NEXTTOKEN_BINDING); protocolMarshaller.marshall(listEntitiesDetectionJobsRequest.getMaxResults(), MAXRESULTS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[listEntitiesDetectionJobsRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.listEntitiesDetectionJobsRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid argument passed to marshall(...)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getFilter, postfix_operators=[], prefix_operators=[], qualifier=listEntitiesDetectionJobsRequest, selectors=[], type_arguments=None), MemberReference(member=FILTER_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getNextToken, postfix_operators=[], prefix_operators=[], qualifier=listEntitiesDetectionJobsRequest, selectors=[], type_arguments=None), MemberReference(member=NEXTTOKEN_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMaxResults, postfix_operators=[], prefix_operators=[], qualifier=listEntitiesDetectionJobsRequest, selectors=[], type_arguments=None), MemberReference(member=MAXRESULTS_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[ListEntitiesDetectionJobsRequest] identifier[listEntitiesDetectionJobsRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[listEntitiesDetectionJobsRequest] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[listEntitiesDetectionJobsRequest] operator[SEP] identifier[getFilter] operator[SEP] operator[SEP] , identifier[FILTER_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[listEntitiesDetectionJobsRequest] operator[SEP] identifier[getNextToken] operator[SEP] operator[SEP] , identifier[NEXTTOKEN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[listEntitiesDetectionJobsRequest] operator[SEP] identifier[getMaxResults] operator[SEP] operator[SEP] , identifier[MAXRESULTS_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public void addOrExpression(final INodeReadTrx mTransaction) { assert getPipeStack().size() >= 2; final AbsAxis mOperand2 = getPipeStack().pop().getExpr(); final AbsAxis mOperand1 = getPipeStack().pop().getExpr(); if (getPipeStack().empty() || getExpression().getSize() != 0) { addExpressionSingle(); } getExpression().add(new OrExpr(mTransaction, mOperand1, mOperand2)); }
class class_name[name] begin[{] method[addOrExpression, return_type[void], modifier[public], parameter[mTransaction]] begin[{] AssertStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getPipeStack, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=size, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=>=), label=None, value=None) local_variable[type[AbsAxis], mOperand2] local_variable[type[AbsAxis], mOperand1] if[binary_operation[call[.getPipeStack, parameter[]], ||, binary_operation[call[.getExpression, parameter[]], !=, literal[0]]]] begin[{] call[.addExpressionSingle, parameter[]] else begin[{] None end[}] call[.getExpression, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addOrExpression] operator[SEP] Keyword[final] identifier[INodeReadTrx] identifier[mTransaction] operator[SEP] { Keyword[assert] identifier[getPipeStack] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>=] Other[2] operator[SEP] Keyword[final] identifier[AbsAxis] identifier[mOperand2] operator[=] identifier[getPipeStack] operator[SEP] operator[SEP] operator[SEP] identifier[pop] operator[SEP] operator[SEP] operator[SEP] identifier[getExpr] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[AbsAxis] identifier[mOperand1] operator[=] identifier[getPipeStack] operator[SEP] operator[SEP] operator[SEP] identifier[pop] operator[SEP] operator[SEP] operator[SEP] identifier[getExpr] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[getPipeStack] operator[SEP] operator[SEP] operator[SEP] identifier[empty] operator[SEP] operator[SEP] operator[||] identifier[getExpression] operator[SEP] operator[SEP] operator[SEP] identifier[getSize] operator[SEP] operator[SEP] operator[!=] Other[0] operator[SEP] { identifier[addExpressionSingle] operator[SEP] operator[SEP] operator[SEP] } identifier[getExpression] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[OrExpr] operator[SEP] identifier[mTransaction] , identifier[mOperand1] , identifier[mOperand2] operator[SEP] operator[SEP] operator[SEP] }
protected boolean lookahead() { assert next == null : "looking ahead when next is already loaded"; while(inner.hasNext()) { next = transform(inner.next()); if(next!=null) { return true; } } noteExhausted(); return false; }
class class_name[name] begin[{] method[lookahead, return_type[type[boolean]], modifier[protected], parameter[]] begin[{] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), label=None, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="looking ahead when next is already loaded")) while[call[inner.hasNext, parameter[]]] begin[{] assign[member[.next], call[.transform, parameter[call[inner.next, parameter[]]]]] if[binary_operation[member[.next], !=, literal[null]]] begin[{] return[literal[true]] else begin[{] None end[}] end[}] call[.noteExhausted, parameter[]] return[literal[false]] end[}] END[}]
Keyword[protected] Keyword[boolean] identifier[lookahead] operator[SEP] operator[SEP] { Keyword[assert] identifier[next] operator[==] Other[null] operator[:] literal[String] operator[SEP] Keyword[while] operator[SEP] identifier[inner] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[next] operator[=] identifier[transform] operator[SEP] identifier[inner] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[next] operator[!=] Other[null] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } identifier[noteExhausted] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
public void set(ByteBitMask mask, boolean value) { this.flag = LogicUtil.setBit(this.flag, mask.getMask(), value); }
class class_name[name] begin[{] method[set, return_type[void], modifier[public], parameter[mask, value]] begin[{] assign[THIS[member[None.flag]], call[LogicUtil.setBit, parameter[THIS[member[None.flag]], call[mask.getMask, parameter[]], member[.value]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[set] operator[SEP] identifier[ByteBitMask] identifier[mask] , Keyword[boolean] identifier[value] operator[SEP] { Keyword[this] operator[SEP] identifier[flag] operator[=] identifier[LogicUtil] operator[SEP] identifier[setBit] operator[SEP] Keyword[this] operator[SEP] identifier[flag] , identifier[mask] operator[SEP] identifier[getMask] operator[SEP] operator[SEP] , identifier[value] operator[SEP] operator[SEP] }
@Override public List<Dashboard> getDashboardsByCollectorItems(Set<CollectorItem> collectorItems, CollectorType collectorType) { if (org.apache.commons.collections4.CollectionUtils.isEmpty(collectorItems)) { return new ArrayList<>(); } List<ObjectId> collectorItemIds = collectorItems.stream().map(BaseModel::getId).collect(Collectors.toList()); // Find the components that have these collector items List<com.capitalone.dashboard.model.Component> components = componentRepository.findByCollectorTypeAndItemIdIn(collectorType, collectorItemIds); List<ObjectId> componentIds = components.stream().map(BaseModel::getId).collect(Collectors.toList()); return dashboardRepository.findByApplicationComponentIdsIn(componentIds); }
class class_name[name] begin[{] method[getDashboardsByCollectorItems, return_type[type[List]], modifier[public], parameter[collectorItems, collectorType]] begin[{] if[call[org.apache.commons.collections4.CollectionUtils.isEmpty, parameter[member[.collectorItems]]]] begin[{] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None))] else begin[{] None end[}] local_variable[type[List], collectorItemIds] local_variable[type[List], components] local_variable[type[List], componentIds] return[call[dashboardRepository.findByApplicationComponentIdsIn, parameter[member[.componentIds]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[Dashboard] operator[>] identifier[getDashboardsByCollectorItems] operator[SEP] identifier[Set] operator[<] identifier[CollectorItem] operator[>] identifier[collectorItems] , identifier[CollectorType] identifier[collectorType] operator[SEP] { Keyword[if] operator[SEP] identifier[org] operator[SEP] identifier[apache] operator[SEP] identifier[commons] operator[SEP] identifier[collections4] operator[SEP] identifier[CollectionUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[collectorItems] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[ObjectId] operator[>] identifier[collectorItemIds] operator[=] identifier[collectorItems] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[BaseModel] operator[::] identifier[getId] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[Collectors] operator[SEP] identifier[toList] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[com] operator[SEP] identifier[capitalone] operator[SEP] identifier[dashboard] operator[SEP] identifier[model] operator[SEP] identifier[Component] operator[>] identifier[components] operator[=] identifier[componentRepository] operator[SEP] identifier[findByCollectorTypeAndItemIdIn] operator[SEP] identifier[collectorType] , identifier[collectorItemIds] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[ObjectId] operator[>] identifier[componentIds] operator[=] identifier[components] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[BaseModel] operator[::] identifier[getId] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[Collectors] operator[SEP] identifier[toList] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[dashboardRepository] operator[SEP] identifier[findByApplicationComponentIdsIn] operator[SEP] identifier[componentIds] operator[SEP] operator[SEP] }
public void setNetworkSourceIpV4(java.util.Collection<IpFilter> networkSourceIpV4) { if (networkSourceIpV4 == null) { this.networkSourceIpV4 = null; return; } this.networkSourceIpV4 = new java.util.ArrayList<IpFilter>(networkSourceIpV4); }
class class_name[name] begin[{] method[setNetworkSourceIpV4, return_type[void], modifier[public], parameter[networkSourceIpV4]] begin[{] if[binary_operation[member[.networkSourceIpV4], ==, literal[null]]] begin[{] assign[THIS[member[None.networkSourceIpV4]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.networkSourceIpV4]], ClassCreator(arguments=[MemberReference(member=networkSourceIpV4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=IpFilter, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setNetworkSourceIpV4] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[IpFilter] operator[>] identifier[networkSourceIpV4] operator[SEP] { Keyword[if] operator[SEP] identifier[networkSourceIpV4] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[networkSourceIpV4] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[networkSourceIpV4] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[IpFilter] operator[>] operator[SEP] identifier[networkSourceIpV4] operator[SEP] operator[SEP] }
@SuppressWarnings("unchecked") public EList<IfcSectionReinforcementProperties> getReinforcementSectionDefinitions() { return (EList<IfcSectionReinforcementProperties>) eGet( Ifc2x3tc1Package.Literals.IFC_REINFORCEMENT_DEFINITION_PROPERTIES__REINFORCEMENT_SECTION_DEFINITIONS, true); }
class class_name[name] begin[{] method[getReinforcementSectionDefinitions, return_type[type[EList]], modifier[public], parameter[]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=IFC_REINFORCEMENT_DEFINITION_PROPERTIES__REINFORCEMENT_SECTION_DEFINITIONS, postfix_operators=[], prefix_operators=[], qualifier=Ifc2x3tc1Package.Literals, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=eGet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=IfcSectionReinforcementProperties, sub_type=None))], dimensions=[], name=EList, sub_type=None))] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[EList] operator[<] identifier[IfcSectionReinforcementProperties] operator[>] identifier[getReinforcementSectionDefinitions] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] identifier[EList] operator[<] identifier[IfcSectionReinforcementProperties] operator[>] operator[SEP] identifier[eGet] operator[SEP] identifier[Ifc2x3tc1Package] operator[SEP] identifier[Literals] operator[SEP] identifier[IFC_REINFORCEMENT_DEFINITION_PROPERTIES__REINFORCEMENT_SECTION_DEFINITIONS] , literal[boolean] operator[SEP] operator[SEP] }
public static JavaSqlInfoBuilder newInstace(BuildSource source) { JavaSqlInfoBuilder builder = new JavaSqlInfoBuilder(); builder.init(source); return builder; }
class class_name[name] begin[{] method[newInstace, return_type[type[JavaSqlInfoBuilder]], modifier[public static], parameter[source]] begin[{] local_variable[type[JavaSqlInfoBuilder], builder] call[builder.init, parameter[member[.source]]] return[member[.builder]] end[}] END[}]
Keyword[public] Keyword[static] identifier[JavaSqlInfoBuilder] identifier[newInstace] operator[SEP] identifier[BuildSource] identifier[source] operator[SEP] { identifier[JavaSqlInfoBuilder] identifier[builder] operator[=] Keyword[new] identifier[JavaSqlInfoBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[init] operator[SEP] identifier[source] operator[SEP] operator[SEP] Keyword[return] identifier[builder] operator[SEP] }
public synchronized void ensureLoading() throws ElkException { if (!isLoadingFinished()) { if (isIncrementalMode()) { if (!stageManager.incrementalAdditionStage.isCompleted()) { complete(stageManager.incrementalAdditionStage); } } else { if (!stageManager.contextInitializationStage.isCompleted()) { complete(stageManager.contextInitializationStage); } } LOGGER_.trace("Reset axiom loading"); stageManager.inputLoadingStage.invalidateRecursive(); // Invalidate stages at the beginnings of the dependency chains. stageManager.contextInitializationStage.invalidateRecursive(); stageManager.incrementalCompletionStage.invalidateRecursive(); } complete(stageManager.inputLoadingStage); }
class class_name[name] begin[{] method[ensureLoading, return_type[void], modifier[synchronized public], parameter[]] begin[{] if[call[.isLoadingFinished, parameter[]]] begin[{] if[call[.isIncrementalMode, parameter[]]] begin[{] if[call[stageManager.incrementalAdditionStage.isCompleted, parameter[]]] begin[{] call[.complete, parameter[member[stageManager.incrementalAdditionStage]]] else begin[{] None end[}] else begin[{] if[call[stageManager.contextInitializationStage.isCompleted, parameter[]]] begin[{] call[.complete, parameter[member[stageManager.contextInitializationStage]]] else begin[{] None end[}] end[}] call[LOGGER_.trace, parameter[literal["Reset axiom loading"]]] call[stageManager.inputLoadingStage.invalidateRecursive, parameter[]] call[stageManager.contextInitializationStage.invalidateRecursive, parameter[]] call[stageManager.incrementalCompletionStage.invalidateRecursive, parameter[]] else begin[{] None end[}] call[.complete, parameter[member[stageManager.inputLoadingStage]]] end[}] END[}]
Keyword[public] Keyword[synchronized] Keyword[void] identifier[ensureLoading] operator[SEP] operator[SEP] Keyword[throws] identifier[ElkException] { Keyword[if] operator[SEP] operator[!] identifier[isLoadingFinished] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[isIncrementalMode] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[stageManager] operator[SEP] identifier[incrementalAdditionStage] operator[SEP] identifier[isCompleted] operator[SEP] operator[SEP] operator[SEP] { identifier[complete] operator[SEP] identifier[stageManager] operator[SEP] identifier[incrementalAdditionStage] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[if] operator[SEP] operator[!] identifier[stageManager] operator[SEP] identifier[contextInitializationStage] operator[SEP] identifier[isCompleted] operator[SEP] operator[SEP] operator[SEP] { identifier[complete] operator[SEP] identifier[stageManager] operator[SEP] identifier[contextInitializationStage] operator[SEP] operator[SEP] } } identifier[LOGGER_] operator[SEP] identifier[trace] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[stageManager] operator[SEP] identifier[inputLoadingStage] operator[SEP] identifier[invalidateRecursive] operator[SEP] operator[SEP] operator[SEP] identifier[stageManager] operator[SEP] identifier[contextInitializationStage] operator[SEP] identifier[invalidateRecursive] operator[SEP] operator[SEP] operator[SEP] identifier[stageManager] operator[SEP] identifier[incrementalCompletionStage] operator[SEP] identifier[invalidateRecursive] operator[SEP] operator[SEP] operator[SEP] } identifier[complete] operator[SEP] identifier[stageManager] operator[SEP] identifier[inputLoadingStage] operator[SEP] operator[SEP] }
public Observable<ServiceResponse<Object>> listSwaggerWithServiceResponseAsync(String resourceGroupName, String workflowName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (workflowName == null) { throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.listSwagger(this.client.subscriptionId(), resourceGroupName, workflowName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Object>>>() { @Override public Observable<ServiceResponse<Object>> call(Response<ResponseBody> response) { try { ServiceResponse<Object> clientResponse = listSwaggerDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
class class_name[name] begin[{] method[listSwaggerWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, workflowName]] begin[{] if[binary_operation[THIS[member[None.client]call[None.subscriptionId, parameter[]]], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter this.client.subscriptionId() is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.resourceGroupName], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter resourceGroupName is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.workflowName], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter workflowName is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[THIS[member[None.client]call[None.apiVersion, parameter[]]], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter this.client.apiVersion() is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] return[call[service.listSwagger, parameter[THIS[member[None.client]call[None.subscriptionId, parameter[]]], member[.resourceGroupName], member[.workflowName], THIS[member[None.client]call[None.apiVersion, parameter[]]], THIS[member[None.client]call[None.acceptLanguage, parameter[]]], THIS[member[None.client]call[None.userAgent, parameter[]]]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Object] operator[>] operator[>] identifier[listSwaggerWithServiceResponseAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[workflowName] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[subscriptionId] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[resourceGroupName] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[workflowName] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[apiVersion] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[service] operator[SEP] identifier[listSwagger] operator[SEP] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[subscriptionId] operator[SEP] operator[SEP] , identifier[resourceGroupName] , identifier[workflowName] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[apiVersion] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[acceptLanguage] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[userAgent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[flatMap] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[Response] operator[<] identifier[ResponseBody] operator[>] , identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Object] operator[>] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Object] operator[>] operator[>] identifier[call] operator[SEP] identifier[Response] operator[<] identifier[ResponseBody] operator[>] identifier[response] operator[SEP] { Keyword[try] { identifier[ServiceResponse] operator[<] identifier[Object] operator[>] identifier[clientResponse] operator[=] identifier[listSwaggerDelegate] operator[SEP] identifier[response] operator[SEP] operator[SEP] Keyword[return] identifier[Observable] operator[SEP] identifier[just] operator[SEP] identifier[clientResponse] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { Keyword[return] identifier[Observable] operator[SEP] identifier[error] operator[SEP] identifier[t] operator[SEP] operator[SEP] } } } operator[SEP] operator[SEP] }
public List<User> getUserList(boolean concise, int start, int amount) { ClientResource resource = new ClientResource(Route.ALL_USER.url()); Reference ref = resource.getReference(); Map<String, Object> param = new HashMap<>(); param.put("concise", concise); param.put("start", start); param.put("amount", amount); Route.addParameters(ref, param); resource.setChallengeResponse(this.auth.toChallenge()); try { Representation repr = resource.get(); return mapper.readValue(repr.getText(), new TypeReference<List<User>>() {}); } catch (IOException ex) { LEX4JLogger.log(Level.WARNING, "Could not retrieve user list correctly!"); return null; } }
class class_name[name] begin[{] method[getUserList, return_type[type[List]], modifier[public], parameter[concise, start, amount]] begin[{] local_variable[type[ClientResource], resource] local_variable[type[Reference], ref] local_variable[type[Map], param] call[param.put, parameter[literal["concise"], member[.concise]]] call[param.put, parameter[literal["start"], member[.start]]] call[param.put, parameter[literal["amount"], member[.amount]]] call[Route.addParameters, parameter[member[.ref], member[.param]]] call[resource.setChallengeResponse, parameter[THIS[member[None.auth]call[None.toChallenge, parameter[]]]]] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=resource, selectors=[], type_arguments=None), name=repr)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Representation, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getText, postfix_operators=[], prefix_operators=[], qualifier=repr, selectors=[], type_arguments=None), ClassCreator(arguments=[], body=[], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=User, sub_type=None))], dimensions=[], name=List, sub_type=None))], dimensions=None, name=TypeReference, sub_type=None))], member=readValue, postfix_operators=[], prefix_operators=[], qualifier=mapper, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=WARNING, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not retrieve user list correctly!")], member=log, postfix_operators=[], prefix_operators=[], qualifier=LEX4JLogger, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[User] operator[>] identifier[getUserList] operator[SEP] Keyword[boolean] identifier[concise] , Keyword[int] identifier[start] , Keyword[int] identifier[amount] operator[SEP] { identifier[ClientResource] identifier[resource] operator[=] Keyword[new] identifier[ClientResource] operator[SEP] identifier[Route] operator[SEP] identifier[ALL_USER] operator[SEP] identifier[url] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Reference] identifier[ref] operator[=] identifier[resource] operator[SEP] identifier[getReference] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[param] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[param] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[concise] operator[SEP] operator[SEP] identifier[param] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[start] operator[SEP] operator[SEP] identifier[param] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[amount] operator[SEP] operator[SEP] identifier[Route] operator[SEP] identifier[addParameters] operator[SEP] identifier[ref] , identifier[param] operator[SEP] operator[SEP] identifier[resource] operator[SEP] identifier[setChallengeResponse] operator[SEP] Keyword[this] operator[SEP] identifier[auth] operator[SEP] identifier[toChallenge] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[Representation] identifier[repr] operator[=] identifier[resource] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[mapper] operator[SEP] identifier[readValue] operator[SEP] identifier[repr] operator[SEP] identifier[getText] operator[SEP] operator[SEP] , Keyword[new] identifier[TypeReference] operator[<] identifier[List] operator[<] identifier[User] operator[>] operator[>] operator[SEP] operator[SEP] { } operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[ex] operator[SEP] { identifier[LEX4JLogger] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[WARNING] , literal[String] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } }
public static FloatIterator generate(final FloatSupplier supplier) { N.checkArgNotNull(supplier); return new FloatIterator() { @Override public boolean hasNext() { return true; } @Override public float nextFloat() { return supplier.getAsFloat(); } }; }
class class_name[name] begin[{] method[generate, return_type[type[FloatIterator]], modifier[public static], parameter[supplier]] begin[{] call[N.checkArgNotNull, parameter[member[.supplier]]] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)], documentation=None, modifiers={'public'}, name=hasNext, parameters=[], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getAsFloat, postfix_operators=[], prefix_operators=[], qualifier=supplier, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=nextFloat, parameters=[], return_type=BasicType(dimensions=[], name=float), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FloatIterator, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[FloatIterator] identifier[generate] operator[SEP] Keyword[final] identifier[FloatSupplier] identifier[supplier] operator[SEP] { identifier[N] operator[SEP] identifier[checkArgNotNull] operator[SEP] identifier[supplier] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[FloatIterator] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[hasNext] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } annotation[@] identifier[Override] Keyword[public] Keyword[float] identifier[nextFloat] operator[SEP] operator[SEP] { Keyword[return] identifier[supplier] operator[SEP] identifier[getAsFloat] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] }
@Deprecated public ServerBuilder port(InetSocketAddress localAddress, String protocol) { return port(localAddress, SessionProtocol.of(requireNonNull(protocol, "protocol"))); }
class class_name[name] begin[{] method[port, return_type[type[ServerBuilder]], modifier[public], parameter[localAddress, protocol]] begin[{] return[call[.port, parameter[member[.localAddress], call[SessionProtocol.of, parameter[call[.requireNonNull, parameter[member[.protocol], literal["protocol"]]]]]]]] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[public] identifier[ServerBuilder] identifier[port] operator[SEP] identifier[InetSocketAddress] identifier[localAddress] , identifier[String] identifier[protocol] operator[SEP] { Keyword[return] identifier[port] operator[SEP] identifier[localAddress] , identifier[SessionProtocol] operator[SEP] identifier[of] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[protocol] , literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static boolean notifyPostEventListenerProviders(IServletContext isc,AsyncContextImpl ac) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "RegisterEventListenerProvider notifyPostEventListenerProvider(IServletContext,AsyncContext). _PostEventListenerProviders:"+_PostEventListenerProviders); } boolean result = false; Iterator<PostEventListenerProvider> pelps = _PostEventListenerProviders.getServices(); ArrayList<PostEventListenerProvider> reversePelps = new ArrayList<PostEventListenerProvider>(); // reverse the order so highest ranked goes last while (pelps.hasNext()) { reversePelps.add(0,pelps.next()); } if (!reversePelps.isEmpty()) { for (PostEventListenerProvider pelp : reversePelps) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "RegisterEventListenerProvider notifyPostEventListenerProvider(IServletContext,AsyncContext) notify listener."); } pelp.registerListener(isc,ac); } result=true; } return result; }
class class_name[name] begin[{] method[notifyPostEventListenerProviders, return_type[type[boolean]], modifier[public static], parameter[isc, ac]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[literal["RegisterEventListenerProvider notifyPostEventListenerProvider(IServletContext,AsyncContext). _PostEventListenerProviders:"], +, member[._PostEventListenerProviders]]]] else begin[{] None end[}] local_variable[type[boolean], result] local_variable[type[Iterator], pelps] local_variable[type[ArrayList], reversePelps] while[call[pelps.hasNext, parameter[]]] begin[{] call[reversePelps.add, parameter[literal[0], call[pelps.next, parameter[]]]] end[}] if[call[reversePelps.isEmpty, parameter[]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="RegisterEventListenerProvider notifyPostEventListenerProvider(IServletContext,AsyncContext) notify listener.")], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=isc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ac, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=registerListener, postfix_operators=[], prefix_operators=[], qualifier=pelp, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=reversePelps, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=pelp)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PostEventListenerProvider, sub_type=None))), label=None) assign[member[.result], literal[true]] else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[notifyPostEventListenerProviders] operator[SEP] identifier[IServletContext] identifier[isc] , identifier[AsyncContextImpl] identifier[ac] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[_PostEventListenerProviders] operator[SEP] operator[SEP] } Keyword[boolean] identifier[result] operator[=] literal[boolean] operator[SEP] identifier[Iterator] operator[<] identifier[PostEventListenerProvider] operator[>] identifier[pelps] operator[=] identifier[_PostEventListenerProviders] operator[SEP] identifier[getServices] operator[SEP] operator[SEP] operator[SEP] identifier[ArrayList] operator[<] identifier[PostEventListenerProvider] operator[>] identifier[reversePelps] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[PostEventListenerProvider] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[pelps] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[reversePelps] operator[SEP] identifier[add] operator[SEP] Other[0] , identifier[pelps] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[reversePelps] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[PostEventListenerProvider] identifier[pelp] operator[:] identifier[reversePelps] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] } identifier[pelp] operator[SEP] identifier[registerListener] operator[SEP] identifier[isc] , identifier[ac] operator[SEP] operator[SEP] } identifier[result] operator[=] literal[boolean] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe<T> doOnEvent(BiConsumer<? super T, ? super Throwable> onEvent) { ObjectHelper.requireNonNull(onEvent, "onEvent is null"); return RxJavaPlugins.onAssembly(new MaybeDoOnEvent<T>(this, onEvent)); }
class class_name[name] begin[{] method[doOnEvent, return_type[type[Maybe]], modifier[final public], parameter[onEvent]] begin[{] call[ObjectHelper.requireNonNull, parameter[member[.onEvent], literal["onEvent is null"]]] return[call[RxJavaPlugins.onAssembly, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=onEvent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=MaybeDoOnEvent, sub_type=None))]]] end[}] END[}]
annotation[@] identifier[CheckReturnValue] annotation[@] identifier[SchedulerSupport] operator[SEP] identifier[SchedulerSupport] operator[SEP] identifier[NONE] operator[SEP] Keyword[public] Keyword[final] identifier[Maybe] operator[<] identifier[T] operator[>] identifier[doOnEvent] operator[SEP] identifier[BiConsumer] operator[<] operator[?] Keyword[super] identifier[T] , operator[?] Keyword[super] identifier[Throwable] operator[>] identifier[onEvent] operator[SEP] { identifier[ObjectHelper] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[onEvent] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[RxJavaPlugins] operator[SEP] identifier[onAssembly] operator[SEP] Keyword[new] identifier[MaybeDoOnEvent] operator[<] identifier[T] operator[>] operator[SEP] Keyword[this] , identifier[onEvent] operator[SEP] operator[SEP] operator[SEP] }
protected final void checkNotNull(final ConversionStringency stringency, final Logger logger) { if (stringency == null) { throw new NullPointerException("stringency must not be null"); } if (logger == null) { throw new NullPointerException("logger must not be null"); } }
class class_name[name] begin[{] method[checkNotNull, return_type[void], modifier[final protected], parameter[stringency, logger]] begin[{] if[binary_operation[member[.stringency], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="stringency must not be null")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NullPointerException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.logger], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="logger must not be null")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NullPointerException, sub_type=None)), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[final] Keyword[void] identifier[checkNotNull] operator[SEP] Keyword[final] identifier[ConversionStringency] identifier[stringency] , Keyword[final] identifier[Logger] identifier[logger] operator[SEP] { Keyword[if] operator[SEP] identifier[stringency] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[logger] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] literal[String] operator[SEP] operator[SEP] } }
@Override public void declareOutputFields(OutputFieldsDeclarer ofd) { if (this.outputTypes == null) { throw new FailedException("outputTypes cannot be null"); } for (Map.Entry<String, List<String>> outputEventType : this.outputTypes.entrySet()) { List<String> fields = new ArrayList<>(); if (outputEventType.getValue() != null) { for (String f : outputEventType.getValue()) { fields.add(f); } } else { throw new FailedException(); } ofd.declareStream(outputEventType.getKey(), new Fields(fields)); } }
class class_name[name] begin[{] method[declareOutputFields, return_type[void], modifier[public], parameter[ofd]] begin[{] if[binary_operation[THIS[member[None.outputTypes]], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="outputTypes cannot be null")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FailedException, sub_type=None)), label=None) else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None)), name=fields)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=List, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=outputEventType, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FailedException, sub_type=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=fields, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=outputEventType, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=f)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=outputEventType, selectors=[], type_arguments=None), ClassCreator(arguments=[MemberReference(member=fields, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Fields, sub_type=None))], member=declareStream, postfix_operators=[], prefix_operators=[], qualifier=ofd, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=outputTypes, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=entrySet, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=outputEventType)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=List, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[declareOutputFields] operator[SEP] identifier[OutputFieldsDeclarer] identifier[ofd] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[outputTypes] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[FailedException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[List] operator[<] identifier[String] operator[>] operator[>] identifier[outputEventType] operator[:] Keyword[this] operator[SEP] identifier[outputTypes] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[fields] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[outputEventType] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[String] identifier[f] operator[:] identifier[outputEventType] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] { identifier[fields] operator[SEP] identifier[add] operator[SEP] identifier[f] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[throw] Keyword[new] identifier[FailedException] operator[SEP] operator[SEP] operator[SEP] } identifier[ofd] operator[SEP] identifier[declareStream] operator[SEP] identifier[outputEventType] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] , Keyword[new] identifier[Fields] operator[SEP] identifier[fields] operator[SEP] operator[SEP] operator[SEP] } }
protected void validateRequired(int index, String errorKey, String errorMessage) { String value = controller.getPara(index); if (value == null /* || "".equals(value) */) { addError(errorKey, errorMessage); } }
class class_name[name] begin[{] method[validateRequired, return_type[void], modifier[protected], parameter[index, errorKey, errorMessage]] begin[{] local_variable[type[String], value] if[binary_operation[member[.value], ==, literal[null]]] begin[{] call[.addError, parameter[member[.errorKey], member[.errorMessage]]] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[validateRequired] operator[SEP] Keyword[int] identifier[index] , identifier[String] identifier[errorKey] , identifier[String] identifier[errorMessage] operator[SEP] { identifier[String] identifier[value] operator[=] identifier[controller] operator[SEP] identifier[getPara] operator[SEP] identifier[index] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] { identifier[addError] operator[SEP] identifier[errorKey] , identifier[errorMessage] operator[SEP] operator[SEP] } }
public static Resource wrap(@NotNull Resource resource, @NotNull ValueMap valueMap) { return wrap(resource, valueMap, resource.getChildren()); }
class class_name[name] begin[{] method[wrap, return_type[type[Resource]], modifier[public static], parameter[resource, valueMap]] begin[{] return[call[.wrap, parameter[member[.resource], member[.valueMap], call[resource.getChildren, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Resource] identifier[wrap] operator[SEP] annotation[@] identifier[NotNull] identifier[Resource] identifier[resource] , annotation[@] identifier[NotNull] identifier[ValueMap] identifier[valueMap] operator[SEP] { Keyword[return] identifier[wrap] operator[SEP] identifier[resource] , identifier[valueMap] , identifier[resource] operator[SEP] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void stopTimer() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "stopTimer"); btmLockManager.lockExclusive(); try { //only stop if we are currently started if (!isStopped) { //set stopped to true isStopped = true; //iterate over the entries in the active list LinkedListEntry entry = (LinkedListEntry) activeEntries.getFirst(); while(entry != null && activeEntries.contains(entry)) { //cancel the alarm for each one if(entry.alarm != null) { entry.alarm.cancel(); entry.alarm = null; } entry = (LinkedListEntry) entry.getNext(); } } } finally { btmLockManager.unlockExclusive(); } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "stopTimer"); }
class class_name[name] begin[{] method[stopTimer, return_type[void], modifier[public], parameter[]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["stopTimer"]]] else begin[{] None end[}] call[btmLockManager.lockExclusive, parameter[]] TryStatement(block=[IfStatement(condition=MemberReference(member=isStopped, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=isStopped, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=getFirst, postfix_operators=[], prefix_operators=[], qualifier=activeEntries, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=LinkedListEntry, sub_type=None)), name=entry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=LinkedListEntry, sub_type=None)), WhileStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=alarm, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=cancel, postfix_operators=[], prefix_operators=[], qualifier=entry.alarm, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=alarm, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=entry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[], member=getNext, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=LinkedListEntry, sub_type=None))), label=None)]), condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=entry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[MemberReference(member=entry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=[], qualifier=activeEntries, selectors=[], type_arguments=None), operator=&&), label=None)]))], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=unlockExclusive, postfix_operators=[], prefix_operators=[], qualifier=btmLockManager, selectors=[], type_arguments=None), label=None)], label=None, resources=None) if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["stopTimer"]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[stopTimer] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] identifier[btmLockManager] operator[SEP] identifier[lockExclusive] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] operator[!] identifier[isStopped] operator[SEP] { identifier[isStopped] operator[=] literal[boolean] operator[SEP] identifier[LinkedListEntry] identifier[entry] operator[=] operator[SEP] identifier[LinkedListEntry] operator[SEP] identifier[activeEntries] operator[SEP] identifier[getFirst] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[entry] operator[!=] Other[null] operator[&&] identifier[activeEntries] operator[SEP] identifier[contains] operator[SEP] identifier[entry] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[entry] operator[SEP] identifier[alarm] operator[!=] Other[null] operator[SEP] { identifier[entry] operator[SEP] identifier[alarm] operator[SEP] identifier[cancel] operator[SEP] operator[SEP] operator[SEP] identifier[entry] operator[SEP] identifier[alarm] operator[=] Other[null] operator[SEP] } identifier[entry] operator[=] operator[SEP] identifier[LinkedListEntry] operator[SEP] identifier[entry] operator[SEP] identifier[getNext] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[finally] { identifier[btmLockManager] operator[SEP] identifier[unlockExclusive] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] }
private final void flushBuffer() throws IOException { if (bufOutput.position() > 0) { bufOutput.flip(); fcOutput.write(bufOutput); bufOutput.clear(); // log.debug("offsetOutputUncommited=" + offsetOutputUncommited + " offsetOutputCommited=" + // offsetOutputCommited + " fcOutput.position()=" + fcOutput.position()); offsetOutputUncommited = offsetOutputCommited = fcOutput.position(); if (syncOnFlush) { fcOutput.force(false); if (callback != null) { callback.synched(offsetOutputCommited); } } } }
class class_name[name] begin[{] method[flushBuffer, return_type[void], modifier[final private], parameter[]] begin[{] if[binary_operation[call[bufOutput.position, parameter[]], >, literal[0]]] begin[{] call[bufOutput.flip, parameter[]] call[fcOutput.write, parameter[member[.bufOutput]]] call[bufOutput.clear, parameter[]] assign[member[.offsetOutputUncommited], assign[member[.offsetOutputCommited], call[fcOutput.position, parameter[]]]] if[member[.syncOnFlush]] begin[{] call[fcOutput.force, parameter[literal[false]]] if[binary_operation[member[.callback], !=, literal[null]]] begin[{] call[callback.synched, parameter[member[.offsetOutputCommited]]] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[final] Keyword[void] identifier[flushBuffer] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[bufOutput] operator[SEP] identifier[position] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[bufOutput] operator[SEP] identifier[flip] operator[SEP] operator[SEP] operator[SEP] identifier[fcOutput] operator[SEP] identifier[write] operator[SEP] identifier[bufOutput] operator[SEP] operator[SEP] identifier[bufOutput] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[offsetOutputUncommited] operator[=] identifier[offsetOutputCommited] operator[=] identifier[fcOutput] operator[SEP] identifier[position] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[syncOnFlush] operator[SEP] { identifier[fcOutput] operator[SEP] identifier[force] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[callback] operator[!=] Other[null] operator[SEP] { identifier[callback] operator[SEP] identifier[synched] operator[SEP] identifier[offsetOutputCommited] operator[SEP] operator[SEP] } } } }
public void rotateWithPivot(float quatW, float quatX, float quatY, float quatZ, float pivotX, float pivotY, float pivotZ) { NativeTransform.rotateWithPivot(getNative(), quatW, quatX, quatY, quatZ, pivotX, pivotY, pivotZ); }
class class_name[name] begin[{] method[rotateWithPivot, return_type[void], modifier[public], parameter[quatW, quatX, quatY, quatZ, pivotX, pivotY, pivotZ]] begin[{] call[NativeTransform.rotateWithPivot, parameter[call[.getNative, parameter[]], member[.quatW], member[.quatX], member[.quatY], member[.quatZ], member[.pivotX], member[.pivotY], member[.pivotZ]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[rotateWithPivot] operator[SEP] Keyword[float] identifier[quatW] , Keyword[float] identifier[quatX] , Keyword[float] identifier[quatY] , Keyword[float] identifier[quatZ] , Keyword[float] identifier[pivotX] , Keyword[float] identifier[pivotY] , Keyword[float] identifier[pivotZ] operator[SEP] { identifier[NativeTransform] operator[SEP] identifier[rotateWithPivot] operator[SEP] identifier[getNative] operator[SEP] operator[SEP] , identifier[quatW] , identifier[quatX] , identifier[quatY] , identifier[quatZ] , identifier[pivotX] , identifier[pivotY] , identifier[pivotZ] operator[SEP] operator[SEP] }
public static Annotation[] getAnnotations(AnnotatedElement annotatedElement) { try { return annotatedElement.getAnnotations(); } catch (Exception ex) { // Assuming nested Class values not resolvable within annotation attributes... logIntrospectionFailure(annotatedElement, ex); return null; } }
class class_name[name] begin[{] method[getAnnotations, return_type[type[Annotation]], modifier[public static], parameter[annotatedElement]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getAnnotations, postfix_operators=[], prefix_operators=[], qualifier=annotatedElement, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=annotatedElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=logIntrospectionFailure, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[Annotation] operator[SEP] operator[SEP] identifier[getAnnotations] operator[SEP] identifier[AnnotatedElement] identifier[annotatedElement] operator[SEP] { Keyword[try] { Keyword[return] identifier[annotatedElement] operator[SEP] identifier[getAnnotations] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { identifier[logIntrospectionFailure] operator[SEP] identifier[annotatedElement] , identifier[ex] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } }
public void error(final String message) { messages.add(new LogMessage(message, LogMessage.Type.ERROR)); log.error(message); }
class class_name[name] begin[{] method[error, return_type[void], modifier[public], parameter[message]] begin[{] call[messages.add, parameter[ClassCreator(arguments=[MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ERROR, postfix_operators=[], prefix_operators=[], qualifier=LogMessage.Type, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LogMessage, sub_type=None))]] call[log.error, parameter[member[.message]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[error] operator[SEP] Keyword[final] identifier[String] identifier[message] operator[SEP] { identifier[messages] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[LogMessage] operator[SEP] identifier[message] , identifier[LogMessage] operator[SEP] identifier[Type] operator[SEP] identifier[ERROR] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[error] operator[SEP] identifier[message] operator[SEP] operator[SEP] }
public alluxio.grpc.BlockInfoOrBuilder getBlockInfoOrBuilder() { return blockInfo_ == null ? alluxio.grpc.BlockInfo.getDefaultInstance() : blockInfo_; }
class class_name[name] begin[{] method[getBlockInfoOrBuilder, return_type[type[alluxio]], modifier[public], parameter[]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=blockInfo_, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MemberReference(member=blockInfo_, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[], member=getDefaultInstance, postfix_operators=[], prefix_operators=[], qualifier=alluxio.grpc.BlockInfo, selectors=[], type_arguments=None))] end[}] END[}]
Keyword[public] identifier[alluxio] operator[SEP] identifier[grpc] operator[SEP] identifier[BlockInfoOrBuilder] identifier[getBlockInfoOrBuilder] operator[SEP] operator[SEP] { Keyword[return] identifier[blockInfo_] operator[==] Other[null] operator[?] identifier[alluxio] operator[SEP] identifier[grpc] operator[SEP] identifier[BlockInfo] operator[SEP] identifier[getDefaultInstance] operator[SEP] operator[SEP] operator[:] identifier[blockInfo_] operator[SEP] }
public boolean add(final SelectionKey selectionKey) { if (null == selectionKey) { return false; } ensureCapacity(size + 1); keys[size++] = selectionKey; return true; }
class class_name[name] begin[{] method[add, return_type[type[boolean]], modifier[public], parameter[selectionKey]] begin[{] if[binary_operation[literal[null], ==, member[.selectionKey]]] begin[{] return[literal[false]] else begin[{] None end[}] call[.ensureCapacity, parameter[binary_operation[member[.size], +, literal[1]]]] assign[member[.keys], member[.selectionKey]] return[literal[true]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[add] operator[SEP] Keyword[final] identifier[SelectionKey] identifier[selectionKey] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[==] identifier[selectionKey] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[ensureCapacity] operator[SEP] identifier[size] operator[+] Other[1] operator[SEP] operator[SEP] identifier[keys] operator[SEP] identifier[size] operator[++] operator[SEP] operator[=] identifier[selectionKey] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
boolean accept() { // Assert that the classpath element is included if (!_includePredicate.test(_ctClass)) { _log.debug("Class is not included: " + _ctClass.getName()); return false; } // Assert that the classpath element is not excluded if (_excludePredicate.test(_ctClass)) { _log.debug("Class is excluded: " + _ctClass.getName()); return false; } // Assert that the class is not frozen if (_ctClass.isFrozen()) { _log.debug("Class is frozen: " + _ctClass.getName()); return false; } // Assert that the processor accepts the classpath element if (!_processor.accept(_ctClass)) { _log.debug("Class is not accepted: " + _ctClass.getName()); return false; } // Assert that this processor has not already been run if (isAlreadyProcessed(_ctClass, _processor)) { _log.info("Class already processed: " + _ctClass.getName()); return false; } return true; }
class class_name[name] begin[{] method[accept, return_type[type[boolean]], modifier[default], parameter[]] begin[{] if[call[_includePredicate.test, parameter[member[._ctClass]]]] begin[{] call[_log.debug, parameter[binary_operation[literal["Class is not included: "], +, call[_ctClass.getName, parameter[]]]]] return[literal[false]] else begin[{] None end[}] if[call[_excludePredicate.test, parameter[member[._ctClass]]]] begin[{] call[_log.debug, parameter[binary_operation[literal["Class is excluded: "], +, call[_ctClass.getName, parameter[]]]]] return[literal[false]] else begin[{] None end[}] if[call[_ctClass.isFrozen, parameter[]]] begin[{] call[_log.debug, parameter[binary_operation[literal["Class is frozen: "], +, call[_ctClass.getName, parameter[]]]]] return[literal[false]] else begin[{] None end[}] if[call[_processor.accept, parameter[member[._ctClass]]]] begin[{] call[_log.debug, parameter[binary_operation[literal["Class is not accepted: "], +, call[_ctClass.getName, parameter[]]]]] return[literal[false]] else begin[{] None end[}] if[call[.isAlreadyProcessed, parameter[member[._ctClass], member[._processor]]]] begin[{] call[_log.info, parameter[binary_operation[literal["Class already processed: "], +, call[_ctClass.getName, parameter[]]]]] return[literal[false]] else begin[{] None end[}] return[literal[true]] end[}] END[}]
Keyword[boolean] identifier[accept] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[_includePredicate] operator[SEP] identifier[test] operator[SEP] identifier[_ctClass] operator[SEP] operator[SEP] { identifier[_log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[_ctClass] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[_excludePredicate] operator[SEP] identifier[test] operator[SEP] identifier[_ctClass] operator[SEP] operator[SEP] { identifier[_log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[_ctClass] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[_ctClass] operator[SEP] identifier[isFrozen] operator[SEP] operator[SEP] operator[SEP] { identifier[_log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[_ctClass] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[_processor] operator[SEP] identifier[accept] operator[SEP] identifier[_ctClass] operator[SEP] operator[SEP] { identifier[_log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[_ctClass] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[isAlreadyProcessed] operator[SEP] identifier[_ctClass] , identifier[_processor] operator[SEP] operator[SEP] { identifier[_log] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[_ctClass] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
@GwtCompatible(serializable = true) public static <T> Predicate<T> isNull() { return ObjectPredicate.IS_NULL.withNarrowedType(); }
class class_name[name] begin[{] method[isNull, return_type[type[Predicate]], modifier[public static], parameter[]] begin[{] return[call[ObjectPredicate.IS_NULL.withNarrowedType, parameter[]]] end[}] END[}]
annotation[@] identifier[GwtCompatible] operator[SEP] identifier[serializable] operator[=] literal[boolean] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Predicate] operator[<] identifier[T] operator[>] identifier[isNull] operator[SEP] operator[SEP] { Keyword[return] identifier[ObjectPredicate] operator[SEP] identifier[IS_NULL] operator[SEP] identifier[withNarrowedType] operator[SEP] operator[SEP] operator[SEP] }
public static ValueWithPos<String> isbn13FormatWithPos(final ValueWithPos<String> pentry) { if (pentry == null) { return null; } if (StringUtils.isNotEmpty(pentry.getValue())) { final StringBuilder ibanSb = new StringBuilder(Isbn13FormatedValidator.ISBN13_LENGTH); int pos = 0; int posformated = 0; for (final char charCode : pentry.getValue().toCharArray()) { if (CharUtils.isAsciiNumeric(charCode)) { if (pos == 3 || pos == 4 || pos == 6 || pos == 12) { ibanSb.append(SEPARATOR); if (posformated <= pentry.getPos()) { pentry.setPos(pentry.getPos() + 1); } posformated++; } ibanSb.append(charCode); pos++; posformated++; } else { if (posformated < pentry.getPos()) { pentry.setPos(pentry.getPos() - 1); } } } pentry.setValue(ibanSb.toString()); if (pentry.getPos() < 0) { pentry.setPos(0); } else if (pentry.getPos() >= ibanSb.length()) { pentry.setPos(ibanSb.length()); } } return pentry; }
class class_name[name] begin[{] method[isbn13FormatWithPos, return_type[type[ValueWithPos]], modifier[public static], parameter[pentry]] begin[{] if[binary_operation[member[.pentry], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] if[call[StringUtils.isNotEmpty, parameter[call[pentry.getValue, parameter[]]]]] begin[{] local_variable[type[StringBuilder], ibanSb] local_variable[type[int], pos] local_variable[type[int], posformated] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=charCode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isAsciiNumeric, postfix_operators=[], prefix_operators=[], qualifier=CharUtils, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=posformated, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getPos, postfix_operators=[], prefix_operators=[], qualifier=pentry, selectors=[], type_arguments=None), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=getPos, postfix_operators=[], prefix_operators=[], qualifier=pentry, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=setPos, postfix_operators=[], prefix_operators=[], qualifier=pentry, selectors=[], type_arguments=None), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator===), operandr=BinaryOperation(operandl=MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator===), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6), operator===), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=12), operator===), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SEPARATOR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=ibanSb, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=posformated, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getPos, postfix_operators=[], prefix_operators=[], qualifier=pentry, selectors=[], type_arguments=None), operator=<=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=getPos, postfix_operators=[], prefix_operators=[], qualifier=pentry, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=setPos, postfix_operators=[], prefix_operators=[], qualifier=pentry, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MemberReference(member=posformated, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=charCode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=ibanSb, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=pos, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=MemberReference(member=posformated, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=pentry, selectors=[MethodInvocation(arguments=[], member=toCharArray, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=charCode)], modifiers={'final'}, type=BasicType(dimensions=[], name=char))), label=None) call[pentry.setValue, parameter[call[ibanSb.toString, parameter[]]]] if[binary_operation[call[pentry.getPos, parameter[]], <, literal[0]]] begin[{] call[pentry.setPos, parameter[literal[0]]] else begin[{] if[binary_operation[call[pentry.getPos, parameter[]], >=, call[ibanSb.length, parameter[]]]] begin[{] call[pentry.setPos, parameter[call[ibanSb.length, parameter[]]]] else begin[{] None end[}] end[}] else begin[{] None end[}] return[member[.pentry]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ValueWithPos] operator[<] identifier[String] operator[>] identifier[isbn13FormatWithPos] operator[SEP] Keyword[final] identifier[ValueWithPos] operator[<] identifier[String] operator[>] identifier[pentry] operator[SEP] { Keyword[if] operator[SEP] identifier[pentry] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isNotEmpty] operator[SEP] identifier[pentry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[StringBuilder] identifier[ibanSb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[Isbn13FormatedValidator] operator[SEP] identifier[ISBN13_LENGTH] operator[SEP] operator[SEP] Keyword[int] identifier[pos] operator[=] Other[0] operator[SEP] Keyword[int] identifier[posformated] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[final] Keyword[char] identifier[charCode] operator[:] identifier[pentry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[toCharArray] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[CharUtils] operator[SEP] identifier[isAsciiNumeric] operator[SEP] identifier[charCode] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[pos] operator[==] Other[3] operator[||] identifier[pos] operator[==] Other[4] operator[||] identifier[pos] operator[==] Other[6] operator[||] identifier[pos] operator[==] Other[12] operator[SEP] { identifier[ibanSb] operator[SEP] identifier[append] operator[SEP] identifier[SEPARATOR] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[posformated] operator[<=] identifier[pentry] operator[SEP] identifier[getPos] operator[SEP] operator[SEP] operator[SEP] { identifier[pentry] operator[SEP] identifier[setPos] operator[SEP] identifier[pentry] operator[SEP] identifier[getPos] operator[SEP] operator[SEP] operator[+] Other[1] operator[SEP] operator[SEP] } identifier[posformated] operator[++] operator[SEP] } identifier[ibanSb] operator[SEP] identifier[append] operator[SEP] identifier[charCode] operator[SEP] operator[SEP] identifier[pos] operator[++] operator[SEP] identifier[posformated] operator[++] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[posformated] operator[<] identifier[pentry] operator[SEP] identifier[getPos] operator[SEP] operator[SEP] operator[SEP] { identifier[pentry] operator[SEP] identifier[setPos] operator[SEP] identifier[pentry] operator[SEP] identifier[getPos] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] } } } identifier[pentry] operator[SEP] identifier[setValue] operator[SEP] identifier[ibanSb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pentry] operator[SEP] identifier[getPos] operator[SEP] operator[SEP] operator[<] Other[0] operator[SEP] { identifier[pentry] operator[SEP] identifier[setPos] operator[SEP] Other[0] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[pentry] operator[SEP] identifier[getPos] operator[SEP] operator[SEP] operator[>=] identifier[ibanSb] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] { identifier[pentry] operator[SEP] identifier[setPos] operator[SEP] identifier[ibanSb] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[pentry] operator[SEP] }
public double getNorth() { Double n = get(NORTH); if (n != null) { return n; } return HMConstants.doubleNovalue; }
class class_name[name] begin[{] method[getNorth, return_type[type[double]], modifier[public], parameter[]] begin[{] local_variable[type[Double], n] if[binary_operation[member[.n], !=, literal[null]]] begin[{] return[member[.n]] else begin[{] None end[}] return[member[HMConstants.doubleNovalue]] end[}] END[}]
Keyword[public] Keyword[double] identifier[getNorth] operator[SEP] operator[SEP] { identifier[Double] identifier[n] operator[=] identifier[get] operator[SEP] identifier[NORTH] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[n] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[n] operator[SEP] } Keyword[return] identifier[HMConstants] operator[SEP] identifier[doubleNovalue] operator[SEP] }
public static Resource getSetupPage(I_SetupUiContext context, String name) { String path = CmsStringUtil.joinPaths(context.getSetupBean().getContextPath(), CmsSetupBean.FOLDER_SETUP, name); Resource resource = new ExternalResource(path); return resource; }
class class_name[name] begin[{] method[getSetupPage, return_type[type[Resource]], modifier[public static], parameter[context, name]] begin[{] local_variable[type[String], path] local_variable[type[Resource], resource] return[member[.resource]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Resource] identifier[getSetupPage] operator[SEP] identifier[I_SetupUiContext] identifier[context] , identifier[String] identifier[name] operator[SEP] { identifier[String] identifier[path] operator[=] identifier[CmsStringUtil] operator[SEP] identifier[joinPaths] operator[SEP] identifier[context] operator[SEP] identifier[getSetupBean] operator[SEP] operator[SEP] operator[SEP] identifier[getContextPath] operator[SEP] operator[SEP] , identifier[CmsSetupBean] operator[SEP] identifier[FOLDER_SETUP] , identifier[name] operator[SEP] operator[SEP] identifier[Resource] identifier[resource] operator[=] Keyword[new] identifier[ExternalResource] operator[SEP] identifier[path] operator[SEP] operator[SEP] Keyword[return] identifier[resource] operator[SEP] }
public final T build() { getParser().parseImpl(this); // There was a gap in the parameters if either: // 1) the mask had a gap, e.g. ..00110111 // 2) there were more than 32 parameters and the mask wasn't full. // Gaps above the 32nd parameter are not detected. if ((pmask & (pmask + 1)) != 0 || (maxIndex > 31 && pmask != -1)) { int firstMissing = Integer.numberOfTrailingZeros(~pmask); throw ParseException.generic( String.format("unreferenced arguments [first missing index=%d]", firstMissing), getMessage()); } return buildImpl(); }
class class_name[name] begin[{] method[build, return_type[type[T]], modifier[final public], parameter[]] begin[{] call[.getParser, parameter[]] if[binary_operation[binary_operation[binary_operation[member[.pmask], &, binary_operation[member[.pmask], +, literal[1]]], !=, literal[0]], ||, binary_operation[binary_operation[member[.maxIndex], >, literal[31]], &&, binary_operation[member[.pmask], !=, literal[1]]]]] begin[{] local_variable[type[int], firstMissing] ThrowStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="unreferenced arguments [first missing index=%d]"), MemberReference(member=firstMissing, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=generic, postfix_operators=[], prefix_operators=[], qualifier=ParseException, selectors=[], type_arguments=None), label=None) else begin[{] None end[}] return[call[.buildImpl, parameter[]]] end[}] END[}]
Keyword[public] Keyword[final] identifier[T] identifier[build] operator[SEP] operator[SEP] { identifier[getParser] operator[SEP] operator[SEP] operator[SEP] identifier[parseImpl] operator[SEP] Keyword[this] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[pmask] operator[&] operator[SEP] identifier[pmask] operator[+] Other[1] operator[SEP] operator[SEP] operator[!=] Other[0] operator[||] operator[SEP] identifier[maxIndex] operator[>] Other[31] operator[&&] identifier[pmask] operator[!=] operator[-] Other[1] operator[SEP] operator[SEP] { Keyword[int] identifier[firstMissing] operator[=] identifier[Integer] operator[SEP] identifier[numberOfTrailingZeros] operator[SEP] operator[~] identifier[pmask] operator[SEP] operator[SEP] Keyword[throw] identifier[ParseException] operator[SEP] identifier[generic] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[firstMissing] operator[SEP] , identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[buildImpl] operator[SEP] operator[SEP] operator[SEP] }
protected Map<String, Object> getJmxServerEnvironment() { final Map<String, Object> jmxEnv = new HashMap<String, Object>(); // SSL Options final String enableSSL = System.getProperty(JMX_SSL_PROPERTY); if (Boolean.getBoolean(enableSSL)) { SslRMIClientSocketFactory csf = new SslRMIClientSocketFactory(); jmxEnv.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE, csf); SslRMIServerSocketFactory ssf = new SslRMIServerSocketFactory(); jmxEnv.put(RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE, ssf); } // Password file options final String passwordFile = System.getProperty(JMX_PASSWORD_FILE_PROPERTY); if (passwordFile != null) { jmxEnv.put(JMX_REMOTE_X_PASSWORD_FILE, passwordFile); } // Access file options final String accessFile = System.getProperty(JMX_ACCESS_FILE_PROPERTY); if (accessFile != null) { jmxEnv.put(JMX_REMOTE_X_ACCESS_FILE, accessFile); } if (this.logger.isDebugEnabled()) { this.logger.debug("Configured JMX Server Environment = '" + jmxEnv + "'"); } return jmxEnv; }
class class_name[name] begin[{] method[getJmxServerEnvironment, return_type[type[Map]], modifier[protected], parameter[]] begin[{] local_variable[type[Map], jmxEnv] local_variable[type[String], enableSSL] if[call[Boolean.getBoolean, parameter[member[.enableSSL]]]] begin[{] local_variable[type[SslRMIClientSocketFactory], csf] call[jmxEnv.put, parameter[member[RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE], member[.csf]]] local_variable[type[SslRMIServerSocketFactory], ssf] call[jmxEnv.put, parameter[member[RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE], member[.ssf]]] else begin[{] None end[}] local_variable[type[String], passwordFile] if[binary_operation[member[.passwordFile], !=, literal[null]]] begin[{] call[jmxEnv.put, parameter[member[.JMX_REMOTE_X_PASSWORD_FILE], member[.passwordFile]]] else begin[{] None end[}] local_variable[type[String], accessFile] if[binary_operation[member[.accessFile], !=, literal[null]]] begin[{] call[jmxEnv.put, parameter[member[.JMX_REMOTE_X_ACCESS_FILE], member[.accessFile]]] else begin[{] None end[}] if[THIS[member[None.logger]call[None.isDebugEnabled, parameter[]]]] begin[{] THIS[member[None.logger]call[None.debug, parameter[binary_operation[binary_operation[literal["Configured JMX Server Environment = '"], +, member[.jmxEnv]], +, literal["'"]]]]] else begin[{] None end[}] return[member[.jmxEnv]] end[}] END[}]
Keyword[protected] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[getJmxServerEnvironment] operator[SEP] operator[SEP] { Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[jmxEnv] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[enableSSL] operator[=] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] identifier[JMX_SSL_PROPERTY] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Boolean] operator[SEP] identifier[getBoolean] operator[SEP] identifier[enableSSL] operator[SEP] operator[SEP] { identifier[SslRMIClientSocketFactory] identifier[csf] operator[=] Keyword[new] identifier[SslRMIClientSocketFactory] operator[SEP] operator[SEP] operator[SEP] identifier[jmxEnv] operator[SEP] identifier[put] operator[SEP] identifier[RMIConnectorServer] operator[SEP] identifier[RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE] , identifier[csf] operator[SEP] operator[SEP] identifier[SslRMIServerSocketFactory] identifier[ssf] operator[=] Keyword[new] identifier[SslRMIServerSocketFactory] operator[SEP] operator[SEP] operator[SEP] identifier[jmxEnv] operator[SEP] identifier[put] operator[SEP] identifier[RMIConnectorServer] operator[SEP] identifier[RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE] , identifier[ssf] operator[SEP] operator[SEP] } Keyword[final] identifier[String] identifier[passwordFile] operator[=] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] identifier[JMX_PASSWORD_FILE_PROPERTY] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[passwordFile] operator[!=] Other[null] operator[SEP] { identifier[jmxEnv] operator[SEP] identifier[put] operator[SEP] identifier[JMX_REMOTE_X_PASSWORD_FILE] , identifier[passwordFile] operator[SEP] operator[SEP] } Keyword[final] identifier[String] identifier[accessFile] operator[=] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] identifier[JMX_ACCESS_FILE_PROPERTY] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[accessFile] operator[!=] Other[null] operator[SEP] { identifier[jmxEnv] operator[SEP] identifier[put] operator[SEP] identifier[JMX_REMOTE_X_ACCESS_FILE] , identifier[accessFile] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[logger] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[jmxEnv] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[jmxEnv] operator[SEP] }
public static <E> Optional<E> searchFirst(E[] array, Predicate<E> predicate) { final FilteringIterator<E> filtered = new FilteringIterator<E>(new ArrayIterator<E>(array), predicate); return new MaybeFirstElement<E>().apply(filtered); }
class class_name[name] begin[{] method[searchFirst, return_type[type[Optional]], modifier[public static], parameter[array, predicate]] begin[{] local_variable[type[FilteringIterator], filtered] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=filtered, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=apply, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=E, sub_type=None))], dimensions=None, name=MaybeFirstElement, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[E] operator[>] identifier[Optional] operator[<] identifier[E] operator[>] identifier[searchFirst] operator[SEP] identifier[E] operator[SEP] operator[SEP] identifier[array] , identifier[Predicate] operator[<] identifier[E] operator[>] identifier[predicate] operator[SEP] { Keyword[final] identifier[FilteringIterator] operator[<] identifier[E] operator[>] identifier[filtered] operator[=] Keyword[new] identifier[FilteringIterator] operator[<] identifier[E] operator[>] operator[SEP] Keyword[new] identifier[ArrayIterator] operator[<] identifier[E] operator[>] operator[SEP] identifier[array] operator[SEP] , identifier[predicate] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[MaybeFirstElement] operator[<] identifier[E] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[apply] operator[SEP] identifier[filtered] operator[SEP] operator[SEP] }
@Override public double getValue(IntDoubleVector params) { double sum = params.dot(params); sum *= 1./2. * lambda; return - sum; }
class class_name[name] begin[{] method[getValue, return_type[type[double]], modifier[public], parameter[params]] begin[{] local_variable[type[double], sum] assign[member[.sum], binary_operation[binary_operation[literal[1.], /, literal[2.]], *, member[.lambda]]] return[member[.sum]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[double] identifier[getValue] operator[SEP] identifier[IntDoubleVector] identifier[params] operator[SEP] { Keyword[double] identifier[sum] operator[=] identifier[params] operator[SEP] identifier[dot] operator[SEP] identifier[params] operator[SEP] operator[SEP] identifier[sum] operator[*=] literal[Float] operator[/] literal[Float] operator[*] identifier[lambda] operator[SEP] Keyword[return] operator[-] identifier[sum] operator[SEP] }
private void buildUI() { // Attribute select: attributeSelect = new SelectItem("attributeItem"); attributeSelect.setWidth(140); attributeSelect.setShowTitle(false); attributeSelect.setValueMap(getSearchableAttributes(layer)); attributeSelect.setHint(I18nProvider.getSearch().gridChooseAttribute()); attributeSelect.setShowHintInField(true); attributeSelect.setValidateOnChange(true); attributeSelect.setShowErrorStyle(true); attributeSelect.setRequired(true); // Operator select: operatorSelect = new SelectItem("operatorItem"); operatorSelect.setDisabled(true); operatorSelect.setWidth(140); operatorSelect.setShowTitle(false); operatorSelect.setValidateOnChange(true); operatorSelect.setShowErrorStyle(true); operatorSelect.setRequired(true); // Value form item: valueItem = new AttributeFormItem("valueItem"); valueItem.setShowTitle(false); valueItem.setDisabled(true); valueItem.setWidth(150); // Mechanisms: attributeSelect.addChangedHandler(new ChangedHandler() { public void onChanged(ChangedEvent event) { selectedAttribute = getSelectedAttribute(); if (selectedAttribute != null) { // Adjust operator value map and enabled: operatorSelect.setDisabled(false); String[] operators = getOperatorsForAttributeType(selectedAttribute); operatorSelect.setValueMap(operators); operatorSelect.setValue(operators[0]); // Adjust value form item and enable: valueItem.setAttributeInfo(selectedAttribute); valueItem.setDisabled(false); valueItem.setWidth(form.getWidth() - 290); } } }); // Finalize: form = new DynamicForm(); form.setNumCols(6); form.setHeight(26); form.setWidth100(); form.setFields(attributeSelect, operatorSelect, valueItem); addChild(form); }
class class_name[name] begin[{] method[buildUI, return_type[void], modifier[private], parameter[]] begin[{] assign[member[.attributeSelect], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="attributeItem")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SelectItem, sub_type=None))] call[attributeSelect.setWidth, parameter[literal[140]]] call[attributeSelect.setShowTitle, parameter[literal[false]]] call[attributeSelect.setValueMap, parameter[call[.getSearchableAttributes, parameter[member[.layer]]]]] call[attributeSelect.setHint, parameter[call[I18nProvider.getSearch, parameter[]]]] call[attributeSelect.setShowHintInField, parameter[literal[true]]] call[attributeSelect.setValidateOnChange, parameter[literal[true]]] call[attributeSelect.setShowErrorStyle, parameter[literal[true]]] call[attributeSelect.setRequired, parameter[literal[true]]] assign[member[.operatorSelect], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="operatorItem")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SelectItem, sub_type=None))] call[operatorSelect.setDisabled, parameter[literal[true]]] call[operatorSelect.setWidth, parameter[literal[140]]] call[operatorSelect.setShowTitle, parameter[literal[false]]] call[operatorSelect.setValidateOnChange, parameter[literal[true]]] call[operatorSelect.setShowErrorStyle, parameter[literal[true]]] call[operatorSelect.setRequired, parameter[literal[true]]] assign[member[.valueItem], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="valueItem")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AttributeFormItem, sub_type=None))] call[valueItem.setShowTitle, parameter[literal[false]]] call[valueItem.setDisabled, parameter[literal[true]]] call[valueItem.setWidth, parameter[literal[150]]] call[attributeSelect.addChangedHandler, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=selectedAttribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getSelectedAttribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=selectedAttribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=setDisabled, postfix_operators=[], prefix_operators=[], qualifier=operatorSelect, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=selectedAttribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getOperatorsForAttributeType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=operators)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=operators, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setValueMap, postfix_operators=[], prefix_operators=[], qualifier=operatorSelect, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=operators, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))])], member=setValue, postfix_operators=[], prefix_operators=[], qualifier=operatorSelect, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=selectedAttribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setAttributeInfo, postfix_operators=[], prefix_operators=[], qualifier=valueItem, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=setDisabled, postfix_operators=[], prefix_operators=[], qualifier=valueItem, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=form, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=290), operator=-)], member=setWidth, postfix_operators=[], prefix_operators=[], qualifier=valueItem, selectors=[], type_arguments=None), label=None)]))], documentation=None, modifiers={'public'}, name=onChanged, parameters=[FormalParameter(annotations=[], modifiers=set(), name=event, type=ReferenceType(arguments=None, dimensions=[], name=ChangedEvent, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ChangedHandler, sub_type=None))]] assign[member[.form], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DynamicForm, sub_type=None))] call[form.setNumCols, parameter[literal[6]]] call[form.setHeight, parameter[literal[26]]] call[form.setWidth100, parameter[]] call[form.setFields, parameter[member[.attributeSelect], member[.operatorSelect], member[.valueItem]]] call[.addChild, parameter[member[.form]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[buildUI] operator[SEP] operator[SEP] { identifier[attributeSelect] operator[=] Keyword[new] identifier[SelectItem] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[attributeSelect] operator[SEP] identifier[setWidth] operator[SEP] Other[140] operator[SEP] operator[SEP] identifier[attributeSelect] operator[SEP] identifier[setShowTitle] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[attributeSelect] operator[SEP] identifier[setValueMap] operator[SEP] identifier[getSearchableAttributes] operator[SEP] identifier[layer] operator[SEP] operator[SEP] operator[SEP] identifier[attributeSelect] operator[SEP] identifier[setHint] operator[SEP] identifier[I18nProvider] operator[SEP] identifier[getSearch] operator[SEP] operator[SEP] operator[SEP] identifier[gridChooseAttribute] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[attributeSelect] operator[SEP] identifier[setShowHintInField] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[attributeSelect] operator[SEP] identifier[setValidateOnChange] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[attributeSelect] operator[SEP] identifier[setShowErrorStyle] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[attributeSelect] operator[SEP] identifier[setRequired] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[operatorSelect] operator[=] Keyword[new] identifier[SelectItem] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[operatorSelect] operator[SEP] identifier[setDisabled] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[operatorSelect] operator[SEP] identifier[setWidth] operator[SEP] Other[140] operator[SEP] operator[SEP] identifier[operatorSelect] operator[SEP] identifier[setShowTitle] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[operatorSelect] operator[SEP] identifier[setValidateOnChange] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[operatorSelect] operator[SEP] identifier[setShowErrorStyle] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[operatorSelect] operator[SEP] identifier[setRequired] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[valueItem] operator[=] Keyword[new] identifier[AttributeFormItem] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[valueItem] operator[SEP] identifier[setShowTitle] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[valueItem] operator[SEP] identifier[setDisabled] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[valueItem] operator[SEP] identifier[setWidth] operator[SEP] Other[150] operator[SEP] operator[SEP] identifier[attributeSelect] operator[SEP] identifier[addChangedHandler] operator[SEP] Keyword[new] identifier[ChangedHandler] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[onChanged] operator[SEP] identifier[ChangedEvent] identifier[event] operator[SEP] { identifier[selectedAttribute] operator[=] identifier[getSelectedAttribute] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[selectedAttribute] operator[!=] Other[null] operator[SEP] { identifier[operatorSelect] operator[SEP] identifier[setDisabled] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[operators] operator[=] identifier[getOperatorsForAttributeType] operator[SEP] identifier[selectedAttribute] operator[SEP] operator[SEP] identifier[operatorSelect] operator[SEP] identifier[setValueMap] operator[SEP] identifier[operators] operator[SEP] operator[SEP] identifier[operatorSelect] operator[SEP] identifier[setValue] operator[SEP] identifier[operators] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[valueItem] operator[SEP] identifier[setAttributeInfo] operator[SEP] identifier[selectedAttribute] operator[SEP] operator[SEP] identifier[valueItem] operator[SEP] identifier[setDisabled] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[valueItem] operator[SEP] identifier[setWidth] operator[SEP] identifier[form] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[-] Other[290] operator[SEP] operator[SEP] } } } operator[SEP] operator[SEP] identifier[form] operator[=] Keyword[new] identifier[DynamicForm] operator[SEP] operator[SEP] operator[SEP] identifier[form] operator[SEP] identifier[setNumCols] operator[SEP] Other[6] operator[SEP] operator[SEP] identifier[form] operator[SEP] identifier[setHeight] operator[SEP] Other[26] operator[SEP] operator[SEP] identifier[form] operator[SEP] identifier[setWidth100] operator[SEP] operator[SEP] operator[SEP] identifier[form] operator[SEP] identifier[setFields] operator[SEP] identifier[attributeSelect] , identifier[operatorSelect] , identifier[valueItem] operator[SEP] operator[SEP] identifier[addChild] operator[SEP] identifier[form] operator[SEP] operator[SEP] }
public <ResultT> CoreSyncFindIterable<ResultT> find(final Bson filter, final Class<ResultT> resultClass) { return createFindIterable(filter, resultClass); }
class class_name[name] begin[{] method[find, return_type[type[CoreSyncFindIterable]], modifier[public], parameter[filter, resultClass]] begin[{] return[call[.createFindIterable, parameter[member[.filter], member[.resultClass]]]] end[}] END[}]
Keyword[public] operator[<] identifier[ResultT] operator[>] identifier[CoreSyncFindIterable] operator[<] identifier[ResultT] operator[>] identifier[find] operator[SEP] Keyword[final] identifier[Bson] identifier[filter] , Keyword[final] identifier[Class] operator[<] identifier[ResultT] operator[>] identifier[resultClass] operator[SEP] { Keyword[return] identifier[createFindIterable] operator[SEP] identifier[filter] , identifier[resultClass] operator[SEP] operator[SEP] }
public CrawlerTargets withS3Targets(S3Target... s3Targets) { if (this.s3Targets == null) { setS3Targets(new java.util.ArrayList<S3Target>(s3Targets.length)); } for (S3Target ele : s3Targets) { this.s3Targets.add(ele); } return this; }
class class_name[name] begin[{] method[withS3Targets, return_type[type[CrawlerTargets]], modifier[public], parameter[s3Targets]] begin[{] if[binary_operation[THIS[member[None.s3Targets]], ==, literal[null]]] begin[{] call[.setS3Targets, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=s3Targets, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=S3Target, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=s3Targets, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=s3Targets, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ele)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=S3Target, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[CrawlerTargets] identifier[withS3Targets] operator[SEP] identifier[S3Target] operator[...] identifier[s3Targets] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[s3Targets] operator[==] Other[null] operator[SEP] { identifier[setS3Targets] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[S3Target] operator[>] operator[SEP] identifier[s3Targets] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[S3Target] identifier[ele] operator[:] identifier[s3Targets] operator[SEP] { Keyword[this] operator[SEP] identifier[s3Targets] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
private double computeLearningRate(int i) { if (gradAccum[i] < 0) { throw new RuntimeException("Gradient accumulator is < 0: " + gradAccum[i]); } if (updAccum[i] < 0) { throw new RuntimeException("Update accumulator is < 0: " + updAccum[i]); } double learningRate = Math.sqrt((updAccum[i] + prm.constantAddend) / (gradAccum[i] + prm.constantAddend)); assert !Double.isNaN(learningRate); // We shouldn't ever worry about infinities because of the constantAdded being > 0. assert !Double.isInfinite(learningRate); return learningRate; }
class class_name[name] begin[{] method[computeLearningRate, return_type[type[double]], modifier[private], parameter[i]] begin[{] if[binary_operation[member[.gradAccum], <, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Gradient accumulator is < 0: "), operandr=MemberReference(member=gradAccum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.updAccum], <, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Update accumulator is < 0: "), operandr=MemberReference(member=updAccum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[double], learningRate] AssertStatement(condition=MethodInvocation(arguments=[MemberReference(member=learningRate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isNaN, postfix_operators=[], prefix_operators=['!'], qualifier=Double, selectors=[], type_arguments=None), label=None, value=None) AssertStatement(condition=MethodInvocation(arguments=[MemberReference(member=learningRate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isInfinite, postfix_operators=[], prefix_operators=['!'], qualifier=Double, selectors=[], type_arguments=None), label=None, value=None) return[member[.learningRate]] end[}] END[}]
Keyword[private] Keyword[double] identifier[computeLearningRate] operator[SEP] Keyword[int] identifier[i] operator[SEP] { Keyword[if] operator[SEP] identifier[gradAccum] operator[SEP] identifier[i] operator[SEP] operator[<] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[+] identifier[gradAccum] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[updAccum] operator[SEP] identifier[i] operator[SEP] operator[<] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[+] identifier[updAccum] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } Keyword[double] identifier[learningRate] operator[=] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] operator[SEP] identifier[updAccum] operator[SEP] identifier[i] operator[SEP] operator[+] identifier[prm] operator[SEP] identifier[constantAddend] operator[SEP] operator[/] operator[SEP] identifier[gradAccum] operator[SEP] identifier[i] operator[SEP] operator[+] identifier[prm] operator[SEP] identifier[constantAddend] operator[SEP] operator[SEP] operator[SEP] Keyword[assert] operator[!] identifier[Double] operator[SEP] identifier[isNaN] operator[SEP] identifier[learningRate] operator[SEP] operator[SEP] Keyword[assert] operator[!] identifier[Double] operator[SEP] identifier[isInfinite] operator[SEP] identifier[learningRate] operator[SEP] operator[SEP] Keyword[return] identifier[learningRate] operator[SEP] }