code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "_reference") public JAXBElement<ReferenceType> create_Reference(ReferenceType value) { return new JAXBElement<ReferenceType>(__Reference_QNAME, ReferenceType.class, null, value); }
class class_name[name] begin[{] method[create_Reference, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=__Reference_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ReferenceType, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ReferenceType, sub_type=None))], dimensions=None, name=JAXBElement, sub_type=None))] end[}] END[}]
annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[ReferenceType] operator[>] identifier[create_Reference] operator[SEP] identifier[ReferenceType] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[JAXBElement] operator[<] identifier[ReferenceType] operator[>] operator[SEP] identifier[__Reference_QNAME] , identifier[ReferenceType] operator[SEP] Keyword[class] , Other[null] , identifier[value] operator[SEP] operator[SEP] }
public static IntSupplier leftOf(ISized owner, IPositioned other, int spacing) { checkNotNull(other); return () -> { return other.position().x() - owner.size().width() - spacing; }; }
class class_name[name] begin[{] method[leftOf, return_type[type[IntSupplier]], modifier[public static], parameter[owner, other, spacing]] begin[{] call[.checkNotNull, parameter[member[.other]]] return[LambdaExpression(body=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=position, postfix_operators=[], prefix_operators=[], qualifier=other, selectors=[MethodInvocation(arguments=[], member=x, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=owner, selectors=[MethodInvocation(arguments=[], member=width, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=-), operandr=MemberReference(member=spacing, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), label=None)], parameters=[])] end[}] END[}]
Keyword[public] Keyword[static] identifier[IntSupplier] identifier[leftOf] operator[SEP] identifier[ISized] identifier[owner] , identifier[IPositioned] identifier[other] , Keyword[int] identifier[spacing] operator[SEP] { identifier[checkNotNull] operator[SEP] identifier[other] operator[SEP] operator[SEP] Keyword[return] operator[SEP] operator[SEP] operator[->] { Keyword[return] identifier[other] operator[SEP] identifier[position] operator[SEP] operator[SEP] operator[SEP] identifier[x] operator[SEP] operator[SEP] operator[-] identifier[owner] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[width] operator[SEP] operator[SEP] operator[-] identifier[spacing] operator[SEP] } operator[SEP] }
@Trivial @FFDCIgnore(InterruptedException.class) void scheduledScan() { // Don't perform a scheduled scan if this monitor holder is paused if (isStopped) return; // 152229: Changed this code to get the monitor type locally. That is, now we save the monitor type in the constructor. // We used to get the monitor type here by monitorRef.getProperty(FileMonitor.MONITOR_TYPE)). That caused a // ConcurrentModificationException because of interference from the JMocked FileMonitor in the unit test code. // Don't do anything if this is an external monitor if (FileMonitor.MONITOR_TYPE_EXTERNAL.equals(monitorRef.getProperty(FileMonitor.MONITOR_TYPE))) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(this, tc, "scheduledScan - RETURN early - external monitor"); } return; } // Don't do anything if the framework is stopping. Allow normal component cleanup // to deactivate/clean up the scheduled tasks, but make this a no-op if the // server is shutting down. if (FrameworkState.isStopping()) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(this, tc, "scheduledScan - RETURN early - framework stopping"); } return; } // Don't do anything unless we can set scanInProgress to true // Use this to prevent scanning while a scan is in progress. Monitor notification must happen // outside of the lock to prevent deadlocks. if (!scanInProgress.compareAndSet(false, true)) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(this, tc, "scheduledScan - RETURN early - already scan in progress?"); } return; } try { Set<File> created = new HashSet<File>(); Set<File> deleted = new HashSet<File>(); Set<File> modified = new HashSet<File>(); // Try to obtain the scan lock -- this might fail if the monitor configuration is being updated if (scanLock.tryLock()) { try { // Always try destroy when we obtain the lock: it will return true if this is in destroy or destroyed state // Also (after we have tried doDestroy) ensure that we are in active state if (!doDestroy() && (monitorState.get() == MonitorState.ACTIVE.ordinal())) { if (coreService.isDetailedScanTraceEnabled() && TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(this, tc, "File monitor scan: begin", updateMonitors); } scanForUpdates(created, deleted, modified); if (!created.isEmpty() || !modified.isEmpty() || !deleted.isEmpty()) { // Check again, make sure there have been no further changes since the scan we just // ran (we don't want to read the files until any updates are complete, files may be // in process of being copied). // what seems to be the vogue is to do this check to make sure nothing moved twice. // i.e. keep the re-check interval at 100ms, but require two clean go-rounds before // delivering the all clear. boolean oneClean = false; boolean twoClean = false; List<File> createdCheck = new ArrayList<File>(); List<File> deletedCheck = new ArrayList<File>(); List<File> modifiedCheck = new ArrayList<File>(); do { // Wait for 100 ms before checking again to give files time to finish // copying if they are mid copy. Note this may not work for copying // large files via programs like FTP where the copy may pause or // if an OS creates the file and sets the size/last modified before // the copy completes, but it should fix it for smaller files or for the // test environment where some files are streamed over rather than copied. try { // Only used once and not sure it needs to be configurable so didn't create a // constant for the delay period. Thread.sleep(TIME_TO_WAIT_FOR_COPY_TO_COMPLETE); } catch (InterruptedException ex) { } // Clear the lists, want a clean set rather than appending to existing to check // if this loop is "update free". Do not clear the deletedCreatedCheck or // deletedModifiedCheck as these need to track status over multiple loops. createdCheck.clear(); deletedCheck.clear(); modifiedCheck.clear(); scanForUpdates(createdCheck, deletedCheck, modifiedCheck); resolveChangesForScheduledScan(created, deleted, modified, createdCheck, deletedCheck, modifiedCheck); if (createdCheck.isEmpty() && modifiedCheck.isEmpty() && deletedCheck.isEmpty()) { // This run was clean-- hooray! if (oneClean) { twoClean = true; // <-- loop exit condition } else { oneClean = true; // <-- hopefully only one more time through } } else { oneClean = false; // bummer. } // Keep going until we have two 100ms intervals with no changes // (AND the runtime/framework is still happy) } while (!twoClean && FrameworkState.isValid()); } } } catch (RuntimeException e) { // TODO: MUST CATCH exceptions here (to at least get FFDC)... ick } finally { try { doDestroy(); // always attempt destroy while we hold the lock } finally { scanLock.unlock(); } } if (!created.isEmpty() || !modified.isEmpty() || !deleted.isEmpty()) { // changes were discovered: trace & call the registered file monitor if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(this, tc, "File monitor scan: end; resources changed", created.size() + " created", modified.size() + " modified", deleted.size() + " deleted", "running=" + FrameworkState.isValid()); } // Even if we do get into a scan, make sure the framework is still good before we // push the notification of updates-- Avoid propagating change notification // while components that might react to them are being shut down if (FrameworkState.isValid()) { try { monitor.onChange(created, modified, deleted); // If the monitor handled the call cleanly, reset our exception count exceptionCount = 0; } catch (RuntimeException e) { // FFDC instrumentation will go here // Catch the exception so it doesn't kill the whole scheduler exceptionCount++; Tr.warning(tc, "fileMonitorException", created, modified, deleted, monitor.getClass(), e.getLocalizedMessage()); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(this, tc, "scheduledScan - exceptionCount=" + exceptionCount); } // If the monitor has thrown exceptions a few times in a row abandon // monitoring for it if (exceptionCount >= NUMBER_OF_EXCEPTIONS_BEFORE_DISABLING_MONITOR) { Tr.warning(tc, "fileMonitorDisabled", NUMBER_OF_EXCEPTIONS_BEFORE_DISABLING_MONITOR, monitor.getClass()); // Reset the exceptionCount just in case we get re-enabled by outside forces for some unknown reason exceptionCount = 0; destroy(); } } } else { //no framework, we should try to cleanup. stop(); } } else if (coreService.isDetailedScanTraceEnabled() && TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { // If super detailed trace is enabled, we trace the begin/end of all file scans Tr.debug(this, tc, "File monitor scan: end; no changes"); } } // end if tryLock } finally { scanInProgress.set(false); } }
class class_name[name] begin[{] method[scheduledScan, return_type[void], modifier[default], parameter[]] begin[{] if[member[.isStopped]] begin[{] return[None] else begin[{] None end[}] if[call[FileMonitor.MONITOR_TYPE_EXTERNAL.equals, parameter[call[monitorRef.getProperty, parameter[member[FileMonitor.MONITOR_TYPE]]]]]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[THIS[], member[.tc], literal["scheduledScan - RETURN early - external monitor"]]] else begin[{] None end[}] return[None] else begin[{] None end[}] if[call[FrameworkState.isStopping, parameter[]]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[THIS[], member[.tc], literal["scheduledScan - RETURN early - framework stopping"]]] else begin[{] None end[}] return[None] else begin[{] None end[}] if[call[scanInProgress.compareAndSet, parameter[literal[false], literal[true]]]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[THIS[], member[.tc], literal["scheduledScan - RETURN early - already scan in progress?"]]] else begin[{] None end[}] return[None] else begin[{] None end[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None))], dimensions=None, name=HashSet, sub_type=None)), name=created)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None))], dimensions=[], name=Set, sub_type=None)), 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=File, sub_type=None))], dimensions=None, name=HashSet, sub_type=None)), name=deleted)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None))], dimensions=[], name=Set, sub_type=None)), 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=File, sub_type=None))], dimensions=None, name=HashSet, sub_type=None)), name=modified)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None))], dimensions=[], name=Set, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=tryLock, postfix_operators=[], prefix_operators=[], qualifier=scanLock, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=doDestroy, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=monitorState, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=ordinal, postfix_operators=[], prefix_operators=[], qualifier=MonitorState.ACTIVE, selectors=[], type_arguments=None), operator===), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isDetailedScanTraceEnabled, postfix_operators=[], prefix_operators=[], qualifier=coreService, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operator=&&), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="File monitor scan: begin"), MemberReference(member=updateMonitors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=created, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=deleted, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=modified, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=scanForUpdates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=created, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=modified, selectors=[], type_arguments=None), operator=||), operandr=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=deleted, selectors=[], type_arguments=None), 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=false), name=oneClean)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), name=twoClean)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), 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=File, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None)), name=createdCheck)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None))], dimensions=[], name=List, sub_type=None)), 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=File, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None)), name=deletedCheck)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None))], dimensions=[], name=List, sub_type=None)), 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=File, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None)), name=modifiedCheck)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None))], dimensions=[], name=List, sub_type=None)), DoStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=TIME_TO_WAIT_FOR_COPY_TO_COMPLETE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], 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=ex, types=['InterruptedException']))], finally_block=None, label=None, resources=None), StatementExpression(expression=MethodInvocation(arguments=[], member=clear, postfix_operators=[], prefix_operators=[], qualifier=createdCheck, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=clear, postfix_operators=[], prefix_operators=[], qualifier=deletedCheck, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=clear, postfix_operators=[], prefix_operators=[], qualifier=modifiedCheck, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=createdCheck, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=deletedCheck, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=modifiedCheck, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=scanForUpdates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=created, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=deleted, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=modified, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=createdCheck, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=deletedCheck, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=modifiedCheck, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=resolveChangesForScheduledScan, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=createdCheck, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=modifiedCheck, selectors=[], type_arguments=None), operator=&&), operandr=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=deletedCheck, selectors=[], type_arguments=None), operator=&&), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=oneClean, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=oneClean, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=oneClean, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=twoClean, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]))]))]), condition=BinaryOperation(operandl=MemberReference(member=twoClean, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=isValid, postfix_operators=[], prefix_operators=[], qualifier=FrameworkState, selectors=[], type_arguments=None), operator=&&), label=None)]))]))], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['RuntimeException']))], finally_block=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=doDestroy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=unlock, postfix_operators=[], prefix_operators=[], qualifier=scanLock, selectors=[], type_arguments=None), label=None)], label=None, resources=None)], label=None, resources=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=created, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=modified, selectors=[], type_arguments=None), operator=||), operandr=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=deleted, selectors=[], type_arguments=None), operator=||), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isDetailedScanTraceEnabled, postfix_operators=[], prefix_operators=[], qualifier=coreService, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operator=&&), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="File monitor scan: end; no changes")], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="File monitor scan: end; resources changed"), BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=created, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" created"), operator=+), BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=modified, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" modified"), operator=+), BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=deleted, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" deleted"), operator=+), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="running="), operandr=MethodInvocation(arguments=[], member=isValid, postfix_operators=[], prefix_operators=[], qualifier=FrameworkState, selectors=[], type_arguments=None), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MethodInvocation(arguments=[], member=isValid, postfix_operators=[], prefix_operators=[], qualifier=FrameworkState, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=stop, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=created, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=modified, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=deleted, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onChange, postfix_operators=[], prefix_operators=[], qualifier=monitor, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=exceptionCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MemberReference(member=exceptionCount, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="fileMonitorException"), MemberReference(member=created, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=modified, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=deleted, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=monitor, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getLocalizedMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=warning, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="scheduledScan - exceptionCount="), operandr=MemberReference(member=exceptionCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=exceptionCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=NUMBER_OF_EXCEPTIONS_BEFORE_DISABLING_MONITOR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="fileMonitorDisabled"), MemberReference(member=NUMBER_OF_EXCEPTIONS_BEFORE_DISABLING_MONITOR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=monitor, selectors=[], type_arguments=None)], member=warning, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=exceptionCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=destroy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['RuntimeException']))], finally_block=None, label=None, resources=None)]))]))]))], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=set, postfix_operators=[], prefix_operators=[], qualifier=scanInProgress, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
annotation[@] identifier[Trivial] annotation[@] identifier[FFDCIgnore] operator[SEP] identifier[InterruptedException] operator[SEP] Keyword[class] operator[SEP] Keyword[void] identifier[scheduledScan] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[isStopped] operator[SEP] Keyword[return] operator[SEP] Keyword[if] operator[SEP] identifier[FileMonitor] operator[SEP] identifier[MONITOR_TYPE_EXTERNAL] operator[SEP] identifier[equals] operator[SEP] identifier[monitorRef] operator[SEP] identifier[getProperty] operator[SEP] identifier[FileMonitor] operator[SEP] identifier[MONITOR_TYPE] 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[SEP] operator[SEP] } Keyword[return] operator[SEP] } Keyword[if] operator[SEP] identifier[FrameworkState] operator[SEP] identifier[isStopping] 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[SEP] operator[SEP] } Keyword[return] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[scanInProgress] operator[SEP] identifier[compareAndSet] operator[SEP] literal[boolean] , literal[boolean] 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[SEP] operator[SEP] } Keyword[return] operator[SEP] } Keyword[try] { identifier[Set] operator[<] identifier[File] operator[>] identifier[created] operator[=] Keyword[new] identifier[HashSet] operator[<] identifier[File] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[File] operator[>] identifier[deleted] operator[=] Keyword[new] identifier[HashSet] operator[<] identifier[File] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[File] operator[>] identifier[modified] operator[=] Keyword[new] identifier[HashSet] operator[<] identifier[File] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[scanLock] operator[SEP] identifier[tryLock] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { Keyword[if] operator[SEP] operator[!] identifier[doDestroy] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[monitorState] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[==] identifier[MonitorState] operator[SEP] identifier[ACTIVE] operator[SEP] identifier[ordinal] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[coreService] operator[SEP] identifier[isDetailedScanTraceEnabled] operator[SEP] operator[SEP] operator[&&] 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] , identifier[updateMonitors] operator[SEP] operator[SEP] } identifier[scanForUpdates] operator[SEP] identifier[created] , identifier[deleted] , identifier[modified] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[created] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[||] operator[!] identifier[modified] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[||] operator[!] identifier[deleted] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[boolean] identifier[oneClean] operator[=] literal[boolean] operator[SEP] Keyword[boolean] identifier[twoClean] operator[=] literal[boolean] operator[SEP] identifier[List] operator[<] identifier[File] operator[>] identifier[createdCheck] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[File] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[File] operator[>] identifier[deletedCheck] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[File] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[File] operator[>] identifier[modifiedCheck] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[File] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[do] { Keyword[try] { identifier[Thread] operator[SEP] identifier[sleep] operator[SEP] identifier[TIME_TO_WAIT_FOR_COPY_TO_COMPLETE] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InterruptedException] identifier[ex] operator[SEP] { } identifier[createdCheck] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[deletedCheck] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[modifiedCheck] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[scanForUpdates] operator[SEP] identifier[createdCheck] , identifier[deletedCheck] , identifier[modifiedCheck] operator[SEP] operator[SEP] identifier[resolveChangesForScheduledScan] operator[SEP] identifier[created] , identifier[deleted] , identifier[modified] , identifier[createdCheck] , identifier[deletedCheck] , identifier[modifiedCheck] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[createdCheck] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[&&] identifier[modifiedCheck] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[&&] identifier[deletedCheck] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[oneClean] operator[SEP] { identifier[twoClean] operator[=] literal[boolean] operator[SEP] } Keyword[else] { identifier[oneClean] operator[=] literal[boolean] operator[SEP] } } Keyword[else] { identifier[oneClean] operator[=] literal[boolean] operator[SEP] } } Keyword[while] operator[SEP] operator[!] identifier[twoClean] operator[&&] identifier[FrameworkState] operator[SEP] identifier[isValid] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[RuntimeException] identifier[e] operator[SEP] { } Keyword[finally] { Keyword[try] { identifier[doDestroy] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { identifier[scanLock] operator[SEP] identifier[unlock] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] operator[!] identifier[created] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[||] operator[!] identifier[modified] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[||] operator[!] identifier[deleted] operator[SEP] identifier[isEmpty] 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] , identifier[created] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[+] literal[String] , identifier[modified] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[+] literal[String] , identifier[deleted] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[+] literal[String] , literal[String] operator[+] identifier[FrameworkState] operator[SEP] identifier[isValid] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[FrameworkState] operator[SEP] identifier[isValid] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { identifier[monitor] operator[SEP] identifier[onChange] operator[SEP] identifier[created] , identifier[modified] , identifier[deleted] operator[SEP] operator[SEP] identifier[exceptionCount] operator[=] Other[0] operator[SEP] } Keyword[catch] operator[SEP] identifier[RuntimeException] identifier[e] operator[SEP] { identifier[exceptionCount] operator[++] operator[SEP] identifier[Tr] operator[SEP] identifier[warning] operator[SEP] identifier[tc] , literal[String] , identifier[created] , identifier[modified] , identifier[deleted] , identifier[monitor] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] , identifier[e] operator[SEP] identifier[getLocalizedMessage] operator[SEP] 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[exceptionCount] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[exceptionCount] operator[>=] identifier[NUMBER_OF_EXCEPTIONS_BEFORE_DISABLING_MONITOR] operator[SEP] { identifier[Tr] operator[SEP] identifier[warning] operator[SEP] identifier[tc] , literal[String] , identifier[NUMBER_OF_EXCEPTIONS_BEFORE_DISABLING_MONITOR] , identifier[monitor] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[exceptionCount] operator[=] Other[0] operator[SEP] identifier[destroy] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[else] { identifier[stop] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[coreService] operator[SEP] identifier[isDetailedScanTraceEnabled] operator[SEP] operator[SEP] operator[&&] 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[SEP] operator[SEP] } } } Keyword[finally] { identifier[scanInProgress] operator[SEP] identifier[set] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } }
@Override public AbstractHttpEntity harvest(long generation) { ByteBufferEntity enty; try { m_writers.get(generation).flush(); enty = new ByteBufferEntity(m_bbos.get(generation).toByteBuffer(), CSVContentType); } catch (IOException e) { throw new BulkException("unable to flush CSVWriter", e); } finally { m_bbos.get(generation).reset(); } return enty; }
class class_name[name] begin[{] method[harvest, return_type[type[AbstractHttpEntity]], modifier[public], parameter[generation]] begin[{] local_variable[type[ByteBufferEntity], enty] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=generation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=m_writers, selectors=[MethodInvocation(arguments=[], member=flush, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=enty, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=generation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=m_bbos, selectors=[MethodInvocation(arguments=[], member=toByteBuffer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=CSVContentType, 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=ByteBufferEntity, sub_type=None))), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="unable to flush CSVWriter"), 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=BulkException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=generation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=m_bbos, selectors=[MethodInvocation(arguments=[], member=reset, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], label=None, resources=None) return[member[.enty]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[AbstractHttpEntity] identifier[harvest] operator[SEP] Keyword[long] identifier[generation] operator[SEP] { identifier[ByteBufferEntity] identifier[enty] operator[SEP] Keyword[try] { identifier[m_writers] operator[SEP] identifier[get] operator[SEP] identifier[generation] operator[SEP] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] identifier[enty] operator[=] Keyword[new] identifier[ByteBufferEntity] operator[SEP] identifier[m_bbos] operator[SEP] identifier[get] operator[SEP] identifier[generation] operator[SEP] operator[SEP] identifier[toByteBuffer] operator[SEP] operator[SEP] , identifier[CSVContentType] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[BulkException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[finally] { identifier[m_bbos] operator[SEP] identifier[get] operator[SEP] identifier[generation] operator[SEP] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[enty] operator[SEP] }
@Override public SIPDialog createDialog(SipProviderImpl sipProvider, SIPResponse sipResponse) { if (sipCache.inLocalMode()) { return super.createDialog(sipProvider, sipResponse); } else { return (SIPDialog) HASipDialogFactory.createHASipDialog(replicationStrategy, sipProvider, sipResponse); } }
class class_name[name] begin[{] method[createDialog, return_type[type[SIPDialog]], modifier[public], parameter[sipProvider, sipResponse]] begin[{] if[call[sipCache.inLocalMode, parameter[]]] begin[{] return[SuperMethodInvocation(arguments=[MemberReference(member=sipProvider, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sipResponse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createDialog, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] else begin[{] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=replicationStrategy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sipProvider, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sipResponse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createHASipDialog, postfix_operators=[], prefix_operators=[], qualifier=HASipDialogFactory, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=SIPDialog, sub_type=None))] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[SIPDialog] identifier[createDialog] operator[SEP] identifier[SipProviderImpl] identifier[sipProvider] , identifier[SIPResponse] identifier[sipResponse] operator[SEP] { Keyword[if] operator[SEP] identifier[sipCache] operator[SEP] identifier[inLocalMode] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Keyword[super] operator[SEP] identifier[createDialog] operator[SEP] identifier[sipProvider] , identifier[sipResponse] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] operator[SEP] identifier[SIPDialog] operator[SEP] identifier[HASipDialogFactory] operator[SEP] identifier[createHASipDialog] operator[SEP] identifier[replicationStrategy] , identifier[sipProvider] , identifier[sipResponse] operator[SEP] operator[SEP] } }
private List<SequenceState<S, O, D>> retrieveMostLikelySequence() { // Otherwise an HMM break would have occurred and message would be null. assert !message.isEmpty(); final S lastState = mostLikelyState(); // Retrieve most likely state sequence in reverse order final List<SequenceState<S, O, D>> result = new ArrayList<>(); ExtendedState<S, O, D> es = lastExtendedStates.get(lastState); while(es != null) { final SequenceState<S, O, D> ss = new SequenceState<>(es.state, es.observation, es.transitionDescriptor); result.add(ss); es = es.backPointer; } Collections.reverse(result); return result; }
class class_name[name] begin[{] method[retrieveMostLikelySequence, return_type[type[List]], modifier[private], parameter[]] begin[{] AssertStatement(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=message, selectors=[], type_arguments=None), label=None, value=None) local_variable[type[S], lastState] local_variable[type[List], result] local_variable[type[ExtendedState], es] while[binary_operation[member[.es], !=, literal[null]]] begin[{] local_variable[type[SequenceState], ss] call[result.add, parameter[member[.ss]]] assign[member[.es], member[es.backPointer]] end[}] call[Collections.reverse, parameter[member[.result]]] return[member[.result]] end[}] END[}]
Keyword[private] identifier[List] operator[<] identifier[SequenceState] operator[<] identifier[S] , identifier[O] , identifier[D] operator[>] operator[>] identifier[retrieveMostLikelySequence] operator[SEP] operator[SEP] { Keyword[assert] operator[!] identifier[message] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[S] identifier[lastState] operator[=] identifier[mostLikelyState] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[SequenceState] operator[<] identifier[S] , identifier[O] , identifier[D] operator[>] operator[>] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[ExtendedState] operator[<] identifier[S] , identifier[O] , identifier[D] operator[>] identifier[es] operator[=] identifier[lastExtendedStates] operator[SEP] identifier[get] operator[SEP] identifier[lastState] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[es] operator[!=] Other[null] operator[SEP] { Keyword[final] identifier[SequenceState] operator[<] identifier[S] , identifier[O] , identifier[D] operator[>] identifier[ss] operator[=] Keyword[new] identifier[SequenceState] operator[<] operator[>] operator[SEP] identifier[es] operator[SEP] identifier[state] , identifier[es] operator[SEP] identifier[observation] , identifier[es] operator[SEP] identifier[transitionDescriptor] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[add] operator[SEP] identifier[ss] operator[SEP] operator[SEP] identifier[es] operator[=] identifier[es] operator[SEP] identifier[backPointer] operator[SEP] } identifier[Collections] operator[SEP] identifier[reverse] operator[SEP] identifier[result] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
@Override public java.util.concurrent.Future<DescribeOptionGroupsResult> describeOptionGroupsAsync( com.amazonaws.handlers.AsyncHandler<DescribeOptionGroupsRequest, DescribeOptionGroupsResult> asyncHandler) { return describeOptionGroupsAsync(new DescribeOptionGroupsRequest(), asyncHandler); }
class class_name[name] begin[{] method[describeOptionGroupsAsync, return_type[type[java]], modifier[public], parameter[asyncHandler]] begin[{] return[call[.describeOptionGroupsAsync, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DescribeOptionGroupsRequest, sub_type=None)), member[.asyncHandler]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[concurrent] operator[SEP] identifier[Future] operator[<] identifier[DescribeOptionGroupsResult] operator[>] identifier[describeOptionGroupsAsync] operator[SEP] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[handlers] operator[SEP] identifier[AsyncHandler] operator[<] identifier[DescribeOptionGroupsRequest] , identifier[DescribeOptionGroupsResult] operator[>] identifier[asyncHandler] operator[SEP] { Keyword[return] identifier[describeOptionGroupsAsync] operator[SEP] Keyword[new] identifier[DescribeOptionGroupsRequest] operator[SEP] operator[SEP] , identifier[asyncHandler] operator[SEP] operator[SEP] }
public static void printDecimal(Appendable out, BigDecimal decimal) throws IOException { _Private_IonTextAppender appender = _Private_IonTextAppender.forAppendable(out); appender.printDecimal(STANDARD, decimal); }
class class_name[name] begin[{] method[printDecimal, return_type[void], modifier[public static], parameter[out, decimal]] begin[{] local_variable[type[_Private_IonTextAppender], appender] call[appender.printDecimal, parameter[member[.STANDARD], member[.decimal]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[printDecimal] operator[SEP] identifier[Appendable] identifier[out] , identifier[BigDecimal] identifier[decimal] operator[SEP] Keyword[throws] identifier[IOException] { identifier[_Private_IonTextAppender] identifier[appender] operator[=] identifier[_Private_IonTextAppender] operator[SEP] identifier[forAppendable] operator[SEP] identifier[out] operator[SEP] operator[SEP] identifier[appender] operator[SEP] identifier[printDecimal] operator[SEP] identifier[STANDARD] , identifier[decimal] operator[SEP] operator[SEP] }
Rule VoiceSubname() { return SequenceS( FirstOfS(IgnoreCase("subname="), IgnoreCase("sname="), IgnoreCase("snm=")), String("\""), ZeroOrMore(NonQuote()).label(VoiceSubname).suppressSubnodes(), String("\"")); }
class class_name[name] begin[{] method[VoiceSubname, return_type[type[Rule]], modifier[default], parameter[]] begin[{] return[call[.SequenceS, parameter[call[.FirstOfS, parameter[call[.IgnoreCase, parameter[literal["subname="]]], call[.IgnoreCase, parameter[literal["sname="]]], call[.IgnoreCase, parameter[literal["snm="]]]]], call[.String, parameter[literal["\""]]], call[.ZeroOrMore, parameter[call[.NonQuote, parameter[]]]], call[.String, parameter[literal["\""]]]]]] end[}] END[}]
identifier[Rule] identifier[VoiceSubname] operator[SEP] operator[SEP] { Keyword[return] identifier[SequenceS] operator[SEP] identifier[FirstOfS] operator[SEP] identifier[IgnoreCase] operator[SEP] literal[String] operator[SEP] , identifier[IgnoreCase] operator[SEP] literal[String] operator[SEP] , identifier[IgnoreCase] operator[SEP] literal[String] operator[SEP] operator[SEP] , identifier[String] operator[SEP] literal[String] operator[SEP] , identifier[ZeroOrMore] operator[SEP] identifier[NonQuote] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[label] operator[SEP] identifier[VoiceSubname] operator[SEP] operator[SEP] identifier[suppressSubnodes] operator[SEP] operator[SEP] , identifier[String] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] }
private ClassName getProxyClassName(TypeMirror param) { Element element = getBindingManager().getElement(param.toString()); return ClassName.get(getPackage(element).getQualifiedName().toString(), element.getSimpleName() + ClassBuilder.PROXY_SUFFIX); }
class class_name[name] begin[{] method[getProxyClassName, return_type[type[ClassName]], modifier[private], parameter[param]] begin[{] local_variable[type[Element], element] return[call[ClassName.get, parameter[call[.getPackage, parameter[member[.element]]], binary_operation[call[element.getSimpleName, parameter[]], +, member[ClassBuilder.PROXY_SUFFIX]]]]] end[}] END[}]
Keyword[private] identifier[ClassName] identifier[getProxyClassName] operator[SEP] identifier[TypeMirror] identifier[param] operator[SEP] { identifier[Element] identifier[element] operator[=] identifier[getBindingManager] operator[SEP] operator[SEP] operator[SEP] identifier[getElement] operator[SEP] identifier[param] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[ClassName] operator[SEP] identifier[get] operator[SEP] identifier[getPackage] operator[SEP] identifier[element] operator[SEP] operator[SEP] identifier[getQualifiedName] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[element] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[+] identifier[ClassBuilder] operator[SEP] identifier[PROXY_SUFFIX] operator[SEP] operator[SEP] }
@SuppressWarnings("unchecked") protected <T> T set(DBIDRef id, int index, T value) { Object[] d = data.get(DBIDUtil.deref(id)); if(d == null) { d = new Object[rlen]; data.put(DBIDUtil.deref(id), d); } T ret = (T) d[index]; d[index] = value; return ret; }
class class_name[name] begin[{] method[set, return_type[type[T]], modifier[protected], parameter[id, index, value]] begin[{] local_variable[type[Object], d] if[binary_operation[member[.d], ==, literal[null]]] begin[{] assign[member[.d], ArrayCreator(dimensions=[MemberReference(member=rlen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))] call[data.put, parameter[call[DBIDUtil.deref, parameter[member[.id]]], member[.d]]] else begin[{] None end[}] local_variable[type[T], ret] assign[member[.d], member[.value]] return[member[.ret]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] operator[<] identifier[T] operator[>] identifier[T] identifier[set] operator[SEP] identifier[DBIDRef] identifier[id] , Keyword[int] identifier[index] , identifier[T] identifier[value] operator[SEP] { identifier[Object] operator[SEP] operator[SEP] identifier[d] operator[=] identifier[data] operator[SEP] identifier[get] operator[SEP] identifier[DBIDUtil] operator[SEP] identifier[deref] operator[SEP] identifier[id] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[d] operator[==] Other[null] operator[SEP] { identifier[d] operator[=] Keyword[new] identifier[Object] operator[SEP] identifier[rlen] operator[SEP] operator[SEP] identifier[data] operator[SEP] identifier[put] operator[SEP] identifier[DBIDUtil] operator[SEP] identifier[deref] operator[SEP] identifier[id] operator[SEP] , identifier[d] operator[SEP] operator[SEP] } identifier[T] identifier[ret] operator[=] operator[SEP] identifier[T] operator[SEP] identifier[d] operator[SEP] identifier[index] operator[SEP] operator[SEP] identifier[d] operator[SEP] identifier[index] operator[SEP] operator[=] identifier[value] operator[SEP] Keyword[return] identifier[ret] operator[SEP] }
public alluxio.grpc.UnmountPOptions getOptions() { return options_ == null ? alluxio.grpc.UnmountPOptions.getDefaultInstance() : options_; }
class class_name[name] begin[{] method[getOptions, return_type[type[alluxio]], modifier[public], parameter[]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=options_, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MemberReference(member=options_, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[], member=getDefaultInstance, postfix_operators=[], prefix_operators=[], qualifier=alluxio.grpc.UnmountPOptions, selectors=[], type_arguments=None))] end[}] END[}]
Keyword[public] identifier[alluxio] operator[SEP] identifier[grpc] operator[SEP] identifier[UnmountPOptions] identifier[getOptions] operator[SEP] operator[SEP] { Keyword[return] identifier[options_] operator[==] Other[null] operator[?] identifier[alluxio] operator[SEP] identifier[grpc] operator[SEP] identifier[UnmountPOptions] operator[SEP] identifier[getDefaultInstance] operator[SEP] operator[SEP] operator[:] identifier[options_] operator[SEP] }
private List<GeneratorTask> createWaiterOpFunctionClassTasks() throws IOException { List<GeneratorTask> generatorTasks = new ArrayList<>(); List<String> generatedOperations = new ArrayList<>(); for (Map.Entry<String, WaiterDefinitionModel> entry : model.getWaiters().entrySet()) { final WaiterDefinitionModel waiterModel = entry.getValue(); if (!generatedOperations.contains(waiterModel.getOperationName())) { generatedOperations.add(waiterModel.getOperationName()); Map<String, Object> dataModel = ImmutableMapParameter.of( "fileHeader", model.getFileHeader(), "waiter", waiterModel, "operation", model.getOperation(waiterModel.getOperationName()), "metadata", model.getMetadata()); final String className = waiterModel.getOperationModel().getOperationName() + "Function"; generatorTasks.add(new FreemarkerGeneratorTask(waiterClassDir, className, freemarker.getWaiterSDKFunctionTemplate(), dataModel)); } } return generatorTasks; }
class class_name[name] begin[{] method[createWaiterOpFunctionClassTasks, return_type[type[List]], modifier[private], parameter[]] begin[{] local_variable[type[List], generatorTasks] local_variable[type[List], generatedOperations] 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=waiterModel)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=WaiterDefinitionModel, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getOperationName, postfix_operators=[], prefix_operators=[], qualifier=waiterModel, selectors=[], type_arguments=None)], member=contains, postfix_operators=[], prefix_operators=['!'], qualifier=generatedOperations, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getOperationName, postfix_operators=[], prefix_operators=[], qualifier=waiterModel, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=generatedOperations, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="fileHeader"), MethodInvocation(arguments=[], member=getFileHeader, postfix_operators=[], prefix_operators=[], qualifier=model, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="waiter"), MemberReference(member=waiterModel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="operation"), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getOperationName, postfix_operators=[], prefix_operators=[], qualifier=waiterModel, selectors=[], type_arguments=None)], member=getOperation, postfix_operators=[], prefix_operators=[], qualifier=model, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="metadata"), MethodInvocation(arguments=[], member=getMetadata, postfix_operators=[], prefix_operators=[], qualifier=model, selectors=[], type_arguments=None)], member=of, postfix_operators=[], prefix_operators=[], qualifier=ImmutableMapParameter, selectors=[], type_arguments=None), name=dataModel)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=Map, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getOperationModel, postfix_operators=[], prefix_operators=[], qualifier=waiterModel, selectors=[MethodInvocation(arguments=[], member=getOperationName, 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="Function"), operator=+), name=className)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=waiterClassDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getWaiterSDKFunctionTemplate, postfix_operators=[], prefix_operators=[], qualifier=freemarker, selectors=[], type_arguments=None), MemberReference(member=dataModel, 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=FreemarkerGeneratorTask, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=generatorTasks, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getWaiters, postfix_operators=[], prefix_operators=[], qualifier=model, selectors=[MethodInvocation(arguments=[], member=entrySet, 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=entry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=WaiterDefinitionModel, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None) return[member[.generatorTasks]] end[}] END[}]
Keyword[private] identifier[List] operator[<] identifier[GeneratorTask] operator[>] identifier[createWaiterOpFunctionClassTasks] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[List] operator[<] identifier[GeneratorTask] operator[>] identifier[generatorTasks] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[generatedOperations] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[WaiterDefinitionModel] operator[>] identifier[entry] operator[:] identifier[model] operator[SEP] identifier[getWaiters] operator[SEP] operator[SEP] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[WaiterDefinitionModel] identifier[waiterModel] operator[=] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[generatedOperations] operator[SEP] identifier[contains] operator[SEP] identifier[waiterModel] operator[SEP] identifier[getOperationName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[generatedOperations] operator[SEP] identifier[add] operator[SEP] identifier[waiterModel] operator[SEP] identifier[getOperationName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[dataModel] operator[=] identifier[ImmutableMapParameter] operator[SEP] identifier[of] operator[SEP] literal[String] , identifier[model] operator[SEP] identifier[getFileHeader] operator[SEP] operator[SEP] , literal[String] , identifier[waiterModel] , literal[String] , identifier[model] operator[SEP] identifier[getOperation] operator[SEP] identifier[waiterModel] operator[SEP] identifier[getOperationName] operator[SEP] operator[SEP] operator[SEP] , literal[String] , identifier[model] operator[SEP] identifier[getMetadata] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[className] operator[=] identifier[waiterModel] operator[SEP] identifier[getOperationModel] operator[SEP] operator[SEP] operator[SEP] identifier[getOperationName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] identifier[generatorTasks] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[FreemarkerGeneratorTask] operator[SEP] identifier[waiterClassDir] , identifier[className] , identifier[freemarker] operator[SEP] identifier[getWaiterSDKFunctionTemplate] operator[SEP] operator[SEP] , identifier[dataModel] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[generatorTasks] operator[SEP] }
public static <E> Function<Object, E> constant(@Nullable E value) { return input -> value; }
class class_name[name] begin[{] method[constant, return_type[type[Function]], modifier[public static], parameter[value]] begin[{] return[LambdaExpression(body=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), parameters=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[E] operator[>] identifier[Function] operator[<] identifier[Object] , identifier[E] operator[>] identifier[constant] operator[SEP] annotation[@] identifier[Nullable] identifier[E] identifier[value] operator[SEP] { Keyword[return] identifier[input] operator[->] identifier[value] operator[SEP] }
public void activateTooltip(boolean show) { if (show) { ToolTipManager.sharedInstance().registerComponent(this); } else { ToolTipManager.sharedInstance().unregisterComponent(this); } ToolTipManager.sharedInstance().setEnabled(show); }
class class_name[name] begin[{] method[activateTooltip, return_type[void], modifier[public], parameter[show]] begin[{] if[member[.show]] begin[{] call[ToolTipManager.sharedInstance, parameter[]] else begin[{] call[ToolTipManager.sharedInstance, parameter[]] end[}] call[ToolTipManager.sharedInstance, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[activateTooltip] operator[SEP] Keyword[boolean] identifier[show] operator[SEP] { Keyword[if] operator[SEP] identifier[show] operator[SEP] { identifier[ToolTipManager] operator[SEP] identifier[sharedInstance] operator[SEP] operator[SEP] operator[SEP] identifier[registerComponent] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } Keyword[else] { identifier[ToolTipManager] operator[SEP] identifier[sharedInstance] operator[SEP] operator[SEP] operator[SEP] identifier[unregisterComponent] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } identifier[ToolTipManager] operator[SEP] identifier[sharedInstance] operator[SEP] operator[SEP] operator[SEP] identifier[setEnabled] operator[SEP] identifier[show] operator[SEP] operator[SEP] }
protected final void addValidator(String name, String validatorId) { _factories.put(name, new ValidatorHandlerFactory(validatorId)); }
class class_name[name] begin[{] method[addValidator, return_type[void], modifier[final protected], parameter[name, validatorId]] begin[{] call[_factories.put, parameter[member[.name], ClassCreator(arguments=[MemberReference(member=validatorId, 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=ValidatorHandlerFactory, sub_type=None))]] end[}] END[}]
Keyword[protected] Keyword[final] Keyword[void] identifier[addValidator] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[validatorId] operator[SEP] { identifier[_factories] operator[SEP] identifier[put] operator[SEP] identifier[name] , Keyword[new] identifier[ValidatorHandlerFactory] operator[SEP] identifier[validatorId] operator[SEP] operator[SEP] operator[SEP] }
@Override public void reportMetric(final IMetric<?> metric) throws MetricException { final String metricName = metric.getName(); if (!this.historyListMapping.containsKey(metricName)) { logger.info("First time capturing metric: " + metricName); this.historyListMapping.put(metricName, new LinkedBlockingDeque<>()); } synchronized (this.historyListMapping.get(metricName)) { logger.debug("Ingesting metric: " + metricName); this.historyListMapping.get(metricName).add(new InMemoryHistoryNode(metric.getValue())); cleanUsingTime(metricName, this.historyListMapping.get(metricName).peekLast().getTimestamp()); } }
class class_name[name] begin[{] method[reportMetric, return_type[void], modifier[public], parameter[metric]] begin[{] local_variable[type[String], metricName] if[THIS[member[None.historyListMapping]call[None.containsKey, parameter[member[.metricName]]]]] begin[{] call[logger.info, parameter[binary_operation[literal["First time capturing metric: "], +, member[.metricName]]]] THIS[member[None.historyListMapping]call[None.put, parameter[member[.metricName], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=LinkedBlockingDeque, sub_type=None))]]] else begin[{] None end[}] SYNCHRONIZED[THIS[member[None.historyListMapping]call[None.get, parameter[member[.metricName]]]]] BEGIN[{] call[logger.debug, parameter[binary_operation[literal["Ingesting metric: "], +, member[.metricName]]]] THIS[member[None.historyListMapping]call[None.get, parameter[member[.metricName]]]call[None.add, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=metric, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InMemoryHistoryNode, sub_type=None))]]] call[.cleanUsingTime, parameter[member[.metricName], THIS[member[None.historyListMapping]call[None.get, parameter[member[.metricName]]]call[None.peekLast, parameter[]]call[None.getTimestamp, parameter[]]]]] END[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[reportMetric] operator[SEP] Keyword[final] identifier[IMetric] operator[<] operator[?] operator[>] identifier[metric] operator[SEP] Keyword[throws] identifier[MetricException] { Keyword[final] identifier[String] identifier[metricName] operator[=] identifier[metric] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] Keyword[this] operator[SEP] identifier[historyListMapping] operator[SEP] identifier[containsKey] operator[SEP] identifier[metricName] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[metricName] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[historyListMapping] operator[SEP] identifier[put] operator[SEP] identifier[metricName] , Keyword[new] identifier[LinkedBlockingDeque] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] identifier[historyListMapping] operator[SEP] identifier[get] operator[SEP] identifier[metricName] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[metricName] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[historyListMapping] operator[SEP] identifier[get] operator[SEP] identifier[metricName] operator[SEP] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[InMemoryHistoryNode] operator[SEP] identifier[metric] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[cleanUsingTime] operator[SEP] identifier[metricName] , Keyword[this] operator[SEP] identifier[historyListMapping] operator[SEP] identifier[get] operator[SEP] identifier[metricName] operator[SEP] operator[SEP] identifier[peekLast] operator[SEP] operator[SEP] operator[SEP] identifier[getTimestamp] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
private HttpURLConnection openConnection(URL url, Request<?> request) throws IOException { HttpURLConnection connection = createConnection(url); int timeoutMs = request.getTimeoutMs(); connection.setConnectTimeout(timeoutMs); connection.setReadTimeout(timeoutMs); connection.setUseCaches(false); connection.setDoInput(true); // use caller-provided custom SslSocketFactory, if any, for HTTPS if ("https".equals(url.getProtocol()) && mSslSocketFactory != null) { ((HttpsURLConnection)connection).setSSLSocketFactory(mSslSocketFactory); } return connection; }
class class_name[name] begin[{] method[openConnection, return_type[type[HttpURLConnection]], modifier[private], parameter[url, request]] begin[{] local_variable[type[HttpURLConnection], connection] local_variable[type[int], timeoutMs] call[connection.setConnectTimeout, parameter[member[.timeoutMs]]] call[connection.setReadTimeout, parameter[member[.timeoutMs]]] call[connection.setUseCaches, parameter[literal[false]]] call[connection.setDoInput, parameter[literal[true]]] if[binary_operation[literal["https"], &&, binary_operation[member[.mSslSocketFactory], !=, literal[null]]]] begin[{] Cast(expression=MemberReference(member=connection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=HttpsURLConnection, sub_type=None)) else begin[{] None end[}] return[member[.connection]] end[}] END[}]
Keyword[private] identifier[HttpURLConnection] identifier[openConnection] operator[SEP] identifier[URL] identifier[url] , identifier[Request] operator[<] operator[?] operator[>] identifier[request] operator[SEP] Keyword[throws] identifier[IOException] { identifier[HttpURLConnection] identifier[connection] operator[=] identifier[createConnection] operator[SEP] identifier[url] operator[SEP] operator[SEP] Keyword[int] identifier[timeoutMs] operator[=] identifier[request] operator[SEP] identifier[getTimeoutMs] operator[SEP] operator[SEP] operator[SEP] identifier[connection] operator[SEP] identifier[setConnectTimeout] operator[SEP] identifier[timeoutMs] operator[SEP] operator[SEP] identifier[connection] operator[SEP] identifier[setReadTimeout] operator[SEP] identifier[timeoutMs] operator[SEP] operator[SEP] identifier[connection] operator[SEP] identifier[setUseCaches] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[connection] operator[SEP] identifier[setDoInput] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[url] operator[SEP] identifier[getProtocol] operator[SEP] operator[SEP] operator[SEP] operator[&&] identifier[mSslSocketFactory] operator[!=] Other[null] operator[SEP] { operator[SEP] operator[SEP] identifier[HttpsURLConnection] operator[SEP] identifier[connection] operator[SEP] operator[SEP] identifier[setSSLSocketFactory] operator[SEP] identifier[mSslSocketFactory] operator[SEP] operator[SEP] } Keyword[return] identifier[connection] operator[SEP] }
public static Vector<String> toVector( String[] array ) { if( array == null ) { return new Vector<String>( 0 ); } Vector<String> v = new Vector<String>( array.length ); v.copyInto( array ); return v; }
class class_name[name] begin[{] method[toVector, return_type[type[Vector]], modifier[public static], parameter[array]] begin[{] if[binary_operation[member[.array], ==, literal[null]]] begin[{] return[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], 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=Vector, sub_type=None))] else begin[{] None end[}] local_variable[type[Vector], v] call[v.copyInto, parameter[member[.array]]] return[member[.v]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Vector] operator[<] identifier[String] operator[>] identifier[toVector] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[array] operator[SEP] { Keyword[if] operator[SEP] identifier[array] operator[==] Other[null] operator[SEP] { Keyword[return] Keyword[new] identifier[Vector] operator[<] identifier[String] operator[>] operator[SEP] Other[0] operator[SEP] operator[SEP] } identifier[Vector] operator[<] identifier[String] operator[>] identifier[v] operator[=] Keyword[new] identifier[Vector] operator[<] identifier[String] operator[>] operator[SEP] identifier[array] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[v] operator[SEP] identifier[copyInto] operator[SEP] identifier[array] operator[SEP] operator[SEP] Keyword[return] identifier[v] operator[SEP] }
private boolean containsNullValue() { Entry<K,V>[] tab = getTable(); for (int i = tab.length; i-- > 0;) for (Entry<K,V> e = tab[i]; e != null; e = e.next) if (e.value==null) return true; return false; }
class class_name[name] begin[{] method[containsNullValue, return_type[type[boolean]], modifier[private], parameter[]] begin[{] local_variable[type[Entry], tab] ForStatement(body=ForStatement(body=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=e, 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=MemberReference(member=tab, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=e)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=K, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None))], dimensions=[], name=Entry, sub_type=None)), update=[Assignment(expressionl=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=next, postfix_operators=[], prefix_operators=[], qualifier=e, 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=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=tab, selectors=[]), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=None), label=None) return[literal[false]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[containsNullValue] operator[SEP] operator[SEP] { identifier[Entry] operator[<] identifier[K] , identifier[V] operator[>] operator[SEP] operator[SEP] identifier[tab] operator[=] identifier[getTable] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[tab] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[--] operator[>] Other[0] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Entry] operator[<] identifier[K] , identifier[V] operator[>] identifier[e] operator[=] identifier[tab] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[e] operator[!=] Other[null] operator[SEP] identifier[e] operator[=] identifier[e] operator[SEP] identifier[next] operator[SEP] Keyword[if] operator[SEP] identifier[e] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
public void reinitialize () { m_aRWLock.writeLocked ( () -> { m_aProtocols.clear (); // Add all default protocols for (final EURLProtocol aProtocol : EURLProtocol.values ()) m_aProtocols.put (aProtocol.getProtocol (), aProtocol); }); // Load all SPI implementations for (final IURLProtocolRegistrarSPI aRegistrar : ServiceLoaderHelper.getAllSPIImplementations (IURLProtocolRegistrarSPI.class)) { final ICommonsSet <? extends IURLProtocol> aURLProtocols = aRegistrar.getAllProtocols (); if (aURLProtocols != null) for (final IURLProtocol aSPIProtocol : aURLProtocols) registerProtocol (aSPIProtocol); } if (LOGGER.isDebugEnabled ()) LOGGER.debug (getRegisteredProtocolCount () + " URL protocols registered"); }
class class_name[name] begin[{] method[reinitialize, return_type[void], modifier[public], parameter[]] begin[{] call[m_aRWLock.writeLocked, parameter[LambdaExpression(body=[StatementExpression(expression=MethodInvocation(arguments=[], member=clear, postfix_operators=[], prefix_operators=[], qualifier=m_aProtocols, selectors=[], type_arguments=None), label=None), ForStatement(body=StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getProtocol, postfix_operators=[], prefix_operators=[], qualifier=aProtocol, selectors=[], type_arguments=None), MemberReference(member=aProtocol, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=m_aProtocols, selectors=[], type_arguments=None), label=None), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=EURLProtocol, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=aProtocol)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=EURLProtocol, sub_type=None))), label=None)], parameters=[])]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getAllProtocols, postfix_operators=[], prefix_operators=[], qualifier=aRegistrar, selectors=[], type_arguments=None), name=aURLProtocols)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=extends, type=ReferenceType(arguments=None, dimensions=[], name=IURLProtocol, sub_type=None))], dimensions=[], name=ICommonsSet, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=aURLProtocols, 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=ForStatement(body=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=aSPIProtocol, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=registerProtocol, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), control=EnhancedForControl(iterable=MemberReference(member=aURLProtocols, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=aSPIProtocol)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=IURLProtocol, sub_type=None))), label=None))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IURLProtocolRegistrarSPI, sub_type=None))], member=getAllSPIImplementations, postfix_operators=[], prefix_operators=[], qualifier=ServiceLoaderHelper, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=aRegistrar)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=IURLProtocolRegistrarSPI, sub_type=None))), label=None) if[call[LOGGER.isDebugEnabled, parameter[]]] begin[{] call[LOGGER.debug, parameter[binary_operation[call[.getRegisteredProtocolCount, parameter[]], +, literal[" URL protocols registered"]]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[reinitialize] operator[SEP] operator[SEP] { identifier[m_aRWLock] operator[SEP] identifier[writeLocked] operator[SEP] operator[SEP] operator[SEP] operator[->] { identifier[m_aProtocols] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[EURLProtocol] identifier[aProtocol] operator[:] identifier[EURLProtocol] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] identifier[m_aProtocols] operator[SEP] identifier[put] operator[SEP] identifier[aProtocol] operator[SEP] identifier[getProtocol] operator[SEP] operator[SEP] , identifier[aProtocol] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[IURLProtocolRegistrarSPI] identifier[aRegistrar] operator[:] identifier[ServiceLoaderHelper] operator[SEP] identifier[getAllSPIImplementations] operator[SEP] identifier[IURLProtocolRegistrarSPI] operator[SEP] Keyword[class] operator[SEP] operator[SEP] { Keyword[final] identifier[ICommonsSet] operator[<] operator[?] Keyword[extends] identifier[IURLProtocol] operator[>] identifier[aURLProtocols] operator[=] identifier[aRegistrar] operator[SEP] identifier[getAllProtocols] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[aURLProtocols] operator[!=] Other[null] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[IURLProtocol] identifier[aSPIProtocol] operator[:] identifier[aURLProtocols] operator[SEP] identifier[registerProtocol] operator[SEP] identifier[aSPIProtocol] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[LOGGER] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] identifier[getRegisteredProtocolCount] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] }
public static AnnotationValue getAnnotationValue( AnnotationMirror annotationMirror, String elementName) { return getAnnotationElementAndValue(annotationMirror, elementName).getValue(); }
class class_name[name] begin[{] method[getAnnotationValue, return_type[type[AnnotationValue]], modifier[public static], parameter[annotationMirror, elementName]] begin[{] return[call[.getAnnotationElementAndValue, parameter[member[.annotationMirror], member[.elementName]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[AnnotationValue] identifier[getAnnotationValue] operator[SEP] identifier[AnnotationMirror] identifier[annotationMirror] , identifier[String] identifier[elementName] operator[SEP] { Keyword[return] identifier[getAnnotationElementAndValue] operator[SEP] identifier[annotationMirror] , identifier[elementName] operator[SEP] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] }
public static DbAccessException createDbAccessException(HttpResponse hr) { JsonNode responseBody; try { InputStream content = hr.getContent(); if (content != null) { responseBody = responseBodyAsNode(IOUtils.toString(content)); } else { responseBody = NullNode.getInstance(); } } catch (Exception e) { responseBody = NullNode.getInstance(); } switch (hr.getCode()) { case HttpStatus.NOT_FOUND: return new DocumentNotFoundException(hr.getRequestURI(), responseBody); case HttpStatus.CONFLICT: return new UpdateConflictException(); default: String body; try { body = toPrettyString(responseBody); } catch (IOException e) { body = "unavailable"; } return new DbAccessException(hr.toString() + "\nURI: " + hr.getRequestURI() + "\nResponse Body: \n" + body); } }
class class_name[name] begin[{] method[createDbAccessException, return_type[type[DbAccessException]], modifier[public static], parameter[hr]] begin[{] local_variable[type[JsonNode], responseBody] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getContent, postfix_operators=[], prefix_operators=[], qualifier=hr, selectors=[], type_arguments=None), name=content)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=content, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=responseBody, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=NullNode, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=responseBody, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=content, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toString, postfix_operators=[], prefix_operators=[], qualifier=IOUtils, selectors=[], type_arguments=None)], member=responseBodyAsNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=responseBody, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=NullNode, selectors=[], type_arguments=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=NOT_FOUND, postfix_operators=[], prefix_operators=[], qualifier=HttpStatus, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getRequestURI, postfix_operators=[], prefix_operators=[], qualifier=hr, selectors=[], type_arguments=None), MemberReference(member=responseBody, 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=DocumentNotFoundException, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=CONFLICT, postfix_operators=[], prefix_operators=[], qualifier=HttpStatus, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UpdateConflictException, sub_type=None)), label=None)]), SwitchStatementCase(case=[], statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=body)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=body, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=responseBody, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toPrettyString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=body, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="unavailable")), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None), ReturnStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=hr, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\nURI: "), operator=+), operandr=MethodInvocation(arguments=[], member=getRequestURI, postfix_operators=[], prefix_operators=[], qualifier=hr, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\nResponse Body: \n"), operator=+), operandr=MemberReference(member=body, 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=DbAccessException, sub_type=None)), label=None)])], expression=MethodInvocation(arguments=[], member=getCode, postfix_operators=[], prefix_operators=[], qualifier=hr, selectors=[], type_arguments=None), label=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[DbAccessException] identifier[createDbAccessException] operator[SEP] identifier[HttpResponse] identifier[hr] operator[SEP] { identifier[JsonNode] identifier[responseBody] operator[SEP] Keyword[try] { identifier[InputStream] identifier[content] operator[=] identifier[hr] operator[SEP] identifier[getContent] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[content] operator[!=] Other[null] operator[SEP] { identifier[responseBody] operator[=] identifier[responseBodyAsNode] operator[SEP] identifier[IOUtils] operator[SEP] identifier[toString] operator[SEP] identifier[content] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[responseBody] operator[=] identifier[NullNode] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[responseBody] operator[=] identifier[NullNode] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] } Keyword[switch] operator[SEP] identifier[hr] operator[SEP] identifier[getCode] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] identifier[HttpStatus] operator[SEP] identifier[NOT_FOUND] operator[:] Keyword[return] Keyword[new] identifier[DocumentNotFoundException] operator[SEP] identifier[hr] operator[SEP] identifier[getRequestURI] operator[SEP] operator[SEP] , identifier[responseBody] operator[SEP] operator[SEP] Keyword[case] identifier[HttpStatus] operator[SEP] identifier[CONFLICT] operator[:] Keyword[return] Keyword[new] identifier[UpdateConflictException] operator[SEP] operator[SEP] operator[SEP] Keyword[default] operator[:] identifier[String] identifier[body] operator[SEP] Keyword[try] { identifier[body] operator[=] identifier[toPrettyString] operator[SEP] identifier[responseBody] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[body] operator[=] literal[String] operator[SEP] } Keyword[return] Keyword[new] identifier[DbAccessException] operator[SEP] identifier[hr] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[hr] operator[SEP] identifier[getRequestURI] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[body] operator[SEP] operator[SEP] } }
public java.util.List<String> getNameServers() { if (nameServers == null) { nameServers = new com.amazonaws.internal.SdkInternalList<String>(); } return nameServers; }
class class_name[name] begin[{] method[getNameServers, return_type[type[java]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.nameServers], ==, literal[null]]] begin[{] assign[member[.nameServers], ClassCreator(arguments=[], 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[}] return[member[.nameServers]] end[}] END[}]
Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[getNameServers] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[nameServers] operator[==] Other[null] operator[SEP] { identifier[nameServers] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[nameServers] operator[SEP] }
public CollectionValuedMap<K, V> deltaClone() { CollectionValuedMap<K, V> result = new CollectionValuedMap<K, V>(null, cf, true); result.map = new DeltaMap<K, Collection<V>>(this.map); return result; }
class class_name[name] begin[{] method[deltaClone, return_type[type[CollectionValuedMap]], modifier[public], parameter[]] begin[{] local_variable[type[CollectionValuedMap], result] assign[member[result.map], ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=map, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=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=K, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None))], dimensions=[], name=Collection, sub_type=None))], dimensions=None, name=DeltaMap, sub_type=None))] return[member[.result]] end[}] END[}]
Keyword[public] identifier[CollectionValuedMap] operator[<] identifier[K] , identifier[V] operator[>] identifier[deltaClone] operator[SEP] operator[SEP] { identifier[CollectionValuedMap] operator[<] identifier[K] , identifier[V] operator[>] identifier[result] operator[=] Keyword[new] identifier[CollectionValuedMap] operator[<] identifier[K] , identifier[V] operator[>] operator[SEP] Other[null] , identifier[cf] , literal[boolean] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[map] operator[=] Keyword[new] identifier[DeltaMap] operator[<] identifier[K] , identifier[Collection] operator[<] identifier[V] operator[>] operator[>] operator[SEP] Keyword[this] operator[SEP] identifier[map] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
@Override public StringBuilder sqlBuilder() { StringBuilder builder = this.sqlStringBuilder.get(); builder.delete(0, builder.length()); return builder; }
class class_name[name] begin[{] method[sqlBuilder, return_type[type[StringBuilder]], modifier[public], parameter[]] begin[{] local_variable[type[StringBuilder], builder] call[builder.delete, parameter[literal[0], call[builder.length, parameter[]]]] return[member[.builder]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[StringBuilder] identifier[sqlBuilder] operator[SEP] operator[SEP] { identifier[StringBuilder] identifier[builder] operator[=] Keyword[this] operator[SEP] identifier[sqlStringBuilder] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[delete] operator[SEP] Other[0] , identifier[builder] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[builder] operator[SEP] }
private void addConstructorByKey() { context.constructorByKey = MethodSpec.constructorBuilder().addParameter(keySpec); context.constructorByKey.addParameter(keyRefQueueSpec); addCommonParameters(context.constructorByKey); if (isBaseClass()) { callSiblingConstructor(); } else { callParentByKey(); } }
class class_name[name] begin[{] method[addConstructorByKey, return_type[void], modifier[private], parameter[]] begin[{] assign[member[context.constructorByKey], call[MethodSpec.constructorBuilder, parameter[]]] call[context.constructorByKey.addParameter, parameter[member[.keyRefQueueSpec]]] call[.addCommonParameters, parameter[member[context.constructorByKey]]] if[call[.isBaseClass, parameter[]]] begin[{] call[.callSiblingConstructor, parameter[]] else begin[{] call[.callParentByKey, parameter[]] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[addConstructorByKey] operator[SEP] operator[SEP] { identifier[context] operator[SEP] identifier[constructorByKey] operator[=] identifier[MethodSpec] operator[SEP] identifier[constructorBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[addParameter] operator[SEP] identifier[keySpec] operator[SEP] operator[SEP] identifier[context] operator[SEP] identifier[constructorByKey] operator[SEP] identifier[addParameter] operator[SEP] identifier[keyRefQueueSpec] operator[SEP] operator[SEP] identifier[addCommonParameters] operator[SEP] identifier[context] operator[SEP] identifier[constructorByKey] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isBaseClass] operator[SEP] operator[SEP] operator[SEP] { identifier[callSiblingConstructor] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[callParentByKey] operator[SEP] operator[SEP] operator[SEP] } }
public AutoRollbackConfiguration withEvents(String... events) { if (this.events == null) { setEvents(new com.amazonaws.internal.SdkInternalList<String>(events.length)); } for (String ele : events) { this.events.add(ele); } return this; }
class class_name[name] begin[{] method[withEvents, return_type[type[AutoRollbackConfiguration]], modifier[public], parameter[events]] begin[{] if[binary_operation[THIS[member[None.events]], ==, literal[null]]] begin[{] call[.setEvents, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=events, 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=events, 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=events, 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[AutoRollbackConfiguration] identifier[withEvents] operator[SEP] identifier[String] operator[...] identifier[events] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[events] operator[==] Other[null] operator[SEP] { identifier[setEvents] 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[events] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[String] identifier[ele] operator[:] identifier[events] operator[SEP] { Keyword[this] operator[SEP] identifier[events] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
@Override public EEnum getTristate() { if (tristateEEnum == null) { tristateEEnum = (EEnum) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI).getEClassifiers() .get(0); } return tristateEEnum; }
class class_name[name] begin[{] method[getTristate, return_type[type[EEnum]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.tristateEEnum], ==, literal[null]]] begin[{] assign[member[.tristateEEnum], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=Ifc4Package, selectors=[])], member=getEPackage, postfix_operators=[], prefix_operators=[], qualifier=EPackage.Registry.INSTANCE, selectors=[MethodInvocation(arguments=[], member=getEClassifiers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=EEnum, sub_type=None))] else begin[{] None end[}] return[member[.tristateEEnum]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[EEnum] identifier[getTristate] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[tristateEEnum] operator[==] Other[null] operator[SEP] { identifier[tristateEEnum] operator[=] operator[SEP] identifier[EEnum] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[Ifc4Package] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] } Keyword[return] identifier[tristateEEnum] operator[SEP] }
public static Stock get(String symbol, Calendar from) throws IOException { return YahooFinance.get(symbol, from, HistQuotesRequest.DEFAULT_TO, HistQuotesRequest.DEFAULT_INTERVAL); }
class class_name[name] begin[{] method[get, return_type[type[Stock]], modifier[public static], parameter[symbol, from]] begin[{] return[call[YahooFinance.get, parameter[member[.symbol], member[.from], member[HistQuotesRequest.DEFAULT_TO], member[HistQuotesRequest.DEFAULT_INTERVAL]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Stock] identifier[get] operator[SEP] identifier[String] identifier[symbol] , identifier[Calendar] identifier[from] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[return] identifier[YahooFinance] operator[SEP] identifier[get] operator[SEP] identifier[symbol] , identifier[from] , identifier[HistQuotesRequest] operator[SEP] identifier[DEFAULT_TO] , identifier[HistQuotesRequest] operator[SEP] identifier[DEFAULT_INTERVAL] operator[SEP] operator[SEP] }
public Observable<ServiceResponse<RunInner>> scheduleRunWithServiceResponseAsync(String resourceGroupName, String registryName, RunRequest runRequest) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (registryName == null) { throw new IllegalArgumentException("Parameter registryName is required and cannot be null."); } if (runRequest == null) { throw new IllegalArgumentException("Parameter runRequest is required and cannot be null."); } Validator.validate(runRequest); final String apiVersion = "2018-09-01"; Observable<Response<ResponseBody>> observable = service.scheduleRun(this.client.subscriptionId(), resourceGroupName, registryName, apiVersion, runRequest, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<RunInner>() { }.getType()); }
class class_name[name] begin[{] method[scheduleRunWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, registryName, runRequest]] begin[{] if[binary_operation[THIS[member[None.client]call[None.subscriptionId, parameter[]]], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter this.client.subscriptionId() is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.resourceGroupName], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter resourceGroupName is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.registryName], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter registryName is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.runRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter runRequest is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] call[Validator.validate, parameter[member[.runRequest]]] local_variable[type[String], apiVersion] local_variable[type[Observable], observable] return[call[client.getAzureClient, parameter[]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[RunInner] operator[>] operator[>] identifier[scheduleRunWithServiceResponseAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[registryName] , identifier[RunRequest] identifier[runRequest] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[subscriptionId] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[resourceGroupName] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[registryName] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[runRequest] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[Validator] operator[SEP] identifier[validate] operator[SEP] identifier[runRequest] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[apiVersion] operator[=] literal[String] operator[SEP] identifier[Observable] operator[<] identifier[Response] operator[<] identifier[ResponseBody] operator[>] operator[>] identifier[observable] operator[=] identifier[service] operator[SEP] identifier[scheduleRun] operator[SEP] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[subscriptionId] operator[SEP] operator[SEP] , identifier[resourceGroupName] , identifier[registryName] , identifier[apiVersion] , identifier[runRequest] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[acceptLanguage] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[userAgent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[client] operator[SEP] identifier[getAzureClient] operator[SEP] operator[SEP] operator[SEP] identifier[getPostOrDeleteResultAsync] operator[SEP] identifier[observable] , Keyword[new] identifier[TypeToken] operator[<] identifier[RunInner] operator[>] operator[SEP] operator[SEP] { } operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
void initialCapacity(String key, @Nullable String value) { requireArgument(initialCapacity == UNSET_INT, "initial capacity was already set to %,d", initialCapacity); initialCapacity = parseInt(key, value); }
class class_name[name] begin[{] method[initialCapacity, return_type[void], modifier[default], parameter[key, value]] begin[{] call[.requireArgument, parameter[binary_operation[member[.initialCapacity], ==, member[.UNSET_INT]], literal["initial capacity was already set to %,d"], member[.initialCapacity]]] assign[member[.initialCapacity], call[.parseInt, parameter[member[.key], member[.value]]]] end[}] END[}]
Keyword[void] identifier[initialCapacity] operator[SEP] identifier[String] identifier[key] , annotation[@] identifier[Nullable] identifier[String] identifier[value] operator[SEP] { identifier[requireArgument] operator[SEP] identifier[initialCapacity] operator[==] identifier[UNSET_INT] , literal[String] , identifier[initialCapacity] operator[SEP] operator[SEP] identifier[initialCapacity] operator[=] identifier[parseInt] operator[SEP] identifier[key] , identifier[value] operator[SEP] operator[SEP] }
public void addComparator(Comparator<T> comparator, boolean reverse) { checkLocked(); comparatorChain.add(comparator); if (reverse == true) { orderingBits.set(comparatorChain.size() - 1); } }
class class_name[name] begin[{] method[addComparator, return_type[void], modifier[public], parameter[comparator, reverse]] begin[{] call[.checkLocked, parameter[]] call[comparatorChain.add, parameter[member[.comparator]]] if[binary_operation[member[.reverse], ==, literal[true]]] begin[{] call[orderingBits.set, parameter[binary_operation[call[comparatorChain.size, parameter[]], -, literal[1]]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[addComparator] operator[SEP] identifier[Comparator] operator[<] identifier[T] operator[>] identifier[comparator] , Keyword[boolean] identifier[reverse] operator[SEP] { identifier[checkLocked] operator[SEP] operator[SEP] operator[SEP] identifier[comparatorChain] operator[SEP] identifier[add] operator[SEP] identifier[comparator] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[reverse] operator[==] literal[boolean] operator[SEP] { identifier[orderingBits] operator[SEP] identifier[set] operator[SEP] identifier[comparatorChain] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] } }
public static <T, U> U convertBean(T source, Class<U> targetClass) { return convertBean(source, targetClass, null); }
class class_name[name] begin[{] method[convertBean, return_type[type[U]], modifier[public static], parameter[source, targetClass]] begin[{] return[call[.convertBean, parameter[member[.source], member[.targetClass], literal[null]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[U] operator[>] identifier[U] identifier[convertBean] operator[SEP] identifier[T] identifier[source] , identifier[Class] operator[<] identifier[U] operator[>] identifier[targetClass] operator[SEP] { Keyword[return] identifier[convertBean] operator[SEP] identifier[source] , identifier[targetClass] , Other[null] operator[SEP] operator[SEP] }
@Override public final Iterable<HeadDocument> findAll( final RootDocument rootDocument) { final Iterable<HeadDocument> headDocuments = findAll(rootDocument.getFilename()); if (headDocuments == null) { return null; } for (final HeadDocument headDocument : headDocuments) { final Head head = headDocument.getGedObject(); head.setParent(rootDocument.getGedObject()); } return headDocuments; }
class class_name[name] begin[{] method[findAll, return_type[type[Iterable]], modifier[final public], parameter[rootDocument]] begin[{] local_variable[type[Iterable], headDocuments] if[binary_operation[member[.headDocuments], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getGedObject, postfix_operators=[], prefix_operators=[], qualifier=headDocument, selectors=[], type_arguments=None), name=head)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Head, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getGedObject, postfix_operators=[], prefix_operators=[], qualifier=rootDocument, selectors=[], type_arguments=None)], member=setParent, postfix_operators=[], prefix_operators=[], qualifier=head, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=headDocuments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=headDocument)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=HeadDocument, sub_type=None))), label=None) return[member[.headDocuments]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[final] identifier[Iterable] operator[<] identifier[HeadDocument] operator[>] identifier[findAll] operator[SEP] Keyword[final] identifier[RootDocument] identifier[rootDocument] operator[SEP] { Keyword[final] identifier[Iterable] operator[<] identifier[HeadDocument] operator[>] identifier[headDocuments] operator[=] identifier[findAll] operator[SEP] identifier[rootDocument] operator[SEP] identifier[getFilename] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[headDocuments] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[for] operator[SEP] Keyword[final] identifier[HeadDocument] identifier[headDocument] operator[:] identifier[headDocuments] operator[SEP] { Keyword[final] identifier[Head] identifier[head] operator[=] identifier[headDocument] operator[SEP] identifier[getGedObject] operator[SEP] operator[SEP] operator[SEP] identifier[head] operator[SEP] identifier[setParent] operator[SEP] identifier[rootDocument] operator[SEP] identifier[getGedObject] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[headDocuments] operator[SEP] }
public I collapse() { if (this.start.isInfinite()) { throw new IllegalStateException( "An interval with infinite past cannot be collapsed."); } T t = this.getClosedFiniteStart(); Boundary<T> s = Boundary.ofClosed(t); Boundary<T> e = Boundary.ofOpen(t); return this.getFactory().between(s, e); }
class class_name[name] begin[{] method[collapse, return_type[type[I]], modifier[public], parameter[]] begin[{] if[THIS[member[None.start]call[None.isInfinite, parameter[]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="An interval with infinite past cannot be collapsed.")], 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[}] local_variable[type[T], t] local_variable[type[Boundary], s] local_variable[type[Boundary], e] return[THIS[call[None.getFactory, parameter[]]call[None.between, parameter[member[.s], member[.e]]]]] end[}] END[}]
Keyword[public] identifier[I] identifier[collapse] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[start] operator[SEP] identifier[isInfinite] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[T] identifier[t] operator[=] Keyword[this] operator[SEP] identifier[getClosedFiniteStart] operator[SEP] operator[SEP] operator[SEP] identifier[Boundary] operator[<] identifier[T] operator[>] identifier[s] operator[=] identifier[Boundary] operator[SEP] identifier[ofClosed] operator[SEP] identifier[t] operator[SEP] operator[SEP] identifier[Boundary] operator[<] identifier[T] operator[>] identifier[e] operator[=] identifier[Boundary] operator[SEP] identifier[ofOpen] operator[SEP] identifier[t] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] identifier[getFactory] operator[SEP] operator[SEP] operator[SEP] identifier[between] operator[SEP] identifier[s] , identifier[e] operator[SEP] operator[SEP] }
@Override public EClass getIfcSolarDevice() { if (ifcSolarDeviceEClass == null) { ifcSolarDeviceEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI) .getEClassifiers().get(607); } return ifcSolarDeviceEClass; }
class class_name[name] begin[{] method[getIfcSolarDevice, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcSolarDeviceEClass], ==, literal[null]]] begin[{] assign[member[.ifcSolarDeviceEClass], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=Ifc4Package, selectors=[])], member=getEPackage, postfix_operators=[], prefix_operators=[], qualifier=EPackage.Registry.INSTANCE, selectors=[MethodInvocation(arguments=[], member=getEClassifiers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=607)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=EClass, sub_type=None))] else begin[{] None end[}] return[member[.ifcSolarDeviceEClass]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcSolarDevice] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcSolarDeviceEClass] operator[==] Other[null] operator[SEP] { identifier[ifcSolarDeviceEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[Ifc4Package] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[607] operator[SEP] operator[SEP] } Keyword[return] identifier[ifcSolarDeviceEClass] operator[SEP] }
private List<ResourceRef> findRoseResources() { final List<ResourceRef> resources; try { resources = RoseScanner.getInstance().getJarOrClassesFolderResources(); } catch (IOException e) { throw new ApplicationContextException( "error on getJarResources/getClassesFolderResources", e); } return resources; }
class class_name[name] begin[{] method[findRoseResources, return_type[type[List]], modifier[private], parameter[]] begin[{] local_variable[type[List], resources] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=resources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=RoseScanner, selectors=[MethodInvocation(arguments=[], member=getJarOrClassesFolderResources, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="error on getJarResources/getClassesFolderResources"), 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=ApplicationContextException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) return[member[.resources]] end[}] END[}]
Keyword[private] identifier[List] operator[<] identifier[ResourceRef] operator[>] identifier[findRoseResources] operator[SEP] operator[SEP] { Keyword[final] identifier[List] operator[<] identifier[ResourceRef] operator[>] identifier[resources] operator[SEP] Keyword[try] { identifier[resources] operator[=] identifier[RoseScanner] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[getJarOrClassesFolderResources] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ApplicationContextException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[return] identifier[resources] operator[SEP] }
private HttpRequestRetryHandler getRetryHandler() { final HttpRequestRetryHandler myRetryHandler = new HttpRequestRetryHandler() { public boolean retryRequest(IOException exception, int executionCount, HttpContext context) { if (executionCount >= connectionConfiguration.getExecutionCount()) { // Do not retry if over max retry count LOG.debug("Execution count {} is bigger than threshold. Stop", executionCount); return false; } if (exception instanceof NoHttpResponseException) { LOG.debug("NoHttpResponseException exception. Retry count {}", executionCount); return true; } if (exception instanceof UnknownHostException) { LOG.debug("UnknownHostException. Retry count {}", executionCount); return true; } if (exception instanceof ConnectTimeoutException) { LOG.debug("ConnectTimeoutException. Retry count {}", executionCount); return true; } if (exception instanceof SocketTimeoutException || exception.getClass() == SocketTimeoutException.class || exception.getClass().isInstance(SocketTimeoutException.class)) { // Connection refused LOG.debug("socketTimeoutException Retry count {}", executionCount); return true; } if (exception instanceof InterruptedIOException) { // Timeout LOG.debug("InterruptedIOException Retry count {}", executionCount); return true; } if (exception instanceof SSLException) { LOG.debug("SSLException Retry count {}", executionCount); return true; } final HttpClientContext clientContext = HttpClientContext.adapt(context); final HttpRequest request = clientContext.getRequest(); boolean idempotent = !(request instanceof HttpEntityEnclosingRequest); if (idempotent) { LOG.debug("HttpEntityEnclosingRequest. Retry count {}", executionCount); return true; } LOG.debug("Retry stopped. Retry count {}", executionCount); return false; } }; return myRetryHandler; }
class class_name[name] begin[{] method[getRetryHandler, return_type[type[HttpRequestRetryHandler]], modifier[private], parameter[]] begin[{] local_variable[type[HttpRequestRetryHandler], myRetryHandler] return[member[.myRetryHandler]] end[}] END[}]
Keyword[private] identifier[HttpRequestRetryHandler] identifier[getRetryHandler] operator[SEP] operator[SEP] { Keyword[final] identifier[HttpRequestRetryHandler] identifier[myRetryHandler] operator[=] Keyword[new] identifier[HttpRequestRetryHandler] operator[SEP] operator[SEP] { Keyword[public] Keyword[boolean] identifier[retryRequest] operator[SEP] identifier[IOException] identifier[exception] , Keyword[int] identifier[executionCount] , identifier[HttpContext] identifier[context] operator[SEP] { Keyword[if] operator[SEP] identifier[executionCount] operator[>=] identifier[connectionConfiguration] operator[SEP] identifier[getExecutionCount] operator[SEP] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[executionCount] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[exception] Keyword[instanceof] identifier[NoHttpResponseException] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[executionCount] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[exception] Keyword[instanceof] identifier[UnknownHostException] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[executionCount] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[exception] Keyword[instanceof] identifier[ConnectTimeoutException] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[executionCount] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[exception] Keyword[instanceof] identifier[SocketTimeoutException] operator[||] identifier[exception] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[==] identifier[SocketTimeoutException] operator[SEP] Keyword[class] operator[||] identifier[exception] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[isInstance] operator[SEP] identifier[SocketTimeoutException] operator[SEP] Keyword[class] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[executionCount] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[exception] Keyword[instanceof] identifier[InterruptedIOException] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[executionCount] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[exception] Keyword[instanceof] identifier[SSLException] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[executionCount] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[final] identifier[HttpClientContext] identifier[clientContext] operator[=] identifier[HttpClientContext] operator[SEP] identifier[adapt] operator[SEP] identifier[context] operator[SEP] operator[SEP] Keyword[final] identifier[HttpRequest] identifier[request] operator[=] identifier[clientContext] operator[SEP] identifier[getRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[idempotent] operator[=] operator[!] operator[SEP] identifier[request] Keyword[instanceof] identifier[HttpEntityEnclosingRequest] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[idempotent] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[executionCount] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[executionCount] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } } operator[SEP] Keyword[return] identifier[myRetryHandler] operator[SEP] }
@Override @LogarithmicTime(amortized = true) public Handle<K, V> insert(K key) { return insert(key, null); }
class class_name[name] begin[{] method[insert, return_type[type[Handle]], modifier[public], parameter[key]] begin[{] return[call[.insert, parameter[member[.key], literal[null]]]] end[}] END[}]
annotation[@] identifier[Override] annotation[@] identifier[LogarithmicTime] operator[SEP] identifier[amortized] operator[=] literal[boolean] operator[SEP] Keyword[public] identifier[Handle] operator[<] identifier[K] , identifier[V] operator[>] identifier[insert] operator[SEP] identifier[K] identifier[key] operator[SEP] { Keyword[return] identifier[insert] operator[SEP] identifier[key] , Other[null] operator[SEP] operator[SEP] }
public static SortedSet<ClassLabel> getClassLabels(Relation<? extends ClassLabel> database) { SortedSet<ClassLabel> labels = new TreeSet<>(); for(DBIDIter it = database.iterDBIDs(); it.valid(); it.advance()) { labels.add(database.get(it)); } return labels; }
class class_name[name] begin[{] method[getClassLabels, return_type[type[SortedSet]], modifier[public static], parameter[database]] begin[{] local_variable[type[SortedSet], labels] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=it, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=database, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=labels, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=MethodInvocation(arguments=[], member=valid, postfix_operators=[], prefix_operators=[], qualifier=it, selectors=[], type_arguments=None), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=iterDBIDs, postfix_operators=[], prefix_operators=[], qualifier=database, selectors=[], type_arguments=None), name=it)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=DBIDIter, sub_type=None)), update=[MethodInvocation(arguments=[], member=advance, postfix_operators=[], prefix_operators=[], qualifier=it, selectors=[], type_arguments=None)]), label=None) return[member[.labels]] end[}] END[}]
Keyword[public] Keyword[static] identifier[SortedSet] operator[<] identifier[ClassLabel] operator[>] identifier[getClassLabels] operator[SEP] identifier[Relation] operator[<] operator[?] Keyword[extends] identifier[ClassLabel] operator[>] identifier[database] operator[SEP] { identifier[SortedSet] operator[<] identifier[ClassLabel] operator[>] identifier[labels] operator[=] Keyword[new] identifier[TreeSet] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[DBIDIter] identifier[it] operator[=] identifier[database] operator[SEP] identifier[iterDBIDs] operator[SEP] operator[SEP] operator[SEP] identifier[it] operator[SEP] identifier[valid] operator[SEP] operator[SEP] operator[SEP] identifier[it] operator[SEP] identifier[advance] operator[SEP] operator[SEP] operator[SEP] { identifier[labels] operator[SEP] identifier[add] operator[SEP] identifier[database] operator[SEP] identifier[get] operator[SEP] identifier[it] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[labels] operator[SEP] }
public java.lang.String getCreatedBy() { java.lang.Object ref = createdBy_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); createdBy_ = s; return s; } }
class class_name[name] begin[{] method[getCreatedBy, return_type[type[java]], modifier[public], parameter[]] begin[{] local_variable[type[java], ref] if[binary_operation[member[.ref], instanceof, type[java]]] begin[{] return[Cast(expression=MemberReference(member=ref, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=lang, sub_type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))))] else begin[{] local_variable[type[com], bs] local_variable[type[java], s] assign[member[.createdBy_], member[.s]] return[member[.s]] end[}] end[}] END[}]
Keyword[public] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] identifier[getCreatedBy] operator[SEP] operator[SEP] { identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[Object] identifier[ref] operator[=] identifier[createdBy_] operator[SEP] Keyword[if] operator[SEP] identifier[ref] Keyword[instanceof] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] operator[SEP] { Keyword[return] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] operator[SEP] identifier[ref] operator[SEP] } Keyword[else] { identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[ByteString] identifier[bs] operator[=] operator[SEP] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[ByteString] operator[SEP] identifier[ref] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] identifier[s] operator[=] identifier[bs] operator[SEP] identifier[toStringUtf8] operator[SEP] operator[SEP] operator[SEP] identifier[createdBy_] operator[=] identifier[s] operator[SEP] Keyword[return] identifier[s] operator[SEP] } }
@Override public EClass getIfcBlobTexture() { if (ifcBlobTextureEClass == null) { ifcBlobTextureEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI) .getEClassifiers().get(41); } return ifcBlobTextureEClass; }
class class_name[name] begin[{] method[getIfcBlobTexture, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcBlobTextureEClass], ==, literal[null]]] begin[{] assign[member[.ifcBlobTextureEClass], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=Ifc4Package, selectors=[])], member=getEPackage, postfix_operators=[], prefix_operators=[], qualifier=EPackage.Registry.INSTANCE, selectors=[MethodInvocation(arguments=[], member=getEClassifiers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=41)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=EClass, sub_type=None))] else begin[{] None end[}] return[member[.ifcBlobTextureEClass]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcBlobTexture] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcBlobTextureEClass] operator[==] Other[null] operator[SEP] { identifier[ifcBlobTextureEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[Ifc4Package] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[41] operator[SEP] operator[SEP] } Keyword[return] identifier[ifcBlobTextureEClass] operator[SEP] }
public String getSiteHelpMessage(String label) { CommandInfo info = siteCommands.get(label); return info != null ? info.help : null; }
class class_name[name] begin[{] method[getSiteHelpMessage, return_type[type[String]], modifier[public], parameter[label]] begin[{] local_variable[type[CommandInfo], info] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=info, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=MemberReference(member=help, postfix_operators=[], prefix_operators=[], qualifier=info, selectors=[]))] end[}] END[}]
Keyword[public] identifier[String] identifier[getSiteHelpMessage] operator[SEP] identifier[String] identifier[label] operator[SEP] { identifier[CommandInfo] identifier[info] operator[=] identifier[siteCommands] operator[SEP] identifier[get] operator[SEP] identifier[label] operator[SEP] operator[SEP] Keyword[return] identifier[info] operator[!=] Other[null] operator[?] identifier[info] operator[SEP] identifier[help] operator[:] Other[null] operator[SEP] }
private boolean moveContents(ContextNode oldNode, ContextNode newNode) throws InvalidNameException, NameAlreadyBoundException, NameNotFoundException, NotContextException { boolean emptied = true; Iterator<Entry<String, Object>> entries = oldNode.children.entrySet().iterator(); while (entries.hasNext()) { Entry<String, Object> entry = entries.next(); WSName name = new WSName(entry.getKey()); Object child = entry.getValue(); if (child instanceof AutoBindNode) { emptied = false; } else if (child instanceof ServiceRegistration) { ServiceRegistration<?> reg = (ServiceRegistration<?>) child; String className = (String) reg.getReference().getProperty(JNDIServiceBinder.OSGI_JNDI_SERVICE_CLASS); reg.setProperties(createServiceProperties(newNode.fullName.plus(name), className)); newNode.bind(name, reg); entries.remove(); } else if (child instanceof ContextNode) { ContextNode oldChildNode = (ContextNode) child; ContextNode newChildNode = newNode.createSubcontext(name); if (moveContents(oldChildNode, newChildNode)) // if it was emptied, remove the node // TODO - potential race condition here - need to prevent any additions during clean entries.remove(); else // if it wasn't emptied we need to keep its parent too emptied = false; } else { // there shouldn't be any other types of object in there! if (tc.isDebugEnabled()) Tr.debug(tc, "Unexpected object type found in internal tree", oldNode.fullName + WSName.SEPARATOR + entry.getKey(), child); // remove it anyway, and don't copy it to the new location entries.remove(); } } return emptied; }
class class_name[name] begin[{] method[moveContents, return_type[type[boolean]], modifier[private], parameter[oldNode, newNode]] begin[{] local_variable[type[boolean], emptied] local_variable[type[Iterator], entries] while[call[entries.hasNext, parameter[]]] begin[{] local_variable[type[Entry], entry] local_variable[type[WSName], name] local_variable[type[Object], child] if[binary_operation[member[.child], instanceof, type[AutoBindNode]]] begin[{] assign[member[.emptied], literal[false]] else begin[{] if[binary_operation[member[.child], instanceof, type[ServiceRegistration]]] begin[{] local_variable[type[ServiceRegistration], reg] local_variable[type[String], className] call[reg.setProperties, parameter[call[.createServiceProperties, parameter[call[newNode.fullName.plus, parameter[member[.name]]], member[.className]]]]] call[newNode.bind, parameter[member[.name], member[.reg]]] call[entries.remove, parameter[]] else begin[{] if[binary_operation[member[.child], instanceof, type[ContextNode]]] begin[{] local_variable[type[ContextNode], oldChildNode] local_variable[type[ContextNode], newChildNode] if[call[.moveContents, parameter[member[.oldChildNode], member[.newChildNode]]]] begin[{] call[entries.remove, parameter[]] else begin[{] assign[member[.emptied], literal[false]] end[}] else begin[{] if[call[tc.isDebugEnabled, parameter[]]] begin[{] call[Tr.debug, parameter[member[.tc], literal["Unexpected object type found in internal tree"], binary_operation[binary_operation[member[oldNode.fullName], +, member[WSName.SEPARATOR]], +, call[entry.getKey, parameter[]]], member[.child]]] else begin[{] None end[}] call[entries.remove, parameter[]] end[}] end[}] end[}] end[}] return[member[.emptied]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[moveContents] operator[SEP] identifier[ContextNode] identifier[oldNode] , identifier[ContextNode] identifier[newNode] operator[SEP] Keyword[throws] identifier[InvalidNameException] , identifier[NameAlreadyBoundException] , identifier[NameNotFoundException] , identifier[NotContextException] { Keyword[boolean] identifier[emptied] operator[=] literal[boolean] operator[SEP] identifier[Iterator] operator[<] identifier[Entry] operator[<] identifier[String] , identifier[Object] operator[>] operator[>] identifier[entries] operator[=] identifier[oldNode] operator[SEP] identifier[children] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[entries] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[Entry] operator[<] identifier[String] , identifier[Object] operator[>] identifier[entry] operator[=] identifier[entries] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[WSName] identifier[name] operator[=] Keyword[new] identifier[WSName] operator[SEP] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Object] identifier[child] operator[=] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[child] Keyword[instanceof] identifier[AutoBindNode] operator[SEP] { identifier[emptied] operator[=] literal[boolean] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[child] Keyword[instanceof] identifier[ServiceRegistration] operator[SEP] { identifier[ServiceRegistration] operator[<] operator[?] operator[>] identifier[reg] operator[=] operator[SEP] identifier[ServiceRegistration] operator[<] operator[?] operator[>] operator[SEP] identifier[child] operator[SEP] identifier[String] identifier[className] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[reg] operator[SEP] identifier[getReference] operator[SEP] operator[SEP] operator[SEP] identifier[getProperty] operator[SEP] identifier[JNDIServiceBinder] operator[SEP] identifier[OSGI_JNDI_SERVICE_CLASS] operator[SEP] operator[SEP] identifier[reg] operator[SEP] identifier[setProperties] operator[SEP] identifier[createServiceProperties] operator[SEP] identifier[newNode] operator[SEP] identifier[fullName] operator[SEP] identifier[plus] operator[SEP] identifier[name] operator[SEP] , identifier[className] operator[SEP] operator[SEP] operator[SEP] identifier[newNode] operator[SEP] identifier[bind] operator[SEP] identifier[name] , identifier[reg] operator[SEP] operator[SEP] identifier[entries] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[child] Keyword[instanceof] identifier[ContextNode] operator[SEP] { identifier[ContextNode] identifier[oldChildNode] operator[=] operator[SEP] identifier[ContextNode] operator[SEP] identifier[child] operator[SEP] identifier[ContextNode] identifier[newChildNode] operator[=] identifier[newNode] operator[SEP] identifier[createSubcontext] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[moveContents] operator[SEP] identifier[oldChildNode] , identifier[newChildNode] operator[SEP] operator[SEP] identifier[entries] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] Keyword[else] identifier[emptied] operator[=] literal[boolean] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] , identifier[oldNode] operator[SEP] identifier[fullName] operator[+] identifier[WSName] operator[SEP] identifier[SEPARATOR] operator[+] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] , identifier[child] operator[SEP] operator[SEP] identifier[entries] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[emptied] operator[SEP] }
public static BeanDeployerEnvironment newConcurrentEnvironment(BeanManagerImpl manager) { return new BeanDeployerEnvironment(Collections.newSetFromMap(new ConcurrentHashMap<SlimAnnotatedTypeContext<?>, Boolean>()), Collections.newSetFromMap(new ConcurrentHashMap<Class<?>, Boolean>()), SetMultimap.<Class<?>, AbstractClassBean<?>> newConcurrentSetMultimap(), Collections.newSetFromMap(new ConcurrentHashMap<ProducerField<?, ?>, Boolean>()), SetMultimap.<WeldMethodKey, ProducerMethod<?, ?>> newConcurrentSetMultimap(), Collections.newSetFromMap(new ConcurrentHashMap<RIBean<?>, Boolean>()), Collections.newSetFromMap(new ConcurrentHashMap<ObserverInitializationContext<?, ?>, Boolean>()), Collections.newSetFromMap(new ConcurrentHashMap<DisposalMethod<?, ?>, Boolean>()), Collections.newSetFromMap(new ConcurrentHashMap<DisposalMethod<?, ?>, Boolean>()), Collections.newSetFromMap(new ConcurrentHashMap<DecoratorImpl<?>, Boolean>()), Collections.newSetFromMap(new ConcurrentHashMap<InterceptorImpl<?>, Boolean>()), Collections.newSetFromMap(new ConcurrentHashMap<Type, Boolean>()), manager); }
class class_name[name] begin[{] method[newConcurrentEnvironment, return_type[type[BeanDeployerEnvironment]], modifier[public static], parameter[manager]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[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=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=SlimAnnotatedTypeContext, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Boolean, sub_type=None))], dimensions=None, name=ConcurrentHashMap, sub_type=None))], member=newSetFromMap, postfix_operators=[], prefix_operators=[], qualifier=Collections, selectors=[], type_arguments=None), MethodInvocation(arguments=[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=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Boolean, sub_type=None))], dimensions=None, name=ConcurrentHashMap, sub_type=None))], member=newSetFromMap, postfix_operators=[], prefix_operators=[], qualifier=Collections, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=SetMultimap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=AbstractClassBean, sub_type=None))]), MethodInvocation(arguments=[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=[TypeArgument(pattern_type=?, type=None), TypeArgument(pattern_type=?, type=None)], dimensions=[], name=ProducerField, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Boolean, sub_type=None))], dimensions=None, name=ConcurrentHashMap, sub_type=None))], member=newSetFromMap, postfix_operators=[], prefix_operators=[], qualifier=Collections, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=SetMultimap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=WeldMethodKey, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None), TypeArgument(pattern_type=?, type=None)], dimensions=[], name=ProducerMethod, sub_type=None))]), MethodInvocation(arguments=[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=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=RIBean, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Boolean, sub_type=None))], dimensions=None, name=ConcurrentHashMap, sub_type=None))], member=newSetFromMap, postfix_operators=[], prefix_operators=[], qualifier=Collections, selectors=[], type_arguments=None), MethodInvocation(arguments=[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=[TypeArgument(pattern_type=?, type=None), TypeArgument(pattern_type=?, type=None)], dimensions=[], name=ObserverInitializationContext, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Boolean, sub_type=None))], dimensions=None, name=ConcurrentHashMap, sub_type=None))], member=newSetFromMap, postfix_operators=[], prefix_operators=[], qualifier=Collections, selectors=[], type_arguments=None), MethodInvocation(arguments=[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=[TypeArgument(pattern_type=?, type=None), TypeArgument(pattern_type=?, type=None)], dimensions=[], name=DisposalMethod, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Boolean, sub_type=None))], dimensions=None, name=ConcurrentHashMap, sub_type=None))], member=newSetFromMap, postfix_operators=[], prefix_operators=[], qualifier=Collections, selectors=[], type_arguments=None), MethodInvocation(arguments=[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=[TypeArgument(pattern_type=?, type=None), TypeArgument(pattern_type=?, type=None)], dimensions=[], name=DisposalMethod, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Boolean, sub_type=None))], dimensions=None, name=ConcurrentHashMap, sub_type=None))], member=newSetFromMap, postfix_operators=[], prefix_operators=[], qualifier=Collections, selectors=[], type_arguments=None), MethodInvocation(arguments=[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=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=DecoratorImpl, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Boolean, sub_type=None))], dimensions=None, name=ConcurrentHashMap, sub_type=None))], member=newSetFromMap, postfix_operators=[], prefix_operators=[], qualifier=Collections, selectors=[], type_arguments=None), MethodInvocation(arguments=[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=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=InterceptorImpl, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Boolean, sub_type=None))], dimensions=None, name=ConcurrentHashMap, sub_type=None))], member=newSetFromMap, postfix_operators=[], prefix_operators=[], qualifier=Collections, selectors=[], type_arguments=None), MethodInvocation(arguments=[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=Type, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Boolean, sub_type=None))], dimensions=None, name=ConcurrentHashMap, sub_type=None))], member=newSetFromMap, postfix_operators=[], prefix_operators=[], qualifier=Collections, selectors=[], type_arguments=None), MemberReference(member=manager, 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=BeanDeployerEnvironment, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[BeanDeployerEnvironment] identifier[newConcurrentEnvironment] operator[SEP] identifier[BeanManagerImpl] identifier[manager] operator[SEP] { Keyword[return] Keyword[new] identifier[BeanDeployerEnvironment] operator[SEP] identifier[Collections] operator[SEP] identifier[newSetFromMap] operator[SEP] Keyword[new] identifier[ConcurrentHashMap] operator[<] identifier[SlimAnnotatedTypeContext] operator[<] operator[?] operator[>] , identifier[Boolean] operator[>] operator[SEP] operator[SEP] operator[SEP] , identifier[Collections] operator[SEP] identifier[newSetFromMap] operator[SEP] Keyword[new] identifier[ConcurrentHashMap] operator[<] identifier[Class] operator[<] operator[?] operator[>] , identifier[Boolean] operator[>] operator[SEP] operator[SEP] operator[SEP] , identifier[SetMultimap] operator[SEP] operator[<] identifier[Class] operator[<] operator[?] operator[>] , identifier[AbstractClassBean] operator[<] operator[?] operator[>] operator[>] identifier[newConcurrentSetMultimap] operator[SEP] operator[SEP] , identifier[Collections] operator[SEP] identifier[newSetFromMap] operator[SEP] Keyword[new] identifier[ConcurrentHashMap] operator[<] identifier[ProducerField] operator[<] operator[?] , operator[?] operator[>] , identifier[Boolean] operator[>] operator[SEP] operator[SEP] operator[SEP] , identifier[SetMultimap] operator[SEP] operator[<] identifier[WeldMethodKey] , identifier[ProducerMethod] operator[<] operator[?] , operator[?] operator[>] operator[>] identifier[newConcurrentSetMultimap] operator[SEP] operator[SEP] , identifier[Collections] operator[SEP] identifier[newSetFromMap] operator[SEP] Keyword[new] identifier[ConcurrentHashMap] operator[<] identifier[RIBean] operator[<] operator[?] operator[>] , identifier[Boolean] operator[>] operator[SEP] operator[SEP] operator[SEP] , identifier[Collections] operator[SEP] identifier[newSetFromMap] operator[SEP] Keyword[new] identifier[ConcurrentHashMap] operator[<] identifier[ObserverInitializationContext] operator[<] operator[?] , operator[?] operator[>] , identifier[Boolean] operator[>] operator[SEP] operator[SEP] operator[SEP] , identifier[Collections] operator[SEP] identifier[newSetFromMap] operator[SEP] Keyword[new] identifier[ConcurrentHashMap] operator[<] identifier[DisposalMethod] operator[<] operator[?] , operator[?] operator[>] , identifier[Boolean] operator[>] operator[SEP] operator[SEP] operator[SEP] , identifier[Collections] operator[SEP] identifier[newSetFromMap] operator[SEP] Keyword[new] identifier[ConcurrentHashMap] operator[<] identifier[DisposalMethod] operator[<] operator[?] , operator[?] operator[>] , identifier[Boolean] operator[>] operator[SEP] operator[SEP] operator[SEP] , identifier[Collections] operator[SEP] identifier[newSetFromMap] operator[SEP] Keyword[new] identifier[ConcurrentHashMap] operator[<] identifier[DecoratorImpl] operator[<] operator[?] operator[>] , identifier[Boolean] operator[>] operator[SEP] operator[SEP] operator[SEP] , identifier[Collections] operator[SEP] identifier[newSetFromMap] operator[SEP] Keyword[new] identifier[ConcurrentHashMap] operator[<] identifier[InterceptorImpl] operator[<] operator[?] operator[>] , identifier[Boolean] operator[>] operator[SEP] operator[SEP] operator[SEP] , identifier[Collections] operator[SEP] identifier[newSetFromMap] operator[SEP] Keyword[new] identifier[ConcurrentHashMap] operator[<] identifier[Type] , identifier[Boolean] operator[>] operator[SEP] operator[SEP] operator[SEP] , identifier[manager] operator[SEP] operator[SEP] }
void moveToDone(final JobID id, boolean sync, final JobID renameJobId) { // If restarting is disabled use original implementation if (conf.getInt(CoronaJobTracker.MAX_JT_FAILURES_CONF, CoronaJobTracker.MAX_JT_FAILURES_DEFAULT) == 0) { moveToDone(id, sync); return; } // Otherwise use corona-specific implementation final List<Path> paths = new ArrayList<Path>(); final Path historyFile = getHistoryFile(id); if (historyFile == null) { LOG.info("No file for job-history with " + id + " found in cache!"); } else { paths.add(historyFile); } final Path confPath = getConfFileWriters(id); if (confPath == null) { LOG.info("No file for jobconf with " + id + " found in cache!"); } else { paths.add(confPath); } Runnable r = new Runnable() { public void run() { // move the files to doneDir folder try { List<PrintWriter> writers = getWriters(id); synchronized (writers) { if (writers.size() > 0) { // try to wait writers for 10 minutes writers.wait(600000L); } if (writers.size() > 0) { LOG.warn("Failed to wait for writers to finish in 10 minutes."); } } URI srcURI = logFs.getUri(); URI doneURI = doneFs.getUri(); boolean useRename = (srcURI.compareTo(doneURI) == 0); for (Path path : paths) { // check if path exists, in case of retries it may not exist if (logFs.exists(path)) { LOG.info("Moving " + path.toString() + " to " + doneDir.toString()); Path dstPath; if (renameJobId != null) { if (JobHistory.CONF_FILTER.accept(path)) { dstPath = new Path(doneDir, getConfFilename(renameJobId)); } else { dstPath = new Path(doneDir, getHistoryFilename(renameJobId)); } } else { dstPath = new Path(doneDir, path.getName()); } if (useRename) { // In the job tracker failover case, the previous job tracker may have // generated the history file, remove it if existed if (doneFs.exists(dstPath)) { LOG.info("Delete the previous job tracker generaged job history file in " + dstPath); doneFs.delete(dstPath, true); } doneFs.rename(path, dstPath); } else { FileUtil.copy(logFs, path, doneFs, dstPath, true, true, conf); } doneFs.setPermission(dstPath, new FsPermission( CoronaJobHistory.HISTORY_FILE_PERMISSION)); } } } catch (Throwable e) { LOG.error("Unable to move history file to DONE folder:\n" + StringUtils.stringifyException(e)); } String historyFileDonePath = null; if (historyFile != null) { historyFileDonePath = new Path(doneDir, historyFile.getName()) .toString(); } JobHistory.jobHistoryFileMap.put(id, new MovedFileInfo( historyFileDonePath, System.currentTimeMillis())); jobTracker.historyFileCopied(id, historyFileDonePath); // purge the job from the cache purgeJob(id); } }; if (sync) { r.run(); } else { executor.execute(r); } }
class class_name[name] begin[{] method[moveToDone, return_type[void], modifier[default], parameter[id, sync, renameJobId]] begin[{] if[binary_operation[call[conf.getInt, parameter[member[CoronaJobTracker.MAX_JT_FAILURES_CONF], member[CoronaJobTracker.MAX_JT_FAILURES_DEFAULT]]], ==, literal[0]]] begin[{] call[.moveToDone, parameter[member[.id], member[.sync]]] return[None] else begin[{] None end[}] local_variable[type[List], paths] local_variable[type[Path], historyFile] if[binary_operation[member[.historyFile], ==, literal[null]]] begin[{] call[LOG.info, parameter[binary_operation[binary_operation[literal["No file for job-history with "], +, member[.id]], +, literal[" found in cache!"]]]] else begin[{] call[paths.add, parameter[member[.historyFile]]] end[}] local_variable[type[Path], confPath] if[binary_operation[member[.confPath], ==, literal[null]]] begin[{] call[LOG.info, parameter[binary_operation[binary_operation[literal["No file for jobconf with "], +, member[.id]], +, literal[" found in cache!"]]]] else begin[{] call[paths.add, parameter[member[.confPath]]] end[}] local_variable[type[Runnable], r] if[member[.sync]] begin[{] call[r.run, parameter[]] else begin[{] call[executor.execute, parameter[member[.r]]] end[}] end[}] END[}]
Keyword[void] identifier[moveToDone] operator[SEP] Keyword[final] identifier[JobID] identifier[id] , Keyword[boolean] identifier[sync] , Keyword[final] identifier[JobID] identifier[renameJobId] operator[SEP] { Keyword[if] operator[SEP] identifier[conf] operator[SEP] identifier[getInt] operator[SEP] identifier[CoronaJobTracker] operator[SEP] identifier[MAX_JT_FAILURES_CONF] , identifier[CoronaJobTracker] operator[SEP] identifier[MAX_JT_FAILURES_DEFAULT] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[moveToDone] operator[SEP] identifier[id] , identifier[sync] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[final] identifier[List] operator[<] identifier[Path] operator[>] identifier[paths] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Path] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Path] identifier[historyFile] operator[=] identifier[getHistoryFile] operator[SEP] identifier[id] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[historyFile] operator[==] Other[null] operator[SEP] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[id] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[paths] operator[SEP] identifier[add] operator[SEP] identifier[historyFile] operator[SEP] operator[SEP] } Keyword[final] identifier[Path] identifier[confPath] operator[=] identifier[getConfFileWriters] operator[SEP] identifier[id] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[confPath] operator[==] Other[null] operator[SEP] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[id] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[paths] operator[SEP] identifier[add] operator[SEP] identifier[confPath] operator[SEP] operator[SEP] } identifier[Runnable] identifier[r] operator[=] Keyword[new] identifier[Runnable] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] { Keyword[try] { identifier[List] operator[<] identifier[PrintWriter] operator[>] identifier[writers] operator[=] identifier[getWriters] operator[SEP] identifier[id] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] identifier[writers] operator[SEP] { Keyword[if] operator[SEP] identifier[writers] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[writers] operator[SEP] identifier[wait] operator[SEP] Other[600000L] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[writers] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[LOG] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[SEP] operator[SEP] } } identifier[URI] identifier[srcURI] operator[=] identifier[logFs] operator[SEP] identifier[getUri] operator[SEP] operator[SEP] operator[SEP] identifier[URI] identifier[doneURI] operator[=] identifier[doneFs] operator[SEP] identifier[getUri] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[useRename] operator[=] operator[SEP] identifier[srcURI] operator[SEP] identifier[compareTo] operator[SEP] identifier[doneURI] operator[SEP] operator[==] Other[0] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Path] identifier[path] operator[:] identifier[paths] operator[SEP] { Keyword[if] operator[SEP] identifier[logFs] operator[SEP] identifier[exists] operator[SEP] identifier[path] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[path] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[doneDir] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Path] identifier[dstPath] operator[SEP] Keyword[if] operator[SEP] identifier[renameJobId] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[JobHistory] operator[SEP] identifier[CONF_FILTER] operator[SEP] identifier[accept] operator[SEP] identifier[path] operator[SEP] operator[SEP] { identifier[dstPath] operator[=] Keyword[new] identifier[Path] operator[SEP] identifier[doneDir] , identifier[getConfFilename] operator[SEP] identifier[renameJobId] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[dstPath] operator[=] Keyword[new] identifier[Path] operator[SEP] identifier[doneDir] , identifier[getHistoryFilename] operator[SEP] identifier[renameJobId] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[dstPath] operator[=] Keyword[new] identifier[Path] operator[SEP] identifier[doneDir] , identifier[path] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[useRename] operator[SEP] { Keyword[if] operator[SEP] identifier[doneFs] operator[SEP] identifier[exists] operator[SEP] identifier[dstPath] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[dstPath] operator[SEP] operator[SEP] identifier[doneFs] operator[SEP] identifier[delete] operator[SEP] identifier[dstPath] , literal[boolean] operator[SEP] operator[SEP] } identifier[doneFs] operator[SEP] identifier[rename] operator[SEP] identifier[path] , identifier[dstPath] operator[SEP] operator[SEP] } Keyword[else] { identifier[FileUtil] operator[SEP] identifier[copy] operator[SEP] identifier[logFs] , identifier[path] , identifier[doneFs] , identifier[dstPath] , literal[boolean] , literal[boolean] , identifier[conf] operator[SEP] operator[SEP] } identifier[doneFs] operator[SEP] identifier[setPermission] operator[SEP] identifier[dstPath] , Keyword[new] identifier[FsPermission] operator[SEP] identifier[CoronaJobHistory] operator[SEP] identifier[HISTORY_FILE_PERMISSION] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[Throwable] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[StringUtils] operator[SEP] identifier[stringifyException] operator[SEP] identifier[e] operator[SEP] operator[SEP] operator[SEP] } identifier[String] identifier[historyFileDonePath] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[historyFile] operator[!=] Other[null] operator[SEP] { identifier[historyFileDonePath] operator[=] Keyword[new] identifier[Path] operator[SEP] identifier[doneDir] , identifier[historyFile] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } identifier[JobHistory] operator[SEP] identifier[jobHistoryFileMap] operator[SEP] identifier[put] operator[SEP] identifier[id] , Keyword[new] identifier[MovedFileInfo] operator[SEP] identifier[historyFileDonePath] , identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[jobTracker] operator[SEP] identifier[historyFileCopied] operator[SEP] identifier[id] , identifier[historyFileDonePath] operator[SEP] operator[SEP] identifier[purgeJob] operator[SEP] identifier[id] operator[SEP] operator[SEP] } } operator[SEP] Keyword[if] operator[SEP] identifier[sync] operator[SEP] { identifier[r] operator[SEP] identifier[run] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[executor] operator[SEP] identifier[execute] operator[SEP] identifier[r] operator[SEP] operator[SEP] } }
public static Token findTokenByEndPosition(JCas jCas, int end) { for (Token token : JCasUtil.select(getInitialView(jCas), Token.class)) { if (token.getEnd() == end) { return token; } } return null; }
class class_name[name] begin[{] method[findTokenByEndPosition, return_type[type[Token]], modifier[public static], parameter[jCas, end]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getEnd, postfix_operators=[], prefix_operators=[], qualifier=token, selectors=[], type_arguments=None), operandr=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=token, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=jCas, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getInitialView, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Token, sub_type=None))], member=select, postfix_operators=[], prefix_operators=[], qualifier=JCasUtil, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=token)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Token, sub_type=None))), label=None) return[literal[null]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Token] identifier[findTokenByEndPosition] operator[SEP] identifier[JCas] identifier[jCas] , Keyword[int] identifier[end] operator[SEP] { Keyword[for] operator[SEP] identifier[Token] identifier[token] operator[:] identifier[JCasUtil] operator[SEP] identifier[select] operator[SEP] identifier[getInitialView] operator[SEP] identifier[jCas] operator[SEP] , identifier[Token] operator[SEP] Keyword[class] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[token] operator[SEP] identifier[getEnd] operator[SEP] operator[SEP] operator[==] identifier[end] operator[SEP] { Keyword[return] identifier[token] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
@Nonnull public static char [] replaceMultiple (@Nullable final char [] aInput, @Nonnull final char [] aSearchChars, @Nonnull final char [] [] aReplacementStrings) { ValueEnforcer.notNull (aSearchChars, "SearchChars"); ValueEnforcer.notNull (aReplacementStrings, "ReplacementStrings"); ValueEnforcer.isEqual (aSearchChars.length, aReplacementStrings.length, "array length mismatch"); // Any input text? if (aInput == null || aInput.length == 0) return ArrayHelper.EMPTY_CHAR_ARRAY; // Any replacement patterns? if (aSearchChars.length == 0) return aInput; // get result length final int nResultLen = getReplaceMultipleResultLength (aInput, aSearchChars, aReplacementStrings); // nothing to replace in here? if (nResultLen == CGlobal.ILLEGAL_UINT) return aInput; // build result final char [] aOutput = new char [nResultLen]; int nOutputIndex = 0; // For all input chars for (final char cInput : aInput) { boolean bFoundReplacement = false; for (int nPatternIndex = 0; nPatternIndex < aSearchChars.length; nPatternIndex++) { if (cInput == aSearchChars[nPatternIndex]) { final char [] aReplacement = aReplacementStrings[nPatternIndex]; final int nReplacementLength = aReplacement.length; System.arraycopy (aReplacement, 0, aOutput, nOutputIndex, nReplacementLength); nOutputIndex += nReplacementLength; bFoundReplacement = true; break; } } if (!bFoundReplacement) { // copy char as is aOutput[nOutputIndex++] = cInput; } } return aOutput; }
class class_name[name] begin[{] method[replaceMultiple, return_type[type[char]], modifier[public static], parameter[aInput, aSearchChars, aReplacementStrings]] begin[{] call[ValueEnforcer.notNull, parameter[member[.aSearchChars], literal["SearchChars"]]] call[ValueEnforcer.notNull, parameter[member[.aReplacementStrings], literal["ReplacementStrings"]]] call[ValueEnforcer.isEqual, parameter[member[aSearchChars.length], member[aReplacementStrings.length], literal["array length mismatch"]]] if[binary_operation[binary_operation[member[.aInput], ==, literal[null]], ||, binary_operation[member[aInput.length], ==, literal[0]]]] begin[{] return[member[ArrayHelper.EMPTY_CHAR_ARRAY]] else begin[{] None end[}] if[binary_operation[member[aSearchChars.length], ==, literal[0]]] begin[{] return[member[.aInput]] else begin[{] None end[}] local_variable[type[int], nResultLen] if[binary_operation[member[.nResultLen], ==, member[CGlobal.ILLEGAL_UINT]]] begin[{] return[member[.aInput]] else begin[{] None end[}] local_variable[type[char], aOutput] local_variable[type[int], nOutputIndex] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), name=bFoundReplacement)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=cInput, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=aSearchChars, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=nPatternIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=aReplacementStrings, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=nPatternIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=aReplacement)], modifiers={'final'}, type=BasicType(dimensions=[None], name=char)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=aReplacement, selectors=[]), name=nReplacementLength)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=aReplacement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=aOutput, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=nOutputIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=nReplacementLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=arraycopy, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=nOutputIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=nReplacementLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=bFoundReplacement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), BreakStatement(goto=None, label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=nPatternIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=aSearchChars, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=nPatternIndex)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=nPatternIndex, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), IfStatement(condition=MemberReference(member=bFoundReplacement, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=aOutput, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=nOutputIndex, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=cInput, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=aInput, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=cInput)], modifiers={'final'}, type=BasicType(dimensions=[], name=char))), label=None) return[member[.aOutput]] end[}] END[}]
annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] Keyword[char] operator[SEP] operator[SEP] identifier[replaceMultiple] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] Keyword[char] operator[SEP] operator[SEP] identifier[aInput] , annotation[@] identifier[Nonnull] Keyword[final] Keyword[char] operator[SEP] operator[SEP] identifier[aSearchChars] , annotation[@] identifier[Nonnull] Keyword[final] Keyword[char] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[aReplacementStrings] operator[SEP] { identifier[ValueEnforcer] operator[SEP] identifier[notNull] operator[SEP] identifier[aSearchChars] , literal[String] operator[SEP] operator[SEP] identifier[ValueEnforcer] operator[SEP] identifier[notNull] operator[SEP] identifier[aReplacementStrings] , literal[String] operator[SEP] operator[SEP] identifier[ValueEnforcer] operator[SEP] identifier[isEqual] operator[SEP] identifier[aSearchChars] operator[SEP] identifier[length] , identifier[aReplacementStrings] operator[SEP] identifier[length] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[aInput] operator[==] Other[null] operator[||] identifier[aInput] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] Keyword[return] identifier[ArrayHelper] operator[SEP] identifier[EMPTY_CHAR_ARRAY] operator[SEP] Keyword[if] operator[SEP] identifier[aSearchChars] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] Keyword[return] identifier[aInput] operator[SEP] Keyword[final] Keyword[int] identifier[nResultLen] operator[=] identifier[getReplaceMultipleResultLength] operator[SEP] identifier[aInput] , identifier[aSearchChars] , identifier[aReplacementStrings] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[nResultLen] operator[==] identifier[CGlobal] operator[SEP] identifier[ILLEGAL_UINT] operator[SEP] Keyword[return] identifier[aInput] operator[SEP] Keyword[final] Keyword[char] operator[SEP] operator[SEP] identifier[aOutput] operator[=] Keyword[new] Keyword[char] operator[SEP] identifier[nResultLen] operator[SEP] operator[SEP] Keyword[int] identifier[nOutputIndex] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[final] Keyword[char] identifier[cInput] operator[:] identifier[aInput] operator[SEP] { Keyword[boolean] identifier[bFoundReplacement] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[nPatternIndex] operator[=] Other[0] operator[SEP] identifier[nPatternIndex] operator[<] identifier[aSearchChars] operator[SEP] identifier[length] operator[SEP] identifier[nPatternIndex] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[cInput] operator[==] identifier[aSearchChars] operator[SEP] identifier[nPatternIndex] operator[SEP] operator[SEP] { Keyword[final] Keyword[char] operator[SEP] operator[SEP] identifier[aReplacement] operator[=] identifier[aReplacementStrings] operator[SEP] identifier[nPatternIndex] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[nReplacementLength] operator[=] identifier[aReplacement] operator[SEP] identifier[length] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[aReplacement] , Other[0] , identifier[aOutput] , identifier[nOutputIndex] , identifier[nReplacementLength] operator[SEP] operator[SEP] identifier[nOutputIndex] operator[+=] identifier[nReplacementLength] operator[SEP] identifier[bFoundReplacement] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] } } Keyword[if] operator[SEP] operator[!] identifier[bFoundReplacement] operator[SEP] { identifier[aOutput] operator[SEP] identifier[nOutputIndex] operator[++] operator[SEP] operator[=] identifier[cInput] operator[SEP] } } Keyword[return] identifier[aOutput] operator[SEP] }
@Override public Score calculateScore() { variableListenerSupport.assertNotificationQueuesAreEmpty(); Score score = easyScoreCalculator.calculateScore(workingSolution); if (score == null) { throw new IllegalStateException("The easyScoreCalculator (" + easyScoreCalculator.getClass() + ") must return a non-null score (" + score + ") in the method calculateScore()."); } if (workingInitScore != 0) { score = score.withInitScore(workingInitScore); } setCalculatedScore(score); return score; }
class class_name[name] begin[{] method[calculateScore, return_type[type[Score]], modifier[public], parameter[]] begin[{] call[variableListenerSupport.assertNotificationQueuesAreEmpty, parameter[]] local_variable[type[Score], score] if[binary_operation[member[.score], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The easyScoreCalculator ("), operandr=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=easyScoreCalculator, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=") must return a non-null score ("), operator=+), operandr=MemberReference(member=score, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=") in the method calculateScore()."), 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)), label=None) else begin[{] None end[}] if[binary_operation[member[.workingInitScore], !=, literal[0]]] begin[{] assign[member[.score], call[score.withInitScore, parameter[member[.workingInitScore]]]] else begin[{] None end[}] call[.setCalculatedScore, parameter[member[.score]]] return[member[.score]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Score] identifier[calculateScore] operator[SEP] operator[SEP] { identifier[variableListenerSupport] operator[SEP] identifier[assertNotificationQueuesAreEmpty] operator[SEP] operator[SEP] operator[SEP] identifier[Score] identifier[score] operator[=] identifier[easyScoreCalculator] operator[SEP] identifier[calculateScore] operator[SEP] identifier[workingSolution] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[score] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[easyScoreCalculator] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[score] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[workingInitScore] operator[!=] Other[0] operator[SEP] { identifier[score] operator[=] identifier[score] operator[SEP] identifier[withInitScore] operator[SEP] identifier[workingInitScore] operator[SEP] operator[SEP] } identifier[setCalculatedScore] operator[SEP] identifier[score] operator[SEP] operator[SEP] Keyword[return] identifier[score] operator[SEP] }
public org.grails.datastore.mapping.query.api.Criteria in(String propertyName, Object[] values) { if (!validateSimpleExpression()) { throwRuntimeException(new IllegalArgumentException("Call to [in] with propertyName [" + propertyName + "] and values [" + values + "] not allowed here.")); } propertyName = calculatePropertyName(propertyName); addToCriteria(Restrictions.in(propertyName, values)); return this; }
class class_name[name] begin[{] method[in, return_type[type[org]], modifier[public], parameter[propertyName, values]] begin[{] if[call[.validateSimpleExpression, parameter[]]] begin[{] call[.throwRuntimeException, parameter[ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Call to [in] with propertyName ["), operandr=MemberReference(member=propertyName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="] and values ["), operator=+), operandr=MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="] not allowed here."), 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))]] else begin[{] None end[}] assign[member[.propertyName], call[.calculatePropertyName, parameter[member[.propertyName]]]] call[.addToCriteria, parameter[call[Restrictions.in, parameter[member[.propertyName], member[.values]]]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[org] operator[SEP] identifier[grails] operator[SEP] identifier[datastore] operator[SEP] identifier[mapping] operator[SEP] identifier[query] operator[SEP] identifier[api] operator[SEP] identifier[Criteria] identifier[in] operator[SEP] identifier[String] identifier[propertyName] , identifier[Object] operator[SEP] operator[SEP] identifier[values] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[validateSimpleExpression] operator[SEP] operator[SEP] operator[SEP] { identifier[throwRuntimeException] operator[SEP] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[propertyName] operator[+] literal[String] operator[+] identifier[values] operator[+] literal[String] operator[SEP] operator[SEP] operator[SEP] } identifier[propertyName] operator[=] identifier[calculatePropertyName] operator[SEP] identifier[propertyName] operator[SEP] operator[SEP] identifier[addToCriteria] operator[SEP] identifier[Restrictions] operator[SEP] identifier[in] operator[SEP] identifier[propertyName] , identifier[values] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public static vpnvserver_vpnsessionpolicy_binding[] get(nitro_service service, String name) throws Exception{ vpnvserver_vpnsessionpolicy_binding obj = new vpnvserver_vpnsessionpolicy_binding(); obj.set_name(name); vpnvserver_vpnsessionpolicy_binding response[] = (vpnvserver_vpnsessionpolicy_binding[]) obj.get_resources(service); return response; }
class class_name[name] begin[{] method[get, return_type[type[vpnvserver_vpnsessionpolicy_binding]], modifier[public static], parameter[service, name]] begin[{] local_variable[type[vpnvserver_vpnsessionpolicy_binding], obj] call[obj.set_name, parameter[member[.name]]] local_variable[type[vpnvserver_vpnsessionpolicy_binding], response] return[member[.response]] end[}] END[}]
Keyword[public] Keyword[static] identifier[vpnvserver_vpnsessionpolicy_binding] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[Exception] { identifier[vpnvserver_vpnsessionpolicy_binding] identifier[obj] operator[=] Keyword[new] identifier[vpnvserver_vpnsessionpolicy_binding] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[SEP] identifier[set_name] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[vpnvserver_vpnsessionpolicy_binding] identifier[response] operator[SEP] operator[SEP] operator[=] operator[SEP] identifier[vpnvserver_vpnsessionpolicy_binding] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[SEP] identifier[get_resources] operator[SEP] identifier[service] operator[SEP] operator[SEP] Keyword[return] identifier[response] operator[SEP] }
@Override public ListPrincipalsForPortfolioResult listPrincipalsForPortfolio(ListPrincipalsForPortfolioRequest request) { request = beforeClientExecution(request); return executeListPrincipalsForPortfolio(request); }
class class_name[name] begin[{] method[listPrincipalsForPortfolio, return_type[type[ListPrincipalsForPortfolioResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeListPrincipalsForPortfolio, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[ListPrincipalsForPortfolioResult] identifier[listPrincipalsForPortfolio] operator[SEP] identifier[ListPrincipalsForPortfolioRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeListPrincipalsForPortfolio] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
protected void executeSassScript(String sassScript) throws MojoExecutionException, MojoFailureException { final Log log = this.getLog(); System.setProperty("org.jruby.embed.localcontext.scope", "threadsafe"); log.debug("Execute SASS Ruby Script:\n" + sassScript); final ScriptEngineManager scriptEngineManager = new ScriptEngineManager(); final ScriptEngine jruby = scriptEngineManager.getEngineByName("jruby"); try { CompilerCallback compilerCallback = new CompilerCallback(log); jruby.getBindings(ScriptContext.ENGINE_SCOPE).put("compiler_callback", compilerCallback); jruby.eval(sassScript); if (failOnError && compilerCallback.hadError()) { throw new MojoFailureException("SASS compilation encountered errors (see above for details)."); } } catch (final ScriptException e) { throw new MojoExecutionException("Failed to execute SASS ruby script:\n" + sassScript, e); } }
class class_name[name] begin[{] method[executeSassScript, return_type[void], modifier[protected], parameter[sassScript]] begin[{] local_variable[type[Log], log] call[System.setProperty, parameter[literal["org.jruby.embed.localcontext.scope"], literal["threadsafe"]]] call[log.debug, parameter[binary_operation[literal["Execute SASS Ruby Script:\n"], +, member[.sassScript]]]] local_variable[type[ScriptEngineManager], scriptEngineManager] local_variable[type[ScriptEngine], jruby] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=log, 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=CompilerCallback, sub_type=None)), name=compilerCallback)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CompilerCallback, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ENGINE_SCOPE, postfix_operators=[], prefix_operators=[], qualifier=ScriptContext, selectors=[])], member=getBindings, postfix_operators=[], prefix_operators=[], qualifier=jruby, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="compiler_callback"), MemberReference(member=compilerCallback, 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), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=sassScript, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=eval, postfix_operators=[], prefix_operators=[], qualifier=jruby, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=failOnError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=hadError, postfix_operators=[], prefix_operators=[], qualifier=compilerCallback, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="SASS compilation encountered errors (see above for details).")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MojoFailureException, sub_type=None)), label=None)]))], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to execute SASS ruby script:\n"), operandr=MemberReference(member=sassScript, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MojoExecutionException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ScriptException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[protected] Keyword[void] identifier[executeSassScript] operator[SEP] identifier[String] identifier[sassScript] operator[SEP] Keyword[throws] identifier[MojoExecutionException] , identifier[MojoFailureException] { Keyword[final] identifier[Log] identifier[log] operator[=] Keyword[this] operator[SEP] identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[setProperty] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[sassScript] operator[SEP] operator[SEP] Keyword[final] identifier[ScriptEngineManager] identifier[scriptEngineManager] operator[=] Keyword[new] identifier[ScriptEngineManager] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[ScriptEngine] identifier[jruby] operator[=] identifier[scriptEngineManager] operator[SEP] identifier[getEngineByName] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[try] { identifier[CompilerCallback] identifier[compilerCallback] operator[=] Keyword[new] identifier[CompilerCallback] operator[SEP] identifier[log] operator[SEP] operator[SEP] identifier[jruby] operator[SEP] identifier[getBindings] operator[SEP] identifier[ScriptContext] operator[SEP] identifier[ENGINE_SCOPE] operator[SEP] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[compilerCallback] operator[SEP] operator[SEP] identifier[jruby] operator[SEP] identifier[eval] operator[SEP] identifier[sassScript] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[failOnError] operator[&&] identifier[compilerCallback] operator[SEP] identifier[hadError] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[MojoFailureException] operator[SEP] literal[String] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] Keyword[final] identifier[ScriptException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[MojoExecutionException] operator[SEP] literal[String] operator[+] identifier[sassScript] , identifier[e] operator[SEP] operator[SEP] } }
public static void run(boolean parallel, int N, IndexRunnable ir, ExecutorService threadPool) { if(!parallel) { for(int i = 0; i < N; i++) ir.run(i); return; } final CountDownLatch latch = new CountDownLatch(N); IntStream.range(0, N).forEach(threadID -> { threadPool.submit(() -> { ir.run(threadID); latch.countDown(); }); }); try { latch.await(); } catch (InterruptedException ex) { Logger.getLogger(ParallelUtils.class.getName()).log(Level.SEVERE, null, ex); } }
class class_name[name] begin[{] method[run, return_type[void], modifier[public static], parameter[parallel, N, ir, threadPool]] begin[{] if[member[.parallel]] begin[{] ForStatement(body=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=run, postfix_operators=[], prefix_operators=[], qualifier=ir, selectors=[], type_arguments=None), 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[None] else begin[{] None end[}] local_variable[type[CountDownLatch], latch] call[IntStream.range, parameter[literal[0], member[.N]]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=await, postfix_operators=[], prefix_operators=[], qualifier=latch, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=ParallelUtils, sub_type=None))], member=getLogger, postfix_operators=[], prefix_operators=[], qualifier=Logger, selectors=[MethodInvocation(arguments=[MemberReference(member=SEVERE, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=log, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['InterruptedException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[run] operator[SEP] Keyword[boolean] identifier[parallel] , Keyword[int] identifier[N] , identifier[IndexRunnable] identifier[ir] , identifier[ExecutorService] identifier[threadPool] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[parallel] 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] identifier[ir] operator[SEP] identifier[run] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[final] identifier[CountDownLatch] identifier[latch] operator[=] Keyword[new] identifier[CountDownLatch] operator[SEP] identifier[N] operator[SEP] operator[SEP] identifier[IntStream] operator[SEP] identifier[range] operator[SEP] Other[0] , identifier[N] operator[SEP] operator[SEP] identifier[forEach] operator[SEP] identifier[threadID] operator[->] { identifier[threadPool] operator[SEP] identifier[submit] operator[SEP] operator[SEP] operator[SEP] operator[->] { identifier[ir] operator[SEP] identifier[run] operator[SEP] identifier[threadID] operator[SEP] operator[SEP] identifier[latch] operator[SEP] identifier[countDown] operator[SEP] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] } operator[SEP] operator[SEP] Keyword[try] { identifier[latch] operator[SEP] identifier[await] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InterruptedException] identifier[ex] operator[SEP] { identifier[Logger] operator[SEP] identifier[getLogger] operator[SEP] identifier[ParallelUtils] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[SEVERE] , Other[null] , identifier[ex] operator[SEP] operator[SEP] } }
public NetworkSecurityGroupInner createOrUpdate(String resourceGroupName, String networkSecurityGroupName, NetworkSecurityGroupInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, parameters).toBlocking().last().body(); }
class class_name[name] begin[{] method[createOrUpdate, return_type[type[NetworkSecurityGroupInner]], modifier[public], parameter[resourceGroupName, networkSecurityGroupName, parameters]] begin[{] return[call[.createOrUpdateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.networkSecurityGroupName], member[.parameters]]]] end[}] END[}]
Keyword[public] identifier[NetworkSecurityGroupInner] identifier[createOrUpdate] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[networkSecurityGroupName] , identifier[NetworkSecurityGroupInner] identifier[parameters] operator[SEP] { Keyword[return] identifier[createOrUpdateWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[networkSecurityGroupName] , identifier[parameters] operator[SEP] operator[SEP] identifier[toBlocking] operator[SEP] operator[SEP] operator[SEP] identifier[last] operator[SEP] operator[SEP] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] }
protected void update(CmsPublishJobInfoBean publishJob) { if (OpenCms.getMemoryMonitor().requiresPersistency()) { CmsDbContext dbc = m_publishEngine.getDbContext(null); try { m_publishEngine.getDriverManager().writePublishJob(dbc, publishJob); } catch (CmsException e) { dbc.rollback(); if (LOG.isErrorEnabled()) { LOG.error(e.getLocalizedMessage(), e); } } finally { dbc.clear(); } } }
class class_name[name] begin[{] method[update, return_type[void], modifier[protected], parameter[publishJob]] begin[{] if[call[OpenCms.getMemoryMonitor, parameter[]]] begin[{] local_variable[type[CmsDbContext], dbc] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=getDriverManager, postfix_operators=[], prefix_operators=[], qualifier=m_publishEngine, selectors=[MethodInvocation(arguments=[MemberReference(member=dbc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=publishJob, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writePublishJob, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=rollback, postfix_operators=[], prefix_operators=[], qualifier=dbc, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isErrorEnabled, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLocalizedMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['CmsException']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=clear, postfix_operators=[], prefix_operators=[], qualifier=dbc, selectors=[], type_arguments=None), label=None)], label=None, resources=None) else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[update] operator[SEP] identifier[CmsPublishJobInfoBean] identifier[publishJob] operator[SEP] { Keyword[if] operator[SEP] identifier[OpenCms] operator[SEP] identifier[getMemoryMonitor] operator[SEP] operator[SEP] operator[SEP] identifier[requiresPersistency] operator[SEP] operator[SEP] operator[SEP] { identifier[CmsDbContext] identifier[dbc] operator[=] identifier[m_publishEngine] operator[SEP] identifier[getDbContext] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[try] { identifier[m_publishEngine] operator[SEP] identifier[getDriverManager] operator[SEP] operator[SEP] operator[SEP] identifier[writePublishJob] operator[SEP] identifier[dbc] , identifier[publishJob] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[CmsException] identifier[e] operator[SEP] { identifier[dbc] operator[SEP] identifier[rollback] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[LOG] operator[SEP] identifier[isErrorEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] identifier[e] operator[SEP] identifier[getLocalizedMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } } Keyword[finally] { identifier[dbc] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] } } }
public void setHost(String p_host) throws MalformedURIException { if (p_host == null || p_host.trim().length() == 0) { m_host = p_host; m_userinfo = null; m_port = -1; } else if (!isWellFormedAddress(p_host)) { throw new MalformedURIException(Utils.messages.createMessage(MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, null)); //"Host is not a well formed address!"); } m_host = p_host; }
class class_name[name] begin[{] method[setHost, return_type[void], modifier[public], parameter[p_host]] begin[{] if[binary_operation[binary_operation[member[.p_host], ==, literal[null]], ||, binary_operation[call[p_host.trim, parameter[]], ==, literal[0]]]] begin[{] assign[member[.m_host], member[.p_host]] assign[member[.m_userinfo], literal[null]] assign[member[.m_port], literal[1]] else begin[{] if[call[.isWellFormedAddress, parameter[member[.p_host]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=ER_HOST_ADDRESS_NOT_WELLFORMED, postfix_operators=[], prefix_operators=[], qualifier=MsgKey, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=createMessage, postfix_operators=[], prefix_operators=[], qualifier=Utils.messages, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MalformedURIException, sub_type=None)), label=None) else begin[{] None end[}] end[}] assign[member[.m_host], member[.p_host]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setHost] operator[SEP] identifier[String] identifier[p_host] operator[SEP] Keyword[throws] identifier[MalformedURIException] { Keyword[if] operator[SEP] identifier[p_host] operator[==] Other[null] operator[||] identifier[p_host] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[m_host] operator[=] identifier[p_host] operator[SEP] identifier[m_userinfo] operator[=] Other[null] operator[SEP] identifier[m_port] operator[=] operator[-] Other[1] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[!] identifier[isWellFormedAddress] operator[SEP] identifier[p_host] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[MalformedURIException] operator[SEP] identifier[Utils] operator[SEP] identifier[messages] operator[SEP] identifier[createMessage] operator[SEP] identifier[MsgKey] operator[SEP] identifier[ER_HOST_ADDRESS_NOT_WELLFORMED] , Other[null] operator[SEP] operator[SEP] operator[SEP] } identifier[m_host] operator[=] identifier[p_host] operator[SEP] }
@Override public Response toResponse(JsonIOException exception) { Throwable throwable = exception; if (exception.getCause() instanceof JsonProcessingException) { throwable = exception.getCause(); } return mappers.get().findMapping(throwable).toResponse(throwable); }
class class_name[name] begin[{] method[toResponse, return_type[type[Response]], modifier[public], parameter[exception]] begin[{] local_variable[type[Throwable], throwable] if[binary_operation[call[exception.getCause, parameter[]], instanceof, type[JsonProcessingException]]] begin[{] assign[member[.throwable], call[exception.getCause, parameter[]]] else begin[{] None end[}] return[call[mappers.get, parameter[]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Response] identifier[toResponse] operator[SEP] identifier[JsonIOException] identifier[exception] operator[SEP] { identifier[Throwable] identifier[throwable] operator[=] identifier[exception] operator[SEP] Keyword[if] operator[SEP] identifier[exception] operator[SEP] identifier[getCause] operator[SEP] operator[SEP] Keyword[instanceof] identifier[JsonProcessingException] operator[SEP] { identifier[throwable] operator[=] identifier[exception] operator[SEP] identifier[getCause] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[mappers] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[findMapping] operator[SEP] identifier[throwable] operator[SEP] operator[SEP] identifier[toResponse] operator[SEP] identifier[throwable] operator[SEP] operator[SEP] }
public static String stripSessionId(final String url) { StringBuilder u = new StringBuilder(url); int sessionStart; while ((sessionStart = u.toString().indexOf(";jsessionid=")) != -1) { int sessionEnd = u.toString().indexOf(';', sessionStart + 1); if (sessionEnd == -1) { sessionEnd = u.toString().indexOf('?', sessionStart + 1); } if (sessionEnd == -1) { sessionEnd = u.length(); } u.delete(sessionStart, sessionEnd); } return u.toString(); }
class class_name[name] begin[{] method[stripSessionId, return_type[type[String]], modifier[public static], parameter[url]] begin[{] local_variable[type[StringBuilder], u] local_variable[type[int], sessionStart] while[binary_operation[assign[member[.sessionStart], call[u.toString, parameter[]]], !=, literal[1]]] begin[{] local_variable[type[int], sessionEnd] if[binary_operation[member[.sessionEnd], ==, literal[1]]] begin[{] assign[member[.sessionEnd], call[u.toString, parameter[]]] else begin[{] None end[}] if[binary_operation[member[.sessionEnd], ==, literal[1]]] begin[{] assign[member[.sessionEnd], call[u.length, parameter[]]] else begin[{] None end[}] call[u.delete, parameter[member[.sessionStart], member[.sessionEnd]]] end[}] return[call[u.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[stripSessionId] operator[SEP] Keyword[final] identifier[String] identifier[url] operator[SEP] { identifier[StringBuilder] identifier[u] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[url] operator[SEP] operator[SEP] Keyword[int] identifier[sessionStart] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[sessionStart] operator[=] identifier[u] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[!=] operator[-] Other[1] operator[SEP] { Keyword[int] identifier[sessionEnd] operator[=] identifier[u] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[indexOf] operator[SEP] literal[String] , identifier[sessionStart] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sessionEnd] operator[==] operator[-] Other[1] operator[SEP] { identifier[sessionEnd] operator[=] identifier[u] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[indexOf] operator[SEP] literal[String] , identifier[sessionStart] operator[+] Other[1] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[sessionEnd] operator[==] operator[-] Other[1] operator[SEP] { identifier[sessionEnd] operator[=] identifier[u] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } identifier[u] operator[SEP] identifier[delete] operator[SEP] identifier[sessionStart] , identifier[sessionEnd] operator[SEP] operator[SEP] } Keyword[return] identifier[u] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public StrBuilder replaceAll(final char search, final char replace) { if (search != replace) { for (int i = 0; i < size; i++) { if (buffer[i] == search) { buffer[i] = replace; } } } return this; }
class class_name[name] begin[{] method[replaceAll, return_type[type[StrBuilder]], modifier[public], parameter[search, replace]] begin[{] if[binary_operation[member[.search], !=, member[.replace]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=search, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=replace, 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=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) else begin[{] None end[}] return[THIS[]] end[}] END[}]
Keyword[public] identifier[StrBuilder] identifier[replaceAll] operator[SEP] Keyword[final] Keyword[char] identifier[search] , Keyword[final] Keyword[char] identifier[replace] operator[SEP] { Keyword[if] operator[SEP] identifier[search] operator[!=] identifier[replace] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[size] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[buffer] operator[SEP] identifier[i] operator[SEP] operator[==] identifier[search] operator[SEP] { identifier[buffer] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[replace] operator[SEP] } } } Keyword[return] Keyword[this] operator[SEP] }
public SampleCount getSampleCount(Timecode from) { final SampleCount me = this.getSampleCount(); final SampleCount them = from.getSampleCount(); return me.subtract(them); }
class class_name[name] begin[{] method[getSampleCount, return_type[type[SampleCount]], modifier[public], parameter[from]] begin[{] local_variable[type[SampleCount], me] local_variable[type[SampleCount], them] return[call[me.subtract, parameter[member[.them]]]] end[}] END[}]
Keyword[public] identifier[SampleCount] identifier[getSampleCount] operator[SEP] identifier[Timecode] identifier[from] operator[SEP] { Keyword[final] identifier[SampleCount] identifier[me] operator[=] Keyword[this] operator[SEP] identifier[getSampleCount] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[SampleCount] identifier[them] operator[=] identifier[from] operator[SEP] identifier[getSampleCount] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[me] operator[SEP] identifier[subtract] operator[SEP] identifier[them] operator[SEP] operator[SEP] }
public void setSchemaSet(ConnectionSchemaSet schemaSet) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "setSchemaSet", schemaSet); getConversation().setSchemaSet(schemaSet); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "setSchemaSet"); }
class class_name[name] begin[{] method[setSchemaSet, return_type[void], modifier[public], parameter[schemaSet]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[THIS[], member[.tc], literal["setSchemaSet"], member[.schemaSet]]] else begin[{] None end[}] call[.getConversation, parameter[]] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[THIS[], member[.tc], literal["setSchemaSet"]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setSchemaSet] operator[SEP] identifier[ConnectionSchemaSet] identifier[schemaSet] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] Keyword[this] , identifier[tc] , literal[String] , identifier[schemaSet] operator[SEP] operator[SEP] identifier[getConversation] operator[SEP] operator[SEP] operator[SEP] identifier[setSchemaSet] operator[SEP] identifier[schemaSet] 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] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] }
public void setRequestCompletionFilter(ITraceFilterExt val) { RequestWriter requestWriter = (RequestWriter) m_connection.getTraceWriter(); requestWriter.getRequestSeparator().setRequestCompletionFilter(val); }
class class_name[name] begin[{] method[setRequestCompletionFilter, return_type[void], modifier[public], parameter[val]] begin[{] local_variable[type[RequestWriter], requestWriter] call[requestWriter.getRequestSeparator, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setRequestCompletionFilter] operator[SEP] identifier[ITraceFilterExt] identifier[val] operator[SEP] { identifier[RequestWriter] identifier[requestWriter] operator[=] operator[SEP] identifier[RequestWriter] operator[SEP] identifier[m_connection] operator[SEP] identifier[getTraceWriter] operator[SEP] operator[SEP] operator[SEP] identifier[requestWriter] operator[SEP] identifier[getRequestSeparator] operator[SEP] operator[SEP] operator[SEP] identifier[setRequestCompletionFilter] operator[SEP] identifier[val] operator[SEP] operator[SEP] }
public static NonCachingImage getNonCachingImage(final String wicketId, final String contentType, final Byte[] data) { final byte[] byteArrayData = ArrayUtils.toPrimitive(data); return getNonCachingImage(wicketId, contentType, byteArrayData); }
class class_name[name] begin[{] method[getNonCachingImage, return_type[type[NonCachingImage]], modifier[public static], parameter[wicketId, contentType, data]] begin[{] local_variable[type[byte], byteArrayData] return[call[.getNonCachingImage, parameter[member[.wicketId], member[.contentType], member[.byteArrayData]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[NonCachingImage] identifier[getNonCachingImage] operator[SEP] Keyword[final] identifier[String] identifier[wicketId] , Keyword[final] identifier[String] identifier[contentType] , Keyword[final] identifier[Byte] operator[SEP] operator[SEP] identifier[data] operator[SEP] { Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[byteArrayData] operator[=] identifier[ArrayUtils] operator[SEP] identifier[toPrimitive] operator[SEP] identifier[data] operator[SEP] operator[SEP] Keyword[return] identifier[getNonCachingImage] operator[SEP] identifier[wicketId] , identifier[contentType] , identifier[byteArrayData] operator[SEP] operator[SEP] }
@Subscribe @AllowConcurrentEvents public synchronized void handleOntologyDeleted(OntologyDeletedEvent event) { log.info("Processing Ontology Deleted Event - {}", event.getOntologyUri()); // Obtain all concepts in the KB Set<URI> conceptUris = this.manager.getKnowledgeBaseManager().listConcepts(null); // Cross reference them with those for which we have entries. The ones unmatched were defined in the previous // ontology (note that tse of namespaces could be abused and therefore may not be a guarantee). Set<URI> difference = Sets.difference(conceptUris, this.indexedMatches.keySet()); for (URI conceptUri : difference) { this.indexedMatches.remove(conceptUri); } for (URI indexedConcept : indexedMatches.keySet()) { Map<URI, MatchResult> matchResultMap = indexedMatches.get(indexedConcept); for (URI conceptUri : difference) { matchResultMap.remove(conceptUri); } indexedMatches.put(indexedConcept, new ConcurrentHashMap<URI, MatchResult>(matchResultMap)); } }
class class_name[name] begin[{] method[handleOntologyDeleted, return_type[void], modifier[synchronized public], parameter[event]] begin[{] call[log.info, parameter[literal["Processing Ontology Deleted Event - {}"], call[event.getOntologyUri, parameter[]]]] local_variable[type[Set], conceptUris] local_variable[type[Set], difference] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=indexedMatches, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=conceptUri, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=difference, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=conceptUri)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=URI, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=indexedConcept, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=indexedMatches, selectors=[], type_arguments=None), name=matchResultMap)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=URI, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=MatchResult, sub_type=None))], dimensions=[], name=Map, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=conceptUri, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=matchResultMap, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=difference, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=conceptUri)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=URI, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=indexedConcept, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MemberReference(member=matchResultMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=URI, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=MatchResult, sub_type=None))], dimensions=None, name=ConcurrentHashMap, sub_type=None))], member=put, postfix_operators=[], prefix_operators=[], qualifier=indexedMatches, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=indexedMatches, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=indexedConcept)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=URI, sub_type=None))), label=None) end[}] END[}]
annotation[@] identifier[Subscribe] annotation[@] identifier[AllowConcurrentEvents] Keyword[public] Keyword[synchronized] Keyword[void] identifier[handleOntologyDeleted] operator[SEP] identifier[OntologyDeletedEvent] identifier[event] operator[SEP] { identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[event] operator[SEP] identifier[getOntologyUri] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[URI] operator[>] identifier[conceptUris] operator[=] Keyword[this] operator[SEP] identifier[manager] operator[SEP] identifier[getKnowledgeBaseManager] operator[SEP] operator[SEP] operator[SEP] identifier[listConcepts] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[URI] operator[>] identifier[difference] operator[=] identifier[Sets] operator[SEP] identifier[difference] operator[SEP] identifier[conceptUris] , Keyword[this] operator[SEP] identifier[indexedMatches] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[URI] identifier[conceptUri] operator[:] identifier[difference] operator[SEP] { Keyword[this] operator[SEP] identifier[indexedMatches] operator[SEP] identifier[remove] operator[SEP] identifier[conceptUri] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[URI] identifier[indexedConcept] operator[:] identifier[indexedMatches] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { identifier[Map] operator[<] identifier[URI] , identifier[MatchResult] operator[>] identifier[matchResultMap] operator[=] identifier[indexedMatches] operator[SEP] identifier[get] operator[SEP] identifier[indexedConcept] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[URI] identifier[conceptUri] operator[:] identifier[difference] operator[SEP] { identifier[matchResultMap] operator[SEP] identifier[remove] operator[SEP] identifier[conceptUri] operator[SEP] operator[SEP] } identifier[indexedMatches] operator[SEP] identifier[put] operator[SEP] identifier[indexedConcept] , Keyword[new] identifier[ConcurrentHashMap] operator[<] identifier[URI] , identifier[MatchResult] operator[>] operator[SEP] identifier[matchResultMap] operator[SEP] operator[SEP] operator[SEP] } }
public ApiResponse<ApiSuccessResponse> deleteUserWithHttpInfo(String dbid, Boolean keepPlaces) throws ApiException { com.squareup.okhttp.Call call = deleteUserValidateBeforeCall(dbid, keepPlaces, null, null); Type localVarReturnType = new TypeToken<ApiSuccessResponse>(){}.getType(); return apiClient.execute(call, localVarReturnType); }
class class_name[name] begin[{] method[deleteUserWithHttpInfo, return_type[type[ApiResponse]], modifier[public], parameter[dbid, keepPlaces]] 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[deleteUserWithHttpInfo] operator[SEP] identifier[String] identifier[dbid] , identifier[Boolean] identifier[keepPlaces] operator[SEP] Keyword[throws] identifier[ApiException] { identifier[com] operator[SEP] identifier[squareup] operator[SEP] identifier[okhttp] operator[SEP] identifier[Call] identifier[call] operator[=] identifier[deleteUserValidateBeforeCall] operator[SEP] identifier[dbid] , identifier[keepPlaces] , 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 Observable<String> beginGetVpnProfilePackageUrlAsync(String resourceGroupName, String virtualNetworkGatewayName) { return beginGetVpnProfilePackageUrlWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1<ServiceResponse<String>, String>() { @Override public String call(ServiceResponse<String> response) { return response.body(); } }); }
class class_name[name] begin[{] method[beginGetVpnProfilePackageUrlAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, virtualNetworkGatewayName]] begin[{] return[call[.beginGetVpnProfilePackageUrlWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.virtualNetworkGatewayName]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[String] operator[>] identifier[beginGetVpnProfilePackageUrlAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[virtualNetworkGatewayName] operator[SEP] { Keyword[return] identifier[beginGetVpnProfilePackageUrlWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[virtualNetworkGatewayName] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[String] operator[>] , identifier[String] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[String] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public String value() { if (!element.is().present() || !element.is().input()) { return null; } WebElement webElement = element.getWebElement(); return webElement.getAttribute(VALUE); }
class class_name[name] begin[{] method[value, return_type[type[String]], modifier[public], parameter[]] begin[{] if[binary_operation[call[element.is, parameter[]], ||, call[element.is, parameter[]]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[WebElement], webElement] return[call[webElement.getAttribute, parameter[member[.VALUE]]]] end[}] END[}]
Keyword[public] identifier[String] identifier[value] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[element] operator[SEP] identifier[is] operator[SEP] operator[SEP] operator[SEP] identifier[present] operator[SEP] operator[SEP] operator[||] operator[!] identifier[element] operator[SEP] identifier[is] operator[SEP] operator[SEP] operator[SEP] identifier[input] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[WebElement] identifier[webElement] operator[=] identifier[element] operator[SEP] identifier[getWebElement] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[webElement] operator[SEP] identifier[getAttribute] operator[SEP] identifier[VALUE] operator[SEP] operator[SEP] }
@Override public CommerceAddressRestriction findByC_C_C(long classNameId, long classPK, long commerceCountryId) throws NoSuchAddressRestrictionException { CommerceAddressRestriction commerceAddressRestriction = fetchByC_C_C(classNameId, classPK, commerceCountryId); if (commerceAddressRestriction == null) { StringBundler msg = new StringBundler(8); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("classNameId="); msg.append(classNameId); msg.append(", classPK="); msg.append(classPK); msg.append(", commerceCountryId="); msg.append(commerceCountryId); msg.append("}"); if (_log.isDebugEnabled()) { _log.debug(msg.toString()); } throw new NoSuchAddressRestrictionException(msg.toString()); } return commerceAddressRestriction; }
class class_name[name] begin[{] method[findByC_C_C, return_type[type[CommerceAddressRestriction]], modifier[public], parameter[classNameId, classPK, commerceCountryId]] begin[{] local_variable[type[CommerceAddressRestriction], commerceAddressRestriction] if[binary_operation[member[.commerceAddressRestriction], ==, literal[null]]] begin[{] local_variable[type[StringBundler], msg] call[msg.append, parameter[member[._NO_SUCH_ENTITY_WITH_KEY]]] call[msg.append, parameter[literal["classNameId="]]] call[msg.append, parameter[member[.classNameId]]] call[msg.append, parameter[literal[", classPK="]]] call[msg.append, parameter[member[.classPK]]] call[msg.append, parameter[literal[", commerceCountryId="]]] call[msg.append, parameter[member[.commerceCountryId]]] call[msg.append, parameter[literal["}"]]] if[call[_log.isDebugEnabled, parameter[]]] begin[{] call[_log.debug, parameter[call[msg.toString, parameter[]]]] else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NoSuchAddressRestrictionException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.commerceAddressRestriction]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CommerceAddressRestriction] identifier[findByC_C_C] operator[SEP] Keyword[long] identifier[classNameId] , Keyword[long] identifier[classPK] , Keyword[long] identifier[commerceCountryId] operator[SEP] Keyword[throws] identifier[NoSuchAddressRestrictionException] { identifier[CommerceAddressRestriction] identifier[commerceAddressRestriction] operator[=] identifier[fetchByC_C_C] operator[SEP] identifier[classNameId] , identifier[classPK] , identifier[commerceCountryId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[commerceAddressRestriction] operator[==] Other[null] operator[SEP] { identifier[StringBundler] identifier[msg] operator[=] Keyword[new] identifier[StringBundler] operator[SEP] Other[8] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] identifier[_NO_SUCH_ENTITY_WITH_KEY] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] identifier[classNameId] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] identifier[classPK] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] identifier[commerceCountryId] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[_log] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[_log] operator[SEP] identifier[debug] operator[SEP] identifier[msg] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[throw] Keyword[new] identifier[NoSuchAddressRestrictionException] operator[SEP] identifier[msg] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[commerceAddressRestriction] operator[SEP] }
@TargetApi(Build.VERSION_CODES.O) public static void setDefaultChannelId(Context context, String channelId) { DefaultChannelId = channelId; if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.N_MR1) { // do nothing for Android versions before Ore return; } try { NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); CharSequence name = context.getPackageName(); String description = "PushNotification"; int importance = NotificationManager.IMPORTANCE_DEFAULT; android.app.NotificationChannel channel = new android.app.NotificationChannel(channelId, name, importance); channel.setDescription(description); notificationManager.createNotificationChannel(channel); } catch (Exception ex) { LOGGER.w("failed to create NotificationChannel, then perhaps PushNotification doesn't work well on Android O and newer version."); } }
class class_name[name] begin[{] method[setDefaultChannelId, return_type[void], modifier[public static], parameter[context, channelId]] begin[{] assign[member[.DefaultChannelId], member[.channelId]] if[binary_operation[member[Build.VERSION.SDK_INT], <=, member[Build.VERSION_CODES.N_MR1]]] begin[{] return[None] else begin[{] None end[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=NOTIFICATION_SERVICE, postfix_operators=[], prefix_operators=[], qualifier=Context, selectors=[])], member=getSystemService, postfix_operators=[], prefix_operators=[], qualifier=context, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=NotificationManager, sub_type=None)), name=notificationManager)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NotificationManager, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getPackageName, postfix_operators=[], prefix_operators=[], qualifier=context, selectors=[], type_arguments=None), name=name)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CharSequence, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="PushNotification"), name=description)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=IMPORTANCE_DEFAULT, postfix_operators=[], prefix_operators=[], qualifier=NotificationManager, selectors=[]), name=importance)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=channelId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=importance, 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=android, sub_type=ReferenceType(arguments=None, dimensions=None, name=app, sub_type=ReferenceType(arguments=None, dimensions=None, name=NotificationChannel, sub_type=None)))), name=channel)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=android, sub_type=ReferenceType(arguments=None, dimensions=None, name=app, sub_type=ReferenceType(arguments=None, dimensions=None, name=NotificationChannel, sub_type=None)))), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=description, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setDescription, postfix_operators=[], prefix_operators=[], qualifier=channel, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=channel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createNotificationChannel, postfix_operators=[], prefix_operators=[], qualifier=notificationManager, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="failed to create NotificationChannel, then perhaps PushNotification doesn't work well on Android O and newer version.")], member=w, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[TargetApi] operator[SEP] identifier[Build] operator[SEP] identifier[VERSION_CODES] operator[SEP] identifier[O] operator[SEP] Keyword[public] Keyword[static] Keyword[void] identifier[setDefaultChannelId] operator[SEP] identifier[Context] identifier[context] , identifier[String] identifier[channelId] operator[SEP] { identifier[DefaultChannelId] operator[=] identifier[channelId] operator[SEP] Keyword[if] operator[SEP] identifier[Build] operator[SEP] identifier[VERSION] operator[SEP] identifier[SDK_INT] operator[<=] identifier[Build] operator[SEP] identifier[VERSION_CODES] operator[SEP] identifier[N_MR1] operator[SEP] { Keyword[return] operator[SEP] } Keyword[try] { identifier[NotificationManager] identifier[notificationManager] operator[=] operator[SEP] identifier[NotificationManager] operator[SEP] identifier[context] operator[SEP] identifier[getSystemService] operator[SEP] identifier[Context] operator[SEP] identifier[NOTIFICATION_SERVICE] operator[SEP] operator[SEP] identifier[CharSequence] identifier[name] operator[=] identifier[context] operator[SEP] identifier[getPackageName] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[description] operator[=] literal[String] operator[SEP] Keyword[int] identifier[importance] operator[=] identifier[NotificationManager] operator[SEP] identifier[IMPORTANCE_DEFAULT] operator[SEP] identifier[android] operator[SEP] identifier[app] operator[SEP] identifier[NotificationChannel] identifier[channel] operator[=] Keyword[new] identifier[android] operator[SEP] identifier[app] operator[SEP] identifier[NotificationChannel] operator[SEP] identifier[channelId] , identifier[name] , identifier[importance] operator[SEP] operator[SEP] identifier[channel] operator[SEP] identifier[setDescription] operator[SEP] identifier[description] operator[SEP] operator[SEP] identifier[notificationManager] operator[SEP] identifier[createNotificationChannel] operator[SEP] identifier[channel] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[w] operator[SEP] literal[String] operator[SEP] operator[SEP] } }
@Pure @Override public boolean contains(double x, double y, double z) { return containsSpherePoint(getX(), getY(), getZ(), getRadius(), x, y, z); }
class class_name[name] begin[{] method[contains, return_type[type[boolean]], modifier[public], parameter[x, y, z]] begin[{] return[call[.containsSpherePoint, parameter[call[.getX, parameter[]], call[.getY, parameter[]], call[.getZ, parameter[]], call[.getRadius, parameter[]], member[.x], member[.y], member[.z]]]] end[}] END[}]
annotation[@] identifier[Pure] annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[contains] operator[SEP] Keyword[double] identifier[x] , Keyword[double] identifier[y] , Keyword[double] identifier[z] operator[SEP] { Keyword[return] identifier[containsSpherePoint] operator[SEP] identifier[getX] operator[SEP] operator[SEP] , identifier[getY] operator[SEP] operator[SEP] , identifier[getZ] operator[SEP] operator[SEP] , identifier[getRadius] operator[SEP] operator[SEP] , identifier[x] , identifier[y] , identifier[z] operator[SEP] operator[SEP] }
public Set visibleGrantees() { HashSet grantees = new HashSet(); GranteeManager gm = granteeManager; if (isAdmin()) { grantees.addAll(gm.getGrantees()); } else { grantees.add(this); Iterator it = getAllRoles().iterator(); while (it.hasNext()) { grantees.add(it.next()); } } return grantees; }
class class_name[name] begin[{] method[visibleGrantees, return_type[type[Set]], modifier[public], parameter[]] begin[{] local_variable[type[HashSet], grantees] local_variable[type[GranteeManager], gm] if[call[.isAdmin, parameter[]]] begin[{] call[grantees.addAll, parameter[call[gm.getGrantees, parameter[]]]] else begin[{] call[grantees.add, parameter[THIS[]]] local_variable[type[Iterator], it] while[call[it.hasNext, parameter[]]] begin[{] call[grantees.add, parameter[call[it.next, parameter[]]]] end[}] end[}] return[member[.grantees]] end[}] END[}]
Keyword[public] identifier[Set] identifier[visibleGrantees] operator[SEP] operator[SEP] { identifier[HashSet] identifier[grantees] operator[=] Keyword[new] identifier[HashSet] operator[SEP] operator[SEP] operator[SEP] identifier[GranteeManager] identifier[gm] operator[=] identifier[granteeManager] operator[SEP] Keyword[if] operator[SEP] identifier[isAdmin] operator[SEP] operator[SEP] operator[SEP] { identifier[grantees] operator[SEP] identifier[addAll] operator[SEP] identifier[gm] operator[SEP] identifier[getGrantees] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[grantees] operator[SEP] identifier[add] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[Iterator] identifier[it] operator[=] identifier[getAllRoles] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[it] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[grantees] operator[SEP] identifier[add] operator[SEP] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[grantees] operator[SEP] }
void generateMbeanXml(Definition def, String outputDir) { String mbeanName = def.getDefaultValue().toLowerCase(Locale.US); if (def.getRaPackage() != null && !def.getRaPackage().equals("")) { if (def.getRaPackage().indexOf('.') >= 0) { mbeanName = def.getRaPackage().substring(def.getRaPackage().lastIndexOf('.') + 1); } else mbeanName = def.getRaPackage(); } try { outputDir = outputDir + File.separatorChar + "src" + File.separatorChar + "main" + File.separatorChar + "resources" + File.separatorChar + "jca"; FileWriter mbfw = Utils.createFile(mbeanName + ".xml", outputDir); MbeanXmlGen mbGen = new MbeanXmlGen(); mbGen.generate(def, mbfw); mbfw.close(); } catch (IOException ioe) { ioe.printStackTrace(); } }
class class_name[name] begin[{] method[generateMbeanXml, return_type[void], modifier[default], parameter[def, outputDir]] begin[{] local_variable[type[String], mbeanName] if[binary_operation[binary_operation[call[def.getRaPackage, parameter[]], !=, literal[null]], &&, call[def.getRaPackage, parameter[]]]] begin[{] if[binary_operation[call[def.getRaPackage, parameter[]], >=, literal[0]]] begin[{] assign[member[.mbeanName], call[def.getRaPackage, parameter[]]] else begin[{] assign[member[.mbeanName], call[def.getRaPackage, parameter[]]] end[}] else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=outputDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=outputDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=separatorChar, postfix_operators=[], prefix_operators=[], qualifier=File, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="src"), operator=+), operandr=MemberReference(member=separatorChar, postfix_operators=[], prefix_operators=[], qualifier=File, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="main"), operator=+), operandr=MemberReference(member=separatorChar, postfix_operators=[], prefix_operators=[], qualifier=File, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="resources"), operator=+), operandr=MemberReference(member=separatorChar, postfix_operators=[], prefix_operators=[], qualifier=File, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="jca"), operator=+)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=mbeanName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".xml"), operator=+), MemberReference(member=outputDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createFile, postfix_operators=[], prefix_operators=[], qualifier=Utils, selectors=[], type_arguments=None), name=mbfw)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FileWriter, sub_type=None)), 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=MbeanXmlGen, sub_type=None)), name=mbGen)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MbeanXmlGen, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=def, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=mbfw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=generate, postfix_operators=[], prefix_operators=[], qualifier=mbGen, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=mbfw, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=ioe, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ioe, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[void] identifier[generateMbeanXml] operator[SEP] identifier[Definition] identifier[def] , identifier[String] identifier[outputDir] operator[SEP] { identifier[String] identifier[mbeanName] operator[=] identifier[def] operator[SEP] identifier[getDefaultValue] operator[SEP] operator[SEP] operator[SEP] identifier[toLowerCase] operator[SEP] identifier[Locale] operator[SEP] identifier[US] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[def] operator[SEP] identifier[getRaPackage] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] operator[!] identifier[def] operator[SEP] identifier[getRaPackage] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[def] operator[SEP] identifier[getRaPackage] operator[SEP] operator[SEP] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[>=] Other[0] operator[SEP] { identifier[mbeanName] operator[=] identifier[def] operator[SEP] identifier[getRaPackage] operator[SEP] operator[SEP] operator[SEP] identifier[substring] operator[SEP] identifier[def] operator[SEP] identifier[getRaPackage] operator[SEP] operator[SEP] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[+] Other[1] operator[SEP] operator[SEP] } Keyword[else] identifier[mbeanName] operator[=] identifier[def] operator[SEP] identifier[getRaPackage] operator[SEP] operator[SEP] operator[SEP] } Keyword[try] { identifier[outputDir] operator[=] identifier[outputDir] operator[+] identifier[File] operator[SEP] identifier[separatorChar] operator[+] literal[String] operator[+] identifier[File] operator[SEP] identifier[separatorChar] operator[+] literal[String] operator[+] identifier[File] operator[SEP] identifier[separatorChar] operator[+] literal[String] operator[+] identifier[File] operator[SEP] identifier[separatorChar] operator[+] literal[String] operator[SEP] identifier[FileWriter] identifier[mbfw] operator[=] identifier[Utils] operator[SEP] identifier[createFile] operator[SEP] identifier[mbeanName] operator[+] literal[String] , identifier[outputDir] operator[SEP] operator[SEP] identifier[MbeanXmlGen] identifier[mbGen] operator[=] Keyword[new] identifier[MbeanXmlGen] operator[SEP] operator[SEP] operator[SEP] identifier[mbGen] operator[SEP] identifier[generate] operator[SEP] identifier[def] , identifier[mbfw] operator[SEP] operator[SEP] identifier[mbfw] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[ioe] operator[SEP] { identifier[ioe] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } }
public Authentication doAuthenticate(final DmfTenantSecurityToken securityToken) { resolveTenant(securityToken); PreAuthenticatedAuthenticationToken authentication = new PreAuthenticatedAuthenticationToken(null, null); for (final PreAuthenticationFilter filter : filterChain) { final PreAuthenticatedAuthenticationToken authenticationRest = createAuthentication(filter, securityToken); if (authenticationRest != null) { authentication = authenticationRest; authentication.setDetails(new TenantAwareAuthenticationDetails(securityToken.getTenant(), true)); break; } } return preAuthenticatedAuthenticationProvider.authenticate(authentication); }
class class_name[name] begin[{] method[doAuthenticate, return_type[type[Authentication]], modifier[public], parameter[securityToken]] begin[{] call[.resolveTenant, parameter[member[.securityToken]]] local_variable[type[PreAuthenticatedAuthenticationToken], authentication] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=filter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=securityToken, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createAuthentication, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=authenticationRest)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=PreAuthenticatedAuthenticationToken, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=authenticationRest, 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=authentication, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=authenticationRest, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getTenant, postfix_operators=[], prefix_operators=[], qualifier=securityToken, selectors=[], type_arguments=None), 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=TenantAwareAuthenticationDetails, sub_type=None))], member=setDetails, postfix_operators=[], prefix_operators=[], qualifier=authentication, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=filterChain, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=filter)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=PreAuthenticationFilter, sub_type=None))), label=None) return[call[preAuthenticatedAuthenticationProvider.authenticate, parameter[member[.authentication]]]] end[}] END[}]
Keyword[public] identifier[Authentication] identifier[doAuthenticate] operator[SEP] Keyword[final] identifier[DmfTenantSecurityToken] identifier[securityToken] operator[SEP] { identifier[resolveTenant] operator[SEP] identifier[securityToken] operator[SEP] operator[SEP] identifier[PreAuthenticatedAuthenticationToken] identifier[authentication] operator[=] Keyword[new] identifier[PreAuthenticatedAuthenticationToken] operator[SEP] Other[null] , Other[null] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[PreAuthenticationFilter] identifier[filter] operator[:] identifier[filterChain] operator[SEP] { Keyword[final] identifier[PreAuthenticatedAuthenticationToken] identifier[authenticationRest] operator[=] identifier[createAuthentication] operator[SEP] identifier[filter] , identifier[securityToken] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[authenticationRest] operator[!=] Other[null] operator[SEP] { identifier[authentication] operator[=] identifier[authenticationRest] operator[SEP] identifier[authentication] operator[SEP] identifier[setDetails] operator[SEP] Keyword[new] identifier[TenantAwareAuthenticationDetails] operator[SEP] identifier[securityToken] operator[SEP] identifier[getTenant] operator[SEP] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } } Keyword[return] identifier[preAuthenticatedAuthenticationProvider] operator[SEP] identifier[authenticate] operator[SEP] identifier[authentication] operator[SEP] operator[SEP] }
public static <T extends Throwable, L> Either<L, Unit> trying(CheckedRunnable<T> runnable, Function<? super T, ? extends L> leftFn) { return Try.trying(runnable).toEither(leftFn); }
class class_name[name] begin[{] method[trying, return_type[type[Either]], modifier[public static], parameter[runnable, leftFn]] begin[{] return[call[Try.trying, parameter[member[.runnable]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Throwable] , identifier[L] operator[>] identifier[Either] operator[<] identifier[L] , identifier[Unit] operator[>] identifier[trying] operator[SEP] identifier[CheckedRunnable] operator[<] identifier[T] operator[>] identifier[runnable] , identifier[Function] operator[<] operator[?] Keyword[super] identifier[T] , operator[?] Keyword[extends] identifier[L] operator[>] identifier[leftFn] operator[SEP] { Keyword[return] identifier[Try] operator[SEP] identifier[trying] operator[SEP] identifier[runnable] operator[SEP] operator[SEP] identifier[toEither] operator[SEP] identifier[leftFn] operator[SEP] operator[SEP] }
public static boolean isXMLNameStart(int codepoint) { if (codepoint >= Character.codePointAt("A", 0) && codepoint <= Character.codePointAt("Z", 0)) { return true; } else if (codepoint == Character.codePointAt("_", 0)) { return true; } else if (codepoint >= Character.codePointAt("a", 0) && codepoint <= Character.codePointAt("z", 0)) { return true; } else if (codepoint >= 0xC0 && codepoint <= 0xD6) { return true; } else if (codepoint >= 0xD8 && codepoint <= 0xF6) { return true; } else if (codepoint >= 0xF8 && codepoint <= 0x2FF) { return true; } else if (codepoint >= 0x370 && codepoint <= 0x37D) { return true; } else if (codepoint >= 0x37F && codepoint <= 0x1FFF) { return true; } else if (codepoint >= 0x200C && codepoint <= 0x200D) { return true; } else if (codepoint >= 0x2070 && codepoint <= 0x218F) { return true; } else if (codepoint >= 0x2C00 && codepoint <= 0x2FEF) { return true; } else if (codepoint >= 0x3001 && codepoint <= 0xD7FF) { return true; } else if (codepoint >= 0xF900 && codepoint <= 0xFDCF) { return true; } else if (codepoint >= 0xFDF0 && codepoint <= 0xFFFD) { return true; } else if (codepoint >= 0x10000 && codepoint <= 0xEFFFF) { return true; } else { return false; } }
class class_name[name] begin[{] method[isXMLNameStart, return_type[type[boolean]], modifier[public static], parameter[codepoint]] begin[{] if[binary_operation[binary_operation[member[.codepoint], >=, call[Character.codePointAt, parameter[literal["A"], literal[0]]]], &&, binary_operation[member[.codepoint], <=, call[Character.codePointAt, parameter[literal["Z"], literal[0]]]]]] begin[{] return[literal[true]] else begin[{] if[binary_operation[member[.codepoint], ==, call[Character.codePointAt, parameter[literal["_"], literal[0]]]]] begin[{] return[literal[true]] else begin[{] if[binary_operation[binary_operation[member[.codepoint], >=, call[Character.codePointAt, parameter[literal["a"], literal[0]]]], &&, binary_operation[member[.codepoint], <=, call[Character.codePointAt, parameter[literal["z"], literal[0]]]]]] begin[{] return[literal[true]] else begin[{] if[binary_operation[binary_operation[member[.codepoint], >=, literal[0xC0]], &&, binary_operation[member[.codepoint], <=, literal[0xD6]]]] begin[{] return[literal[true]] else begin[{] if[binary_operation[binary_operation[member[.codepoint], >=, literal[0xD8]], &&, binary_operation[member[.codepoint], <=, literal[0xF6]]]] begin[{] return[literal[true]] else begin[{] if[binary_operation[binary_operation[member[.codepoint], >=, literal[0xF8]], &&, binary_operation[member[.codepoint], <=, literal[0x2FF]]]] begin[{] return[literal[true]] else begin[{] if[binary_operation[binary_operation[member[.codepoint], >=, literal[0x370]], &&, binary_operation[member[.codepoint], <=, literal[0x37D]]]] begin[{] return[literal[true]] else begin[{] if[binary_operation[binary_operation[member[.codepoint], >=, literal[0x37F]], &&, binary_operation[member[.codepoint], <=, literal[0x1FFF]]]] begin[{] return[literal[true]] else begin[{] if[binary_operation[binary_operation[member[.codepoint], >=, literal[0x200C]], &&, binary_operation[member[.codepoint], <=, literal[0x200D]]]] begin[{] return[literal[true]] else begin[{] if[binary_operation[binary_operation[member[.codepoint], >=, literal[0x2070]], &&, binary_operation[member[.codepoint], <=, literal[0x218F]]]] begin[{] return[literal[true]] else begin[{] if[binary_operation[binary_operation[member[.codepoint], >=, literal[0x2C00]], &&, binary_operation[member[.codepoint], <=, literal[0x2FEF]]]] begin[{] return[literal[true]] else begin[{] if[binary_operation[binary_operation[member[.codepoint], >=, literal[0x3001]], &&, binary_operation[member[.codepoint], <=, literal[0xD7FF]]]] begin[{] return[literal[true]] else begin[{] if[binary_operation[binary_operation[member[.codepoint], >=, literal[0xF900]], &&, binary_operation[member[.codepoint], <=, literal[0xFDCF]]]] begin[{] return[literal[true]] else begin[{] if[binary_operation[binary_operation[member[.codepoint], >=, literal[0xFDF0]], &&, binary_operation[member[.codepoint], <=, literal[0xFFFD]]]] begin[{] return[literal[true]] else begin[{] if[binary_operation[binary_operation[member[.codepoint], >=, literal[0x10000]], &&, binary_operation[member[.codepoint], <=, literal[0xEFFFF]]]] begin[{] return[literal[true]] else begin[{] return[literal[false]] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isXMLNameStart] operator[SEP] Keyword[int] identifier[codepoint] operator[SEP] { Keyword[if] operator[SEP] identifier[codepoint] operator[>=] identifier[Character] operator[SEP] identifier[codePointAt] operator[SEP] literal[String] , Other[0] operator[SEP] operator[&&] identifier[codepoint] operator[<=] identifier[Character] operator[SEP] identifier[codePointAt] operator[SEP] literal[String] , Other[0] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[codepoint] operator[==] identifier[Character] operator[SEP] identifier[codePointAt] operator[SEP] literal[String] , Other[0] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[codepoint] operator[>=] identifier[Character] operator[SEP] identifier[codePointAt] operator[SEP] literal[String] , Other[0] operator[SEP] operator[&&] identifier[codepoint] operator[<=] identifier[Character] operator[SEP] identifier[codePointAt] operator[SEP] literal[String] , Other[0] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[codepoint] operator[>=] literal[Integer] operator[&&] identifier[codepoint] operator[<=] literal[Integer] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[codepoint] operator[>=] literal[Integer] operator[&&] identifier[codepoint] operator[<=] literal[Integer] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[codepoint] operator[>=] literal[Integer] operator[&&] identifier[codepoint] operator[<=] literal[Integer] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[codepoint] operator[>=] literal[Integer] operator[&&] identifier[codepoint] operator[<=] literal[Integer] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[codepoint] operator[>=] literal[Integer] operator[&&] identifier[codepoint] operator[<=] literal[Integer] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[codepoint] operator[>=] literal[Integer] operator[&&] identifier[codepoint] operator[<=] literal[Integer] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[codepoint] operator[>=] literal[Integer] operator[&&] identifier[codepoint] operator[<=] literal[Integer] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[codepoint] operator[>=] literal[Integer] operator[&&] identifier[codepoint] operator[<=] literal[Integer] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[codepoint] operator[>=] literal[Integer] operator[&&] identifier[codepoint] operator[<=] literal[Integer] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[codepoint] operator[>=] literal[Integer] operator[&&] identifier[codepoint] operator[<=] literal[Integer] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[codepoint] operator[>=] literal[Integer] operator[&&] identifier[codepoint] operator[<=] literal[Integer] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[codepoint] operator[>=] literal[Integer] operator[&&] identifier[codepoint] operator[<=] literal[Integer] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { Keyword[return] literal[boolean] operator[SEP] } }
public void setColor(String newColor) { String oldColor = color; color = newColor; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ColorPackage.DOCUMENT_ROOT__COLOR, oldColor, color)); }
class class_name[name] begin[{] method[setColor, return_type[void], modifier[public], parameter[newColor]] begin[{] local_variable[type[String], oldColor] assign[member[.color], member[.newColor]] if[call[.eNotificationRequired, parameter[]]] begin[{] call[.eNotify, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=SET, postfix_operators=[], prefix_operators=[], qualifier=Notification, selectors=[]), MemberReference(member=DOCUMENT_ROOT__COLOR, postfix_operators=[], prefix_operators=[], qualifier=ColorPackage, selectors=[]), MemberReference(member=oldColor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=color, 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=ENotificationImpl, sub_type=None))]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setColor] operator[SEP] identifier[String] identifier[newColor] operator[SEP] { identifier[String] identifier[oldColor] operator[=] identifier[color] operator[SEP] identifier[color] operator[=] identifier[newColor] operator[SEP] Keyword[if] operator[SEP] identifier[eNotificationRequired] operator[SEP] operator[SEP] operator[SEP] identifier[eNotify] operator[SEP] Keyword[new] identifier[ENotificationImpl] operator[SEP] Keyword[this] , identifier[Notification] operator[SEP] identifier[SET] , identifier[ColorPackage] operator[SEP] identifier[DOCUMENT_ROOT__COLOR] , identifier[oldColor] , identifier[color] operator[SEP] operator[SEP] operator[SEP] }
@Override public void setTransactionTimeout(int seconds) throws TransactionManagementException { logger.entering(CLASSNAME, "setTransactionTimeout", seconds); logger.fine("do nothing"); logger.exiting(CLASSNAME, "setTransactionTimeout"); }
class class_name[name] begin[{] method[setTransactionTimeout, return_type[void], modifier[public], parameter[seconds]] begin[{] call[logger.entering, parameter[member[.CLASSNAME], literal["setTransactionTimeout"], member[.seconds]]] call[logger.fine, parameter[literal["do nothing"]]] call[logger.exiting, parameter[member[.CLASSNAME], literal["setTransactionTimeout"]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setTransactionTimeout] operator[SEP] Keyword[int] identifier[seconds] operator[SEP] Keyword[throws] identifier[TransactionManagementException] { identifier[logger] operator[SEP] identifier[entering] operator[SEP] identifier[CLASSNAME] , literal[String] , identifier[seconds] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[fine] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[exiting] operator[SEP] identifier[CLASSNAME] , literal[String] operator[SEP] operator[SEP] }
public <S extends Model, R> AnimaQuery<T> set(TypeFunction<S, R> function, Object value) { return this.set(AnimaUtils.getLambdaColumnName(function), value); }
class class_name[name] begin[{] method[set, return_type[type[AnimaQuery]], modifier[public], parameter[function, value]] begin[{] return[THIS[call[None.set, parameter[call[AnimaUtils.getLambdaColumnName, parameter[member[.function]]], member[.value]]]]] end[}] END[}]
Keyword[public] operator[<] identifier[S] Keyword[extends] identifier[Model] , identifier[R] operator[>] identifier[AnimaQuery] operator[<] identifier[T] operator[>] identifier[set] operator[SEP] identifier[TypeFunction] operator[<] identifier[S] , identifier[R] operator[>] identifier[function] , identifier[Object] identifier[value] operator[SEP] { Keyword[return] Keyword[this] operator[SEP] identifier[set] operator[SEP] identifier[AnimaUtils] operator[SEP] identifier[getLambdaColumnName] operator[SEP] identifier[function] operator[SEP] , identifier[value] operator[SEP] operator[SEP] }
public double[][] solve(double[][] B) { if (B.length != m) { throw new IllegalArgumentException("Matrix row dimensions must agree."); } if (!this.isNonsingular()) { throw new RuntimeException("Matrix is singular."); } // Copy right hand side with pivoting int nx = B[0].length; double[][] X = Matrix.Submatrix(B, piv, 0, nx - 1); // Solve L*Y = B(piv,:) for (int k = 0; k < n; k++) { for (int i = k + 1; i < n; i++) { for (int j = 0; j < nx; j++) { X[i][j] -= X[k][j] * LU[i][k]; } } } // Solve U*X = Y; for (int k = n - 1; k >= 0; k--) { for (int j = 0; j < nx; j++) { X[k][j] /= LU[k][k]; } for (int i = 0; i < k; i++) { for (int j = 0; j < nx; j++) { X[i][j] -= X[k][j] * LU[i][k]; } } } return X; }
class class_name[name] begin[{] method[solve, return_type[type[double]], modifier[public], parameter[B]] begin[{] if[binary_operation[member[B.length], !=, member[.m]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Matrix row dimensions must agree.")], 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[THIS[call[None.isNonsingular, parameter[]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Matrix is singular.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[int], nx] local_variable[type[double], X] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=X, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=-=, value=BinaryOperation(operandl=MemberReference(member=X, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=LU, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=*)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=nx, 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=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, 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=BinaryOperation(operandl=MemberReference(member=k, 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)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=k, 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=k)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=k, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=X, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=/=, value=MemberReference(member=LU, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=nx, 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=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=X, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=-=, value=BinaryOperation(operandl=MemberReference(member=X, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=LU, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=*)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=nx, 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=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, 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=k, 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)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=BinaryOperation(operandl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), name=k)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=k, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.X]] end[}] END[}]
Keyword[public] Keyword[double] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[solve] operator[SEP] Keyword[double] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[B] operator[SEP] { Keyword[if] operator[SEP] identifier[B] operator[SEP] identifier[length] operator[!=] identifier[m] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] Keyword[this] operator[SEP] identifier[isNonsingular] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[int] identifier[nx] operator[=] identifier[B] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[length] operator[SEP] Keyword[double] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[X] operator[=] identifier[Matrix] operator[SEP] identifier[Submatrix] operator[SEP] identifier[B] , identifier[piv] , Other[0] , identifier[nx] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[k] operator[=] Other[0] operator[SEP] identifier[k] operator[<] identifier[n] operator[SEP] identifier[k] operator[++] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[k] operator[+] Other[1] operator[SEP] identifier[i] operator[<] identifier[n] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[nx] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[X] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[j] operator[SEP] operator[-=] identifier[X] operator[SEP] identifier[k] operator[SEP] operator[SEP] identifier[j] operator[SEP] operator[*] identifier[LU] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[k] operator[SEP] operator[SEP] } } } Keyword[for] operator[SEP] Keyword[int] identifier[k] operator[=] identifier[n] operator[-] Other[1] operator[SEP] identifier[k] operator[>=] Other[0] operator[SEP] identifier[k] operator[--] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[nx] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[X] operator[SEP] identifier[k] operator[SEP] operator[SEP] identifier[j] operator[SEP] operator[/=] identifier[LU] operator[SEP] identifier[k] operator[SEP] operator[SEP] identifier[k] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[k] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[nx] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[X] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[j] operator[SEP] operator[-=] identifier[X] operator[SEP] identifier[k] operator[SEP] operator[SEP] identifier[j] operator[SEP] operator[*] identifier[LU] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[k] operator[SEP] operator[SEP] } } } Keyword[return] identifier[X] operator[SEP] }
public AbsoluteOrderingType<WebAppType<T>> getOrCreateAbsoluteOrdering() { List<Node> nodeList = childNode.get("absolute-ordering"); if (nodeList != null && nodeList.size() > 0) { return new AbsoluteOrderingTypeImpl<WebAppType<T>>(this, "absolute-ordering", childNode, nodeList.get(0)); } return createAbsoluteOrdering(); }
class class_name[name] begin[{] method[getOrCreateAbsoluteOrdering, return_type[type[AbsoluteOrderingType]], 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="absolute-ordering"), MemberReference(member=childNode, 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=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=WebAppType, sub_type=None))], dimensions=None, name=AbsoluteOrderingTypeImpl, sub_type=None))] else begin[{] None end[}] return[call[.createAbsoluteOrdering, parameter[]]] end[}] END[}]
Keyword[public] identifier[AbsoluteOrderingType] operator[<] identifier[WebAppType] operator[<] identifier[T] operator[>] operator[>] identifier[getOrCreateAbsoluteOrdering] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[Node] operator[>] identifier[nodeList] operator[=] identifier[childNode] 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[AbsoluteOrderingTypeImpl] operator[<] identifier[WebAppType] operator[<] identifier[T] operator[>] operator[>] operator[SEP] Keyword[this] , literal[String] , identifier[childNode] , identifier[nodeList] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[createAbsoluteOrdering] operator[SEP] operator[SEP] operator[SEP] }
public void marshall(ReportTaskRunnerHeartbeatRequest reportTaskRunnerHeartbeatRequest, ProtocolMarshaller protocolMarshaller) { if (reportTaskRunnerHeartbeatRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(reportTaskRunnerHeartbeatRequest.getTaskrunnerId(), TASKRUNNERID_BINDING); protocolMarshaller.marshall(reportTaskRunnerHeartbeatRequest.getWorkerGroup(), WORKERGROUP_BINDING); protocolMarshaller.marshall(reportTaskRunnerHeartbeatRequest.getHostname(), HOSTNAME_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[reportTaskRunnerHeartbeatRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.reportTaskRunnerHeartbeatRequest], ==, 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=getTaskrunnerId, postfix_operators=[], prefix_operators=[], qualifier=reportTaskRunnerHeartbeatRequest, selectors=[], type_arguments=None), MemberReference(member=TASKRUNNERID_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=getWorkerGroup, postfix_operators=[], prefix_operators=[], qualifier=reportTaskRunnerHeartbeatRequest, selectors=[], type_arguments=None), MemberReference(member=WORKERGROUP_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=getHostname, postfix_operators=[], prefix_operators=[], qualifier=reportTaskRunnerHeartbeatRequest, selectors=[], type_arguments=None), MemberReference(member=HOSTNAME_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[ReportTaskRunnerHeartbeatRequest] identifier[reportTaskRunnerHeartbeatRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[reportTaskRunnerHeartbeatRequest] 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[reportTaskRunnerHeartbeatRequest] operator[SEP] identifier[getTaskrunnerId] operator[SEP] operator[SEP] , identifier[TASKRUNNERID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[reportTaskRunnerHeartbeatRequest] operator[SEP] identifier[getWorkerGroup] operator[SEP] operator[SEP] , identifier[WORKERGROUP_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[reportTaskRunnerHeartbeatRequest] operator[SEP] identifier[getHostname] operator[SEP] operator[SEP] , identifier[HOSTNAME_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 TcpClient<ByteBuf, ByteBuf> newClient(SocketAddress serverAddress, EventLoopGroup eventLoopGroup, Class<? extends Channel> channelClass) { return TcpClientImpl.create(serverAddress, eventLoopGroup, channelClass); }
class class_name[name] begin[{] method[newClient, return_type[type[TcpClient]], modifier[public static], parameter[serverAddress, eventLoopGroup, channelClass]] begin[{] return[call[TcpClientImpl.create, parameter[member[.serverAddress], member[.eventLoopGroup], member[.channelClass]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[TcpClient] operator[<] identifier[ByteBuf] , identifier[ByteBuf] operator[>] identifier[newClient] operator[SEP] identifier[SocketAddress] identifier[serverAddress] , identifier[EventLoopGroup] identifier[eventLoopGroup] , identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Channel] operator[>] identifier[channelClass] operator[SEP] { Keyword[return] identifier[TcpClientImpl] operator[SEP] identifier[create] operator[SEP] identifier[serverAddress] , identifier[eventLoopGroup] , identifier[channelClass] operator[SEP] operator[SEP] }
public static String stripHtmlOverhead(String strText) { strText = MenuParser.stripTopLevelTag(strText, "html"); strText = MenuParser.stripTopLevelTag(strText, "body"); return strText; }
class class_name[name] begin[{] method[stripHtmlOverhead, return_type[type[String]], modifier[public static], parameter[strText]] begin[{] assign[member[.strText], call[MenuParser.stripTopLevelTag, parameter[member[.strText], literal["html"]]]] assign[member[.strText], call[MenuParser.stripTopLevelTag, parameter[member[.strText], literal["body"]]]] return[member[.strText]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[stripHtmlOverhead] operator[SEP] identifier[String] identifier[strText] operator[SEP] { identifier[strText] operator[=] identifier[MenuParser] operator[SEP] identifier[stripTopLevelTag] operator[SEP] identifier[strText] , literal[String] operator[SEP] operator[SEP] identifier[strText] operator[=] identifier[MenuParser] operator[SEP] identifier[stripTopLevelTag] operator[SEP] identifier[strText] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[strText] operator[SEP] }
public ServiceFuture<VirtualNetworkTapInner> updateTagsAsync(String resourceGroupName, String tapName, final ServiceCallback<VirtualNetworkTapInner> serviceCallback) { return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, tapName), serviceCallback); }
class class_name[name] begin[{] method[updateTagsAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, tapName, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.updateTagsWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.tapName]]], member[.serviceCallback]]]] end[}] END[}]
Keyword[public] identifier[ServiceFuture] operator[<] identifier[VirtualNetworkTapInner] operator[>] identifier[updateTagsAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[tapName] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[VirtualNetworkTapInner] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[ServiceFuture] operator[SEP] identifier[fromResponse] operator[SEP] identifier[updateTagsWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[tapName] operator[SEP] , identifier[serviceCallback] operator[SEP] operator[SEP] }
public InvoiceData getInvoice(Date date, String pricingAccountAlias) { Calendar calendar = Calendar.getInstance(); calendar.setTime(date); return getInvoice(calendar, pricingAccountAlias); }
class class_name[name] begin[{] method[getInvoice, return_type[type[InvoiceData]], modifier[public], parameter[date, pricingAccountAlias]] begin[{] local_variable[type[Calendar], calendar] call[calendar.setTime, parameter[member[.date]]] return[call[.getInvoice, parameter[member[.calendar], member[.pricingAccountAlias]]]] end[}] END[}]
Keyword[public] identifier[InvoiceData] identifier[getInvoice] operator[SEP] identifier[Date] identifier[date] , identifier[String] identifier[pricingAccountAlias] operator[SEP] { identifier[Calendar] identifier[calendar] operator[=] identifier[Calendar] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[calendar] operator[SEP] identifier[setTime] operator[SEP] identifier[date] operator[SEP] operator[SEP] Keyword[return] identifier[getInvoice] operator[SEP] identifier[calendar] , identifier[pricingAccountAlias] operator[SEP] operator[SEP] }
public static void setDebugConfigs(OneProperties debugConfigsObj, String debugConfigAbsoluteClassPath) { if (debugConfigsObj != null) { Configs.debugConfigs = debugConfigsObj; } if (debugConfigAbsoluteClassPath != null) { Configs.debugConfigAbsoluteClassPath = debugConfigAbsoluteClassPath; Configs.debugConfigs.initConfigs(Configs.debugConfigAbsoluteClassPath); } else if (debugConfigs != null) { // use new systemConfigs, need initConfigs. Configs.debugConfigs.initConfigs(Configs.debugConfigAbsoluteClassPath); } }
class class_name[name] begin[{] method[setDebugConfigs, return_type[void], modifier[public static], parameter[debugConfigsObj, debugConfigAbsoluteClassPath]] begin[{] if[binary_operation[member[.debugConfigsObj], !=, literal[null]]] begin[{] assign[member[Configs.debugConfigs], member[.debugConfigsObj]] else begin[{] None end[}] if[binary_operation[member[.debugConfigAbsoluteClassPath], !=, literal[null]]] begin[{] assign[member[Configs.debugConfigAbsoluteClassPath], member[.debugConfigAbsoluteClassPath]] call[Configs.debugConfigs.initConfigs, parameter[member[Configs.debugConfigAbsoluteClassPath]]] else begin[{] if[binary_operation[member[.debugConfigs], !=, literal[null]]] begin[{] call[Configs.debugConfigs.initConfigs, parameter[member[Configs.debugConfigAbsoluteClassPath]]] else begin[{] None end[}] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[setDebugConfigs] operator[SEP] identifier[OneProperties] identifier[debugConfigsObj] , identifier[String] identifier[debugConfigAbsoluteClassPath] operator[SEP] { Keyword[if] operator[SEP] identifier[debugConfigsObj] operator[!=] Other[null] operator[SEP] { identifier[Configs] operator[SEP] identifier[debugConfigs] operator[=] identifier[debugConfigsObj] operator[SEP] } Keyword[if] operator[SEP] identifier[debugConfigAbsoluteClassPath] operator[!=] Other[null] operator[SEP] { identifier[Configs] operator[SEP] identifier[debugConfigAbsoluteClassPath] operator[=] identifier[debugConfigAbsoluteClassPath] operator[SEP] identifier[Configs] operator[SEP] identifier[debugConfigs] operator[SEP] identifier[initConfigs] operator[SEP] identifier[Configs] operator[SEP] identifier[debugConfigAbsoluteClassPath] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[debugConfigs] operator[!=] Other[null] operator[SEP] { identifier[Configs] operator[SEP] identifier[debugConfigs] operator[SEP] identifier[initConfigs] operator[SEP] identifier[Configs] operator[SEP] identifier[debugConfigAbsoluteClassPath] operator[SEP] operator[SEP] } }
protected static float parseFloatParameter (String value, String invalidDataMessage) throws DataValidationException { try { return Float.parseFloat(value); } catch (NumberFormatException nfe) { throw new DataValidationException(invalidDataMessage); } }
class class_name[name] begin[{] method[parseFloatParameter, return_type[type[float]], modifier[static protected], parameter[value, invalidDataMessage]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseFloat, postfix_operators=[], prefix_operators=[], qualifier=Float, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=invalidDataMessage, 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=DataValidationException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=nfe, types=['NumberFormatException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[protected] Keyword[static] Keyword[float] identifier[parseFloatParameter] operator[SEP] identifier[String] identifier[value] , identifier[String] identifier[invalidDataMessage] operator[SEP] Keyword[throws] identifier[DataValidationException] { Keyword[try] { Keyword[return] identifier[Float] operator[SEP] identifier[parseFloat] operator[SEP] identifier[value] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NumberFormatException] identifier[nfe] operator[SEP] { Keyword[throw] Keyword[new] identifier[DataValidationException] operator[SEP] identifier[invalidDataMessage] operator[SEP] operator[SEP] } }
public WyalFile.Stmt.Block buildVerificationCondition(WyilFile.Decl declaration, GlobalEnvironment environment, VerificationCondition vc) { WyalFile.Stmt antecedent = flatten(vc.antecedent); Expr consequent = vc.consequent; HashSet<WyalFile.VariableDeclaration> freeVariables = new HashSet<>(); freeVariables(antecedent, freeVariables); freeVariables(consequent, freeVariables); // Determine any variable aliases as necessary. Expr aliases = determineVariableAliases(environment, freeVariables); // Construct the initial condition WyalFile.Stmt verificationCondition = implies(and(aliases, antecedent), vc.consequent); // Now, generate type information for any free variables if (freeVariables.size() > 0) { // This indicates there are one or more free variables in the // verification condition. Hence, these must be universally // quantified to ensure the vc is well=typed. WyalFile.VariableDeclaration[] parameters = freeVariables .toArray(new WyalFile.VariableDeclaration[freeVariables.size()]); WyalFile.Stmt.Block qfBody = new WyalFile.Stmt.Block(verificationCondition); verificationCondition = new WyalFile.Stmt.UniversalQuantifier(parameters, qfBody); } // Done return new WyalFile.Stmt.Block(verificationCondition); }
class class_name[name] begin[{] method[buildVerificationCondition, return_type[type[WyalFile]], modifier[public], parameter[declaration, environment, vc]] begin[{] local_variable[type[WyalFile], antecedent] local_variable[type[Expr], consequent] local_variable[type[HashSet], freeVariables] call[.freeVariables, parameter[member[.antecedent], member[.freeVariables]]] call[.freeVariables, parameter[member[.consequent], member[.freeVariables]]] local_variable[type[Expr], aliases] local_variable[type[WyalFile], verificationCondition] if[binary_operation[call[freeVariables.size, parameter[]], >, literal[0]]] begin[{] local_variable[type[WyalFile], parameters] local_variable[type[WyalFile], qfBody] assign[member[.verificationCondition], ClassCreator(arguments=[MemberReference(member=parameters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=qfBody, 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=WyalFile, sub_type=ReferenceType(arguments=None, dimensions=None, name=Stmt, sub_type=ReferenceType(arguments=None, dimensions=None, name=UniversalQuantifier, sub_type=None))))] else begin[{] None end[}] return[ClassCreator(arguments=[MemberReference(member=verificationCondition, 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=WyalFile, sub_type=ReferenceType(arguments=None, dimensions=None, name=Stmt, sub_type=ReferenceType(arguments=None, dimensions=None, name=Block, sub_type=None))))] end[}] END[}]
Keyword[public] identifier[WyalFile] operator[SEP] identifier[Stmt] operator[SEP] identifier[Block] identifier[buildVerificationCondition] operator[SEP] identifier[WyilFile] operator[SEP] identifier[Decl] identifier[declaration] , identifier[GlobalEnvironment] identifier[environment] , identifier[VerificationCondition] identifier[vc] operator[SEP] { identifier[WyalFile] operator[SEP] identifier[Stmt] identifier[antecedent] operator[=] identifier[flatten] operator[SEP] identifier[vc] operator[SEP] identifier[antecedent] operator[SEP] operator[SEP] identifier[Expr] identifier[consequent] operator[=] identifier[vc] operator[SEP] identifier[consequent] operator[SEP] identifier[HashSet] operator[<] identifier[WyalFile] operator[SEP] identifier[VariableDeclaration] operator[>] identifier[freeVariables] operator[=] Keyword[new] identifier[HashSet] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[freeVariables] operator[SEP] identifier[antecedent] , identifier[freeVariables] operator[SEP] operator[SEP] identifier[freeVariables] operator[SEP] identifier[consequent] , identifier[freeVariables] operator[SEP] operator[SEP] identifier[Expr] identifier[aliases] operator[=] identifier[determineVariableAliases] operator[SEP] identifier[environment] , identifier[freeVariables] operator[SEP] operator[SEP] identifier[WyalFile] operator[SEP] identifier[Stmt] identifier[verificationCondition] operator[=] identifier[implies] operator[SEP] identifier[and] operator[SEP] identifier[aliases] , identifier[antecedent] operator[SEP] , identifier[vc] operator[SEP] identifier[consequent] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[freeVariables] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[WyalFile] operator[SEP] identifier[VariableDeclaration] operator[SEP] operator[SEP] identifier[parameters] operator[=] identifier[freeVariables] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[WyalFile] operator[SEP] identifier[VariableDeclaration] operator[SEP] identifier[freeVariables] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[WyalFile] operator[SEP] identifier[Stmt] operator[SEP] identifier[Block] identifier[qfBody] operator[=] Keyword[new] identifier[WyalFile] operator[SEP] identifier[Stmt] operator[SEP] identifier[Block] operator[SEP] identifier[verificationCondition] operator[SEP] operator[SEP] identifier[verificationCondition] operator[=] Keyword[new] identifier[WyalFile] operator[SEP] identifier[Stmt] operator[SEP] identifier[UniversalQuantifier] operator[SEP] identifier[parameters] , identifier[qfBody] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[WyalFile] operator[SEP] identifier[Stmt] operator[SEP] identifier[Block] operator[SEP] identifier[verificationCondition] operator[SEP] operator[SEP] }
public void setHTTPPort() throws InstallationFailedException { // Note this very significant assumption: this xpath will select exactly one connector Element httpConnector = (Element) getDocument() .selectSingleNode(HTTP_CONNECTOR_XPATH); if (httpConnector == null) { throw new InstallationFailedException("Unable to set server.xml HTTP Port. XPath for Connector element failed."); } httpConnector.addAttribute("port", options .getValue(InstallOptions.TOMCAT_HTTP_PORT)); httpConnector.addAttribute("enableLookups", "true"); // supports client dns/fqdn in xacml authz policies httpConnector.addAttribute("acceptCount", "100"); httpConnector.addAttribute("maxThreads", "150"); httpConnector.addAttribute("minSpareThreads", "25"); httpConnector.addAttribute("maxSpareThreads", "75"); }
class class_name[name] begin[{] method[setHTTPPort, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[Element], httpConnector] if[binary_operation[member[.httpConnector], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to set server.xml HTTP Port. XPath for Connector element failed.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InstallationFailedException, sub_type=None)), label=None) else begin[{] None end[}] call[httpConnector.addAttribute, parameter[literal["port"], call[options.getValue, parameter[member[InstallOptions.TOMCAT_HTTP_PORT]]]]] call[httpConnector.addAttribute, parameter[literal["enableLookups"], literal["true"]]] call[httpConnector.addAttribute, parameter[literal["acceptCount"], literal["100"]]] call[httpConnector.addAttribute, parameter[literal["maxThreads"], literal["150"]]] call[httpConnector.addAttribute, parameter[literal["minSpareThreads"], literal["25"]]] call[httpConnector.addAttribute, parameter[literal["maxSpareThreads"], literal["75"]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setHTTPPort] operator[SEP] operator[SEP] Keyword[throws] identifier[InstallationFailedException] { identifier[Element] identifier[httpConnector] operator[=] operator[SEP] identifier[Element] operator[SEP] identifier[getDocument] operator[SEP] operator[SEP] operator[SEP] identifier[selectSingleNode] operator[SEP] identifier[HTTP_CONNECTOR_XPATH] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[httpConnector] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[InstallationFailedException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[httpConnector] operator[SEP] identifier[addAttribute] operator[SEP] literal[String] , identifier[options] operator[SEP] identifier[getValue] operator[SEP] identifier[InstallOptions] operator[SEP] identifier[TOMCAT_HTTP_PORT] operator[SEP] operator[SEP] operator[SEP] identifier[httpConnector] operator[SEP] identifier[addAttribute] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[httpConnector] operator[SEP] identifier[addAttribute] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[httpConnector] operator[SEP] identifier[addAttribute] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[httpConnector] operator[SEP] identifier[addAttribute] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[httpConnector] operator[SEP] identifier[addAttribute] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] }
private static Field getLabelStatusField() { if (labelStatusField == null) { labelStatusField = getLabelField("a"); if (labelStatusField == null) { labelStatusField = getLabelField("status"); } } return labelStatusField; }
class class_name[name] begin[{] method[getLabelStatusField, return_type[type[Field]], modifier[private static], parameter[]] begin[{] if[binary_operation[member[.labelStatusField], ==, literal[null]]] begin[{] assign[member[.labelStatusField], call[.getLabelField, parameter[literal["a"]]]] if[binary_operation[member[.labelStatusField], ==, literal[null]]] begin[{] assign[member[.labelStatusField], call[.getLabelField, parameter[literal["status"]]]] else begin[{] None end[}] else begin[{] None end[}] return[member[.labelStatusField]] end[}] END[}]
Keyword[private] Keyword[static] identifier[Field] identifier[getLabelStatusField] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[labelStatusField] operator[==] Other[null] operator[SEP] { identifier[labelStatusField] operator[=] identifier[getLabelField] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[labelStatusField] operator[==] Other[null] operator[SEP] { identifier[labelStatusField] operator[=] identifier[getLabelField] operator[SEP] literal[String] operator[SEP] operator[SEP] } } Keyword[return] identifier[labelStatusField] operator[SEP] }
@Override public synchronized void shutdown() throws JournalException { try { if (open) { reader.close(); open = false; } } catch (XMLStreamException e) { throw new JournalException(e); } }
class class_name[name] begin[{] method[shutdown, return_type[void], modifier[synchronized public], parameter[]] begin[{] TryStatement(block=[IfStatement(condition=MemberReference(member=open, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=open, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), 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=JournalException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['XMLStreamException']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[synchronized] Keyword[void] identifier[shutdown] operator[SEP] operator[SEP] Keyword[throws] identifier[JournalException] { Keyword[try] { Keyword[if] operator[SEP] identifier[open] operator[SEP] { identifier[reader] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[open] operator[=] literal[boolean] operator[SEP] } } Keyword[catch] operator[SEP] identifier[XMLStreamException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[JournalException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
public static synchronized CmsWorkplaceSettings initWorkplaceSettings( CmsObject cms, CmsWorkplaceSettings settings, boolean update) { // init the workplace user settings settings = initUserSettings(cms, settings, update); // save current project settings.setProject(cms.getRequestContext().getCurrentProject().getUuid()); String currentSite = cms.getRequestContext().getSiteRoot(); // keep the current site settings.setSite(currentSite); // switch to users preferred site String startSiteRoot = getStartSiteRoot(cms, settings); try { CmsObject cloneCms = OpenCms.initCmsObject(cms); cloneCms.getRequestContext().setSiteRoot(startSiteRoot); String projectName = settings.getUserSettings().getStartProject(); if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(projectName)) { cloneCms.getRequestContext().setCurrentProject(cloneCms.readProject(projectName)); } // check start folder: String startFolder = settings.getUserSettings().getStartFolder(); if (!cloneCms.existsResource(startFolder, CmsResourceFilter.IGNORE_EXPIRATION)) { // self - healing: startFolder = "/"; settings.getUserSettings().setStartFolder(startFolder); } settings.setSite(startSiteRoot); settings.setExplorerResource(startFolder, cloneCms); } catch (Exception e) { settings.getUserSettings().setStartFolder("/"); settings.setSite(startSiteRoot); settings.setExplorerResource("/", null); } finally { settings.setSite(currentSite); } // get the default view from the user settings settings.setViewUri(OpenCms.getLinkManager().substituteLink(cms, settings.getUserSettings().getStartView())); return settings; }
class class_name[name] begin[{] method[initWorkplaceSettings, return_type[type[CmsWorkplaceSettings]], modifier[synchronized public static], parameter[cms, settings, update]] begin[{] assign[member[.settings], call[.initUserSettings, parameter[member[.cms], member[.settings], member[.update]]]] call[settings.setProject, parameter[call[cms.getRequestContext, parameter[]]]] local_variable[type[String], currentSite] call[settings.setSite, parameter[member[.currentSite]]] local_variable[type[String], startSiteRoot] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=cms, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=initCmsObject, postfix_operators=[], prefix_operators=[], qualifier=OpenCms, selectors=[], type_arguments=None), name=cloneCms)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CmsObject, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=getRequestContext, postfix_operators=[], prefix_operators=[], qualifier=cloneCms, selectors=[MethodInvocation(arguments=[MemberReference(member=startSiteRoot, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setSiteRoot, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getUserSettings, postfix_operators=[], prefix_operators=[], qualifier=settings, selectors=[MethodInvocation(arguments=[], member=getStartProject, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=projectName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=projectName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isNotEmptyOrWhitespaceOnly, postfix_operators=[], prefix_operators=[], qualifier=CmsStringUtil, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getRequestContext, postfix_operators=[], prefix_operators=[], qualifier=cloneCms, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=projectName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=readProject, postfix_operators=[], prefix_operators=[], qualifier=cloneCms, selectors=[], type_arguments=None)], member=setCurrentProject, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getUserSettings, postfix_operators=[], prefix_operators=[], qualifier=settings, selectors=[MethodInvocation(arguments=[], member=getStartFolder, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=startFolder)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=startFolder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=IGNORE_EXPIRATION, postfix_operators=[], prefix_operators=[], qualifier=CmsResourceFilter, selectors=[])], member=existsResource, postfix_operators=[], prefix_operators=['!'], qualifier=cloneCms, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=startFolder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/")), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getUserSettings, postfix_operators=[], prefix_operators=[], qualifier=settings, selectors=[MethodInvocation(arguments=[MemberReference(member=startFolder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setStartFolder, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=startSiteRoot, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setSite, postfix_operators=[], prefix_operators=[], qualifier=settings, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=startFolder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cloneCms, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setExplorerResource, postfix_operators=[], prefix_operators=[], qualifier=settings, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=getUserSettings, postfix_operators=[], prefix_operators=[], qualifier=settings, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/")], member=setStartFolder, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=startSiteRoot, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setSite, postfix_operators=[], prefix_operators=[], qualifier=settings, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=setExplorerResource, postfix_operators=[], prefix_operators=[], qualifier=settings, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=currentSite, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setSite, postfix_operators=[], prefix_operators=[], qualifier=settings, selectors=[], type_arguments=None), label=None)], label=None, resources=None) call[settings.setViewUri, parameter[call[OpenCms.getLinkManager, parameter[]]]] return[member[.settings]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[synchronized] identifier[CmsWorkplaceSettings] identifier[initWorkplaceSettings] operator[SEP] identifier[CmsObject] identifier[cms] , identifier[CmsWorkplaceSettings] identifier[settings] , Keyword[boolean] identifier[update] operator[SEP] { identifier[settings] operator[=] identifier[initUserSettings] operator[SEP] identifier[cms] , identifier[settings] , identifier[update] operator[SEP] operator[SEP] identifier[settings] operator[SEP] identifier[setProject] operator[SEP] identifier[cms] operator[SEP] identifier[getRequestContext] operator[SEP] operator[SEP] operator[SEP] identifier[getCurrentProject] operator[SEP] operator[SEP] operator[SEP] identifier[getUuid] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[currentSite] operator[=] identifier[cms] operator[SEP] identifier[getRequestContext] operator[SEP] operator[SEP] operator[SEP] identifier[getSiteRoot] operator[SEP] operator[SEP] operator[SEP] identifier[settings] operator[SEP] identifier[setSite] operator[SEP] identifier[currentSite] operator[SEP] operator[SEP] identifier[String] identifier[startSiteRoot] operator[=] identifier[getStartSiteRoot] operator[SEP] identifier[cms] , identifier[settings] operator[SEP] operator[SEP] Keyword[try] { identifier[CmsObject] identifier[cloneCms] operator[=] identifier[OpenCms] operator[SEP] identifier[initCmsObject] operator[SEP] identifier[cms] operator[SEP] operator[SEP] identifier[cloneCms] operator[SEP] identifier[getRequestContext] operator[SEP] operator[SEP] operator[SEP] identifier[setSiteRoot] operator[SEP] identifier[startSiteRoot] operator[SEP] operator[SEP] identifier[String] identifier[projectName] operator[=] identifier[settings] operator[SEP] identifier[getUserSettings] operator[SEP] operator[SEP] operator[SEP] identifier[getStartProject] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[CmsStringUtil] operator[SEP] identifier[isNotEmptyOrWhitespaceOnly] operator[SEP] identifier[projectName] operator[SEP] operator[SEP] { identifier[cloneCms] operator[SEP] identifier[getRequestContext] operator[SEP] operator[SEP] operator[SEP] identifier[setCurrentProject] operator[SEP] identifier[cloneCms] operator[SEP] identifier[readProject] operator[SEP] identifier[projectName] operator[SEP] operator[SEP] operator[SEP] } identifier[String] identifier[startFolder] operator[=] identifier[settings] operator[SEP] identifier[getUserSettings] operator[SEP] operator[SEP] operator[SEP] identifier[getStartFolder] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[cloneCms] operator[SEP] identifier[existsResource] operator[SEP] identifier[startFolder] , identifier[CmsResourceFilter] operator[SEP] identifier[IGNORE_EXPIRATION] operator[SEP] operator[SEP] { identifier[startFolder] operator[=] literal[String] operator[SEP] identifier[settings] operator[SEP] identifier[getUserSettings] operator[SEP] operator[SEP] operator[SEP] identifier[setStartFolder] operator[SEP] identifier[startFolder] operator[SEP] operator[SEP] } identifier[settings] operator[SEP] identifier[setSite] operator[SEP] identifier[startSiteRoot] operator[SEP] operator[SEP] identifier[settings] operator[SEP] identifier[setExplorerResource] operator[SEP] identifier[startFolder] , identifier[cloneCms] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[settings] operator[SEP] identifier[getUserSettings] operator[SEP] operator[SEP] operator[SEP] identifier[setStartFolder] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[settings] operator[SEP] identifier[setSite] operator[SEP] identifier[startSiteRoot] operator[SEP] operator[SEP] identifier[settings] operator[SEP] identifier[setExplorerResource] operator[SEP] literal[String] , Other[null] operator[SEP] operator[SEP] } Keyword[finally] { identifier[settings] operator[SEP] identifier[setSite] operator[SEP] identifier[currentSite] operator[SEP] operator[SEP] } identifier[settings] operator[SEP] identifier[setViewUri] operator[SEP] identifier[OpenCms] operator[SEP] identifier[getLinkManager] operator[SEP] operator[SEP] operator[SEP] identifier[substituteLink] operator[SEP] identifier[cms] , identifier[settings] operator[SEP] identifier[getUserSettings] operator[SEP] operator[SEP] operator[SEP] identifier[getStartView] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[settings] operator[SEP] }
public static void copy(String str, char[] buffer, int offset) { str.getChars(0, str.length(), buffer, offset); }
class class_name[name] begin[{] method[copy, return_type[void], modifier[public static], parameter[str, buffer, offset]] begin[{] call[str.getChars, parameter[literal[0], call[str.length, parameter[]], member[.buffer], member[.offset]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[copy] operator[SEP] identifier[String] identifier[str] , Keyword[char] operator[SEP] operator[SEP] identifier[buffer] , Keyword[int] identifier[offset] operator[SEP] { identifier[str] operator[SEP] identifier[getChars] operator[SEP] Other[0] , identifier[str] operator[SEP] identifier[length] operator[SEP] operator[SEP] , identifier[buffer] , identifier[offset] operator[SEP] operator[SEP] }
public void registerBlueprint(String className) throws RegisterBlueprintException { try { registerBlueprint(Class.forName(className)); } catch (ClassNotFoundException e) { throw new RegisterBlueprintException(e); } }
class class_name[name] begin[{] method[registerBlueprint, return_type[void], modifier[public], parameter[className]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Class, selectors=[], type_arguments=None)], member=registerBlueprint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=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=RegisterBlueprintException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ClassNotFoundException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[registerBlueprint] operator[SEP] identifier[String] identifier[className] operator[SEP] Keyword[throws] identifier[RegisterBlueprintException] { Keyword[try] { identifier[registerBlueprint] operator[SEP] identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[className] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ClassNotFoundException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RegisterBlueprintException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
public DescribeServicesResult withServices(Service... services) { if (this.services == null) { setServices(new java.util.ArrayList<Service>(services.length)); } for (Service ele : services) { this.services.add(ele); } return this; }
class class_name[name] begin[{] method[withServices, return_type[type[DescribeServicesResult]], modifier[public], parameter[services]] begin[{] if[binary_operation[THIS[member[None.services]], ==, literal[null]]] begin[{] call[.setServices, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=services, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Service, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=services, 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=services, 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=Service, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[DescribeServicesResult] identifier[withServices] operator[SEP] identifier[Service] operator[...] identifier[services] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[services] operator[==] Other[null] operator[SEP] { identifier[setServices] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[Service] operator[>] operator[SEP] identifier[services] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[Service] identifier[ele] operator[:] identifier[services] operator[SEP] { Keyword[this] operator[SEP] identifier[services] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException { try { if (com.google.api.ads.adwords.axis.v201809.cm.AdCustomizerFeedServiceInterface.class.isAssignableFrom(serviceEndpointInterface)) { com.google.api.ads.adwords.axis.v201809.cm.AdCustomizerFeedServiceSoapBindingStub _stub = new com.google.api.ads.adwords.axis.v201809.cm.AdCustomizerFeedServiceSoapBindingStub(new java.net.URL(AdCustomizerFeedServiceInterfacePort_address), this); _stub.setPortName(getAdCustomizerFeedServiceInterfacePortWSDDServiceName()); return _stub; } } catch (java.lang.Throwable t) { throw new javax.xml.rpc.ServiceException(t); } throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface: " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName())); }
class class_name[name] begin[{] method[getPort, return_type[type[java]], modifier[public], parameter[serviceEndpointInterface]] begin[{] TryStatement(block=[IfStatement(condition=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=com.google.api.ads.adwords.axis.v201809.cm, selectors=[MethodInvocation(arguments=[MemberReference(member=serviceEndpointInterface, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isAssignableFrom, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=AdCustomizerFeedServiceInterface, sub_type=None)), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=AdCustomizerFeedServiceInterfacePort_address, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=net, sub_type=ReferenceType(arguments=None, dimensions=None, name=URL, sub_type=None)))), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=google, sub_type=ReferenceType(arguments=None, dimensions=None, name=api, sub_type=ReferenceType(arguments=None, dimensions=None, name=ads, sub_type=ReferenceType(arguments=None, dimensions=None, name=adwords, sub_type=ReferenceType(arguments=None, dimensions=None, name=axis, sub_type=ReferenceType(arguments=None, dimensions=None, name=v201809, sub_type=ReferenceType(arguments=None, dimensions=None, name=cm, sub_type=ReferenceType(arguments=None, dimensions=None, name=AdCustomizerFeedServiceSoapBindingStub, sub_type=None)))))))))), name=_stub)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=google, sub_type=ReferenceType(arguments=None, dimensions=None, name=api, sub_type=ReferenceType(arguments=None, dimensions=None, name=ads, sub_type=ReferenceType(arguments=None, dimensions=None, name=adwords, sub_type=ReferenceType(arguments=None, dimensions=None, name=axis, sub_type=ReferenceType(arguments=None, dimensions=None, name=v201809, sub_type=ReferenceType(arguments=None, dimensions=None, name=cm, sub_type=ReferenceType(arguments=None, dimensions=None, name=AdCustomizerFeedServiceSoapBindingStub, sub_type=None)))))))))), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAdCustomizerFeedServiceInterfacePortWSDDServiceName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=setPortName, postfix_operators=[], prefix_operators=[], qualifier=_stub, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=_stub, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=xml, sub_type=ReferenceType(arguments=None, dimensions=None, name=rpc, sub_type=ReferenceType(arguments=None, dimensions=None, name=ServiceException, sub_type=None))))), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['java.lang.Throwable']))], finally_block=None, label=None, resources=None) ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="There is no stub implementation for the interface: "), operandr=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=serviceEndpointInterface, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=serviceEndpointInterface, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="null")), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=xml, sub_type=ReferenceType(arguments=None, dimensions=None, name=rpc, sub_type=ReferenceType(arguments=None, dimensions=None, name=ServiceException, sub_type=None))))), label=None) end[}] END[}]
Keyword[public] identifier[java] operator[SEP] identifier[rmi] operator[SEP] identifier[Remote] identifier[getPort] operator[SEP] identifier[Class] identifier[serviceEndpointInterface] operator[SEP] Keyword[throws] identifier[javax] operator[SEP] identifier[xml] operator[SEP] identifier[rpc] operator[SEP] identifier[ServiceException] { Keyword[try] { Keyword[if] operator[SEP] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[adwords] operator[SEP] identifier[axis] operator[SEP] identifier[v201809] operator[SEP] identifier[cm] operator[SEP] identifier[AdCustomizerFeedServiceInterface] operator[SEP] Keyword[class] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[serviceEndpointInterface] operator[SEP] operator[SEP] { identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[adwords] operator[SEP] identifier[axis] operator[SEP] identifier[v201809] operator[SEP] identifier[cm] operator[SEP] identifier[AdCustomizerFeedServiceSoapBindingStub] identifier[_stub] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[adwords] operator[SEP] identifier[axis] operator[SEP] identifier[v201809] operator[SEP] identifier[cm] operator[SEP] identifier[AdCustomizerFeedServiceSoapBindingStub] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[net] operator[SEP] identifier[URL] operator[SEP] identifier[AdCustomizerFeedServiceInterfacePort_address] operator[SEP] , Keyword[this] operator[SEP] operator[SEP] identifier[_stub] operator[SEP] identifier[setPortName] operator[SEP] identifier[getAdCustomizerFeedServiceInterfacePortWSDDServiceName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[_stub] operator[SEP] } } Keyword[catch] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { Keyword[throw] Keyword[new] identifier[javax] operator[SEP] identifier[xml] operator[SEP] identifier[rpc] operator[SEP] identifier[ServiceException] operator[SEP] identifier[t] operator[SEP] operator[SEP] } Keyword[throw] Keyword[new] identifier[javax] operator[SEP] identifier[xml] operator[SEP] identifier[rpc] operator[SEP] identifier[ServiceException] operator[SEP] literal[String] operator[+] operator[SEP] identifier[serviceEndpointInterface] operator[==] Other[null] operator[?] literal[String] operator[:] identifier[serviceEndpointInterface] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public int removeShapesNotWithinMap(GoogleMap map) { int count = 0; BoundingBox boundingBox = MapUtils.getBoundingBox(map); for (String database : databases.keySet()) { count += removeShapesNotWithinMap(boundingBox, database); } return count; }
class class_name[name] begin[{] method[removeShapesNotWithinMap, return_type[type[int]], modifier[public], parameter[map]] begin[{] local_variable[type[int], count] local_variable[type[BoundingBox], boundingBox] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[MemberReference(member=boundingBox, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=database, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removeShapesNotWithinMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=databases, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=database)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[member[.count]] end[}] END[}]
Keyword[public] Keyword[int] identifier[removeShapesNotWithinMap] operator[SEP] identifier[GoogleMap] identifier[map] operator[SEP] { Keyword[int] identifier[count] operator[=] Other[0] operator[SEP] identifier[BoundingBox] identifier[boundingBox] operator[=] identifier[MapUtils] operator[SEP] identifier[getBoundingBox] operator[SEP] identifier[map] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[database] operator[:] identifier[databases] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { identifier[count] operator[+=] identifier[removeShapesNotWithinMap] operator[SEP] identifier[boundingBox] , identifier[database] operator[SEP] operator[SEP] } Keyword[return] identifier[count] operator[SEP] }
public <RowT> UnaryCallable<Query, RowT> createReadRowCallable(RowAdapter<RowT> rowAdapter) { return createReadRowsCallable( ServerStreamingCallSettings.<Query, Row>newBuilder() .setRetryableCodes(settings.readRowSettings().getRetryableCodes()) .setRetrySettings(settings.readRowSettings().getRetrySettings()) .setIdleTimeout(settings.readRowSettings().getRetrySettings().getTotalTimeout()) .build(), rowAdapter) .first(); }
class class_name[name] begin[{] method[createReadRowCallable, return_type[type[UnaryCallable]], modifier[public], parameter[rowAdapter]] begin[{] return[call[.createReadRowsCallable, parameter[call[.ServerStreamingCallSettings, parameter[]], member[.rowAdapter]]]] end[}] END[}]
Keyword[public] operator[<] identifier[RowT] operator[>] identifier[UnaryCallable] operator[<] identifier[Query] , identifier[RowT] operator[>] identifier[createReadRowCallable] operator[SEP] identifier[RowAdapter] operator[<] identifier[RowT] operator[>] identifier[rowAdapter] operator[SEP] { Keyword[return] identifier[createReadRowsCallable] operator[SEP] identifier[ServerStreamingCallSettings] operator[SEP] operator[<] identifier[Query] , identifier[Row] operator[>] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setRetryableCodes] operator[SEP] identifier[settings] operator[SEP] identifier[readRowSettings] operator[SEP] operator[SEP] operator[SEP] identifier[getRetryableCodes] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setRetrySettings] operator[SEP] identifier[settings] operator[SEP] identifier[readRowSettings] operator[SEP] operator[SEP] operator[SEP] identifier[getRetrySettings] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setIdleTimeout] operator[SEP] identifier[settings] operator[SEP] identifier[readRowSettings] operator[SEP] operator[SEP] operator[SEP] identifier[getRetrySettings] operator[SEP] operator[SEP] operator[SEP] identifier[getTotalTimeout] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] , identifier[rowAdapter] operator[SEP] operator[SEP] identifier[first] operator[SEP] operator[SEP] operator[SEP] }