code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
@Override public DescribeCodeRepositoryResult describeCodeRepository(DescribeCodeRepositoryRequest request) { request = beforeClientExecution(request); return executeDescribeCodeRepository(request); }
class class_name[name] begin[{] method[describeCodeRepository, return_type[type[DescribeCodeRepositoryResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeDescribeCodeRepository, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[DescribeCodeRepositoryResult] identifier[describeCodeRepository] operator[SEP] identifier[DescribeCodeRepositoryRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeDescribeCodeRepository] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
@Override public JAnnotation []getDeclaredAnnotations() { Annotation []ann = _class.getAnnotations(); JAnnotation []jAnn = new JAnnotation[ann.length]; for (int i = 0; i < ann.length; i++) { jAnn[i] = new JAnnotationWrapper(ann[i]); } return jAnn; }
class class_name[name] begin[{] method[getDeclaredAnnotations, return_type[type[JAnnotation]], modifier[public], parameter[]] begin[{] local_variable[type[Annotation], ann] local_variable[type[JAnnotation], jAnn] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=jAnn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=ClassCreator(arguments=[MemberReference(member=ann, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, 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=JAnnotationWrapper, 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=ann, 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[.jAnn]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[JAnnotation] operator[SEP] operator[SEP] identifier[getDeclaredAnnotations] operator[SEP] operator[SEP] { identifier[Annotation] operator[SEP] operator[SEP] identifier[ann] operator[=] identifier[_class] operator[SEP] identifier[getAnnotations] operator[SEP] operator[SEP] operator[SEP] identifier[JAnnotation] operator[SEP] operator[SEP] identifier[jAnn] operator[=] Keyword[new] identifier[JAnnotation] operator[SEP] identifier[ann] 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[ann] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[jAnn] operator[SEP] identifier[i] operator[SEP] operator[=] Keyword[new] identifier[JAnnotationWrapper] operator[SEP] identifier[ann] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[jAnn] operator[SEP] }
public List<User> getUsers(UserSearchParams searchParams) throws ProvisioningApiException { return getUsers( searchParams.getLimit(), searchParams.getOffset(), searchParams.getOrder(), searchParams.getSortBy(), searchParams.getFilterName(), searchParams.getFilterParameters(), searchParams.getRoles(), searchParams.getSkills(), searchParams.getUserEnabled(), searchParams.getUserValid() ); }
class class_name[name] begin[{] method[getUsers, return_type[type[List]], modifier[public], parameter[searchParams]] begin[{] return[call[.getUsers, parameter[call[searchParams.getLimit, parameter[]], call[searchParams.getOffset, parameter[]], call[searchParams.getOrder, parameter[]], call[searchParams.getSortBy, parameter[]], call[searchParams.getFilterName, parameter[]], call[searchParams.getFilterParameters, parameter[]], call[searchParams.getRoles, parameter[]], call[searchParams.getSkills, parameter[]], call[searchParams.getUserEnabled, parameter[]], call[searchParams.getUserValid, parameter[]]]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[User] operator[>] identifier[getUsers] operator[SEP] identifier[UserSearchParams] identifier[searchParams] operator[SEP] Keyword[throws] identifier[ProvisioningApiException] { Keyword[return] identifier[getUsers] operator[SEP] identifier[searchParams] operator[SEP] identifier[getLimit] operator[SEP] operator[SEP] , identifier[searchParams] operator[SEP] identifier[getOffset] operator[SEP] operator[SEP] , identifier[searchParams] operator[SEP] identifier[getOrder] operator[SEP] operator[SEP] , identifier[searchParams] operator[SEP] identifier[getSortBy] operator[SEP] operator[SEP] , identifier[searchParams] operator[SEP] identifier[getFilterName] operator[SEP] operator[SEP] , identifier[searchParams] operator[SEP] identifier[getFilterParameters] operator[SEP] operator[SEP] , identifier[searchParams] operator[SEP] identifier[getRoles] operator[SEP] operator[SEP] , identifier[searchParams] operator[SEP] identifier[getSkills] operator[SEP] operator[SEP] , identifier[searchParams] operator[SEP] identifier[getUserEnabled] operator[SEP] operator[SEP] , identifier[searchParams] operator[SEP] identifier[getUserValid] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Override protected void doInitInputLocation(WstxInputData reader) { reader.mCurrInputProcessed = mContentStart.getCharacterOffset(); reader.mCurrInputRow = mContentStart.getLineNumber(); /* 13-Apr-2005, TSa: Since column offsets reported by Location * objects are 1-based, but internally we use 0-based counts, * need to offset this start by 1 to begin with. */ reader.mCurrInputRowStart = -mContentStart.getColumnNumber() + 1; }
class class_name[name] begin[{] method[doInitInputLocation, return_type[void], modifier[protected], parameter[reader]] begin[{] assign[member[reader.mCurrInputProcessed], call[mContentStart.getCharacterOffset, parameter[]]] assign[member[reader.mCurrInputRow], call[mContentStart.getLineNumber, parameter[]]] assign[member[reader.mCurrInputRowStart], binary_operation[call[mContentStart.getColumnNumber, parameter[]], +, literal[1]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[doInitInputLocation] operator[SEP] identifier[WstxInputData] identifier[reader] operator[SEP] { identifier[reader] operator[SEP] identifier[mCurrInputProcessed] operator[=] identifier[mContentStart] operator[SEP] identifier[getCharacterOffset] operator[SEP] operator[SEP] operator[SEP] identifier[reader] operator[SEP] identifier[mCurrInputRow] operator[=] identifier[mContentStart] operator[SEP] identifier[getLineNumber] operator[SEP] operator[SEP] operator[SEP] identifier[reader] operator[SEP] identifier[mCurrInputRowStart] operator[=] operator[-] identifier[mContentStart] operator[SEP] identifier[getColumnNumber] operator[SEP] operator[SEP] operator[+] Other[1] operator[SEP] }
private void preparePositions(ResponseBuilder rb, ComponentFields mtasFields) throws IOException { Set<String> ids = MtasSolrResultUtil .getIdsFromParameters(rb.req.getParams(), PARAM_MTAS_STATS_POSITIONS); if (!ids.isEmpty()) { int tmpCounter = 0; String[] fields = new String[ids.size()]; String[] keys = new String[ids.size()]; String[] minima = new String[ids.size()]; String[] maxima = new String[ids.size()]; String[] types = new String[ids.size()]; for (String id : ids) { fields[tmpCounter] = rb.req.getParams().get(PARAM_MTAS_STATS_POSITIONS + "." + id + "." + NAME_MTAS_STATS_POSITIONS_FIELD, null); keys[tmpCounter] = rb.req.getParams() .get(PARAM_MTAS_STATS_POSITIONS + "." + id + "." + NAME_MTAS_STATS_POSITIONS_KEY, String.valueOf(tmpCounter)) .trim(); minima[tmpCounter] = rb.req.getParams().get(PARAM_MTAS_STATS_POSITIONS + "." + id + "." + NAME_MTAS_STATS_POSITIONS_MINIMUM, null); maxima[tmpCounter] = rb.req.getParams().get(PARAM_MTAS_STATS_POSITIONS + "." + id + "." + NAME_MTAS_STATS_POSITIONS_MAXIMUM, null); types[tmpCounter] = rb.req.getParams().get(PARAM_MTAS_STATS_POSITIONS + "." + id + "." + NAME_MTAS_STATS_POSITIONS_TYPE, null); tmpCounter++; } String uniqueKeyField = rb.req.getSchema().getUniqueKeyField().getName(); mtasFields.doStats = true; mtasFields.doStatsPositions = true; rb.setNeedDocSet(true); for (String field : fields) { if (field == null || field.isEmpty()) { throw new IOException("no (valid) field in mtas stats positions"); } else if (!mtasFields.list.containsKey(field)) { mtasFields.list.put(field, new ComponentField(uniqueKeyField)); } } MtasSolrResultUtil.compareAndCheck(keys, fields, NAME_MTAS_STATS_POSITIONS_KEY, NAME_MTAS_STATS_POSITIONS_FIELD, true); MtasSolrResultUtil.compareAndCheck(minima, fields, NAME_MTAS_STATS_POSITIONS_MINIMUM, NAME_MTAS_STATS_POSITIONS_FIELD, false); MtasSolrResultUtil.compareAndCheck(maxima, fields, NAME_MTAS_STATS_POSITIONS_MAXIMUM, NAME_MTAS_STATS_POSITIONS_FIELD, false); MtasSolrResultUtil.compareAndCheck(types, fields, NAME_MTAS_STATS_POSITIONS_TYPE, NAME_MTAS_STATS_POSITIONS_FIELD, false); for (int i = 0; i < fields.length; i++) { String field = fields[i]; String key = keys[i]; String type = (types[i] == null) || (types[i].isEmpty()) ? null : types[i].trim(); Double minimum = (minima[i] == null) || (minima[i].isEmpty()) ? null : Double.parseDouble(minima[i]); Double maximum = (maxima[i] == null) || (maxima[i].isEmpty()) ? null : Double.parseDouble(maxima[i]); try { mtasFields.list.get(field).statsPositionList .add(new ComponentPosition(key, minimum, maximum, type)); } catch (ParseException e) { throw new IOException(e.getMessage()); } } } }
class class_name[name] begin[{] method[preparePositions, return_type[void], modifier[private], parameter[rb, mtasFields]] begin[{] local_variable[type[Set], ids] if[call[ids.isEmpty, parameter[]]] begin[{] local_variable[type[int], tmpCounter] local_variable[type[String], fields] local_variable[type[String], keys] local_variable[type[String], minima] local_variable[type[String], maxima] local_variable[type[String], types] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=fields, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=tmpCounter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[], member=getParams, postfix_operators=[], prefix_operators=[], qualifier=rb.req, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=PARAM_MTAS_STATS_POSITIONS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="."), operator=+), operandr=MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="."), operator=+), operandr=MemberReference(member=NAME_MTAS_STATS_POSITIONS_FIELD, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=keys, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=tmpCounter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[], member=getParams, postfix_operators=[], prefix_operators=[], qualifier=rb.req, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=PARAM_MTAS_STATS_POSITIONS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="."), operator=+), operandr=MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="."), operator=+), operandr=MemberReference(member=NAME_MTAS_STATS_POSITIONS_KEY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MethodInvocation(arguments=[MemberReference(member=tmpCounter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=trim, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=minima, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=tmpCounter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[], member=getParams, postfix_operators=[], prefix_operators=[], qualifier=rb.req, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=PARAM_MTAS_STATS_POSITIONS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="."), operator=+), operandr=MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="."), operator=+), operandr=MemberReference(member=NAME_MTAS_STATS_POSITIONS_MINIMUM, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=maxima, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=tmpCounter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[], member=getParams, postfix_operators=[], prefix_operators=[], qualifier=rb.req, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=PARAM_MTAS_STATS_POSITIONS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="."), operator=+), operandr=MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="."), operator=+), operandr=MemberReference(member=NAME_MTAS_STATS_POSITIONS_MAXIMUM, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=types, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=tmpCounter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[], member=getParams, postfix_operators=[], prefix_operators=[], qualifier=rb.req, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=PARAM_MTAS_STATS_POSITIONS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="."), operator=+), operandr=MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="."), operator=+), operandr=MemberReference(member=NAME_MTAS_STATS_POSITIONS_TYPE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), StatementExpression(expression=MemberReference(member=tmpCounter, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=ids, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=id)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) local_variable[type[String], uniqueKeyField] assign[member[mtasFields.doStats], literal[true]] assign[member[mtasFields.doStatsPositions], literal[true]] call[rb.setNeedDocSet, parameter[literal[true]]] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None), operator=||), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=['!'], qualifier=mtasFields.list, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MemberReference(member=uniqueKeyField, 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=ComponentField, sub_type=None))], member=put, postfix_operators=[], prefix_operators=[], qualifier=mtasFields.list, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="no (valid) field in mtas stats positions")], 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)]))]), control=EnhancedForControl(iterable=MemberReference(member=fields, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=field)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) call[MtasSolrResultUtil.compareAndCheck, parameter[member[.keys], member[.fields], member[.NAME_MTAS_STATS_POSITIONS_KEY], member[.NAME_MTAS_STATS_POSITIONS_FIELD], literal[true]]] call[MtasSolrResultUtil.compareAndCheck, parameter[member[.minima], member[.fields], member[.NAME_MTAS_STATS_POSITIONS_MINIMUM], member[.NAME_MTAS_STATS_POSITIONS_FIELD], literal[false]]] call[MtasSolrResultUtil.compareAndCheck, parameter[member[.maxima], member[.fields], member[.NAME_MTAS_STATS_POSITIONS_MAXIMUM], member[.NAME_MTAS_STATS_POSITIONS_FIELD], literal[false]]] call[MtasSolrResultUtil.compareAndCheck, parameter[member[.types], member[.fields], member[.NAME_MTAS_STATS_POSITIONS_TYPE], member[.NAME_MTAS_STATS_POSITIONS_FIELD], literal[false]]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=fields, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=field)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=keys, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=types, 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===), operandr=MemberReference(member=types, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=||), if_false=MemberReference(member=types, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=trim, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), name=type)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=minima, 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===), operandr=MemberReference(member=minima, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=||), if_false=MethodInvocation(arguments=[MemberReference(member=minima, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=parseDouble, postfix_operators=[], prefix_operators=[], qualifier=Double, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), name=minimum)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Double, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=maxima, 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===), operandr=MemberReference(member=maxima, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=||), if_false=MethodInvocation(arguments=[MemberReference(member=maxima, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=parseDouble, postfix_operators=[], prefix_operators=[], qualifier=Double, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), name=maximum)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Double, sub_type=None)), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=mtasFields.list, selectors=[MemberReference(member=statsPositionList, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=minimum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=maximum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=type, 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=ComponentPosition, sub_type=None))], member=add, 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=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], 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)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ParseException']))], finally_block=None, label=None, resources=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=fields, 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) else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[preparePositions] operator[SEP] identifier[ResponseBuilder] identifier[rb] , identifier[ComponentFields] identifier[mtasFields] operator[SEP] Keyword[throws] identifier[IOException] { identifier[Set] operator[<] identifier[String] operator[>] identifier[ids] operator[=] identifier[MtasSolrResultUtil] operator[SEP] identifier[getIdsFromParameters] operator[SEP] identifier[rb] operator[SEP] identifier[req] operator[SEP] identifier[getParams] operator[SEP] operator[SEP] , identifier[PARAM_MTAS_STATS_POSITIONS] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[ids] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[int] identifier[tmpCounter] operator[=] Other[0] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[fields] operator[=] Keyword[new] identifier[String] operator[SEP] identifier[ids] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[keys] operator[=] Keyword[new] identifier[String] operator[SEP] identifier[ids] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[minima] operator[=] Keyword[new] identifier[String] operator[SEP] identifier[ids] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[maxima] operator[=] Keyword[new] identifier[String] operator[SEP] identifier[ids] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[types] operator[=] Keyword[new] identifier[String] operator[SEP] identifier[ids] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[id] operator[:] identifier[ids] operator[SEP] { identifier[fields] operator[SEP] identifier[tmpCounter] operator[SEP] operator[=] identifier[rb] operator[SEP] identifier[req] operator[SEP] identifier[getParams] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[PARAM_MTAS_STATS_POSITIONS] operator[+] literal[String] operator[+] identifier[id] operator[+] literal[String] operator[+] identifier[NAME_MTAS_STATS_POSITIONS_FIELD] , Other[null] operator[SEP] operator[SEP] identifier[keys] operator[SEP] identifier[tmpCounter] operator[SEP] operator[=] identifier[rb] operator[SEP] identifier[req] operator[SEP] identifier[getParams] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[PARAM_MTAS_STATS_POSITIONS] operator[+] literal[String] operator[+] identifier[id] operator[+] literal[String] operator[+] identifier[NAME_MTAS_STATS_POSITIONS_KEY] , identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[tmpCounter] operator[SEP] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[minima] operator[SEP] identifier[tmpCounter] operator[SEP] operator[=] identifier[rb] operator[SEP] identifier[req] operator[SEP] identifier[getParams] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[PARAM_MTAS_STATS_POSITIONS] operator[+] literal[String] operator[+] identifier[id] operator[+] literal[String] operator[+] identifier[NAME_MTAS_STATS_POSITIONS_MINIMUM] , Other[null] operator[SEP] operator[SEP] identifier[maxima] operator[SEP] identifier[tmpCounter] operator[SEP] operator[=] identifier[rb] operator[SEP] identifier[req] operator[SEP] identifier[getParams] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[PARAM_MTAS_STATS_POSITIONS] operator[+] literal[String] operator[+] identifier[id] operator[+] literal[String] operator[+] identifier[NAME_MTAS_STATS_POSITIONS_MAXIMUM] , Other[null] operator[SEP] operator[SEP] identifier[types] operator[SEP] identifier[tmpCounter] operator[SEP] operator[=] identifier[rb] operator[SEP] identifier[req] operator[SEP] identifier[getParams] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[PARAM_MTAS_STATS_POSITIONS] operator[+] literal[String] operator[+] identifier[id] operator[+] literal[String] operator[+] identifier[NAME_MTAS_STATS_POSITIONS_TYPE] , Other[null] operator[SEP] operator[SEP] identifier[tmpCounter] operator[++] operator[SEP] } identifier[String] identifier[uniqueKeyField] operator[=] identifier[rb] operator[SEP] identifier[req] operator[SEP] identifier[getSchema] operator[SEP] operator[SEP] operator[SEP] identifier[getUniqueKeyField] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[mtasFields] operator[SEP] identifier[doStats] operator[=] literal[boolean] operator[SEP] identifier[mtasFields] operator[SEP] identifier[doStatsPositions] operator[=] literal[boolean] operator[SEP] identifier[rb] operator[SEP] identifier[setNeedDocSet] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[field] operator[:] identifier[fields] operator[SEP] { Keyword[if] operator[SEP] identifier[field] operator[==] Other[null] operator[||] identifier[field] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[!] identifier[mtasFields] operator[SEP] identifier[list] operator[SEP] identifier[containsKey] operator[SEP] identifier[field] operator[SEP] operator[SEP] { identifier[mtasFields] operator[SEP] identifier[list] operator[SEP] identifier[put] operator[SEP] identifier[field] , Keyword[new] identifier[ComponentField] operator[SEP] identifier[uniqueKeyField] operator[SEP] operator[SEP] operator[SEP] } } identifier[MtasSolrResultUtil] operator[SEP] identifier[compareAndCheck] operator[SEP] identifier[keys] , identifier[fields] , identifier[NAME_MTAS_STATS_POSITIONS_KEY] , identifier[NAME_MTAS_STATS_POSITIONS_FIELD] , literal[boolean] operator[SEP] operator[SEP] identifier[MtasSolrResultUtil] operator[SEP] identifier[compareAndCheck] operator[SEP] identifier[minima] , identifier[fields] , identifier[NAME_MTAS_STATS_POSITIONS_MINIMUM] , identifier[NAME_MTAS_STATS_POSITIONS_FIELD] , literal[boolean] operator[SEP] operator[SEP] identifier[MtasSolrResultUtil] operator[SEP] identifier[compareAndCheck] operator[SEP] identifier[maxima] , identifier[fields] , identifier[NAME_MTAS_STATS_POSITIONS_MAXIMUM] , identifier[NAME_MTAS_STATS_POSITIONS_FIELD] , literal[boolean] operator[SEP] operator[SEP] identifier[MtasSolrResultUtil] operator[SEP] identifier[compareAndCheck] operator[SEP] identifier[types] , identifier[fields] , identifier[NAME_MTAS_STATS_POSITIONS_TYPE] , identifier[NAME_MTAS_STATS_POSITIONS_FIELD] , literal[boolean] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[fields] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[String] identifier[field] operator[=] identifier[fields] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[String] identifier[key] operator[=] identifier[keys] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[String] identifier[type] operator[=] operator[SEP] identifier[types] operator[SEP] identifier[i] operator[SEP] operator[==] Other[null] operator[SEP] operator[||] operator[SEP] identifier[types] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] operator[?] Other[null] operator[:] identifier[types] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[Double] identifier[minimum] operator[=] operator[SEP] identifier[minima] operator[SEP] identifier[i] operator[SEP] operator[==] Other[null] operator[SEP] operator[||] operator[SEP] identifier[minima] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] operator[?] Other[null] operator[:] identifier[Double] operator[SEP] identifier[parseDouble] operator[SEP] identifier[minima] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] identifier[Double] identifier[maximum] operator[=] operator[SEP] identifier[maxima] operator[SEP] identifier[i] operator[SEP] operator[==] Other[null] operator[SEP] operator[||] operator[SEP] identifier[maxima] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] operator[?] Other[null] operator[:] identifier[Double] operator[SEP] identifier[parseDouble] operator[SEP] identifier[maxima] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[mtasFields] operator[SEP] identifier[list] operator[SEP] identifier[get] operator[SEP] identifier[field] operator[SEP] operator[SEP] identifier[statsPositionList] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[ComponentPosition] operator[SEP] identifier[key] , identifier[minimum] , identifier[maximum] , identifier[type] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ParseException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } }
public List<CmsGroup> getGroups( CmsRequestContext context, CmsOrganizationalUnit orgUnit, boolean includeSubOus, boolean readRoles) throws CmsException { List<CmsGroup> result = null; CmsDbContext dbc = m_dbContextFactory.getDbContext(context); try { result = m_driverManager.getGroups(dbc, orgUnit, includeSubOus, readRoles); } catch (Exception e) { dbc.report(null, Messages.get().container(Messages.ERR_READ_ORGUNIT_GROUPS_1, orgUnit.getName()), e); } finally { dbc.clear(); } return result; }
class class_name[name] begin[{] method[getGroups, return_type[type[List]], modifier[public], parameter[context, orgUnit, includeSubOus, readRoles]] begin[{] local_variable[type[List], result] local_variable[type[CmsDbContext], dbc] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=dbc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=orgUnit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=includeSubOus, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=readRoles, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getGroups, postfix_operators=[], prefix_operators=[], qualifier=m_driverManager, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[MethodInvocation(arguments=[MemberReference(member=ERR_READ_ORGUNIT_GROUPS_1, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[]), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=orgUnit, selectors=[], type_arguments=None)], member=container, 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=report, postfix_operators=[], prefix_operators=[], qualifier=dbc, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=clear, postfix_operators=[], prefix_operators=[], qualifier=dbc, selectors=[], type_arguments=None), label=None)], label=None, resources=None) return[member[.result]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[CmsGroup] operator[>] identifier[getGroups] operator[SEP] identifier[CmsRequestContext] identifier[context] , identifier[CmsOrganizationalUnit] identifier[orgUnit] , Keyword[boolean] identifier[includeSubOus] , Keyword[boolean] identifier[readRoles] operator[SEP] Keyword[throws] identifier[CmsException] { identifier[List] operator[<] identifier[CmsGroup] operator[>] identifier[result] operator[=] Other[null] operator[SEP] identifier[CmsDbContext] identifier[dbc] operator[=] identifier[m_dbContextFactory] operator[SEP] identifier[getDbContext] operator[SEP] identifier[context] operator[SEP] operator[SEP] Keyword[try] { identifier[result] operator[=] identifier[m_driverManager] operator[SEP] identifier[getGroups] operator[SEP] identifier[dbc] , identifier[orgUnit] , identifier[includeSubOus] , identifier[readRoles] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[dbc] operator[SEP] identifier[report] operator[SEP] Other[null] , identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[container] operator[SEP] identifier[Messages] operator[SEP] identifier[ERR_READ_ORGUNIT_GROUPS_1] , identifier[orgUnit] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } Keyword[finally] { identifier[dbc] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
public ServiceFuture<Void> cancelAsync(String resourceGroupName, String deploymentName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(cancelWithServiceResponseAsync(resourceGroupName, deploymentName), serviceCallback); }
class class_name[name] begin[{] method[cancelAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, deploymentName, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.cancelWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.deploymentName]]], member[.serviceCallback]]]] end[}] END[}]
Keyword[public] identifier[ServiceFuture] operator[<] identifier[Void] operator[>] identifier[cancelAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[deploymentName] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[Void] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[ServiceFuture] operator[SEP] identifier[fromResponse] operator[SEP] identifier[cancelWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[deploymentName] operator[SEP] , identifier[serviceCallback] operator[SEP] operator[SEP] }
public InputStream fetch(HttpURLConnection connection, boolean readErrorStreamNoException) throws IOException { // create connection but before reading get the correct inputstream based on the compression and if error connection.connect(); InputStream is; if (readErrorStreamNoException && connection.getResponseCode() >= 400 && connection.getErrorStream() != null) is = connection.getErrorStream(); else is = connection.getInputStream(); if (is == null) throw new IOException("Stream is null. Message:" + connection.getResponseMessage()); // wrap try { String encoding = connection.getContentEncoding(); if (encoding != null && encoding.equalsIgnoreCase("gzip")) is = new GZIPInputStream(is); else if (encoding != null && encoding.equalsIgnoreCase("deflate")) is = new InflaterInputStream(is, new Inflater(true)); } catch (IOException ex) { } return is; }
class class_name[name] begin[{] method[fetch, return_type[type[InputStream]], modifier[public], parameter[connection, readErrorStreamNoException]] begin[{] call[connection.connect, parameter[]] local_variable[type[InputStream], is] if[binary_operation[binary_operation[member[.readErrorStreamNoException], &&, binary_operation[call[connection.getResponseCode, parameter[]], >=, literal[400]]], &&, binary_operation[call[connection.getErrorStream, parameter[]], !=, literal[null]]]] begin[{] assign[member[.is], call[connection.getErrorStream, parameter[]]] else begin[{] assign[member[.is], call[connection.getInputStream, parameter[]]] end[}] if[binary_operation[member[.is], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Stream is null. Message:"), operandr=MethodInvocation(arguments=[], member=getResponseMessage, postfix_operators=[], prefix_operators=[], qualifier=connection, selectors=[], type_arguments=None), 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[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getContentEncoding, postfix_operators=[], prefix_operators=[], qualifier=connection, selectors=[], type_arguments=None), name=encoding)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=encoding, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="gzip")], member=equalsIgnoreCase, postfix_operators=[], prefix_operators=[], qualifier=encoding, selectors=[], type_arguments=None), operator=&&), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=encoding, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="deflate")], member=equalsIgnoreCase, postfix_operators=[], prefix_operators=[], qualifier=encoding, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=is, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=is, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Inflater, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InflaterInputStream, sub_type=None))), label=None)), label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=is, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=is, 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=GZIPInputStream, sub_type=None))), label=None))], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['IOException']))], finally_block=None, label=None, resources=None) return[member[.is]] end[}] END[}]
Keyword[public] identifier[InputStream] identifier[fetch] operator[SEP] identifier[HttpURLConnection] identifier[connection] , Keyword[boolean] identifier[readErrorStreamNoException] operator[SEP] Keyword[throws] identifier[IOException] { identifier[connection] operator[SEP] identifier[connect] operator[SEP] operator[SEP] operator[SEP] identifier[InputStream] identifier[is] operator[SEP] Keyword[if] operator[SEP] identifier[readErrorStreamNoException] operator[&&] identifier[connection] operator[SEP] identifier[getResponseCode] operator[SEP] operator[SEP] operator[>=] Other[400] operator[&&] identifier[connection] operator[SEP] identifier[getErrorStream] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] identifier[is] operator[=] identifier[connection] operator[SEP] identifier[getErrorStream] operator[SEP] operator[SEP] operator[SEP] Keyword[else] identifier[is] operator[=] identifier[connection] operator[SEP] identifier[getInputStream] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[is] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[connection] operator[SEP] identifier[getResponseMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[String] identifier[encoding] operator[=] identifier[connection] operator[SEP] identifier[getContentEncoding] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[encoding] operator[!=] Other[null] operator[&&] identifier[encoding] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[is] operator[=] Keyword[new] identifier[GZIPInputStream] operator[SEP] identifier[is] operator[SEP] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[encoding] operator[!=] Other[null] operator[&&] identifier[encoding] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[is] operator[=] Keyword[new] identifier[InflaterInputStream] operator[SEP] identifier[is] , Keyword[new] identifier[Inflater] operator[SEP] literal[boolean] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[ex] operator[SEP] { } Keyword[return] identifier[is] operator[SEP] }
@Route(method= HttpMethod.GET, uri = "internationalization/request") public Result retrieveInternationalizedMessagesFromRequest() { return ok( i18n.get(request().languages(), "welcome") ).as(MimeTypes.TEXT); }
class class_name[name] begin[{] method[retrieveInternationalizedMessagesFromRequest, return_type[type[Result]], modifier[public], parameter[]] begin[{] return[call[.ok, parameter[call[i18n.get, parameter[call[.request, parameter[]], literal["welcome"]]]]]] end[}] END[}]
annotation[@] identifier[Route] operator[SEP] identifier[method] operator[=] identifier[HttpMethod] operator[SEP] identifier[GET] , identifier[uri] operator[=] literal[String] operator[SEP] Keyword[public] identifier[Result] identifier[retrieveInternationalizedMessagesFromRequest] operator[SEP] operator[SEP] { Keyword[return] identifier[ok] operator[SEP] identifier[i18n] operator[SEP] identifier[get] operator[SEP] identifier[request] operator[SEP] operator[SEP] operator[SEP] identifier[languages] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[as] operator[SEP] identifier[MimeTypes] operator[SEP] identifier[TEXT] operator[SEP] operator[SEP] }
@Override public Mono<Void> join(final InetAddress multicastAddress, NetworkInterface iface) { if (null == iface && null != datagramChannel.config().getNetworkInterface()) { iface = datagramChannel.config().getNetworkInterface(); } final ChannelFuture future; if (null != iface) { future = datagramChannel.joinGroup(new InetSocketAddress(multicastAddress, datagramChannel.localAddress() .getPort()), iface); } else { future = datagramChannel.joinGroup(multicastAddress); } return FutureMono.from(future) .doOnSuccess(v -> { if (log.isInfoEnabled()) { log.info(format(future.channel(), "JOIN {}"), multicastAddress); } }); }
class class_name[name] begin[{] method[join, return_type[type[Mono]], modifier[public], parameter[multicastAddress, iface]] begin[{] if[binary_operation[binary_operation[literal[null], ==, member[.iface]], &&, binary_operation[literal[null], !=, call[datagramChannel.config, parameter[]]]]] begin[{] assign[member[.iface], call[datagramChannel.config, parameter[]]] else begin[{] None end[}] local_variable[type[ChannelFuture], future] if[binary_operation[literal[null], !=, member[.iface]]] begin[{] assign[member[.future], call[datagramChannel.joinGroup, parameter[ClassCreator(arguments=[MemberReference(member=multicastAddress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=localAddress, postfix_operators=[], prefix_operators=[], qualifier=datagramChannel, selectors=[MethodInvocation(arguments=[], member=getPort, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InetSocketAddress, sub_type=None)), member[.iface]]]] else begin[{] assign[member[.future], call[datagramChannel.joinGroup, parameter[member[.multicastAddress]]]] end[}] return[call[FutureMono.from, parameter[member[.future]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Mono] operator[<] identifier[Void] operator[>] identifier[join] operator[SEP] Keyword[final] identifier[InetAddress] identifier[multicastAddress] , identifier[NetworkInterface] identifier[iface] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[==] identifier[iface] operator[&&] Other[null] operator[!=] identifier[datagramChannel] operator[SEP] identifier[config] operator[SEP] operator[SEP] operator[SEP] identifier[getNetworkInterface] operator[SEP] operator[SEP] operator[SEP] { identifier[iface] operator[=] identifier[datagramChannel] operator[SEP] identifier[config] operator[SEP] operator[SEP] operator[SEP] identifier[getNetworkInterface] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[ChannelFuture] identifier[future] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[iface] operator[SEP] { identifier[future] operator[=] identifier[datagramChannel] operator[SEP] identifier[joinGroup] operator[SEP] Keyword[new] identifier[InetSocketAddress] operator[SEP] identifier[multicastAddress] , identifier[datagramChannel] operator[SEP] identifier[localAddress] operator[SEP] operator[SEP] operator[SEP] identifier[getPort] operator[SEP] operator[SEP] operator[SEP] , identifier[iface] operator[SEP] operator[SEP] } Keyword[else] { identifier[future] operator[=] identifier[datagramChannel] operator[SEP] identifier[joinGroup] operator[SEP] identifier[multicastAddress] operator[SEP] operator[SEP] } Keyword[return] identifier[FutureMono] operator[SEP] identifier[from] operator[SEP] identifier[future] operator[SEP] operator[SEP] identifier[doOnSuccess] operator[SEP] identifier[v] operator[->] { Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isInfoEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[info] operator[SEP] identifier[format] operator[SEP] identifier[future] operator[SEP] identifier[channel] operator[SEP] operator[SEP] , literal[String] operator[SEP] , identifier[multicastAddress] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
@Override public void removeByUuid(String uuid) { for (CPOptionCategory cpOptionCategory : findByUuid(uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(cpOptionCategory); } }
class class_name[name] begin[{] method[removeByUuid, return_type[void], modifier[public], parameter[uuid]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=cpOptionCategory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=uuid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ALL_POS, postfix_operators=[], prefix_operators=[], qualifier=QueryUtil, selectors=[]), MemberReference(member=ALL_POS, postfix_operators=[], prefix_operators=[], qualifier=QueryUtil, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=findByUuid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=cpOptionCategory)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CPOptionCategory, sub_type=None))), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[removeByUuid] operator[SEP] identifier[String] identifier[uuid] operator[SEP] { Keyword[for] operator[SEP] identifier[CPOptionCategory] identifier[cpOptionCategory] operator[:] identifier[findByUuid] operator[SEP] identifier[uuid] , identifier[QueryUtil] operator[SEP] identifier[ALL_POS] , identifier[QueryUtil] operator[SEP] identifier[ALL_POS] , Other[null] operator[SEP] operator[SEP] { identifier[remove] operator[SEP] identifier[cpOptionCategory] operator[SEP] operator[SEP] } }
public byte[] getPrivKeyBytes33() { byte[] bytes33 = new byte[33]; byte[] priv = getPrivKeyBytes(); System.arraycopy(priv, 0, bytes33, 33 - priv.length, priv.length); return bytes33; }
class class_name[name] begin[{] method[getPrivKeyBytes33, return_type[type[byte]], modifier[public], parameter[]] begin[{] local_variable[type[byte], bytes33] local_variable[type[byte], priv] call[System.arraycopy, parameter[member[.priv], literal[0], member[.bytes33], binary_operation[literal[33], -, member[priv.length]], member[priv.length]]] return[member[.bytes33]] end[}] END[}]
Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[getPrivKeyBytes33] operator[SEP] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[bytes33] operator[=] Keyword[new] Keyword[byte] operator[SEP] Other[33] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[priv] operator[=] identifier[getPrivKeyBytes] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[priv] , Other[0] , identifier[bytes33] , Other[33] operator[-] identifier[priv] operator[SEP] identifier[length] , identifier[priv] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[return] identifier[bytes33] operator[SEP] }
public SearchResponse getSearch(List<String> categories, String search, String acceptLanguage, String datasource, String ifNoneMatch, String language, Boolean strict) throws ApiException { ApiResponse<SearchResponse> resp = getSearchWithHttpInfo(categories, search, acceptLanguage, datasource, ifNoneMatch, language, strict); return resp.getData(); }
class class_name[name] begin[{] method[getSearch, return_type[type[SearchResponse]], modifier[public], parameter[categories, search, acceptLanguage, datasource, ifNoneMatch, language, strict]] begin[{] local_variable[type[ApiResponse], resp] return[call[resp.getData, parameter[]]] end[}] END[}]
Keyword[public] identifier[SearchResponse] identifier[getSearch] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[categories] , identifier[String] identifier[search] , identifier[String] identifier[acceptLanguage] , identifier[String] identifier[datasource] , identifier[String] identifier[ifNoneMatch] , identifier[String] identifier[language] , identifier[Boolean] identifier[strict] operator[SEP] Keyword[throws] identifier[ApiException] { identifier[ApiResponse] operator[<] identifier[SearchResponse] operator[>] identifier[resp] operator[=] identifier[getSearchWithHttpInfo] operator[SEP] identifier[categories] , identifier[search] , identifier[acceptLanguage] , identifier[datasource] , identifier[ifNoneMatch] , identifier[language] , identifier[strict] operator[SEP] operator[SEP] Keyword[return] identifier[resp] operator[SEP] identifier[getData] operator[SEP] operator[SEP] operator[SEP] }
@Deprecated public static Algorithm ECDSA512(ECKey key) throws IllegalArgumentException { ECPublicKey publicKey = key instanceof ECPublicKey ? (ECPublicKey) key : null; ECPrivateKey privateKey = key instanceof ECPrivateKey ? (ECPrivateKey) key : null; return ECDSA512(publicKey, privateKey); }
class class_name[name] begin[{] method[ECDSA512, return_type[type[Algorithm]], modifier[public static], parameter[key]] begin[{] local_variable[type[ECPublicKey], publicKey] local_variable[type[ECPrivateKey], privateKey] return[call[.ECDSA512, parameter[member[.publicKey], member[.privateKey]]]] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[public] Keyword[static] identifier[Algorithm] identifier[ECDSA512] operator[SEP] identifier[ECKey] identifier[key] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] { identifier[ECPublicKey] identifier[publicKey] operator[=] identifier[key] Keyword[instanceof] identifier[ECPublicKey] operator[?] operator[SEP] identifier[ECPublicKey] operator[SEP] identifier[key] operator[:] Other[null] operator[SEP] identifier[ECPrivateKey] identifier[privateKey] operator[=] identifier[key] Keyword[instanceof] identifier[ECPrivateKey] operator[?] operator[SEP] identifier[ECPrivateKey] operator[SEP] identifier[key] operator[:] Other[null] operator[SEP] Keyword[return] identifier[ECDSA512] operator[SEP] identifier[publicKey] , identifier[privateKey] operator[SEP] operator[SEP] }
@Override public QueryBuilder<V> withBindVariableValue(String key, V value) { valueMap.put(key, value); return this; }
class class_name[name] begin[{] method[withBindVariableValue, return_type[type[QueryBuilder]], modifier[public], parameter[key, value]] begin[{] call[valueMap.put, parameter[member[.key], member[.value]]] return[THIS[]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[QueryBuilder] operator[<] identifier[V] operator[>] identifier[withBindVariableValue] operator[SEP] identifier[String] identifier[key] , identifier[V] identifier[value] operator[SEP] { identifier[valueMap] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[value] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public void setCharset(String charsetName) { if (StringUtils.isEmpty(charsetName)) { setCharsetImpl(null); return; } Charset newCharset = null; try { newCharset = Charset.forName(charsetName); if (newCharset != charset) { setCharsetImpl(newCharset); } } catch (IllegalCharsetNameException | UnsupportedCharsetException e) { log.error("Failed to set charset: " + charsetName, e); } }
class class_name[name] begin[{] method[setCharset, return_type[void], modifier[public], parameter[charsetName]] begin[{] if[call[StringUtils.isEmpty, parameter[member[.charsetName]]]] begin[{] call[.setCharsetImpl, parameter[literal[null]]] return[None] else begin[{] None end[}] local_variable[type[Charset], newCharset] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=newCharset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=charsetName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Charset, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=newCharset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=charset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=newCharset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setCharsetImpl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to set charset: "), operandr=MemberReference(member=charsetName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), 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=['IllegalCharsetNameException', 'UnsupportedCharsetException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[setCharset] operator[SEP] identifier[String] identifier[charsetName] operator[SEP] { Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[charsetName] operator[SEP] operator[SEP] { identifier[setCharsetImpl] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } identifier[Charset] identifier[newCharset] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[newCharset] operator[=] identifier[Charset] operator[SEP] identifier[forName] operator[SEP] identifier[charsetName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[newCharset] operator[!=] identifier[charset] operator[SEP] { identifier[setCharsetImpl] operator[SEP] identifier[newCharset] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[IllegalCharsetNameException] operator[|] identifier[UnsupportedCharsetException] identifier[e] operator[SEP] { identifier[log] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[charsetName] , identifier[e] operator[SEP] operator[SEP] } }
@Override public VerifyDomainDkimResult verifyDomainDkim(VerifyDomainDkimRequest request) { request = beforeClientExecution(request); return executeVerifyDomainDkim(request); }
class class_name[name] begin[{] method[verifyDomainDkim, return_type[type[VerifyDomainDkimResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeVerifyDomainDkim, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[VerifyDomainDkimResult] identifier[verifyDomainDkim] operator[SEP] identifier[VerifyDomainDkimRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeVerifyDomainDkim] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public static String getCharset(final String contentType) { // Default to UTF-8 String charset = "UTF-8"; try { // Content type is in the form: // Content-Type: text/html; charset=utf-8 // Where they can be lots of params separated by ; characters if (contentType != null && !contentType.isEmpty()) { if (contentType.contains(";")) { String[] params = contentType.substring(contentType.indexOf(";")).split(";"); for (String param : params) { param = param.trim(); if (param.indexOf("=") > 0) { String paramName = param.substring(0, param.indexOf("=")).trim(); if ("charset".equals(paramName) && param.length() > (param.indexOf("=") + 1)) { String paramValue = param.substring(param.indexOf("=") + 1).trim(); if (paramValue != null && !paramValue.isEmpty() && Charset.isSupported(paramValue)) { charset = paramValue; break; } } } } } } } catch (Throwable t) { // Ignore, we really don't want this util killing anything! } return charset; }
class class_name[name] begin[{] method[getCharset, return_type[type[String]], modifier[public static], parameter[contentType]] begin[{] local_variable[type[String], charset] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=contentType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=contentType, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=";")], member=contains, postfix_operators=[], prefix_operators=[], qualifier=contentType, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=";")], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=contentType, selectors=[], type_arguments=None)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=contentType, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=";")], member=split, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=params)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=param, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=trim, postfix_operators=[], prefix_operators=[], qualifier=param, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="=")], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=param, selectors=[], type_arguments=None), 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=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="=")], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=param, selectors=[], type_arguments=None)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=param, selectors=[MethodInvocation(arguments=[], member=trim, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=paramName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=paramName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], value="charset"), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=param, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="=")], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=param, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), operator=>), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="=")], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=param, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=param, selectors=[MethodInvocation(arguments=[], member=trim, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=paramValue)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=paramValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=paramValue, selectors=[], type_arguments=None), operator=&&), operandr=MethodInvocation(arguments=[MemberReference(member=paramValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isSupported, postfix_operators=[], prefix_operators=[], qualifier=Charset, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=charset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=paramValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), BreakStatement(goto=None, label=None)]))]))]))]), control=EnhancedForControl(iterable=MemberReference(member=params, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=param)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None)]))]))], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=None, label=None, resources=None) return[member[.charset]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getCharset] operator[SEP] Keyword[final] identifier[String] identifier[contentType] operator[SEP] { identifier[String] identifier[charset] operator[=] literal[String] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[contentType] operator[!=] Other[null] operator[&&] operator[!] identifier[contentType] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[contentType] operator[SEP] identifier[contains] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[params] operator[=] identifier[contentType] operator[SEP] identifier[substring] operator[SEP] identifier[contentType] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[param] operator[:] identifier[params] operator[SEP] { identifier[param] operator[=] identifier[param] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[param] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[String] identifier[paramName] operator[=] identifier[param] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[param] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[paramName] operator[SEP] operator[&&] identifier[param] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] operator[SEP] identifier[param] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[+] Other[1] operator[SEP] operator[SEP] { identifier[String] identifier[paramValue] operator[=] identifier[param] operator[SEP] identifier[substring] operator[SEP] identifier[param] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[+] Other[1] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[paramValue] operator[!=] Other[null] operator[&&] operator[!] identifier[paramValue] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[&&] identifier[Charset] operator[SEP] identifier[isSupported] operator[SEP] identifier[paramValue] operator[SEP] operator[SEP] { identifier[charset] operator[=] identifier[paramValue] operator[SEP] Keyword[break] operator[SEP] } } } } } } } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { } Keyword[return] identifier[charset] operator[SEP] }
public static ArrayList<ClassLabel> allClassLabels(MultipleObjectsBundle bundle, int col) { HashSet<ClassLabel> labels = new HashSet<ClassLabel>(); for(int i = 0, l = bundle.dataLength(); i < l; ++i) { Object o = bundle.data(i, col); if(o == null || !(o instanceof ClassLabel)) { continue; } labels.add((ClassLabel) o); } ArrayList<ClassLabel> ret = new ArrayList<>(labels); Collections.sort(ret); return ret; }
class class_name[name] begin[{] method[allClassLabels, return_type[type[ArrayList]], modifier[public static], parameter[bundle, col]] begin[{] local_variable[type[HashSet], labels] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=col, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=data, postfix_operators=[], prefix_operators=[], qualifier=bundle, selectors=[], type_arguments=None), name=o)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=BinaryOperation(operandl=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=ClassLabel, sub_type=None), operator=instanceof), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ClassLabel, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=labels, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=l, 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=dataLength, postfix_operators=[], prefix_operators=[], qualifier=bundle, selectors=[], type_arguments=None), name=l)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None) local_variable[type[ArrayList], ret] call[Collections.sort, parameter[member[.ret]]] return[member[.ret]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ArrayList] operator[<] identifier[ClassLabel] operator[>] identifier[allClassLabels] operator[SEP] identifier[MultipleObjectsBundle] identifier[bundle] , Keyword[int] identifier[col] operator[SEP] { identifier[HashSet] operator[<] identifier[ClassLabel] operator[>] identifier[labels] operator[=] Keyword[new] identifier[HashSet] operator[<] identifier[ClassLabel] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] , identifier[l] operator[=] identifier[bundle] operator[SEP] identifier[dataLength] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[<] identifier[l] operator[SEP] operator[++] identifier[i] operator[SEP] { identifier[Object] identifier[o] operator[=] identifier[bundle] operator[SEP] identifier[data] operator[SEP] identifier[i] , identifier[col] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[o] operator[==] Other[null] operator[||] operator[!] operator[SEP] identifier[o] Keyword[instanceof] identifier[ClassLabel] operator[SEP] operator[SEP] { Keyword[continue] operator[SEP] } identifier[labels] operator[SEP] identifier[add] operator[SEP] operator[SEP] identifier[ClassLabel] operator[SEP] identifier[o] operator[SEP] operator[SEP] } identifier[ArrayList] operator[<] identifier[ClassLabel] operator[>] identifier[ret] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[labels] operator[SEP] operator[SEP] identifier[Collections] operator[SEP] identifier[sort] operator[SEP] identifier[ret] operator[SEP] operator[SEP] Keyword[return] identifier[ret] operator[SEP] }
public static double checkPostconditionD( final double value, final boolean condition, final DoubleFunction<String> describer) { return innerCheckD(value, condition, describer); }
class class_name[name] begin[{] method[checkPostconditionD, return_type[type[double]], modifier[public static], parameter[value, condition, describer]] begin[{] return[call[.innerCheckD, parameter[member[.value], member[.condition], member[.describer]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] identifier[checkPostconditionD] operator[SEP] Keyword[final] Keyword[double] identifier[value] , Keyword[final] Keyword[boolean] identifier[condition] , Keyword[final] identifier[DoubleFunction] operator[<] identifier[String] operator[>] identifier[describer] operator[SEP] { Keyword[return] identifier[innerCheckD] operator[SEP] identifier[value] , identifier[condition] , identifier[describer] operator[SEP] operator[SEP] }
public GetMediaInfoOfFileResponse getMediaInfoOfFile(GetMediaInfoOfFileRequest request) { checkNotNull(request, "The parameter request should NOT be null."); checkStringNotEmpty(request.getBucket(), "The parameter bucket should NOT be null or empty string."); checkStringNotEmpty(request.getKey(), "The parameter key should NOT be null or empty string."); InternalRequest internalRequest = createRequest(HttpMethodName.GET, request, MEDIAINFO); internalRequest.addParameter("bucket", request.getBucket()); internalRequest.addParameter("key", request.getKey()); return invokeHttpClient(internalRequest, GetMediaInfoOfFileResponse.class); }
class class_name[name] begin[{] method[getMediaInfoOfFile, return_type[type[GetMediaInfoOfFileResponse]], modifier[public], parameter[request]] begin[{] call[.checkNotNull, parameter[member[.request], literal["The parameter request should NOT be null."]]] call[.checkStringNotEmpty, parameter[call[request.getBucket, parameter[]], literal["The parameter bucket should NOT be null or empty string."]]] call[.checkStringNotEmpty, parameter[call[request.getKey, parameter[]], literal["The parameter key should NOT be null or empty string."]]] local_variable[type[InternalRequest], internalRequest] call[internalRequest.addParameter, parameter[literal["bucket"], call[request.getBucket, parameter[]]]] call[internalRequest.addParameter, parameter[literal["key"], call[request.getKey, parameter[]]]] return[call[.invokeHttpClient, parameter[member[.internalRequest], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GetMediaInfoOfFileResponse, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[GetMediaInfoOfFileResponse] identifier[getMediaInfoOfFile] operator[SEP] identifier[GetMediaInfoOfFileRequest] identifier[request] operator[SEP] { identifier[checkNotNull] operator[SEP] identifier[request] , literal[String] operator[SEP] operator[SEP] identifier[checkStringNotEmpty] operator[SEP] identifier[request] operator[SEP] identifier[getBucket] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[checkStringNotEmpty] operator[SEP] identifier[request] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[InternalRequest] identifier[internalRequest] operator[=] identifier[createRequest] operator[SEP] identifier[HttpMethodName] operator[SEP] identifier[GET] , identifier[request] , identifier[MEDIAINFO] operator[SEP] operator[SEP] identifier[internalRequest] operator[SEP] identifier[addParameter] operator[SEP] literal[String] , identifier[request] operator[SEP] identifier[getBucket] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[internalRequest] operator[SEP] identifier[addParameter] operator[SEP] literal[String] , identifier[request] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[invokeHttpClient] operator[SEP] identifier[internalRequest] , identifier[GetMediaInfoOfFileResponse] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
public DrawerBuilder withStickyHeader(@LayoutRes int stickyHeaderRes) { if (mActivity == null) { throw new RuntimeException("please pass an activity first to use this call"); } if (stickyHeaderRes != -1) { //i know there should be a root, bit i got none here this.mStickyHeaderView = mActivity.getLayoutInflater().inflate(stickyHeaderRes, null, false); } return this; }
class class_name[name] begin[{] method[withStickyHeader, return_type[type[DrawerBuilder]], modifier[public], parameter[stickyHeaderRes]] begin[{] if[binary_operation[member[.mActivity], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="please pass an activity first to use this call")], 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[.stickyHeaderRes], !=, literal[1]]] begin[{] assign[THIS[member[None.mStickyHeaderView]], call[mActivity.getLayoutInflater, parameter[]]] else begin[{] None end[}] return[THIS[]] end[}] END[}]
Keyword[public] identifier[DrawerBuilder] identifier[withStickyHeader] operator[SEP] annotation[@] identifier[LayoutRes] Keyword[int] identifier[stickyHeaderRes] operator[SEP] { Keyword[if] operator[SEP] identifier[mActivity] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[stickyHeaderRes] operator[!=] operator[-] Other[1] operator[SEP] { Keyword[this] operator[SEP] identifier[mStickyHeaderView] operator[=] identifier[mActivity] operator[SEP] identifier[getLayoutInflater] operator[SEP] operator[SEP] operator[SEP] identifier[inflate] operator[SEP] identifier[stickyHeaderRes] , Other[null] , literal[boolean] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
private synchronized void internalActivateTopology(Topology topology, File topoDir) throws IOException, ZipException, ParserConfigurationException, TransformerException, SAXException { log.activatingTopology(topology.getName()); File[] files = topoDir.listFiles(new RegexDirFilter("%.*")); if (files != null) { for (File file : files) { internalActivateArchive(topology, file); } } }
class class_name[name] begin[{] method[internalActivateTopology, return_type[void], modifier[synchronized private], parameter[topology, topoDir]] begin[{] call[log.activatingTopology, parameter[call[topology.getName, parameter[]]]] local_variable[type[File], files] if[binary_operation[member[.files], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=topology, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=internalActivateArchive, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=files, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=file)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None))), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[synchronized] Keyword[void] identifier[internalActivateTopology] operator[SEP] identifier[Topology] identifier[topology] , identifier[File] identifier[topoDir] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ZipException] , identifier[ParserConfigurationException] , identifier[TransformerException] , identifier[SAXException] { identifier[log] operator[SEP] identifier[activatingTopology] operator[SEP] identifier[topology] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[File] operator[SEP] operator[SEP] identifier[files] operator[=] identifier[topoDir] operator[SEP] identifier[listFiles] operator[SEP] Keyword[new] identifier[RegexDirFilter] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[files] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[File] identifier[file] operator[:] identifier[files] operator[SEP] { identifier[internalActivateArchive] operator[SEP] identifier[topology] , identifier[file] operator[SEP] operator[SEP] } } }
public DescribeCachediSCSIVolumesRequest withVolumeARNs(String... volumeARNs) { if (this.volumeARNs == null) { setVolumeARNs(new com.amazonaws.internal.SdkInternalList<String>(volumeARNs.length)); } for (String ele : volumeARNs) { this.volumeARNs.add(ele); } return this; }
class class_name[name] begin[{] method[withVolumeARNs, return_type[type[DescribeCachediSCSIVolumesRequest]], modifier[public], parameter[volumeARNs]] begin[{] if[binary_operation[THIS[member[None.volumeARNs]], ==, literal[null]]] begin[{] call[.setVolumeARNs, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=volumeARNs, 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)))))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=volumeARNs, 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=volumeARNs, 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=String, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[DescribeCachediSCSIVolumesRequest] identifier[withVolumeARNs] operator[SEP] identifier[String] operator[...] identifier[volumeARNs] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[volumeARNs] operator[==] Other[null] operator[SEP] { identifier[setVolumeARNs] operator[SEP] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[String] operator[>] operator[SEP] identifier[volumeARNs] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[String] identifier[ele] operator[:] identifier[volumeARNs] operator[SEP] { Keyword[this] operator[SEP] identifier[volumeARNs] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
@Override public CreateFleetResult createFleet(CreateFleetRequest request) { request = beforeClientExecution(request); return executeCreateFleet(request); }
class class_name[name] begin[{] method[createFleet, return_type[type[CreateFleetResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeCreateFleet, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CreateFleetResult] identifier[createFleet] operator[SEP] identifier[CreateFleetRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeCreateFleet] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public ListTriggersRequest withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
class class_name[name] begin[{] method[withTags, return_type[type[ListTriggersRequest]], modifier[public], parameter[tags]] begin[{] call[.setTags, parameter[member[.tags]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[ListTriggersRequest] identifier[withTags] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[tags] operator[SEP] { identifier[setTags] operator[SEP] identifier[tags] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
@Override public boolean isActive(Object context, Profile profile) { if(context == null || profile == null) { StringBuilder builder = new StringBuilder() .append("Failed to determine profile active profiles. "); if(context == null) builder.append("Context cannot be null. "); if(profile == null) builder.append("Profile cannot be null. "); throw new IllegalArgumentException(builder.toString()); } if(context.getClass().isAnnotationPresent(IncludeProfiles.class)) { IncludeProfiles profiles = context.getClass().getAnnotation(IncludeProfiles.class); Profile[] activeProfiles = profiles.value(); for (Profile currentProfile : activeProfiles) if(currentProfile.equals(profile)) return true; return false; } if(context.getClass().isAnnotationPresent(ExcludeProfiles.class)) { ExcludeProfiles profiles = context.getClass().getAnnotation(ExcludeProfiles.class); Profile[] inactiveProfiles = profiles.value(); for (Profile currentProfile : inactiveProfiles) if(currentProfile.equals(profile)) return false; return true; } else { return true; } }
class class_name[name] begin[{] method[isActive, return_type[type[boolean]], modifier[public], parameter[context, profile]] begin[{] if[binary_operation[binary_operation[member[.context], ==, literal[null]], ||, binary_operation[member[.profile], ==, literal[null]]]] begin[{] local_variable[type[StringBuilder], builder] if[binary_operation[member[.context], ==, literal[null]]] begin[{] call[builder.append, parameter[literal["Context cannot be null. "]]] else begin[{] None end[}] if[binary_operation[member[.profile], ==, literal[null]]] begin[{] call[builder.append, parameter[literal["Profile cannot be null. "]]] else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None)], 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[call[context.getClass, parameter[]]] begin[{] local_variable[type[IncludeProfiles], profiles] local_variable[type[Profile], activeProfiles] ForStatement(body=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=profile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=currentProfile, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)), control=EnhancedForControl(iterable=MemberReference(member=activeProfiles, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=currentProfile)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Profile, sub_type=None))), label=None) return[literal[false]] else begin[{] None end[}] if[call[context.getClass, parameter[]]] begin[{] local_variable[type[ExcludeProfiles], profiles] local_variable[type[Profile], inactiveProfiles] ForStatement(body=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=profile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=currentProfile, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)), control=EnhancedForControl(iterable=MemberReference(member=inactiveProfiles, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=currentProfile)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Profile, sub_type=None))), label=None) return[literal[true]] else begin[{] return[literal[true]] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[isActive] operator[SEP] identifier[Object] identifier[context] , identifier[Profile] identifier[profile] operator[SEP] { Keyword[if] operator[SEP] identifier[context] operator[==] Other[null] operator[||] identifier[profile] operator[==] Other[null] operator[SEP] { identifier[StringBuilder] identifier[builder] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[context] operator[==] Other[null] operator[SEP] identifier[builder] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[profile] operator[==] Other[null] operator[SEP] identifier[builder] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[builder] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[context] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[isAnnotationPresent] operator[SEP] identifier[IncludeProfiles] operator[SEP] Keyword[class] operator[SEP] operator[SEP] { identifier[IncludeProfiles] identifier[profiles] operator[=] identifier[context] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getAnnotation] operator[SEP] identifier[IncludeProfiles] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[Profile] operator[SEP] operator[SEP] identifier[activeProfiles] operator[=] identifier[profiles] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Profile] identifier[currentProfile] operator[:] identifier[activeProfiles] operator[SEP] Keyword[if] operator[SEP] identifier[currentProfile] operator[SEP] identifier[equals] operator[SEP] identifier[profile] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[context] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[isAnnotationPresent] operator[SEP] identifier[ExcludeProfiles] operator[SEP] Keyword[class] operator[SEP] operator[SEP] { identifier[ExcludeProfiles] identifier[profiles] operator[=] identifier[context] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getAnnotation] operator[SEP] identifier[ExcludeProfiles] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[Profile] operator[SEP] operator[SEP] identifier[inactiveProfiles] operator[=] identifier[profiles] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Profile] identifier[currentProfile] operator[:] identifier[inactiveProfiles] operator[SEP] Keyword[if] operator[SEP] identifier[currentProfile] operator[SEP] identifier[equals] operator[SEP] identifier[profile] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { Keyword[return] literal[boolean] operator[SEP] } }
@ResponseBody @RequestMapping(value = "/{name}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public AggregateCounterResource display( @PathVariable("name") String name, @RequestParam(value = "from", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) DateTime from, @RequestParam(value = "to", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) DateTime to, @RequestParam(value = "resolution", defaultValue = "hour") AggregateCounterResolution resolution) { to = providedOrDefaultToValue(to); from = providedOrDefaultFromValue(from, to, resolution); AggregateCounter aggregate = repository.getCounts(name, new Interval(from, to), resolution); return deepAssembler.toResource(aggregate); }
class class_name[name] begin[{] method[display, return_type[type[AggregateCounterResource]], modifier[public], parameter[name, from, to, resolution]] begin[{] assign[member[.to], call[.providedOrDefaultToValue, parameter[member[.to]]]] assign[member[.from], call[.providedOrDefaultFromValue, parameter[member[.from], member[.to], member[.resolution]]]] local_variable[type[AggregateCounter], aggregate] return[call[deepAssembler.toResource, parameter[member[.aggregate]]]] end[}] END[}]
annotation[@] identifier[ResponseBody] annotation[@] identifier[RequestMapping] operator[SEP] identifier[value] operator[=] literal[String] , identifier[method] operator[=] identifier[RequestMethod] operator[SEP] identifier[GET] , identifier[produces] operator[=] identifier[MediaType] operator[SEP] identifier[APPLICATION_JSON_VALUE] operator[SEP] Keyword[public] identifier[AggregateCounterResource] identifier[display] operator[SEP] annotation[@] identifier[PathVariable] operator[SEP] literal[String] operator[SEP] identifier[String] identifier[name] , annotation[@] identifier[RequestParam] operator[SEP] identifier[value] operator[=] literal[String] , identifier[required] operator[=] literal[boolean] operator[SEP] annotation[@] identifier[DateTimeFormat] operator[SEP] identifier[iso] operator[=] identifier[DateTimeFormat] operator[SEP] identifier[ISO] operator[SEP] identifier[DATE_TIME] operator[SEP] identifier[DateTime] identifier[from] , annotation[@] identifier[RequestParam] operator[SEP] identifier[value] operator[=] literal[String] , identifier[required] operator[=] literal[boolean] operator[SEP] annotation[@] identifier[DateTimeFormat] operator[SEP] identifier[iso] operator[=] identifier[DateTimeFormat] operator[SEP] identifier[ISO] operator[SEP] identifier[DATE_TIME] operator[SEP] identifier[DateTime] identifier[to] , annotation[@] identifier[RequestParam] operator[SEP] identifier[value] operator[=] literal[String] , identifier[defaultValue] operator[=] literal[String] operator[SEP] identifier[AggregateCounterResolution] identifier[resolution] operator[SEP] { identifier[to] operator[=] identifier[providedOrDefaultToValue] operator[SEP] identifier[to] operator[SEP] operator[SEP] identifier[from] operator[=] identifier[providedOrDefaultFromValue] operator[SEP] identifier[from] , identifier[to] , identifier[resolution] operator[SEP] operator[SEP] identifier[AggregateCounter] identifier[aggregate] operator[=] identifier[repository] operator[SEP] identifier[getCounts] operator[SEP] identifier[name] , Keyword[new] identifier[Interval] operator[SEP] identifier[from] , identifier[to] operator[SEP] , identifier[resolution] operator[SEP] operator[SEP] Keyword[return] identifier[deepAssembler] operator[SEP] identifier[toResource] operator[SEP] identifier[aggregate] operator[SEP] operator[SEP] }
public int getImportNumber(StylesheetComposed sheet) { if (this == sheet) return 0; int n = getGlobalImportCount(); for (int i = 0; i < n; i++) { if (sheet == getGlobalImport(i)) return i; } return -1; }
class class_name[name] begin[{] method[getImportNumber, return_type[type[int]], modifier[public], parameter[sheet]] begin[{] if[binary_operation[THIS[], ==, member[.sheet]]] begin[{] return[literal[0]] else begin[{] None end[}] local_variable[type[int], n] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=sheet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getGlobalImport, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator===), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=i, 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=n, 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)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[literal[1]] end[}] END[}]
Keyword[public] Keyword[int] identifier[getImportNumber] operator[SEP] identifier[StylesheetComposed] identifier[sheet] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[==] identifier[sheet] operator[SEP] Keyword[return] Other[0] operator[SEP] Keyword[int] identifier[n] operator[=] identifier[getGlobalImportCount] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[n] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[sheet] operator[==] identifier[getGlobalImport] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[return] identifier[i] operator[SEP] } Keyword[return] operator[-] Other[1] operator[SEP] }
@Override public InputStream getInputStream() throws Exception { for(FSEntry entry : entries){ InputStream is = entry.getInputStream(); if( null != is ) { return is; } } return null; }
class class_name[name] begin[{] method[getInputStream, return_type[type[InputStream]], modifier[public], parameter[]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getInputStream, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), name=is)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=is, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=is, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=entries, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FSEntry, sub_type=None))), label=None) return[literal[null]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[InputStream] identifier[getInputStream] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[for] operator[SEP] identifier[FSEntry] identifier[entry] operator[:] identifier[entries] operator[SEP] { identifier[InputStream] identifier[is] operator[=] identifier[entry] operator[SEP] identifier[getInputStream] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[is] operator[SEP] { Keyword[return] identifier[is] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
public void unregisterFhirProviders (FhirProviderBundle bundle, Map<String,Object> props) throws FhirConfigurationException { if (bundle != null) { Collection<Object> providers = bundle.getProviders(); if (providers != null && !providers.isEmpty()) { try { registeredProviders.remove(providers); String serverName = (String)props.get(FhirServer.SVCPROP_SERVICE_NAME); String ourServerName = getServerName(serverName); FhirServer server = registeredServers.get(ourServerName); if (server != null) { server.unregisterOsgiProviders(providers); Collection<Collection<Object>> active = serverProviders.get(serverName); if (active != null) { active.remove(providers); } } } catch (BadServerException e) { throw new FhirConfigurationException("Unable to register the OSGi FHIR Provider. Multiple Restful Servers exist. Specify the ["+FhirServer.SVCPROP_SERVICE_NAME+"] service-property"); } } } }
class class_name[name] begin[{] method[unregisterFhirProviders, return_type[void], modifier[public], parameter[bundle, props]] begin[{] if[binary_operation[member[.bundle], !=, literal[null]]] begin[{] local_variable[type[Collection], providers] if[binary_operation[binary_operation[member[.providers], !=, literal[null]], &&, call[providers.isEmpty, parameter[]]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=providers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=registeredProviders, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=SVCPROP_SERVICE_NAME, postfix_operators=[], prefix_operators=[], qualifier=FhirServer, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=props, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), name=serverName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=serverName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getServerName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=ourServerName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=ourServerName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=registeredServers, selectors=[], type_arguments=None), name=server)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FhirServer, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=server, 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=[MemberReference(member=providers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=unregisterOsgiProviders, postfix_operators=[], prefix_operators=[], qualifier=server, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=serverName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=serverProviders, selectors=[], type_arguments=None), name=active)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=Collection, sub_type=None))], dimensions=[], name=Collection, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=active, 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=[MemberReference(member=providers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=active, selectors=[], type_arguments=None), label=None)]))]))], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to register the OSGi FHIR Provider. Multiple Restful Servers exist. Specify the ["), operandr=MemberReference(member=SVCPROP_SERVICE_NAME, postfix_operators=[], prefix_operators=[], qualifier=FhirServer, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="] service-property"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FhirConfigurationException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['BadServerException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[unregisterFhirProviders] operator[SEP] identifier[FhirProviderBundle] identifier[bundle] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[props] operator[SEP] Keyword[throws] identifier[FhirConfigurationException] { Keyword[if] operator[SEP] identifier[bundle] operator[!=] Other[null] operator[SEP] { identifier[Collection] operator[<] identifier[Object] operator[>] identifier[providers] operator[=] identifier[bundle] operator[SEP] identifier[getProviders] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[providers] operator[!=] Other[null] operator[&&] operator[!] identifier[providers] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { identifier[registeredProviders] operator[SEP] identifier[remove] operator[SEP] identifier[providers] operator[SEP] operator[SEP] identifier[String] identifier[serverName] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[props] operator[SEP] identifier[get] operator[SEP] identifier[FhirServer] operator[SEP] identifier[SVCPROP_SERVICE_NAME] operator[SEP] operator[SEP] identifier[String] identifier[ourServerName] operator[=] identifier[getServerName] operator[SEP] identifier[serverName] operator[SEP] operator[SEP] identifier[FhirServer] identifier[server] operator[=] identifier[registeredServers] operator[SEP] identifier[get] operator[SEP] identifier[ourServerName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[server] operator[!=] Other[null] operator[SEP] { identifier[server] operator[SEP] identifier[unregisterOsgiProviders] operator[SEP] identifier[providers] operator[SEP] operator[SEP] identifier[Collection] operator[<] identifier[Collection] operator[<] identifier[Object] operator[>] operator[>] identifier[active] operator[=] identifier[serverProviders] operator[SEP] identifier[get] operator[SEP] identifier[serverName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[active] operator[!=] Other[null] operator[SEP] { identifier[active] operator[SEP] identifier[remove] operator[SEP] identifier[providers] operator[SEP] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[BadServerException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[FhirConfigurationException] operator[SEP] literal[String] operator[+] identifier[FhirServer] operator[SEP] identifier[SVCPROP_SERVICE_NAME] operator[+] literal[String] operator[SEP] operator[SEP] } } } }
public void marshall(DescribeNotebookInstanceLifecycleConfigRequest describeNotebookInstanceLifecycleConfigRequest, ProtocolMarshaller protocolMarshaller) { if (describeNotebookInstanceLifecycleConfigRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(describeNotebookInstanceLifecycleConfigRequest.getNotebookInstanceLifecycleConfigName(), NOTEBOOKINSTANCELIFECYCLECONFIGNAME_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[describeNotebookInstanceLifecycleConfigRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.describeNotebookInstanceLifecycleConfigRequest], ==, 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=getNotebookInstanceLifecycleConfigName, postfix_operators=[], prefix_operators=[], qualifier=describeNotebookInstanceLifecycleConfigRequest, selectors=[], type_arguments=None), MemberReference(member=NOTEBOOKINSTANCELIFECYCLECONFIGNAME_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[DescribeNotebookInstanceLifecycleConfigRequest] identifier[describeNotebookInstanceLifecycleConfigRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[describeNotebookInstanceLifecycleConfigRequest] 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[describeNotebookInstanceLifecycleConfigRequest] operator[SEP] identifier[getNotebookInstanceLifecycleConfigName] operator[SEP] operator[SEP] , identifier[NOTEBOOKINSTANCELIFECYCLECONFIGNAME_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 String get(String key) { try { return bundle.getString(key); }catch(MissingResourceException e) { logger.warn("Missing resource.", e); return key; } }
class class_name[name] begin[{] method[get, return_type[type[String]], modifier[public], parameter[key]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getString, postfix_operators=[], prefix_operators=[], qualifier=bundle, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Missing resource."), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['MissingResourceException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] identifier[String] identifier[get] operator[SEP] identifier[String] identifier[key] operator[SEP] { Keyword[try] { Keyword[return] identifier[bundle] operator[SEP] identifier[getString] operator[SEP] identifier[key] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[MissingResourceException] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] Keyword[return] identifier[key] operator[SEP] } }
public static ModifiedRecord recordByColumns(ResultSet rs, List<String> columns) throws SQLException { ModifiedRecord record = new ModifiedRecord(); for (String column : columns) { FieldValue fieldValue = new FieldValue(); fieldValue.setFieldName(column); fieldValue.setTableName(SqlUtils.tableName(column)); fieldValue.setValue(rs.getObject(column)); fieldValue.setValueType(Objects.isNull(fieldValue.getValue()) ? Void.class : fieldValue.getValue().getClass()); if (record.getFieldClusters().get(fieldValue.getTableName()) != null) { record.getFieldClusters().get(fieldValue.getTableName()).getFields().add(fieldValue); } else { FieldCluster fieldCluster = new FieldCluster(); fieldCluster.getFields().add(fieldValue); record.getFieldClusters().put(fieldValue.getTableName(), fieldCluster); } } return record; }
class class_name[name] begin[{] method[recordByColumns, return_type[type[ModifiedRecord]], modifier[public static], parameter[rs, columns]] begin[{] local_variable[type[ModifiedRecord], record] 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=None, dimensions=None, name=FieldValue, sub_type=None)), name=fieldValue)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FieldValue, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=column, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setFieldName, postfix_operators=[], prefix_operators=[], qualifier=fieldValue, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=column, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=tableName, postfix_operators=[], prefix_operators=[], qualifier=SqlUtils, selectors=[], type_arguments=None)], member=setTableName, postfix_operators=[], prefix_operators=[], qualifier=fieldValue, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=column, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getObject, postfix_operators=[], prefix_operators=[], qualifier=rs, selectors=[], type_arguments=None)], member=setValue, postfix_operators=[], prefix_operators=[], qualifier=fieldValue, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[TernaryExpression(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=fieldValue, selectors=[], type_arguments=None)], member=isNull, postfix_operators=[], prefix_operators=[], qualifier=Objects, selectors=[], type_arguments=None), if_false=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=fieldValue, selectors=[MethodInvocation(arguments=[], member=getClass, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), if_true=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Void, sub_type=None)))], member=setValueType, postfix_operators=[], prefix_operators=[], qualifier=fieldValue, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getFieldClusters, postfix_operators=[], prefix_operators=[], qualifier=record, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTableName, postfix_operators=[], prefix_operators=[], qualifier=fieldValue, selectors=[], type_arguments=None)], member=get, 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=null), operator=!=), else_statement=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=None, dimensions=None, name=FieldCluster, sub_type=None)), name=fieldCluster)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FieldCluster, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=getFields, postfix_operators=[], prefix_operators=[], qualifier=fieldCluster, selectors=[MethodInvocation(arguments=[MemberReference(member=fieldValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getFieldClusters, postfix_operators=[], prefix_operators=[], qualifier=record, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTableName, postfix_operators=[], prefix_operators=[], qualifier=fieldValue, selectors=[], type_arguments=None), MemberReference(member=fieldCluster, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getFieldClusters, postfix_operators=[], prefix_operators=[], qualifier=record, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTableName, postfix_operators=[], prefix_operators=[], qualifier=fieldValue, selectors=[], type_arguments=None)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getFields, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=fieldValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=columns, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=column)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[member[.record]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ModifiedRecord] identifier[recordByColumns] operator[SEP] identifier[ResultSet] identifier[rs] , identifier[List] operator[<] identifier[String] operator[>] identifier[columns] operator[SEP] Keyword[throws] identifier[SQLException] { identifier[ModifiedRecord] identifier[record] operator[=] Keyword[new] identifier[ModifiedRecord] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[column] operator[:] identifier[columns] operator[SEP] { identifier[FieldValue] identifier[fieldValue] operator[=] Keyword[new] identifier[FieldValue] operator[SEP] operator[SEP] operator[SEP] identifier[fieldValue] operator[SEP] identifier[setFieldName] operator[SEP] identifier[column] operator[SEP] operator[SEP] identifier[fieldValue] operator[SEP] identifier[setTableName] operator[SEP] identifier[SqlUtils] operator[SEP] identifier[tableName] operator[SEP] identifier[column] operator[SEP] operator[SEP] operator[SEP] identifier[fieldValue] operator[SEP] identifier[setValue] operator[SEP] identifier[rs] operator[SEP] identifier[getObject] operator[SEP] identifier[column] operator[SEP] operator[SEP] operator[SEP] identifier[fieldValue] operator[SEP] identifier[setValueType] operator[SEP] identifier[Objects] operator[SEP] identifier[isNull] operator[SEP] identifier[fieldValue] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[?] identifier[Void] operator[SEP] Keyword[class] operator[:] identifier[fieldValue] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[record] operator[SEP] identifier[getFieldClusters] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[fieldValue] operator[SEP] identifier[getTableName] operator[SEP] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[record] operator[SEP] identifier[getFieldClusters] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[fieldValue] operator[SEP] identifier[getTableName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getFields] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[fieldValue] operator[SEP] operator[SEP] } Keyword[else] { identifier[FieldCluster] identifier[fieldCluster] operator[=] Keyword[new] identifier[FieldCluster] operator[SEP] operator[SEP] operator[SEP] identifier[fieldCluster] operator[SEP] identifier[getFields] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[fieldValue] operator[SEP] operator[SEP] identifier[record] operator[SEP] identifier[getFieldClusters] operator[SEP] operator[SEP] operator[SEP] identifier[put] operator[SEP] identifier[fieldValue] operator[SEP] identifier[getTableName] operator[SEP] operator[SEP] , identifier[fieldCluster] operator[SEP] operator[SEP] } } Keyword[return] identifier[record] operator[SEP] }
public Observable<Job> getJobDetailsAsync(String teamName, String jobId) { return getJobDetailsWithServiceResponseAsync(teamName, jobId).map(new Func1<ServiceResponse<Job>, Job>() { @Override public Job call(ServiceResponse<Job> response) { return response.body(); } }); }
class class_name[name] begin[{] method[getJobDetailsAsync, return_type[type[Observable]], modifier[public], parameter[teamName, jobId]] begin[{] return[call[.getJobDetailsWithServiceResponseAsync, parameter[member[.teamName], member[.jobId]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[Job] operator[>] identifier[getJobDetailsAsync] operator[SEP] identifier[String] identifier[teamName] , identifier[String] identifier[jobId] operator[SEP] { Keyword[return] identifier[getJobDetailsWithServiceResponseAsync] operator[SEP] identifier[teamName] , identifier[jobId] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[Job] operator[>] , identifier[Job] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Job] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[Job] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
@Nullable public static IMicroNode getAsNode (@Nonnull final IHCNode aHCNode) { return getAsNode (aHCNode, HCSettings.getConversionSettings ()); }
class class_name[name] begin[{] method[getAsNode, return_type[type[IMicroNode]], modifier[public static], parameter[aHCNode]] begin[{] return[call[.getAsNode, parameter[member[.aHCNode], call[HCSettings.getConversionSettings, parameter[]]]]] end[}] END[}]
annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[IMicroNode] identifier[getAsNode] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[IHCNode] identifier[aHCNode] operator[SEP] { Keyword[return] identifier[getAsNode] operator[SEP] identifier[aHCNode] , identifier[HCSettings] operator[SEP] identifier[getConversionSettings] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void subscribeOrderbook(final BitfinexOrderBookSymbol orderbookConfiguration) { final SubscribeOrderbookCommand subscribeOrderbookCommand = new SubscribeOrderbookCommand(orderbookConfiguration); client.sendCommand(subscribeOrderbookCommand); }
class class_name[name] begin[{] method[subscribeOrderbook, return_type[void], modifier[public], parameter[orderbookConfiguration]] begin[{] local_variable[type[SubscribeOrderbookCommand], subscribeOrderbookCommand] call[client.sendCommand, parameter[member[.subscribeOrderbookCommand]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[subscribeOrderbook] operator[SEP] Keyword[final] identifier[BitfinexOrderBookSymbol] identifier[orderbookConfiguration] operator[SEP] { Keyword[final] identifier[SubscribeOrderbookCommand] identifier[subscribeOrderbookCommand] operator[=] Keyword[new] identifier[SubscribeOrderbookCommand] operator[SEP] identifier[orderbookConfiguration] operator[SEP] operator[SEP] identifier[client] operator[SEP] identifier[sendCommand] operator[SEP] identifier[subscribeOrderbookCommand] operator[SEP] operator[SEP] }
@SafeVarargs public static double[] removeAll(final double[] a, final double... elements) { if (N.isNullOrEmpty(a)) { return N.EMPTY_DOUBLE_ARRAY; } else if (N.isNullOrEmpty(elements)) { return a.clone(); } else if (elements.length == 1) { return removeAllOccurrences(a, elements[0]); } final DoubleList list = DoubleList.of(a.clone()); list.removeAll(DoubleList.of(elements)); return list.trimToSize().array(); }
class class_name[name] begin[{] method[removeAll, return_type[type[double]], modifier[public static], parameter[a, elements]] begin[{] if[call[N.isNullOrEmpty, parameter[member[.a]]]] begin[{] return[member[N.EMPTY_DOUBLE_ARRAY]] else begin[{] if[call[N.isNullOrEmpty, parameter[member[.elements]]]] begin[{] return[call[a.clone, parameter[]]] else begin[{] if[binary_operation[member[elements.length], ==, literal[1]]] begin[{] return[call[.removeAllOccurrences, parameter[member[.a], member[.elements]]]] else begin[{] None end[}] end[}] end[}] local_variable[type[DoubleList], list] call[list.removeAll, parameter[call[DoubleList.of, parameter[member[.elements]]]]] return[call[list.trimToSize, parameter[]]] end[}] END[}]
annotation[@] identifier[SafeVarargs] Keyword[public] Keyword[static] Keyword[double] operator[SEP] operator[SEP] identifier[removeAll] operator[SEP] Keyword[final] Keyword[double] operator[SEP] operator[SEP] identifier[a] , Keyword[final] Keyword[double] operator[...] identifier[elements] operator[SEP] { Keyword[if] operator[SEP] identifier[N] operator[SEP] identifier[isNullOrEmpty] operator[SEP] identifier[a] operator[SEP] operator[SEP] { Keyword[return] identifier[N] operator[SEP] identifier[EMPTY_DOUBLE_ARRAY] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[N] operator[SEP] identifier[isNullOrEmpty] operator[SEP] identifier[elements] operator[SEP] operator[SEP] { Keyword[return] identifier[a] operator[SEP] identifier[clone] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[elements] operator[SEP] identifier[length] operator[==] Other[1] operator[SEP] { Keyword[return] identifier[removeAllOccurrences] operator[SEP] identifier[a] , identifier[elements] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[DoubleList] identifier[list] operator[=] identifier[DoubleList] operator[SEP] identifier[of] operator[SEP] identifier[a] operator[SEP] identifier[clone] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[list] operator[SEP] identifier[removeAll] operator[SEP] identifier[DoubleList] operator[SEP] identifier[of] operator[SEP] identifier[elements] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[list] operator[SEP] identifier[trimToSize] operator[SEP] operator[SEP] operator[SEP] identifier[array] operator[SEP] operator[SEP] operator[SEP] }
public CommonTree parseQuery(String queryString, QueryResolverDelegate resolverDelegate, QueryRendererDelegate rendererDelegate) throws ParsingException { IckleLexer lexer = new IckleLexer(new ANTLRStringStream(queryString)); CommonTokenStream tokens = new CommonTokenStream(lexer); IckleParser parser = new IckleParser(tokens); try { // parser.statement() is the entry point for evaluation of any kind of statement IckleParser.statement_return r = parser.statement(); if (parser.hasErrors()) { throw log.getQuerySyntaxException(queryString, parser.getErrorMessages()); } CommonTree tree = (CommonTree) r.getTree(); tree = resolve(tokens, tree, resolverDelegate); tree = render(tokens, tree, rendererDelegate); return tree; } catch (RecognitionException e) { throw log.getQuerySyntaxException(queryString, e); } }
class class_name[name] begin[{] method[parseQuery, return_type[type[CommonTree]], modifier[public], parameter[queryString, resolverDelegate, rendererDelegate]] begin[{] local_variable[type[IckleLexer], lexer] local_variable[type[CommonTokenStream], tokens] local_variable[type[IckleParser], parser] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=statement, postfix_operators=[], prefix_operators=[], qualifier=parser, selectors=[], type_arguments=None), name=r)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=IckleParser, sub_type=ReferenceType(arguments=None, dimensions=None, name=statement_return, sub_type=None))), IfStatement(condition=MethodInvocation(arguments=[], member=hasErrors, postfix_operators=[], prefix_operators=[], qualifier=parser, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=queryString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getErrorMessages, postfix_operators=[], prefix_operators=[], qualifier=parser, selectors=[], type_arguments=None)], member=getQuerySyntaxException, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=getTree, postfix_operators=[], prefix_operators=[], qualifier=r, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=CommonTree, sub_type=None)), name=tree)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CommonTree, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=tree, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=tokens, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tree, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=resolverDelegate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=resolve, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=tree, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=tokens, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tree, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=rendererDelegate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=render, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), ReturnStatement(expression=MemberReference(member=tree, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=queryString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getQuerySyntaxException, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['RecognitionException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] identifier[CommonTree] identifier[parseQuery] operator[SEP] identifier[String] identifier[queryString] , identifier[QueryResolverDelegate] identifier[resolverDelegate] , identifier[QueryRendererDelegate] identifier[rendererDelegate] operator[SEP] Keyword[throws] identifier[ParsingException] { identifier[IckleLexer] identifier[lexer] operator[=] Keyword[new] identifier[IckleLexer] operator[SEP] Keyword[new] identifier[ANTLRStringStream] operator[SEP] identifier[queryString] operator[SEP] operator[SEP] operator[SEP] identifier[CommonTokenStream] identifier[tokens] operator[=] Keyword[new] identifier[CommonTokenStream] operator[SEP] identifier[lexer] operator[SEP] operator[SEP] identifier[IckleParser] identifier[parser] operator[=] Keyword[new] identifier[IckleParser] operator[SEP] identifier[tokens] operator[SEP] operator[SEP] Keyword[try] { identifier[IckleParser] operator[SEP] identifier[statement_return] identifier[r] operator[=] identifier[parser] operator[SEP] identifier[statement] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[parser] operator[SEP] identifier[hasErrors] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] identifier[log] operator[SEP] identifier[getQuerySyntaxException] operator[SEP] identifier[queryString] , identifier[parser] operator[SEP] identifier[getErrorMessages] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[CommonTree] identifier[tree] operator[=] operator[SEP] identifier[CommonTree] operator[SEP] identifier[r] operator[SEP] identifier[getTree] operator[SEP] operator[SEP] operator[SEP] identifier[tree] operator[=] identifier[resolve] operator[SEP] identifier[tokens] , identifier[tree] , identifier[resolverDelegate] operator[SEP] operator[SEP] identifier[tree] operator[=] identifier[render] operator[SEP] identifier[tokens] , identifier[tree] , identifier[rendererDelegate] operator[SEP] operator[SEP] Keyword[return] identifier[tree] operator[SEP] } Keyword[catch] operator[SEP] identifier[RecognitionException] identifier[e] operator[SEP] { Keyword[throw] identifier[log] operator[SEP] identifier[getQuerySyntaxException] operator[SEP] identifier[queryString] , identifier[e] operator[SEP] operator[SEP] } }
private void uploadNewVersion(final BoxFile file) { new Thread() { @Override public void run() { try { String uploadFileName = "box_logo.png"; InputStream uploadStream = getResources().getAssets().open(uploadFileName); BoxRequestsFile.UploadNewVersion request = mFileApi.getUploadNewVersionRequest(uploadStream, file.getId()); final BoxFile uploadFileVersionInfo = request.send(); showToast("Uploaded new version of " + uploadFileVersionInfo.getName()); } catch (IOException e) { e.printStackTrace(); } catch (BoxException e) { e.printStackTrace(); showToast("Upload failed"); } finally { mDialog.dismiss(); } } }.start(); }
class class_name[name] begin[{] method[uploadNewVersion, return_type[void], modifier[private], parameter[file]] begin[{] ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="box_logo.png"), name=uploadFileName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getResources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getAssets, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=uploadFileName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=open, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=uploadStream)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=uploadStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[], type_arguments=None)], member=getUploadNewVersionRequest, postfix_operators=[], prefix_operators=[], qualifier=mFileApi, selectors=[], type_arguments=None), name=request)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BoxRequestsFile, sub_type=ReferenceType(arguments=None, dimensions=None, name=UploadNewVersion, sub_type=None))), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=send, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[], type_arguments=None), name=uploadFileVersionInfo)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=BoxFile, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Uploaded new version of "), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=uploadFileVersionInfo, selectors=[], type_arguments=None), operator=+)], member=showToast, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Upload failed")], member=showToast, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['BoxException']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=dismiss, postfix_operators=[], prefix_operators=[], qualifier=mDialog, selectors=[], type_arguments=None), label=None)], label=None, resources=None)], documentation=None, modifiers={'public'}, name=run, parameters=[], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=start, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Thread, sub_type=None)) end[}] END[}]
Keyword[private] Keyword[void] identifier[uploadNewVersion] operator[SEP] Keyword[final] identifier[BoxFile] identifier[file] operator[SEP] { Keyword[new] identifier[Thread] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] { Keyword[try] { identifier[String] identifier[uploadFileName] operator[=] literal[String] operator[SEP] identifier[InputStream] identifier[uploadStream] operator[=] identifier[getResources] operator[SEP] operator[SEP] operator[SEP] identifier[getAssets] operator[SEP] operator[SEP] operator[SEP] identifier[open] operator[SEP] identifier[uploadFileName] operator[SEP] operator[SEP] identifier[BoxRequestsFile] operator[SEP] identifier[UploadNewVersion] identifier[request] operator[=] identifier[mFileApi] operator[SEP] identifier[getUploadNewVersionRequest] operator[SEP] identifier[uploadStream] , identifier[file] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[BoxFile] identifier[uploadFileVersionInfo] operator[=] identifier[request] operator[SEP] identifier[send] operator[SEP] operator[SEP] operator[SEP] identifier[showToast] operator[SEP] literal[String] operator[+] identifier[uploadFileVersionInfo] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[e] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[BoxException] identifier[e] operator[SEP] { identifier[e] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] identifier[showToast] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[finally] { identifier[mDialog] operator[SEP] identifier[dismiss] operator[SEP] operator[SEP] operator[SEP] } } } operator[SEP] identifier[start] operator[SEP] operator[SEP] operator[SEP] }
public SourceReportModel getSourceReportForFileModel(FileModel fileModel) { GraphTraversal<Vertex, Vertex> pipeline = new GraphTraversalSource(getGraphContext().getGraph()).V(fileModel.getElement()); pipeline.in(SourceReportModel.SOURCE_REPORT_TO_SOURCE_FILE_MODEL); SourceReportModel result = null; if (pipeline.hasNext()) { result = frame(pipeline.next()); } return result; }
class class_name[name] begin[{] method[getSourceReportForFileModel, return_type[type[SourceReportModel]], modifier[public], parameter[fileModel]] begin[{] local_variable[type[GraphTraversal], pipeline] call[pipeline.in, parameter[member[SourceReportModel.SOURCE_REPORT_TO_SOURCE_FILE_MODEL]]] local_variable[type[SourceReportModel], result] if[call[pipeline.hasNext, parameter[]]] begin[{] assign[member[.result], call[.frame, parameter[call[pipeline.next, parameter[]]]]] else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] identifier[SourceReportModel] identifier[getSourceReportForFileModel] operator[SEP] identifier[FileModel] identifier[fileModel] operator[SEP] { identifier[GraphTraversal] operator[<] identifier[Vertex] , identifier[Vertex] operator[>] identifier[pipeline] operator[=] Keyword[new] identifier[GraphTraversalSource] operator[SEP] identifier[getGraphContext] operator[SEP] operator[SEP] operator[SEP] identifier[getGraph] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[V] operator[SEP] identifier[fileModel] operator[SEP] identifier[getElement] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[pipeline] operator[SEP] identifier[in] operator[SEP] identifier[SourceReportModel] operator[SEP] identifier[SOURCE_REPORT_TO_SOURCE_FILE_MODEL] operator[SEP] operator[SEP] identifier[SourceReportModel] identifier[result] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[pipeline] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[result] operator[=] identifier[frame] operator[SEP] identifier[pipeline] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
public void marshall(ProvisionedProductPlanSummary provisionedProductPlanSummary, ProtocolMarshaller protocolMarshaller) { if (provisionedProductPlanSummary == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(provisionedProductPlanSummary.getPlanName(), PLANNAME_BINDING); protocolMarshaller.marshall(provisionedProductPlanSummary.getPlanId(), PLANID_BINDING); protocolMarshaller.marshall(provisionedProductPlanSummary.getProvisionProductId(), PROVISIONPRODUCTID_BINDING); protocolMarshaller.marshall(provisionedProductPlanSummary.getProvisionProductName(), PROVISIONPRODUCTNAME_BINDING); protocolMarshaller.marshall(provisionedProductPlanSummary.getPlanType(), PLANTYPE_BINDING); protocolMarshaller.marshall(provisionedProductPlanSummary.getProvisioningArtifactId(), PROVISIONINGARTIFACTID_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[provisionedProductPlanSummary, protocolMarshaller]] begin[{] if[binary_operation[member[.provisionedProductPlanSummary], ==, 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=getPlanName, postfix_operators=[], prefix_operators=[], qualifier=provisionedProductPlanSummary, selectors=[], type_arguments=None), MemberReference(member=PLANNAME_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=getPlanId, postfix_operators=[], prefix_operators=[], qualifier=provisionedProductPlanSummary, selectors=[], type_arguments=None), MemberReference(member=PLANID_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=getProvisionProductId, postfix_operators=[], prefix_operators=[], qualifier=provisionedProductPlanSummary, selectors=[], type_arguments=None), MemberReference(member=PROVISIONPRODUCTID_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=getProvisionProductName, postfix_operators=[], prefix_operators=[], qualifier=provisionedProductPlanSummary, selectors=[], type_arguments=None), MemberReference(member=PROVISIONPRODUCTNAME_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=getPlanType, postfix_operators=[], prefix_operators=[], qualifier=provisionedProductPlanSummary, selectors=[], type_arguments=None), MemberReference(member=PLANTYPE_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=getProvisioningArtifactId, postfix_operators=[], prefix_operators=[], qualifier=provisionedProductPlanSummary, selectors=[], type_arguments=None), MemberReference(member=PROVISIONINGARTIFACTID_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[ProvisionedProductPlanSummary] identifier[provisionedProductPlanSummary] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[provisionedProductPlanSummary] 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[provisionedProductPlanSummary] operator[SEP] identifier[getPlanName] operator[SEP] operator[SEP] , identifier[PLANNAME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[provisionedProductPlanSummary] operator[SEP] identifier[getPlanId] operator[SEP] operator[SEP] , identifier[PLANID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[provisionedProductPlanSummary] operator[SEP] identifier[getProvisionProductId] operator[SEP] operator[SEP] , identifier[PROVISIONPRODUCTID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[provisionedProductPlanSummary] operator[SEP] identifier[getProvisionProductName] operator[SEP] operator[SEP] , identifier[PROVISIONPRODUCTNAME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[provisionedProductPlanSummary] operator[SEP] identifier[getPlanType] operator[SEP] operator[SEP] , identifier[PLANTYPE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[provisionedProductPlanSummary] operator[SEP] identifier[getProvisioningArtifactId] operator[SEP] operator[SEP] , identifier[PROVISIONINGARTIFACTID_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 static void generate(ConfigurationImpl configuration) throws DocFileIOException { DocPath filename = DocPaths.overviewSummary(configuration.frames); ModuleIndexWriter mdlgen = new ModuleIndexWriter(configuration, filename); mdlgen.buildModuleIndexFile("doclet.Window_Overview_Summary", true); }
class class_name[name] begin[{] method[generate, return_type[void], modifier[public static], parameter[configuration]] begin[{] local_variable[type[DocPath], filename] local_variable[type[ModuleIndexWriter], mdlgen] call[mdlgen.buildModuleIndexFile, parameter[literal["doclet.Window_Overview_Summary"], literal[true]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[generate] operator[SEP] identifier[ConfigurationImpl] identifier[configuration] operator[SEP] Keyword[throws] identifier[DocFileIOException] { identifier[DocPath] identifier[filename] operator[=] identifier[DocPaths] operator[SEP] identifier[overviewSummary] operator[SEP] identifier[configuration] operator[SEP] identifier[frames] operator[SEP] operator[SEP] identifier[ModuleIndexWriter] identifier[mdlgen] operator[=] Keyword[new] identifier[ModuleIndexWriter] operator[SEP] identifier[configuration] , identifier[filename] operator[SEP] operator[SEP] identifier[mdlgen] operator[SEP] identifier[buildModuleIndexFile] operator[SEP] literal[String] , literal[boolean] operator[SEP] operator[SEP] }
@Override public TimerService getTimerService() throws IllegalStateException { IllegalStateException ise; // Not an allowed method for Stateful beans per EJB Specification. ise = new IllegalStateException("StatefulBean: getTimerService not " + "allowed from Stateful Session Bean"); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "getTimerService: " + ise); throw ise; }
class class_name[name] begin[{] method[getTimerService, return_type[type[TimerService]], modifier[public], parameter[]] begin[{] local_variable[type[IllegalStateException], ise] assign[member[.ise], ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="StatefulBean: getTimerService not "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="allowed from Stateful Session Bean"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None))] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[literal["getTimerService: "], +, member[.ise]]]] else begin[{] None end[}] ThrowStatement(expression=MemberReference(member=ise, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[TimerService] identifier[getTimerService] operator[SEP] operator[SEP] Keyword[throws] identifier[IllegalStateException] { identifier[IllegalStateException] identifier[ise] operator[SEP] identifier[ise] operator[=] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] 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[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[ise] operator[SEP] operator[SEP] Keyword[throw] identifier[ise] operator[SEP] }
public final Boolean evaluateBoolean( Message message ) throws JMSException { Object value = evaluate(message); if (value == null) return null; if (value instanceof Boolean) return (Boolean)value; throw new FFMQException("Expected a boolean but got : "+value.toString(),"INVALID_SELECTOR_EXPRESSION"); }
class class_name[name] begin[{] method[evaluateBoolean, return_type[type[Boolean]], modifier[final public], parameter[message]] begin[{] local_variable[type[Object], value] if[binary_operation[member[.value], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] if[binary_operation[member[.value], instanceof, type[Boolean]]] begin[{] return[Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Boolean, sub_type=None))] else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Expected a boolean but got : "), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), operator=+), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="INVALID_SELECTOR_EXPRESSION")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FFMQException, sub_type=None)), label=None) end[}] END[}]
Keyword[public] Keyword[final] identifier[Boolean] identifier[evaluateBoolean] operator[SEP] identifier[Message] identifier[message] operator[SEP] Keyword[throws] identifier[JMSException] { identifier[Object] identifier[value] operator[=] identifier[evaluate] operator[SEP] identifier[message] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[Boolean] operator[SEP] Keyword[return] operator[SEP] identifier[Boolean] operator[SEP] identifier[value] operator[SEP] Keyword[throw] Keyword[new] identifier[FFMQException] operator[SEP] literal[String] operator[+] identifier[value] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] }
public SourceSnippet createFieldInjection(final FieldLiteral<?> field, final String injecteeName, NameGenerator nameGenerator, List<InjectorMethod> methodsOutput) throws NoSourceNameException { final boolean hasInjectee = injecteeName != null; final boolean useNativeMethod = field.isPrivate() || ReflectUtil.isPrivate(field.getDeclaringType()) || field.isLegacyFinalField(); // Determine method signature parts. final String injecteeTypeName = ReflectUtil.getSourceName(field.getRawDeclaringType()); String fieldTypeName = ReflectUtil.getSourceName(field.getFieldType()); String methodBaseName = nameGenerator.convertToValidMemberName(injecteeTypeName + "_" + field.getName() + "_fieldInjection"); final String methodName = nameGenerator.createMethodName(methodBaseName); // Field injections are performed in the package of the class declaring the // field. Any private types referenced by the injection must be visible // from there. final String packageName = ReflectUtil.getUserPackageName(field.getDeclaringType()); String signatureParams = fieldTypeName + " value"; boolean isLongAcccess = field.getFieldType().getRawType().equals(Long.TYPE); if (hasInjectee) { signatureParams = injecteeTypeName + " injectee, " + signatureParams; } // Compose method implementation and invocation. String annotation; if (isLongAcccess) { annotation = "@com.google.gwt.core.client.UnsafeNativeLong "; } else { annotation = ""; } String header = useNativeMethod ? "public native " : "public "; String signature = annotation + header + "void " + methodName + "(" + signatureParams + ")"; InjectorMethod injectionMethod = new AbstractInjectorMethod(useNativeMethod, signature, packageName) { public String getMethodBody(InjectorWriteContext writeContext) throws NoSourceNameException { if (!useNativeMethod) { return (hasInjectee ? "injectee." : injecteeTypeName + ".") + field.getName() + " = value;"; } else { return (hasInjectee ? "injectee." : "") + getJsniSignature(field) + " = value;"; } } }; methodsOutput.add(injectionMethod); return new SourceSnippet() { public String getSource(InjectorWriteContext writeContext) { List<String> callParams = new ArrayList<String>(); if (hasInjectee) { callParams.add(injecteeName); } callParams.add(writeContext.callGetter(guiceUtil.getKey(field))); return writeContext.callMethod(methodName, packageName, callParams) + ";\n"; } }; }
class class_name[name] begin[{] method[createFieldInjection, return_type[type[SourceSnippet]], modifier[public], parameter[field, injecteeName, nameGenerator, methodsOutput]] begin[{] local_variable[type[boolean], hasInjectee] local_variable[type[boolean], useNativeMethod] local_variable[type[String], injecteeTypeName] local_variable[type[String], fieldTypeName] local_variable[type[String], methodBaseName] local_variable[type[String], methodName] local_variable[type[String], packageName] local_variable[type[String], signatureParams] local_variable[type[boolean], isLongAcccess] if[member[.hasInjectee]] begin[{] assign[member[.signatureParams], binary_operation[binary_operation[member[.injecteeTypeName], +, literal[" injectee, "]], +, member[.signatureParams]]] else begin[{] None end[}] local_variable[type[String], annotation] if[member[.isLongAcccess]] begin[{] assign[member[.annotation], literal["@com.google.gwt.core.client.UnsafeNativeLong "]] else begin[{] assign[member[.annotation], literal[""]] end[}] local_variable[type[String], header] local_variable[type[String], signature] local_variable[type[InjectorMethod], injectionMethod] call[methodsOutput.add, parameter[member[.injectionMethod]]] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[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=String, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None)), name=callParams)], 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=MemberReference(member=hasInjectee, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=injecteeName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=callParams, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=guiceUtil, selectors=[], type_arguments=None)], member=callGetter, postfix_operators=[], prefix_operators=[], qualifier=writeContext, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=callParams, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=methodName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=packageName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=callParams, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=callMethod, postfix_operators=[], prefix_operators=[], qualifier=writeContext, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=";\n"), operator=+), label=None)], documentation=None, modifiers={'public'}, name=getSource, parameters=[FormalParameter(annotations=[], modifiers=set(), name=writeContext, type=ReferenceType(arguments=None, dimensions=[], name=InjectorWriteContext, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=None, dimensions=[], name=String, sub_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=SourceSnippet, sub_type=None))] end[}] END[}]
Keyword[public] identifier[SourceSnippet] identifier[createFieldInjection] operator[SEP] Keyword[final] identifier[FieldLiteral] operator[<] operator[?] operator[>] identifier[field] , Keyword[final] identifier[String] identifier[injecteeName] , identifier[NameGenerator] identifier[nameGenerator] , identifier[List] operator[<] identifier[InjectorMethod] operator[>] identifier[methodsOutput] operator[SEP] Keyword[throws] identifier[NoSourceNameException] { Keyword[final] Keyword[boolean] identifier[hasInjectee] operator[=] identifier[injecteeName] operator[!=] Other[null] operator[SEP] Keyword[final] Keyword[boolean] identifier[useNativeMethod] operator[=] identifier[field] operator[SEP] identifier[isPrivate] operator[SEP] operator[SEP] operator[||] identifier[ReflectUtil] operator[SEP] identifier[isPrivate] operator[SEP] identifier[field] operator[SEP] identifier[getDeclaringType] operator[SEP] operator[SEP] operator[SEP] operator[||] identifier[field] operator[SEP] identifier[isLegacyFinalField] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[injecteeTypeName] operator[=] identifier[ReflectUtil] operator[SEP] identifier[getSourceName] operator[SEP] identifier[field] operator[SEP] identifier[getRawDeclaringType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[fieldTypeName] operator[=] identifier[ReflectUtil] operator[SEP] identifier[getSourceName] operator[SEP] identifier[field] operator[SEP] identifier[getFieldType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[methodBaseName] operator[=] identifier[nameGenerator] operator[SEP] identifier[convertToValidMemberName] operator[SEP] identifier[injecteeTypeName] operator[+] literal[String] operator[+] identifier[field] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[methodName] operator[=] identifier[nameGenerator] operator[SEP] identifier[createMethodName] operator[SEP] identifier[methodBaseName] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[packageName] operator[=] identifier[ReflectUtil] operator[SEP] identifier[getUserPackageName] operator[SEP] identifier[field] operator[SEP] identifier[getDeclaringType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[signatureParams] operator[=] identifier[fieldTypeName] operator[+] literal[String] operator[SEP] Keyword[boolean] identifier[isLongAcccess] operator[=] identifier[field] operator[SEP] identifier[getFieldType] operator[SEP] operator[SEP] operator[SEP] identifier[getRawType] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[Long] operator[SEP] identifier[TYPE] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[hasInjectee] operator[SEP] { identifier[signatureParams] operator[=] identifier[injecteeTypeName] operator[+] literal[String] operator[+] identifier[signatureParams] operator[SEP] } identifier[String] identifier[annotation] operator[SEP] Keyword[if] operator[SEP] identifier[isLongAcccess] operator[SEP] { identifier[annotation] operator[=] literal[String] operator[SEP] } Keyword[else] { identifier[annotation] operator[=] literal[String] operator[SEP] } identifier[String] identifier[header] operator[=] identifier[useNativeMethod] operator[?] literal[String] operator[:] literal[String] operator[SEP] identifier[String] identifier[signature] operator[=] identifier[annotation] operator[+] identifier[header] operator[+] literal[String] operator[+] identifier[methodName] operator[+] literal[String] operator[+] identifier[signatureParams] operator[+] literal[String] operator[SEP] identifier[InjectorMethod] identifier[injectionMethod] operator[=] Keyword[new] identifier[AbstractInjectorMethod] operator[SEP] identifier[useNativeMethod] , identifier[signature] , identifier[packageName] operator[SEP] { Keyword[public] identifier[String] identifier[getMethodBody] operator[SEP] identifier[InjectorWriteContext] identifier[writeContext] operator[SEP] Keyword[throws] identifier[NoSourceNameException] { Keyword[if] operator[SEP] operator[!] identifier[useNativeMethod] operator[SEP] { Keyword[return] operator[SEP] identifier[hasInjectee] operator[?] literal[String] operator[:] identifier[injecteeTypeName] operator[+] literal[String] operator[SEP] operator[+] identifier[field] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] } Keyword[else] { Keyword[return] operator[SEP] identifier[hasInjectee] operator[?] literal[String] operator[:] literal[String] operator[SEP] operator[+] identifier[getJsniSignature] operator[SEP] identifier[field] operator[SEP] operator[+] literal[String] operator[SEP] } } } operator[SEP] identifier[methodsOutput] operator[SEP] identifier[add] operator[SEP] identifier[injectionMethod] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[SourceSnippet] operator[SEP] operator[SEP] { Keyword[public] identifier[String] identifier[getSource] operator[SEP] identifier[InjectorWriteContext] identifier[writeContext] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[callParams] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[hasInjectee] operator[SEP] { identifier[callParams] operator[SEP] identifier[add] operator[SEP] identifier[injecteeName] operator[SEP] operator[SEP] } identifier[callParams] operator[SEP] identifier[add] operator[SEP] identifier[writeContext] operator[SEP] identifier[callGetter] operator[SEP] identifier[guiceUtil] operator[SEP] identifier[getKey] operator[SEP] identifier[field] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[writeContext] operator[SEP] identifier[callMethod] operator[SEP] identifier[methodName] , identifier[packageName] , identifier[callParams] operator[SEP] operator[+] literal[String] operator[SEP] } } operator[SEP] }
public IconType<WebFragmentDescriptor> getOrCreateIcon() { List<Node> nodeList = model.get("icon"); if (nodeList != null && nodeList.size() > 0) { return new IconTypeImpl<WebFragmentDescriptor>(this, "icon", model, nodeList.get(0)); } return createIcon(); }
class class_name[name] begin[{] method[getOrCreateIcon, return_type[type[IconType]], modifier[public], parameter[]] begin[{] local_variable[type[List], nodeList] if[binary_operation[binary_operation[member[.nodeList], !=, literal[null]], &&, binary_operation[call[nodeList.size, parameter[]], >, literal[0]]]] begin[{] return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="icon"), MemberReference(member=model, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=nodeList, selectors=[], type_arguments=None)], 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=WebFragmentDescriptor, sub_type=None))], dimensions=None, name=IconTypeImpl, sub_type=None))] else begin[{] None end[}] return[call[.createIcon, parameter[]]] end[}] END[}]
Keyword[public] identifier[IconType] operator[<] identifier[WebFragmentDescriptor] operator[>] identifier[getOrCreateIcon] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[Node] operator[>] identifier[nodeList] operator[=] identifier[model] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[nodeList] operator[!=] Other[null] operator[&&] identifier[nodeList] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { Keyword[return] Keyword[new] identifier[IconTypeImpl] operator[<] identifier[WebFragmentDescriptor] operator[>] operator[SEP] Keyword[this] , literal[String] , identifier[model] , identifier[nodeList] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[createIcon] operator[SEP] operator[SEP] operator[SEP] }
private List<String> createRoles(HttpConstraintElement httpConstraint) { String[] rolesFromAnno = httpConstraint.getRolesAllowed(); List<String> roles = new ArrayList<String>(); for (int i = 0; i < rolesFromAnno.length; i++) { roles.add(rolesFromAnno[i]); } return roles; }
class class_name[name] begin[{] method[createRoles, return_type[type[List]], modifier[private], parameter[httpConstraint]] begin[{] local_variable[type[String], rolesFromAnno] local_variable[type[List], roles] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=rolesFromAnno, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=add, postfix_operators=[], prefix_operators=[], qualifier=roles, selectors=[], type_arguments=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=rolesFromAnno, 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[.roles]] end[}] END[}]
Keyword[private] identifier[List] operator[<] identifier[String] operator[>] identifier[createRoles] operator[SEP] identifier[HttpConstraintElement] identifier[httpConstraint] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[rolesFromAnno] operator[=] identifier[httpConstraint] operator[SEP] identifier[getRolesAllowed] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[roles] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[rolesFromAnno] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[roles] operator[SEP] identifier[add] operator[SEP] identifier[rolesFromAnno] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[roles] operator[SEP] }
public void setPartOfSpeech(String v) { if (Token_Type.featOkTst && ((Token_Type)jcasType).casFeat_partOfSpeech == null) jcasType.jcas.throwFeatMissing("partOfSpeech", "edu.cmu.lti.oaqa.type.nlp.Token"); jcasType.ll_cas.ll_setStringValue(addr, ((Token_Type)jcasType).casFeatCode_partOfSpeech, v);}
class class_name[name] begin[{] method[setPartOfSpeech, return_type[void], modifier[public], parameter[v]] begin[{] if[binary_operation[member[Token_Type.featOkTst], &&, binary_operation[Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Token_Type, sub_type=None)), ==, literal[null]]]] begin[{] call[jcasType.jcas.throwFeatMissing, parameter[literal["partOfSpeech"], literal["edu.cmu.lti.oaqa.type.nlp.Token"]]] else begin[{] None end[}] call[jcasType.ll_cas.ll_setStringValue, parameter[member[.addr], Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Token_Type, sub_type=None)), member[.v]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setPartOfSpeech] operator[SEP] identifier[String] identifier[v] operator[SEP] { Keyword[if] operator[SEP] identifier[Token_Type] operator[SEP] identifier[featOkTst] operator[&&] operator[SEP] operator[SEP] identifier[Token_Type] operator[SEP] identifier[jcasType] operator[SEP] operator[SEP] identifier[casFeat_partOfSpeech] operator[==] Other[null] operator[SEP] identifier[jcasType] operator[SEP] identifier[jcas] operator[SEP] identifier[throwFeatMissing] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[jcasType] operator[SEP] identifier[ll_cas] operator[SEP] identifier[ll_setStringValue] operator[SEP] identifier[addr] , operator[SEP] operator[SEP] identifier[Token_Type] operator[SEP] identifier[jcasType] operator[SEP] operator[SEP] identifier[casFeatCode_partOfSpeech] , identifier[v] operator[SEP] operator[SEP] }
public void setSearchBarTitle(CharSequence title) { this.mTitleText = title.toString(); mIsTitleSet = true; mSearchInput.setText(title); }
class class_name[name] begin[{] method[setSearchBarTitle, return_type[void], modifier[public], parameter[title]] begin[{] assign[THIS[member[None.mTitleText]], call[title.toString, parameter[]]] assign[member[.mIsTitleSet], literal[true]] call[mSearchInput.setText, parameter[member[.title]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setSearchBarTitle] operator[SEP] identifier[CharSequence] identifier[title] operator[SEP] { Keyword[this] operator[SEP] identifier[mTitleText] operator[=] identifier[title] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[mIsTitleSet] operator[=] literal[boolean] operator[SEP] identifier[mSearchInput] operator[SEP] identifier[setText] operator[SEP] identifier[title] operator[SEP] operator[SEP] }
public double getKurtosis() { double kurtosis = NaN; if (_n > 3L) { final double var = _m2.value()/(_n - 1); if (_n <= 3L || var < 10E-20) { kurtosis = 0.0; } else { kurtosis = (_n*(_n + 1.0)*_m4.value() - 3.0*_m2.value()*_m2.value()*(_n - 1.0))/ ((_n - 1.0)*(_n - 2.0)*(_n - 3.0)*var*var); } } return kurtosis; }
class class_name[name] begin[{] method[getKurtosis, return_type[type[double]], modifier[public], parameter[]] begin[{] local_variable[type[double], kurtosis] if[binary_operation[member[._n], >, literal[3L]]] begin[{] local_variable[type[double], var] if[binary_operation[binary_operation[member[._n], <=, literal[3L]], ||, binary_operation[member[.var], <, literal[10E-20]]]] begin[{] assign[member[.kurtosis], literal[0.0]] else begin[{] assign[member[.kurtosis], binary_operation[binary_operation[binary_operation[binary_operation[member[._n], *, binary_operation[member[._n], +, literal[1.0]]], *, call[_m4.value, parameter[]]], -, binary_operation[binary_operation[binary_operation[literal[3.0], *, call[_m2.value, parameter[]]], *, call[_m2.value, parameter[]]], *, binary_operation[member[._n], -, literal[1.0]]]], /, binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[member[._n], -, literal[1.0]], *, binary_operation[member[._n], -, literal[2.0]]], *, binary_operation[member[._n], -, literal[3.0]]], *, member[.var]], *, member[.var]]]] end[}] else begin[{] None end[}] return[member[.kurtosis]] end[}] END[}]
Keyword[public] Keyword[double] identifier[getKurtosis] operator[SEP] operator[SEP] { Keyword[double] identifier[kurtosis] operator[=] identifier[NaN] operator[SEP] Keyword[if] operator[SEP] identifier[_n] operator[>] Other[3L] operator[SEP] { Keyword[final] Keyword[double] identifier[var] operator[=] identifier[_m2] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[/] operator[SEP] identifier[_n] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[_n] operator[<=] Other[3L] operator[||] identifier[var] operator[<] literal[Float] operator[SEP] { identifier[kurtosis] operator[=] literal[Float] operator[SEP] } Keyword[else] { identifier[kurtosis] operator[=] operator[SEP] identifier[_n] operator[*] operator[SEP] identifier[_n] operator[+] literal[Float] operator[SEP] operator[*] identifier[_m4] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[-] literal[Float] operator[*] identifier[_m2] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[*] identifier[_m2] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[*] operator[SEP] identifier[_n] operator[-] literal[Float] operator[SEP] operator[SEP] operator[/] operator[SEP] operator[SEP] identifier[_n] operator[-] literal[Float] operator[SEP] operator[*] operator[SEP] identifier[_n] operator[-] literal[Float] operator[SEP] operator[*] operator[SEP] identifier[_n] operator[-] literal[Float] operator[SEP] operator[*] identifier[var] operator[*] identifier[var] operator[SEP] operator[SEP] } } Keyword[return] identifier[kurtosis] operator[SEP] }
public void close() { forwardEngine.close(); if (forwardEngine != reverseEngine) reverseEngine.close(); Iterator<Map.Entry<Long, SRTCPCryptoContext>> iter = contexts.entrySet().iterator(); while (iter.hasNext()) { Map.Entry<Long, SRTCPCryptoContext> entry = iter.next(); SRTCPCryptoContext context = entry.getValue(); iter.remove(); if (context != null) context.close(); } }
class class_name[name] begin[{] method[close, return_type[void], modifier[public], parameter[]] begin[{] call[forwardEngine.close, parameter[]] if[binary_operation[member[.forwardEngine], !=, member[.reverseEngine]]] begin[{] call[reverseEngine.close, parameter[]] else begin[{] None end[}] local_variable[type[Iterator], iter] while[call[iter.hasNext, parameter[]]] begin[{] local_variable[type[Map], entry] local_variable[type[SRTCPCryptoContext], context] call[iter.remove, parameter[]] if[binary_operation[member[.context], !=, literal[null]]] begin[{] call[context.close, parameter[]] else begin[{] None end[}] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] { identifier[forwardEngine] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[forwardEngine] operator[!=] identifier[reverseEngine] operator[SEP] identifier[reverseEngine] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[Iterator] operator[<] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[Long] , identifier[SRTCPCryptoContext] operator[>] operator[>] identifier[iter] operator[=] identifier[contexts] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[iter] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[Long] , identifier[SRTCPCryptoContext] operator[>] identifier[entry] operator[=] identifier[iter] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[SRTCPCryptoContext] identifier[context] operator[=] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[iter] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[context] operator[!=] Other[null] operator[SEP] identifier[context] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } }
protected void appendFieldJSON(StringBuilder jsonTemplate, String type, String name, String id, String jsType) { jsonTemplate .append("'") .append(name) .append("' : ") .append(jsType) .append(appendExtractionExpression(type, name, id, jsType)) .append(")") .append(","); }
class class_name[name] begin[{] method[appendFieldJSON, return_type[void], modifier[protected], parameter[jsonTemplate, type, name, id, jsType]] begin[{] call[jsonTemplate.append, parameter[literal["'"]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[appendFieldJSON] operator[SEP] identifier[StringBuilder] identifier[jsonTemplate] , identifier[String] identifier[type] , identifier[String] identifier[name] , identifier[String] identifier[id] , identifier[String] identifier[jsType] operator[SEP] { identifier[jsonTemplate] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[jsType] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[appendExtractionExpression] operator[SEP] identifier[type] , identifier[name] , identifier[id] , identifier[jsType] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] }
private static List<String> extractClassNames(String jarName) throws IOException { List<String> classes = new LinkedList<String>(); ZipInputStream orig = new ZipInputStream(new FileInputStream(jarName)); for (ZipEntry entry = orig.getNextEntry(); entry != null; entry = orig.getNextEntry()) { String fullName = entry.getName().replaceAll("/", ".").replace(".class", ""); classes.add(fullName); } orig.close(); return classes; }
class class_name[name] begin[{] method[extractClassNames, return_type[type[List]], modifier[private static], parameter[jarName]] begin[{] local_variable[type[List], classes] local_variable[type[ZipInputStream], orig] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".")], member=replaceAll, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".class"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=replace, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=fullName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=fullName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=classes, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=entry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=getNextEntry, postfix_operators=[], prefix_operators=[], qualifier=orig, selectors=[], type_arguments=None), name=entry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ZipEntry, sub_type=None)), update=[Assignment(expressionl=MemberReference(member=entry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getNextEntry, postfix_operators=[], prefix_operators=[], qualifier=orig, selectors=[], type_arguments=None))]), label=None) call[orig.close, parameter[]] return[member[.classes]] end[}] END[}]
Keyword[private] Keyword[static] identifier[List] operator[<] identifier[String] operator[>] identifier[extractClassNames] operator[SEP] identifier[String] identifier[jarName] operator[SEP] Keyword[throws] identifier[IOException] { identifier[List] operator[<] identifier[String] operator[>] identifier[classes] operator[=] Keyword[new] identifier[LinkedList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[ZipInputStream] identifier[orig] operator[=] Keyword[new] identifier[ZipInputStream] operator[SEP] Keyword[new] identifier[FileInputStream] operator[SEP] identifier[jarName] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ZipEntry] identifier[entry] operator[=] identifier[orig] operator[SEP] identifier[getNextEntry] operator[SEP] operator[SEP] operator[SEP] identifier[entry] operator[!=] Other[null] operator[SEP] identifier[entry] operator[=] identifier[orig] operator[SEP] identifier[getNextEntry] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[fullName] operator[=] identifier[entry] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[replaceAll] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[classes] operator[SEP] identifier[add] operator[SEP] identifier[fullName] operator[SEP] operator[SEP] } identifier[orig] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[classes] operator[SEP] }
public void marshall(ContainerDefinition containerDefinition, ProtocolMarshaller protocolMarshaller) { if (containerDefinition == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(containerDefinition.getContainerHostname(), CONTAINERHOSTNAME_BINDING); protocolMarshaller.marshall(containerDefinition.getImage(), IMAGE_BINDING); protocolMarshaller.marshall(containerDefinition.getModelDataUrl(), MODELDATAURL_BINDING); protocolMarshaller.marshall(containerDefinition.getEnvironment(), ENVIRONMENT_BINDING); protocolMarshaller.marshall(containerDefinition.getModelPackageName(), MODELPACKAGENAME_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[containerDefinition, protocolMarshaller]] begin[{] if[binary_operation[member[.containerDefinition], ==, 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=getContainerHostname, postfix_operators=[], prefix_operators=[], qualifier=containerDefinition, selectors=[], type_arguments=None), MemberReference(member=CONTAINERHOSTNAME_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=getImage, postfix_operators=[], prefix_operators=[], qualifier=containerDefinition, selectors=[], type_arguments=None), MemberReference(member=IMAGE_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=getModelDataUrl, postfix_operators=[], prefix_operators=[], qualifier=containerDefinition, selectors=[], type_arguments=None), MemberReference(member=MODELDATAURL_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=getEnvironment, postfix_operators=[], prefix_operators=[], qualifier=containerDefinition, selectors=[], type_arguments=None), MemberReference(member=ENVIRONMENT_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=getModelPackageName, postfix_operators=[], prefix_operators=[], qualifier=containerDefinition, selectors=[], type_arguments=None), MemberReference(member=MODELPACKAGENAME_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[ContainerDefinition] identifier[containerDefinition] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[containerDefinition] 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[containerDefinition] operator[SEP] identifier[getContainerHostname] operator[SEP] operator[SEP] , identifier[CONTAINERHOSTNAME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[containerDefinition] operator[SEP] identifier[getImage] operator[SEP] operator[SEP] , identifier[IMAGE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[containerDefinition] operator[SEP] identifier[getModelDataUrl] operator[SEP] operator[SEP] , identifier[MODELDATAURL_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[containerDefinition] operator[SEP] identifier[getEnvironment] operator[SEP] operator[SEP] , identifier[ENVIRONMENT_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[containerDefinition] operator[SEP] identifier[getModelPackageName] operator[SEP] operator[SEP] , identifier[MODELPACKAGENAME_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 static String normalizePath(String _path, boolean _appendFinalSeparator) { if (_path == null) { return _path; } String path = _path .replace("\\", FILE_SEPARATOR) .replace("/", FILE_SEPARATOR); if (_appendFinalSeparator && !path.endsWith(FILE_SEPARATOR)) { path += FILE_SEPARATOR; } return path; }
class class_name[name] begin[{] method[normalizePath, return_type[type[String]], modifier[public static], parameter[_path, _appendFinalSeparator]] begin[{] if[binary_operation[member[._path], ==, literal[null]]] begin[{] return[member[._path]] else begin[{] None end[}] local_variable[type[String], path] if[binary_operation[member[._appendFinalSeparator], &&, call[path.endsWith, parameter[member[.FILE_SEPARATOR]]]]] begin[{] assign[member[.path], member[.FILE_SEPARATOR]] else begin[{] None end[}] return[member[.path]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[normalizePath] operator[SEP] identifier[String] identifier[_path] , Keyword[boolean] identifier[_appendFinalSeparator] operator[SEP] { Keyword[if] operator[SEP] identifier[_path] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[_path] operator[SEP] } identifier[String] identifier[path] operator[=] identifier[_path] operator[SEP] identifier[replace] operator[SEP] literal[String] , identifier[FILE_SEPARATOR] operator[SEP] operator[SEP] identifier[replace] operator[SEP] literal[String] , identifier[FILE_SEPARATOR] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[_appendFinalSeparator] operator[&&] operator[!] identifier[path] operator[SEP] identifier[endsWith] operator[SEP] identifier[FILE_SEPARATOR] operator[SEP] operator[SEP] { identifier[path] operator[+=] identifier[FILE_SEPARATOR] operator[SEP] } Keyword[return] identifier[path] operator[SEP] }
public void foreachPartition(final Action1<PartitionState> action) { int len = partitionStates.length(); for (int i = 0; i < len; i++) { PartitionState ps = partitionStates.get(i); if (ps == null) { continue; } action.call(ps); } }
class class_name[name] begin[{] method[foreachPartition, return_type[void], modifier[public], parameter[action]] begin[{] local_variable[type[int], len] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=partitionStates, selectors=[], type_arguments=None), name=ps)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PartitionState, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ps, 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=[ContinueStatement(goto=None, label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ps, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=call, postfix_operators=[], prefix_operators=[], qualifier=action, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=len, 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)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[foreachPartition] operator[SEP] Keyword[final] identifier[Action1] operator[<] identifier[PartitionState] operator[>] identifier[action] operator[SEP] { Keyword[int] identifier[len] operator[=] identifier[partitionStates] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[len] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[PartitionState] identifier[ps] operator[=] identifier[partitionStates] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ps] operator[==] Other[null] operator[SEP] { Keyword[continue] operator[SEP] } identifier[action] operator[SEP] identifier[call] operator[SEP] identifier[ps] operator[SEP] operator[SEP] } }
@Override public List<ProposalPersonContract> getKeyPersons(ProposalDevelopmentDocumentContract pdDoc) { List<ProposalPersonContract> keyPersons = new ArrayList<>(); if (pdDoc != null) { for (ProposalPersonContract person : pdDoc.getDevelopmentProposal().getProposalPersons()) { if (person.isKeyPerson()) { keyPersons.add(person); } } } return keyPersons; }
class class_name[name] begin[{] method[getKeyPersons, return_type[type[List]], modifier[public], parameter[pdDoc]] begin[{] local_variable[type[List], keyPersons] if[binary_operation[member[.pdDoc], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isKeyPerson, postfix_operators=[], prefix_operators=[], qualifier=person, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=person, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=keyPersons, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getDevelopmentProposal, postfix_operators=[], prefix_operators=[], qualifier=pdDoc, selectors=[MethodInvocation(arguments=[], member=getProposalPersons, 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=person)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ProposalPersonContract, sub_type=None))), label=None) else begin[{] None end[}] return[member[.keyPersons]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[ProposalPersonContract] operator[>] identifier[getKeyPersons] operator[SEP] identifier[ProposalDevelopmentDocumentContract] identifier[pdDoc] operator[SEP] { identifier[List] operator[<] identifier[ProposalPersonContract] operator[>] identifier[keyPersons] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pdDoc] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[ProposalPersonContract] identifier[person] operator[:] identifier[pdDoc] operator[SEP] identifier[getDevelopmentProposal] operator[SEP] operator[SEP] operator[SEP] identifier[getProposalPersons] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[person] operator[SEP] identifier[isKeyPerson] operator[SEP] operator[SEP] operator[SEP] { identifier[keyPersons] operator[SEP] identifier[add] operator[SEP] identifier[person] operator[SEP] operator[SEP] } } } Keyword[return] identifier[keyPersons] operator[SEP] }
static int decodeDigit(byte data) { char charData = (char) data; if (charData <= 'Z' && charData >= 'A') { return charData - 'A'; } if (charData <= 'z' && charData >= 'a') { return charData - 'a' + 26; } if (charData <= '9' && charData >= '0') { return charData - '0' + 52; } switch (charData) { case '+': return 62; case '/': return 63; default: throw new IllegalArgumentException("Invalid char to decode: " + data); //$NON-NLS-1$ } }
class class_name[name] begin[{] method[decodeDigit, return_type[type[int]], modifier[static], parameter[data]] begin[{] local_variable[type[char], charData] if[binary_operation[binary_operation[member[.charData], <=, literal['Z']], &&, binary_operation[member[.charData], >=, literal['A']]]] begin[{] return[binary_operation[member[.charData], -, literal['A']]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.charData], <=, literal['z']], &&, binary_operation[member[.charData], >=, literal['a']]]] begin[{] return[binary_operation[binary_operation[member[.charData], -, literal['a']], +, literal[26]]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.charData], <=, literal['9']], &&, binary_operation[member[.charData], >=, literal['0']]]] begin[{] return[binary_operation[binary_operation[member[.charData], -, literal['0']], +, literal[52]]] else begin[{] None end[}] SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='+')], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=62), label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='/')], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=63), label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid char to decode: "), operandr=MemberReference(member=data, 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)])], expression=MemberReference(member=charData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
Keyword[static] Keyword[int] identifier[decodeDigit] operator[SEP] Keyword[byte] identifier[data] operator[SEP] { Keyword[char] identifier[charData] operator[=] operator[SEP] Keyword[char] operator[SEP] identifier[data] operator[SEP] Keyword[if] operator[SEP] identifier[charData] operator[<=] literal[String] operator[&&] identifier[charData] operator[>=] literal[String] operator[SEP] { Keyword[return] identifier[charData] operator[-] literal[String] operator[SEP] } Keyword[if] operator[SEP] identifier[charData] operator[<=] literal[String] operator[&&] identifier[charData] operator[>=] literal[String] operator[SEP] { Keyword[return] identifier[charData] operator[-] literal[String] operator[+] Other[26] operator[SEP] } Keyword[if] operator[SEP] identifier[charData] operator[<=] literal[String] operator[&&] identifier[charData] operator[>=] literal[String] operator[SEP] { Keyword[return] identifier[charData] operator[-] literal[String] operator[+] Other[52] operator[SEP] } Keyword[switch] operator[SEP] identifier[charData] operator[SEP] { Keyword[case] literal[String] operator[:] Keyword[return] Other[62] operator[SEP] Keyword[case] literal[String] operator[:] Keyword[return] Other[63] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[data] operator[SEP] operator[SEP] } }
private RequestTemplate appendQuery(String name, Iterable<String> values, CollectionFormat collectionFormat) { if (!values.iterator().hasNext()) { /* empty value, clear the existing values */ this.queries.remove(name); return this; } /* create a new query template out of the information here */ this.queries.compute(name, (key, queryTemplate) -> { if (queryTemplate == null) { return QueryTemplate.create(name, values, this.charset, collectionFormat); } else { return QueryTemplate.append(queryTemplate, values, collectionFormat); } }); return this; }
class class_name[name] begin[{] method[appendQuery, return_type[type[RequestTemplate]], modifier[private], parameter[name, values, collectionFormat]] begin[{] if[call[values.iterator, parameter[]]] begin[{] THIS[member[None.queries]call[None.remove, parameter[member[.name]]]] return[THIS[]] else begin[{] None end[}] THIS[member[None.queries]call[None.compute, parameter[member[.name], LambdaExpression(body=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=queryTemplate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=queryTemplate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=collectionFormat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=QueryTemplate, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=charset, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), MemberReference(member=collectionFormat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=create, postfix_operators=[], prefix_operators=[], qualifier=QueryTemplate, selectors=[], type_arguments=None), label=None)]))], parameters=[InferredFormalParameter(name=key), InferredFormalParameter(name=queryTemplate)])]]] return[THIS[]] end[}] END[}]
Keyword[private] identifier[RequestTemplate] identifier[appendQuery] operator[SEP] identifier[String] identifier[name] , identifier[Iterable] operator[<] identifier[String] operator[>] identifier[values] , identifier[CollectionFormat] identifier[collectionFormat] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[values] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[queries] operator[SEP] identifier[remove] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] } Keyword[this] operator[SEP] identifier[queries] operator[SEP] identifier[compute] operator[SEP] identifier[name] , operator[SEP] identifier[key] , identifier[queryTemplate] operator[SEP] operator[->] { Keyword[if] operator[SEP] identifier[queryTemplate] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[QueryTemplate] operator[SEP] identifier[create] operator[SEP] identifier[name] , identifier[values] , Keyword[this] operator[SEP] identifier[charset] , identifier[collectionFormat] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[QueryTemplate] operator[SEP] identifier[append] operator[SEP] identifier[queryTemplate] , identifier[values] , identifier[collectionFormat] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public void processInternal( double[] input, DMatrix leftPoint, DMatrix rightView) { int numRows = getNumOfOutputsM(); int numPointParam = structure.points.length*lengthPoint; int numViewParam = numParameters-numPointParam; // view + camera ((ReshapeMatrix)leftPoint).reshape(numRows,numPointParam); ((ReshapeMatrix)rightView).reshape(numRows,numViewParam); leftPoint.zero(); rightView.zero(); int observationIndex = 0; // first decode the transformation for( int viewIndex = 0; viewIndex < structure.views.length; viewIndex++ ) { SceneStructureProjective.View view = structure.views[viewIndex]; if( !view.known ) { int paramIndex = viewParameterIndexes[viewIndex]+indexFirstView; for (int i = 0; i < 12; i++) { worldToView.data[i] = input[paramIndex++]; } } else { worldToView.set(view.worldToView); } SceneObservations.View obsView = observations.views[viewIndex]; for (int i = 0; i < obsView.size(); i++) { int featureIndex = obsView.point.get(i); int columnOfPointInJac = featureIndex*lengthPoint; worldPt.x = input[columnOfPointInJac]; worldPt.y = input[columnOfPointInJac+1]; worldPt.z = input[columnOfPointInJac+2]; if( structure.isHomogenous() ) { worldPt.w = input[columnOfPointInJac+3]; } PerspectiveOps.renderPixel(worldToView,worldPt,cameraPt); if (view.known) { if( structure.isHomogenous()) partialCameraModelH(worldPt.x, worldPt.y, worldPt.z, worldPt.w, worldToView, pointGradX, pointGradY, null, null); else partialCameraModel(worldPt.x, worldPt.y, worldPt.z, worldToView, pointGradX, pointGradY, null, null); } else { if( structure.isHomogenous()) partialCameraModelH(worldPt.x, worldPt.y, worldPt.z, worldPt.w, worldToView, pointGradX, pointGradY, camGradX, camGradY); else partialCameraModel(worldPt.x, worldPt.y, worldPt.z, worldToView, pointGradX, pointGradY, camGradX, camGradY); } jacRowX = observationIndex*2; jacRowY = jacRowX+1; //============ Partial of worldPt // partial of x' = (1/z)*P*X with respect to X is a 2 by 3|4 matrix addToJacobian(leftPoint,columnOfPointInJac,lengthPoint,pointGradX,pointGradY); if( !view.known ) { // partial of x' = (1/z)*P*X with respect to P is a 2 by 12 matrix int col = viewParameterIndexes[viewIndex]; addToJacobian(rightView,col,12,camGradX,camGradY); } observationIndex++; } } // left.print(); // right.print(); // System.out.println("Asdads"); }
class class_name[name] begin[{] method[processInternal, return_type[void], modifier[public], parameter[input, leftPoint, rightView]] begin[{] local_variable[type[int], numRows] local_variable[type[int], numPointParam] local_variable[type[int], numViewParam] Cast(expression=MemberReference(member=leftPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ReshapeMatrix, sub_type=None)) Cast(expression=MemberReference(member=rightView, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ReshapeMatrix, sub_type=None)) call[leftPoint.zero, parameter[]] call[rightView.zero, parameter[]] local_variable[type[int], observationIndex] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=views, postfix_operators=[], prefix_operators=[], qualifier=structure, selectors=[ArraySelector(index=MemberReference(member=viewIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=view)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SceneStructureProjective, sub_type=ReferenceType(arguments=None, dimensions=None, name=View, sub_type=None))), IfStatement(condition=MemberReference(member=known, postfix_operators=[], prefix_operators=['!'], qualifier=view, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=worldToView, postfix_operators=[], prefix_operators=[], qualifier=view, selectors=[])], member=set, postfix_operators=[], prefix_operators=[], qualifier=worldToView, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=viewParameterIndexes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=viewIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=indexFirstView, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), name=paramIndex)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=worldToView, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=paramIndex, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]))])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=12), 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=MemberReference(member=views, postfix_operators=[], prefix_operators=[], qualifier=observations, selectors=[ArraySelector(index=MemberReference(member=viewIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=obsView)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SceneObservations, sub_type=ReferenceType(arguments=None, dimensions=None, name=View, sub_type=None))), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=obsView.point, selectors=[], type_arguments=None), name=featureIndex)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=featureIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=lengthPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), name=columnOfPointInJac)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=worldPt, selectors=[]), type==, value=MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=columnOfPointInJac, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=worldPt, selectors=[]), type==, value=MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=columnOfPointInJac, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=z, postfix_operators=[], prefix_operators=[], qualifier=worldPt, selectors=[]), type==, value=MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=columnOfPointInJac, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=+))])), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isHomogenous, postfix_operators=[], prefix_operators=[], qualifier=structure, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=w, postfix_operators=[], prefix_operators=[], qualifier=worldPt, selectors=[]), type==, value=MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=columnOfPointInJac, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=+))])), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=worldToView, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=worldPt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cameraPt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=renderPixel, postfix_operators=[], prefix_operators=[], qualifier=PerspectiveOps, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=known, postfix_operators=[], prefix_operators=[], qualifier=view, selectors=[]), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isHomogenous, postfix_operators=[], prefix_operators=[], qualifier=structure, selectors=[], type_arguments=None), else_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=worldPt, selectors=[]), MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=worldPt, selectors=[]), MemberReference(member=z, postfix_operators=[], prefix_operators=[], qualifier=worldPt, selectors=[]), MemberReference(member=worldToView, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pointGradX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pointGradY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=camGradX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=camGradY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=partialCameraModel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=worldPt, selectors=[]), MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=worldPt, selectors=[]), MemberReference(member=z, postfix_operators=[], prefix_operators=[], qualifier=worldPt, selectors=[]), MemberReference(member=w, postfix_operators=[], prefix_operators=[], qualifier=worldPt, selectors=[]), MemberReference(member=worldToView, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pointGradX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pointGradY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=camGradX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=camGradY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=partialCameraModelH, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None))]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isHomogenous, postfix_operators=[], prefix_operators=[], qualifier=structure, selectors=[], type_arguments=None), else_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=worldPt, selectors=[]), MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=worldPt, selectors=[]), MemberReference(member=z, postfix_operators=[], prefix_operators=[], qualifier=worldPt, selectors=[]), MemberReference(member=worldToView, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pointGradX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pointGradY, 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)], member=partialCameraModel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=worldPt, selectors=[]), MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=worldPt, selectors=[]), MemberReference(member=z, postfix_operators=[], prefix_operators=[], qualifier=worldPt, selectors=[]), MemberReference(member=w, postfix_operators=[], prefix_operators=[], qualifier=worldPt, selectors=[]), MemberReference(member=worldToView, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pointGradX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pointGradY, 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)], member=partialCameraModelH, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None))])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=jacRowX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=observationIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=*)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=jacRowY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=jacRowX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=leftPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=columnOfPointInJac, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lengthPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pointGradX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pointGradY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addToJacobian, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=known, postfix_operators=[], prefix_operators=['!'], qualifier=view, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=viewParameterIndexes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=viewIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=col)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=rightView, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=col, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=12), MemberReference(member=camGradX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=camGradY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addToJacobian, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MemberReference(member=observationIndex, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=obsView, selectors=[], type_arguments=None), 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)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=viewIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=structure.views, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=viewIndex)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=viewIndex, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[processInternal] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[input] , identifier[DMatrix] identifier[leftPoint] , identifier[DMatrix] identifier[rightView] operator[SEP] { Keyword[int] identifier[numRows] operator[=] identifier[getNumOfOutputsM] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[numPointParam] operator[=] identifier[structure] operator[SEP] identifier[points] operator[SEP] identifier[length] operator[*] identifier[lengthPoint] operator[SEP] Keyword[int] identifier[numViewParam] operator[=] identifier[numParameters] operator[-] identifier[numPointParam] operator[SEP] operator[SEP] operator[SEP] identifier[ReshapeMatrix] operator[SEP] identifier[leftPoint] operator[SEP] operator[SEP] identifier[reshape] operator[SEP] identifier[numRows] , identifier[numPointParam] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ReshapeMatrix] operator[SEP] identifier[rightView] operator[SEP] operator[SEP] identifier[reshape] operator[SEP] identifier[numRows] , identifier[numViewParam] operator[SEP] operator[SEP] identifier[leftPoint] operator[SEP] identifier[zero] operator[SEP] operator[SEP] operator[SEP] identifier[rightView] operator[SEP] identifier[zero] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[observationIndex] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[viewIndex] operator[=] Other[0] operator[SEP] identifier[viewIndex] operator[<] identifier[structure] operator[SEP] identifier[views] operator[SEP] identifier[length] operator[SEP] identifier[viewIndex] operator[++] operator[SEP] { identifier[SceneStructureProjective] operator[SEP] identifier[View] identifier[view] operator[=] identifier[structure] operator[SEP] identifier[views] operator[SEP] identifier[viewIndex] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[view] operator[SEP] identifier[known] operator[SEP] { Keyword[int] identifier[paramIndex] operator[=] identifier[viewParameterIndexes] operator[SEP] identifier[viewIndex] operator[SEP] operator[+] identifier[indexFirstView] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] Other[12] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[worldToView] operator[SEP] identifier[data] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[input] operator[SEP] identifier[paramIndex] operator[++] operator[SEP] operator[SEP] } } Keyword[else] { identifier[worldToView] operator[SEP] identifier[set] operator[SEP] identifier[view] operator[SEP] identifier[worldToView] operator[SEP] operator[SEP] } identifier[SceneObservations] operator[SEP] identifier[View] identifier[obsView] operator[=] identifier[observations] operator[SEP] identifier[views] operator[SEP] identifier[viewIndex] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[obsView] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[int] identifier[featureIndex] operator[=] identifier[obsView] operator[SEP] identifier[point] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[int] identifier[columnOfPointInJac] operator[=] identifier[featureIndex] operator[*] identifier[lengthPoint] operator[SEP] identifier[worldPt] operator[SEP] identifier[x] operator[=] identifier[input] operator[SEP] identifier[columnOfPointInJac] operator[SEP] operator[SEP] identifier[worldPt] operator[SEP] identifier[y] operator[=] identifier[input] operator[SEP] identifier[columnOfPointInJac] operator[+] Other[1] operator[SEP] operator[SEP] identifier[worldPt] operator[SEP] identifier[z] operator[=] identifier[input] operator[SEP] identifier[columnOfPointInJac] operator[+] Other[2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[structure] operator[SEP] identifier[isHomogenous] operator[SEP] operator[SEP] operator[SEP] { identifier[worldPt] operator[SEP] identifier[w] operator[=] identifier[input] operator[SEP] identifier[columnOfPointInJac] operator[+] Other[3] operator[SEP] operator[SEP] } identifier[PerspectiveOps] operator[SEP] identifier[renderPixel] operator[SEP] identifier[worldToView] , identifier[worldPt] , identifier[cameraPt] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[view] operator[SEP] identifier[known] operator[SEP] { Keyword[if] operator[SEP] identifier[structure] operator[SEP] identifier[isHomogenous] operator[SEP] operator[SEP] operator[SEP] identifier[partialCameraModelH] operator[SEP] identifier[worldPt] operator[SEP] identifier[x] , identifier[worldPt] operator[SEP] identifier[y] , identifier[worldPt] operator[SEP] identifier[z] , identifier[worldPt] operator[SEP] identifier[w] , identifier[worldToView] , identifier[pointGradX] , identifier[pointGradY] , Other[null] , Other[null] operator[SEP] operator[SEP] Keyword[else] identifier[partialCameraModel] operator[SEP] identifier[worldPt] operator[SEP] identifier[x] , identifier[worldPt] operator[SEP] identifier[y] , identifier[worldPt] operator[SEP] identifier[z] , identifier[worldToView] , identifier[pointGradX] , identifier[pointGradY] , Other[null] , Other[null] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[structure] operator[SEP] identifier[isHomogenous] operator[SEP] operator[SEP] operator[SEP] identifier[partialCameraModelH] operator[SEP] identifier[worldPt] operator[SEP] identifier[x] , identifier[worldPt] operator[SEP] identifier[y] , identifier[worldPt] operator[SEP] identifier[z] , identifier[worldPt] operator[SEP] identifier[w] , identifier[worldToView] , identifier[pointGradX] , identifier[pointGradY] , identifier[camGradX] , identifier[camGradY] operator[SEP] operator[SEP] Keyword[else] identifier[partialCameraModel] operator[SEP] identifier[worldPt] operator[SEP] identifier[x] , identifier[worldPt] operator[SEP] identifier[y] , identifier[worldPt] operator[SEP] identifier[z] , identifier[worldToView] , identifier[pointGradX] , identifier[pointGradY] , identifier[camGradX] , identifier[camGradY] operator[SEP] operator[SEP] } identifier[jacRowX] operator[=] identifier[observationIndex] operator[*] Other[2] operator[SEP] identifier[jacRowY] operator[=] identifier[jacRowX] operator[+] Other[1] operator[SEP] identifier[addToJacobian] operator[SEP] identifier[leftPoint] , identifier[columnOfPointInJac] , identifier[lengthPoint] , identifier[pointGradX] , identifier[pointGradY] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[view] operator[SEP] identifier[known] operator[SEP] { Keyword[int] identifier[col] operator[=] identifier[viewParameterIndexes] operator[SEP] identifier[viewIndex] operator[SEP] operator[SEP] identifier[addToJacobian] operator[SEP] identifier[rightView] , identifier[col] , Other[12] , identifier[camGradX] , identifier[camGradY] operator[SEP] operator[SEP] } identifier[observationIndex] operator[++] operator[SEP] } } }
@Override public boolean eIsSet(int featureID) { switch (featureID) { case XbasePackage.XPOSTFIX_OPERATION__OPERAND: return operand != null; } return super.eIsSet(featureID); }
class class_name[name] begin[{] method[eIsSet, return_type[type[boolean]], modifier[public], parameter[featureID]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=XPOSTFIX_OPERATION__OPERAND, postfix_operators=[], prefix_operators=[], qualifier=XbasePackage, selectors=[])], statements=[ReturnStatement(expression=BinaryOperation(operandl=MemberReference(member=operand, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None)])], expression=MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) return[SuperMethodInvocation(arguments=[MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=eIsSet, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[eIsSet] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] { Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] { Keyword[case] identifier[XbasePackage] operator[SEP] identifier[XPOSTFIX_OPERATION__OPERAND] operator[:] Keyword[return] identifier[operand] operator[!=] Other[null] operator[SEP] } Keyword[return] Keyword[super] operator[SEP] identifier[eIsSet] operator[SEP] identifier[featureID] operator[SEP] operator[SEP] }
public Attribute getLabelAttribute() { Attribute labelAttr = getOwnLabelAttribute(); if (labelAttr == null) { EntityType extend = getExtends(); if (extend != null) { labelAttr = extend.getLabelAttribute(); } } return labelAttr; }
class class_name[name] begin[{] method[getLabelAttribute, return_type[type[Attribute]], modifier[public], parameter[]] begin[{] local_variable[type[Attribute], labelAttr] if[binary_operation[member[.labelAttr], ==, literal[null]]] begin[{] local_variable[type[EntityType], extend] if[binary_operation[member[.extend], !=, literal[null]]] begin[{] assign[member[.labelAttr], call[extend.getLabelAttribute, parameter[]]] else begin[{] None end[}] else begin[{] None end[}] return[member[.labelAttr]] end[}] END[}]
Keyword[public] identifier[Attribute] identifier[getLabelAttribute] operator[SEP] operator[SEP] { identifier[Attribute] identifier[labelAttr] operator[=] identifier[getOwnLabelAttribute] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[labelAttr] operator[==] Other[null] operator[SEP] { identifier[EntityType] identifier[extend] operator[=] identifier[getExtends] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[extend] operator[!=] Other[null] operator[SEP] { identifier[labelAttr] operator[=] identifier[extend] operator[SEP] identifier[getLabelAttribute] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[labelAttr] operator[SEP] }
public HandlerInfo getHandler(String requestURL) { Iterator<HandlerPath> keys = handlerKeys.iterator(); if (requestURL == null || keys == null) { return null; } // Check to see if we have a direct hit Iterator<ServiceAndServiceReferencePair<RESTHandler>> itr = handlerMap.getServicesWithReferences(requestURL); if (itr != null && itr.hasNext()) { ServiceAndServiceReferencePair<RESTHandler> handler = itr.next(); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(this, tc, "Found direct URL match: " + handler); } return new HandlerInfo(handler.getService(), handler.getServiceReference()); } // If no direct match, then try to match each one. Longest match wins. HandlerPath bestMatchRoot = null; while (keys.hasNext()) { HandlerPath key = keys.next(); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(this, tc, "Checking HandlerPath: " + key.getRegisteredPath() + " | length: " + key.length()); } if (key.matches(requestURL)) { if (bestMatchRoot == null || key.length() > bestMatchRoot.length()) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(this, tc, "New best match: " + key.getRegisteredPath()); } bestMatchRoot = key; } } } // If we found a match... if (bestMatchRoot != null) { // Get the iterator. We MUST check hasNext first, because of how // the underlying implementation is written. itr = handlerMap.getServicesWithReferences(bestMatchRoot.getRegisteredPath()); if (itr != null && itr.hasNext()) { ServiceAndServiceReferencePair<RESTHandler> handler = itr.next(); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(this, tc, "Final best handler: " + handler); } return new HandlerInfo(handler.getService(), handler.getServiceReference(), bestMatchRoot); } } return null; }
class class_name[name] begin[{] method[getHandler, return_type[type[HandlerInfo]], modifier[public], parameter[requestURL]] begin[{] local_variable[type[Iterator], keys] if[binary_operation[binary_operation[member[.requestURL], ==, literal[null]], ||, binary_operation[member[.keys], ==, literal[null]]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[Iterator], itr] if[binary_operation[binary_operation[member[.itr], !=, literal[null]], &&, call[itr.hasNext, parameter[]]]] begin[{] local_variable[type[ServiceAndServiceReferencePair], handler] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[THIS[], member[.tc], binary_operation[literal["Found direct URL match: "], +, member[.handler]]]] else begin[{] None end[}] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getService, postfix_operators=[], prefix_operators=[], qualifier=handler, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getServiceReference, postfix_operators=[], prefix_operators=[], qualifier=handler, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HandlerInfo, sub_type=None))] else begin[{] None end[}] local_variable[type[HandlerPath], bestMatchRoot] while[call[keys.hasNext, parameter[]]] begin[{] local_variable[type[HandlerPath], key] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[THIS[], member[.tc], binary_operation[binary_operation[binary_operation[literal["Checking HandlerPath: "], +, call[key.getRegisteredPath, parameter[]]], +, literal[" | length: "]], +, call[key.length, parameter[]]]]] else begin[{] None end[}] if[call[key.matches, parameter[member[.requestURL]]]] begin[{] if[binary_operation[binary_operation[member[.bestMatchRoot], ==, literal[null]], ||, binary_operation[call[key.length, parameter[]], >, call[bestMatchRoot.length, parameter[]]]]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[THIS[], member[.tc], binary_operation[literal["New best match: "], +, call[key.getRegisteredPath, parameter[]]]]] else begin[{] None end[}] assign[member[.bestMatchRoot], member[.key]] else begin[{] None end[}] else begin[{] None end[}] end[}] if[binary_operation[member[.bestMatchRoot], !=, literal[null]]] begin[{] assign[member[.itr], call[handlerMap.getServicesWithReferences, parameter[call[bestMatchRoot.getRegisteredPath, parameter[]]]]] if[binary_operation[binary_operation[member[.itr], !=, literal[null]], &&, call[itr.hasNext, parameter[]]]] begin[{] local_variable[type[ServiceAndServiceReferencePair], handler] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[THIS[], member[.tc], binary_operation[literal["Final best handler: "], +, member[.handler]]]] else begin[{] None end[}] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getService, postfix_operators=[], prefix_operators=[], qualifier=handler, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getServiceReference, postfix_operators=[], prefix_operators=[], qualifier=handler, selectors=[], type_arguments=None), MemberReference(member=bestMatchRoot, 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=HandlerInfo, sub_type=None))] else begin[{] None end[}] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[public] identifier[HandlerInfo] identifier[getHandler] operator[SEP] identifier[String] identifier[requestURL] operator[SEP] { identifier[Iterator] operator[<] identifier[HandlerPath] operator[>] identifier[keys] operator[=] identifier[handlerKeys] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[requestURL] operator[==] Other[null] operator[||] identifier[keys] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[Iterator] operator[<] identifier[ServiceAndServiceReferencePair] operator[<] identifier[RESTHandler] operator[>] operator[>] identifier[itr] operator[=] identifier[handlerMap] operator[SEP] identifier[getServicesWithReferences] operator[SEP] identifier[requestURL] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[itr] operator[!=] Other[null] operator[&&] identifier[itr] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[ServiceAndServiceReferencePair] operator[<] identifier[RESTHandler] operator[>] identifier[handler] operator[=] identifier[itr] operator[SEP] identifier[next] 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[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[+] identifier[handler] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[HandlerInfo] operator[SEP] identifier[handler] operator[SEP] identifier[getService] operator[SEP] operator[SEP] , identifier[handler] operator[SEP] identifier[getServiceReference] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[HandlerPath] identifier[bestMatchRoot] operator[=] Other[null] operator[SEP] Keyword[while] operator[SEP] identifier[keys] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[HandlerPath] identifier[key] operator[=] identifier[keys] operator[SEP] identifier[next] 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[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[+] identifier[key] operator[SEP] identifier[getRegisteredPath] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[key] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[key] operator[SEP] identifier[matches] operator[SEP] identifier[requestURL] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[bestMatchRoot] operator[==] Other[null] operator[||] identifier[key] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] identifier[bestMatchRoot] operator[SEP] identifier[length] 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[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[+] identifier[key] operator[SEP] identifier[getRegisteredPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[bestMatchRoot] operator[=] identifier[key] operator[SEP] } } } Keyword[if] operator[SEP] identifier[bestMatchRoot] operator[!=] Other[null] operator[SEP] { identifier[itr] operator[=] identifier[handlerMap] operator[SEP] identifier[getServicesWithReferences] operator[SEP] identifier[bestMatchRoot] operator[SEP] identifier[getRegisteredPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[itr] operator[!=] Other[null] operator[&&] identifier[itr] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[ServiceAndServiceReferencePair] operator[<] identifier[RESTHandler] operator[>] identifier[handler] operator[=] identifier[itr] operator[SEP] identifier[next] 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[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[+] identifier[handler] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[HandlerInfo] operator[SEP] identifier[handler] operator[SEP] identifier[getService] operator[SEP] operator[SEP] , identifier[handler] operator[SEP] identifier[getServiceReference] operator[SEP] operator[SEP] , identifier[bestMatchRoot] operator[SEP] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
public Environment add(@NonNull String key, @NonNull Object value) { return set(key, value); }
class class_name[name] begin[{] method[add, return_type[type[Environment]], modifier[public], parameter[key, value]] begin[{] return[call[.set, parameter[member[.key], member[.value]]]] end[}] END[}]
Keyword[public] identifier[Environment] identifier[add] operator[SEP] annotation[@] identifier[NonNull] identifier[String] identifier[key] , annotation[@] identifier[NonNull] identifier[Object] identifier[value] operator[SEP] { Keyword[return] identifier[set] operator[SEP] identifier[key] , identifier[value] operator[SEP] operator[SEP] }
public ApiResponse<ApiSuccessResponse> setCompletedWithHttpInfo(String id, CompletedData completedData) throws ApiException { com.squareup.okhttp.Call call = setCompletedValidateBeforeCall(id, completedData, null, null); Type localVarReturnType = new TypeToken<ApiSuccessResponse>(){}.getType(); return apiClient.execute(call, localVarReturnType); }
class class_name[name] begin[{] method[setCompletedWithHttpInfo, return_type[type[ApiResponse]], modifier[public], parameter[id, completedData]] begin[{] local_variable[type[com], call] local_variable[type[Type], localVarReturnType] return[call[apiClient.execute, parameter[member[.call], member[.localVarReturnType]]]] end[}] END[}]
Keyword[public] identifier[ApiResponse] operator[<] identifier[ApiSuccessResponse] operator[>] identifier[setCompletedWithHttpInfo] operator[SEP] identifier[String] identifier[id] , identifier[CompletedData] identifier[completedData] operator[SEP] Keyword[throws] identifier[ApiException] { identifier[com] operator[SEP] identifier[squareup] operator[SEP] identifier[okhttp] operator[SEP] identifier[Call] identifier[call] operator[=] identifier[setCompletedValidateBeforeCall] operator[SEP] identifier[id] , identifier[completedData] , Other[null] , Other[null] operator[SEP] operator[SEP] identifier[Type] identifier[localVarReturnType] operator[=] Keyword[new] identifier[TypeToken] operator[<] identifier[ApiSuccessResponse] operator[>] operator[SEP] operator[SEP] { } operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[apiClient] operator[SEP] identifier[execute] operator[SEP] identifier[call] , identifier[localVarReturnType] operator[SEP] operator[SEP] }
public static List<CommerceRegion> findByUuid_C(String uuid, long companyId) { return getPersistence().findByUuid_C(uuid, companyId); }
class class_name[name] begin[{] method[findByUuid_C, return_type[type[List]], modifier[public static], parameter[uuid, companyId]] begin[{] return[call[.getPersistence, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[CommerceRegion] operator[>] identifier[findByUuid_C] operator[SEP] identifier[String] identifier[uuid] , Keyword[long] identifier[companyId] operator[SEP] { Keyword[return] identifier[getPersistence] operator[SEP] operator[SEP] operator[SEP] identifier[findByUuid_C] operator[SEP] identifier[uuid] , identifier[companyId] operator[SEP] operator[SEP] }
@Override public PayNotifyResponse retcode(int retcode) { this.retcode = retcode; this.retinfo = PayRetCodes.retInfo(retcode); return this; }
class class_name[name] begin[{] method[retcode, return_type[type[PayNotifyResponse]], modifier[public], parameter[retcode]] begin[{] assign[THIS[member[None.retcode]], member[.retcode]] assign[THIS[member[None.retinfo]], call[PayRetCodes.retInfo, parameter[member[.retcode]]]] return[THIS[]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[PayNotifyResponse] identifier[retcode] operator[SEP] Keyword[int] identifier[retcode] operator[SEP] { Keyword[this] operator[SEP] identifier[retcode] operator[=] identifier[retcode] operator[SEP] Keyword[this] operator[SEP] identifier[retinfo] operator[=] identifier[PayRetCodes] operator[SEP] identifier[retInfo] operator[SEP] identifier[retcode] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public static void rethrow(MjdbcException cause) throws MjdbcSQLException { MjdbcSQLException ex = new MjdbcSQLException(cause.getMessage()); ex.setStackTrace(cause.getStackTrace()); throw ex; }
class class_name[name] begin[{] method[rethrow, return_type[void], modifier[public static], parameter[cause]] begin[{] local_variable[type[MjdbcSQLException], ex] call[ex.setStackTrace, parameter[call[cause.getStackTrace, parameter[]]]] ThrowStatement(expression=MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[rethrow] operator[SEP] identifier[MjdbcException] identifier[cause] operator[SEP] Keyword[throws] identifier[MjdbcSQLException] { identifier[MjdbcSQLException] identifier[ex] operator[=] Keyword[new] identifier[MjdbcSQLException] operator[SEP] identifier[cause] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ex] operator[SEP] identifier[setStackTrace] operator[SEP] identifier[cause] operator[SEP] identifier[getStackTrace] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] identifier[ex] operator[SEP] }
public final void mTRUE() throws RecognitionException { try { int _type = TRUE; int _channel = DEFAULT_TOKEN_CHANNEL; // MessageFilter.g:51:6: ( 'true' ) // MessageFilter.g:51:8: 'true' { match("true"); } state.type = _type; state.channel = _channel; } finally { // do for sure before leaving } }
class class_name[name] begin[{] method[mTRUE, return_type[void], modifier[final public], parameter[]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=TRUE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=_type)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=DEFAULT_TOKEN_CHANNEL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=_channel)], modifiers=set(), type=BasicType(dimensions=[], name=int)), BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="true")], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), StatementExpression(expression=Assignment(expressionl=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), type==, value=MemberReference(member=_type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=channel, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), type==, value=MemberReference(member=_channel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)], catches=None, finally_block=[], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[mTRUE] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { Keyword[try] { Keyword[int] identifier[_type] operator[=] identifier[TRUE] operator[SEP] Keyword[int] identifier[_channel] operator[=] identifier[DEFAULT_TOKEN_CHANNEL] operator[SEP] { identifier[match] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[state] operator[SEP] identifier[type] operator[=] identifier[_type] operator[SEP] identifier[state] operator[SEP] identifier[channel] operator[=] identifier[_channel] operator[SEP] } Keyword[finally] { } }
public void run() { originalSecurityManager = System.getSecurityManager(); System.setSecurityManager(new NGSecurityManager(originalSecurityManager)); if (!(System.in instanceof ThreadLocalInputStream)) { System.setIn(new ThreadLocalInputStream(in)); } if (!(System.out instanceof ThreadLocalPrintStream)) { System.setOut(new ThreadLocalPrintStream(out)); } if (!(System.err instanceof ThreadLocalPrintStream)) { System.setErr(new ThreadLocalPrintStream(err)); } try { if (listeningAddress.isInetAddress()) { if (listeningAddress.getInetAddress() == null) { serversocket = new ServerSocket(listeningAddress.getInetPort()); } else { serversocket = new ServerSocket( listeningAddress.getInetPort(), 0, listeningAddress.getInetAddress()); } } else { if (Platform.isWindows()) { boolean requireStrictLength = true; serversocket = new NGWin32NamedPipeServerSocket( listeningAddress.getLocalAddress(), requireStrictLength); } else { serversocket = new NGUnixDomainServerSocket(listeningAddress.getLocalAddress()); } } String portDescription; if (listeningAddress.isInetAddress() && listeningAddress.getInetPort() == 0) { // if the port is 0, it will be automatically determined. // add this little wait so the ServerSocket can fully // initialize and we can see what port it chose. int runningPort = getPort(); while (runningPort == 0) { try { Thread.sleep(50); } catch (Throwable toIgnore) { } runningPort = getPort(); } portDescription = ", port " + runningPort; } else { portDescription = ""; } // at this moment server is capable to accept connections running.set(true); // Only after this point nailgun server is ready to accept connections on all platforms. // test_ng.py on *nix relies on reading this line from stdout to start connecting to server. out.println( "NGServer " + NGConstants.VERSION + " started on " + listeningAddress.toString() + portDescription + "."); while (!shutdown.get()) { // this call blocks until a new connection is available, or socket is closed and // IOException is thrown Socket socket = serversocket.accept(); // get a session and run nail on it // the session is responsible to return itself to the pool // TBD: should we reconsider this? sessionPool.take().run(socket); } } catch (IOException ex) { // If shutdown is called while the accept() method is blocking, it wil throw IOException // Do not propagate it if we are in shutdown mode if (!shutdown.get()) { throw new RuntimeException(ex); } } // close all idle sessions and wait for all running sessions to complete try { sessionPool.shutdown(); } catch (Throwable ex) { // we are going to die anyways so let's just continue LOG.log(Level.WARNING, "Exception shutting down Nailgun server", ex); } // restore system streams System.setIn(in); System.setOut(out); System.setErr(err); System.setSecurityManager(originalSecurityManager); running.set(false); }
class class_name[name] begin[{] method[run, return_type[void], modifier[public], parameter[]] begin[{] assign[member[.originalSecurityManager], call[System.getSecurityManager, parameter[]]] call[System.setSecurityManager, parameter[ClassCreator(arguments=[MemberReference(member=originalSecurityManager, 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=NGSecurityManager, sub_type=None))]] if[binary_operation[member[System.in], instanceof, type[ThreadLocalInputStream]]] begin[{] call[System.setIn, parameter[ClassCreator(arguments=[MemberReference(member=in, 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=ThreadLocalInputStream, sub_type=None))]] else begin[{] None end[}] if[binary_operation[member[System.out], instanceof, type[ThreadLocalPrintStream]]] begin[{] call[System.setOut, parameter[ClassCreator(arguments=[MemberReference(member=out, 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=ThreadLocalPrintStream, sub_type=None))]] else begin[{] None end[}] if[binary_operation[member[System.err], instanceof, type[ThreadLocalPrintStream]]] begin[{] call[System.setErr, parameter[ClassCreator(arguments=[MemberReference(member=err, 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=ThreadLocalPrintStream, sub_type=None))]] else begin[{] None end[}] TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isInetAddress, postfix_operators=[], prefix_operators=[], qualifier=listeningAddress, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isWindows, postfix_operators=[], prefix_operators=[], qualifier=Platform, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=serversocket, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getLocalAddress, postfix_operators=[], prefix_operators=[], qualifier=listeningAddress, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NGUnixDomainServerSocket, sub_type=None))), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), name=requireStrictLength)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=serversocket, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getLocalAddress, postfix_operators=[], prefix_operators=[], qualifier=listeningAddress, selectors=[], type_arguments=None), MemberReference(member=requireStrictLength, 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=NGWin32NamedPipeServerSocket, sub_type=None))), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getInetAddress, postfix_operators=[], prefix_operators=[], qualifier=listeningAddress, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=serversocket, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getInetPort, postfix_operators=[], prefix_operators=[], qualifier=listeningAddress, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MethodInvocation(arguments=[], member=getInetAddress, postfix_operators=[], prefix_operators=[], qualifier=listeningAddress, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServerSocket, sub_type=None))), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=serversocket, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getInetPort, postfix_operators=[], prefix_operators=[], qualifier=listeningAddress, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServerSocket, sub_type=None))), label=None)]))])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=portDescription)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isInetAddress, postfix_operators=[], prefix_operators=[], qualifier=listeningAddress, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getInetPort, postfix_operators=[], prefix_operators=[], qualifier=listeningAddress, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), operator=&&), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=portDescription, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getPort, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=runningPort)], modifiers=set(), type=BasicType(dimensions=[], name=int)), WhileStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=50)], member=sleep, postfix_operators=[], prefix_operators=[], qualifier=Thread, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=toIgnore, types=['Throwable']))], finally_block=None, label=None, resources=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=runningPort, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getPort, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]), condition=BinaryOperation(operandl=MemberReference(member=runningPort, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=portDescription, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", port "), operandr=MemberReference(member=runningPort, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=set, postfix_operators=[], prefix_operators=[], qualifier=running, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="NGServer "), operandr=MemberReference(member=VERSION, postfix_operators=[], prefix_operators=[], qualifier=NGConstants, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" started on "), operator=+), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=listeningAddress, selectors=[], type_arguments=None), operator=+), operandr=MemberReference(member=portDescription, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="."), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None), WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=accept, postfix_operators=[], prefix_operators=[], qualifier=serversocket, selectors=[], type_arguments=None), name=socket)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Socket, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=take, postfix_operators=[], prefix_operators=[], qualifier=sessionPool, selectors=[MethodInvocation(arguments=[MemberReference(member=socket, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=run, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), condition=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=['!'], qualifier=shutdown, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=['!'], qualifier=shutdown, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=ex, 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=RuntimeException, sub_type=None)), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['IOException']))], finally_block=None, label=None, resources=None) TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=shutdown, postfix_operators=[], prefix_operators=[], qualifier=sessionPool, 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="Exception shutting down Nailgun server"), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=log, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Throwable']))], finally_block=None, label=None, resources=None) call[System.setIn, parameter[member[.in]]] call[System.setOut, parameter[member[.out]]] call[System.setErr, parameter[member[.err]]] call[System.setSecurityManager, parameter[member[.originalSecurityManager]]] call[running.set, parameter[literal[false]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] { identifier[originalSecurityManager] operator[=] identifier[System] operator[SEP] identifier[getSecurityManager] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[setSecurityManager] operator[SEP] Keyword[new] identifier[NGSecurityManager] operator[SEP] identifier[originalSecurityManager] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[System] operator[SEP] identifier[in] Keyword[instanceof] identifier[ThreadLocalInputStream] operator[SEP] operator[SEP] { identifier[System] operator[SEP] identifier[setIn] operator[SEP] Keyword[new] identifier[ThreadLocalInputStream] operator[SEP] identifier[in] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[System] operator[SEP] identifier[out] Keyword[instanceof] identifier[ThreadLocalPrintStream] operator[SEP] operator[SEP] { identifier[System] operator[SEP] identifier[setOut] operator[SEP] Keyword[new] identifier[ThreadLocalPrintStream] operator[SEP] identifier[out] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[System] operator[SEP] identifier[err] Keyword[instanceof] identifier[ThreadLocalPrintStream] operator[SEP] operator[SEP] { identifier[System] operator[SEP] identifier[setErr] operator[SEP] Keyword[new] identifier[ThreadLocalPrintStream] operator[SEP] identifier[err] operator[SEP] operator[SEP] operator[SEP] } Keyword[try] { Keyword[if] operator[SEP] identifier[listeningAddress] operator[SEP] identifier[isInetAddress] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[listeningAddress] operator[SEP] identifier[getInetAddress] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[serversocket] operator[=] Keyword[new] identifier[ServerSocket] operator[SEP] identifier[listeningAddress] operator[SEP] identifier[getInetPort] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[serversocket] operator[=] Keyword[new] identifier[ServerSocket] operator[SEP] identifier[listeningAddress] operator[SEP] identifier[getInetPort] operator[SEP] operator[SEP] , Other[0] , identifier[listeningAddress] operator[SEP] identifier[getInetAddress] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[if] operator[SEP] identifier[Platform] operator[SEP] identifier[isWindows] operator[SEP] operator[SEP] operator[SEP] { Keyword[boolean] identifier[requireStrictLength] operator[=] literal[boolean] operator[SEP] identifier[serversocket] operator[=] Keyword[new] identifier[NGWin32NamedPipeServerSocket] operator[SEP] identifier[listeningAddress] operator[SEP] identifier[getLocalAddress] operator[SEP] operator[SEP] , identifier[requireStrictLength] operator[SEP] operator[SEP] } Keyword[else] { identifier[serversocket] operator[=] Keyword[new] identifier[NGUnixDomainServerSocket] operator[SEP] identifier[listeningAddress] operator[SEP] identifier[getLocalAddress] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } identifier[String] identifier[portDescription] operator[SEP] Keyword[if] operator[SEP] identifier[listeningAddress] operator[SEP] identifier[isInetAddress] operator[SEP] operator[SEP] operator[&&] identifier[listeningAddress] operator[SEP] identifier[getInetPort] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[int] identifier[runningPort] operator[=] identifier[getPort] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[runningPort] operator[==] Other[0] operator[SEP] { Keyword[try] { identifier[Thread] operator[SEP] identifier[sleep] operator[SEP] Other[50] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[toIgnore] operator[SEP] { } identifier[runningPort] operator[=] identifier[getPort] operator[SEP] operator[SEP] operator[SEP] } identifier[portDescription] operator[=] literal[String] operator[+] identifier[runningPort] operator[SEP] } Keyword[else] { identifier[portDescription] operator[=] literal[String] operator[SEP] } identifier[running] operator[SEP] identifier[set] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[NGConstants] operator[SEP] identifier[VERSION] operator[+] literal[String] operator[+] identifier[listeningAddress] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[+] identifier[portDescription] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[while] operator[SEP] operator[!] identifier[shutdown] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] { identifier[Socket] identifier[socket] operator[=] identifier[serversocket] operator[SEP] identifier[accept] operator[SEP] operator[SEP] operator[SEP] identifier[sessionPool] operator[SEP] identifier[take] operator[SEP] operator[SEP] operator[SEP] identifier[run] operator[SEP] identifier[socket] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[IOException] identifier[ex] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[shutdown] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[ex] operator[SEP] operator[SEP] } } Keyword[try] { identifier[sessionPool] operator[SEP] identifier[shutdown] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[ex] operator[SEP] { identifier[LOG] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[WARNING] , literal[String] , identifier[ex] operator[SEP] operator[SEP] } identifier[System] operator[SEP] identifier[setIn] operator[SEP] identifier[in] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[setOut] operator[SEP] identifier[out] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[setErr] operator[SEP] identifier[err] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[setSecurityManager] operator[SEP] identifier[originalSecurityManager] operator[SEP] operator[SEP] identifier[running] operator[SEP] identifier[set] operator[SEP] literal[boolean] operator[SEP] operator[SEP] }
public Option getSelectedItem() { for (Entry<OptionElement, Option> entry : itemMap.entrySet()) { Option opt = entry.getValue(); if (opt.isSelected()) return opt; } return null; }
class class_name[name] begin[{] method[getSelectedItem, return_type[type[Option]], modifier[public], parameter[]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), name=opt)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Option, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=isSelected, postfix_operators=[], prefix_operators=[], qualifier=opt, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=opt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=itemMap, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=OptionElement, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Option, sub_type=None))], dimensions=[], name=Entry, sub_type=None))), label=None) return[literal[null]] end[}] END[}]
Keyword[public] identifier[Option] identifier[getSelectedItem] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[Entry] operator[<] identifier[OptionElement] , identifier[Option] operator[>] identifier[entry] operator[:] identifier[itemMap] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[Option] identifier[opt] operator[=] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[opt] operator[SEP] identifier[isSelected] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[opt] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
public static Rectangle getBoundaryAbsolute(Tile upperLeft, Tile lowerRight) { return new Rectangle(upperLeft.getOrigin().x, upperLeft.getOrigin().y, lowerRight.getOrigin().x + upperLeft.tileSize, lowerRight.getOrigin().y + upperLeft.tileSize); }
class class_name[name] begin[{] method[getBoundaryAbsolute, return_type[type[Rectangle]], modifier[public static], parameter[upperLeft, lowerRight]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getOrigin, postfix_operators=[], prefix_operators=[], qualifier=upperLeft, selectors=[MemberReference(member=x, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), MethodInvocation(arguments=[], member=getOrigin, postfix_operators=[], prefix_operators=[], qualifier=upperLeft, selectors=[MemberReference(member=y, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), BinaryOperation(operandl=MethodInvocation(arguments=[], member=getOrigin, postfix_operators=[], prefix_operators=[], qualifier=lowerRight, selectors=[MemberReference(member=x, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), operandr=MemberReference(member=tileSize, postfix_operators=[], prefix_operators=[], qualifier=upperLeft, selectors=[]), operator=+), BinaryOperation(operandl=MethodInvocation(arguments=[], member=getOrigin, postfix_operators=[], prefix_operators=[], qualifier=lowerRight, selectors=[MemberReference(member=y, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), operandr=MemberReference(member=tileSize, postfix_operators=[], prefix_operators=[], qualifier=upperLeft, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Rectangle, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Rectangle] identifier[getBoundaryAbsolute] operator[SEP] identifier[Tile] identifier[upperLeft] , identifier[Tile] identifier[lowerRight] operator[SEP] { Keyword[return] Keyword[new] identifier[Rectangle] operator[SEP] identifier[upperLeft] operator[SEP] identifier[getOrigin] operator[SEP] operator[SEP] operator[SEP] identifier[x] , identifier[upperLeft] operator[SEP] identifier[getOrigin] operator[SEP] operator[SEP] operator[SEP] identifier[y] , identifier[lowerRight] operator[SEP] identifier[getOrigin] operator[SEP] operator[SEP] operator[SEP] identifier[x] operator[+] identifier[upperLeft] operator[SEP] identifier[tileSize] , identifier[lowerRight] operator[SEP] identifier[getOrigin] operator[SEP] operator[SEP] operator[SEP] identifier[y] operator[+] identifier[upperLeft] operator[SEP] identifier[tileSize] operator[SEP] operator[SEP] }
private String xPathEvaluate(Object input) { JAXPXPathEngine engine = xpf == null ? new JAXPXPathEngine() : new JAXPXPathEngine(xpf); if (prefix2Uri != null) { engine.setNamespaceContext(prefix2Uri); } Source s = Input.from(input).build(); Node n = dbf != null ? Convert.toNode(s, dbf) : Convert.toNode(s); return engine.evaluate(xPath, n); }
class class_name[name] begin[{] method[xPathEvaluate, return_type[type[String]], modifier[private], parameter[input]] begin[{] local_variable[type[JAXPXPathEngine], engine] if[binary_operation[member[.prefix2Uri], !=, literal[null]]] begin[{] call[engine.setNamespaceContext, parameter[member[.prefix2Uri]]] else begin[{] None end[}] local_variable[type[Source], s] local_variable[type[Node], n] return[call[engine.evaluate, parameter[member[.xPath], member[.n]]]] end[}] END[}]
Keyword[private] identifier[String] identifier[xPathEvaluate] operator[SEP] identifier[Object] identifier[input] operator[SEP] { identifier[JAXPXPathEngine] identifier[engine] operator[=] identifier[xpf] operator[==] Other[null] operator[?] Keyword[new] identifier[JAXPXPathEngine] operator[SEP] operator[SEP] operator[:] Keyword[new] identifier[JAXPXPathEngine] operator[SEP] identifier[xpf] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[prefix2Uri] operator[!=] Other[null] operator[SEP] { identifier[engine] operator[SEP] identifier[setNamespaceContext] operator[SEP] identifier[prefix2Uri] operator[SEP] operator[SEP] } identifier[Source] identifier[s] operator[=] identifier[Input] operator[SEP] identifier[from] operator[SEP] identifier[input] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] identifier[Node] identifier[n] operator[=] identifier[dbf] operator[!=] Other[null] operator[?] identifier[Convert] operator[SEP] identifier[toNode] operator[SEP] identifier[s] , identifier[dbf] operator[SEP] operator[:] identifier[Convert] operator[SEP] identifier[toNode] operator[SEP] identifier[s] operator[SEP] operator[SEP] Keyword[return] identifier[engine] operator[SEP] identifier[evaluate] operator[SEP] identifier[xPath] , identifier[n] operator[SEP] operator[SEP] }
public com.google.api.ads.admanager.axis.v201902.ProposalCompanyAssociation[] getAgencies() { return agencies; }
class class_name[name] begin[{] method[getAgencies, return_type[type[com]], modifier[public], parameter[]] begin[{] return[member[.agencies]] end[}] END[}]
Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[admanager] operator[SEP] identifier[axis] operator[SEP] identifier[v201902] operator[SEP] identifier[ProposalCompanyAssociation] operator[SEP] operator[SEP] identifier[getAgencies] operator[SEP] operator[SEP] { Keyword[return] identifier[agencies] operator[SEP] }
public Boolean isReadYourWrites(final String iClusterName) { Object value = getClusterConfiguration(iClusterName).field(READ_YOUR_WRITES); if (value == null) { value = configuration.field(READ_YOUR_WRITES); if (value == null) { OLogManager.instance() .warn(this, "%s setting not found for cluster=%s in distributed-config.json", READ_YOUR_WRITES, iClusterName); return true; } } return (Boolean) value; }
class class_name[name] begin[{] method[isReadYourWrites, return_type[type[Boolean]], modifier[public], parameter[iClusterName]] begin[{] local_variable[type[Object], value] if[binary_operation[member[.value], ==, literal[null]]] begin[{] assign[member[.value], call[configuration.field, parameter[member[.READ_YOUR_WRITES]]]] if[binary_operation[member[.value], ==, literal[null]]] begin[{] call[OLogManager.instance, parameter[]] return[literal[true]] else begin[{] None end[}] else begin[{] None end[}] return[Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Boolean, sub_type=None))] end[}] END[}]
Keyword[public] identifier[Boolean] identifier[isReadYourWrites] operator[SEP] Keyword[final] identifier[String] identifier[iClusterName] operator[SEP] { identifier[Object] identifier[value] operator[=] identifier[getClusterConfiguration] operator[SEP] identifier[iClusterName] operator[SEP] operator[SEP] identifier[field] operator[SEP] identifier[READ_YOUR_WRITES] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] { identifier[value] operator[=] identifier[configuration] operator[SEP] identifier[field] operator[SEP] identifier[READ_YOUR_WRITES] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] { identifier[OLogManager] operator[SEP] identifier[instance] operator[SEP] operator[SEP] operator[SEP] identifier[warn] operator[SEP] Keyword[this] , literal[String] , identifier[READ_YOUR_WRITES] , identifier[iClusterName] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] operator[SEP] identifier[Boolean] operator[SEP] identifier[value] operator[SEP] }
public void configure(@NonNull VoidConfiguration configuration, @NonNull Transport transport, @NonNull UpdaterParametersProvider updaterProvider) { this.transport = transport; this.masterMode = false; this.configuration = configuration; this.updaterParametersProvider = updaterProvider; }
class class_name[name] begin[{] method[configure, return_type[void], modifier[public], parameter[configuration, transport, updaterProvider]] begin[{] assign[THIS[member[None.transport]], member[.transport]] assign[THIS[member[None.masterMode]], literal[false]] assign[THIS[member[None.configuration]], member[.configuration]] assign[THIS[member[None.updaterParametersProvider]], member[.updaterProvider]] end[}] END[}]
Keyword[public] Keyword[void] identifier[configure] operator[SEP] annotation[@] identifier[NonNull] identifier[VoidConfiguration] identifier[configuration] , annotation[@] identifier[NonNull] identifier[Transport] identifier[transport] , annotation[@] identifier[NonNull] identifier[UpdaterParametersProvider] identifier[updaterProvider] operator[SEP] { Keyword[this] operator[SEP] identifier[transport] operator[=] identifier[transport] operator[SEP] Keyword[this] operator[SEP] identifier[masterMode] operator[=] literal[boolean] operator[SEP] Keyword[this] operator[SEP] identifier[configuration] operator[=] identifier[configuration] operator[SEP] Keyword[this] operator[SEP] identifier[updaterParametersProvider] operator[=] identifier[updaterProvider] operator[SEP] }
public ServiceFuture<List<ResourceMetricDefinitionInner>> listWorkerPoolInstanceMetricDefinitionsAsync(final String resourceGroupName, final String name, final String workerPoolName, final String instance, final ListOperationCallback<ResourceMetricDefinitionInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listWorkerPoolInstanceMetricDefinitionsSinglePageAsync(resourceGroupName, name, workerPoolName, instance), new Func1<String, Observable<ServiceResponse<Page<ResourceMetricDefinitionInner>>>>() { @Override public Observable<ServiceResponse<Page<ResourceMetricDefinitionInner>>> call(String nextPageLink) { return listWorkerPoolInstanceMetricDefinitionsNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
class class_name[name] begin[{] method[listWorkerPoolInstanceMetricDefinitionsAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, name, workerPoolName, instance, serviceCallback]] begin[{] return[call[AzureServiceFuture.fromPageResponse, parameter[call[.listWorkerPoolInstanceMetricDefinitionsSinglePageAsync, parameter[member[.resourceGroupName], member[.name], member[.workerPoolName], member[.instance]]], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=nextPageLink, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=listWorkerPoolInstanceMetricDefinitionsNextSinglePageAsync, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=call, parameters=[FormalParameter(annotations=[], modifiers=set(), name=nextPageLink, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ResourceMetricDefinitionInner, sub_type=None))], dimensions=[], name=Page, sub_type=None))], dimensions=[], name=ServiceResponse, sub_type=None))], dimensions=[], name=Observable, sub_type=None), throws=None, type_parameters=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=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ResourceMetricDefinitionInner, sub_type=None))], dimensions=[], name=Page, sub_type=None))], dimensions=[], name=ServiceResponse, sub_type=None))], dimensions=[], name=Observable, sub_type=None))], dimensions=None, name=Func1, sub_type=None)), member[.serviceCallback]]]] end[}] END[}]
Keyword[public] identifier[ServiceFuture] operator[<] identifier[List] operator[<] identifier[ResourceMetricDefinitionInner] operator[>] operator[>] identifier[listWorkerPoolInstanceMetricDefinitionsAsync] operator[SEP] Keyword[final] identifier[String] identifier[resourceGroupName] , Keyword[final] identifier[String] identifier[name] , Keyword[final] identifier[String] identifier[workerPoolName] , Keyword[final] identifier[String] identifier[instance] , Keyword[final] identifier[ListOperationCallback] operator[<] identifier[ResourceMetricDefinitionInner] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[AzureServiceFuture] operator[SEP] identifier[fromPageResponse] operator[SEP] identifier[listWorkerPoolInstanceMetricDefinitionsSinglePageAsync] operator[SEP] identifier[resourceGroupName] , identifier[name] , identifier[workerPoolName] , identifier[instance] operator[SEP] , Keyword[new] identifier[Func1] operator[<] identifier[String] , identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[ResourceMetricDefinitionInner] operator[>] operator[>] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[ResourceMetricDefinitionInner] operator[>] operator[>] operator[>] identifier[call] operator[SEP] identifier[String] identifier[nextPageLink] operator[SEP] { Keyword[return] identifier[listWorkerPoolInstanceMetricDefinitionsNextSinglePageAsync] operator[SEP] identifier[nextPageLink] operator[SEP] operator[SEP] } } , identifier[serviceCallback] operator[SEP] operator[SEP] }
@Override @SuppressWarnings("unchecked") public Spliterator<E_OUT> spliterator() { if (linkedOrConsumed) throw new IllegalStateException(MSG_STREAM_LINKED); linkedOrConsumed = true; if (this == sourceStage) { if (sourceStage.sourceSpliterator != null) { @SuppressWarnings("unchecked") Spliterator<E_OUT> s = (Spliterator<E_OUT>) sourceStage.sourceSpliterator; sourceStage.sourceSpliterator = null; return s; } else if (sourceStage.sourceSupplier != null) { @SuppressWarnings("unchecked") Supplier<Spliterator<E_OUT>> s = (Supplier<Spliterator<E_OUT>>) sourceStage.sourceSupplier; sourceStage.sourceSupplier = null; return lazySpliterator(s); } else { throw new IllegalStateException(MSG_CONSUMED); } } else { return wrap(this, () -> sourceSpliterator(0), isParallel()); } }
class class_name[name] begin[{] method[spliterator, return_type[type[Spliterator]], modifier[public], parameter[]] begin[{] if[member[.linkedOrConsumed]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=MSG_STREAM_LINKED, 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=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] assign[member[.linkedOrConsumed], literal[true]] if[binary_operation[THIS[], ==, member[.sourceStage]]] begin[{] if[binary_operation[member[sourceStage.sourceSpliterator], !=, literal[null]]] begin[{] local_variable[type[Spliterator], s] assign[member[sourceStage.sourceSpliterator], literal[null]] return[member[.s]] else begin[{] if[binary_operation[member[sourceStage.sourceSupplier], !=, literal[null]]] begin[{] local_variable[type[Supplier], s] assign[member[sourceStage.sourceSupplier], literal[null]] return[call[.lazySpliterator, parameter[member[.s]]]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=MSG_CONSUMED, 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=IllegalStateException, sub_type=None)), label=None) end[}] end[}] else begin[{] return[call[.wrap, parameter[THIS[], LambdaExpression(body=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=sourceSpliterator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), parameters=[]), call[.isParallel, parameter[]]]]] end[}] end[}] END[}]
annotation[@] identifier[Override] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[Spliterator] operator[<] identifier[E_OUT] operator[>] identifier[spliterator] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[linkedOrConsumed] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] identifier[MSG_STREAM_LINKED] operator[SEP] operator[SEP] identifier[linkedOrConsumed] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[==] identifier[sourceStage] operator[SEP] { Keyword[if] operator[SEP] identifier[sourceStage] operator[SEP] identifier[sourceSpliterator] operator[!=] Other[null] operator[SEP] { annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[Spliterator] operator[<] identifier[E_OUT] operator[>] identifier[s] operator[=] operator[SEP] identifier[Spliterator] operator[<] identifier[E_OUT] operator[>] operator[SEP] identifier[sourceStage] operator[SEP] identifier[sourceSpliterator] operator[SEP] identifier[sourceStage] operator[SEP] identifier[sourceSpliterator] operator[=] Other[null] operator[SEP] Keyword[return] identifier[s] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[sourceStage] operator[SEP] identifier[sourceSupplier] operator[!=] Other[null] operator[SEP] { annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[Supplier] operator[<] identifier[Spliterator] operator[<] identifier[E_OUT] operator[>] operator[>] identifier[s] operator[=] operator[SEP] identifier[Supplier] operator[<] identifier[Spliterator] operator[<] identifier[E_OUT] operator[>] operator[>] operator[SEP] identifier[sourceStage] operator[SEP] identifier[sourceSupplier] operator[SEP] identifier[sourceStage] operator[SEP] identifier[sourceSupplier] operator[=] Other[null] operator[SEP] Keyword[return] identifier[lazySpliterator] operator[SEP] identifier[s] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] identifier[MSG_CONSUMED] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[return] identifier[wrap] operator[SEP] Keyword[this] , operator[SEP] operator[SEP] operator[->] identifier[sourceSpliterator] operator[SEP] Other[0] operator[SEP] , identifier[isParallel] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
protected void writeFieldInstContent(OutputStream result) throws IOException { result.write(HYPERLINK); result.write(DELIMITER); this.document.filterSpecialChar(result, url, true, true); }
class class_name[name] begin[{] method[writeFieldInstContent, return_type[void], modifier[protected], parameter[result]] begin[{] call[result.write, parameter[member[.HYPERLINK]]] call[result.write, parameter[member[.DELIMITER]]] THIS[member[None.document]call[None.filterSpecialChar, parameter[member[.result], member[.url], literal[true], literal[true]]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[writeFieldInstContent] operator[SEP] identifier[OutputStream] identifier[result] operator[SEP] Keyword[throws] identifier[IOException] { identifier[result] operator[SEP] identifier[write] operator[SEP] identifier[HYPERLINK] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[write] operator[SEP] identifier[DELIMITER] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[document] operator[SEP] identifier[filterSpecialChar] operator[SEP] identifier[result] , identifier[url] , literal[boolean] , literal[boolean] operator[SEP] operator[SEP] }
@Override public Quaterniond mul(double a) { return new Quaterniond(x * a, y * a, z * a, w * a); }
class class_name[name] begin[{] method[mul, return_type[type[Quaterniond]], modifier[public], parameter[a]] begin[{] return[ClassCreator(arguments=[BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), BinaryOperation(operandl=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), BinaryOperation(operandl=MemberReference(member=z, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), BinaryOperation(operandl=MemberReference(member=w, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=a, 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=Quaterniond, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Quaterniond] identifier[mul] operator[SEP] Keyword[double] identifier[a] operator[SEP] { Keyword[return] Keyword[new] identifier[Quaterniond] operator[SEP] identifier[x] operator[*] identifier[a] , identifier[y] operator[*] identifier[a] , identifier[z] operator[*] identifier[a] , identifier[w] operator[*] identifier[a] operator[SEP] operator[SEP] }
@SuppressFBWarnings(value = "REC_CATCH_EXCEPTION", justification = "Applies Maven exception wrapper") public EntryPoint getEntryPoint(ClassLoaderResolver classLoaderResolver, String groupId, String artifactId, String version, String packaging) throws MojoExecutionException { if (entryPoint == null || entryPoint.length() == 0) { throw new MojoExecutionException("Entry point name is not defined"); } for (EntryPoint.Default entryPoint : EntryPoint.Default.values()) { if (this.entryPoint.equals(entryPoint.name())) { return entryPoint; } } try { return (EntryPoint) Class.forName(entryPoint, false, classLoaderResolver.resolve(asCoordinate(groupId, artifactId, version, packaging))) .getDeclaredConstructor() .newInstance(); } catch (Exception exception) { throw new MojoExecutionException("Cannot create entry point: " + entryPoint, exception); } }
class class_name[name] begin[{] method[getEntryPoint, return_type[type[EntryPoint]], modifier[public], parameter[classLoaderResolver, groupId, artifactId, version, packaging]] begin[{] if[binary_operation[binary_operation[member[.entryPoint], ==, literal[null]], ||, binary_operation[call[entryPoint.length, parameter[]], ==, literal[0]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Entry point name is not defined")], 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) else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=entryPoint, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=name, postfix_operators=[], prefix_operators=[], qualifier=entryPoint, selectors=[], type_arguments=None)], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=entryPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=EntryPoint.Default, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entryPoint)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=EntryPoint, sub_type=ReferenceType(arguments=None, dimensions=None, name=Default, sub_type=None)))), label=None) TryStatement(block=[ReturnStatement(expression=Cast(expression=MethodInvocation(arguments=[MemberReference(member=entryPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=groupId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=artifactId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=packaging, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=asCoordinate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=resolve, postfix_operators=[], prefix_operators=[], qualifier=classLoaderResolver, selectors=[], type_arguments=None)], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Class, selectors=[MethodInvocation(arguments=[], member=getDeclaredConstructor, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=newInstance, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=EntryPoint, sub_type=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot create entry point: "), operandr=MemberReference(member=entryPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=exception, 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=exception, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[SuppressFBWarnings] operator[SEP] identifier[value] operator[=] literal[String] , identifier[justification] operator[=] literal[String] operator[SEP] Keyword[public] identifier[EntryPoint] identifier[getEntryPoint] operator[SEP] identifier[ClassLoaderResolver] identifier[classLoaderResolver] , identifier[String] identifier[groupId] , identifier[String] identifier[artifactId] , identifier[String] identifier[version] , identifier[String] identifier[packaging] operator[SEP] Keyword[throws] identifier[MojoExecutionException] { Keyword[if] operator[SEP] identifier[entryPoint] operator[==] Other[null] operator[||] identifier[entryPoint] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[MojoExecutionException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[EntryPoint] operator[SEP] identifier[Default] identifier[entryPoint] operator[:] identifier[EntryPoint] operator[SEP] identifier[Default] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[entryPoint] operator[SEP] identifier[equals] operator[SEP] identifier[entryPoint] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[entryPoint] operator[SEP] } } Keyword[try] { Keyword[return] operator[SEP] identifier[EntryPoint] operator[SEP] identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[entryPoint] , literal[boolean] , identifier[classLoaderResolver] operator[SEP] identifier[resolve] operator[SEP] identifier[asCoordinate] operator[SEP] identifier[groupId] , identifier[artifactId] , identifier[version] , identifier[packaging] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getDeclaredConstructor] operator[SEP] operator[SEP] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[exception] operator[SEP] { Keyword[throw] Keyword[new] identifier[MojoExecutionException] operator[SEP] literal[String] operator[+] identifier[entryPoint] , identifier[exception] operator[SEP] operator[SEP] } }
@Override public DescribeVirtualServiceResult describeVirtualService(DescribeVirtualServiceRequest request) { request = beforeClientExecution(request); return executeDescribeVirtualService(request); }
class class_name[name] begin[{] method[describeVirtualService, return_type[type[DescribeVirtualServiceResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeDescribeVirtualService, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[DescribeVirtualServiceResult] identifier[describeVirtualService] operator[SEP] identifier[DescribeVirtualServiceRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeDescribeVirtualService] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public static Actor client(String zoneId, String clientId) { Assert.notNull(zoneId, "zoneId must not be null"); Assert.notNull(clientId, "clientId must not be null"); return new Actor(OAUTH_CLIENT, zoneId + "/" + clientId); }
class class_name[name] begin[{] method[client, return_type[type[Actor]], modifier[public static], parameter[zoneId, clientId]] begin[{] call[Assert.notNull, parameter[member[.zoneId], literal["zoneId must not be null"]]] call[Assert.notNull, parameter[member[.clientId], literal["clientId must not be null"]]] return[ClassCreator(arguments=[MemberReference(member=OAUTH_CLIENT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=zoneId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/"), operator=+), operandr=MemberReference(member=clientId, 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=Actor, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Actor] identifier[client] operator[SEP] identifier[String] identifier[zoneId] , identifier[String] identifier[clientId] operator[SEP] { identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] identifier[zoneId] , literal[String] operator[SEP] operator[SEP] identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] identifier[clientId] , literal[String] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[Actor] operator[SEP] identifier[OAUTH_CLIENT] , identifier[zoneId] operator[+] literal[String] operator[+] identifier[clientId] operator[SEP] operator[SEP] }
protected UrlConfig getUrlConfigForTarget(Adaptable adaptable, Resource targetResource) { UrlConfig config = null; if (targetResource != null) { config = new UrlConfig(targetResource); } if (config == null || !config.isValid()) { config = new UrlConfig(adaptable); } return config; }
class class_name[name] begin[{] method[getUrlConfigForTarget, return_type[type[UrlConfig]], modifier[protected], parameter[adaptable, targetResource]] begin[{] local_variable[type[UrlConfig], config] if[binary_operation[member[.targetResource], !=, literal[null]]] begin[{] assign[member[.config], ClassCreator(arguments=[MemberReference(member=targetResource, 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=UrlConfig, sub_type=None))] else begin[{] None end[}] if[binary_operation[binary_operation[member[.config], ==, literal[null]], ||, call[config.isValid, parameter[]]]] begin[{] assign[member[.config], ClassCreator(arguments=[MemberReference(member=adaptable, 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=UrlConfig, sub_type=None))] else begin[{] None end[}] return[member[.config]] end[}] END[}]
Keyword[protected] identifier[UrlConfig] identifier[getUrlConfigForTarget] operator[SEP] identifier[Adaptable] identifier[adaptable] , identifier[Resource] identifier[targetResource] operator[SEP] { identifier[UrlConfig] identifier[config] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[targetResource] operator[!=] Other[null] operator[SEP] { identifier[config] operator[=] Keyword[new] identifier[UrlConfig] operator[SEP] identifier[targetResource] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[config] operator[==] Other[null] operator[||] operator[!] identifier[config] operator[SEP] identifier[isValid] operator[SEP] operator[SEP] operator[SEP] { identifier[config] operator[=] Keyword[new] identifier[UrlConfig] operator[SEP] identifier[adaptable] operator[SEP] operator[SEP] } Keyword[return] identifier[config] operator[SEP] }
public final int indexOfNavigationPreference( @NonNull final NavigationPreference navigationPreference) { Condition.INSTANCE .ensureNotNull(navigationPreference, "The navigation preference may not be null"); return navigationPreferences.indexOf(navigationPreference); }
class class_name[name] begin[{] method[indexOfNavigationPreference, return_type[type[int]], modifier[final public], parameter[navigationPreference]] begin[{] call[Condition.INSTANCE.ensureNotNull, parameter[member[.navigationPreference], literal["The navigation preference may not be null"]]] return[call[navigationPreferences.indexOf, parameter[member[.navigationPreference]]]] end[}] END[}]
Keyword[public] Keyword[final] Keyword[int] identifier[indexOfNavigationPreference] operator[SEP] annotation[@] identifier[NonNull] Keyword[final] identifier[NavigationPreference] identifier[navigationPreference] operator[SEP] { identifier[Condition] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[ensureNotNull] operator[SEP] identifier[navigationPreference] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[navigationPreferences] operator[SEP] identifier[indexOf] operator[SEP] identifier[navigationPreference] operator[SEP] operator[SEP] }
public void showSitemapView(boolean showSitemap) { if (showSitemap) { setSortContainerPropertyId(CmsResourceTableProperty.PROPERTY_NAVIGATION_TEXT); setSortAscending(true); } else { setSortContainerPropertyId(CAPTION_FOLDERS); setSortAscending(true); } }
class class_name[name] begin[{] method[showSitemapView, return_type[void], modifier[public], parameter[showSitemap]] begin[{] if[member[.showSitemap]] begin[{] call[.setSortContainerPropertyId, parameter[member[CmsResourceTableProperty.PROPERTY_NAVIGATION_TEXT]]] call[.setSortAscending, parameter[literal[true]]] else begin[{] call[.setSortContainerPropertyId, parameter[member[.CAPTION_FOLDERS]]] call[.setSortAscending, parameter[literal[true]]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[showSitemapView] operator[SEP] Keyword[boolean] identifier[showSitemap] operator[SEP] { Keyword[if] operator[SEP] identifier[showSitemap] operator[SEP] { identifier[setSortContainerPropertyId] operator[SEP] identifier[CmsResourceTableProperty] operator[SEP] identifier[PROPERTY_NAVIGATION_TEXT] operator[SEP] operator[SEP] identifier[setSortAscending] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } Keyword[else] { identifier[setSortContainerPropertyId] operator[SEP] identifier[CAPTION_FOLDERS] operator[SEP] operator[SEP] identifier[setSortAscending] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } }
public JsJmsMapMessage createJmsMapMessage() throws MessageCreateFailedException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createJmsMapMessage"); JsJmsMapMessage msg = null; try { msg = new JsJmsMapMessageImpl(MfpConstants.CONSTRUCTOR_NO_OP); } catch (MessageDecodeFailedException e) { /* No need to FFDC this as JsMsgObject will already have done so */ // No FFDC code needed throw new MessageCreateFailedException(e); } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "createJmsMapMessage"); return msg; }
class class_name[name] begin[{] method[createJmsMapMessage, return_type[type[JsJmsMapMessage]], modifier[public], parameter[]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["createJmsMapMessage"]]] else begin[{] None end[}] local_variable[type[JsJmsMapMessage], msg] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=CONSTRUCTOR_NO_OP, postfix_operators=[], prefix_operators=[], qualifier=MfpConstants, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JsJmsMapMessageImpl, sub_type=None))), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[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=MessageCreateFailedException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['MessageDecodeFailedException']))], finally_block=None, label=None, resources=None) if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["createJmsMapMessage"]]] else begin[{] None end[}] return[member[.msg]] end[}] END[}]
Keyword[public] identifier[JsJmsMapMessage] identifier[createJmsMapMessage] operator[SEP] operator[SEP] Keyword[throws] identifier[MessageCreateFailedException] { 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[JsJmsMapMessage] identifier[msg] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[msg] operator[=] Keyword[new] identifier[JsJmsMapMessageImpl] operator[SEP] identifier[MfpConstants] operator[SEP] identifier[CONSTRUCTOR_NO_OP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[MessageDecodeFailedException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[MessageCreateFailedException] operator[SEP] identifier[e] 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] Keyword[return] identifier[msg] operator[SEP] }
public void setInstanceIds(java.util.Collection<String> instanceIds) { if (instanceIds == null) { this.instanceIds = null; return; } this.instanceIds = new com.amazonaws.internal.SdkInternalList<String>(instanceIds); }
class class_name[name] begin[{] method[setInstanceIds, return_type[void], modifier[public], parameter[instanceIds]] begin[{] if[binary_operation[member[.instanceIds], ==, literal[null]]] begin[{] assign[THIS[member[None.instanceIds]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.instanceIds]], ClassCreator(arguments=[MemberReference(member=instanceIds, 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[setInstanceIds] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[instanceIds] operator[SEP] { Keyword[if] operator[SEP] identifier[instanceIds] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[instanceIds] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[instanceIds] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[String] operator[>] operator[SEP] identifier[instanceIds] operator[SEP] operator[SEP] }
protected FloatEditor getFloatEditor(String key) { TypeEditor typeEditor = TYPE_EDITOR_MAP.get(key); if (typeEditor == null) { typeEditor = new FloatEditor(this, sharedPreferences, key); TYPE_EDITOR_MAP.put(key, typeEditor); } else if (!(typeEditor instanceof FloatEditor)) { throw new IllegalArgumentException(String.format("key %s is already used for other type", key)); } return (FloatEditor) typeEditor; }
class class_name[name] begin[{] method[getFloatEditor, return_type[type[FloatEditor]], modifier[protected], parameter[key]] begin[{] local_variable[type[TypeEditor], typeEditor] if[binary_operation[member[.typeEditor], ==, literal[null]]] begin[{] assign[member[.typeEditor], ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=sharedPreferences, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=key, 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=FloatEditor, sub_type=None))] call[TYPE_EDITOR_MAP.put, parameter[member[.key], member[.typeEditor]]] else begin[{] if[binary_operation[member[.typeEditor], instanceof, type[FloatEditor]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="key %s is already used for other type"), MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], 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[}] end[}] return[Cast(expression=MemberReference(member=typeEditor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=FloatEditor, sub_type=None))] end[}] END[}]
Keyword[protected] identifier[FloatEditor] identifier[getFloatEditor] operator[SEP] identifier[String] identifier[key] operator[SEP] { identifier[TypeEditor] identifier[typeEditor] operator[=] identifier[TYPE_EDITOR_MAP] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[typeEditor] operator[==] Other[null] operator[SEP] { identifier[typeEditor] operator[=] Keyword[new] identifier[FloatEditor] operator[SEP] Keyword[this] , identifier[sharedPreferences] , identifier[key] operator[SEP] operator[SEP] identifier[TYPE_EDITOR_MAP] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[typeEditor] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[typeEditor] Keyword[instanceof] identifier[FloatEditor] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[key] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] identifier[FloatEditor] operator[SEP] identifier[typeEditor] operator[SEP] }
public static String encode (String string) { if (string == null) { return ""; } StringBuilder sb = null; char c; for (int i = 0; i < string.length (); ++i) { c = string.charAt(i); if (((int)c) >= 0x80) { if( sb == null ) { sb = new StringBuilder( string.length()+4 ); sb.append( string.substring(0,i) ); } //encode all non basic latin characters sb.append("&#"); sb.append((int)c); sb.append(";"); } else if( sb != null ) { sb.append(c); } } return sb != null ? sb.toString() : string; }
class class_name[name] begin[{] method[encode, return_type[type[String]], modifier[public static], parameter[string]] begin[{] if[binary_operation[member[.string], ==, literal[null]]] begin[{] return[literal[""]] else begin[{] None end[}] local_variable[type[StringBuilder], sb] local_variable[type[char], c] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=string, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=Cast(expression=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x80), operator=>=), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=sb, 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=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=sb, 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=Assignment(expressionl=MemberReference(member=sb, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=string, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuilder, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=string, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="&#")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int))], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=";")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=string, selectors=[], type_arguments=None), 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[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=sb, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MemberReference(member=string, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[encode] operator[SEP] identifier[String] identifier[string] operator[SEP] { Keyword[if] operator[SEP] identifier[string] operator[==] Other[null] operator[SEP] { Keyword[return] literal[String] operator[SEP] } identifier[StringBuilder] identifier[sb] operator[=] Other[null] operator[SEP] Keyword[char] identifier[c] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[string] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[++] identifier[i] operator[SEP] { identifier[c] operator[=] identifier[string] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[c] operator[SEP] operator[>=] literal[Integer] operator[SEP] { Keyword[if] operator[SEP] identifier[sb] operator[==] Other[null] operator[SEP] { identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[string] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[+] Other[4] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[string] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[i] operator[SEP] operator[SEP] operator[SEP] } identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[c] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[sb] operator[!=] Other[null] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[c] operator[SEP] operator[SEP] } } Keyword[return] identifier[sb] operator[!=] Other[null] operator[?] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[:] identifier[string] operator[SEP] }
public int getServerPort() { String host = null; CharSequence rawHost; if ((rawHost = getHost()) != null) { int length = rawHost.length(); int i; for (i = length - 1; i >= 0; i--) { if (rawHost.charAt(i) == ':') { int port = 0; for (i++; i < length; i++) { char ch = rawHost.charAt(i); if ('0' <= ch && ch <= '9') { port = 10 * port + ch - '0'; } } return port; } } // server/0521 vs server/052o // because of proxies, need to use the host header, // not the actual port return isSecure() ? 443 : 80; } if (host == null) { return connTcp().portLocal(); } int p1 = host.lastIndexOf(':'); if (p1 < 0) return isSecure() ? 443 : 80; else { int length = host.length(); int port = 0; for (int i = p1 + 1; i < length; i++) { char ch = host.charAt(i); if ('0' <= ch && ch <= '9') { port = 10 * port + ch - '0'; } } return port; } }
class class_name[name] begin[{] method[getServerPort, return_type[type[int]], modifier[public], parameter[]] begin[{] local_variable[type[String], host] local_variable[type[CharSequence], rawHost] if[binary_operation[assign[member[.rawHost], call[.getHost, parameter[]]], !=, literal[null]]] begin[{] local_variable[type[int], length] local_variable[type[int], i] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=rawHost, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=':'), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=port)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=rawHost, selectors=[], type_arguments=None), name=ch)], modifiers=set(), type=BasicType(dimensions=[], name=char)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='0'), operandr=MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operandr=BinaryOperation(operandl=MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='9'), operator=<=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=port, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=10), operandr=MemberReference(member=port, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='0'), operator=-)), 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=, selectors=[]), operator=<), init=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])], update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), ReturnStatement(expression=MemberReference(member=port, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), init=[Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))], update=[MemberReference(member=i, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[TernaryExpression(condition=MethodInvocation(arguments=[], member=isSecure, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=80), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=443))] else begin[{] None end[}] if[binary_operation[member[.host], ==, literal[null]]] begin[{] return[call[.connTcp, parameter[]]] else begin[{] None end[}] local_variable[type[int], p1] if[binary_operation[member[.p1], <, literal[0]]] begin[{] return[TernaryExpression(condition=MethodInvocation(arguments=[], member=isSecure, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=80), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=443))] else begin[{] local_variable[type[int], length] local_variable[type[int], port] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=host, selectors=[], type_arguments=None), name=ch)], modifiers=set(), type=BasicType(dimensions=[], name=char)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='0'), operandr=MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operandr=BinaryOperation(operandl=MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='9'), operator=<=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=port, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=10), operandr=MemberReference(member=port, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='0'), operator=-)), 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=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=BinaryOperation(operandl=MemberReference(member=p1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.port]] end[}] end[}] END[}]
Keyword[public] Keyword[int] identifier[getServerPort] operator[SEP] operator[SEP] { identifier[String] identifier[host] operator[=] Other[null] operator[SEP] identifier[CharSequence] identifier[rawHost] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[rawHost] operator[=] identifier[getHost] operator[SEP] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[int] identifier[length] operator[=] identifier[rawHost] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[i] operator[SEP] Keyword[for] operator[SEP] identifier[i] operator[=] identifier[length] operator[-] Other[1] operator[SEP] identifier[i] operator[>=] Other[0] operator[SEP] identifier[i] operator[--] operator[SEP] { Keyword[if] operator[SEP] identifier[rawHost] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[==] literal[String] operator[SEP] { Keyword[int] identifier[port] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[i] operator[++] operator[SEP] identifier[i] operator[<] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[char] identifier[ch] operator[=] identifier[rawHost] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] literal[String] operator[<=] identifier[ch] operator[&&] identifier[ch] operator[<=] literal[String] operator[SEP] { identifier[port] operator[=] Other[10] operator[*] identifier[port] operator[+] identifier[ch] operator[-] literal[String] operator[SEP] } } Keyword[return] identifier[port] operator[SEP] } } Keyword[return] identifier[isSecure] operator[SEP] operator[SEP] operator[?] Other[443] operator[:] Other[80] operator[SEP] } Keyword[if] operator[SEP] identifier[host] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[connTcp] operator[SEP] operator[SEP] operator[SEP] identifier[portLocal] operator[SEP] operator[SEP] operator[SEP] } Keyword[int] identifier[p1] operator[=] identifier[host] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[p1] operator[<] Other[0] operator[SEP] Keyword[return] identifier[isSecure] operator[SEP] operator[SEP] operator[?] Other[443] operator[:] Other[80] operator[SEP] Keyword[else] { Keyword[int] identifier[length] operator[=] identifier[host] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[port] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[p1] operator[+] Other[1] operator[SEP] identifier[i] operator[<] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[char] identifier[ch] operator[=] identifier[host] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] literal[String] operator[<=] identifier[ch] operator[&&] identifier[ch] operator[<=] literal[String] operator[SEP] { identifier[port] operator[=] Other[10] operator[*] identifier[port] operator[+] identifier[ch] operator[-] literal[String] operator[SEP] } } Keyword[return] identifier[port] operator[SEP] } }
protected final Endpoint newHttpEndpoint(final String endpointClass, final String endpointName, final Deployment dep) { if (endpointName == null) throw WSLogger.ROOT_LOGGER.nullEndpointName(); if (endpointClass == null) throw WSLogger.ROOT_LOGGER.nullEndpointClass(); final Endpoint endpoint = this.deploymentModelFactory.newHttpEndpoint(endpointClass); endpoint.setShortName(endpointName); endpoint.setType(endpointType); dep.getService().addEndpoint(endpoint); return endpoint; }
class class_name[name] begin[{] method[newHttpEndpoint, return_type[type[Endpoint]], modifier[final protected], parameter[endpointClass, endpointName, dep]] begin[{] if[binary_operation[member[.endpointName], ==, literal[null]]] begin[{] ThrowStatement(expression=MethodInvocation(arguments=[], member=nullEndpointName, postfix_operators=[], prefix_operators=[], qualifier=WSLogger.ROOT_LOGGER, selectors=[], type_arguments=None), label=None) else begin[{] None end[}] if[binary_operation[member[.endpointClass], ==, literal[null]]] begin[{] ThrowStatement(expression=MethodInvocation(arguments=[], member=nullEndpointClass, postfix_operators=[], prefix_operators=[], qualifier=WSLogger.ROOT_LOGGER, selectors=[], type_arguments=None), label=None) else begin[{] None end[}] local_variable[type[Endpoint], endpoint] call[endpoint.setShortName, parameter[member[.endpointName]]] call[endpoint.setType, parameter[member[.endpointType]]] call[dep.getService, parameter[]] return[member[.endpoint]] end[}] END[}]
Keyword[protected] Keyword[final] identifier[Endpoint] identifier[newHttpEndpoint] operator[SEP] Keyword[final] identifier[String] identifier[endpointClass] , Keyword[final] identifier[String] identifier[endpointName] , Keyword[final] identifier[Deployment] identifier[dep] operator[SEP] { Keyword[if] operator[SEP] identifier[endpointName] operator[==] Other[null] operator[SEP] Keyword[throw] identifier[WSLogger] operator[SEP] identifier[ROOT_LOGGER] operator[SEP] identifier[nullEndpointName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[endpointClass] operator[==] Other[null] operator[SEP] Keyword[throw] identifier[WSLogger] operator[SEP] identifier[ROOT_LOGGER] operator[SEP] identifier[nullEndpointClass] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Endpoint] identifier[endpoint] operator[=] Keyword[this] operator[SEP] identifier[deploymentModelFactory] operator[SEP] identifier[newHttpEndpoint] operator[SEP] identifier[endpointClass] operator[SEP] operator[SEP] identifier[endpoint] operator[SEP] identifier[setShortName] operator[SEP] identifier[endpointName] operator[SEP] operator[SEP] identifier[endpoint] operator[SEP] identifier[setType] operator[SEP] identifier[endpointType] operator[SEP] operator[SEP] identifier[dep] operator[SEP] identifier[getService] operator[SEP] operator[SEP] operator[SEP] identifier[addEndpoint] operator[SEP] identifier[endpoint] operator[SEP] operator[SEP] Keyword[return] identifier[endpoint] operator[SEP] }
@Override @ConstantTime public Integer findMin() { if (Constants.NOT_BENCHMARK && size == 0) { throw new NoSuchElementException(); } return array[1].key; }
class class_name[name] begin[{] method[findMin, return_type[type[Integer]], modifier[public], parameter[]] begin[{] if[binary_operation[member[Constants.NOT_BENCHMARK], &&, binary_operation[member[.size], ==, literal[0]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NoSuchElementException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.array]] end[}] END[}]
annotation[@] identifier[Override] annotation[@] identifier[ConstantTime] Keyword[public] identifier[Integer] identifier[findMin] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[Constants] operator[SEP] identifier[NOT_BENCHMARK] operator[&&] identifier[size] operator[==] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[NoSuchElementException] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[array] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[key] operator[SEP] }
private static boolean isDone() throws SystemException { switch (userTransaction.getStatus()) { case Status.STATUS_PREPARING: case Status.STATUS_PREPARED: case Status.STATUS_COMMITTING: case Status.STATUS_COMMITTED: case Status.STATUS_ROLLING_BACK: case Status.STATUS_ROLLEDBACK: return true; } return false; }
class class_name[name] begin[{] method[isDone, return_type[type[boolean]], modifier[private static], parameter[]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=STATUS_PREPARING, postfix_operators=[], prefix_operators=[], qualifier=Status, selectors=[]), MemberReference(member=STATUS_PREPARED, postfix_operators=[], prefix_operators=[], qualifier=Status, selectors=[]), MemberReference(member=STATUS_COMMITTING, postfix_operators=[], prefix_operators=[], qualifier=Status, selectors=[]), MemberReference(member=STATUS_COMMITTED, postfix_operators=[], prefix_operators=[], qualifier=Status, selectors=[]), MemberReference(member=STATUS_ROLLING_BACK, postfix_operators=[], prefix_operators=[], qualifier=Status, selectors=[]), MemberReference(member=STATUS_ROLLEDBACK, postfix_operators=[], prefix_operators=[], qualifier=Status, selectors=[])], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])], expression=MethodInvocation(arguments=[], member=getStatus, postfix_operators=[], prefix_operators=[], qualifier=userTransaction, selectors=[], type_arguments=None), label=None) return[literal[false]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[boolean] identifier[isDone] operator[SEP] operator[SEP] Keyword[throws] identifier[SystemException] { Keyword[switch] operator[SEP] identifier[userTransaction] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] identifier[Status] operator[SEP] identifier[STATUS_PREPARING] operator[:] Keyword[case] identifier[Status] operator[SEP] identifier[STATUS_PREPARED] operator[:] Keyword[case] identifier[Status] operator[SEP] identifier[STATUS_COMMITTING] operator[:] Keyword[case] identifier[Status] operator[SEP] identifier[STATUS_COMMITTED] operator[:] Keyword[case] identifier[Status] operator[SEP] identifier[STATUS_ROLLING_BACK] operator[:] Keyword[case] identifier[Status] operator[SEP] identifier[STATUS_ROLLEDBACK] operator[:] Keyword[return] literal[boolean] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public String text() { final StringBuilder sb = new StringBuilder(); for (Object child : this.children) { if (child instanceof Node) { sb.append(((Node) child).text()); } else { sb.append(child); } } return sb.toString(); }
class class_name[name] begin[{] method[text, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[StringBuilder], sb] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None), operator=instanceof), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None))], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=children, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=child)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))), label=None) return[call[sb.toString, parameter[]]] end[}] END[}]
Keyword[public] identifier[String] identifier[text] operator[SEP] operator[SEP] { Keyword[final] identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Object] identifier[child] operator[:] Keyword[this] operator[SEP] identifier[children] operator[SEP] { Keyword[if] operator[SEP] identifier[child] Keyword[instanceof] identifier[Node] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] operator[SEP] operator[SEP] identifier[Node] operator[SEP] identifier[child] operator[SEP] operator[SEP] identifier[text] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[child] operator[SEP] operator[SEP] } } Keyword[return] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
@Override public boolean eIsSet(int featureID) { switch (featureID) { case AfplibPackage.GCHST__XPOS: return XPOS_EDEFAULT == null ? xpos != null : !XPOS_EDEFAULT.equals(xpos); case AfplibPackage.GCHST__YPOS: return YPOS_EDEFAULT == null ? ypos != null : !YPOS_EDEFAULT.equals(ypos); case AfplibPackage.GCHST__CP: return CP_EDEFAULT == null ? cp != null : !CP_EDEFAULT.equals(cp); } return super.eIsSet(featureID); }
class class_name[name] begin[{] method[eIsSet, return_type[type[boolean]], modifier[public], parameter[featureID]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=GCHST__XPOS, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[ReturnStatement(expression=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=XPOS_EDEFAULT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[MemberReference(member=xpos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=['!'], qualifier=XPOS_EDEFAULT, selectors=[], type_arguments=None), if_true=BinaryOperation(operandl=MemberReference(member=xpos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=)), label=None)]), SwitchStatementCase(case=[MemberReference(member=GCHST__YPOS, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[ReturnStatement(expression=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=YPOS_EDEFAULT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[MemberReference(member=ypos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=['!'], qualifier=YPOS_EDEFAULT, selectors=[], type_arguments=None), if_true=BinaryOperation(operandl=MemberReference(member=ypos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=)), label=None)]), SwitchStatementCase(case=[MemberReference(member=GCHST__CP, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[ReturnStatement(expression=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=CP_EDEFAULT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[MemberReference(member=cp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=['!'], qualifier=CP_EDEFAULT, selectors=[], type_arguments=None), if_true=BinaryOperation(operandl=MemberReference(member=cp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=)), label=None)])], expression=MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) return[SuperMethodInvocation(arguments=[MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=eIsSet, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[eIsSet] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] { Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] { Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[GCHST__XPOS] operator[:] Keyword[return] identifier[XPOS_EDEFAULT] operator[==] Other[null] operator[?] identifier[xpos] operator[!=] Other[null] operator[:] operator[!] identifier[XPOS_EDEFAULT] operator[SEP] identifier[equals] operator[SEP] identifier[xpos] operator[SEP] operator[SEP] Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[GCHST__YPOS] operator[:] Keyword[return] identifier[YPOS_EDEFAULT] operator[==] Other[null] operator[?] identifier[ypos] operator[!=] Other[null] operator[:] operator[!] identifier[YPOS_EDEFAULT] operator[SEP] identifier[equals] operator[SEP] identifier[ypos] operator[SEP] operator[SEP] Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[GCHST__CP] operator[:] Keyword[return] identifier[CP_EDEFAULT] operator[==] Other[null] operator[?] identifier[cp] operator[!=] Other[null] operator[:] operator[!] identifier[CP_EDEFAULT] operator[SEP] identifier[equals] operator[SEP] identifier[cp] operator[SEP] operator[SEP] } Keyword[return] Keyword[super] operator[SEP] identifier[eIsSet] operator[SEP] identifier[featureID] operator[SEP] operator[SEP] }
protected void traceJobXML(String jobXML) { if (logger.isLoggable(Level.FINE)) { int concatLen = jobXML.length() > 200 ? 200 : jobXML.length(); logger.fine("Starting job: " + jobXML.substring(0, concatLen) + "... truncated ..."); } }
class class_name[name] begin[{] method[traceJobXML, return_type[void], modifier[protected], parameter[jobXML]] begin[{] if[call[logger.isLoggable, parameter[member[Level.FINE]]]] begin[{] local_variable[type[int], concatLen] call[logger.fine, parameter[binary_operation[binary_operation[literal["Starting job: "], +, call[jobXML.substring, parameter[literal[0], member[.concatLen]]]], +, literal["... truncated ..."]]]] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[traceJobXML] operator[SEP] identifier[String] identifier[jobXML] operator[SEP] { Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[FINE] operator[SEP] operator[SEP] { Keyword[int] identifier[concatLen] operator[=] identifier[jobXML] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[200] operator[?] Other[200] operator[:] identifier[jobXML] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[fine] operator[SEP] literal[String] operator[+] identifier[jobXML] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[concatLen] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } }
public void morphIntoSheet(int endX, int endY, Side side, int arcDegrees, float scaleFactor, long duration, AnimationListener listener) { morph(endX, endY, side, arcDegrees, scaleFactor, duration, listener); }
class class_name[name] begin[{] method[morphIntoSheet, return_type[void], modifier[public], parameter[endX, endY, side, arcDegrees, scaleFactor, duration, listener]] begin[{] call[.morph, parameter[member[.endX], member[.endY], member[.side], member[.arcDegrees], member[.scaleFactor], member[.duration], member[.listener]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[morphIntoSheet] operator[SEP] Keyword[int] identifier[endX] , Keyword[int] identifier[endY] , identifier[Side] identifier[side] , Keyword[int] identifier[arcDegrees] , Keyword[float] identifier[scaleFactor] , Keyword[long] identifier[duration] , identifier[AnimationListener] identifier[listener] operator[SEP] { identifier[morph] operator[SEP] identifier[endX] , identifier[endY] , identifier[side] , identifier[arcDegrees] , identifier[scaleFactor] , identifier[duration] , identifier[listener] operator[SEP] operator[SEP] }
public BaseValidationCheck getValidationChecker(ValidationRule rule) { ValidationRule existRule = this.rules.stream().filter(r -> r.getRuleName().equals(rule.getRuleName())).findFirst().orElse(null); if (existRule == null) { throw new ValidationLibException("rulename : " + rule.getRuleName() + "checker is notfound ", HttpStatus.INTERNAL_SERVER_ERROR); } return existRule.getValidationCheck(); }
class class_name[name] begin[{] method[getValidationChecker, return_type[type[BaseValidationCheck]], modifier[public], parameter[rule]] begin[{] local_variable[type[ValidationRule], existRule] if[binary_operation[member[.existRule], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="rulename : "), operandr=MethodInvocation(arguments=[], member=getRuleName, postfix_operators=[], prefix_operators=[], qualifier=rule, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="checker is notfound "), operator=+), MemberReference(member=INTERNAL_SERVER_ERROR, postfix_operators=[], prefix_operators=[], qualifier=HttpStatus, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ValidationLibException, sub_type=None)), label=None) else begin[{] None end[}] return[call[existRule.getValidationCheck, parameter[]]] end[}] END[}]
Keyword[public] identifier[BaseValidationCheck] identifier[getValidationChecker] operator[SEP] identifier[ValidationRule] identifier[rule] operator[SEP] { identifier[ValidationRule] identifier[existRule] operator[=] Keyword[this] operator[SEP] identifier[rules] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[r] operator[->] identifier[r] operator[SEP] identifier[getRuleName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[rule] operator[SEP] identifier[getRuleName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[findFirst] operator[SEP] operator[SEP] operator[SEP] identifier[orElse] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[existRule] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[ValidationLibException] operator[SEP] literal[String] operator[+] identifier[rule] operator[SEP] identifier[getRuleName] operator[SEP] operator[SEP] operator[+] literal[String] , identifier[HttpStatus] operator[SEP] identifier[INTERNAL_SERVER_ERROR] operator[SEP] operator[SEP] } Keyword[return] identifier[existRule] operator[SEP] identifier[getValidationCheck] operator[SEP] operator[SEP] operator[SEP] }