code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
private void createExtensionDirectory(String coordinate, File atLocation) { if (atLocation.isDirectory()) { log.info("Directory [%s] already exists, skipping creating a directory", atLocation.getAbsolutePath()); return; } if (!atLocation.mkdir()) { throw new ISE( "Unable to create directory at [%s] for coordinate [%s]", atLocation.getAbsolutePath(), coordinate ); } }
class class_name[name] begin[{] method[createExtensionDirectory, return_type[void], modifier[private], parameter[coordinate, atLocation]] begin[{] if[call[atLocation.isDirectory, parameter[]]] begin[{] call[log.info, parameter[literal["Directory [%s] already exists, skipping creating a directory"], call[atLocation.getAbsolutePath, parameter[]]]] return[None] else begin[{] None end[}] if[call[atLocation.mkdir, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to create directory at [%s] for coordinate [%s]"), MethodInvocation(arguments=[], member=getAbsolutePath, postfix_operators=[], prefix_operators=[], qualifier=atLocation, selectors=[], type_arguments=None), MemberReference(member=coordinate, 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=ISE, sub_type=None)), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[createExtensionDirectory] operator[SEP] identifier[String] identifier[coordinate] , identifier[File] identifier[atLocation] operator[SEP] { Keyword[if] operator[SEP] identifier[atLocation] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[atLocation] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[atLocation] operator[SEP] identifier[mkdir] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[ISE] operator[SEP] literal[String] , identifier[atLocation] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] , identifier[coordinate] operator[SEP] operator[SEP] } }
public Map<String, Long> getAllQueueDetails() { return queueDAO.queuesDetail().entrySet().stream() .sorted(Comparator.comparing(Entry::getKey)) .collect(Collectors.toMap(Entry::getKey, Entry::getValue, (v1, v2) -> v1, LinkedHashMap::new)); }
class class_name[name] begin[{] method[getAllQueueDetails, return_type[type[Map]], modifier[public], parameter[]] begin[{] return[call[queueDAO.queuesDetail, parameter[]]] end[}] END[}]
Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Long] operator[>] identifier[getAllQueueDetails] operator[SEP] operator[SEP] { Keyword[return] identifier[queueDAO] operator[SEP] identifier[queuesDetail] operator[SEP] operator[SEP] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[sorted] operator[SEP] identifier[Comparator] operator[SEP] identifier[comparing] operator[SEP] identifier[Entry] operator[::] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[Collectors] operator[SEP] identifier[toMap] operator[SEP] identifier[Entry] operator[::] identifier[getKey] , identifier[Entry] operator[::] identifier[getValue] , operator[SEP] identifier[v1] , identifier[v2] operator[SEP] operator[->] identifier[v1] , identifier[LinkedHashMap] operator[::] Keyword[new] operator[SEP] operator[SEP] operator[SEP] }
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { titleLabel = new javax.swing.JLabel(); okButton = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("About Okapi"); setResizable(false); titleLabel.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N titleLabel.setText("Okapi Barcode"); okButton.setText("OK"); okButton.setName("btnOK"); // NOI18N okButton.addActionListener(new java.awt.event.ActionListener() { @Override public void actionPerformed(java.awt.event.ActionEvent evt) { okButtonActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(336, 336, 336) .addComponent(okButton) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(titleLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(titleLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 254, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(okButton) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); pack(); }
class class_name[name] begin[{] method[initComponents, return_type[void], modifier[private], parameter[]] begin[{] assign[member[.titleLabel], ClassCreator(arguments=[], 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=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None))))] assign[member[.okButton], ClassCreator(arguments=[], 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=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JButton, sub_type=None))))] call[.setDefaultCloseOperation, parameter[member[javax.swing.WindowConstants.DISPOSE_ON_CLOSE]]] call[.setTitle, parameter[literal["About Okapi"]]] call[.setResizable, parameter[literal[false]]] call[titleLabel.setFont, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Tahoma"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=12)], 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=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=Font, sub_type=None))))]] call[titleLabel.setText, parameter[literal["Okapi Barcode"]]] call[okButton.setText, parameter[literal["OK"]]] call[okButton.setName, parameter[literal["btnOK"]]] call[okButton.addActionListener, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=evt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=okButtonActionPerformed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=actionPerformed, parameters=[FormalParameter(annotations=[], modifiers=set(), name=evt, type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=ActionEvent, sub_type=None)))), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=ActionListener, sub_type=None)))))]] local_variable[type[javax], layout] call[.getContentPane, parameter[]] call[layout.setHorizontalGroup, parameter[call[layout.createParallelGroup, parameter[member[javax.swing.GroupLayout.Alignment.LEADING]]]]] call[layout.setVerticalGroup, parameter[call[layout.createParallelGroup, parameter[member[javax.swing.GroupLayout.Alignment.LEADING]]]]] call[.pack, parameter[]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[void] identifier[initComponents] operator[SEP] operator[SEP] { identifier[titleLabel] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JLabel] operator[SEP] operator[SEP] operator[SEP] identifier[okButton] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JButton] operator[SEP] operator[SEP] operator[SEP] identifier[setDefaultCloseOperation] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[WindowConstants] operator[SEP] identifier[DISPOSE_ON_CLOSE] operator[SEP] operator[SEP] identifier[setTitle] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[setResizable] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[titleLabel] operator[SEP] identifier[setFont] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[Font] operator[SEP] literal[String] , Other[0] , Other[12] operator[SEP] operator[SEP] operator[SEP] identifier[titleLabel] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[okButton] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[okButton] operator[SEP] identifier[setName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[okButton] operator[SEP] identifier[addActionListener] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[ActionListener] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[actionPerformed] operator[SEP] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[ActionEvent] identifier[evt] operator[SEP] { identifier[okButtonActionPerformed] operator[SEP] identifier[evt] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] identifier[layout] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[getContentPane] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getContentPane] operator[SEP] operator[SEP] operator[SEP] identifier[setLayout] operator[SEP] identifier[layout] operator[SEP] operator[SEP] identifier[layout] operator[SEP] identifier[setHorizontalGroup] operator[SEP] identifier[layout] operator[SEP] identifier[createParallelGroup] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[Alignment] operator[SEP] identifier[LEADING] operator[SEP] operator[SEP] identifier[addGroup] operator[SEP] identifier[layout] operator[SEP] identifier[createSequentialGroup] operator[SEP] operator[SEP] operator[SEP] identifier[addGap] operator[SEP] Other[336] , Other[336] , Other[336] operator[SEP] operator[SEP] identifier[addComponent] operator[SEP] identifier[okButton] operator[SEP] operator[SEP] identifier[addContainerGap] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[DEFAULT_SIZE] , identifier[Short] operator[SEP] identifier[MAX_VALUE] operator[SEP] operator[SEP] operator[SEP] identifier[addGroup] operator[SEP] identifier[layout] operator[SEP] identifier[createSequentialGroup] operator[SEP] operator[SEP] operator[SEP] identifier[addContainerGap] operator[SEP] operator[SEP] operator[SEP] identifier[addComponent] operator[SEP] identifier[titleLabel] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[DEFAULT_SIZE] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[DEFAULT_SIZE] , identifier[Short] operator[SEP] identifier[MAX_VALUE] operator[SEP] operator[SEP] identifier[addContainerGap] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[layout] operator[SEP] identifier[setVerticalGroup] operator[SEP] identifier[layout] operator[SEP] identifier[createParallelGroup] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[Alignment] operator[SEP] identifier[LEADING] operator[SEP] operator[SEP] identifier[addGroup] operator[SEP] identifier[layout] operator[SEP] identifier[createSequentialGroup] operator[SEP] operator[SEP] operator[SEP] identifier[addContainerGap] operator[SEP] operator[SEP] operator[SEP] identifier[addComponent] operator[SEP] identifier[titleLabel] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[PREFERRED_SIZE] , Other[254] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[PREFERRED_SIZE] operator[SEP] operator[SEP] identifier[addGap] operator[SEP] Other[18] , Other[18] , Other[18] operator[SEP] operator[SEP] identifier[addComponent] operator[SEP] identifier[okButton] operator[SEP] operator[SEP] identifier[addContainerGap] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[DEFAULT_SIZE] , identifier[Short] operator[SEP] identifier[MAX_VALUE] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[pack] operator[SEP] operator[SEP] operator[SEP] }
public alluxio.grpc.FileInfo getFileInfo() { return fileInfo_ == null ? alluxio.grpc.FileInfo.getDefaultInstance() : fileInfo_; }
class class_name[name] begin[{] method[getFileInfo, return_type[type[alluxio]], modifier[public], parameter[]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=fileInfo_, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MemberReference(member=fileInfo_, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[], member=getDefaultInstance, postfix_operators=[], prefix_operators=[], qualifier=alluxio.grpc.FileInfo, selectors=[], type_arguments=None))] end[}] END[}]
Keyword[public] identifier[alluxio] operator[SEP] identifier[grpc] operator[SEP] identifier[FileInfo] identifier[getFileInfo] operator[SEP] operator[SEP] { Keyword[return] identifier[fileInfo_] operator[==] Other[null] operator[?] identifier[alluxio] operator[SEP] identifier[grpc] operator[SEP] identifier[FileInfo] operator[SEP] identifier[getDefaultInstance] operator[SEP] operator[SEP] operator[:] identifier[fileInfo_] operator[SEP] }
public void startKeepAliveSender(String authToken) { this.token = authToken; stopKeepAliveSender(); logger.info("Starting keepAlive Sender"); future = scheduler.scheduleAtFixedRate(new Runnable() { public void run() { sendKeepAliveBridgeMessage(appId, bridgeId, token, httpClient); } }, 0, keepAliveInterval, TimeUnit.MILLISECONDS); }
class class_name[name] begin[{] method[startKeepAliveSender, return_type[void], modifier[public], parameter[authToken]] begin[{] assign[THIS[member[None.token]], member[.authToken]] call[.stopKeepAliveSender, parameter[]] call[logger.info, parameter[literal["Starting keepAlive Sender"]]] assign[member[.future], call[scheduler.scheduleAtFixedRate, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=appId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=bridgeId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=token, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=httpClient, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sendKeepAliveBridgeMessage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=run, parameters=[], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Runnable, sub_type=None)), literal[0], member[.keepAliveInterval], member[TimeUnit.MILLISECONDS]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[startKeepAliveSender] operator[SEP] identifier[String] identifier[authToken] operator[SEP] { Keyword[this] operator[SEP] identifier[token] operator[=] identifier[authToken] operator[SEP] identifier[stopKeepAliveSender] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[future] operator[=] identifier[scheduler] operator[SEP] identifier[scheduleAtFixedRate] operator[SEP] Keyword[new] identifier[Runnable] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] { identifier[sendKeepAliveBridgeMessage] operator[SEP] identifier[appId] , identifier[bridgeId] , identifier[token] , identifier[httpClient] operator[SEP] operator[SEP] } } , Other[0] , identifier[keepAliveInterval] , identifier[TimeUnit] operator[SEP] identifier[MILLISECONDS] operator[SEP] operator[SEP] }
protected final ElementIterator<URL> defaultGetResources(String name) throws IOException { final Enumeration<URL> e = getClassLoader().getResources(name); return ElementIterator.wrap(e); }
class class_name[name] begin[{] method[defaultGetResources, return_type[type[ElementIterator]], modifier[final protected], parameter[name]] begin[{] local_variable[type[Enumeration], e] return[call[ElementIterator.wrap, parameter[member[.e]]]] end[}] END[}]
Keyword[protected] Keyword[final] identifier[ElementIterator] operator[<] identifier[URL] operator[>] identifier[defaultGetResources] operator[SEP] identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[final] identifier[Enumeration] operator[<] identifier[URL] operator[>] identifier[e] operator[=] identifier[getClassLoader] operator[SEP] operator[SEP] operator[SEP] identifier[getResources] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[return] identifier[ElementIterator] operator[SEP] identifier[wrap] operator[SEP] identifier[e] operator[SEP] operator[SEP] }
public static Iterable<Class<?>> getAnnotated(Class<? extends Annotation> annotation, ClassLoader classLoader) { Iterable<String> entries = getAnnotatedNames(annotation, classLoader); Set<Class<?>> classes = new HashSet<>(); findClasses(classLoader, classes, entries); return classes; }
class class_name[name] begin[{] method[getAnnotated, return_type[type[Iterable]], modifier[public static], parameter[annotation, classLoader]] begin[{] local_variable[type[Iterable], entries] local_variable[type[Set], classes] call[.findClasses, parameter[member[.classLoader], member[.classes], member[.entries]]] return[member[.classes]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Iterable] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[getAnnotated] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Annotation] operator[>] identifier[annotation] , identifier[ClassLoader] identifier[classLoader] operator[SEP] { identifier[Iterable] operator[<] identifier[String] operator[>] identifier[entries] operator[=] identifier[getAnnotatedNames] operator[SEP] identifier[annotation] , identifier[classLoader] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[classes] operator[=] Keyword[new] identifier[HashSet] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[findClasses] operator[SEP] identifier[classLoader] , identifier[classes] , identifier[entries] operator[SEP] operator[SEP] Keyword[return] identifier[classes] operator[SEP] }
public void shutdownBlocking() throws InterruptedException { executor.shutdown(); executor.awaitTermination(); allocator.shutdown(); allocator.awaitTermination(); }
class class_name[name] begin[{] method[shutdownBlocking, return_type[void], modifier[public], parameter[]] begin[{] call[executor.shutdown, parameter[]] call[executor.awaitTermination, parameter[]] call[allocator.shutdown, parameter[]] call[allocator.awaitTermination, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[shutdownBlocking] operator[SEP] operator[SEP] Keyword[throws] identifier[InterruptedException] { identifier[executor] operator[SEP] identifier[shutdown] operator[SEP] operator[SEP] operator[SEP] identifier[executor] operator[SEP] identifier[awaitTermination] operator[SEP] operator[SEP] operator[SEP] identifier[allocator] operator[SEP] identifier[shutdown] operator[SEP] operator[SEP] operator[SEP] identifier[allocator] operator[SEP] identifier[awaitTermination] operator[SEP] operator[SEP] operator[SEP] }
public MessageRequest withContext(java.util.Map<String, String> context) { setContext(context); return this; }
class class_name[name] begin[{] method[withContext, return_type[type[MessageRequest]], modifier[public], parameter[context]] begin[{] call[.setContext, parameter[member[.context]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[MessageRequest] identifier[withContext] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[context] operator[SEP] { identifier[setContext] operator[SEP] identifier[context] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public static ImmutableListMultimap.Builder<String, String> headerMapBuilder() { return ImmutableListMultimap.<String, String> builder() .orderKeysBy(String.CASE_INSENSITIVE_ORDER); }
class class_name[name] begin[{] method[headerMapBuilder, return_type[type[ImmutableListMultimap]], modifier[public static], parameter[]] begin[{] return[call[.ImmutableListMultimap, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ImmutableListMultimap] operator[SEP] identifier[Builder] operator[<] identifier[String] , identifier[String] operator[>] identifier[headerMapBuilder] operator[SEP] operator[SEP] { Keyword[return] identifier[ImmutableListMultimap] operator[SEP] operator[<] identifier[String] , identifier[String] operator[>] identifier[builder] operator[SEP] operator[SEP] operator[SEP] identifier[orderKeysBy] operator[SEP] identifier[String] operator[SEP] identifier[CASE_INSENSITIVE_ORDER] operator[SEP] operator[SEP] }
public T payloadModel(Object payload) { Assert.notNull(applicationContext, "Citrus application context is not initialized!"); if (!CollectionUtils.isEmpty(applicationContext.getBeansOfType(Marshaller.class))) { return payload(payload, applicationContext.getBean(Marshaller.class)); } else if (!CollectionUtils.isEmpty(applicationContext.getBeansOfType(ObjectMapper.class))) { return payload(payload, applicationContext.getBean(ObjectMapper.class)); } throw new CitrusRuntimeException("Unable to find default object mapper or marshaller in application context"); }
class class_name[name] begin[{] method[payloadModel, return_type[type[T]], modifier[public], parameter[payload]] begin[{] call[Assert.notNull, parameter[member[.applicationContext], literal["Citrus application context is not initialized!"]]] if[call[CollectionUtils.isEmpty, parameter[call[applicationContext.getBeansOfType, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Marshaller, sub_type=None))]]]]] begin[{] return[call[.payload, parameter[member[.payload], call[applicationContext.getBean, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Marshaller, sub_type=None))]]]]] else begin[{] if[call[CollectionUtils.isEmpty, parameter[call[applicationContext.getBeansOfType, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ObjectMapper, sub_type=None))]]]]] begin[{] return[call[.payload, parameter[member[.payload], call[applicationContext.getBean, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ObjectMapper, sub_type=None))]]]]] else begin[{] None end[}] end[}] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to find default object mapper or marshaller in application context")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CitrusRuntimeException, sub_type=None)), label=None) end[}] END[}]
Keyword[public] identifier[T] identifier[payloadModel] operator[SEP] identifier[Object] identifier[payload] operator[SEP] { identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] identifier[applicationContext] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[CollectionUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[applicationContext] operator[SEP] identifier[getBeansOfType] operator[SEP] identifier[Marshaller] operator[SEP] Keyword[class] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[payload] operator[SEP] identifier[payload] , identifier[applicationContext] operator[SEP] identifier[getBean] operator[SEP] identifier[Marshaller] operator[SEP] Keyword[class] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[!] identifier[CollectionUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[applicationContext] operator[SEP] identifier[getBeansOfType] operator[SEP] identifier[ObjectMapper] operator[SEP] Keyword[class] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[payload] operator[SEP] identifier[payload] , identifier[applicationContext] operator[SEP] identifier[getBean] operator[SEP] identifier[ObjectMapper] operator[SEP] Keyword[class] operator[SEP] operator[SEP] operator[SEP] } Keyword[throw] Keyword[new] identifier[CitrusRuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP] }
public static long[] hash(final long in, final long seed, final long[] hashOut) { final long h1 = seed ^ mixK1(in); final long h2 = seed; return finalMix128(h1, h2, 8, hashOut); }
class class_name[name] begin[{] method[hash, return_type[type[long]], modifier[public static], parameter[in, seed, hashOut]] begin[{] local_variable[type[long], h1] local_variable[type[long], h2] return[call[.finalMix128, parameter[member[.h1], member[.h2], literal[8], member[.hashOut]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[long] operator[SEP] operator[SEP] identifier[hash] operator[SEP] Keyword[final] Keyword[long] identifier[in] , Keyword[final] Keyword[long] identifier[seed] , Keyword[final] Keyword[long] operator[SEP] operator[SEP] identifier[hashOut] operator[SEP] { Keyword[final] Keyword[long] identifier[h1] operator[=] identifier[seed] operator[^] identifier[mixK1] operator[SEP] identifier[in] operator[SEP] operator[SEP] Keyword[final] Keyword[long] identifier[h2] operator[=] identifier[seed] operator[SEP] Keyword[return] identifier[finalMix128] operator[SEP] identifier[h1] , identifier[h2] , Other[8] , identifier[hashOut] operator[SEP] operator[SEP] }
public void resetCursor() { if(buffer == null) { buffer = Pointer.create(new byte[bufsize], 0); } buffer.buffer[buffer.start] = 0; cursor = -1; lineptr = -1; linectptr = -1; token = -1; toktmp = -1; marker = -1; limit = -1; root = null; root_on_error = null; linect = 0; eof = false; last_token = 0; force_token = 0; }
class class_name[name] begin[{] method[resetCursor, return_type[void], modifier[public], parameter[]] begin[{] if[binary_operation[member[.buffer], ==, literal[null]]] begin[{] assign[member[.buffer], call[Pointer.create, parameter[ArrayCreator(dimensions=[MemberReference(member=bufsize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte)), literal[0]]]] else begin[{] None end[}] assign[member[buffer.buffer], literal[0]] assign[member[.cursor], literal[1]] assign[member[.lineptr], literal[1]] assign[member[.linectptr], literal[1]] assign[member[.token], literal[1]] assign[member[.toktmp], literal[1]] assign[member[.marker], literal[1]] assign[member[.limit], literal[1]] assign[member[.root], literal[null]] assign[member[.root_on_error], literal[null]] assign[member[.linect], literal[0]] assign[member[.eof], literal[false]] assign[member[.last_token], literal[0]] assign[member[.force_token], literal[0]] end[}] END[}]
Keyword[public] Keyword[void] identifier[resetCursor] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[buffer] operator[==] Other[null] operator[SEP] { identifier[buffer] operator[=] identifier[Pointer] operator[SEP] identifier[create] operator[SEP] Keyword[new] Keyword[byte] operator[SEP] identifier[bufsize] operator[SEP] , Other[0] operator[SEP] operator[SEP] } identifier[buffer] operator[SEP] identifier[buffer] operator[SEP] identifier[buffer] operator[SEP] identifier[start] operator[SEP] operator[=] Other[0] operator[SEP] identifier[cursor] operator[=] operator[-] Other[1] operator[SEP] identifier[lineptr] operator[=] operator[-] Other[1] operator[SEP] identifier[linectptr] operator[=] operator[-] Other[1] operator[SEP] identifier[token] operator[=] operator[-] Other[1] operator[SEP] identifier[toktmp] operator[=] operator[-] Other[1] operator[SEP] identifier[marker] operator[=] operator[-] Other[1] operator[SEP] identifier[limit] operator[=] operator[-] Other[1] operator[SEP] identifier[root] operator[=] Other[null] operator[SEP] identifier[root_on_error] operator[=] Other[null] operator[SEP] identifier[linect] operator[=] Other[0] operator[SEP] identifier[eof] operator[=] literal[boolean] operator[SEP] identifier[last_token] operator[=] Other[0] operator[SEP] identifier[force_token] operator[=] Other[0] operator[SEP] }
public static boolean isOutOfBandNode (@Nonnull final IHCNode aHCNode) { ValueEnforcer.notNull (aHCNode, "HCNode"); // Is the @OutOfBandNode annotation present? if (s_aOOBNAnnotationCache.hasAnnotation (aHCNode)) return true; // If it is a wrapped node, look into it if (HCHelper.isWrappedNode (aHCNode)) return isOutOfBandNode (HCHelper.getUnwrappedNode (aHCNode)); // Not an out of band node return false; }
class class_name[name] begin[{] method[isOutOfBandNode, return_type[type[boolean]], modifier[public static], parameter[aHCNode]] begin[{] call[ValueEnforcer.notNull, parameter[member[.aHCNode], literal["HCNode"]]] if[call[s_aOOBNAnnotationCache.hasAnnotation, parameter[member[.aHCNode]]]] begin[{] return[literal[true]] else begin[{] None end[}] if[call[HCHelper.isWrappedNode, parameter[member[.aHCNode]]]] begin[{] return[call[.isOutOfBandNode, parameter[call[HCHelper.getUnwrappedNode, parameter[member[.aHCNode]]]]]] else begin[{] None end[}] return[literal[false]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isOutOfBandNode] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[IHCNode] identifier[aHCNode] operator[SEP] { identifier[ValueEnforcer] operator[SEP] identifier[notNull] operator[SEP] identifier[aHCNode] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[s_aOOBNAnnotationCache] operator[SEP] identifier[hasAnnotation] operator[SEP] identifier[aHCNode] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[HCHelper] operator[SEP] identifier[isWrappedNode] operator[SEP] identifier[aHCNode] operator[SEP] operator[SEP] Keyword[return] identifier[isOutOfBandNode] operator[SEP] identifier[HCHelper] operator[SEP] identifier[getUnwrappedNode] operator[SEP] identifier[aHCNode] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
public void setDescriptionVisible(boolean visible) { if (visible) { add("Center", split); split.setTopComponent(tableScroll); split.setBottomComponent(descriptionScrollPane); // restore the divider location split.setDividerLocation(split.getHeight() - lastDescriptionHeight); } else { // save the size of the description pane to restore it later lastDescriptionHeight = split.getHeight() - split.getDividerLocation(); remove(split); add("Center", tableScroll); } descriptionButton.setSelected(visible); PropertySheetPanel.this.revalidate(); }
class class_name[name] begin[{] method[setDescriptionVisible, return_type[void], modifier[public], parameter[visible]] begin[{] if[member[.visible]] begin[{] call[.add, parameter[literal["Center"], member[.split]]] call[split.setTopComponent, parameter[member[.tableScroll]]] call[split.setBottomComponent, parameter[member[.descriptionScrollPane]]] call[split.setDividerLocation, parameter[binary_operation[call[split.getHeight, parameter[]], -, member[.lastDescriptionHeight]]]] else begin[{] assign[member[.lastDescriptionHeight], binary_operation[call[split.getHeight, parameter[]], -, call[split.getDividerLocation, parameter[]]]] call[.remove, parameter[member[.split]]] call[.add, parameter[literal["Center"], member[.tableScroll]]] end[}] call[descriptionButton.setSelected, parameter[member[.visible]]] THIS[call[None.revalidate, parameter[]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setDescriptionVisible] operator[SEP] Keyword[boolean] identifier[visible] operator[SEP] { Keyword[if] operator[SEP] identifier[visible] operator[SEP] { identifier[add] operator[SEP] literal[String] , identifier[split] operator[SEP] operator[SEP] identifier[split] operator[SEP] identifier[setTopComponent] operator[SEP] identifier[tableScroll] operator[SEP] operator[SEP] identifier[split] operator[SEP] identifier[setBottomComponent] operator[SEP] identifier[descriptionScrollPane] operator[SEP] operator[SEP] identifier[split] operator[SEP] identifier[setDividerLocation] operator[SEP] identifier[split] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[-] identifier[lastDescriptionHeight] operator[SEP] operator[SEP] } Keyword[else] { identifier[lastDescriptionHeight] operator[=] identifier[split] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[-] identifier[split] operator[SEP] identifier[getDividerLocation] operator[SEP] operator[SEP] operator[SEP] identifier[remove] operator[SEP] identifier[split] operator[SEP] operator[SEP] identifier[add] operator[SEP] literal[String] , identifier[tableScroll] operator[SEP] operator[SEP] } identifier[descriptionButton] operator[SEP] identifier[setSelected] operator[SEP] identifier[visible] operator[SEP] operator[SEP] identifier[PropertySheetPanel] operator[SEP] Keyword[this] operator[SEP] identifier[revalidate] operator[SEP] operator[SEP] operator[SEP] }
public static String getValueAsString(final byte[] key, final Map<byte[], byte[]> taskValues) { byte[] value = taskValues.get(key); if (value != null) { return Bytes.toString(value); } else { return ""; } }
class class_name[name] begin[{] method[getValueAsString, return_type[type[String]], modifier[public static], parameter[key, taskValues]] begin[{] local_variable[type[byte], value] if[binary_operation[member[.value], !=, literal[null]]] begin[{] return[call[Bytes.toString, parameter[member[.value]]]] else begin[{] return[literal[""]] end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getValueAsString] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[key] , Keyword[final] identifier[Map] operator[<] Keyword[byte] operator[SEP] operator[SEP] , Keyword[byte] operator[SEP] operator[SEP] operator[>] identifier[taskValues] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[value] operator[=] identifier[taskValues] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[Bytes] operator[SEP] identifier[toString] operator[SEP] identifier[value] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] literal[String] operator[SEP] } }
public Observable<EnqueueTrainingResponse> trainVersionAsync(UUID appId, String versionId) { return trainVersionWithServiceResponseAsync(appId, versionId).map(new Func1<ServiceResponse<EnqueueTrainingResponse>, EnqueueTrainingResponse>() { @Override public EnqueueTrainingResponse call(ServiceResponse<EnqueueTrainingResponse> response) { return response.body(); } }); }
class class_name[name] begin[{] method[trainVersionAsync, return_type[type[Observable]], modifier[public], parameter[appId, versionId]] begin[{] return[call[.trainVersionWithServiceResponseAsync, parameter[member[.appId], member[.versionId]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[EnqueueTrainingResponse] operator[>] identifier[trainVersionAsync] operator[SEP] identifier[UUID] identifier[appId] , identifier[String] identifier[versionId] operator[SEP] { Keyword[return] identifier[trainVersionWithServiceResponseAsync] operator[SEP] identifier[appId] , identifier[versionId] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[EnqueueTrainingResponse] operator[>] , identifier[EnqueueTrainingResponse] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[EnqueueTrainingResponse] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[EnqueueTrainingResponse] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
@Override public CursorPosition getCursor() { if (settings.isAnsiConsole() && Config.isOSPOSIXCompatible()) { try { StringBuilder col = new StringBuilder(4); StringBuilder row = new StringBuilder(4); out().print(ANSI.CURSOR_ROW); out().flush(); boolean gotSep = false; // read the position int[] input = read(); for (int i = 2; i < input.length - 1; i++) { if (input[i] == 59) // we got a ';' which is the separator gotSep = true; else { if (gotSep) col.append((char) input[i]); else row.append((char) input[i]); } } return new CursorPosition(Integer.parseInt(row.toString()), Integer.parseInt(col.toString())); } catch (Exception e) { if (settings.isLogging()) logger.log(Level.SEVERE, "Failed to find current row with ansi code: ", e); return new CursorPosition(-1, -1); } } return new CursorPosition(-1, -1); }
class class_name[name] begin[{] method[getCursor, return_type[type[CursorPosition]], modifier[public], parameter[]] begin[{] if[binary_operation[call[settings.isAnsiConsole, parameter[]], &&, call[Config.isOSPOSIXCompatible, parameter[]]]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuilder, sub_type=None)), name=col)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuilder, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuilder, sub_type=None)), name=row)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuilder, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=out, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=CURSOR_ROW, postfix_operators=[], prefix_operators=[], qualifier=ANSI, selectors=[])], member=print, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=out, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=flush, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), name=gotSep)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=input)], modifiers=set(), type=BasicType(dimensions=[None], name=int)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=59), operator===), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=gotSep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=BasicType(dimensions=[], name=char))], member=append, postfix_operators=[], prefix_operators=[], qualifier=row, selectors=[], type_arguments=None), label=None), label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=BasicType(dimensions=[], name=char))], member=append, postfix_operators=[], prefix_operators=[], qualifier=col, selectors=[], type_arguments=None), label=None))]), label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=gotSep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), ReturnStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=row, selectors=[], type_arguments=None)], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=col, selectors=[], type_arguments=None)], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CursorPosition, sub_type=None)), label=None)], catches=[CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isLogging, postfix_operators=[], prefix_operators=[], qualifier=settings, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SEVERE, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to find current row with ansi code: "), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=log, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)), ReturnStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CursorPosition, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] return[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CursorPosition, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CursorPosition] identifier[getCursor] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[settings] operator[SEP] identifier[isAnsiConsole] operator[SEP] operator[SEP] operator[&&] identifier[Config] operator[SEP] identifier[isOSPOSIXCompatible] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { identifier[StringBuilder] identifier[col] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] Other[4] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[row] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] Other[4] operator[SEP] operator[SEP] identifier[out] operator[SEP] operator[SEP] operator[SEP] identifier[print] operator[SEP] identifier[ANSI] operator[SEP] identifier[CURSOR_ROW] operator[SEP] operator[SEP] identifier[out] operator[SEP] operator[SEP] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[gotSep] operator[=] literal[boolean] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[input] operator[=] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[2] operator[SEP] identifier[i] operator[<] identifier[input] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[input] operator[SEP] identifier[i] operator[SEP] operator[==] Other[59] operator[SEP] identifier[gotSep] operator[=] literal[boolean] operator[SEP] Keyword[else] { Keyword[if] operator[SEP] identifier[gotSep] operator[SEP] identifier[col] operator[SEP] identifier[append] operator[SEP] operator[SEP] Keyword[char] operator[SEP] identifier[input] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] Keyword[else] identifier[row] operator[SEP] identifier[append] operator[SEP] operator[SEP] Keyword[char] operator[SEP] identifier[input] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] Keyword[new] identifier[CursorPosition] operator[SEP] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[row] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] , identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[col] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[settings] operator[SEP] identifier[isLogging] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[SEVERE] , literal[String] , identifier[e] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[CursorPosition] operator[SEP] operator[-] Other[1] , operator[-] Other[1] operator[SEP] operator[SEP] } } Keyword[return] Keyword[new] identifier[CursorPosition] operator[SEP] operator[-] Other[1] , operator[-] Other[1] operator[SEP] operator[SEP] }
public void info(final String msg) { if (proxy.isInfoEnabled()) { if (proxy instanceof LocationAwareLogger) { ((LocationAwareLogger) proxy).log(null, FQCN, LocationAwareLogger.INFO_INT, msg, null, null); } else { proxy.info(msg); } } }
class class_name[name] begin[{] method[info, return_type[void], modifier[public], parameter[msg]] begin[{] if[call[proxy.isInfoEnabled, parameter[]]] begin[{] if[binary_operation[member[.proxy], instanceof, type[LocationAwareLogger]]] begin[{] Cast(expression=MemberReference(member=proxy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=LocationAwareLogger, sub_type=None)) else begin[{] call[proxy.info, parameter[member[.msg]]] end[}] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[info] operator[SEP] Keyword[final] identifier[String] identifier[msg] operator[SEP] { Keyword[if] operator[SEP] identifier[proxy] operator[SEP] identifier[isInfoEnabled] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[proxy] Keyword[instanceof] identifier[LocationAwareLogger] operator[SEP] { operator[SEP] operator[SEP] identifier[LocationAwareLogger] operator[SEP] identifier[proxy] operator[SEP] operator[SEP] identifier[log] operator[SEP] Other[null] , identifier[FQCN] , identifier[LocationAwareLogger] operator[SEP] identifier[INFO_INT] , identifier[msg] , Other[null] , Other[null] operator[SEP] operator[SEP] } Keyword[else] { identifier[proxy] operator[SEP] identifier[info] operator[SEP] identifier[msg] operator[SEP] operator[SEP] } } }
public void addEnumeration(EnumTypedef e) { if (immutable) throw new IllegalStateException("Cant modify"); if (e == null) return; e.setParentGroup(this); enumTypedefs.add(e); }
class class_name[name] begin[{] method[addEnumeration, return_type[void], modifier[public], parameter[e]] begin[{] if[member[.immutable]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cant modify")], 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[.e], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] call[e.setParentGroup, parameter[THIS[]]] call[enumTypedefs.add, parameter[member[.e]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addEnumeration] operator[SEP] identifier[EnumTypedef] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[immutable] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[e] operator[==] Other[null] operator[SEP] Keyword[return] operator[SEP] identifier[e] operator[SEP] identifier[setParentGroup] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[enumTypedefs] operator[SEP] identifier[add] operator[SEP] identifier[e] operator[SEP] operator[SEP] }
public static Properties format(Config config) { Properties properties = new Properties(); writeConfig("", config, properties); return properties; }
class class_name[name] begin[{] method[format, return_type[type[Properties]], modifier[public static], parameter[config]] begin[{] local_variable[type[Properties], properties] call[.writeConfig, parameter[literal[""], member[.config], member[.properties]]] return[member[.properties]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Properties] identifier[format] operator[SEP] identifier[Config] identifier[config] operator[SEP] { identifier[Properties] identifier[properties] operator[=] Keyword[new] identifier[Properties] operator[SEP] operator[SEP] operator[SEP] identifier[writeConfig] operator[SEP] literal[String] , identifier[config] , identifier[properties] operator[SEP] operator[SEP] Keyword[return] identifier[properties] operator[SEP] }
public boolean containsPrimary(Property property, String value) { for (Metadata meta : primary.get(property)) { if (meta.getValue().equals(value)) { return true; } } return false; }
class class_name[name] begin[{] method[containsPrimary, return_type[type[boolean]], modifier[public], parameter[property, value]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=meta, selectors=[MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=property, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=primary, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=meta)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Metadata, sub_type=None))), label=None) return[literal[false]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[containsPrimary] operator[SEP] identifier[Property] identifier[property] , identifier[String] identifier[value] operator[SEP] { Keyword[for] operator[SEP] identifier[Metadata] identifier[meta] operator[:] identifier[primary] operator[SEP] identifier[get] operator[SEP] identifier[property] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[meta] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[value] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
private boolean isValidationMatcherExpression(Node node) { switch (node.getNodeType()) { case Node.ELEMENT_NODE: return node.getFirstChild() != null && StringUtils.hasText(node.getFirstChild().getNodeValue()) && ValidationMatcherUtils.isValidationMatcherExpression(node.getFirstChild().getNodeValue().trim()); case Node.ATTRIBUTE_NODE: return StringUtils.hasText(node.getNodeValue()) && ValidationMatcherUtils.isValidationMatcherExpression(node.getNodeValue().trim()); default: return false; //validation matchers makes no sense } }
class class_name[name] begin[{] method[isValidationMatcherExpression, return_type[type[boolean]], modifier[private], parameter[node]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=ELEMENT_NODE, postfix_operators=[], prefix_operators=[], qualifier=Node, selectors=[])], statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getFirstChild, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getFirstChild, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[MethodInvocation(arguments=[], member=getNodeValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=hasText, postfix_operators=[], prefix_operators=[], qualifier=StringUtils, selectors=[], type_arguments=None), operator=&&), operandr=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getFirstChild, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[MethodInvocation(arguments=[], member=getNodeValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=trim, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=isValidationMatcherExpression, postfix_operators=[], prefix_operators=[], qualifier=ValidationMatcherUtils, selectors=[], type_arguments=None), operator=&&), label=None)]), SwitchStatementCase(case=[MemberReference(member=ATTRIBUTE_NODE, postfix_operators=[], prefix_operators=[], qualifier=Node, selectors=[])], statements=[ReturnStatement(expression=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getNodeValue, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[], type_arguments=None)], member=hasText, postfix_operators=[], prefix_operators=[], qualifier=StringUtils, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getNodeValue, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[MethodInvocation(arguments=[], member=trim, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=isValidationMatcherExpression, postfix_operators=[], prefix_operators=[], qualifier=ValidationMatcherUtils, selectors=[], type_arguments=None), operator=&&), label=None)]), SwitchStatementCase(case=[], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)])], expression=MethodInvocation(arguments=[], member=getNodeType, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[], type_arguments=None), label=None) end[}] END[}]
Keyword[private] Keyword[boolean] identifier[isValidationMatcherExpression] operator[SEP] identifier[Node] identifier[node] operator[SEP] { Keyword[switch] operator[SEP] identifier[node] operator[SEP] identifier[getNodeType] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] identifier[Node] operator[SEP] identifier[ELEMENT_NODE] operator[:] Keyword[return] identifier[node] operator[SEP] identifier[getFirstChild] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[StringUtils] operator[SEP] identifier[hasText] operator[SEP] identifier[node] operator[SEP] identifier[getFirstChild] operator[SEP] operator[SEP] operator[SEP] identifier[getNodeValue] operator[SEP] operator[SEP] operator[SEP] operator[&&] identifier[ValidationMatcherUtils] operator[SEP] identifier[isValidationMatcherExpression] operator[SEP] identifier[node] operator[SEP] identifier[getFirstChild] operator[SEP] operator[SEP] operator[SEP] identifier[getNodeValue] operator[SEP] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[Node] operator[SEP] identifier[ATTRIBUTE_NODE] operator[:] Keyword[return] identifier[StringUtils] operator[SEP] identifier[hasText] operator[SEP] identifier[node] operator[SEP] identifier[getNodeValue] operator[SEP] operator[SEP] operator[SEP] operator[&&] identifier[ValidationMatcherUtils] operator[SEP] identifier[isValidationMatcherExpression] operator[SEP] identifier[node] operator[SEP] identifier[getNodeValue] operator[SEP] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[default] operator[:] Keyword[return] literal[boolean] operator[SEP] } }
public static GitResetResponse gitResetHard(File repository, Ref commitName) throws IOException, JavaGitException { CheckUtilities.checkNullArgument(repository, "repository"); CheckUtilities.checkNullArgument(commitName, "commitName"); IClient client = ClientManager.getInstance().getPreferredClient(); IGitReset gitReset = client.getGitResetInstance(); return gitReset.gitResetHard(repository, commitName); }
class class_name[name] begin[{] method[gitResetHard, return_type[type[GitResetResponse]], modifier[public static], parameter[repository, commitName]] begin[{] call[CheckUtilities.checkNullArgument, parameter[member[.repository], literal["repository"]]] call[CheckUtilities.checkNullArgument, parameter[member[.commitName], literal["commitName"]]] local_variable[type[IClient], client] local_variable[type[IGitReset], gitReset] return[call[gitReset.gitResetHard, parameter[member[.repository], member[.commitName]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[GitResetResponse] identifier[gitResetHard] operator[SEP] identifier[File] identifier[repository] , identifier[Ref] identifier[commitName] operator[SEP] Keyword[throws] identifier[IOException] , identifier[JavaGitException] { identifier[CheckUtilities] operator[SEP] identifier[checkNullArgument] operator[SEP] identifier[repository] , literal[String] operator[SEP] operator[SEP] identifier[CheckUtilities] operator[SEP] identifier[checkNullArgument] operator[SEP] identifier[commitName] , literal[String] operator[SEP] operator[SEP] identifier[IClient] identifier[client] operator[=] identifier[ClientManager] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[getPreferredClient] operator[SEP] operator[SEP] operator[SEP] identifier[IGitReset] identifier[gitReset] operator[=] identifier[client] operator[SEP] identifier[getGitResetInstance] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[gitReset] operator[SEP] identifier[gitResetHard] operator[SEP] identifier[repository] , identifier[commitName] operator[SEP] operator[SEP] }
public static String getUserDate(String sformat) { Date currentTime = new Date(); SimpleDateFormat formatter = new SimpleDateFormat(sformat); String dateString = formatter.format(currentTime); return dateString; }
class class_name[name] begin[{] method[getUserDate, return_type[type[String]], modifier[public static], parameter[sformat]] begin[{] local_variable[type[Date], currentTime] local_variable[type[SimpleDateFormat], formatter] local_variable[type[String], dateString] return[member[.dateString]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getUserDate] operator[SEP] identifier[String] identifier[sformat] operator[SEP] { identifier[Date] identifier[currentTime] operator[=] Keyword[new] identifier[Date] operator[SEP] operator[SEP] operator[SEP] identifier[SimpleDateFormat] identifier[formatter] operator[=] Keyword[new] identifier[SimpleDateFormat] operator[SEP] identifier[sformat] operator[SEP] operator[SEP] identifier[String] identifier[dateString] operator[=] identifier[formatter] operator[SEP] identifier[format] operator[SEP] identifier[currentTime] operator[SEP] operator[SEP] Keyword[return] identifier[dateString] operator[SEP] }
public List<Job> getJobs(Integer runnerId, JobStatus status) throws GitLabApiException { return (getJobs(runnerId, status, getDefaultPerPage()).all()); }
class class_name[name] begin[{] method[getJobs, return_type[type[List]], modifier[public], parameter[runnerId, status]] begin[{] return[call[.getJobs, parameter[member[.runnerId], member[.status], call[.getDefaultPerPage, parameter[]]]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[Job] operator[>] identifier[getJobs] operator[SEP] identifier[Integer] identifier[runnerId] , identifier[JobStatus] identifier[status] operator[SEP] Keyword[throws] identifier[GitLabApiException] { Keyword[return] operator[SEP] identifier[getJobs] operator[SEP] identifier[runnerId] , identifier[status] , identifier[getDefaultPerPage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[all] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
Rule XcomMargins() { return Sequence( FirstOfS(String("botmargin"), String("topmargin"), String("leftmargin"), String("rightmargin")), //suppressSubnodes() OptionalS(String("=")), WSPS(), XcomNumber(), XcomUnit() ).label(XcomMargins); }
class class_name[name] begin[{] method[XcomMargins, return_type[type[Rule]], modifier[default], parameter[]] begin[{] return[call[.Sequence, parameter[call[.FirstOfS, parameter[call[.String, parameter[literal["botmargin"]]], call[.String, parameter[literal["topmargin"]]], call[.String, parameter[literal["leftmargin"]]], call[.String, parameter[literal["rightmargin"]]]]], call[.OptionalS, parameter[call[.String, parameter[literal["="]]]]], call[.WSPS, parameter[]], call[.XcomNumber, parameter[]], call[.XcomUnit, parameter[]]]]] end[}] END[}]
identifier[Rule] identifier[XcomMargins] operator[SEP] operator[SEP] { Keyword[return] identifier[Sequence] operator[SEP] identifier[FirstOfS] operator[SEP] identifier[String] operator[SEP] literal[String] operator[SEP] , identifier[String] operator[SEP] literal[String] operator[SEP] , identifier[String] operator[SEP] literal[String] operator[SEP] , identifier[String] operator[SEP] literal[String] operator[SEP] operator[SEP] , identifier[OptionalS] operator[SEP] identifier[String] operator[SEP] literal[String] operator[SEP] operator[SEP] , identifier[WSPS] operator[SEP] operator[SEP] , identifier[XcomNumber] operator[SEP] operator[SEP] , identifier[XcomUnit] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[label] operator[SEP] identifier[XcomMargins] operator[SEP] operator[SEP] }
public int getOffsetInBeginSection() { if (Passage_Type.featOkTst && ((Passage_Type)jcasType).casFeat_offsetInBeginSection == null) jcasType.jcas.throwFeatMissing("offsetInBeginSection", "edu.cmu.lti.oaqa.type.retrieval.Passage"); return jcasType.ll_cas.ll_getIntValue(addr, ((Passage_Type)jcasType).casFeatCode_offsetInBeginSection);}
class class_name[name] begin[{] method[getOffsetInBeginSection, return_type[type[int]], modifier[public], parameter[]] begin[{] if[binary_operation[member[Passage_Type.featOkTst], &&, binary_operation[Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Passage_Type, sub_type=None)), ==, literal[null]]]] begin[{] call[jcasType.jcas.throwFeatMissing, parameter[literal["offsetInBeginSection"], literal["edu.cmu.lti.oaqa.type.retrieval.Passage"]]] else begin[{] None end[}] return[call[jcasType.ll_cas.ll_getIntValue, parameter[member[.addr], Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Passage_Type, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[int] identifier[getOffsetInBeginSection] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[Passage_Type] operator[SEP] identifier[featOkTst] operator[&&] operator[SEP] operator[SEP] identifier[Passage_Type] operator[SEP] identifier[jcasType] operator[SEP] operator[SEP] identifier[casFeat_offsetInBeginSection] operator[==] Other[null] operator[SEP] identifier[jcasType] operator[SEP] identifier[jcas] operator[SEP] identifier[throwFeatMissing] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[jcasType] operator[SEP] identifier[ll_cas] operator[SEP] identifier[ll_getIntValue] operator[SEP] identifier[addr] , operator[SEP] operator[SEP] identifier[Passage_Type] operator[SEP] identifier[jcasType] operator[SEP] operator[SEP] identifier[casFeatCode_offsetInBeginSection] operator[SEP] operator[SEP] }
protected String createSQLStatement() throws EFapsException { final SQLSelect select = new SQLSelect() .column(0, "ID") .from(getMainType().getMainTable().getSqlTable(), 0); for (final OneSelect oneSel : this.allSelects) { oneSel.append2SQLFrom(select); } int colIndex = select.getColumns().size() + 1; // if the main table has a column for the type it is selected also if (getMainType().getMainTable().getSqlColType() != null) { select.column(0, getMainType().getMainTable().getSqlColType()); this.typeColumnIndex = colIndex; colIndex++; } for (final OneSelect onesel : this.allSelects) { if (onesel.getValueSelect() != null) { colIndex += onesel.append2SQLSelect(select, colIndex); } } select.addPart(SQLPart.WHERE).addColumnPart(0, "ID").addPart(SQLPart.IN).addPart(SQLPart.PARENTHESIS_OPEN); int i = 0; for (final Instance instance : getInstanceList()) { if (Context.getDbType().getMaxExpressions() > -1 && i > Context.getDbType().getMaxExpressions()) { select.addPart(SQLPart.PARENTHESIS_CLOSE) .addPart(SQLPart.OR) .addColumnPart(0, "ID").addPart(SQLPart.IN).addPart(SQLPart.PARENTHESIS_OPEN); i = 0; } if (i > 0) { select.addPart(SQLPart.COMMA); } select.addValuePart(instance.getId()); i++; } select.addPart(SQLPart.PARENTHESIS_CLOSE); for (final OneSelect oneSel : this.allSelects) { oneSel.append2SQLWhere(select); } return select.getSQL(); }
class class_name[name] begin[{] method[createSQLStatement, return_type[type[String]], modifier[protected], parameter[]] begin[{] local_variable[type[SQLSelect], select] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=select, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append2SQLFrom, postfix_operators=[], prefix_operators=[], qualifier=oneSel, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=allSelects, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=oneSel)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=OneSelect, sub_type=None))), label=None) local_variable[type[int], colIndex] if[binary_operation[call[.getMainType, parameter[]], !=, literal[null]]] begin[{] call[select.column, parameter[literal[0], call[.getMainType, parameter[]]]] assign[THIS[member[None.typeColumnIndex]], member[.colIndex]] member[.colIndex] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getValueSelect, postfix_operators=[], prefix_operators=[], qualifier=onesel, selectors=[], type_arguments=None), 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=colIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[MemberReference(member=select, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=colIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append2SQLSelect, postfix_operators=[], prefix_operators=[], qualifier=onesel, selectors=[], type_arguments=None)), label=None)]))]), control=EnhancedForControl(iterable=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=allSelects, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=onesel)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=OneSelect, sub_type=None))), label=None) call[select.addPart, parameter[member[SQLPart.WHERE]]] local_variable[type[int], i] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getDbType, postfix_operators=[], prefix_operators=[], qualifier=Context, selectors=[MethodInvocation(arguments=[], member=getMaxExpressions, 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=1), operator=>), operandr=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getDbType, postfix_operators=[], prefix_operators=[], qualifier=Context, selectors=[MethodInvocation(arguments=[], member=getMaxExpressions, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=>), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=PARENTHESIS_CLOSE, postfix_operators=[], prefix_operators=[], qualifier=SQLPart, selectors=[])], member=addPart, postfix_operators=[], prefix_operators=[], qualifier=select, selectors=[MethodInvocation(arguments=[MemberReference(member=OR, postfix_operators=[], prefix_operators=[], qualifier=SQLPart, selectors=[])], member=addPart, 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), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ID")], member=addColumnPart, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=IN, postfix_operators=[], prefix_operators=[], qualifier=SQLPart, selectors=[])], member=addPart, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=PARENTHESIS_OPEN, postfix_operators=[], prefix_operators=[], qualifier=SQLPart, selectors=[])], member=addPart, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=COMMA, postfix_operators=[], prefix_operators=[], qualifier=SQLPart, selectors=[])], member=addPart, postfix_operators=[], prefix_operators=[], qualifier=select, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=instance, selectors=[], type_arguments=None)], member=addValuePart, postfix_operators=[], prefix_operators=[], qualifier=select, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getInstanceList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=instance)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Instance, sub_type=None))), label=None) call[select.addPart, parameter[member[SQLPart.PARENTHESIS_CLOSE]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=select, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append2SQLWhere, postfix_operators=[], prefix_operators=[], qualifier=oneSel, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=allSelects, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=oneSel)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=OneSelect, sub_type=None))), label=None) return[call[select.getSQL, parameter[]]] end[}] END[}]
Keyword[protected] identifier[String] identifier[createSQLStatement] operator[SEP] operator[SEP] Keyword[throws] identifier[EFapsException] { Keyword[final] identifier[SQLSelect] identifier[select] operator[=] Keyword[new] identifier[SQLSelect] operator[SEP] operator[SEP] operator[SEP] identifier[column] operator[SEP] Other[0] , literal[String] operator[SEP] operator[SEP] identifier[from] operator[SEP] identifier[getMainType] operator[SEP] operator[SEP] operator[SEP] identifier[getMainTable] operator[SEP] operator[SEP] operator[SEP] identifier[getSqlTable] operator[SEP] operator[SEP] , Other[0] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[OneSelect] identifier[oneSel] operator[:] Keyword[this] operator[SEP] identifier[allSelects] operator[SEP] { identifier[oneSel] operator[SEP] identifier[append2SQLFrom] operator[SEP] identifier[select] operator[SEP] operator[SEP] } Keyword[int] identifier[colIndex] operator[=] identifier[select] operator[SEP] identifier[getColumns] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[+] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[getMainType] operator[SEP] operator[SEP] operator[SEP] identifier[getMainTable] operator[SEP] operator[SEP] operator[SEP] identifier[getSqlColType] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[select] operator[SEP] identifier[column] operator[SEP] Other[0] , identifier[getMainType] operator[SEP] operator[SEP] operator[SEP] identifier[getMainTable] operator[SEP] operator[SEP] operator[SEP] identifier[getSqlColType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[typeColumnIndex] operator[=] identifier[colIndex] operator[SEP] identifier[colIndex] operator[++] operator[SEP] } Keyword[for] operator[SEP] Keyword[final] identifier[OneSelect] identifier[onesel] operator[:] Keyword[this] operator[SEP] identifier[allSelects] operator[SEP] { Keyword[if] operator[SEP] identifier[onesel] operator[SEP] identifier[getValueSelect] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[colIndex] operator[+=] identifier[onesel] operator[SEP] identifier[append2SQLSelect] operator[SEP] identifier[select] , identifier[colIndex] operator[SEP] operator[SEP] } } identifier[select] operator[SEP] identifier[addPart] operator[SEP] identifier[SQLPart] operator[SEP] identifier[WHERE] operator[SEP] operator[SEP] identifier[addColumnPart] operator[SEP] Other[0] , literal[String] operator[SEP] operator[SEP] identifier[addPart] operator[SEP] identifier[SQLPart] operator[SEP] identifier[IN] operator[SEP] operator[SEP] identifier[addPart] operator[SEP] identifier[SQLPart] operator[SEP] identifier[PARENTHESIS_OPEN] operator[SEP] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[Instance] identifier[instance] operator[:] identifier[getInstanceList] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[Context] operator[SEP] identifier[getDbType] operator[SEP] operator[SEP] operator[SEP] identifier[getMaxExpressions] operator[SEP] operator[SEP] operator[>] operator[-] Other[1] operator[&&] identifier[i] operator[>] identifier[Context] operator[SEP] identifier[getDbType] operator[SEP] operator[SEP] operator[SEP] identifier[getMaxExpressions] operator[SEP] operator[SEP] operator[SEP] { identifier[select] operator[SEP] identifier[addPart] operator[SEP] identifier[SQLPart] operator[SEP] identifier[PARENTHESIS_CLOSE] operator[SEP] operator[SEP] identifier[addPart] operator[SEP] identifier[SQLPart] operator[SEP] identifier[OR] operator[SEP] operator[SEP] identifier[addColumnPart] operator[SEP] Other[0] , literal[String] operator[SEP] operator[SEP] identifier[addPart] operator[SEP] identifier[SQLPart] operator[SEP] identifier[IN] operator[SEP] operator[SEP] identifier[addPart] operator[SEP] identifier[SQLPart] operator[SEP] identifier[PARENTHESIS_OPEN] operator[SEP] operator[SEP] identifier[i] operator[=] Other[0] operator[SEP] } Keyword[if] operator[SEP] identifier[i] operator[>] Other[0] operator[SEP] { identifier[select] operator[SEP] identifier[addPart] operator[SEP] identifier[SQLPart] operator[SEP] identifier[COMMA] operator[SEP] operator[SEP] } identifier[select] operator[SEP] identifier[addValuePart] operator[SEP] identifier[instance] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] } identifier[select] operator[SEP] identifier[addPart] operator[SEP] identifier[SQLPart] operator[SEP] identifier[PARENTHESIS_CLOSE] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[OneSelect] identifier[oneSel] operator[:] Keyword[this] operator[SEP] identifier[allSelects] operator[SEP] { identifier[oneSel] operator[SEP] identifier[append2SQLWhere] operator[SEP] identifier[select] operator[SEP] operator[SEP] } Keyword[return] identifier[select] operator[SEP] identifier[getSQL] operator[SEP] operator[SEP] operator[SEP] }
public Node removeLast() { Node node = header.getPreviousNode(); lastByte -= node.ba.last(); return removeNode( node ); }
class class_name[name] begin[{] method[removeLast, return_type[type[Node]], modifier[public], parameter[]] begin[{] local_variable[type[Node], node] assign[member[.lastByte], call[node.ba.last, parameter[]]] return[call[.removeNode, parameter[member[.node]]]] end[}] END[}]
Keyword[public] identifier[Node] identifier[removeLast] operator[SEP] operator[SEP] { identifier[Node] identifier[node] operator[=] identifier[header] operator[SEP] identifier[getPreviousNode] operator[SEP] operator[SEP] operator[SEP] identifier[lastByte] operator[-=] identifier[node] operator[SEP] identifier[ba] operator[SEP] identifier[last] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[removeNode] operator[SEP] identifier[node] operator[SEP] operator[SEP] }
@Override public void createRobot(String name, InstructionSet pSet, int banksCount, boolean pMobile) { int turnsForBanks = Timing.getInstance().CREATION_BASE + Timing.getInstance().CREATION_PER_BANK * banksCount; if (pMobile) { turnsForBanks = (int) (turnsForBanks * Timing.getInstance().MOBILITY_PENALTY + Timing.getInstance().MOBILITY_CONSTANT); } int turnsForSet = 0; if (pSet == InstructionSet.ADVANCED) { turnsForSet = Timing.getInstance().ADVANCED_SET_PENALTY; } if (pSet == InstructionSet.SUPER) { turnsForSet += Timing.getInstance().SUPER_SET_PENALTY; } int totalWait = Math.min(turnsForBanks + turnsForSet, GameSettings.getInstance().MAX_CREATE_WAIT); log.trace("[createRobot] Waiting {} cycles to create Robot {}", totalWait, name); turnsControl.waitTurns(totalWait, "Create Robot"); robot.createRobot(name, pSet, banksCount, pMobile); }
class class_name[name] begin[{] method[createRobot, return_type[void], modifier[public], parameter[name, pSet, banksCount, pMobile]] begin[{] local_variable[type[int], turnsForBanks] if[member[.pMobile]] begin[{] assign[member[.turnsForBanks], Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=turnsForBanks, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=Timing, selectors=[MemberReference(member=MOBILITY_PENALTY, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), operator=*), operandr=MethodInvocation(arguments=[], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=Timing, selectors=[MemberReference(member=MOBILITY_CONSTANT, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), operator=+), type=BasicType(dimensions=[], name=int))] else begin[{] None end[}] local_variable[type[int], turnsForSet] if[binary_operation[member[.pSet], ==, member[InstructionSet.ADVANCED]]] begin[{] assign[member[.turnsForSet], call[Timing.getInstance, parameter[]]] else begin[{] None end[}] if[binary_operation[member[.pSet], ==, member[InstructionSet.SUPER]]] begin[{] assign[member[.turnsForSet], call[Timing.getInstance, parameter[]]] else begin[{] None end[}] local_variable[type[int], totalWait] call[log.trace, parameter[literal["[createRobot] Waiting {} cycles to create Robot {}"], member[.totalWait], member[.name]]] call[turnsControl.waitTurns, parameter[member[.totalWait], literal["Create Robot"]]] call[robot.createRobot, parameter[member[.name], member[.pSet], member[.banksCount], member[.pMobile]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[createRobot] operator[SEP] identifier[String] identifier[name] , identifier[InstructionSet] identifier[pSet] , Keyword[int] identifier[banksCount] , Keyword[boolean] identifier[pMobile] operator[SEP] { Keyword[int] identifier[turnsForBanks] operator[=] identifier[Timing] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[CREATION_BASE] operator[+] identifier[Timing] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[CREATION_PER_BANK] operator[*] identifier[banksCount] operator[SEP] Keyword[if] operator[SEP] identifier[pMobile] operator[SEP] { identifier[turnsForBanks] operator[=] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[turnsForBanks] operator[*] identifier[Timing] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[MOBILITY_PENALTY] operator[+] identifier[Timing] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[MOBILITY_CONSTANT] operator[SEP] operator[SEP] } Keyword[int] identifier[turnsForSet] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[pSet] operator[==] identifier[InstructionSet] operator[SEP] identifier[ADVANCED] operator[SEP] { identifier[turnsForSet] operator[=] identifier[Timing] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[ADVANCED_SET_PENALTY] operator[SEP] } Keyword[if] operator[SEP] identifier[pSet] operator[==] identifier[InstructionSet] operator[SEP] identifier[SUPER] operator[SEP] { identifier[turnsForSet] operator[+=] identifier[Timing] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[SUPER_SET_PENALTY] operator[SEP] } Keyword[int] identifier[totalWait] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[turnsForBanks] operator[+] identifier[turnsForSet] , identifier[GameSettings] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[MAX_CREATE_WAIT] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[trace] operator[SEP] literal[String] , identifier[totalWait] , identifier[name] operator[SEP] operator[SEP] identifier[turnsControl] operator[SEP] identifier[waitTurns] operator[SEP] identifier[totalWait] , literal[String] operator[SEP] operator[SEP] identifier[robot] operator[SEP] identifier[createRobot] operator[SEP] identifier[name] , identifier[pSet] , identifier[banksCount] , identifier[pMobile] operator[SEP] operator[SEP] }
public static Locale getLocale( Object value) { if (value == null) { return null; } if (value instanceof Locale) { return ((Locale) value); } return getLocaleInternal(value.toString()); }
class class_name[name] begin[{] method[getLocale, return_type[type[Locale]], modifier[public static], parameter[value]] begin[{] if[binary_operation[member[.value], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] if[binary_operation[member[.value], instanceof, type[Locale]]] begin[{] return[Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Locale, sub_type=None))] else begin[{] None end[}] return[call[.getLocaleInternal, parameter[call[value.toString, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Locale] identifier[getLocale] operator[SEP] identifier[Object] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[Locale] operator[SEP] { Keyword[return] operator[SEP] operator[SEP] identifier[Locale] operator[SEP] identifier[value] operator[SEP] operator[SEP] } Keyword[return] identifier[getLocaleInternal] operator[SEP] identifier[value] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void genStat(JCTree tree, Env<GenContext> env, int crtFlags) { if (!genCrt) { genStat(tree, env); return; } int startpc = code.curCP(); genStat(tree, env); if (tree.hasTag(Tag.BLOCK)) crtFlags |= CRT_BLOCK; code.crt.put(tree, crtFlags, startpc, code.curCP()); }
class class_name[name] begin[{] method[genStat, return_type[void], modifier[public], parameter[tree, env, crtFlags]] begin[{] if[member[.genCrt]] begin[{] call[.genStat, parameter[member[.tree], member[.env]]] return[None] else begin[{] None end[}] local_variable[type[int], startpc] call[.genStat, parameter[member[.tree], member[.env]]] if[call[tree.hasTag, parameter[member[Tag.BLOCK]]]] begin[{] assign[member[.crtFlags], member[.CRT_BLOCK]] else begin[{] None end[}] call[code.crt.put, parameter[member[.tree], member[.crtFlags], member[.startpc], call[code.curCP, parameter[]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[genStat] operator[SEP] identifier[JCTree] identifier[tree] , identifier[Env] operator[<] identifier[GenContext] operator[>] identifier[env] , Keyword[int] identifier[crtFlags] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[genCrt] operator[SEP] { identifier[genStat] operator[SEP] identifier[tree] , identifier[env] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[int] identifier[startpc] operator[=] identifier[code] operator[SEP] identifier[curCP] operator[SEP] operator[SEP] operator[SEP] identifier[genStat] operator[SEP] identifier[tree] , identifier[env] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tree] operator[SEP] identifier[hasTag] operator[SEP] identifier[Tag] operator[SEP] identifier[BLOCK] operator[SEP] operator[SEP] identifier[crtFlags] operator[|=] identifier[CRT_BLOCK] operator[SEP] identifier[code] operator[SEP] identifier[crt] operator[SEP] identifier[put] operator[SEP] identifier[tree] , identifier[crtFlags] , identifier[startpc] , identifier[code] operator[SEP] identifier[curCP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void setMean(double newMean) { double oldMean = mean; mean = newMean; boolean oldMeanESet = meanESet; meanESet = true; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, BpsimPackage.NORMAL_DISTRIBUTION_TYPE__MEAN, oldMean, mean, !oldMeanESet)); }
class class_name[name] begin[{] method[setMean, return_type[void], modifier[public], parameter[newMean]] begin[{] local_variable[type[double], oldMean] assign[member[.mean], member[.newMean]] local_variable[type[boolean], oldMeanESet] assign[member[.meanESet], literal[true]] 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=NORMAL_DISTRIBUTION_TYPE__MEAN, postfix_operators=[], prefix_operators=[], qualifier=BpsimPackage, selectors=[]), MemberReference(member=oldMean, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=mean, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=oldMeanESet, 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[setMean] operator[SEP] Keyword[double] identifier[newMean] operator[SEP] { Keyword[double] identifier[oldMean] operator[=] identifier[mean] operator[SEP] identifier[mean] operator[=] identifier[newMean] operator[SEP] Keyword[boolean] identifier[oldMeanESet] operator[=] identifier[meanESet] operator[SEP] identifier[meanESet] operator[=] literal[boolean] 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[BpsimPackage] operator[SEP] identifier[NORMAL_DISTRIBUTION_TYPE__MEAN] , identifier[oldMean] , identifier[mean] , operator[!] identifier[oldMeanESet] operator[SEP] operator[SEP] operator[SEP] }
public static String resolve( String base, String child ) { String childPath = child.startsWith( "/" ) ? child.substring( 1 ) : child; String basePath = base.endsWith( "/" ) ? base : base + "/"; return basePath + childPath; }
class class_name[name] begin[{] method[resolve, return_type[type[String]], modifier[public static], parameter[base, child]] begin[{] local_variable[type[String], childPath] local_variable[type[String], basePath] return[binary_operation[member[.basePath], +, member[.childPath]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[resolve] operator[SEP] identifier[String] identifier[base] , identifier[String] identifier[child] operator[SEP] { identifier[String] identifier[childPath] operator[=] identifier[child] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[?] identifier[child] operator[SEP] identifier[substring] operator[SEP] Other[1] operator[SEP] operator[:] identifier[child] operator[SEP] identifier[String] identifier[basePath] operator[=] identifier[base] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[?] identifier[base] operator[:] identifier[base] operator[+] literal[String] operator[SEP] Keyword[return] identifier[basePath] operator[+] identifier[childPath] operator[SEP] }
public boolean process(List<Point2D_I32> contour ) { // Reset internal book keeping variables reset(); if( loops ) { // Reject pathological case if (contour.size() < 3) return false; if (!findInitialTriangle(contour)) return false; } else { // Reject pathological case if( contour.size() < 2 ) return false; // two end points are the seeds. Plus they can't change addCorner(0); addCorner(contour.size()-1); initializeScore(contour,false); } savePolyline(); sequentialSideFit(contour,loops); if( fatalError ) return false; int MIN_SIZE = loops ? 3 : 2; double bestScore = Double.MAX_VALUE; int bestSize = -1; for (int i = 0; i < Math.min(maxSides-(MIN_SIZE-1),polylines.size); i++) { if( polylines.get(i).score < bestScore ) { bestPolyline = polylines.get(i); bestScore = bestPolyline.score; bestSize = i + MIN_SIZE; } } // There was no good match within the min/max size requirement if( bestSize < minSides) { return false; } // make sure all the sides are within error tolerance for (int i = 0,j=bestSize-1; i < bestSize; j=i,i++) { Point2D_I32 a = contour.get(bestPolyline.splits.get(i)); Point2D_I32 b = contour.get(bestPolyline.splits.get(j)); double length = a.distance(b); double thresholdSideError = this.maxSideError.compute(length); if( bestPolyline.sideErrors.get(i) >= thresholdSideError*thresholdSideError) { bestPolyline = null; return false; } } return true; }
class class_name[name] begin[{] method[process, return_type[type[boolean]], modifier[public], parameter[contour]] begin[{] call[.reset, parameter[]] if[member[.loops]] begin[{] if[binary_operation[call[contour.size, parameter[]], <, literal[3]]] begin[{] return[literal[false]] else begin[{] None end[}] if[call[.findInitialTriangle, parameter[member[.contour]]]] begin[{] return[literal[false]] else begin[{] None end[}] else begin[{] if[binary_operation[call[contour.size, parameter[]], <, literal[2]]] begin[{] return[literal[false]] else begin[{] None end[}] call[.addCorner, parameter[literal[0]]] call[.addCorner, parameter[binary_operation[call[contour.size, parameter[]], -, literal[1]]]] call[.initializeScore, parameter[member[.contour], literal[false]]] end[}] call[.savePolyline, parameter[]] call[.sequentialSideFit, parameter[member[.contour], member[.loops]]] if[member[.fatalError]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[int], MIN_SIZE] local_variable[type[double], bestScore] local_variable[type[int], bestSize] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=polylines, selectors=[MemberReference(member=score, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), operandr=MemberReference(member=bestScore, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=bestPolyline, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=polylines, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=bestScore, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=score, postfix_operators=[], prefix_operators=[], qualifier=bestPolyline, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=bestSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=MIN_SIZE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=maxSides, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=MIN_SIZE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator=-), MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=polylines, selectors=[])], member=min, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) if[binary_operation[member[.bestSize], <, member[.minSides]]] begin[{] return[literal[false]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=bestPolyline.splits, selectors=[], type_arguments=None)], member=get, postfix_operators=[], prefix_operators=[], qualifier=contour, selectors=[], type_arguments=None), name=a)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Point2D_I32, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=bestPolyline.splits, selectors=[], type_arguments=None)], member=get, postfix_operators=[], prefix_operators=[], qualifier=contour, selectors=[], type_arguments=None), name=b)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Point2D_I32, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=distance, postfix_operators=[], prefix_operators=[], qualifier=a, selectors=[], type_arguments=None), name=length)], modifiers=set(), type=BasicType(dimensions=[], name=double)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=maxSideError, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=compute, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=thresholdSideError)], modifiers=set(), type=BasicType(dimensions=[], name=double)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=bestPolyline.sideErrors, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=MemberReference(member=thresholdSideError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=thresholdSideError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=bestPolyline, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=bestSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i), VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=bestSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[Assignment(expressionl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[literal[true]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[process] operator[SEP] identifier[List] operator[<] identifier[Point2D_I32] operator[>] identifier[contour] operator[SEP] { identifier[reset] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[loops] operator[SEP] { Keyword[if] operator[SEP] identifier[contour] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[<] Other[3] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[findInitialTriangle] operator[SEP] identifier[contour] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[contour] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[<] Other[2] operator[SEP] Keyword[return] literal[boolean] operator[SEP] identifier[addCorner] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[addCorner] operator[SEP] identifier[contour] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] identifier[initializeScore] operator[SEP] identifier[contour] , literal[boolean] operator[SEP] operator[SEP] } identifier[savePolyline] operator[SEP] operator[SEP] operator[SEP] identifier[sequentialSideFit] operator[SEP] identifier[contour] , identifier[loops] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[fatalError] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[int] identifier[MIN_SIZE] operator[=] identifier[loops] operator[?] Other[3] operator[:] Other[2] operator[SEP] Keyword[double] identifier[bestScore] operator[=] identifier[Double] operator[SEP] identifier[MAX_VALUE] operator[SEP] Keyword[int] identifier[bestSize] operator[=] operator[-] Other[1] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[maxSides] operator[-] operator[SEP] identifier[MIN_SIZE] operator[-] Other[1] operator[SEP] , identifier[polylines] operator[SEP] identifier[size] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[polylines] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[score] operator[<] identifier[bestScore] operator[SEP] { identifier[bestPolyline] operator[=] identifier[polylines] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[bestScore] operator[=] identifier[bestPolyline] operator[SEP] identifier[score] operator[SEP] identifier[bestSize] operator[=] identifier[i] operator[+] identifier[MIN_SIZE] operator[SEP] } } Keyword[if] operator[SEP] identifier[bestSize] operator[<] identifier[minSides] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] , identifier[j] operator[=] identifier[bestSize] operator[-] Other[1] operator[SEP] identifier[i] operator[<] identifier[bestSize] operator[SEP] identifier[j] operator[=] identifier[i] , identifier[i] operator[++] operator[SEP] { identifier[Point2D_I32] identifier[a] operator[=] identifier[contour] operator[SEP] identifier[get] operator[SEP] identifier[bestPolyline] operator[SEP] identifier[splits] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] identifier[Point2D_I32] identifier[b] operator[=] identifier[contour] operator[SEP] identifier[get] operator[SEP] identifier[bestPolyline] operator[SEP] identifier[splits] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[length] operator[=] identifier[a] operator[SEP] identifier[distance] operator[SEP] identifier[b] operator[SEP] operator[SEP] Keyword[double] identifier[thresholdSideError] operator[=] Keyword[this] operator[SEP] identifier[maxSideError] operator[SEP] identifier[compute] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[bestPolyline] operator[SEP] identifier[sideErrors] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[>=] identifier[thresholdSideError] operator[*] identifier[thresholdSideError] operator[SEP] { identifier[bestPolyline] operator[=] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
public void optimizedSwitch(String def, LookupList list) throws IOException { if (list.isEmpty()) { throw new IllegalArgumentException("empty lookuplist"); } if (list.size() == 1) { for (LookupPair lp : list) { iconst(lp.getMatch()); if_icmpeq(lp.getTarget()); } goto_n(def); } else { if (optimize && list.canOptimize()) { for (LookupPair lp : list) { String next = createBranch(); dup(); iconst(lp.getMatch()); if_icmpne(next); pop(); goto_n(lp.getTarget()); fixAddress(next); } pop(); goto_n(def); } else { if (list.isContiguous()) // note! list is sorted at this point { String[] symbols = new String[list.size()]; int index = 0; for (LookupPair lp : list) { symbols[index++] = lp.getTarget(); } tableswitch(def, list.get(0).getMatch(), list.get(list.size()-1).getMatch(), symbols); } else { lookupswitch(def, list); } } } }
class class_name[name] begin[{] method[optimizedSwitch, return_type[void], modifier[public], parameter[def, list]] begin[{] if[call[list.isEmpty, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="empty lookuplist")], 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[call[list.size, parameter[]], ==, literal[1]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMatch, postfix_operators=[], prefix_operators=[], qualifier=lp, selectors=[], type_arguments=None)], member=iconst, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTarget, postfix_operators=[], prefix_operators=[], qualifier=lp, selectors=[], type_arguments=None)], member=if_icmpeq, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=list, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=lp)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=LookupPair, sub_type=None))), label=None) call[.goto_n, parameter[member[.def]]] else begin[{] if[binary_operation[member[.optimize], &&, call[list.canOptimize, parameter[]]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=createBranch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=next)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=dup, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMatch, postfix_operators=[], prefix_operators=[], qualifier=lp, selectors=[], type_arguments=None)], member=iconst, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=if_icmpne, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=pop, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTarget, postfix_operators=[], prefix_operators=[], qualifier=lp, selectors=[], type_arguments=None)], member=goto_n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fixAddress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=list, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=lp)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=LookupPair, sub_type=None))), label=None) call[.pop, parameter[]] call[.goto_n, parameter[member[.def]]] else begin[{] if[call[list.isContiguous, parameter[]]] begin[{] local_variable[type[String], symbols] local_variable[type[int], index] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=symbols, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=index, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[], member=getTarget, postfix_operators=[], prefix_operators=[], qualifier=lp, selectors=[], type_arguments=None)), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=list, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=lp)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=LookupPair, sub_type=None))), label=None) call[.tableswitch, parameter[member[.def], call[list.get, parameter[literal[0]]], call[list.get, parameter[binary_operation[call[list.size, parameter[]], -, literal[1]]]], member[.symbols]]] else begin[{] call[.lookupswitch, parameter[member[.def], member[.list]]] end[}] end[}] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[optimizedSwitch] operator[SEP] identifier[String] identifier[def] , identifier[LookupList] identifier[list] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[list] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[list] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[1] operator[SEP] { Keyword[for] operator[SEP] identifier[LookupPair] identifier[lp] operator[:] identifier[list] operator[SEP] { identifier[iconst] operator[SEP] identifier[lp] operator[SEP] identifier[getMatch] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[if_icmpeq] operator[SEP] identifier[lp] operator[SEP] identifier[getTarget] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[goto_n] operator[SEP] identifier[def] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[optimize] operator[&&] identifier[list] operator[SEP] identifier[canOptimize] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[LookupPair] identifier[lp] operator[:] identifier[list] operator[SEP] { identifier[String] identifier[next] operator[=] identifier[createBranch] operator[SEP] operator[SEP] operator[SEP] identifier[dup] operator[SEP] operator[SEP] operator[SEP] identifier[iconst] operator[SEP] identifier[lp] operator[SEP] identifier[getMatch] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[if_icmpne] operator[SEP] identifier[next] operator[SEP] operator[SEP] identifier[pop] operator[SEP] operator[SEP] operator[SEP] identifier[goto_n] operator[SEP] identifier[lp] operator[SEP] identifier[getTarget] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[fixAddress] operator[SEP] identifier[next] operator[SEP] operator[SEP] } identifier[pop] operator[SEP] operator[SEP] operator[SEP] identifier[goto_n] operator[SEP] identifier[def] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[list] operator[SEP] identifier[isContiguous] operator[SEP] operator[SEP] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[symbols] operator[=] Keyword[new] identifier[String] operator[SEP] identifier[list] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[index] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[LookupPair] identifier[lp] operator[:] identifier[list] operator[SEP] { identifier[symbols] operator[SEP] identifier[index] operator[++] operator[SEP] operator[=] identifier[lp] operator[SEP] identifier[getTarget] operator[SEP] operator[SEP] operator[SEP] } identifier[tableswitch] operator[SEP] identifier[def] , identifier[list] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getMatch] operator[SEP] operator[SEP] , identifier[list] operator[SEP] identifier[get] operator[SEP] identifier[list] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] identifier[getMatch] operator[SEP] operator[SEP] , identifier[symbols] operator[SEP] operator[SEP] } Keyword[else] { identifier[lookupswitch] operator[SEP] identifier[def] , identifier[list] operator[SEP] operator[SEP] } } } }
private String getStacktraceMD5(final Issue pIssue) throws IssueParseException { final int stackCfId = ConfigurationManager.getInstance().CHILIPROJECT_STACKTRACE_MD5_CF_ID; final Predicate findStacktraceMD5 = new CustomFieldIdPredicate(stackCfId); final CustomField field = (CustomField) CollectionUtils.find(pIssue.getCustomFields(), findStacktraceMD5); if (null == field) { throw new IssueParseException(String.format( "Issue %d doesn't contains a custom_field id=%d", pIssue.getId(), stackCfId)); } return field.getValue(); }
class class_name[name] begin[{] method[getStacktraceMD5, return_type[type[String]], modifier[private], parameter[pIssue]] begin[{] local_variable[type[int], stackCfId] local_variable[type[Predicate], findStacktraceMD5] local_variable[type[CustomField], field] if[binary_operation[literal[null], ==, member[.field]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Issue %d doesn't contains a custom_field id=%d"), MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=pIssue, selectors=[], type_arguments=None), MemberReference(member=stackCfId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IssueParseException, sub_type=None)), label=None) else begin[{] None end[}] return[call[field.getValue, parameter[]]] end[}] END[}]
Keyword[private] identifier[String] identifier[getStacktraceMD5] operator[SEP] Keyword[final] identifier[Issue] identifier[pIssue] operator[SEP] Keyword[throws] identifier[IssueParseException] { Keyword[final] Keyword[int] identifier[stackCfId] operator[=] identifier[ConfigurationManager] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[CHILIPROJECT_STACKTRACE_MD5_CF_ID] operator[SEP] Keyword[final] identifier[Predicate] identifier[findStacktraceMD5] operator[=] Keyword[new] identifier[CustomFieldIdPredicate] operator[SEP] identifier[stackCfId] operator[SEP] operator[SEP] Keyword[final] identifier[CustomField] identifier[field] operator[=] operator[SEP] identifier[CustomField] operator[SEP] identifier[CollectionUtils] operator[SEP] identifier[find] operator[SEP] identifier[pIssue] operator[SEP] identifier[getCustomFields] operator[SEP] operator[SEP] , identifier[findStacktraceMD5] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[==] identifier[field] operator[SEP] { Keyword[throw] Keyword[new] identifier[IssueParseException] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[pIssue] operator[SEP] identifier[getId] operator[SEP] operator[SEP] , identifier[stackCfId] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[field] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] }
public void addMasterListeners() { super.addMasterListeners(); this.addListener(new SetUserIDHandler(ProjectTask.ENTERED_BY_USER_ID, true)); this.addListener(new SetUserIDHandler(ProjectTask.CHANGED_BY_USER_ID, true)); this.addListener(new DateChangedHandler(ProjectTask.CHANGED_DATE)); FieldListener listener = null; this.getField(ProjectTask.END_DATE_TIME).addListener(listener = new InitDateOffsetHandler(this.getField(ProjectTask.DURATION), (DateTimeField)this.getField(ProjectTask.START_DATE_TIME))); listener.setRespondsToMode(DBConstants.READ_MOVE, true); this.getField(ProjectTask.END_DATE_TIME).addListener(listener = new ReComputeTimeOffsetHandler(ProjectTask.DURATION, (DateTimeField)this.getField(ProjectTask.START_DATE_TIME))); this.getField(ProjectTask.START_DATE_TIME).addListener(listener = new ReComputeEndDateHandler(ProjectTask.END_DATE_TIME, (NumberField)this.getField(ProjectTask.DURATION))); this.getField(ProjectTask.DURATION).addListener(listener = new ChangeOnChangeHandler(this.getField(ProjectTask.START_DATE_TIME))); listener.setRespondsToMode(DBConstants.INIT_MOVE, false); this.getField(ProjectTask.START_DATE_TIME).addListener(new InitFieldHandler((BaseField)null) { public int fieldChanged(boolean bDisplayOption, int iMoveMode) { if (!getField(ProjectTask.PARENT_PROJECT_TASK_ID).isNull()) { Record recParent = ((ReferenceField)getField(ProjectTask.PARENT_PROJECT_TASK_ID)).getReference(); if (recParent != null) if ((recParent.getEditMode() == DBConstants.EDIT_IN_PROGRESS) || (recParent.getEditMode() == DBConstants.EDIT_CURRENT)) { if (recParent.getField(ProjectTask.HAS_CHILDREN).getState() == true) return this.getOwner().moveFieldToThis(recParent.getField(ProjectTask.END_DATE_TIME), bDisplayOption, iMoveMode); else return this.getOwner().moveFieldToThis(recParent.getField(ProjectTask.START_DATE_TIME), bDisplayOption, iMoveMode); } } return super.fieldChanged(bDisplayOption, iMoveMode); } }); this.addListener(new UpdateChildrenHandler(null)); this.addListener(new UpdateDependenciesHandler(null)); this.addListener(new SurveyDatesHandler(null)); // todo (don) Move these to the server environment this.addListener(new SubFileIntegrityHandler(ProjectTask.class.getName(), true)); this.addListener(new SubFileIntegrityHandler(ProjectTaskPredecessor.class.getName(), true)); this.addListener(new SubFileIntegrityHandler(ProjectTaskPredecessor.class.getName(), true) { public Record getSubRecord() { if (m_recDependent == null) m_recDependent = this.createSubRecord(); if (m_recDependent != null) { if (m_recDependent.getListener(SubFileFilter.class.getName()) == null) { m_recDependent.addListener(new SubFileFilter(getField(ProjectTask.ID), ProjectTaskPredecessor.PROJECT_TASK_ID, null, null, null, null)); m_recDependent.setKeyArea(ProjectTaskPredecessor.PROJECT_TASK_ID_KEY); } } return m_recDependent; } }); }
class class_name[name] begin[{] method[addMasterListeners, return_type[void], modifier[public], parameter[]] begin[{] SuperMethodInvocation(arguments=[], member=addMasterListeners, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) THIS[call[None.addListener, parameter[ClassCreator(arguments=[MemberReference(member=ENTERED_BY_USER_ID, postfix_operators=[], prefix_operators=[], qualifier=ProjectTask, selectors=[]), 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=SetUserIDHandler, sub_type=None))]]] THIS[call[None.addListener, parameter[ClassCreator(arguments=[MemberReference(member=CHANGED_BY_USER_ID, postfix_operators=[], prefix_operators=[], qualifier=ProjectTask, selectors=[]), 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=SetUserIDHandler, sub_type=None))]]] THIS[call[None.addListener, parameter[ClassCreator(arguments=[MemberReference(member=CHANGED_DATE, postfix_operators=[], prefix_operators=[], qualifier=ProjectTask, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DateChangedHandler, sub_type=None))]]] local_variable[type[FieldListener], listener] THIS[call[None.getField, parameter[member[ProjectTask.END_DATE_TIME]]]call[None.addListener, parameter[assign[member[.listener], ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=DURATION, postfix_operators=[], prefix_operators=[], qualifier=ProjectTask, selectors=[])], member=getField, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=START_DATE_TIME, postfix_operators=[], prefix_operators=[], qualifier=ProjectTask, selectors=[])], member=getField, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), type=ReferenceType(arguments=None, dimensions=[], name=DateTimeField, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InitDateOffsetHandler, sub_type=None))]]]] call[listener.setRespondsToMode, parameter[member[DBConstants.READ_MOVE], literal[true]]] THIS[call[None.getField, parameter[member[ProjectTask.END_DATE_TIME]]]call[None.addListener, parameter[assign[member[.listener], ClassCreator(arguments=[MemberReference(member=DURATION, postfix_operators=[], prefix_operators=[], qualifier=ProjectTask, selectors=[]), Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=START_DATE_TIME, postfix_operators=[], prefix_operators=[], qualifier=ProjectTask, selectors=[])], member=getField, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), type=ReferenceType(arguments=None, dimensions=[], name=DateTimeField, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ReComputeTimeOffsetHandler, sub_type=None))]]]] THIS[call[None.getField, parameter[member[ProjectTask.START_DATE_TIME]]]call[None.addListener, parameter[assign[member[.listener], ClassCreator(arguments=[MemberReference(member=END_DATE_TIME, postfix_operators=[], prefix_operators=[], qualifier=ProjectTask, selectors=[]), Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=DURATION, postfix_operators=[], prefix_operators=[], qualifier=ProjectTask, selectors=[])], member=getField, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), type=ReferenceType(arguments=None, dimensions=[], name=NumberField, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ReComputeEndDateHandler, sub_type=None))]]]] THIS[call[None.getField, parameter[member[ProjectTask.DURATION]]]call[None.addListener, parameter[assign[member[.listener], ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=START_DATE_TIME, postfix_operators=[], prefix_operators=[], qualifier=ProjectTask, selectors=[])], member=getField, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ChangeOnChangeHandler, sub_type=None))]]]] call[listener.setRespondsToMode, parameter[member[DBConstants.INIT_MOVE], literal[false]]] THIS[call[None.getField, parameter[member[ProjectTask.START_DATE_TIME]]]call[None.addListener, parameter[ClassCreator(arguments=[Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), type=ReferenceType(arguments=None, dimensions=[], name=BaseField, sub_type=None))], body=[MethodDeclaration(annotations=[], body=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=PARENT_PROJECT_TASK_ID, postfix_operators=[], prefix_operators=[], qualifier=ProjectTask, selectors=[])], member=getField, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[MethodInvocation(arguments=[], member=isNull, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=PARENT_PROJECT_TASK_ID, postfix_operators=[], prefix_operators=[], qualifier=ProjectTask, selectors=[])], member=getField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=ReferenceField, sub_type=None)), name=recParent)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Record, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=recParent, 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=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getEditMode, postfix_operators=[], prefix_operators=[], qualifier=recParent, selectors=[], type_arguments=None), operandr=MemberReference(member=EDIT_IN_PROGRESS, postfix_operators=[], prefix_operators=[], qualifier=DBConstants, selectors=[]), operator===), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getEditMode, postfix_operators=[], prefix_operators=[], qualifier=recParent, selectors=[], type_arguments=None), operandr=MemberReference(member=EDIT_CURRENT, postfix_operators=[], prefix_operators=[], qualifier=DBConstants, selectors=[]), operator===), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=HAS_CHILDREN, postfix_operators=[], prefix_operators=[], qualifier=ProjectTask, selectors=[])], member=getField, postfix_operators=[], prefix_operators=[], qualifier=recParent, selectors=[MethodInvocation(arguments=[], member=getState, 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=true), operator===), else_statement=ReturnStatement(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getOwner, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=START_DATE_TIME, postfix_operators=[], prefix_operators=[], qualifier=ProjectTask, selectors=[])], member=getField, postfix_operators=[], prefix_operators=[], qualifier=recParent, selectors=[], type_arguments=None), MemberReference(member=bDisplayOption, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=iMoveMode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=moveFieldToThis, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), label=None, then_statement=ReturnStatement(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getOwner, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=END_DATE_TIME, postfix_operators=[], prefix_operators=[], qualifier=ProjectTask, selectors=[])], member=getField, postfix_operators=[], prefix_operators=[], qualifier=recParent, selectors=[], type_arguments=None), MemberReference(member=bDisplayOption, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=iMoveMode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=moveFieldToThis, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None))])))])), ReturnStatement(expression=SuperMethodInvocation(arguments=[MemberReference(member=bDisplayOption, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=iMoveMode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fieldChanged, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=fieldChanged, parameters=[FormalParameter(annotations=[], modifiers=set(), name=bDisplayOption, type=BasicType(dimensions=[], name=boolean), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=iMoveMode, type=BasicType(dimensions=[], name=int), varargs=False)], return_type=BasicType(dimensions=[], name=int), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InitFieldHandler, sub_type=None))]]] THIS[call[None.addListener, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UpdateChildrenHandler, sub_type=None))]]] THIS[call[None.addListener, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UpdateDependenciesHandler, sub_type=None))]]] THIS[call[None.addListener, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SurveyDatesHandler, sub_type=None))]]] THIS[call[None.addListener, parameter[ClassCreator(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=ProjectTask, sub_type=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=SubFileIntegrityHandler, sub_type=None))]]] THIS[call[None.addListener, parameter[ClassCreator(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=ProjectTaskPredecessor, sub_type=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=SubFileIntegrityHandler, sub_type=None))]]] THIS[call[None.addListener, parameter[ClassCreator(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=ProjectTaskPredecessor, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], body=[MethodDeclaration(annotations=[], body=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=m_recDependent, 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=StatementExpression(expression=Assignment(expressionl=MemberReference(member=m_recDependent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=createSubRecord, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=m_recDependent, 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=[IfStatement(condition=BinaryOperation(operandl=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=SubFileFilter, sub_type=None))], member=getListener, postfix_operators=[], prefix_operators=[], qualifier=m_recDependent, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=ID, postfix_operators=[], prefix_operators=[], qualifier=ProjectTask, selectors=[])], member=getField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=PROJECT_TASK_ID, postfix_operators=[], prefix_operators=[], qualifier=ProjectTaskPredecessor, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SubFileFilter, sub_type=None))], member=addListener, postfix_operators=[], prefix_operators=[], qualifier=m_recDependent, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=PROJECT_TASK_ID_KEY, postfix_operators=[], prefix_operators=[], qualifier=ProjectTaskPredecessor, selectors=[])], member=setKeyArea, postfix_operators=[], prefix_operators=[], qualifier=m_recDependent, selectors=[], type_arguments=None), label=None)]))])), ReturnStatement(expression=MemberReference(member=m_recDependent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], documentation=None, modifiers={'public'}, name=getSubRecord, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=Record, sub_type=None), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SubFileIntegrityHandler, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addMasterListeners] operator[SEP] operator[SEP] { Keyword[super] operator[SEP] identifier[addMasterListeners] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[addListener] operator[SEP] Keyword[new] identifier[SetUserIDHandler] operator[SEP] identifier[ProjectTask] operator[SEP] identifier[ENTERED_BY_USER_ID] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[addListener] operator[SEP] Keyword[new] identifier[SetUserIDHandler] operator[SEP] identifier[ProjectTask] operator[SEP] identifier[CHANGED_BY_USER_ID] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[addListener] operator[SEP] Keyword[new] identifier[DateChangedHandler] operator[SEP] identifier[ProjectTask] operator[SEP] identifier[CHANGED_DATE] operator[SEP] operator[SEP] operator[SEP] identifier[FieldListener] identifier[listener] operator[=] Other[null] operator[SEP] Keyword[this] operator[SEP] identifier[getField] operator[SEP] identifier[ProjectTask] operator[SEP] identifier[END_DATE_TIME] operator[SEP] operator[SEP] identifier[addListener] operator[SEP] identifier[listener] operator[=] Keyword[new] identifier[InitDateOffsetHandler] operator[SEP] Keyword[this] operator[SEP] identifier[getField] operator[SEP] identifier[ProjectTask] operator[SEP] identifier[DURATION] operator[SEP] , operator[SEP] identifier[DateTimeField] operator[SEP] Keyword[this] operator[SEP] identifier[getField] operator[SEP] identifier[ProjectTask] operator[SEP] identifier[START_DATE_TIME] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[listener] operator[SEP] identifier[setRespondsToMode] operator[SEP] identifier[DBConstants] operator[SEP] identifier[READ_MOVE] , literal[boolean] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[getField] operator[SEP] identifier[ProjectTask] operator[SEP] identifier[END_DATE_TIME] operator[SEP] operator[SEP] identifier[addListener] operator[SEP] identifier[listener] operator[=] Keyword[new] identifier[ReComputeTimeOffsetHandler] operator[SEP] identifier[ProjectTask] operator[SEP] identifier[DURATION] , operator[SEP] identifier[DateTimeField] operator[SEP] Keyword[this] operator[SEP] identifier[getField] operator[SEP] identifier[ProjectTask] operator[SEP] identifier[START_DATE_TIME] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[getField] operator[SEP] identifier[ProjectTask] operator[SEP] identifier[START_DATE_TIME] operator[SEP] operator[SEP] identifier[addListener] operator[SEP] identifier[listener] operator[=] Keyword[new] identifier[ReComputeEndDateHandler] operator[SEP] identifier[ProjectTask] operator[SEP] identifier[END_DATE_TIME] , operator[SEP] identifier[NumberField] operator[SEP] Keyword[this] operator[SEP] identifier[getField] operator[SEP] identifier[ProjectTask] operator[SEP] identifier[DURATION] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[getField] operator[SEP] identifier[ProjectTask] operator[SEP] identifier[DURATION] operator[SEP] operator[SEP] identifier[addListener] operator[SEP] identifier[listener] operator[=] Keyword[new] identifier[ChangeOnChangeHandler] operator[SEP] Keyword[this] operator[SEP] identifier[getField] operator[SEP] identifier[ProjectTask] operator[SEP] identifier[START_DATE_TIME] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[listener] operator[SEP] identifier[setRespondsToMode] operator[SEP] identifier[DBConstants] operator[SEP] identifier[INIT_MOVE] , literal[boolean] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[getField] operator[SEP] identifier[ProjectTask] operator[SEP] identifier[START_DATE_TIME] operator[SEP] operator[SEP] identifier[addListener] operator[SEP] Keyword[new] identifier[InitFieldHandler] operator[SEP] operator[SEP] identifier[BaseField] operator[SEP] Other[null] operator[SEP] { Keyword[public] Keyword[int] identifier[fieldChanged] operator[SEP] Keyword[boolean] identifier[bDisplayOption] , Keyword[int] identifier[iMoveMode] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[getField] operator[SEP] identifier[ProjectTask] operator[SEP] identifier[PARENT_PROJECT_TASK_ID] operator[SEP] operator[SEP] identifier[isNull] operator[SEP] operator[SEP] operator[SEP] { identifier[Record] identifier[recParent] operator[=] operator[SEP] operator[SEP] identifier[ReferenceField] operator[SEP] identifier[getField] operator[SEP] identifier[ProjectTask] operator[SEP] identifier[PARENT_PROJECT_TASK_ID] operator[SEP] operator[SEP] operator[SEP] identifier[getReference] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[recParent] operator[!=] Other[null] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[recParent] operator[SEP] identifier[getEditMode] operator[SEP] operator[SEP] operator[==] identifier[DBConstants] operator[SEP] identifier[EDIT_IN_PROGRESS] operator[SEP] operator[||] operator[SEP] identifier[recParent] operator[SEP] identifier[getEditMode] operator[SEP] operator[SEP] operator[==] identifier[DBConstants] operator[SEP] identifier[EDIT_CURRENT] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[recParent] operator[SEP] identifier[getField] operator[SEP] identifier[ProjectTask] operator[SEP] identifier[HAS_CHILDREN] operator[SEP] operator[SEP] identifier[getState] operator[SEP] operator[SEP] operator[==] literal[boolean] operator[SEP] Keyword[return] Keyword[this] operator[SEP] identifier[getOwner] operator[SEP] operator[SEP] operator[SEP] identifier[moveFieldToThis] operator[SEP] identifier[recParent] operator[SEP] identifier[getField] operator[SEP] identifier[ProjectTask] operator[SEP] identifier[END_DATE_TIME] operator[SEP] , identifier[bDisplayOption] , identifier[iMoveMode] operator[SEP] operator[SEP] Keyword[else] Keyword[return] Keyword[this] operator[SEP] identifier[getOwner] operator[SEP] operator[SEP] operator[SEP] identifier[moveFieldToThis] operator[SEP] identifier[recParent] operator[SEP] identifier[getField] operator[SEP] identifier[ProjectTask] operator[SEP] identifier[START_DATE_TIME] operator[SEP] , identifier[bDisplayOption] , identifier[iMoveMode] operator[SEP] operator[SEP] } } Keyword[return] Keyword[super] operator[SEP] identifier[fieldChanged] operator[SEP] identifier[bDisplayOption] , identifier[iMoveMode] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[addListener] operator[SEP] Keyword[new] identifier[UpdateChildrenHandler] operator[SEP] Other[null] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[addListener] operator[SEP] Keyword[new] identifier[UpdateDependenciesHandler] operator[SEP] Other[null] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[addListener] operator[SEP] Keyword[new] identifier[SurveyDatesHandler] operator[SEP] Other[null] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[addListener] operator[SEP] Keyword[new] identifier[SubFileIntegrityHandler] operator[SEP] identifier[ProjectTask] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[addListener] operator[SEP] Keyword[new] identifier[SubFileIntegrityHandler] operator[SEP] identifier[ProjectTaskPredecessor] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[addListener] operator[SEP] Keyword[new] identifier[SubFileIntegrityHandler] operator[SEP] identifier[ProjectTaskPredecessor] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , literal[boolean] operator[SEP] { Keyword[public] identifier[Record] identifier[getSubRecord] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[m_recDependent] operator[==] Other[null] operator[SEP] identifier[m_recDependent] operator[=] Keyword[this] operator[SEP] identifier[createSubRecord] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[m_recDependent] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[m_recDependent] operator[SEP] identifier[getListener] operator[SEP] identifier[SubFileFilter] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[m_recDependent] operator[SEP] identifier[addListener] operator[SEP] Keyword[new] identifier[SubFileFilter] operator[SEP] identifier[getField] operator[SEP] identifier[ProjectTask] operator[SEP] identifier[ID] operator[SEP] , identifier[ProjectTaskPredecessor] operator[SEP] identifier[PROJECT_TASK_ID] , Other[null] , Other[null] , Other[null] , Other[null] operator[SEP] operator[SEP] operator[SEP] identifier[m_recDependent] operator[SEP] identifier[setKeyArea] operator[SEP] identifier[ProjectTaskPredecessor] operator[SEP] identifier[PROJECT_TASK_ID_KEY] operator[SEP] operator[SEP] } } Keyword[return] identifier[m_recDependent] operator[SEP] } } operator[SEP] operator[SEP] }
public static boolean isAvroSchema(String serializerName) { if(serializerName.equals(AVRO_GENERIC_VERSIONED_TYPE_NAME) || serializerName.equals(AVRO_GENERIC_TYPE_NAME) || serializerName.equals(AVRO_REFLECTIVE_TYPE_NAME) || serializerName.equals(AVRO_SPECIFIC_TYPE_NAME)) { return true; } else { return false; } }
class class_name[name] begin[{] method[isAvroSchema, return_type[type[boolean]], modifier[public static], parameter[serializerName]] begin[{] if[binary_operation[binary_operation[binary_operation[call[serializerName.equals, parameter[member[.AVRO_GENERIC_VERSIONED_TYPE_NAME]]], ||, call[serializerName.equals, parameter[member[.AVRO_GENERIC_TYPE_NAME]]]], ||, call[serializerName.equals, parameter[member[.AVRO_REFLECTIVE_TYPE_NAME]]]], ||, call[serializerName.equals, parameter[member[.AVRO_SPECIFIC_TYPE_NAME]]]]] begin[{] return[literal[true]] else begin[{] return[literal[false]] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isAvroSchema] operator[SEP] identifier[String] identifier[serializerName] operator[SEP] { Keyword[if] operator[SEP] identifier[serializerName] operator[SEP] identifier[equals] operator[SEP] identifier[AVRO_GENERIC_VERSIONED_TYPE_NAME] operator[SEP] operator[||] identifier[serializerName] operator[SEP] identifier[equals] operator[SEP] identifier[AVRO_GENERIC_TYPE_NAME] operator[SEP] operator[||] identifier[serializerName] operator[SEP] identifier[equals] operator[SEP] identifier[AVRO_REFLECTIVE_TYPE_NAME] operator[SEP] operator[||] identifier[serializerName] operator[SEP] identifier[equals] operator[SEP] identifier[AVRO_SPECIFIC_TYPE_NAME] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { Keyword[return] literal[boolean] operator[SEP] } }
protected Record next(Writer writer) { Value value = recordIte.next(); if (valuesLabels != null) { int i = 0; for (ValueWritable vw : value.getValues()) { vw.getLabel().set(valuesLabels[i++]); } } currentRecord.setValue(value); writer.setDefaultRecord(currentRecord); return currentRecord; }
class class_name[name] begin[{] method[next, return_type[type[Record]], modifier[protected], parameter[writer]] begin[{] local_variable[type[Value], value] if[binary_operation[member[.valuesLabels], !=, literal[null]]] begin[{] local_variable[type[int], i] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getLabel, postfix_operators=[], prefix_operators=[], qualifier=vw, selectors=[MethodInvocation(arguments=[MemberReference(member=valuesLabels, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]))])], member=set, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getValues, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=vw)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ValueWritable, sub_type=None))), label=None) else begin[{] None end[}] call[currentRecord.setValue, parameter[member[.value]]] call[writer.setDefaultRecord, parameter[member[.currentRecord]]] return[member[.currentRecord]] end[}] END[}]
Keyword[protected] identifier[Record] identifier[next] operator[SEP] identifier[Writer] identifier[writer] operator[SEP] { identifier[Value] identifier[value] operator[=] identifier[recordIte] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[valuesLabels] operator[!=] Other[null] operator[SEP] { Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[ValueWritable] identifier[vw] operator[:] identifier[value] operator[SEP] identifier[getValues] operator[SEP] operator[SEP] operator[SEP] { identifier[vw] operator[SEP] identifier[getLabel] operator[SEP] operator[SEP] operator[SEP] identifier[set] operator[SEP] identifier[valuesLabels] operator[SEP] identifier[i] operator[++] operator[SEP] operator[SEP] operator[SEP] } } identifier[currentRecord] operator[SEP] identifier[setValue] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[writer] operator[SEP] identifier[setDefaultRecord] operator[SEP] identifier[currentRecord] operator[SEP] operator[SEP] Keyword[return] identifier[currentRecord] operator[SEP] }
@Override public ModifyDBClusterParameterGroupResult modifyDBClusterParameterGroup(ModifyDBClusterParameterGroupRequest request) { request = beforeClientExecution(request); return executeModifyDBClusterParameterGroup(request); }
class class_name[name] begin[{] method[modifyDBClusterParameterGroup, return_type[type[ModifyDBClusterParameterGroupResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeModifyDBClusterParameterGroup, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[ModifyDBClusterParameterGroupResult] identifier[modifyDBClusterParameterGroup] operator[SEP] identifier[ModifyDBClusterParameterGroupRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeModifyDBClusterParameterGroup] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public static double elementDiagonalMaxAbs( DMatrixD1 a ) { final int size = Math.min(a.numRows,a.numCols); double max = 0; for( int i = 0; i < size; i++ ) { double val = Math.abs(a.get( i,i )); if( val > max ) { max = val; } } return max; }
class class_name[name] begin[{] method[elementDiagonalMaxAbs, return_type[type[double]], modifier[public static], parameter[a]] begin[{] local_variable[type[int], size] local_variable[type[double], max] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=a, selectors=[], type_arguments=None)], member=abs, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), name=val)], modifiers=set(), type=BasicType(dimensions=[], name=double)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=max, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=max, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=val, 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) return[member[.max]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] identifier[elementDiagonalMaxAbs] operator[SEP] identifier[DMatrixD1] identifier[a] operator[SEP] { Keyword[final] Keyword[int] identifier[size] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[a] operator[SEP] identifier[numRows] , identifier[a] operator[SEP] identifier[numCols] operator[SEP] operator[SEP] Keyword[double] identifier[max] operator[=] Other[0] 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[double] identifier[val] operator[=] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[a] operator[SEP] identifier[get] operator[SEP] identifier[i] , identifier[i] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[val] operator[>] identifier[max] operator[SEP] { identifier[max] operator[=] identifier[val] operator[SEP] } } Keyword[return] identifier[max] operator[SEP] }
public ParameterBuilder addAll(Map<String, Object> parameters) { if (parameters != null) { for (String k : parameters.keySet()) { if (parameters.get(k) != null) { this.parameters.put(k, parameters.get(k)); } } } return this; }
class class_name[name] begin[{] method[addAll, return_type[type[ParameterBuilder]], modifier[public], parameter[parameters]] begin[{] if[binary_operation[member[.parameters], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=parameters, selectors=[], type_arguments=None), 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=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=parameters, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=parameters, selectors=[], type_arguments=None)], member=put, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=parameters, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=k)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) else begin[{] None end[}] return[THIS[]] end[}] END[}]
Keyword[public] identifier[ParameterBuilder] identifier[addAll] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[parameters] operator[SEP] { Keyword[if] operator[SEP] identifier[parameters] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[String] identifier[k] operator[:] identifier[parameters] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[parameters] operator[SEP] identifier[get] operator[SEP] identifier[k] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[parameters] operator[SEP] identifier[put] operator[SEP] identifier[k] , identifier[parameters] operator[SEP] identifier[get] operator[SEP] identifier[k] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[return] Keyword[this] operator[SEP] }
@Override public void writeToParcel(Parcel out, int flags) { out.writeLong(mCreated); out.writeString(mObjectId); out.writeLong(mExpires); out.writeString(mId); // There is no writeBoolean out.writeInt(mLiveMode ? 1 : 0); out.writeString(mObject); out.writeString(mSecret); out.writeString(mType); }
class class_name[name] begin[{] method[writeToParcel, return_type[void], modifier[public], parameter[out, flags]] begin[{] call[out.writeLong, parameter[member[.mCreated]]] call[out.writeString, parameter[member[.mObjectId]]] call[out.writeLong, parameter[member[.mExpires]]] call[out.writeString, parameter[member[.mId]]] call[out.writeInt, parameter[TernaryExpression(condition=MemberReference(member=mLiveMode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]] call[out.writeString, parameter[member[.mObject]]] call[out.writeString, parameter[member[.mSecret]]] call[out.writeString, parameter[member[.mType]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[writeToParcel] operator[SEP] identifier[Parcel] identifier[out] , Keyword[int] identifier[flags] operator[SEP] { identifier[out] operator[SEP] identifier[writeLong] operator[SEP] identifier[mCreated] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[writeString] operator[SEP] identifier[mObjectId] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[writeLong] operator[SEP] identifier[mExpires] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[writeString] operator[SEP] identifier[mId] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[writeInt] operator[SEP] identifier[mLiveMode] operator[?] Other[1] operator[:] Other[0] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[writeString] operator[SEP] identifier[mObject] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[writeString] operator[SEP] identifier[mSecret] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[writeString] operator[SEP] identifier[mType] operator[SEP] operator[SEP] }
public static byte[] readFully(InputStream in, boolean closeInputStream) throws IOException { if (in instanceof ByteArrayInputStream) { // content can be read in one pass return readFully(in, in.available(), closeInputStream); } // copy buffer byte[] xfer = new byte[2048]; // output buffer ByteArrayOutputStream out = new ByteArrayOutputStream(xfer.length); // transfer data from input to output in xfer-sized chunks. for (int bytesRead = in.read(xfer, 0, xfer.length); bytesRead >= 0; bytesRead = in.read(xfer, 0, xfer.length)) { if (bytesRead > 0) { out.write(xfer, 0, bytesRead); } } if (closeInputStream) { in.close(); } out.close(); return out.toByteArray(); }
class class_name[name] begin[{] method[readFully, return_type[type[byte]], modifier[public static], parameter[in, closeInputStream]] begin[{] if[binary_operation[member[.in], instanceof, type[ByteArrayInputStream]]] begin[{] return[call[.readFully, parameter[member[.in], call[in.available, parameter[]], member[.closeInputStream]]]] else begin[{] None end[}] local_variable[type[byte], xfer] local_variable[type[ByteArrayOutputStream], out] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=bytesRead, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=xfer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=bytesRead, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=bytesRead, 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=MethodInvocation(arguments=[MemberReference(member=xfer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=xfer, selectors=[])], member=read, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[], type_arguments=None), name=bytesRead)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[Assignment(expressionl=MemberReference(member=bytesRead, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=xfer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=xfer, selectors=[])], member=read, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[], type_arguments=None))]), label=None) if[member[.closeInputStream]] begin[{] call[in.close, parameter[]] else begin[{] None end[}] call[out.close, parameter[]] return[call[out.toByteArray, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[readFully] operator[SEP] identifier[InputStream] identifier[in] , Keyword[boolean] identifier[closeInputStream] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[in] Keyword[instanceof] identifier[ByteArrayInputStream] operator[SEP] { Keyword[return] identifier[readFully] operator[SEP] identifier[in] , identifier[in] operator[SEP] identifier[available] operator[SEP] operator[SEP] , identifier[closeInputStream] operator[SEP] operator[SEP] } Keyword[byte] operator[SEP] operator[SEP] identifier[xfer] operator[=] Keyword[new] Keyword[byte] operator[SEP] Other[2048] operator[SEP] operator[SEP] identifier[ByteArrayOutputStream] identifier[out] operator[=] Keyword[new] identifier[ByteArrayOutputStream] operator[SEP] identifier[xfer] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[bytesRead] operator[=] identifier[in] operator[SEP] identifier[read] operator[SEP] identifier[xfer] , Other[0] , identifier[xfer] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[bytesRead] operator[>=] Other[0] operator[SEP] identifier[bytesRead] operator[=] identifier[in] operator[SEP] identifier[read] operator[SEP] identifier[xfer] , Other[0] , identifier[xfer] operator[SEP] identifier[length] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[bytesRead] operator[>] Other[0] operator[SEP] { identifier[out] operator[SEP] identifier[write] operator[SEP] identifier[xfer] , Other[0] , identifier[bytesRead] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[closeInputStream] operator[SEP] { identifier[in] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } identifier[out] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[out] operator[SEP] identifier[toByteArray] operator[SEP] operator[SEP] operator[SEP] }
private void setListShown(boolean shown, boolean animate) { ensureList(); if (mProgressContainer == null) { throw new IllegalStateException("Can't be used with a custom content view"); } if (mListShown == shown) { return; } mListShown = shown; if (shown) { if (animate) { mProgressContainer.startAnimation(AnimationUtils.loadAnimation( getActivity(), android.R.anim.fade_out)); mListContainer.startAnimation(AnimationUtils.loadAnimation( getActivity(), android.R.anim.fade_in)); } else { mProgressContainer.clearAnimation(); mListContainer.clearAnimation(); } mProgressContainer.setVisibility(View.GONE); mListContainer.setVisibility(View.VISIBLE); } else { if (animate) { mProgressContainer.startAnimation(AnimationUtils.loadAnimation( getActivity(), android.R.anim.fade_in)); mListContainer.startAnimation(AnimationUtils.loadAnimation( getActivity(), android.R.anim.fade_out)); } else { mProgressContainer.clearAnimation(); mListContainer.clearAnimation(); } mProgressContainer.setVisibility(View.VISIBLE); mListContainer.setVisibility(View.GONE); } }
class class_name[name] begin[{] method[setListShown, return_type[void], modifier[private], parameter[shown, animate]] begin[{] call[.ensureList, parameter[]] if[binary_operation[member[.mProgressContainer], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Can't be used with a custom content view")], 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[.mListShown], ==, member[.shown]]] begin[{] return[None] else begin[{] None end[}] assign[member[.mListShown], member[.shown]] if[member[.shown]] begin[{] if[member[.animate]] begin[{] call[mProgressContainer.startAnimation, parameter[call[AnimationUtils.loadAnimation, parameter[call[.getActivity, parameter[]], member[android.R.anim.fade_out]]]]] call[mListContainer.startAnimation, parameter[call[AnimationUtils.loadAnimation, parameter[call[.getActivity, parameter[]], member[android.R.anim.fade_in]]]]] else begin[{] call[mProgressContainer.clearAnimation, parameter[]] call[mListContainer.clearAnimation, parameter[]] end[}] call[mProgressContainer.setVisibility, parameter[member[View.GONE]]] call[mListContainer.setVisibility, parameter[member[View.VISIBLE]]] else begin[{] if[member[.animate]] begin[{] call[mProgressContainer.startAnimation, parameter[call[AnimationUtils.loadAnimation, parameter[call[.getActivity, parameter[]], member[android.R.anim.fade_in]]]]] call[mListContainer.startAnimation, parameter[call[AnimationUtils.loadAnimation, parameter[call[.getActivity, parameter[]], member[android.R.anim.fade_out]]]]] else begin[{] call[mProgressContainer.clearAnimation, parameter[]] call[mListContainer.clearAnimation, parameter[]] end[}] call[mProgressContainer.setVisibility, parameter[member[View.VISIBLE]]] call[mListContainer.setVisibility, parameter[member[View.GONE]]] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[setListShown] operator[SEP] Keyword[boolean] identifier[shown] , Keyword[boolean] identifier[animate] operator[SEP] { identifier[ensureList] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mProgressContainer] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[mListShown] operator[==] identifier[shown] operator[SEP] { Keyword[return] operator[SEP] } identifier[mListShown] operator[=] identifier[shown] operator[SEP] Keyword[if] operator[SEP] identifier[shown] operator[SEP] { Keyword[if] operator[SEP] identifier[animate] operator[SEP] { identifier[mProgressContainer] operator[SEP] identifier[startAnimation] operator[SEP] identifier[AnimationUtils] operator[SEP] identifier[loadAnimation] operator[SEP] identifier[getActivity] operator[SEP] operator[SEP] , identifier[android] operator[SEP] identifier[R] operator[SEP] identifier[anim] operator[SEP] identifier[fade_out] operator[SEP] operator[SEP] operator[SEP] identifier[mListContainer] operator[SEP] identifier[startAnimation] operator[SEP] identifier[AnimationUtils] operator[SEP] identifier[loadAnimation] operator[SEP] identifier[getActivity] operator[SEP] operator[SEP] , identifier[android] operator[SEP] identifier[R] operator[SEP] identifier[anim] operator[SEP] identifier[fade_in] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[mProgressContainer] operator[SEP] identifier[clearAnimation] operator[SEP] operator[SEP] operator[SEP] identifier[mListContainer] operator[SEP] identifier[clearAnimation] operator[SEP] operator[SEP] operator[SEP] } identifier[mProgressContainer] operator[SEP] identifier[setVisibility] operator[SEP] identifier[View] operator[SEP] identifier[GONE] operator[SEP] operator[SEP] identifier[mListContainer] operator[SEP] identifier[setVisibility] operator[SEP] identifier[View] operator[SEP] identifier[VISIBLE] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[animate] operator[SEP] { identifier[mProgressContainer] operator[SEP] identifier[startAnimation] operator[SEP] identifier[AnimationUtils] operator[SEP] identifier[loadAnimation] operator[SEP] identifier[getActivity] operator[SEP] operator[SEP] , identifier[android] operator[SEP] identifier[R] operator[SEP] identifier[anim] operator[SEP] identifier[fade_in] operator[SEP] operator[SEP] operator[SEP] identifier[mListContainer] operator[SEP] identifier[startAnimation] operator[SEP] identifier[AnimationUtils] operator[SEP] identifier[loadAnimation] operator[SEP] identifier[getActivity] operator[SEP] operator[SEP] , identifier[android] operator[SEP] identifier[R] operator[SEP] identifier[anim] operator[SEP] identifier[fade_out] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[mProgressContainer] operator[SEP] identifier[clearAnimation] operator[SEP] operator[SEP] operator[SEP] identifier[mListContainer] operator[SEP] identifier[clearAnimation] operator[SEP] operator[SEP] operator[SEP] } identifier[mProgressContainer] operator[SEP] identifier[setVisibility] operator[SEP] identifier[View] operator[SEP] identifier[VISIBLE] operator[SEP] operator[SEP] identifier[mListContainer] operator[SEP] identifier[setVisibility] operator[SEP] identifier[View] operator[SEP] identifier[GONE] operator[SEP] operator[SEP] } }
@Override public void removeByUuid_C(String uuid, long companyId) { for (CPDefinitionOptionRel cpDefinitionOptionRel : findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(cpDefinitionOptionRel); } }
class class_name[name] begin[{] method[removeByUuid_C, return_type[void], modifier[public], parameter[uuid, companyId]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=cpDefinitionOptionRel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=uuid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=companyId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ALL_POS, postfix_operators=[], prefix_operators=[], qualifier=QueryUtil, selectors=[]), MemberReference(member=ALL_POS, postfix_operators=[], prefix_operators=[], qualifier=QueryUtil, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=findByUuid_C, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=cpDefinitionOptionRel)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CPDefinitionOptionRel, sub_type=None))), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[removeByUuid_C] operator[SEP] identifier[String] identifier[uuid] , Keyword[long] identifier[companyId] operator[SEP] { Keyword[for] operator[SEP] identifier[CPDefinitionOptionRel] identifier[cpDefinitionOptionRel] operator[:] identifier[findByUuid_C] operator[SEP] identifier[uuid] , identifier[companyId] , identifier[QueryUtil] operator[SEP] identifier[ALL_POS] , identifier[QueryUtil] operator[SEP] identifier[ALL_POS] , Other[null] operator[SEP] operator[SEP] { identifier[remove] operator[SEP] identifier[cpDefinitionOptionRel] operator[SEP] operator[SEP] } }
public static String replace(String text, String searchString, String replacement, int max) { if (isEmpty(text) || isEmpty(searchString) || replacement == null || max == 0) { return text; } int start = 0; int end = text.indexOf(searchString, start); if (end == INDEX_NOT_FOUND) { return text; } int replLength = searchString.length(); int increase = replacement.length() - replLength; increase = (increase < 0 ? 0 : increase); increase *= (max < 0 ? 16 : (max > 64 ? 64 : max)); StringBuilder buf = new StringBuilder(text.length() + increase); while (end != INDEX_NOT_FOUND) { buf.append(text.substring(start, end)).append(replacement); start = end + replLength; if (--max == 0) { break; } end = text.indexOf(searchString, start); } buf.append(text.substring(start)); return buf.toString(); }
class class_name[name] begin[{] method[replace, return_type[type[String]], modifier[public static], parameter[text, searchString, replacement, max]] begin[{] if[binary_operation[binary_operation[binary_operation[call[.isEmpty, parameter[member[.text]]], ||, call[.isEmpty, parameter[member[.searchString]]]], ||, binary_operation[member[.replacement], ==, literal[null]]], ||, binary_operation[member[.max], ==, literal[0]]]] begin[{] return[member[.text]] else begin[{] None end[}] local_variable[type[int], start] local_variable[type[int], end] if[binary_operation[member[.end], ==, member[.INDEX_NOT_FOUND]]] begin[{] return[member[.text]] else begin[{] None end[}] local_variable[type[int], replLength] local_variable[type[int], increase] assign[member[.increase], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=increase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), if_false=MemberReference(member=increase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))] assign[member[.increase], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=max, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), if_false=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=max, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=64), operator=>), if_false=MemberReference(member=max, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=64)), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16))] local_variable[type[StringBuilder], buf] while[binary_operation[member[.end], !=, member[.INDEX_NOT_FOUND]]] begin[{] call[buf.append, parameter[call[text.substring, parameter[member[.start], member[.end]]]]] assign[member[.start], binary_operation[member[.end], +, member[.replLength]]] if[binary_operation[member[.max], ==, literal[0]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] assign[member[.end], call[text.indexOf, parameter[member[.searchString], member[.start]]]] end[}] call[buf.append, parameter[call[text.substring, parameter[member[.start]]]]] return[call[buf.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[replace] operator[SEP] identifier[String] identifier[text] , identifier[String] identifier[searchString] , identifier[String] identifier[replacement] , Keyword[int] identifier[max] operator[SEP] { Keyword[if] operator[SEP] identifier[isEmpty] operator[SEP] identifier[text] operator[SEP] operator[||] identifier[isEmpty] operator[SEP] identifier[searchString] operator[SEP] operator[||] identifier[replacement] operator[==] Other[null] operator[||] identifier[max] operator[==] Other[0] operator[SEP] { Keyword[return] identifier[text] operator[SEP] } Keyword[int] identifier[start] operator[=] Other[0] operator[SEP] Keyword[int] identifier[end] operator[=] identifier[text] operator[SEP] identifier[indexOf] operator[SEP] identifier[searchString] , identifier[start] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[end] operator[==] identifier[INDEX_NOT_FOUND] operator[SEP] { Keyword[return] identifier[text] operator[SEP] } Keyword[int] identifier[replLength] operator[=] identifier[searchString] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[increase] operator[=] identifier[replacement] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] identifier[replLength] operator[SEP] identifier[increase] operator[=] operator[SEP] identifier[increase] operator[<] Other[0] operator[?] Other[0] operator[:] identifier[increase] operator[SEP] operator[SEP] identifier[increase] operator[*=] operator[SEP] identifier[max] operator[<] Other[0] operator[?] Other[16] operator[:] operator[SEP] identifier[max] operator[>] Other[64] operator[?] Other[64] operator[:] identifier[max] operator[SEP] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[buf] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[text] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[+] identifier[increase] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[end] operator[!=] identifier[INDEX_NOT_FOUND] operator[SEP] { identifier[buf] operator[SEP] identifier[append] operator[SEP] identifier[text] operator[SEP] identifier[substring] operator[SEP] identifier[start] , identifier[end] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[replacement] operator[SEP] operator[SEP] identifier[start] operator[=] identifier[end] operator[+] identifier[replLength] operator[SEP] Keyword[if] operator[SEP] operator[--] identifier[max] operator[==] Other[0] operator[SEP] { Keyword[break] operator[SEP] } identifier[end] operator[=] identifier[text] operator[SEP] identifier[indexOf] operator[SEP] identifier[searchString] , identifier[start] operator[SEP] operator[SEP] } identifier[buf] operator[SEP] identifier[append] operator[SEP] identifier[text] operator[SEP] identifier[substring] operator[SEP] identifier[start] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[buf] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
@Override public boolean eIsSet(int featureID) { switch (featureID) { case BpsimPackage.RESOURCE_PARAMETERS__SELECTION: return selection != null; case BpsimPackage.RESOURCE_PARAMETERS__AVAILABILITY: return availability != null; case BpsimPackage.RESOURCE_PARAMETERS__QUANTITY: return quantity != null; case BpsimPackage.RESOURCE_PARAMETERS__ROLE: return role != null && !role.isEmpty(); } return super.eIsSet(featureID); }
class class_name[name] begin[{] method[eIsSet, return_type[type[boolean]], modifier[public], parameter[featureID]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=RESOURCE_PARAMETERS__SELECTION, postfix_operators=[], prefix_operators=[], qualifier=BpsimPackage, selectors=[])], statements=[ReturnStatement(expression=BinaryOperation(operandl=MemberReference(member=selection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None)]), SwitchStatementCase(case=[MemberReference(member=RESOURCE_PARAMETERS__AVAILABILITY, postfix_operators=[], prefix_operators=[], qualifier=BpsimPackage, selectors=[])], statements=[ReturnStatement(expression=BinaryOperation(operandl=MemberReference(member=availability, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None)]), SwitchStatementCase(case=[MemberReference(member=RESOURCE_PARAMETERS__QUANTITY, postfix_operators=[], prefix_operators=[], qualifier=BpsimPackage, selectors=[])], statements=[ReturnStatement(expression=BinaryOperation(operandl=MemberReference(member=quantity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None)]), SwitchStatementCase(case=[MemberReference(member=RESOURCE_PARAMETERS__ROLE, postfix_operators=[], prefix_operators=[], qualifier=BpsimPackage, selectors=[])], statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=role, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=role, selectors=[], type_arguments=None), operator=&&), label=None)])], expression=MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) return[SuperMethodInvocation(arguments=[MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=eIsSet, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[eIsSet] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] { Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] { Keyword[case] identifier[BpsimPackage] operator[SEP] identifier[RESOURCE_PARAMETERS__SELECTION] operator[:] Keyword[return] identifier[selection] operator[!=] Other[null] operator[SEP] Keyword[case] identifier[BpsimPackage] operator[SEP] identifier[RESOURCE_PARAMETERS__AVAILABILITY] operator[:] Keyword[return] identifier[availability] operator[!=] Other[null] operator[SEP] Keyword[case] identifier[BpsimPackage] operator[SEP] identifier[RESOURCE_PARAMETERS__QUANTITY] operator[:] Keyword[return] identifier[quantity] operator[!=] Other[null] operator[SEP] Keyword[case] identifier[BpsimPackage] operator[SEP] identifier[RESOURCE_PARAMETERS__ROLE] operator[:] Keyword[return] identifier[role] operator[!=] Other[null] operator[&&] operator[!] identifier[role] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[super] operator[SEP] identifier[eIsSet] operator[SEP] identifier[featureID] operator[SEP] operator[SEP] }
public static Intent newIntent(Context context, String action, Uri data, ContentValues values) { return newIntent(context, action, data, values, null, null); }
class class_name[name] begin[{] method[newIntent, return_type[type[Intent]], modifier[public static], parameter[context, action, data, values]] begin[{] return[call[.newIntent, parameter[member[.context], member[.action], member[.data], member[.values], literal[null], literal[null]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Intent] identifier[newIntent] operator[SEP] identifier[Context] identifier[context] , identifier[String] identifier[action] , identifier[Uri] identifier[data] , identifier[ContentValues] identifier[values] operator[SEP] { Keyword[return] identifier[newIntent] operator[SEP] identifier[context] , identifier[action] , identifier[data] , identifier[values] , Other[null] , Other[null] operator[SEP] operator[SEP] }
public AddressingType<PortComponentRefType<T>> getOrCreateAddressing() { Node node = childNode.getOrCreate("addressing"); AddressingType<PortComponentRefType<T>> addressing = new AddressingTypeImpl<PortComponentRefType<T>>(this, "addressing", childNode, node); return addressing; }
class class_name[name] begin[{] method[getOrCreateAddressing, return_type[type[AddressingType]], modifier[public], parameter[]] begin[{] local_variable[type[Node], node] local_variable[type[AddressingType], addressing] return[member[.addressing]] end[}] END[}]
Keyword[public] identifier[AddressingType] operator[<] identifier[PortComponentRefType] operator[<] identifier[T] operator[>] operator[>] identifier[getOrCreateAddressing] operator[SEP] operator[SEP] { identifier[Node] identifier[node] operator[=] identifier[childNode] operator[SEP] identifier[getOrCreate] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[AddressingType] operator[<] identifier[PortComponentRefType] operator[<] identifier[T] operator[>] operator[>] identifier[addressing] operator[=] Keyword[new] identifier[AddressingTypeImpl] operator[<] identifier[PortComponentRefType] operator[<] identifier[T] operator[>] operator[>] operator[SEP] Keyword[this] , literal[String] , identifier[childNode] , identifier[node] operator[SEP] operator[SEP] Keyword[return] identifier[addressing] operator[SEP] }
public boolean deleteExisting(final File file) { if (!file.exists()) { return true; } boolean deleted = false; if (file.canWrite()) { deleted = file.delete(); } else { LogLog.debug(file + " is not writeable for delete (retrying)"); } if (!deleted) { if (!file.exists()) { deleted = true; } else { file.delete(); deleted = (!file.exists()); } } return deleted; }
class class_name[name] begin[{] method[deleteExisting, return_type[type[boolean]], modifier[public], parameter[file]] begin[{] if[call[file.exists, parameter[]]] begin[{] return[literal[true]] else begin[{] None end[}] local_variable[type[boolean], deleted] if[call[file.canWrite, parameter[]]] begin[{] assign[member[.deleted], call[file.delete, parameter[]]] else begin[{] call[LogLog.debug, parameter[binary_operation[member[.file], +, literal[" is not writeable for delete (retrying)"]]]] end[}] if[member[.deleted]] begin[{] if[call[file.exists, parameter[]]] begin[{] assign[member[.deleted], literal[true]] else begin[{] call[file.delete, parameter[]] assign[member[.deleted], call[file.exists, parameter[]]] end[}] else begin[{] None end[}] return[member[.deleted]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[deleteExisting] operator[SEP] Keyword[final] identifier[File] identifier[file] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[file] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[boolean] identifier[deleted] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[file] operator[SEP] identifier[canWrite] operator[SEP] operator[SEP] operator[SEP] { identifier[deleted] operator[=] identifier[file] operator[SEP] identifier[delete] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[LogLog] operator[SEP] identifier[debug] operator[SEP] identifier[file] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[deleted] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[file] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { identifier[deleted] operator[=] literal[boolean] operator[SEP] } Keyword[else] { identifier[file] operator[SEP] identifier[delete] operator[SEP] operator[SEP] operator[SEP] identifier[deleted] operator[=] operator[SEP] operator[!] identifier[file] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[deleted] operator[SEP] }
public static Class<?> classFromAsmType(Type type) { Optional<Class<?>> maybeClass = objectTypeToClassCache.getUnchecked(type); if (!maybeClass.isPresent()) { throw new IllegalArgumentException("Could not load: " + type); } return maybeClass.get(); }
class class_name[name] begin[{] method[classFromAsmType, return_type[type[Class]], modifier[public static], parameter[type]] begin[{] local_variable[type[Optional], maybeClass] if[call[maybeClass.isPresent, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not load: "), operandr=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] return[call[maybeClass.get, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Class] operator[<] operator[?] operator[>] identifier[classFromAsmType] operator[SEP] identifier[Type] identifier[type] operator[SEP] { identifier[Optional] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[maybeClass] operator[=] identifier[objectTypeToClassCache] operator[SEP] identifier[getUnchecked] operator[SEP] identifier[type] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[maybeClass] operator[SEP] identifier[isPresent] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[type] operator[SEP] operator[SEP] } Keyword[return] identifier[maybeClass] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] }
public void printScreen(PrintWriter out, ResourceBundle reg) throws DBException { String strParamHelp = this.getProperty(DBParams.HELP); // Display record if (strParamHelp != null) return; // Don't do this for help screens this.printHtmlStartForm(out); int iHtmlOptions = this.getScreenField().getPrintOptions(); if ((iHtmlOptions & HtmlConstants.PRINT_TOOLBAR_BEFORE) != 0) this.printZmlToolbarData(out, iHtmlOptions); if ((iHtmlOptions & HtmlConstants.DONT_PRINT_SCREEN) == 0) this.getScreenField().printData(out, iHtmlOptions); // DO print screen if ((iHtmlOptions & HtmlConstants.PRINT_TOOLBAR_AFTER) != 0) this.printZmlToolbarData(out, iHtmlOptions); this.printHtmlEndForm(out); }
class class_name[name] begin[{] method[printScreen, return_type[void], modifier[public], parameter[out, reg]] begin[{] local_variable[type[String], strParamHelp] if[binary_operation[member[.strParamHelp], !=, literal[null]]] begin[{] return[None] else begin[{] None end[}] THIS[call[None.printHtmlStartForm, parameter[member[.out]]]] local_variable[type[int], iHtmlOptions] if[binary_operation[binary_operation[member[.iHtmlOptions], &, member[HtmlConstants.PRINT_TOOLBAR_BEFORE]], !=, literal[0]]] begin[{] THIS[call[None.printZmlToolbarData, parameter[member[.out], member[.iHtmlOptions]]]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.iHtmlOptions], &, member[HtmlConstants.DONT_PRINT_SCREEN]], ==, literal[0]]] begin[{] THIS[call[None.getScreenField, parameter[]]call[None.printData, parameter[member[.out], member[.iHtmlOptions]]]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.iHtmlOptions], &, member[HtmlConstants.PRINT_TOOLBAR_AFTER]], !=, literal[0]]] begin[{] THIS[call[None.printZmlToolbarData, parameter[member[.out], member[.iHtmlOptions]]]] else begin[{] None end[}] THIS[call[None.printHtmlEndForm, parameter[member[.out]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[printScreen] operator[SEP] identifier[PrintWriter] identifier[out] , identifier[ResourceBundle] identifier[reg] operator[SEP] Keyword[throws] identifier[DBException] { identifier[String] identifier[strParamHelp] operator[=] Keyword[this] operator[SEP] identifier[getProperty] operator[SEP] identifier[DBParams] operator[SEP] identifier[HELP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[strParamHelp] operator[!=] Other[null] operator[SEP] Keyword[return] operator[SEP] Keyword[this] operator[SEP] identifier[printHtmlStartForm] operator[SEP] identifier[out] operator[SEP] operator[SEP] Keyword[int] identifier[iHtmlOptions] operator[=] Keyword[this] operator[SEP] identifier[getScreenField] operator[SEP] operator[SEP] operator[SEP] identifier[getPrintOptions] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[iHtmlOptions] operator[&] identifier[HtmlConstants] operator[SEP] identifier[PRINT_TOOLBAR_BEFORE] operator[SEP] operator[!=] Other[0] operator[SEP] Keyword[this] operator[SEP] identifier[printZmlToolbarData] operator[SEP] identifier[out] , identifier[iHtmlOptions] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[iHtmlOptions] operator[&] identifier[HtmlConstants] operator[SEP] identifier[DONT_PRINT_SCREEN] operator[SEP] operator[==] Other[0] operator[SEP] Keyword[this] operator[SEP] identifier[getScreenField] operator[SEP] operator[SEP] operator[SEP] identifier[printData] operator[SEP] identifier[out] , identifier[iHtmlOptions] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[iHtmlOptions] operator[&] identifier[HtmlConstants] operator[SEP] identifier[PRINT_TOOLBAR_AFTER] operator[SEP] operator[!=] Other[0] operator[SEP] Keyword[this] operator[SEP] identifier[printZmlToolbarData] operator[SEP] identifier[out] , identifier[iHtmlOptions] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[printHtmlEndForm] operator[SEP] identifier[out] operator[SEP] operator[SEP] }
public void init(FilterConfig filterConfig) throws ServletException { logger.info("Starting Bootleg on the Servlet [" + filterConfig.getServletContext().getMajorVersion() + "." + filterConfig.getServletContext().getMinorVersion() + "] environment"); Configuration configuration = configuration(filterConfig); if (configuration == null) { configuration = new DefaultConfiguration(); configuration.init(filterConfig.getServletContext()); logger.info("Default configuration [" + DefaultConfiguration.class + "] loaded"); } Pipeline<WebContext> pipeline = configuration.pipeline(); if (pipeline == null) { throw new ServletException("Pipeline must not be [" + pipeline + "]: Configuration [" + configuration + "]"); } else { logger.debug("HTTP request processing pipeline " + pipeline + " constructed"); } this.configuration = configuration; this.pipeline = pipeline; }
class class_name[name] begin[{] method[init, return_type[void], modifier[public], parameter[filterConfig]] begin[{] call[logger.info, parameter[binary_operation[binary_operation[binary_operation[binary_operation[literal["Starting Bootleg on the Servlet ["], +, call[filterConfig.getServletContext, parameter[]]], +, literal["."]], +, call[filterConfig.getServletContext, parameter[]]], +, literal["] environment"]]]] local_variable[type[Configuration], configuration] if[binary_operation[member[.configuration], ==, literal[null]]] begin[{] assign[member[.configuration], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DefaultConfiguration, sub_type=None))] call[configuration.init, parameter[call[filterConfig.getServletContext, parameter[]]]] call[logger.info, parameter[binary_operation[binary_operation[literal["Default configuration ["], +, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DefaultConfiguration, sub_type=None))], +, literal["] loaded"]]]] else begin[{] None end[}] local_variable[type[Pipeline], pipeline] if[binary_operation[member[.pipeline], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Pipeline must not be ["), operandr=MemberReference(member=pipeline, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="]: Configuration ["), operator=+), operandr=MemberReference(member=configuration, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="]"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServletException, sub_type=None)), label=None) else begin[{] call[logger.debug, parameter[binary_operation[binary_operation[literal["HTTP request processing pipeline "], +, member[.pipeline]], +, literal[" constructed"]]]] end[}] assign[THIS[member[None.configuration]], member[.configuration]] assign[THIS[member[None.pipeline]], member[.pipeline]] end[}] END[}]
Keyword[public] Keyword[void] identifier[init] operator[SEP] identifier[FilterConfig] identifier[filterConfig] operator[SEP] Keyword[throws] identifier[ServletException] { identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[filterConfig] operator[SEP] identifier[getServletContext] operator[SEP] operator[SEP] operator[SEP] identifier[getMajorVersion] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[filterConfig] operator[SEP] identifier[getServletContext] operator[SEP] operator[SEP] operator[SEP] identifier[getMinorVersion] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[Configuration] identifier[configuration] operator[=] identifier[configuration] operator[SEP] identifier[filterConfig] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[configuration] operator[==] Other[null] operator[SEP] { identifier[configuration] operator[=] Keyword[new] identifier[DefaultConfiguration] operator[SEP] operator[SEP] operator[SEP] identifier[configuration] operator[SEP] identifier[init] operator[SEP] identifier[filterConfig] operator[SEP] identifier[getServletContext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[DefaultConfiguration] operator[SEP] Keyword[class] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[Pipeline] operator[<] identifier[WebContext] operator[>] identifier[pipeline] operator[=] identifier[configuration] operator[SEP] identifier[pipeline] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pipeline] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[ServletException] operator[SEP] literal[String] operator[+] identifier[pipeline] operator[+] literal[String] operator[+] identifier[configuration] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[pipeline] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[configuration] operator[=] identifier[configuration] operator[SEP] Keyword[this] operator[SEP] identifier[pipeline] operator[=] identifier[pipeline] operator[SEP] }
public Map<String, Integer> countByStatusAndMainComponentUuids(DbSession dbSession, CeQueueDto.Status status, Set<String> projectUuids) { if (projectUuids.isEmpty()) { return emptyMap(); } ImmutableMap.Builder<String, Integer> builder = ImmutableMap.builder(); executeLargeUpdates( projectUuids, partitionOfProjectUuids -> { List<QueueCount> i = mapper(dbSession).countByStatusAndMainComponentUuids(status, partitionOfProjectUuids); i.forEach(o -> builder.put(o.getMainComponentUuid(), o.getTotal())); }); return builder.build(); }
class class_name[name] begin[{] method[countByStatusAndMainComponentUuids, return_type[type[Map]], modifier[public], parameter[dbSession, status, projectUuids]] begin[{] if[call[projectUuids.isEmpty, parameter[]]] begin[{] return[call[.emptyMap, parameter[]]] else begin[{] None end[}] local_variable[type[ImmutableMap], builder] call[.executeLargeUpdates, parameter[member[.projectUuids], LambdaExpression(body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=dbSession, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=mapper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=status, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=partitionOfProjectUuids, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=countByStatusAndMainComponentUuids, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=i)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=QueueCount, sub_type=None))], dimensions=[], name=List, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[LambdaExpression(body=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMainComponentUuid, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getTotal, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), parameters=[MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])], member=forEach, postfix_operators=[], prefix_operators=[], qualifier=i, selectors=[], type_arguments=None), label=None)], parameters=[MemberReference(member=partitionOfProjectUuids, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]] return[call[builder.build, parameter[]]] end[}] END[}]
Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Integer] operator[>] identifier[countByStatusAndMainComponentUuids] operator[SEP] identifier[DbSession] identifier[dbSession] , identifier[CeQueueDto] operator[SEP] identifier[Status] identifier[status] , identifier[Set] operator[<] identifier[String] operator[>] identifier[projectUuids] operator[SEP] { Keyword[if] operator[SEP] identifier[projectUuids] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[emptyMap] operator[SEP] operator[SEP] operator[SEP] } identifier[ImmutableMap] operator[SEP] identifier[Builder] operator[<] identifier[String] , identifier[Integer] operator[>] identifier[builder] operator[=] identifier[ImmutableMap] operator[SEP] identifier[builder] operator[SEP] operator[SEP] operator[SEP] identifier[executeLargeUpdates] operator[SEP] identifier[projectUuids] , identifier[partitionOfProjectUuids] operator[->] { identifier[List] operator[<] identifier[QueueCount] operator[>] identifier[i] operator[=] identifier[mapper] operator[SEP] identifier[dbSession] operator[SEP] operator[SEP] identifier[countByStatusAndMainComponentUuids] operator[SEP] identifier[status] , identifier[partitionOfProjectUuids] operator[SEP] operator[SEP] identifier[i] operator[SEP] identifier[forEach] operator[SEP] identifier[o] operator[->] identifier[builder] operator[SEP] identifier[put] operator[SEP] identifier[o] operator[SEP] identifier[getMainComponentUuid] operator[SEP] operator[SEP] , identifier[o] operator[SEP] identifier[getTotal] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] Keyword[return] identifier[builder] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] }
public void deleteGroup(CmsUUID groupId, CmsUUID replacementId) throws CmsException { m_securityManager.deleteGroup(m_context, groupId, replacementId); }
class class_name[name] begin[{] method[deleteGroup, return_type[void], modifier[public], parameter[groupId, replacementId]] begin[{] call[m_securityManager.deleteGroup, parameter[member[.m_context], member[.groupId], member[.replacementId]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[deleteGroup] operator[SEP] identifier[CmsUUID] identifier[groupId] , identifier[CmsUUID] identifier[replacementId] operator[SEP] Keyword[throws] identifier[CmsException] { identifier[m_securityManager] operator[SEP] identifier[deleteGroup] operator[SEP] identifier[m_context] , identifier[groupId] , identifier[replacementId] operator[SEP] operator[SEP] }
public void marshall(InviteMembersRequest inviteMembersRequest, ProtocolMarshaller protocolMarshaller) { if (inviteMembersRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(inviteMembersRequest.getAccountIds(), ACCOUNTIDS_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[inviteMembersRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.inviteMembersRequest], ==, 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=getAccountIds, postfix_operators=[], prefix_operators=[], qualifier=inviteMembersRequest, selectors=[], type_arguments=None), MemberReference(member=ACCOUNTIDS_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[InviteMembersRequest] identifier[inviteMembersRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[inviteMembersRequest] 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[inviteMembersRequest] operator[SEP] identifier[getAccountIds] operator[SEP] operator[SEP] , identifier[ACCOUNTIDS_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 Category compareMatches(Category setting, Category group, Category category, int settingMatch, int groupMatch, int categoryMatch) { LOGGER.trace(String.format("compareMatches: settingMatch: %s, groupMatch: %s, " + "categoryMatch: %s", settingMatch, groupMatch, categoryMatch)); if (settingMatch == 0 && groupMatch == 0 && categoryMatch == 0) { // if all values are 0 return null; // if all values are equal to each other } else if (settingMatch == groupMatch && settingMatch == categoryMatch) { return setting; } else if (settingMatch == 1) { return setting; } else if (groupMatch == 1) { return group; } else if (categoryMatch == 1) { return category; } else if (settingMatch != 0 && groupMatch == 0 && categoryMatch == 0) { return setting; } else if (settingMatch == 0 && groupMatch != 0 && categoryMatch == 0) { return group; } else if (settingMatch == 0 && groupMatch == 0 && categoryMatch != 0) { return category; } else if (settingMatch == 0) { // can only be categoryMatch, if it's smaller than groupMatch if (categoryMatch < groupMatch) { return category; } else { // from here it can only be groupMatch if settingMatch is 0 return group; } } else if (groupMatch == 0) { // can only be settingMatch, if it's smaller or equal to categoryMatch if (settingMatch <= categoryMatch) { return setting; } else { // from here it can only be categoryMatch return category; } } else if (categoryMatch == 0) { if (groupMatch < settingMatch) { // can only be groupMatch, if it's smaller than settingMatch return group; } else { // from here it can only be settingMatch return setting; } // from here, no more 0 or 1 values are present => comparisons can be made safely! } else if (settingMatch <= groupMatch && settingMatch <= categoryMatch) { return setting; } else if (groupMatch <= categoryMatch) { return group; } return category; }
class class_name[name] begin[{] method[compareMatches, return_type[type[Category]], modifier[public], parameter[setting, group, category, settingMatch, groupMatch, categoryMatch]] begin[{] call[LOGGER.trace, parameter[call[String.format, parameter[binary_operation[literal["compareMatches: settingMatch: %s, groupMatch: %s, "], +, literal["categoryMatch: %s"]], member[.settingMatch], member[.groupMatch], member[.categoryMatch]]]]] if[binary_operation[binary_operation[binary_operation[member[.settingMatch], ==, literal[0]], &&, binary_operation[member[.groupMatch], ==, literal[0]]], &&, binary_operation[member[.categoryMatch], ==, literal[0]]]] begin[{] return[literal[null]] else begin[{] if[binary_operation[binary_operation[member[.settingMatch], ==, member[.groupMatch]], &&, binary_operation[member[.settingMatch], ==, member[.categoryMatch]]]] begin[{] return[member[.setting]] else begin[{] if[binary_operation[member[.settingMatch], ==, literal[1]]] begin[{] return[member[.setting]] else begin[{] if[binary_operation[member[.groupMatch], ==, literal[1]]] begin[{] return[member[.group]] else begin[{] if[binary_operation[member[.categoryMatch], ==, literal[1]]] begin[{] return[member[.category]] else begin[{] if[binary_operation[binary_operation[binary_operation[member[.settingMatch], !=, literal[0]], &&, binary_operation[member[.groupMatch], ==, literal[0]]], &&, binary_operation[member[.categoryMatch], ==, literal[0]]]] begin[{] return[member[.setting]] else begin[{] if[binary_operation[binary_operation[binary_operation[member[.settingMatch], ==, literal[0]], &&, binary_operation[member[.groupMatch], !=, literal[0]]], &&, binary_operation[member[.categoryMatch], ==, literal[0]]]] begin[{] return[member[.group]] else begin[{] if[binary_operation[binary_operation[binary_operation[member[.settingMatch], ==, literal[0]], &&, binary_operation[member[.groupMatch], ==, literal[0]]], &&, binary_operation[member[.categoryMatch], !=, literal[0]]]] begin[{] return[member[.category]] else begin[{] if[binary_operation[member[.settingMatch], ==, literal[0]]] begin[{] if[binary_operation[member[.categoryMatch], <, member[.groupMatch]]] begin[{] return[member[.category]] else begin[{] return[member[.group]] end[}] else begin[{] if[binary_operation[member[.groupMatch], ==, literal[0]]] begin[{] if[binary_operation[member[.settingMatch], <=, member[.categoryMatch]]] begin[{] return[member[.setting]] else begin[{] return[member[.category]] end[}] else begin[{] if[binary_operation[member[.categoryMatch], ==, literal[0]]] begin[{] if[binary_operation[member[.groupMatch], <, member[.settingMatch]]] begin[{] return[member[.group]] else begin[{] return[member[.setting]] end[}] else begin[{] if[binary_operation[binary_operation[member[.settingMatch], <=, member[.groupMatch]], &&, binary_operation[member[.settingMatch], <=, member[.categoryMatch]]]] begin[{] return[member[.setting]] else begin[{] if[binary_operation[member[.groupMatch], <=, member[.categoryMatch]]] begin[{] return[member[.group]] else begin[{] None end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] return[member[.category]] end[}] END[}]
Keyword[public] identifier[Category] identifier[compareMatches] operator[SEP] identifier[Category] identifier[setting] , identifier[Category] identifier[group] , identifier[Category] identifier[category] , Keyword[int] identifier[settingMatch] , Keyword[int] identifier[groupMatch] , Keyword[int] identifier[categoryMatch] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[trace] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] operator[+] literal[String] , identifier[settingMatch] , identifier[groupMatch] , identifier[categoryMatch] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[settingMatch] operator[==] Other[0] operator[&&] identifier[groupMatch] operator[==] Other[0] operator[&&] identifier[categoryMatch] operator[==] Other[0] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[settingMatch] operator[==] identifier[groupMatch] operator[&&] identifier[settingMatch] operator[==] identifier[categoryMatch] operator[SEP] { Keyword[return] identifier[setting] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[settingMatch] operator[==] Other[1] operator[SEP] { Keyword[return] identifier[setting] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[groupMatch] operator[==] Other[1] operator[SEP] { Keyword[return] identifier[group] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[categoryMatch] operator[==] Other[1] operator[SEP] { Keyword[return] identifier[category] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[settingMatch] operator[!=] Other[0] operator[&&] identifier[groupMatch] operator[==] Other[0] operator[&&] identifier[categoryMatch] operator[==] Other[0] operator[SEP] { Keyword[return] identifier[setting] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[settingMatch] operator[==] Other[0] operator[&&] identifier[groupMatch] operator[!=] Other[0] operator[&&] identifier[categoryMatch] operator[==] Other[0] operator[SEP] { Keyword[return] identifier[group] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[settingMatch] operator[==] Other[0] operator[&&] identifier[groupMatch] operator[==] Other[0] operator[&&] identifier[categoryMatch] operator[!=] Other[0] operator[SEP] { Keyword[return] identifier[category] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[settingMatch] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[categoryMatch] operator[<] identifier[groupMatch] operator[SEP] { Keyword[return] identifier[category] operator[SEP] } Keyword[else] { Keyword[return] identifier[group] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[groupMatch] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[settingMatch] operator[<=] identifier[categoryMatch] operator[SEP] { Keyword[return] identifier[setting] operator[SEP] } Keyword[else] { Keyword[return] identifier[category] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[categoryMatch] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[groupMatch] operator[<] identifier[settingMatch] operator[SEP] { Keyword[return] identifier[group] operator[SEP] } Keyword[else] { Keyword[return] identifier[setting] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[settingMatch] operator[<=] identifier[groupMatch] operator[&&] identifier[settingMatch] operator[<=] identifier[categoryMatch] operator[SEP] { Keyword[return] identifier[setting] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[groupMatch] operator[<=] identifier[categoryMatch] operator[SEP] { Keyword[return] identifier[group] operator[SEP] } Keyword[return] identifier[category] operator[SEP] }
static JSONObject addSource(JSONObject params) { if (params == null) { params = new JSONObject(); } try { params.put("source", "android"); } catch (JSONException e) { e.printStackTrace(); } return params; }
class class_name[name] begin[{] method[addSource, return_type[type[JSONObject]], modifier[static], parameter[params]] begin[{] if[binary_operation[member[.params], ==, literal[null]]] begin[{] assign[member[.params], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JSONObject, sub_type=None))] else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="source"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="android")], member=put, postfix_operators=[], prefix_operators=[], qualifier=params, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['JSONException']))], finally_block=None, label=None, resources=None) return[member[.params]] end[}] END[}]
Keyword[static] identifier[JSONObject] identifier[addSource] operator[SEP] identifier[JSONObject] identifier[params] operator[SEP] { Keyword[if] operator[SEP] identifier[params] operator[==] Other[null] operator[SEP] { identifier[params] operator[=] Keyword[new] identifier[JSONObject] operator[SEP] operator[SEP] operator[SEP] } Keyword[try] { identifier[params] operator[SEP] identifier[put] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[JSONException] identifier[e] operator[SEP] { identifier[e] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[params] operator[SEP] }
@Override public void addTargetORBInitProperties(Properties initProperties, Map<String, Object> configProps, List<IIOPEndpoint> endpoints, Map<String, Object> extraProperties) { StringBuilder sb = new StringBuilder(); Map<String, List<TransportAddress>> addrMap = extractTransportAddresses(configProps, endpoints, sb); extraProperties.put(ADDR_KEY, addrMap); sb.setLength(sb.length() - 1); initProperties.put(ENDPOINT_KEY, sb.toString()); }
class class_name[name] begin[{] method[addTargetORBInitProperties, return_type[void], modifier[public], parameter[initProperties, configProps, endpoints, extraProperties]] begin[{] local_variable[type[StringBuilder], sb] local_variable[type[Map], addrMap] call[extraProperties.put, parameter[member[.ADDR_KEY], member[.addrMap]]] call[sb.setLength, parameter[binary_operation[call[sb.length, parameter[]], -, literal[1]]]] call[initProperties.put, parameter[member[.ENDPOINT_KEY], call[sb.toString, parameter[]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[addTargetORBInitProperties] operator[SEP] identifier[Properties] identifier[initProperties] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[configProps] , identifier[List] operator[<] identifier[IIOPEndpoint] operator[>] identifier[endpoints] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[extraProperties] operator[SEP] { identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[TransportAddress] operator[>] operator[>] identifier[addrMap] operator[=] identifier[extractTransportAddresses] operator[SEP] identifier[configProps] , identifier[endpoints] , identifier[sb] operator[SEP] operator[SEP] identifier[extraProperties] operator[SEP] identifier[put] operator[SEP] identifier[ADDR_KEY] , identifier[addrMap] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[setLength] operator[SEP] identifier[sb] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] identifier[initProperties] operator[SEP] identifier[put] operator[SEP] identifier[ENDPOINT_KEY] , identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public boolean isSignaturePolymorphic(MethodSymbol msym) { List<Type> argtypes = msym.type.getParameterTypes(); return (msym.flags_field & NATIVE) != 0 && (msym.owner == syms.methodHandleType.tsym || msym.owner == syms.varHandleType.tsym) && argtypes.length() == 1 && argtypes.head.hasTag(TypeTag.ARRAY) && ((ArrayType)argtypes.head).elemtype.tsym == syms.objectType.tsym; }
class class_name[name] begin[{] method[isSignaturePolymorphic, return_type[type[boolean]], modifier[public], parameter[msym]] begin[{] local_variable[type[List], argtypes] return[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[member[msym.flags_field], &, member[.NATIVE]], !=, literal[0]], &&, binary_operation[binary_operation[member[msym.owner], ==, member[syms.methodHandleType.tsym]], ||, binary_operation[member[msym.owner], ==, member[syms.varHandleType.tsym]]]], &&, binary_operation[call[argtypes.length, parameter[]], ==, literal[1]]], &&, call[argtypes.head.hasTag, parameter[member[TypeTag.ARRAY]]]], &&, binary_operation[Cast(expression=MemberReference(member=head, postfix_operators=[], prefix_operators=[], qualifier=argtypes, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ArrayType, sub_type=None)), ==, member[syms.objectType.tsym]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[isSignaturePolymorphic] operator[SEP] identifier[MethodSymbol] identifier[msym] operator[SEP] { identifier[List] operator[<] identifier[Type] operator[>] identifier[argtypes] operator[=] identifier[msym] operator[SEP] identifier[type] operator[SEP] identifier[getParameterTypes] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[msym] operator[SEP] identifier[flags_field] operator[&] identifier[NATIVE] operator[SEP] operator[!=] Other[0] operator[&&] operator[SEP] identifier[msym] operator[SEP] identifier[owner] operator[==] identifier[syms] operator[SEP] identifier[methodHandleType] operator[SEP] identifier[tsym] operator[||] identifier[msym] operator[SEP] identifier[owner] operator[==] identifier[syms] operator[SEP] identifier[varHandleType] operator[SEP] identifier[tsym] operator[SEP] operator[&&] identifier[argtypes] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[1] operator[&&] identifier[argtypes] operator[SEP] identifier[head] operator[SEP] identifier[hasTag] operator[SEP] identifier[TypeTag] operator[SEP] identifier[ARRAY] operator[SEP] operator[&&] operator[SEP] operator[SEP] identifier[ArrayType] operator[SEP] identifier[argtypes] operator[SEP] identifier[head] operator[SEP] operator[SEP] identifier[elemtype] operator[SEP] identifier[tsym] operator[==] identifier[syms] operator[SEP] identifier[objectType] operator[SEP] identifier[tsym] operator[SEP] }
public static Object copy(Object orig) throws NotSerializableException { Object obj = null; try { // Write the object out to a byte array ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutputStream out = new ObjectOutputStream(bos); out.writeObject(orig); out.flush(); out.close(); // Make an input stream from the byte array and read // a copy of the object back in. ObjectInputStream in = new ObjectInputStream( new ByteArrayInputStream(bos.toByteArray())); obj = in.readObject(); } catch (NotSerializableException e) { throw e; } catch (IOException e) { e.printStackTrace(); } catch (ClassNotFoundException cnfe) { cnfe.printStackTrace(); } return obj; }
class class_name[name] begin[{] method[copy, return_type[type[Object]], modifier[public static], parameter[orig]] begin[{] local_variable[type[Object], obj] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ByteArrayOutputStream, sub_type=None)), name=bos)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ByteArrayOutputStream, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=bos, 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=ObjectOutputStream, sub_type=None)), name=out)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ObjectOutputStream, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=orig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeObject, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=flush, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=toByteArray, postfix_operators=[], prefix_operators=[], qualifier=bos, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ByteArrayInputStream, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ObjectInputStream, sub_type=None)), name=in)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ObjectInputStream, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=readObject, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['NotSerializableException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=cnfe, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=cnfe, types=['ClassNotFoundException']))], finally_block=None, label=None, resources=None) return[member[.obj]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Object] identifier[copy] operator[SEP] identifier[Object] identifier[orig] operator[SEP] Keyword[throws] identifier[NotSerializableException] { identifier[Object] identifier[obj] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[ByteArrayOutputStream] identifier[bos] operator[=] Keyword[new] identifier[ByteArrayOutputStream] operator[SEP] operator[SEP] operator[SEP] identifier[ObjectOutputStream] identifier[out] operator[=] Keyword[new] identifier[ObjectOutputStream] operator[SEP] identifier[bos] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[writeObject] operator[SEP] identifier[orig] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[ObjectInputStream] identifier[in] operator[=] Keyword[new] identifier[ObjectInputStream] operator[SEP] Keyword[new] identifier[ByteArrayInputStream] operator[SEP] identifier[bos] operator[SEP] identifier[toByteArray] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[=] identifier[in] operator[SEP] identifier[readObject] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NotSerializableException] identifier[e] operator[SEP] { Keyword[throw] identifier[e] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[e] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ClassNotFoundException] identifier[cnfe] operator[SEP] { identifier[cnfe] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[obj] operator[SEP] }
@Override public DeleteVaultNotificationsResult deleteVaultNotifications(DeleteVaultNotificationsRequest request) { request = beforeClientExecution(request); return executeDeleteVaultNotifications(request); }
class class_name[name] begin[{] method[deleteVaultNotifications, return_type[type[DeleteVaultNotificationsResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeDeleteVaultNotifications, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[DeleteVaultNotificationsResult] identifier[deleteVaultNotifications] operator[SEP] identifier[DeleteVaultNotificationsRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeDeleteVaultNotifications] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public static void prefixKeyWithSalt(final byte[] row_key) { if (Const.SALT_WIDTH() > 0) { if (row_key.length < (Const.SALT_WIDTH() + TSDB.metrics_width()) || (Bytes.memcmp(row_key, new byte[Const.SALT_WIDTH() + TSDB.metrics_width()], Const.SALT_WIDTH(), TSDB.metrics_width()) == 0)) { // ^ Don't salt the global annotation row, leave it at zero return; } final int tags_start = Const.SALT_WIDTH() + TSDB.metrics_width() + Const.TIMESTAMP_BYTES; // we want the metric and tags, not the timestamp final byte[] salt_base = new byte[row_key.length - Const.SALT_WIDTH() - Const.TIMESTAMP_BYTES]; System.arraycopy(row_key, Const.SALT_WIDTH(), salt_base, 0, TSDB.metrics_width()); System.arraycopy(row_key, tags_start,salt_base, TSDB.metrics_width(), row_key.length - tags_start); int modulo = Arrays.hashCode(salt_base) % Const.SALT_BUCKETS(); if (modulo < 0) { // make sure we return a positive salt. modulo = modulo * -1; } final byte[] salt = getSaltBytes(modulo); System.arraycopy(salt, 0, row_key, 0, Const.SALT_WIDTH()); } // else salting is disabled so it's a no-op }
class class_name[name] begin[{] method[prefixKeyWithSalt, return_type[void], modifier[public static], parameter[row_key]] begin[{] if[binary_operation[call[Const.SALT_WIDTH, parameter[]], >, literal[0]]] begin[{] if[binary_operation[binary_operation[member[row_key.length], <, binary_operation[call[Const.SALT_WIDTH, parameter[]], +, call[TSDB.metrics_width, parameter[]]]], ||, binary_operation[call[Bytes.memcmp, parameter[member[.row_key], ArrayCreator(dimensions=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=SALT_WIDTH, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=metrics_width, postfix_operators=[], prefix_operators=[], qualifier=TSDB, selectors=[], type_arguments=None), operator=+)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte)), call[Const.SALT_WIDTH, parameter[]], call[TSDB.metrics_width, parameter[]]]], ==, literal[0]]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[int], tags_start] local_variable[type[byte], salt_base] call[System.arraycopy, parameter[member[.row_key], call[Const.SALT_WIDTH, parameter[]], member[.salt_base], literal[0], call[TSDB.metrics_width, parameter[]]]] call[System.arraycopy, parameter[member[.row_key], member[.tags_start], member[.salt_base], call[TSDB.metrics_width, parameter[]], binary_operation[member[row_key.length], -, member[.tags_start]]]] local_variable[type[int], modulo] if[binary_operation[member[.modulo], <, literal[0]]] begin[{] assign[member[.modulo], binary_operation[member[.modulo], *, literal[1]]] else begin[{] None end[}] local_variable[type[byte], salt] call[System.arraycopy, parameter[member[.salt], literal[0], member[.row_key], literal[0], call[Const.SALT_WIDTH, parameter[]]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[prefixKeyWithSalt] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[row_key] operator[SEP] { Keyword[if] operator[SEP] identifier[Const] operator[SEP] identifier[SALT_WIDTH] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[row_key] operator[SEP] identifier[length] operator[<] operator[SEP] identifier[Const] operator[SEP] identifier[SALT_WIDTH] operator[SEP] operator[SEP] operator[+] identifier[TSDB] operator[SEP] identifier[metrics_width] operator[SEP] operator[SEP] operator[SEP] operator[||] operator[SEP] identifier[Bytes] operator[SEP] identifier[memcmp] operator[SEP] identifier[row_key] , Keyword[new] Keyword[byte] operator[SEP] identifier[Const] operator[SEP] identifier[SALT_WIDTH] operator[SEP] operator[SEP] operator[+] identifier[TSDB] operator[SEP] identifier[metrics_width] operator[SEP] operator[SEP] operator[SEP] , identifier[Const] operator[SEP] identifier[SALT_WIDTH] operator[SEP] operator[SEP] , identifier[TSDB] operator[SEP] identifier[metrics_width] operator[SEP] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } Keyword[final] Keyword[int] identifier[tags_start] operator[=] identifier[Const] operator[SEP] identifier[SALT_WIDTH] operator[SEP] operator[SEP] operator[+] identifier[TSDB] operator[SEP] identifier[metrics_width] operator[SEP] operator[SEP] operator[+] identifier[Const] operator[SEP] identifier[TIMESTAMP_BYTES] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[salt_base] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[row_key] operator[SEP] identifier[length] operator[-] identifier[Const] operator[SEP] identifier[SALT_WIDTH] operator[SEP] operator[SEP] operator[-] identifier[Const] operator[SEP] identifier[TIMESTAMP_BYTES] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[row_key] , identifier[Const] operator[SEP] identifier[SALT_WIDTH] operator[SEP] operator[SEP] , identifier[salt_base] , Other[0] , identifier[TSDB] operator[SEP] identifier[metrics_width] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[row_key] , identifier[tags_start] , identifier[salt_base] , identifier[TSDB] operator[SEP] identifier[metrics_width] operator[SEP] operator[SEP] , identifier[row_key] operator[SEP] identifier[length] operator[-] identifier[tags_start] operator[SEP] operator[SEP] Keyword[int] identifier[modulo] operator[=] identifier[Arrays] operator[SEP] identifier[hashCode] operator[SEP] identifier[salt_base] operator[SEP] operator[%] identifier[Const] operator[SEP] identifier[SALT_BUCKETS] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[modulo] operator[<] Other[0] operator[SEP] { identifier[modulo] operator[=] identifier[modulo] operator[*] operator[-] Other[1] operator[SEP] } Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[salt] operator[=] identifier[getSaltBytes] operator[SEP] identifier[modulo] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[salt] , Other[0] , identifier[row_key] , Other[0] , identifier[Const] operator[SEP] identifier[SALT_WIDTH] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public static void open(@NonNull Context context, Config config, String activityName) { synchronized (Sift.class) { if (instance == null) { Context c = context.getApplicationContext(); instance = new SiftImpl(c, config, unboundUserId, hasUnboundUserId); devicePropertiesCollector = new DevicePropertiesCollector(instance, c); appStateCollector = new AppStateCollector(instance, c); unboundUserId = null; hasUnboundUserId = false; } else { if (config != null) { instance.setConfig(config); } } } appStateCollector.setActivityName(activityName == null ? context.getClass().getSimpleName() : activityName); }
class class_name[name] begin[{] method[open, return_type[void], modifier[public static], parameter[context, config, activityName]] begin[{] SYNCHRONIZED[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Sift, sub_type=None))] BEGIN[{] if[binary_operation[member[.instance], ==, literal[null]]] begin[{] local_variable[type[Context], c] assign[member[.instance], ClassCreator(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=config, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=unboundUserId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=hasUnboundUserId, 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=SiftImpl, sub_type=None))] assign[member[.devicePropertiesCollector], ClassCreator(arguments=[MemberReference(member=instance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=c, 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=DevicePropertiesCollector, sub_type=None))] assign[member[.appStateCollector], ClassCreator(arguments=[MemberReference(member=instance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=c, 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=AppStateCollector, sub_type=None))] assign[member[.unboundUserId], literal[null]] assign[member[.hasUnboundUserId], literal[false]] else begin[{] if[binary_operation[member[.config], !=, literal[null]]] begin[{] call[instance.setConfig, parameter[member[.config]]] else begin[{] None end[}] end[}] END[}] call[appStateCollector.setActivityName, parameter[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=activityName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MemberReference(member=activityName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=context, selectors=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None))]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[open] operator[SEP] annotation[@] identifier[NonNull] identifier[Context] identifier[context] , identifier[Config] identifier[config] , identifier[String] identifier[activityName] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[Sift] operator[SEP] Keyword[class] operator[SEP] { Keyword[if] operator[SEP] identifier[instance] operator[==] Other[null] operator[SEP] { identifier[Context] identifier[c] operator[=] identifier[context] operator[SEP] identifier[getApplicationContext] operator[SEP] operator[SEP] operator[SEP] identifier[instance] operator[=] Keyword[new] identifier[SiftImpl] operator[SEP] identifier[c] , identifier[config] , identifier[unboundUserId] , identifier[hasUnboundUserId] operator[SEP] operator[SEP] identifier[devicePropertiesCollector] operator[=] Keyword[new] identifier[DevicePropertiesCollector] operator[SEP] identifier[instance] , identifier[c] operator[SEP] operator[SEP] identifier[appStateCollector] operator[=] Keyword[new] identifier[AppStateCollector] operator[SEP] identifier[instance] , identifier[c] operator[SEP] operator[SEP] identifier[unboundUserId] operator[=] Other[null] operator[SEP] identifier[hasUnboundUserId] operator[=] literal[boolean] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[config] operator[!=] Other[null] operator[SEP] { identifier[instance] operator[SEP] identifier[setConfig] operator[SEP] identifier[config] operator[SEP] operator[SEP] } } } identifier[appStateCollector] operator[SEP] identifier[setActivityName] operator[SEP] identifier[activityName] operator[==] Other[null] operator[?] identifier[context] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[:] identifier[activityName] operator[SEP] operator[SEP] }
public DescribeAssessmentRunsResult withAssessmentRuns(AssessmentRun... assessmentRuns) { if (this.assessmentRuns == null) { setAssessmentRuns(new java.util.ArrayList<AssessmentRun>(assessmentRuns.length)); } for (AssessmentRun ele : assessmentRuns) { this.assessmentRuns.add(ele); } return this; }
class class_name[name] begin[{] method[withAssessmentRuns, return_type[type[DescribeAssessmentRunsResult]], modifier[public], parameter[assessmentRuns]] begin[{] if[binary_operation[THIS[member[None.assessmentRuns]], ==, literal[null]]] begin[{] call[.setAssessmentRuns, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=assessmentRuns, 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=AssessmentRun, 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=assessmentRuns, 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=assessmentRuns, 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=AssessmentRun, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[DescribeAssessmentRunsResult] identifier[withAssessmentRuns] operator[SEP] identifier[AssessmentRun] operator[...] identifier[assessmentRuns] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[assessmentRuns] operator[==] Other[null] operator[SEP] { identifier[setAssessmentRuns] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[AssessmentRun] operator[>] operator[SEP] identifier[assessmentRuns] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[AssessmentRun] identifier[ele] operator[:] identifier[assessmentRuns] operator[SEP] { Keyword[this] operator[SEP] identifier[assessmentRuns] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public void addIn(String attribute, Collection values) { List list = splitInCriteria(attribute, values, false, IN_LIMIT); int index = 0; InCriteria inCrit; Criteria allInCritaria; inCrit = (InCriteria) list.get(index); allInCritaria = new Criteria(inCrit); for (index = 1; index < list.size(); index++) { inCrit = (InCriteria) list.get(index); allInCritaria.addOrCriteria(new Criteria(inCrit)); } addAndCriteria(allInCritaria); }
class class_name[name] begin[{] method[addIn, return_type[void], modifier[public], parameter[attribute, values]] begin[{] local_variable[type[List], list] local_variable[type[int], index] local_variable[type[InCriteria], inCrit] local_variable[type[Criteria], allInCritaria] assign[member[.inCrit], Cast(expression=MethodInvocation(arguments=[MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=InCriteria, sub_type=None))] assign[member[.allInCritaria], ClassCreator(arguments=[MemberReference(member=inCrit, 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=Criteria, sub_type=None))] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=inCrit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=InCriteria, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=inCrit, 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=Criteria, sub_type=None))], member=addOrCriteria, postfix_operators=[], prefix_operators=[], qualifier=allInCritaria, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None), operator=<), init=[Assignment(expressionl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))], update=[MemberReference(member=index, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) call[.addAndCriteria, parameter[member[.allInCritaria]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addIn] operator[SEP] identifier[String] identifier[attribute] , identifier[Collection] identifier[values] operator[SEP] { identifier[List] identifier[list] operator[=] identifier[splitInCriteria] operator[SEP] identifier[attribute] , identifier[values] , literal[boolean] , identifier[IN_LIMIT] operator[SEP] operator[SEP] Keyword[int] identifier[index] operator[=] Other[0] operator[SEP] identifier[InCriteria] identifier[inCrit] operator[SEP] identifier[Criteria] identifier[allInCritaria] operator[SEP] identifier[inCrit] operator[=] operator[SEP] identifier[InCriteria] operator[SEP] identifier[list] operator[SEP] identifier[get] operator[SEP] identifier[index] operator[SEP] operator[SEP] identifier[allInCritaria] operator[=] Keyword[new] identifier[Criteria] operator[SEP] identifier[inCrit] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[index] operator[=] Other[1] operator[SEP] identifier[index] operator[<] identifier[list] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[index] operator[++] operator[SEP] { identifier[inCrit] operator[=] operator[SEP] identifier[InCriteria] operator[SEP] identifier[list] operator[SEP] identifier[get] operator[SEP] identifier[index] operator[SEP] operator[SEP] identifier[allInCritaria] operator[SEP] identifier[addOrCriteria] operator[SEP] Keyword[new] identifier[Criteria] operator[SEP] identifier[inCrit] operator[SEP] operator[SEP] operator[SEP] } identifier[addAndCriteria] operator[SEP] identifier[allInCritaria] operator[SEP] operator[SEP] }
public boolean noNamesBound() { final Node node = getNamesBoundNode(false); return node != null ? node.getChildrenNames().isEmpty() : true; }
class class_name[name] begin[{] method[noNamesBound, return_type[type[boolean]], modifier[public], parameter[]] begin[{] local_variable[type[Node], node] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=node, 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=true), if_true=MethodInvocation(arguments=[], member=getChildrenNames, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[MethodInvocation(arguments=[], member=isEmpty, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None))] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[noNamesBound] operator[SEP] operator[SEP] { Keyword[final] identifier[Node] identifier[node] operator[=] identifier[getNamesBoundNode] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[return] identifier[node] operator[!=] Other[null] operator[?] identifier[node] operator[SEP] identifier[getChildrenNames] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[:] literal[boolean] operator[SEP] }
public static boolean isWorkplaceUri(URI uri) { return (uri != null) && uri.getPath().startsWith(OpenCms.getSystemInfo().getWorkplaceContext()); }
class class_name[name] begin[{] method[isWorkplaceUri, return_type[type[boolean]], modifier[public static], parameter[uri]] begin[{] return[binary_operation[binary_operation[member[.uri], !=, literal[null]], &&, call[uri.getPath, parameter[]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isWorkplaceUri] operator[SEP] identifier[URI] identifier[uri] operator[SEP] { Keyword[return] operator[SEP] identifier[uri] operator[!=] Other[null] operator[SEP] operator[&&] identifier[uri] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] identifier[startsWith] operator[SEP] identifier[OpenCms] operator[SEP] identifier[getSystemInfo] operator[SEP] operator[SEP] operator[SEP] identifier[getWorkplaceContext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public ParallelTask getTaskFromInProgressMap(String jobId) { if (!inprogressTaskMap.containsKey(jobId)) return null; return inprogressTaskMap.get(jobId); }
class class_name[name] begin[{] method[getTaskFromInProgressMap, return_type[type[ParallelTask]], modifier[public], parameter[jobId]] begin[{] if[call[inprogressTaskMap.containsKey, parameter[member[.jobId]]]] begin[{] return[literal[null]] else begin[{] None end[}] return[call[inprogressTaskMap.get, parameter[member[.jobId]]]] end[}] END[}]
Keyword[public] identifier[ParallelTask] identifier[getTaskFromInProgressMap] operator[SEP] identifier[String] identifier[jobId] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[inprogressTaskMap] operator[SEP] identifier[containsKey] operator[SEP] identifier[jobId] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[return] identifier[inprogressTaskMap] operator[SEP] identifier[get] operator[SEP] identifier[jobId] operator[SEP] operator[SEP] }
public MailMessage findMessage(final String accountReservationKey, final Predicate<MailMessage> condition, final long timeoutSeconds, final long sleepMillis) { MailAccount mailAccount = checkNotNull(mailAccountManager.lookupUsedMailAccountForCurrentThread(accountReservationKey), "No mail account reserved for current thread under key '%s'", accountReservationKey); return findMessage(mailAccount, condition, timeoutSeconds, sleepMillis, false); }
class class_name[name] begin[{] method[findMessage, return_type[type[MailMessage]], modifier[public], parameter[accountReservationKey, condition, timeoutSeconds, sleepMillis]] begin[{] local_variable[type[MailAccount], mailAccount] return[call[.findMessage, parameter[member[.mailAccount], member[.condition], member[.timeoutSeconds], member[.sleepMillis], literal[false]]]] end[}] END[}]
Keyword[public] identifier[MailMessage] identifier[findMessage] operator[SEP] Keyword[final] identifier[String] identifier[accountReservationKey] , Keyword[final] identifier[Predicate] operator[<] identifier[MailMessage] operator[>] identifier[condition] , Keyword[final] Keyword[long] identifier[timeoutSeconds] , Keyword[final] Keyword[long] identifier[sleepMillis] operator[SEP] { identifier[MailAccount] identifier[mailAccount] operator[=] identifier[checkNotNull] operator[SEP] identifier[mailAccountManager] operator[SEP] identifier[lookupUsedMailAccountForCurrentThread] operator[SEP] identifier[accountReservationKey] operator[SEP] , literal[String] , identifier[accountReservationKey] operator[SEP] operator[SEP] Keyword[return] identifier[findMessage] operator[SEP] identifier[mailAccount] , identifier[condition] , identifier[timeoutSeconds] , identifier[sleepMillis] , literal[boolean] operator[SEP] operator[SEP] }
public int read(byte []buf, int offset, int length) throws IOException { int strlen = _length; int start = offset; int end = offset + length; int index = _index; for (; index < strlen && offset < end; index++) { int ch = _string.charAt(index); if (ch < 0x80) buf[offset++] = (byte) ch; else if (ch < 0x800 && offset + 1 < end) { buf[offset++] = (byte) (0xc0 | (ch >> 6)); buf[offset++] = (byte) (0x80 | (ch & 0x3f)); } else if (ch < 0x8000 && offset + 2 < end) { buf[offset++] = (byte) (0xe0 | (ch >> 12)); buf[offset++] = (byte) (0x80 | ((ch >> 6) & 0x3f)); buf[offset++] = (byte) (0x80 | ((ch >> 6) & 0x3f)); } else if (offset == start) { throw new IllegalStateException("buffer length is not large enough to decode UTF-8 data"); } else { break; } } _index = index; return start < offset ? offset - start : -1; }
class class_name[name] begin[{] method[read, return_type[type[int]], modifier[public], parameter[buf, offset, length]] begin[{] local_variable[type[int], strlen] local_variable[type[int], start] local_variable[type[int], end] local_variable[type[int], index] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=_string, selectors=[], type_arguments=None), name=ch)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x80), operator=<), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x800), operator=<), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), operandr=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operator=&&), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x8000), operator=<), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=+), operandr=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operator=&&), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="buffer length is not large enough to decode UTF-8 data")], 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)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=buf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=offset, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Cast(expression=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xe0), operandr=BinaryOperation(operandl=MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=12), operator=>>), operator=|), type=BasicType(dimensions=[], name=byte))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=buf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=offset, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Cast(expression=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x80), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6), operator=>>), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x3f), operator=&), operator=|), type=BasicType(dimensions=[], name=byte))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=buf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=offset, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Cast(expression=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x80), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6), operator=>>), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x3f), operator=&), operator=|), type=BasicType(dimensions=[], name=byte))), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=buf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=offset, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Cast(expression=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xc0), operandr=BinaryOperation(operandl=MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6), operator=>>), operator=|), type=BasicType(dimensions=[], name=byte))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=buf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=offset, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Cast(expression=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x80), operandr=BinaryOperation(operandl=MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x3f), operator=&), operator=|), type=BasicType(dimensions=[], name=byte))), label=None)])), label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=buf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=offset, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Cast(expression=MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=byte))), label=None))]), control=ForControl(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=strlen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operandr=BinaryOperation(operandl=MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operator=&&), init=None, update=[MemberReference(member=index, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) assign[member[._index], member[.index]] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), if_false=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), if_true=BinaryOperation(operandl=MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-))] end[}] END[}]
Keyword[public] Keyword[int] identifier[read] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[buf] , Keyword[int] identifier[offset] , Keyword[int] identifier[length] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[int] identifier[strlen] operator[=] identifier[_length] operator[SEP] Keyword[int] identifier[start] operator[=] identifier[offset] operator[SEP] Keyword[int] identifier[end] operator[=] identifier[offset] operator[+] identifier[length] operator[SEP] Keyword[int] identifier[index] operator[=] identifier[_index] operator[SEP] Keyword[for] operator[SEP] operator[SEP] identifier[index] operator[<] identifier[strlen] operator[&&] identifier[offset] operator[<] identifier[end] operator[SEP] identifier[index] operator[++] operator[SEP] { Keyword[int] identifier[ch] operator[=] identifier[_string] operator[SEP] identifier[charAt] operator[SEP] identifier[index] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ch] operator[<] literal[Integer] operator[SEP] identifier[buf] operator[SEP] identifier[offset] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] identifier[ch] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[ch] operator[<] literal[Integer] operator[&&] identifier[offset] operator[+] Other[1] operator[<] identifier[end] operator[SEP] { identifier[buf] operator[SEP] identifier[offset] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] literal[Integer] operator[|] operator[SEP] identifier[ch] operator[>] operator[>] Other[6] operator[SEP] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[offset] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] literal[Integer] operator[|] operator[SEP] identifier[ch] operator[&] literal[Integer] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[ch] operator[<] literal[Integer] operator[&&] identifier[offset] operator[+] Other[2] operator[<] identifier[end] operator[SEP] { identifier[buf] operator[SEP] identifier[offset] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] literal[Integer] operator[|] operator[SEP] identifier[ch] operator[>] operator[>] Other[12] operator[SEP] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[offset] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] literal[Integer] operator[|] operator[SEP] operator[SEP] identifier[ch] operator[>] operator[>] Other[6] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[offset] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] literal[Integer] operator[|] operator[SEP] operator[SEP] identifier[ch] operator[>] operator[>] Other[6] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[offset] operator[==] identifier[start] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] { Keyword[break] operator[SEP] } } identifier[_index] operator[=] identifier[index] operator[SEP] Keyword[return] identifier[start] operator[<] identifier[offset] operator[?] identifier[offset] operator[-] identifier[start] operator[:] operator[-] Other[1] operator[SEP] }
public String getSubSiteRoot(CmsObject cms, String rootPath) { CmsADEConfigData configData = lookupConfiguration(cms, rootPath); String basePath = configData.getBasePath(); String siteRoot = OpenCms.getSiteManager().getSiteRoot(rootPath); if (siteRoot == null) { siteRoot = ""; } if ((basePath == null) || !basePath.startsWith(siteRoot)) { // the subsite root should always be below the site root return siteRoot; } else { return basePath; } }
class class_name[name] begin[{] method[getSubSiteRoot, return_type[type[String]], modifier[public], parameter[cms, rootPath]] begin[{] local_variable[type[CmsADEConfigData], configData] local_variable[type[String], basePath] local_variable[type[String], siteRoot] if[binary_operation[member[.siteRoot], ==, literal[null]]] begin[{] assign[member[.siteRoot], literal[""]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.basePath], ==, literal[null]], ||, call[basePath.startsWith, parameter[member[.siteRoot]]]]] begin[{] return[member[.siteRoot]] else begin[{] return[member[.basePath]] end[}] end[}] END[}]
Keyword[public] identifier[String] identifier[getSubSiteRoot] operator[SEP] identifier[CmsObject] identifier[cms] , identifier[String] identifier[rootPath] operator[SEP] { identifier[CmsADEConfigData] identifier[configData] operator[=] identifier[lookupConfiguration] operator[SEP] identifier[cms] , identifier[rootPath] operator[SEP] operator[SEP] identifier[String] identifier[basePath] operator[=] identifier[configData] operator[SEP] identifier[getBasePath] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[siteRoot] operator[=] identifier[OpenCms] operator[SEP] identifier[getSiteManager] operator[SEP] operator[SEP] operator[SEP] identifier[getSiteRoot] operator[SEP] identifier[rootPath] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[siteRoot] operator[==] Other[null] operator[SEP] { identifier[siteRoot] operator[=] literal[String] operator[SEP] } Keyword[if] operator[SEP] operator[SEP] identifier[basePath] operator[==] Other[null] operator[SEP] operator[||] operator[!] identifier[basePath] operator[SEP] identifier[startsWith] operator[SEP] identifier[siteRoot] operator[SEP] operator[SEP] { Keyword[return] identifier[siteRoot] operator[SEP] } Keyword[else] { Keyword[return] identifier[basePath] operator[SEP] } }
@Override protected String applyLink( String text, String linkId ) { String link; if( this.options.containsKey( DocConstants.OPTION_HTML_EXPLODED )) link = "components/" + linkId + ".html".replace( " ", "%20" ); else link = "#" + createId( linkId ); return text.replaceAll( Pattern.quote( text ), "<a href=\"" + link + "\">" + text + "</a>" ); }
class class_name[name] begin[{] method[applyLink, return_type[type[String]], modifier[protected], parameter[text, linkId]] begin[{] local_variable[type[String], link] if[THIS[member[None.options]call[None.containsKey, parameter[member[DocConstants.OPTION_HTML_EXPLODED]]]]] begin[{] assign[member[.link], binary_operation[binary_operation[literal["components/"], +, member[.linkId]], +, literal[".html"]]] else begin[{] assign[member[.link], binary_operation[literal["#"], +, call[.createId, parameter[member[.linkId]]]]] end[}] return[call[text.replaceAll, parameter[call[Pattern.quote, parameter[member[.text]]], binary_operation[binary_operation[binary_operation[binary_operation[literal["<a href=\""], +, member[.link]], +, literal["\">"]], +, member[.text]], +, literal["</a>"]]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] identifier[String] identifier[applyLink] operator[SEP] identifier[String] identifier[text] , identifier[String] identifier[linkId] operator[SEP] { identifier[String] identifier[link] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[options] operator[SEP] identifier[containsKey] operator[SEP] identifier[DocConstants] operator[SEP] identifier[OPTION_HTML_EXPLODED] operator[SEP] operator[SEP] identifier[link] operator[=] literal[String] operator[+] identifier[linkId] operator[+] literal[String] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[else] identifier[link] operator[=] literal[String] operator[+] identifier[createId] operator[SEP] identifier[linkId] operator[SEP] operator[SEP] Keyword[return] identifier[text] operator[SEP] identifier[replaceAll] operator[SEP] identifier[Pattern] operator[SEP] identifier[quote] operator[SEP] identifier[text] operator[SEP] , literal[String] operator[+] identifier[link] operator[+] literal[String] operator[+] identifier[text] operator[+] literal[String] operator[SEP] operator[SEP] }
@Override public long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection) { return commerceNotificationAttachmentPersistence.countWithDynamicQuery(dynamicQuery, projection); }
class class_name[name] begin[{] method[dynamicQueryCount, return_type[type[long]], modifier[public], parameter[dynamicQuery, projection]] begin[{] return[call[commerceNotificationAttachmentPersistence.countWithDynamicQuery, parameter[member[.dynamicQuery], member[.projection]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[long] identifier[dynamicQueryCount] operator[SEP] identifier[DynamicQuery] identifier[dynamicQuery] , identifier[Projection] identifier[projection] operator[SEP] { Keyword[return] identifier[commerceNotificationAttachmentPersistence] operator[SEP] identifier[countWithDynamicQuery] operator[SEP] identifier[dynamicQuery] , identifier[projection] operator[SEP] operator[SEP] }
public static Version min(Version v1, Version v2) { require(v1 != null, "v1 is null"); require(v2 != null, "v2 is null"); return compare(v1, v2, false) <= 0 ? v1 : v2; }
class class_name[name] begin[{] method[min, return_type[type[Version]], modifier[public static], parameter[v1, v2]] begin[{] call[.require, parameter[binary_operation[member[.v1], !=, literal[null]], literal["v1 is null"]]] call[.require, parameter[binary_operation[member[.v2], !=, literal[null]], literal["v2 is null"]]] return[TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=v1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=v2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=compare, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<=), if_false=MemberReference(member=v2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MemberReference(member=v1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Version] identifier[min] operator[SEP] identifier[Version] identifier[v1] , identifier[Version] identifier[v2] operator[SEP] { identifier[require] operator[SEP] identifier[v1] operator[!=] Other[null] , literal[String] operator[SEP] operator[SEP] identifier[require] operator[SEP] identifier[v2] operator[!=] Other[null] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[compare] operator[SEP] identifier[v1] , identifier[v2] , literal[boolean] operator[SEP] operator[<=] Other[0] operator[?] identifier[v1] operator[:] identifier[v2] operator[SEP] }
@Override public double getStdDev() { // two-pass algorithm for variance, avoids numeric overflow if (values.length <= 1) { return 0; } final double mean = getMean(); double variance = 0; for (int i = 0; i < values.length; i++) { final double diff = values[i] - mean; variance += normWeights[i] * diff*diff; } return Math.sqrt(variance); }
class class_name[name] begin[{] method[getStdDev, return_type[type[double]], modifier[public], parameter[]] begin[{] if[binary_operation[member[values.length], <=, literal[1]]] begin[{] return[literal[0]] else begin[{] None end[}] local_variable[type[double], mean] local_variable[type[double], variance] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=mean, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), name=diff)], modifiers={'final'}, type=BasicType(dimensions=[], name=double)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=variance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=normWeights, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=diff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=MemberReference(member=diff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=values, 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[call[Math.sqrt, parameter[member[.variance]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[double] identifier[getStdDev] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[values] operator[SEP] identifier[length] operator[<=] Other[1] operator[SEP] { Keyword[return] Other[0] operator[SEP] } Keyword[final] Keyword[double] identifier[mean] operator[=] identifier[getMean] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[variance] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[values] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[final] Keyword[double] identifier[diff] operator[=] identifier[values] operator[SEP] identifier[i] operator[SEP] operator[-] identifier[mean] operator[SEP] identifier[variance] operator[+=] identifier[normWeights] operator[SEP] identifier[i] operator[SEP] operator[*] identifier[diff] operator[*] identifier[diff] operator[SEP] } Keyword[return] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] identifier[variance] operator[SEP] operator[SEP] }
private void resizeText() { double maxWidth = size * 0.9; double fontSize = size * 0.06; title.setFont(Fonts.latoRegular(fontSize)); title.setText(clock.getTitle()); if (title.getLayoutBounds().getWidth() > maxWidth) { Helper.adjustTextSize(title, maxWidth, fontSize); } title.setX(size * 0.05); title.setY(size * 0.05); maxWidth = size * 0.2; fontSize = size * 0.05; amPmText.setText(clock.getTime().get(ChronoField.AMPM_OF_DAY) == 0 ? "AM" : "PM"); Helper.adjustTextSize(amPmText, maxWidth, fontSize); amPmText.setX((size - amPmText.getLayoutBounds().getWidth()) * 0.5); amPmText.setY(size * 0.4); maxWidth = size * 0.6; dateText.setFont(Fonts.latoRegular(fontSize)); if (dateText.getLayoutBounds().getWidth() > maxWidth) { Helper.adjustTextSize(dateText, maxWidth, fontSize); } dateText.setX((size - dateText.getLayoutBounds().getWidth()) * 0.5); dateText.setY(size * 0.65); maxWidth = size * 0.9; fontSize = size * 0.05; text.setText(clock.getText()); if (text.getLayoutBounds().getWidth() > maxWidth) { Helper.adjustTextSize(text, maxWidth, fontSize); } text.setX(size * 0.05); text.setY(size * 0.95); }
class class_name[name] begin[{] method[resizeText, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[double], maxWidth] local_variable[type[double], fontSize] call[title.setFont, parameter[call[Fonts.latoRegular, parameter[member[.fontSize]]]]] call[title.setText, parameter[call[clock.getTitle, parameter[]]]] if[binary_operation[call[title.getLayoutBounds, parameter[]], >, member[.maxWidth]]] begin[{] call[Helper.adjustTextSize, parameter[member[.title], member[.maxWidth], member[.fontSize]]] else begin[{] None end[}] call[title.setX, parameter[binary_operation[member[.size], *, literal[0.05]]]] call[title.setY, parameter[binary_operation[member[.size], *, literal[0.05]]]] assign[member[.maxWidth], binary_operation[member[.size], *, literal[0.2]]] assign[member[.fontSize], binary_operation[member[.size], *, literal[0.05]]] call[amPmText.setText, parameter[TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getTime, postfix_operators=[], prefix_operators=[], qualifier=clock, selectors=[MethodInvocation(arguments=[MemberReference(member=AMPM_OF_DAY, postfix_operators=[], prefix_operators=[], qualifier=ChronoField, selectors=[])], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="PM"), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="AM"))]] call[Helper.adjustTextSize, parameter[member[.amPmText], member[.maxWidth], member[.fontSize]]] call[amPmText.setX, parameter[binary_operation[binary_operation[member[.size], -, call[amPmText.getLayoutBounds, parameter[]]], *, literal[0.5]]]] call[amPmText.setY, parameter[binary_operation[member[.size], *, literal[0.4]]]] assign[member[.maxWidth], binary_operation[member[.size], *, literal[0.6]]] call[dateText.setFont, parameter[call[Fonts.latoRegular, parameter[member[.fontSize]]]]] if[binary_operation[call[dateText.getLayoutBounds, parameter[]], >, member[.maxWidth]]] begin[{] call[Helper.adjustTextSize, parameter[member[.dateText], member[.maxWidth], member[.fontSize]]] else begin[{] None end[}] call[dateText.setX, parameter[binary_operation[binary_operation[member[.size], -, call[dateText.getLayoutBounds, parameter[]]], *, literal[0.5]]]] call[dateText.setY, parameter[binary_operation[member[.size], *, literal[0.65]]]] assign[member[.maxWidth], binary_operation[member[.size], *, literal[0.9]]] assign[member[.fontSize], binary_operation[member[.size], *, literal[0.05]]] call[text.setText, parameter[call[clock.getText, parameter[]]]] if[binary_operation[call[text.getLayoutBounds, parameter[]], >, member[.maxWidth]]] begin[{] call[Helper.adjustTextSize, parameter[member[.text], member[.maxWidth], member[.fontSize]]] else begin[{] None end[}] call[text.setX, parameter[binary_operation[member[.size], *, literal[0.05]]]] call[text.setY, parameter[binary_operation[member[.size], *, literal[0.95]]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[resizeText] operator[SEP] operator[SEP] { Keyword[double] identifier[maxWidth] operator[=] identifier[size] operator[*] literal[Float] operator[SEP] Keyword[double] identifier[fontSize] operator[=] identifier[size] operator[*] literal[Float] operator[SEP] identifier[title] operator[SEP] identifier[setFont] operator[SEP] identifier[Fonts] operator[SEP] identifier[latoRegular] operator[SEP] identifier[fontSize] operator[SEP] operator[SEP] operator[SEP] identifier[title] operator[SEP] identifier[setText] operator[SEP] identifier[clock] operator[SEP] identifier[getTitle] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[title] operator[SEP] identifier[getLayoutBounds] operator[SEP] operator[SEP] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[>] identifier[maxWidth] operator[SEP] { identifier[Helper] operator[SEP] identifier[adjustTextSize] operator[SEP] identifier[title] , identifier[maxWidth] , identifier[fontSize] operator[SEP] operator[SEP] } identifier[title] operator[SEP] identifier[setX] operator[SEP] identifier[size] operator[*] literal[Float] operator[SEP] operator[SEP] identifier[title] operator[SEP] identifier[setY] operator[SEP] identifier[size] operator[*] literal[Float] operator[SEP] operator[SEP] identifier[maxWidth] operator[=] identifier[size] operator[*] literal[Float] operator[SEP] identifier[fontSize] operator[=] identifier[size] operator[*] literal[Float] operator[SEP] identifier[amPmText] operator[SEP] identifier[setText] operator[SEP] identifier[clock] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[ChronoField] operator[SEP] identifier[AMPM_OF_DAY] operator[SEP] operator[==] Other[0] operator[?] literal[String] operator[:] literal[String] operator[SEP] operator[SEP] identifier[Helper] operator[SEP] identifier[adjustTextSize] operator[SEP] identifier[amPmText] , identifier[maxWidth] , identifier[fontSize] operator[SEP] operator[SEP] identifier[amPmText] operator[SEP] identifier[setX] operator[SEP] operator[SEP] identifier[size] operator[-] identifier[amPmText] operator[SEP] identifier[getLayoutBounds] operator[SEP] operator[SEP] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[SEP] operator[*] literal[Float] operator[SEP] operator[SEP] identifier[amPmText] operator[SEP] identifier[setY] operator[SEP] identifier[size] operator[*] literal[Float] operator[SEP] operator[SEP] identifier[maxWidth] operator[=] identifier[size] operator[*] literal[Float] operator[SEP] identifier[dateText] operator[SEP] identifier[setFont] operator[SEP] identifier[Fonts] operator[SEP] identifier[latoRegular] operator[SEP] identifier[fontSize] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dateText] operator[SEP] identifier[getLayoutBounds] operator[SEP] operator[SEP] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[>] identifier[maxWidth] operator[SEP] { identifier[Helper] operator[SEP] identifier[adjustTextSize] operator[SEP] identifier[dateText] , identifier[maxWidth] , identifier[fontSize] operator[SEP] operator[SEP] } identifier[dateText] operator[SEP] identifier[setX] operator[SEP] operator[SEP] identifier[size] operator[-] identifier[dateText] operator[SEP] identifier[getLayoutBounds] operator[SEP] operator[SEP] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[SEP] operator[*] literal[Float] operator[SEP] operator[SEP] identifier[dateText] operator[SEP] identifier[setY] operator[SEP] identifier[size] operator[*] literal[Float] operator[SEP] operator[SEP] identifier[maxWidth] operator[=] identifier[size] operator[*] literal[Float] operator[SEP] identifier[fontSize] operator[=] identifier[size] operator[*] literal[Float] operator[SEP] identifier[text] operator[SEP] identifier[setText] operator[SEP] identifier[clock] operator[SEP] identifier[getText] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[text] operator[SEP] identifier[getLayoutBounds] operator[SEP] operator[SEP] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[>] identifier[maxWidth] operator[SEP] { identifier[Helper] operator[SEP] identifier[adjustTextSize] operator[SEP] identifier[text] , identifier[maxWidth] , identifier[fontSize] operator[SEP] operator[SEP] } identifier[text] operator[SEP] identifier[setX] operator[SEP] identifier[size] operator[*] literal[Float] operator[SEP] operator[SEP] identifier[text] operator[SEP] identifier[setY] operator[SEP] identifier[size] operator[*] literal[Float] operator[SEP] operator[SEP] }
public static <E> E send(Object o, String methodName, Float arg) { return send(o, methodName, (Object) arg); }
class class_name[name] begin[{] method[send, return_type[type[E]], modifier[public static], parameter[o, methodName, arg]] begin[{] return[call[.send, parameter[member[.o], member[.methodName], Cast(expression=MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[E] operator[>] identifier[E] identifier[send] operator[SEP] identifier[Object] identifier[o] , identifier[String] identifier[methodName] , identifier[Float] identifier[arg] operator[SEP] { Keyword[return] identifier[send] operator[SEP] identifier[o] , identifier[methodName] , operator[SEP] identifier[Object] operator[SEP] identifier[arg] operator[SEP] operator[SEP] }
public synchronized void releaseServerLock() { if (serverLock != null) { try { serverLock.release(); } catch (IOException e) { } finally { Utils.tryToClose(lockFileChannel); } serverLock = null; lockFileChannel = null; } }
class class_name[name] begin[{] method[releaseServerLock, return_type[void], modifier[synchronized public], parameter[]] begin[{] if[binary_operation[member[.serverLock], !=, literal[null]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=release, postfix_operators=[], prefix_operators=[], qualifier=serverLock, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=lockFileChannel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=tryToClose, postfix_operators=[], prefix_operators=[], qualifier=Utils, selectors=[], type_arguments=None), label=None)], label=None, resources=None) assign[member[.serverLock], literal[null]] assign[member[.lockFileChannel], literal[null]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[synchronized] Keyword[void] identifier[releaseServerLock] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[serverLock] operator[!=] Other[null] operator[SEP] { Keyword[try] { identifier[serverLock] operator[SEP] identifier[release] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { } Keyword[finally] { identifier[Utils] operator[SEP] identifier[tryToClose] operator[SEP] identifier[lockFileChannel] operator[SEP] operator[SEP] } identifier[serverLock] operator[=] Other[null] operator[SEP] identifier[lockFileChannel] operator[=] Other[null] operator[SEP] } }
public ComputeNode getComputeNode(String poolId, String nodeId) throws BatchErrorException, IOException { return getComputeNode(poolId, nodeId, null, null); }
class class_name[name] begin[{] method[getComputeNode, return_type[type[ComputeNode]], modifier[public], parameter[poolId, nodeId]] begin[{] return[call[.getComputeNode, parameter[member[.poolId], member[.nodeId], literal[null], literal[null]]]] end[}] END[}]
Keyword[public] identifier[ComputeNode] identifier[getComputeNode] operator[SEP] identifier[String] identifier[poolId] , identifier[String] identifier[nodeId] operator[SEP] Keyword[throws] identifier[BatchErrorException] , identifier[IOException] { Keyword[return] identifier[getComputeNode] operator[SEP] identifier[poolId] , identifier[nodeId] , Other[null] , Other[null] operator[SEP] operator[SEP] }
public boolean callPostListener(Chunk chunk, BlockPos listener, BlockPos modified, IBlockState oldState, IBlockState newState) { IBlockListener.Post bl = IComponent.getComponent(IBlockListener.Post.class, chunk.getWorld().getBlockState(listener).getBlock()); bl.onBlockSet(chunk.getWorld(), listener, modified, oldState, newState); return true; }
class class_name[name] begin[{] method[callPostListener, return_type[type[boolean]], modifier[public], parameter[chunk, listener, modified, oldState, newState]] begin[{] local_variable[type[IBlockListener], bl] call[bl.onBlockSet, parameter[call[chunk.getWorld, parameter[]], member[.listener], member[.modified], member[.oldState], member[.newState]]] return[literal[true]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[callPostListener] operator[SEP] identifier[Chunk] identifier[chunk] , identifier[BlockPos] identifier[listener] , identifier[BlockPos] identifier[modified] , identifier[IBlockState] identifier[oldState] , identifier[IBlockState] identifier[newState] operator[SEP] { identifier[IBlockListener] operator[SEP] identifier[Post] identifier[bl] operator[=] identifier[IComponent] operator[SEP] identifier[getComponent] operator[SEP] identifier[IBlockListener] operator[SEP] identifier[Post] operator[SEP] Keyword[class] , identifier[chunk] operator[SEP] identifier[getWorld] operator[SEP] operator[SEP] operator[SEP] identifier[getBlockState] operator[SEP] identifier[listener] operator[SEP] operator[SEP] identifier[getBlock] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[bl] operator[SEP] identifier[onBlockSet] operator[SEP] identifier[chunk] operator[SEP] identifier[getWorld] operator[SEP] operator[SEP] , identifier[listener] , identifier[modified] , identifier[oldState] , identifier[newState] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
private void deliverMasterYieldResponse(int fromPlayer, boolean yielded) { for (final MasterHandoffListener listener : getMasterHandoffListeners()) { try { listener.yieldResponse(fromPlayer, yielded); } catch (Throwable t) { logger.warn("Problem delivering master yield response to listener", t); } } }
class class_name[name] begin[{] method[deliverMasterYieldResponse, return_type[void], modifier[private], parameter[fromPlayer, yielded]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=fromPlayer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=yielded, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=yieldResponse, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Problem delivering master yield response to listener"), MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=None, label=None, resources=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getMasterHandoffListeners, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=listener)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=MasterHandoffListener, sub_type=None))), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[deliverMasterYieldResponse] operator[SEP] Keyword[int] identifier[fromPlayer] , Keyword[boolean] identifier[yielded] operator[SEP] { Keyword[for] operator[SEP] Keyword[final] identifier[MasterHandoffListener] identifier[listener] operator[:] identifier[getMasterHandoffListeners] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { identifier[listener] operator[SEP] identifier[yieldResponse] operator[SEP] identifier[fromPlayer] , identifier[yielded] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { identifier[logger] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[t] operator[SEP] operator[SEP] } } }
public static <K, V> ImmutableMapParameter<K, V> of(K k0, V v0) { Map<K, V> map = Collections.singletonMap(k0, v0); return new ImmutableMapParameter<K, V>(map); }
class class_name[name] begin[{] method[of, return_type[type[ImmutableMapParameter]], modifier[public static], parameter[k0, v0]] begin[{] local_variable[type[Map], map] return[ClassCreator(arguments=[MemberReference(member=map, 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=K, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None))], dimensions=None, name=ImmutableMapParameter, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] identifier[ImmutableMapParameter] operator[<] identifier[K] , identifier[V] operator[>] identifier[of] operator[SEP] identifier[K] identifier[k0] , identifier[V] identifier[v0] operator[SEP] { identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] identifier[map] operator[=] identifier[Collections] operator[SEP] identifier[singletonMap] operator[SEP] identifier[k0] , identifier[v0] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[ImmutableMapParameter] operator[<] identifier[K] , identifier[V] operator[>] operator[SEP] identifier[map] operator[SEP] operator[SEP] }
public Observable<SecretBundle> restoreSecretAsync(String vaultBaseUrl, byte[] secretBundleBackup) { return restoreSecretWithServiceResponseAsync(vaultBaseUrl, secretBundleBackup).map(new Func1<ServiceResponse<SecretBundle>, SecretBundle>() { @Override public SecretBundle call(ServiceResponse<SecretBundle> response) { return response.body(); } }); }
class class_name[name] begin[{] method[restoreSecretAsync, return_type[type[Observable]], modifier[public], parameter[vaultBaseUrl, secretBundleBackup]] begin[{] return[call[.restoreSecretWithServiceResponseAsync, parameter[member[.vaultBaseUrl], member[.secretBundleBackup]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[SecretBundle] operator[>] identifier[restoreSecretAsync] operator[SEP] identifier[String] identifier[vaultBaseUrl] , Keyword[byte] operator[SEP] operator[SEP] identifier[secretBundleBackup] operator[SEP] { Keyword[return] identifier[restoreSecretWithServiceResponseAsync] operator[SEP] identifier[vaultBaseUrl] , identifier[secretBundleBackup] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[SecretBundle] operator[>] , identifier[SecretBundle] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[SecretBundle] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[SecretBundle] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
void pop( Env global ) { assert _sp > _display[_tod]; // Do not over-pop current scope _sp--; _fcn[_sp]=global.subRef(_fcn[_sp]); _ary[_sp]=global.subRef(_ary[_sp],_key[_sp]); assert _sp==0 || _ary[0]==null || check_refcnt(_ary[0].anyVec()); }
class class_name[name] begin[{] method[pop, return_type[void], modifier[default], parameter[global]] begin[{] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=_sp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=_display, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=_tod, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=>), label=None, value=None) member[._sp] assign[member[._fcn], call[global.subRef, parameter[member[._fcn]]]] assign[member[._ary], call[global.subRef, parameter[member[._ary], member[._key]]]] AssertStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=_sp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), operandr=BinaryOperation(operandl=MemberReference(member=_ary, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operator=||), operandr=MethodInvocation(arguments=[MemberReference(member=_ary, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), MethodInvocation(arguments=[], member=anyVec, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], member=check_refcnt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=||), label=None, value=None) end[}] END[}]
Keyword[void] identifier[pop] operator[SEP] identifier[Env] identifier[global] operator[SEP] { Keyword[assert] identifier[_sp] operator[>] identifier[_display] operator[SEP] identifier[_tod] operator[SEP] operator[SEP] identifier[_sp] operator[--] operator[SEP] identifier[_fcn] operator[SEP] identifier[_sp] operator[SEP] operator[=] identifier[global] operator[SEP] identifier[subRef] operator[SEP] identifier[_fcn] operator[SEP] identifier[_sp] operator[SEP] operator[SEP] operator[SEP] identifier[_ary] operator[SEP] identifier[_sp] operator[SEP] operator[=] identifier[global] operator[SEP] identifier[subRef] operator[SEP] identifier[_ary] operator[SEP] identifier[_sp] operator[SEP] , identifier[_key] operator[SEP] identifier[_sp] operator[SEP] operator[SEP] operator[SEP] Keyword[assert] identifier[_sp] operator[==] Other[0] operator[||] identifier[_ary] operator[SEP] Other[0] operator[SEP] operator[==] Other[null] operator[||] identifier[check_refcnt] operator[SEP] identifier[_ary] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[anyVec] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Nonnull public static Rectangle decodeToRectangle(@Nonnull final String mapcode) throws UnknownMapcodeException, IllegalArgumentException, UnknownPrecisionFormatException { return decodeToRectangle(mapcode, Territory.AAA); }
class class_name[name] begin[{] method[decodeToRectangle, return_type[type[Rectangle]], modifier[public static], parameter[mapcode]] begin[{] return[call[.decodeToRectangle, parameter[member[.mapcode], member[Territory.AAA]]]] end[}] END[}]
annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] identifier[Rectangle] identifier[decodeToRectangle] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[String] identifier[mapcode] operator[SEP] Keyword[throws] identifier[UnknownMapcodeException] , identifier[IllegalArgumentException] , identifier[UnknownPrecisionFormatException] { Keyword[return] identifier[decodeToRectangle] operator[SEP] identifier[mapcode] , identifier[Territory] operator[SEP] identifier[AAA] operator[SEP] operator[SEP] }
private void onDiscriminatorColumn(ThriftRow tr, long timestamp, EntityType entityType) { String discrColumn = ((AbstractManagedType) entityType).getDiscriminatorColumn(); String discrValue = ((AbstractManagedType) entityType).getDiscriminatorValue(); // No need to check for empty or blank, as considering it as valid name // for nosql! if (discrColumn != null && discrValue != null) { Column column = prepareColumn(PropertyAccessorHelper.getBytes(discrValue), PropertyAccessorHelper.getBytes(discrColumn), timestamp, 0); tr.addColumn(column); } }
class class_name[name] begin[{] method[onDiscriminatorColumn, return_type[void], modifier[private], parameter[tr, timestamp, entityType]] begin[{] local_variable[type[String], discrColumn] local_variable[type[String], discrValue] if[binary_operation[binary_operation[member[.discrColumn], !=, literal[null]], &&, binary_operation[member[.discrValue], !=, literal[null]]]] begin[{] local_variable[type[Column], column] call[tr.addColumn, parameter[member[.column]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[onDiscriminatorColumn] operator[SEP] identifier[ThriftRow] identifier[tr] , Keyword[long] identifier[timestamp] , identifier[EntityType] identifier[entityType] operator[SEP] { identifier[String] identifier[discrColumn] operator[=] operator[SEP] operator[SEP] identifier[AbstractManagedType] operator[SEP] identifier[entityType] operator[SEP] operator[SEP] identifier[getDiscriminatorColumn] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[discrValue] operator[=] operator[SEP] operator[SEP] identifier[AbstractManagedType] operator[SEP] identifier[entityType] operator[SEP] operator[SEP] identifier[getDiscriminatorValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[discrColumn] operator[!=] Other[null] operator[&&] identifier[discrValue] operator[!=] Other[null] operator[SEP] { identifier[Column] identifier[column] operator[=] identifier[prepareColumn] operator[SEP] identifier[PropertyAccessorHelper] operator[SEP] identifier[getBytes] operator[SEP] identifier[discrValue] operator[SEP] , identifier[PropertyAccessorHelper] operator[SEP] identifier[getBytes] operator[SEP] identifier[discrColumn] operator[SEP] , identifier[timestamp] , Other[0] operator[SEP] operator[SEP] identifier[tr] operator[SEP] identifier[addColumn] operator[SEP] identifier[column] operator[SEP] operator[SEP] } }
public static String getCRC32Checksum(InputStream is) throws IOException { Checksum checksum = new CRC32(); byte[] bytes = new byte[1024]; int len = 0; while ((len = is.read(bytes)) >= 0) { checksum.update(bytes, 0, len); } return Long.toString(checksum.getValue()); }
class class_name[name] begin[{] method[getCRC32Checksum, return_type[type[String]], modifier[public static], parameter[is]] begin[{] local_variable[type[Checksum], checksum] local_variable[type[byte], bytes] local_variable[type[int], len] while[binary_operation[assign[member[.len], call[is.read, parameter[member[.bytes]]]], >=, literal[0]]] begin[{] call[checksum.update, parameter[member[.bytes], literal[0], member[.len]]] end[}] return[call[Long.toString, parameter[call[checksum.getValue, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getCRC32Checksum] operator[SEP] identifier[InputStream] identifier[is] operator[SEP] Keyword[throws] identifier[IOException] { identifier[Checksum] identifier[checksum] operator[=] Keyword[new] identifier[CRC32] operator[SEP] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] operator[=] Keyword[new] Keyword[byte] operator[SEP] Other[1024] operator[SEP] operator[SEP] Keyword[int] identifier[len] operator[=] Other[0] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[len] operator[=] identifier[is] operator[SEP] identifier[read] operator[SEP] identifier[bytes] operator[SEP] operator[SEP] operator[>=] Other[0] operator[SEP] { identifier[checksum] operator[SEP] identifier[update] operator[SEP] identifier[bytes] , Other[0] , identifier[len] operator[SEP] operator[SEP] } Keyword[return] identifier[Long] operator[SEP] identifier[toString] operator[SEP] identifier[checksum] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Override public DeleteSecretResult deleteSecret(DeleteSecretRequest request) { request = beforeClientExecution(request); return executeDeleteSecret(request); }
class class_name[name] begin[{] method[deleteSecret, return_type[type[DeleteSecretResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeDeleteSecret, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[DeleteSecretResult] identifier[deleteSecret] operator[SEP] identifier[DeleteSecretRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeDeleteSecret] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public List<LifecycleCallbackType<SessionBeanType<T>>> getAllPostConstruct() { List<LifecycleCallbackType<SessionBeanType<T>>> list = new ArrayList<LifecycleCallbackType<SessionBeanType<T>>>(); List<Node> nodeList = childNode.get("post-construct"); for(Node node: nodeList) { LifecycleCallbackType<SessionBeanType<T>> type = new LifecycleCallbackTypeImpl<SessionBeanType<T>>(this, "post-construct", childNode, node); list.add(type); } return list; }
class class_name[name] begin[{] method[getAllPostConstruct, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[List], list] local_variable[type[List], nodeList] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="post-construct"), MemberReference(member=childNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=node, 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=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=SessionBeanType, sub_type=None))], dimensions=None, name=LifecycleCallbackTypeImpl, sub_type=None)), name=type)], modifiers=set(), 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=SessionBeanType, sub_type=None))], dimensions=[], name=LifecycleCallbackType, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=nodeList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=node)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None))), label=None) return[member[.list]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[LifecycleCallbackType] operator[<] identifier[SessionBeanType] operator[<] identifier[T] operator[>] operator[>] operator[>] identifier[getAllPostConstruct] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[LifecycleCallbackType] operator[<] identifier[SessionBeanType] operator[<] identifier[T] operator[>] operator[>] operator[>] identifier[list] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[LifecycleCallbackType] operator[<] identifier[SessionBeanType] operator[<] identifier[T] operator[>] operator[>] operator[>] operator[SEP] 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[for] operator[SEP] identifier[Node] identifier[node] operator[:] identifier[nodeList] operator[SEP] { identifier[LifecycleCallbackType] operator[<] identifier[SessionBeanType] operator[<] identifier[T] operator[>] operator[>] identifier[type] operator[=] Keyword[new] identifier[LifecycleCallbackTypeImpl] operator[<] identifier[SessionBeanType] operator[<] identifier[T] operator[>] operator[>] operator[SEP] Keyword[this] , literal[String] , identifier[childNode] , identifier[node] operator[SEP] operator[SEP] identifier[list] operator[SEP] identifier[add] operator[SEP] identifier[type] operator[SEP] operator[SEP] } Keyword[return] identifier[list] operator[SEP] }
public static void registerSerializers(final Kryo kryo) { final TreeBasedTableSerializer serializer = new TreeBasedTableSerializer(); kryo.register(TreeBasedTable.class, serializer); }
class class_name[name] begin[{] method[registerSerializers, return_type[void], modifier[public static], parameter[kryo]] begin[{] local_variable[type[TreeBasedTableSerializer], serializer] call[kryo.register, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TreeBasedTable, sub_type=None)), member[.serializer]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[registerSerializers] operator[SEP] Keyword[final] identifier[Kryo] identifier[kryo] operator[SEP] { Keyword[final] identifier[TreeBasedTableSerializer] identifier[serializer] operator[=] Keyword[new] identifier[TreeBasedTableSerializer] operator[SEP] operator[SEP] operator[SEP] identifier[kryo] operator[SEP] identifier[register] operator[SEP] identifier[TreeBasedTable] operator[SEP] Keyword[class] , identifier[serializer] operator[SEP] operator[SEP] }
private boolean containsEliminated(final CLClause c) { for (int i = 0; i < c.lits().size(); i++) { if (var(c.lits().get(i)).state() == CLVar.State.ELIMINATED) { return true; } } return false; }
class class_name[name] begin[{] method[containsEliminated, return_type[type[boolean]], modifier[private], parameter[c]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=lits, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=var, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=state, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MemberReference(member=ELIMINATED, postfix_operators=[], prefix_operators=[], qualifier=CLVar.State, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=lits, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[MethodInvocation(arguments=[], member=size, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[literal[false]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[containsEliminated] operator[SEP] Keyword[final] identifier[CLClause] identifier[c] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[c] operator[SEP] identifier[lits] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[var] operator[SEP] identifier[c] operator[SEP] identifier[lits] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] operator[SEP] operator[==] identifier[CLVar] operator[SEP] identifier[State] operator[SEP] identifier[ELIMINATED] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
private void doGetDatasources() throws PageException { Map ds = config.getDataSourcesAsMap(); Iterator it = ds.keySet().iterator(); lucee.runtime.type.Query qry = new QueryImpl(new String[] { "name", "host", "classname", "bundleName", "bundleVersion", "dsn", "DsnTranslated", "database", "port", "timezone", "username", "password", "passwordEncrypted", "readonly", "grant", "drop", "create", "revoke", "alter", "select", "delete", "update", "insert", "connectionLimit", "openConnections", "connectionTimeout", "clob", "blob", "validate", "storage", "customSettings", "metaCacheTimeout" }, ds.size(), "query"); int row = 0; while (it.hasNext()) { Object key = it.next(); DataSource d = (DataSource) ds.get(key); row++; qry.setAt(KeyConstants._name, row, key); qry.setAt(KeyConstants._host, row, d.getHost()); qry.setAt("classname", row, d.getClassDefinition().getClassName()); qry.setAt("bundleName", row, d.getClassDefinition().getName()); qry.setAt("bundleVersion", row, d.getClassDefinition().getVersionAsString()); qry.setAt("dsn", row, d.getDsnOriginal()); qry.setAt("database", row, d.getDatabase()); qry.setAt(KeyConstants._port, row, d.getPort() < 1 ? "" : Caster.toString(d.getPort())); qry.setAt("dsnTranslated", row, d.getDsnTranslated()); qry.setAt("timezone", row, toStringTimeZone(d.getTimeZone())); qry.setAt(KeyConstants._password, row, d.getPassword()); qry.setAt("passwordEncrypted", row, ConfigWebUtil.encrypt(d.getPassword())); qry.setAt(KeyConstants._username, row, d.getUsername()); qry.setAt(KeyConstants._readonly, row, Caster.toBoolean(d.isReadOnly())); qry.setAt(KeyConstants._select, row, Boolean.valueOf(d.hasAllow(DataSource.ALLOW_SELECT))); qry.setAt(KeyConstants._delete, row, Boolean.valueOf(d.hasAllow(DataSource.ALLOW_DELETE))); qry.setAt(KeyConstants._update, row, Boolean.valueOf(d.hasAllow(DataSource.ALLOW_UPDATE))); qry.setAt(KeyConstants._create, row, Boolean.valueOf(d.hasAllow(DataSource.ALLOW_CREATE))); qry.setAt(KeyConstants._insert, row, Boolean.valueOf(d.hasAllow(DataSource.ALLOW_INSERT))); qry.setAt(KeyConstants._drop, row, Boolean.valueOf(d.hasAllow(DataSource.ALLOW_DROP))); qry.setAt(KeyConstants._grant, row, Boolean.valueOf(d.hasAllow(DataSource.ALLOW_GRANT))); qry.setAt(KeyConstants._revoke, row, Boolean.valueOf(d.hasAllow(DataSource.ALLOW_REVOKE))); qry.setAt(KeyConstants._alter, row, Boolean.valueOf(d.hasAllow(DataSource.ALLOW_ALTER))); int oc = config.getDatasourceConnectionPool().openConnections(key.toString()); qry.setAt("openConnections", row, oc < 0 ? 0 : oc); qry.setAt("connectionLimit", row, d.getConnectionLimit() < 1 ? "" : Caster.toString(d.getConnectionLimit())); qry.setAt("connectionTimeout", row, d.getConnectionTimeout() < 1 ? "" : Caster.toString(d.getConnectionTimeout())); qry.setAt("customSettings", row, d.getCustoms()); qry.setAt("blob", row, Boolean.valueOf(d.isBlob())); qry.setAt("clob", row, Boolean.valueOf(d.isClob())); qry.setAt("validate", row, Boolean.valueOf(d.validate())); qry.setAt("storage", row, Boolean.valueOf(d.isStorage())); qry.setAt("metaCacheTimeout", row, Caster.toDouble(d.getMetaCacheTimeout())); } pageContext.setVariable(getString("admin", action, "returnVariable"), qry); }
class class_name[name] begin[{] method[doGetDatasources, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[Map], ds] local_variable[type[Iterator], it] local_variable[type[lucee], qry] local_variable[type[int], row] while[call[it.hasNext, parameter[]]] begin[{] local_variable[type[Object], key] local_variable[type[DataSource], d] member[.row] call[qry.setAt, parameter[member[KeyConstants._name], member[.row], member[.key]]] call[qry.setAt, parameter[member[KeyConstants._host], member[.row], call[d.getHost, parameter[]]]] call[qry.setAt, parameter[literal["classname"], member[.row], call[d.getClassDefinition, parameter[]]]] call[qry.setAt, parameter[literal["bundleName"], member[.row], call[d.getClassDefinition, parameter[]]]] call[qry.setAt, parameter[literal["bundleVersion"], member[.row], call[d.getClassDefinition, parameter[]]]] call[qry.setAt, parameter[literal["dsn"], member[.row], call[d.getDsnOriginal, parameter[]]]] call[qry.setAt, parameter[literal["database"], member[.row], call[d.getDatabase, parameter[]]]] call[qry.setAt, parameter[member[KeyConstants._port], member[.row], TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getPort, postfix_operators=[], prefix_operators=[], qualifier=d, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=<), if_false=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getPort, postfix_operators=[], prefix_operators=[], qualifier=d, selectors=[], type_arguments=None)], member=toString, postfix_operators=[], prefix_operators=[], qualifier=Caster, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""))]] call[qry.setAt, parameter[literal["dsnTranslated"], member[.row], call[d.getDsnTranslated, parameter[]]]] call[qry.setAt, parameter[literal["timezone"], member[.row], call[.toStringTimeZone, parameter[call[d.getTimeZone, parameter[]]]]]] call[qry.setAt, parameter[member[KeyConstants._password], member[.row], call[d.getPassword, parameter[]]]] call[qry.setAt, parameter[literal["passwordEncrypted"], member[.row], call[ConfigWebUtil.encrypt, parameter[call[d.getPassword, parameter[]]]]]] call[qry.setAt, parameter[member[KeyConstants._username], member[.row], call[d.getUsername, parameter[]]]] call[qry.setAt, parameter[member[KeyConstants._readonly], member[.row], call[Caster.toBoolean, parameter[call[d.isReadOnly, parameter[]]]]]] call[qry.setAt, parameter[member[KeyConstants._select], member[.row], call[Boolean.valueOf, parameter[call[d.hasAllow, parameter[member[DataSource.ALLOW_SELECT]]]]]]] call[qry.setAt, parameter[member[KeyConstants._delete], member[.row], call[Boolean.valueOf, parameter[call[d.hasAllow, parameter[member[DataSource.ALLOW_DELETE]]]]]]] call[qry.setAt, parameter[member[KeyConstants._update], member[.row], call[Boolean.valueOf, parameter[call[d.hasAllow, parameter[member[DataSource.ALLOW_UPDATE]]]]]]] call[qry.setAt, parameter[member[KeyConstants._create], member[.row], call[Boolean.valueOf, parameter[call[d.hasAllow, parameter[member[DataSource.ALLOW_CREATE]]]]]]] call[qry.setAt, parameter[member[KeyConstants._insert], member[.row], call[Boolean.valueOf, parameter[call[d.hasAllow, parameter[member[DataSource.ALLOW_INSERT]]]]]]] call[qry.setAt, parameter[member[KeyConstants._drop], member[.row], call[Boolean.valueOf, parameter[call[d.hasAllow, parameter[member[DataSource.ALLOW_DROP]]]]]]] call[qry.setAt, parameter[member[KeyConstants._grant], member[.row], call[Boolean.valueOf, parameter[call[d.hasAllow, parameter[member[DataSource.ALLOW_GRANT]]]]]]] call[qry.setAt, parameter[member[KeyConstants._revoke], member[.row], call[Boolean.valueOf, parameter[call[d.hasAllow, parameter[member[DataSource.ALLOW_REVOKE]]]]]]] call[qry.setAt, parameter[member[KeyConstants._alter], member[.row], call[Boolean.valueOf, parameter[call[d.hasAllow, parameter[member[DataSource.ALLOW_ALTER]]]]]]] local_variable[type[int], oc] call[qry.setAt, parameter[literal["openConnections"], member[.row], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=oc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), if_false=MemberReference(member=oc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]] call[qry.setAt, parameter[literal["connectionLimit"], member[.row], TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getConnectionLimit, postfix_operators=[], prefix_operators=[], qualifier=d, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=<), if_false=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getConnectionLimit, postfix_operators=[], prefix_operators=[], qualifier=d, selectors=[], type_arguments=None)], member=toString, postfix_operators=[], prefix_operators=[], qualifier=Caster, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""))]] call[qry.setAt, parameter[literal["connectionTimeout"], member[.row], TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getConnectionTimeout, postfix_operators=[], prefix_operators=[], qualifier=d, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=<), if_false=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getConnectionTimeout, postfix_operators=[], prefix_operators=[], qualifier=d, selectors=[], type_arguments=None)], member=toString, postfix_operators=[], prefix_operators=[], qualifier=Caster, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""))]] call[qry.setAt, parameter[literal["customSettings"], member[.row], call[d.getCustoms, parameter[]]]] call[qry.setAt, parameter[literal["blob"], member[.row], call[Boolean.valueOf, parameter[call[d.isBlob, parameter[]]]]]] call[qry.setAt, parameter[literal["clob"], member[.row], call[Boolean.valueOf, parameter[call[d.isClob, parameter[]]]]]] call[qry.setAt, parameter[literal["validate"], member[.row], call[Boolean.valueOf, parameter[call[d.validate, parameter[]]]]]] call[qry.setAt, parameter[literal["storage"], member[.row], call[Boolean.valueOf, parameter[call[d.isStorage, parameter[]]]]]] call[qry.setAt, parameter[literal["metaCacheTimeout"], member[.row], call[Caster.toDouble, parameter[call[d.getMetaCacheTimeout, parameter[]]]]]] end[}] call[pageContext.setVariable, parameter[call[.getString, parameter[literal["admin"], member[.action], literal["returnVariable"]]], member[.qry]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[doGetDatasources] operator[SEP] operator[SEP] Keyword[throws] identifier[PageException] { identifier[Map] identifier[ds] operator[=] identifier[config] operator[SEP] identifier[getDataSourcesAsMap] operator[SEP] operator[SEP] operator[SEP] identifier[Iterator] identifier[it] operator[=] identifier[ds] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[lucee] operator[SEP] identifier[runtime] operator[SEP] identifier[type] operator[SEP] identifier[Query] identifier[qry] operator[=] Keyword[new] identifier[QueryImpl] operator[SEP] Keyword[new] identifier[String] operator[SEP] operator[SEP] { literal[String] , literal[String] , literal[String] , literal[String] , literal[String] , literal[String] , literal[String] , literal[String] , literal[String] , literal[String] , literal[String] , literal[String] , literal[String] , literal[String] , literal[String] , literal[String] , literal[String] , literal[String] , literal[String] , literal[String] , literal[String] , literal[String] , literal[String] , literal[String] , literal[String] , literal[String] , literal[String] , literal[String] , literal[String] , literal[String] , literal[String] , literal[String] } , identifier[ds] operator[SEP] identifier[size] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] Keyword[int] identifier[row] operator[=] Other[0] operator[SEP] Keyword[while] operator[SEP] identifier[it] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[Object] identifier[key] operator[=] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[DataSource] identifier[d] operator[=] operator[SEP] identifier[DataSource] operator[SEP] identifier[ds] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[row] operator[++] operator[SEP] identifier[qry] operator[SEP] identifier[setAt] operator[SEP] identifier[KeyConstants] operator[SEP] identifier[_name] , identifier[row] , identifier[key] operator[SEP] operator[SEP] identifier[qry] operator[SEP] identifier[setAt] operator[SEP] identifier[KeyConstants] operator[SEP] identifier[_host] , identifier[row] , identifier[d] operator[SEP] identifier[getHost] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[qry] operator[SEP] identifier[setAt] operator[SEP] literal[String] , identifier[row] , identifier[d] operator[SEP] identifier[getClassDefinition] operator[SEP] operator[SEP] operator[SEP] identifier[getClassName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[qry] operator[SEP] identifier[setAt] operator[SEP] literal[String] , identifier[row] , identifier[d] operator[SEP] identifier[getClassDefinition] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[qry] operator[SEP] identifier[setAt] operator[SEP] literal[String] , identifier[row] , identifier[d] operator[SEP] identifier[getClassDefinition] operator[SEP] operator[SEP] operator[SEP] identifier[getVersionAsString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[qry] operator[SEP] identifier[setAt] operator[SEP] literal[String] , identifier[row] , identifier[d] operator[SEP] identifier[getDsnOriginal] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[qry] operator[SEP] identifier[setAt] operator[SEP] literal[String] , identifier[row] , identifier[d] operator[SEP] identifier[getDatabase] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[qry] operator[SEP] identifier[setAt] operator[SEP] identifier[KeyConstants] operator[SEP] identifier[_port] , identifier[row] , identifier[d] operator[SEP] identifier[getPort] operator[SEP] operator[SEP] operator[<] Other[1] operator[?] literal[String] operator[:] identifier[Caster] operator[SEP] identifier[toString] operator[SEP] identifier[d] operator[SEP] identifier[getPort] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[qry] operator[SEP] identifier[setAt] operator[SEP] literal[String] , identifier[row] , identifier[d] operator[SEP] identifier[getDsnTranslated] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[qry] operator[SEP] identifier[setAt] operator[SEP] literal[String] , identifier[row] , identifier[toStringTimeZone] operator[SEP] identifier[d] operator[SEP] identifier[getTimeZone] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[qry] operator[SEP] identifier[setAt] operator[SEP] identifier[KeyConstants] operator[SEP] identifier[_password] , identifier[row] , identifier[d] operator[SEP] identifier[getPassword] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[qry] operator[SEP] identifier[setAt] operator[SEP] literal[String] , identifier[row] , identifier[ConfigWebUtil] operator[SEP] identifier[encrypt] operator[SEP] identifier[d] operator[SEP] identifier[getPassword] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[qry] operator[SEP] identifier[setAt] operator[SEP] identifier[KeyConstants] operator[SEP] identifier[_username] , identifier[row] , identifier[d] operator[SEP] identifier[getUsername] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[qry] operator[SEP] identifier[setAt] operator[SEP] identifier[KeyConstants] operator[SEP] identifier[_readonly] , identifier[row] , identifier[Caster] operator[SEP] identifier[toBoolean] operator[SEP] identifier[d] operator[SEP] identifier[isReadOnly] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[qry] operator[SEP] identifier[setAt] operator[SEP] identifier[KeyConstants] operator[SEP] identifier[_select] , identifier[row] , identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[d] operator[SEP] identifier[hasAllow] operator[SEP] identifier[DataSource] operator[SEP] identifier[ALLOW_SELECT] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[qry] operator[SEP] identifier[setAt] operator[SEP] identifier[KeyConstants] operator[SEP] identifier[_delete] , identifier[row] , identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[d] operator[SEP] identifier[hasAllow] operator[SEP] identifier[DataSource] operator[SEP] identifier[ALLOW_DELETE] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[qry] operator[SEP] identifier[setAt] operator[SEP] identifier[KeyConstants] operator[SEP] identifier[_update] , identifier[row] , identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[d] operator[SEP] identifier[hasAllow] operator[SEP] identifier[DataSource] operator[SEP] identifier[ALLOW_UPDATE] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[qry] operator[SEP] identifier[setAt] operator[SEP] identifier[KeyConstants] operator[SEP] identifier[_create] , identifier[row] , identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[d] operator[SEP] identifier[hasAllow] operator[SEP] identifier[DataSource] operator[SEP] identifier[ALLOW_CREATE] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[qry] operator[SEP] identifier[setAt] operator[SEP] identifier[KeyConstants] operator[SEP] identifier[_insert] , identifier[row] , identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[d] operator[SEP] identifier[hasAllow] operator[SEP] identifier[DataSource] operator[SEP] identifier[ALLOW_INSERT] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[qry] operator[SEP] identifier[setAt] operator[SEP] identifier[KeyConstants] operator[SEP] identifier[_drop] , identifier[row] , identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[d] operator[SEP] identifier[hasAllow] operator[SEP] identifier[DataSource] operator[SEP] identifier[ALLOW_DROP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[qry] operator[SEP] identifier[setAt] operator[SEP] identifier[KeyConstants] operator[SEP] identifier[_grant] , identifier[row] , identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[d] operator[SEP] identifier[hasAllow] operator[SEP] identifier[DataSource] operator[SEP] identifier[ALLOW_GRANT] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[qry] operator[SEP] identifier[setAt] operator[SEP] identifier[KeyConstants] operator[SEP] identifier[_revoke] , identifier[row] , identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[d] operator[SEP] identifier[hasAllow] operator[SEP] identifier[DataSource] operator[SEP] identifier[ALLOW_REVOKE] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[qry] operator[SEP] identifier[setAt] operator[SEP] identifier[KeyConstants] operator[SEP] identifier[_alter] , identifier[row] , identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[d] operator[SEP] identifier[hasAllow] operator[SEP] identifier[DataSource] operator[SEP] identifier[ALLOW_ALTER] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[oc] operator[=] identifier[config] operator[SEP] identifier[getDatasourceConnectionPool] operator[SEP] operator[SEP] operator[SEP] identifier[openConnections] operator[SEP] identifier[key] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[qry] operator[SEP] identifier[setAt] operator[SEP] literal[String] , identifier[row] , identifier[oc] operator[<] Other[0] operator[?] Other[0] operator[:] identifier[oc] operator[SEP] operator[SEP] identifier[qry] operator[SEP] identifier[setAt] operator[SEP] literal[String] , identifier[row] , identifier[d] operator[SEP] identifier[getConnectionLimit] operator[SEP] operator[SEP] operator[<] Other[1] operator[?] literal[String] operator[:] identifier[Caster] operator[SEP] identifier[toString] operator[SEP] identifier[d] operator[SEP] identifier[getConnectionLimit] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[qry] operator[SEP] identifier[setAt] operator[SEP] literal[String] , identifier[row] , identifier[d] operator[SEP] identifier[getConnectionTimeout] operator[SEP] operator[SEP] operator[<] Other[1] operator[?] literal[String] operator[:] identifier[Caster] operator[SEP] identifier[toString] operator[SEP] identifier[d] operator[SEP] identifier[getConnectionTimeout] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[qry] operator[SEP] identifier[setAt] operator[SEP] literal[String] , identifier[row] , identifier[d] operator[SEP] identifier[getCustoms] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[qry] operator[SEP] identifier[setAt] operator[SEP] literal[String] , identifier[row] , identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[d] operator[SEP] identifier[isBlob] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[qry] operator[SEP] identifier[setAt] operator[SEP] literal[String] , identifier[row] , identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[d] operator[SEP] identifier[isClob] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[qry] operator[SEP] identifier[setAt] operator[SEP] literal[String] , identifier[row] , identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[d] operator[SEP] identifier[validate] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[qry] operator[SEP] identifier[setAt] operator[SEP] literal[String] , identifier[row] , identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[d] operator[SEP] identifier[isStorage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[qry] operator[SEP] identifier[setAt] operator[SEP] literal[String] , identifier[row] , identifier[Caster] operator[SEP] identifier[toDouble] operator[SEP] identifier[d] operator[SEP] identifier[getMetaCacheTimeout] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pageContext] operator[SEP] identifier[setVariable] operator[SEP] identifier[getString] operator[SEP] literal[String] , identifier[action] , literal[String] operator[SEP] , identifier[qry] operator[SEP] operator[SEP] }
public static Long getMonth1stDay() { cal.setTimeInMillis(System.currentTimeMillis()); cal.set(Calendar.DATE, 1); return cal.getTimeInMillis(); }
class class_name[name] begin[{] method[getMonth1stDay, return_type[type[Long]], modifier[public static], parameter[]] begin[{] call[cal.setTimeInMillis, parameter[call[System.currentTimeMillis, parameter[]]]] call[cal.set, parameter[member[Calendar.DATE], literal[1]]] return[call[cal.getTimeInMillis, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Long] identifier[getMonth1stDay] operator[SEP] operator[SEP] { identifier[cal] operator[SEP] identifier[setTimeInMillis] operator[SEP] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[cal] operator[SEP] identifier[set] operator[SEP] identifier[Calendar] operator[SEP] identifier[DATE] , Other[1] operator[SEP] operator[SEP] Keyword[return] identifier[cal] operator[SEP] identifier[getTimeInMillis] operator[SEP] operator[SEP] operator[SEP] }
public @Nonnull Optional<InputStream> getResourceAsStream(@Nonnull String path) { ArgumentUtils.requireNonNull("path", path); Optional<ResourceLoader> resourceLoader = getSupportingLoader(path); if (resourceLoader.isPresent()) { return resourceLoader.get().getResourceAsStream(path); } return Optional.empty(); }
class class_name[name] begin[{] method[getResourceAsStream, return_type[type[Optional]], modifier[public], parameter[path]] begin[{] call[ArgumentUtils.requireNonNull, parameter[literal["path"], member[.path]]] local_variable[type[Optional], resourceLoader] if[call[resourceLoader.isPresent, parameter[]]] begin[{] return[call[resourceLoader.get, parameter[]]] else begin[{] None end[}] return[call[Optional.empty, parameter[]]] end[}] END[}]
Keyword[public] annotation[@] identifier[Nonnull] identifier[Optional] operator[<] identifier[InputStream] operator[>] identifier[getResourceAsStream] operator[SEP] annotation[@] identifier[Nonnull] identifier[String] identifier[path] operator[SEP] { identifier[ArgumentUtils] operator[SEP] identifier[requireNonNull] operator[SEP] literal[String] , identifier[path] operator[SEP] operator[SEP] identifier[Optional] operator[<] identifier[ResourceLoader] operator[>] identifier[resourceLoader] operator[=] identifier[getSupportingLoader] operator[SEP] identifier[path] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[resourceLoader] operator[SEP] identifier[isPresent] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[resourceLoader] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[getResourceAsStream] operator[SEP] identifier[path] operator[SEP] operator[SEP] } Keyword[return] identifier[Optional] operator[SEP] identifier[empty] operator[SEP] operator[SEP] operator[SEP] }
@Indexable(type = IndexableType.REINDEX) @Override public CommerceCurrency addCommerceCurrency( CommerceCurrency commerceCurrency) { commerceCurrency.setNew(true); return commerceCurrencyPersistence.update(commerceCurrency); }
class class_name[name] begin[{] method[addCommerceCurrency, return_type[type[CommerceCurrency]], modifier[public], parameter[commerceCurrency]] begin[{] call[commerceCurrency.setNew, parameter[literal[true]]] return[call[commerceCurrencyPersistence.update, parameter[member[.commerceCurrency]]]] end[}] END[}]
annotation[@] identifier[Indexable] operator[SEP] identifier[type] operator[=] identifier[IndexableType] operator[SEP] identifier[REINDEX] operator[SEP] annotation[@] identifier[Override] Keyword[public] identifier[CommerceCurrency] identifier[addCommerceCurrency] operator[SEP] identifier[CommerceCurrency] identifier[commerceCurrency] operator[SEP] { identifier[commerceCurrency] operator[SEP] identifier[setNew] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[return] identifier[commerceCurrencyPersistence] operator[SEP] identifier[update] operator[SEP] identifier[commerceCurrency] operator[SEP] operator[SEP] }
private void addPoints(final List<GeoPoint> pPoints, final double pBeginLat, final double pBeginLon, final double pEndLat, final double pEndLon) { final double increment = 10; // in degrees pPoints.add(new GeoPoint(pBeginLat, pBeginLon)); double lat = pBeginLat; double lon = pBeginLon; double incLat = pBeginLat == pEndLat ? 0 : pBeginLat < pEndLat ? increment : -increment; double incLon = pBeginLon == pEndLon ? 0 : pBeginLon < pEndLon ? increment : -increment; while (true) { if (incLat != 0) { lat += incLat; if (incLat < 0) { if (lat < pEndLat) { break; } } else { if (lat > pEndLat) { break; } } } if (incLon != 0) { lon += incLon; if (incLon < 0) { if (lon < pEndLon) { break; } } else { if (lon > pEndLon) { break; } } } pPoints.add(new GeoPoint(lat, lon)); } pPoints.add(new GeoPoint(pEndLat, pEndLon)); }
class class_name[name] begin[{] method[addPoints, return_type[void], modifier[private], parameter[pPoints, pBeginLat, pBeginLon, pEndLat, pEndLon]] begin[{] local_variable[type[double], increment] call[pPoints.add, parameter[ClassCreator(arguments=[MemberReference(member=pBeginLat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pBeginLon, 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=GeoPoint, sub_type=None))]] local_variable[type[double], lat] local_variable[type[double], lon] local_variable[type[double], incLat] local_variable[type[double], incLon] while[literal[true]] begin[{] if[binary_operation[member[.incLat], !=, literal[0]]] begin[{] assign[member[.lat], member[.incLat]] if[binary_operation[member[.incLat], <, literal[0]]] begin[{] if[binary_operation[member[.lat], <, member[.pEndLat]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] else begin[{] if[binary_operation[member[.lat], >, member[.pEndLat]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] end[}] else begin[{] None end[}] if[binary_operation[member[.incLon], !=, literal[0]]] begin[{] assign[member[.lon], member[.incLon]] if[binary_operation[member[.incLon], <, literal[0]]] begin[{] if[binary_operation[member[.lon], <, member[.pEndLon]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] else begin[{] if[binary_operation[member[.lon], >, member[.pEndLon]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] end[}] else begin[{] None end[}] call[pPoints.add, parameter[ClassCreator(arguments=[MemberReference(member=lat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lon, 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=GeoPoint, sub_type=None))]] end[}] call[pPoints.add, parameter[ClassCreator(arguments=[MemberReference(member=pEndLat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pEndLon, 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=GeoPoint, sub_type=None))]] end[}] END[}]
Keyword[private] Keyword[void] identifier[addPoints] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[GeoPoint] operator[>] identifier[pPoints] , Keyword[final] Keyword[double] identifier[pBeginLat] , Keyword[final] Keyword[double] identifier[pBeginLon] , Keyword[final] Keyword[double] identifier[pEndLat] , Keyword[final] Keyword[double] identifier[pEndLon] operator[SEP] { Keyword[final] Keyword[double] identifier[increment] operator[=] Other[10] operator[SEP] identifier[pPoints] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[GeoPoint] operator[SEP] identifier[pBeginLat] , identifier[pBeginLon] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[lat] operator[=] identifier[pBeginLat] operator[SEP] Keyword[double] identifier[lon] operator[=] identifier[pBeginLon] operator[SEP] Keyword[double] identifier[incLat] operator[=] identifier[pBeginLat] operator[==] identifier[pEndLat] operator[?] Other[0] operator[:] identifier[pBeginLat] operator[<] identifier[pEndLat] operator[?] identifier[increment] operator[:] operator[-] identifier[increment] operator[SEP] Keyword[double] identifier[incLon] operator[=] identifier[pBeginLon] operator[==] identifier[pEndLon] operator[?] Other[0] operator[:] identifier[pBeginLon] operator[<] identifier[pEndLon] operator[?] identifier[increment] operator[:] operator[-] identifier[increment] operator[SEP] Keyword[while] operator[SEP] literal[boolean] operator[SEP] { Keyword[if] operator[SEP] identifier[incLat] operator[!=] Other[0] operator[SEP] { identifier[lat] operator[+=] identifier[incLat] operator[SEP] Keyword[if] operator[SEP] identifier[incLat] operator[<] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[lat] operator[<] identifier[pEndLat] operator[SEP] { Keyword[break] operator[SEP] } } Keyword[else] { Keyword[if] operator[SEP] identifier[lat] operator[>] identifier[pEndLat] operator[SEP] { Keyword[break] operator[SEP] } } } Keyword[if] operator[SEP] identifier[incLon] operator[!=] Other[0] operator[SEP] { identifier[lon] operator[+=] identifier[incLon] operator[SEP] Keyword[if] operator[SEP] identifier[incLon] operator[<] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[lon] operator[<] identifier[pEndLon] operator[SEP] { Keyword[break] operator[SEP] } } Keyword[else] { Keyword[if] operator[SEP] identifier[lon] operator[>] identifier[pEndLon] operator[SEP] { Keyword[break] operator[SEP] } } } identifier[pPoints] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[GeoPoint] operator[SEP] identifier[lat] , identifier[lon] operator[SEP] operator[SEP] operator[SEP] } identifier[pPoints] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[GeoPoint] operator[SEP] identifier[pEndLat] , identifier[pEndLon] operator[SEP] operator[SEP] operator[SEP] }