code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
@Override protected void addFileInput(CmsFileInput fileInput) { // add the files selected by the user to the list of files to upload if (fileInput != null) { m_inputsToUpload.put(fileInput.getFiles()[0].getFileName(), fileInput); } super.addFileInput(fileInput); }
class class_name[name] begin[{] method[addFileInput, return_type[void], modifier[protected], parameter[fileInput]] begin[{] if[binary_operation[member[.fileInput], !=, literal[null]]] begin[{] call[m_inputsToUpload.put, parameter[call[fileInput.getFiles, parameter[]], me...
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[addFileInput] operator[SEP] identifier[CmsFileInput] identifier[fileInput] operator[SEP] { Keyword[if] operator[SEP] identifier[fileInput] operator[!=] Other[null] operator[SEP] { identifier[m_inputsToUpload] operator[SEP] ...
public void addClientInterceptor(InterceptorFactory interceptorFactory, int priority) { for (Method method : proxyFactory.getCachedMethods()) { addClientInterceptor(method, interceptorFactory, priority); } }
class class_name[name] begin[{] method[addClientInterceptor, return_type[void], modifier[public], parameter[interceptorFactory, priority]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=method, postfix_...
Keyword[public] Keyword[void] identifier[addClientInterceptor] operator[SEP] identifier[InterceptorFactory] identifier[interceptorFactory] , Keyword[int] identifier[priority] operator[SEP] { Keyword[for] operator[SEP] identifier[Method] identifier[method] operator[:] identifier[proxyFactory] operator[SEP] iden...
public Q setObject(final String param, final Object object, final int targetSqlType) { initPrepared(); final int[] positions = query.getNamedParameterIndices(param); try { for (final int position : positions) { preparedStatement.setObject(position, object, targetSqlType); } } catch (SQLException sex) ...
class class_name[name] begin[{] method[setObject, return_type[type[Q]], modifier[public], parameter[param, object, targetSqlType]] begin[{] call[.initPrepared, parameter[]] local_variable[type[int], positions] TryStatement(block=[ForStatement(body=BlockStatement(label=None, stat...
Keyword[public] identifier[Q] identifier[setObject] operator[SEP] Keyword[final] identifier[String] identifier[param] , Keyword[final] identifier[Object] identifier[object] , Keyword[final] Keyword[int] identifier[targetSqlType] operator[SEP] { identifier[initPrepared] operator[SEP] operator[SEP] operator[SEP]...
public Map<String, Float> findSynonyms(String target, int cnt) { float[] vec = transform(target); if ((vec == null) || (cnt == 0)) return Collections.emptyMap(); int[] synonyms = new int[cnt]; float[] scores = new float[cnt]; int min = 0; for (int i = 0; i < cnt; i++) { synonyms[...
class class_name[name] begin[{] method[findSynonyms, return_type[type[Map]], modifier[public], parameter[target, cnt]] begin[{] local_variable[type[float], vec] if[binary_operation[binary_operation[member[.vec], ==, literal[null]], ||, binary_operation[member[.cnt], ==, literal[0]]]] be...
Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Float] operator[>] identifier[findSynonyms] operator[SEP] identifier[String] identifier[target] , Keyword[int] identifier[cnt] operator[SEP] { Keyword[float] operator[SEP] operator[SEP] identifier[vec] operator[=] identifier[transform]...
public void setOAPosID(Integer newOAPosID) { Integer oldOAPosID = oaPosID; oaPosID = newOAPosID; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.OBP__OA_POS_ID, oldOAPosID, oaPosID)); }
class class_name[name] begin[{] method[setOAPosID, return_type[void], modifier[public], parameter[newOAPosID]] begin[{] local_variable[type[Integer], oldOAPosID] assign[member[.oaPosID], member[.newOAPosID]] if[call[.eNotificationRequired, parameter[]]] begin[{] ...
Keyword[public] Keyword[void] identifier[setOAPosID] operator[SEP] identifier[Integer] identifier[newOAPosID] operator[SEP] { identifier[Integer] identifier[oldOAPosID] operator[=] identifier[oaPosID] operator[SEP] identifier[oaPosID] operator[=] identifier[newOAPosID] operator[SEP] Keyword[if] operator[SEP] ide...
@Nonnull public PDFont loadPDFont (@Nonnull final PDDocument aDoc) throws IOException { if (m_aFont != null) { // Pre-defined font return m_aFont; } PDFont ret = null; if (m_aTTF != null) ret = PDType0Font.load (aDoc, m_aTTF, m_bEmbed); else if (m_aOTF != null) ...
class class_name[name] begin[{] method[loadPDFont, return_type[type[PDFont]], modifier[public], parameter[aDoc]] begin[{] if[binary_operation[member[.m_aFont], !=, literal[null]]] begin[{] return[member[.m_aFont]] else begin[{] None end[}] local_variable[type...
annotation[@] identifier[Nonnull] Keyword[public] identifier[PDFont] identifier[loadPDFont] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[PDDocument] identifier[aDoc] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[m_aFont] operator[!=] Oth...
public static String decode(String str) { try { return URLDecoder.decode(str, "UTF-8"); } catch (UnsupportedEncodingException e) { //should never happen throw new RuntimeException(e); } }
class class_name[name] begin[{] method[decode, return_type[type[String]], modifier[public static], parameter[str]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=str, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Litera...
Keyword[public] Keyword[static] identifier[String] identifier[decode] operator[SEP] identifier[String] identifier[str] operator[SEP] { Keyword[try] { Keyword[return] identifier[URLDecoder] operator[SEP] identifier[decode] operator[SEP] identifier[str] , literal[String] operator[SEP] operator[SEP] ...
public static int[] imageOffsets(double radius, int imgWidth) { double PI2 = Math.PI * 2.0; double circumference = PI2 * radius; int num = (int) Math.ceil(circumference); num = num - num % 4; double angleStep = PI2 / num; int temp[] = new int[(int) Math.ceil(circumference)]; int i = 0; int prev =...
class class_name[name] begin[{] method[imageOffsets, return_type[type[int]], modifier[public static], parameter[radius, imgWidth]] begin[{] local_variable[type[double], PI2] local_variable[type[double], circumference] local_variable[type[int], num] assign[member[.num], b...
Keyword[public] Keyword[static] Keyword[int] operator[SEP] operator[SEP] identifier[imageOffsets] operator[SEP] Keyword[double] identifier[radius] , Keyword[int] identifier[imgWidth] operator[SEP] { Keyword[double] identifier[PI2] operator[=] identifier[Math] operator[SEP] identifier[PI] operator[*] literal[Flo...
private static XMLStreamException missingRequiredElement(final XMLStreamReader reader, final Set<?> required) { final StringBuilder builder = new StringBuilder(); Iterator<?> iterator = required.iterator(); while (iterator.hasNext()) { final Object o = iterator.next(); bu...
class class_name[name] begin[{] method[missingRequiredElement, return_type[type[XMLStreamException]], modifier[private static], parameter[reader, required]] begin[{] local_variable[type[StringBuilder], builder] local_variable[type[Iterator], iterator] while[call[iterator.hasNext...
Keyword[private] Keyword[static] identifier[XMLStreamException] identifier[missingRequiredElement] operator[SEP] Keyword[final] identifier[XMLStreamReader] identifier[reader] , Keyword[final] identifier[Set] operator[<] operator[?] operator[>] identifier[required] operator[SEP] { Keyword[final] identifier[Strin...
final public void logicalAndExpression() throws ParseException { inclusiveOrExpression(); label_3: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case 7: case 8: ; break; default: jj_la1[5] = jj_gen; break label_3; } switch ((jj_ntk...
class class_name[name] begin[{] method[logicalAndExpression, return_type[void], modifier[final public], parameter[]] begin[{] call[.inclusiveOrExpression, parameter[]] while[literal[true]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_oper...
Keyword[final] Keyword[public] Keyword[void] identifier[logicalAndExpression] operator[SEP] operator[SEP] Keyword[throws] identifier[ParseException] { identifier[inclusiveOrExpression] operator[SEP] operator[SEP] operator[SEP] identifier[label_3] operator[:] Keyword[while] operator[SEP] literal[boolean] operato...
private void firePropertyLoaded(T property) { PropertyEvent<T> event = null; for (PropertyListener<T> l : listeners) { if (event == null) { event = new PropertyEvent<T>(this, property); } l.loaded(event); }...
class class_name[name] begin[{] method[firePropertyLoaded, return_type[void], modifier[private], parameter[property]] begin[{] local_variable[type[PropertyEvent], event] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(membe...
Keyword[private] Keyword[void] identifier[firePropertyLoaded] operator[SEP] identifier[T] identifier[property] operator[SEP] { identifier[PropertyEvent] operator[<] identifier[T] operator[>] identifier[event] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[PropertyListener] operator[<...
protected void logWebServiceMessage(String logMessage, WebServiceMessage message, boolean incoming) { ByteArrayOutputStream os = new ByteArrayOutputStream(); try { message.writeTo(os); logMessage(logMessage, os.toString(), incoming); } catch (IOException e) { ...
class class_name[name] begin[{] method[logWebServiceMessage, return_type[void], modifier[protected], parameter[logMessage, message, incoming]] begin[{] local_variable[type[ByteArrayOutputStream], os] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(...
Keyword[protected] Keyword[void] identifier[logWebServiceMessage] operator[SEP] identifier[String] identifier[logMessage] , identifier[WebServiceMessage] identifier[message] , Keyword[boolean] identifier[incoming] operator[SEP] { identifier[ByteArrayOutputStream] identifier[os] operator[=] Keyword[new] identif...
@SuppressWarnings({ "unchecked", "rawtypes" }) private void mapToMap(Map source, Map dest) { if (null != dest && null != source) { dest.putAll(source); } }
class class_name[name] begin[{] method[mapToMap, return_type[void], modifier[private], parameter[source, dest]] begin[{] if[binary_operation[binary_operation[literal[null], !=, member[.dest]], &&, binary_operation[literal[null], !=, member[.source]]]] begin[{] call[dest....
annotation[@] identifier[SuppressWarnings] operator[SEP] { literal[String] , literal[String] } operator[SEP] Keyword[private] Keyword[void] identifier[mapToMap] operator[SEP] identifier[Map] identifier[source] , identifier[Map] identifier[dest] operator[SEP] { Keyword[if] operator[SEP] Other[null] op...
private void go() { if (navigateEvent != null) { navigationManager.postEvent2C(navigateEvent); if (navigationManager.logger.isTraceEnabled()) { if (navigateEvent instanceof NavigationManager.Event.OnLocationForward) { NavigationManager.Event.OnLocatio...
class class_name[name] begin[{] method[go, return_type[void], modifier[private], parameter[]] begin[{] if[binary_operation[member[.navigateEvent], !=, literal[null]]] begin[{] call[navigationManager.postEvent2C, parameter[member[.navigateEvent]]] ...
Keyword[private] Keyword[void] identifier[go] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[navigateEvent] operator[!=] Other[null] operator[SEP] { identifier[navigationManager] operator[SEP] identifier[postEvent2C] operator[SEP] identifier[navigateEvent] operator[SEP] operator[SE...
private void addCssHeadlines(final PrintWriter writer, final List cssHeadlines) { if (cssHeadlines == null || cssHeadlines.isEmpty()) { return; } writer.write("<!-- Start css headlines -->" + "\n<style type=\"" + WebUtilities.CONTENT_TYPE_CSS + "\" media=\"screen\">"); for (Object line : cssHeadlines) ...
class class_name[name] begin[{] method[addCssHeadlines, return_type[void], modifier[private], parameter[writer, cssHeadlines]] begin[{] if[binary_operation[binary_operation[member[.cssHeadlines], ==, literal[null]], ||, call[cssHeadlines.isEmpty, parameter[]]]] begin[{] return[None]...
Keyword[private] Keyword[void] identifier[addCssHeadlines] operator[SEP] Keyword[final] identifier[PrintWriter] identifier[writer] , Keyword[final] identifier[List] identifier[cssHeadlines] operator[SEP] { Keyword[if] operator[SEP] identifier[cssHeadlines] operator[==] Other[null] operator[||] identifier[cssHea...
protected CmsObject initCmsObject(HttpServletRequest req, HttpServletResponse res, boolean allowPrivilegedLogin) throws IOException, CmsException { // first try to restore a stored session CmsObject cms = initCmsObjectFromSession(req); if (cms != null) { return cms; } ...
class class_name[name] begin[{] method[initCmsObject, return_type[type[CmsObject]], modifier[protected], parameter[req, res, allowPrivilegedLogin]] begin[{] local_variable[type[CmsObject], cms] if[binary_operation[member[.cms], !=, literal[null]]] begin[{] return[member[.cms...
Keyword[protected] identifier[CmsObject] identifier[initCmsObject] operator[SEP] identifier[HttpServletRequest] identifier[req] , identifier[HttpServletResponse] identifier[res] , Keyword[boolean] identifier[allowPrivilegedLogin] operator[SEP] Keyword[throws] identifier[IOException] , identifier[CmsException] { ...
protected static void main(String args[]) { int from = Integer.parseInt(args[0]); int to = Integer.parseInt(args[1]); statistics(from,to); }
class class_name[name] begin[{] method[main, return_type[void], modifier[static protected], parameter[args]] begin[{] local_variable[type[int], from] local_variable[type[int], to] call[.statistics, parameter[member[.from], member[.to]]] end[}] END[}]
Keyword[protected] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] identifier[args] operator[SEP] operator[SEP] operator[SEP] { Keyword[int] identifier[from] operator[=] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[args] operator[SEP] Other[0] op...
public void marshall(DeleteScalingPlanRequest deleteScalingPlanRequest, ProtocolMarshaller protocolMarshaller) { if (deleteScalingPlanRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(deleteS...
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[deleteScalingPlanRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.deleteScalingPlanRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(argument...
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DeleteScalingPlanRequest] identifier[deleteScalingPlanRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[deleteScalingPlanRequest] operator[==] Other[null] opera...
public String getCharset(String contentType) { String charSet = knownCharsets.get(contentType); if (charSet != null) { return charSet; } // Special cases if (contentType.startsWith("text/") || contentType.endsWith("+json") || contentType.endsWith("+xml")) { return "UTF-8"; } re...
class class_name[name] begin[{] method[getCharset, return_type[type[String]], modifier[public], parameter[contentType]] begin[{] local_variable[type[String], charSet] if[binary_operation[member[.charSet], !=, literal[null]]] begin[{] return[member[.charSet]] else beg...
Keyword[public] identifier[String] identifier[getCharset] operator[SEP] identifier[String] identifier[contentType] operator[SEP] { identifier[String] identifier[charSet] operator[=] identifier[knownCharsets] operator[SEP] identifier[get] operator[SEP] identifier[contentType] operator[SEP] operator[SEP] Keyword[i...
protected static void mergeLists(List<Address> dest, List<Address> src) { for (Address node : src) { if (!dest.contains(node)) { dest.add(node); } } }
class class_name[name] begin[{] method[mergeLists, return_type[void], modifier[static protected], parameter[dest, src]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=node, postfix_operators=[], prefix_operators...
Keyword[protected] Keyword[static] Keyword[void] identifier[mergeLists] operator[SEP] identifier[List] operator[<] identifier[Address] operator[>] identifier[dest] , identifier[List] operator[<] identifier[Address] operator[>] identifier[src] operator[SEP] { Keyword[for] operator[SEP] identifier[Address] identi...
protected void createKafkaTopics(Set<String> topics) { Map<String, Object> adminConfigs = new HashMap<>(); adminConfigs.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:" + kafkaServerPort); try (AdminClient admin = AdminClient.create(adminConfigs)) { List<NewTopic> newTopi...
class class_name[name] begin[{] method[createKafkaTopics, return_type[void], modifier[protected], parameter[topics]] begin[{] local_variable[type[Map], adminConfigs] call[adminConfigs.put, parameter[member[AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG], binary_operation[literal["localhost:...
Keyword[protected] Keyword[void] identifier[createKafkaTopics] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] identifier[topics] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[adminConfigs] operator[=] Keyword[new] identifier[...
public String parse(String expression) throws InvalidExpressionException { this.expression = expression; try { var = check(); } catch (InvalidExpressionException e) { e.printStackTrace(); } this.expression = formatString(expression); System.out....
class class_name[name] begin[{] method[parse, return_type[type[String]], modifier[public], parameter[expression]] begin[{] assign[THIS[member[None.expression]], member[.expression]] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=var, pos...
Keyword[public] identifier[String] identifier[parse] operator[SEP] identifier[String] identifier[expression] operator[SEP] Keyword[throws] identifier[InvalidExpressionException] { Keyword[this] operator[SEP] identifier[expression] operator[=] identifier[expression] operator[SEP] Keyword[try] { identif...
protected void setFileFilter() { String[] extensions = m_model.getExtensions(); for (String extension : extensions) { m_fileChooser.setFileFilter(new FileNameExtensionFilter(extension.toUpperCase() + " Files", extension)); } m_fileChooser.setFileFilter(new FileNameExtensionFilt...
class class_name[name] begin[{] method[setFileFilter, return_type[void], modifier[protected], parameter[]] begin[{] local_variable[type[String], extensions] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments...
Keyword[protected] Keyword[void] identifier[setFileFilter] operator[SEP] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[extensions] operator[=] identifier[m_model] operator[SEP] identifier[getExtensions] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[St...
private void setupCommandCallbacks() { commandCallbacks = new HashMap<>(); commandCallbacks.put("info", new DoNothingCommandCallback()); // TODO: hb is not ping:pong final ConnectionHeartbeatCallback pong = new ConnectionHeartbeatCallback(); pong.onHeartbeatEvent(l -> this.updateConnectionHeartbeat()); com...
class class_name[name] begin[{] method[setupCommandCallbacks, return_type[void], modifier[private], parameter[]] begin[{] assign[member[.commandCallbacks], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors...
Keyword[private] Keyword[void] identifier[setupCommandCallbacks] operator[SEP] operator[SEP] { identifier[commandCallbacks] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[commandCallbacks] operator[SEP] identifier[put] operator[SEP] liter...
public Set<Classification> getChildClassifications() throws CacheReloadException { final Set<Classification> ret = new HashSet<>(); for (final Long id : this.children) { final Classification child = Classification.get(id); ret.add(child); } return Coll...
class class_name[name] begin[{] method[getChildClassifications, return_type[type[Set]], modifier[public], parameter[]] begin[{] local_variable[type[Set], ret] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimens...
Keyword[public] identifier[Set] operator[<] identifier[Classification] operator[>] identifier[getChildClassifications] operator[SEP] operator[SEP] Keyword[throws] identifier[CacheReloadException] { Keyword[final] identifier[Set] operator[<] identifier[Classification] operator[>] identifier[ret] operator[=] Keywo...
public void trimToSize() { this.modCount++; final int oldCapacity = this.data.length; if (this.size < oldCapacity) { this.data = Arrays.copyOf(this.data, this.size); } }
class class_name[name] begin[{] method[trimToSize, return_type[void], modifier[public], parameter[]] begin[{] THIS[member[None.modCount]] local_variable[type[int], oldCapacity] if[binary_operation[THIS[member[None.size]], <, member[.oldCapacity]]] begin[{] ...
Keyword[public] Keyword[void] identifier[trimToSize] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[modCount] operator[++] operator[SEP] Keyword[final] Keyword[int] identifier[oldCapacity] operator[=] Keyword[this] operator[SEP] identifier[data] operator[SEP] identifier[length] operator[SEP...
protected ApplicationInfoRequest buildApplicationRequest(String appName) { ApplicationInfoRequest applicationInfoRequest = new ApplicationInfoRequest(); applicationInfoRequest.setAppName(appName); return applicationInfoRequest; }
class class_name[name] begin[{] method[buildApplicationRequest, return_type[type[ApplicationInfoRequest]], modifier[protected], parameter[appName]] begin[{] local_variable[type[ApplicationInfoRequest], applicationInfoRequest] call[applicationInfoRequest.setAppName, parameter[member[.app...
Keyword[protected] identifier[ApplicationInfoRequest] identifier[buildApplicationRequest] operator[SEP] identifier[String] identifier[appName] operator[SEP] { identifier[ApplicationInfoRequest] identifier[applicationInfoRequest] operator[=] Keyword[new] identifier[ApplicationInfoRequest] operator[SEP] operator[S...
protected List<String> getPages() { if (m_pages == null) { m_pages = Arrays.asList(getPageArray()); } return m_pages; }
class class_name[name] begin[{] method[getPages, return_type[type[List]], modifier[protected], parameter[]] begin[{] if[binary_operation[member[.m_pages], ==, literal[null]]] begin[{] assign[member[.m_pages], call[Arrays.asList, parameter[call[.getPageArray, parameter[]]...
Keyword[protected] identifier[List] operator[<] identifier[String] operator[>] identifier[getPages] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[m_pages] operator[==] Other[null] operator[SEP] { identifier[m_pages] operator[=] identifier[Arrays] operator[SEP] identifier[asList] o...
public void marshall(DeletePhoneNumberRequest deletePhoneNumberRequest, ProtocolMarshaller protocolMarshaller) { if (deletePhoneNumberRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(deleteP...
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[deletePhoneNumberRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.deletePhoneNumberRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(argument...
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DeletePhoneNumberRequest] identifier[deletePhoneNumberRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[deletePhoneNumberRequest] operator[==] Other[null] opera...
public static <K, V> EntryStream<K, V> of(Map<K, V> map) { return of(map.entrySet().stream()); }
class class_name[name] begin[{] method[of, return_type[type[EntryStream]], modifier[public static], parameter[map]] begin[{] return[call[.of, parameter[call[map.entrySet, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] identifier[EntryStream] operator[<] identifier[K] , identifier[V] operator[>] identifier[of] operator[SEP] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] identifier[map] operator[SEP] { Keyword[return]...
@Deprecated public int getDayOfWeekType(int dayOfWeek) { if (dayOfWeek < SUNDAY || dayOfWeek > SATURDAY) { throw new IllegalArgumentException("Invalid day of week"); } if (weekendOnset == weekendCease) { if (dayOfWeek != weekendOnset) return WEEKDAY; ...
class class_name[name] begin[{] method[getDayOfWeekType, return_type[type[int]], modifier[public], parameter[dayOfWeek]] begin[{] if[binary_operation[binary_operation[member[.dayOfWeek], <, member[.SUNDAY]], ||, binary_operation[member[.dayOfWeek], >, member[.SATURDAY]]]] begin[{] T...
annotation[@] identifier[Deprecated] Keyword[public] Keyword[int] identifier[getDayOfWeekType] operator[SEP] Keyword[int] identifier[dayOfWeek] operator[SEP] { Keyword[if] operator[SEP] identifier[dayOfWeek] operator[<] identifier[SUNDAY] operator[||] identifier[dayOfWeek] operator[>] identifier[SATURDAY] operat...
public static String getAsterisks(int length) { if (length < 1) return ""; StringBuilder sb = new StringBuilder(); for (int i = 0; i < length; i++) { sb.append("*"); } return sb.toString(); }
class class_name[name] begin[{] method[getAsterisks, return_type[type[String]], modifier[public static], parameter[length]] begin[{] if[binary_operation[member[.length], <, literal[1]]] begin[{] return[literal[""]] else begin[{] None end[}] local_variable[type[StringBuil...
Keyword[public] Keyword[static] identifier[String] identifier[getAsterisks] operator[SEP] Keyword[int] identifier[length] operator[SEP] { Keyword[if] operator[SEP] identifier[length] operator[<] Other[1] operator[SEP] Keyword[return] literal[String] operator[SEP] identifier[StringBuilder] identifier[sb] operator...
public String getHost() { String host = Util.getLocalHostAddress(); try { URL u = new URL("http", host, 80, "/"); return u.getHost(); } catch (MalformedURLException e) { return host; } }
class class_name[name] begin[{] method[getHost, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[String], host] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[L...
Keyword[public] identifier[String] identifier[getHost] operator[SEP] operator[SEP] { identifier[String] identifier[host] operator[=] identifier[Util] operator[SEP] identifier[getLocalHostAddress] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[URL] identifier[u] operator[=] Keyword...
@Override public InjectionTarget[] getInjectionTargets(final Class<?> classToInjectInto) throws InjectionException { // This method attempts to cache the InjectTargets that are associated // with the specified class, so that if this method is invoked again and // the same class is specified,...
class class_name[name] begin[{] method[getInjectionTargets, return_type[type[InjectionTarget]], modifier[public], parameter[classToInjectInto]] begin[{] local_variable[type[boolean], isTraceOn] if[binary_operation[member[.isTraceOn], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] ...
annotation[@] identifier[Override] Keyword[public] identifier[InjectionTarget] operator[SEP] operator[SEP] identifier[getInjectionTargets] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[classToInjectInto] operator[SEP] Keyword[throws] identifier[InjectionException] { ...
public StrBuilder appendFixedWidthPadLeft(final Object obj, final int width, final char padChar) { if (width > 0) { ensureCapacity(size + width); String str = (obj == null ? getNullText() : obj.toString()); if (str == null) { str = StringUtils.EMPTY; ...
class class_name[name] begin[{] method[appendFixedWidthPadLeft, return_type[type[StrBuilder]], modifier[public], parameter[obj, width, padChar]] begin[{] if[binary_operation[member[.width], >, literal[0]]] begin[{] call[.ensureCapacity, parameter[binary_operation[member[...
Keyword[public] identifier[StrBuilder] identifier[appendFixedWidthPadLeft] operator[SEP] Keyword[final] identifier[Object] identifier[obj] , Keyword[final] Keyword[int] identifier[width] , Keyword[final] Keyword[char] identifier[padChar] operator[SEP] { Keyword[if] operator[SEP] identifier[width] operator[>] O...
@Override public ZooClass defineEmptyClass(String className) { DBTracer.logCall(this, className); checkValidity(true); if (!checkJavaClassNameConformity(className)) { throw new IllegalArgumentException("Not a valid class name: \"" + className + "\""); } return sm.declareSchema(className, null)...
class class_name[name] begin[{] method[defineEmptyClass, return_type[type[ZooClass]], modifier[public], parameter[className]] begin[{] call[DBTracer.logCall, parameter[THIS[], member[.className]]] call[.checkValidity, parameter[literal[true]]] if[call[.checkJavaC...
annotation[@] identifier[Override] Keyword[public] identifier[ZooClass] identifier[defineEmptyClass] operator[SEP] identifier[String] identifier[className] operator[SEP] { identifier[DBTracer] operator[SEP] identifier[logCall] operator[SEP] Keyword[this] , identifier[className] operator[SEP] operator[SEP] ident...
private int toExpires(String expires) throws ExpressionException { String str = StringUtil.toLowerCase(expires.toString()); if (str.equals("now")) return 0; else if (str.equals("never")) return NEVER; else { DateTime dt = DateCaster.toDateAdvanced(expires, DateCaster.CONVERTING_TYPE_NONE, null, null); if ...
class class_name[name] begin[{] method[toExpires, return_type[type[int]], modifier[private], parameter[expires]] begin[{] local_variable[type[String], str] if[call[str.equals, parameter[literal["now"]]]] begin[{] return[literal[0]] else begin[{] if[call[str.equals, p...
Keyword[private] Keyword[int] identifier[toExpires] operator[SEP] identifier[String] identifier[expires] operator[SEP] Keyword[throws] identifier[ExpressionException] { identifier[String] identifier[str] operator[=] identifier[StringUtil] operator[SEP] identifier[toLowerCase] operator[SEP] identifier[expires] op...
protected void initialize() { // TODO(user): Calling clear doesn't deallocate the memory in a // LinkedHashSet. Consider creating a new work set if we plan to repeatedly // call analyze. orderedWorkSet.clear(); for (DiGraphNode<N, Branch> node : cfg.getDirectedGraphNodes()) { node.setAnnotatio...
class class_name[name] begin[{] method[initialize, return_type[void], modifier[protected], parameter[]] begin[{] call[orderedWorkSet.clear, parameter[]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(argum...
Keyword[protected] Keyword[void] identifier[initialize] operator[SEP] operator[SEP] { identifier[orderedWorkSet] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[DiGraphNode] operator[<] identifier[N] , identifier[Branch] operator[>] identifier[node...
@Override public void flush() { for (int index = 0; index < eventConnectors.size(); index++) { EventConnector eventConnector = null; try { eventConnector = eventConnectors.get(index); if (eventConnector instanceof ClientProxy) { ...
class class_name[name] begin[{] method[flush, return_type[void], modifier[public], parameter[]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_oper...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[flush] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[index] operator[=] Other[0] operator[SEP] identifier[index] operator[<] identifier[eventConnectors] operator[SEP] identifier[size] operator[SEP] oper...
@Override public EClass getIfcActionRequest() { if (ifcActionRequestEClass == null) { ifcActionRequestEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI) .getEClassifiers().get(1); } return ifcActionRequestEClass; }
class class_name[name] begin[{] method[getIfcActionRequest, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcActionRequestEClass], ==, literal[null]]] begin[{] assign[member[.ifcActionRequestEClass], Cast(expression=Method...
annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcActionRequest] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcActionRequestEClass] operator[==] Other[null] operator[SEP] { identifier[ifcActionRequestEClass] operator[=] operator[SEP] identif...
private void increaseAndReset() { if (this.hashSize < 30) { this.hashSize += 1; this.hashfunctions.clear(); for (List<Entry<T>> table : this.tables) { this.hashfunctions.add(new DietzfelbingerHash(this.hashSize, this.random)); ((ArrayList<Entry<T>>) table) .ensureCapacity(1 << this.hashSi...
class class_name[name] begin[{] method[increaseAndReset, return_type[void], modifier[private], parameter[]] begin[{] if[binary_operation[THIS[member[None.hashSize]], <, literal[30]]] begin[{] assign[THIS[member[None.hashSize]], literal[1]] THIS[me...
Keyword[private] Keyword[void] identifier[increaseAndReset] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[hashSize] operator[<] Other[30] operator[SEP] { Keyword[this] operator[SEP] identifier[hashSize] operator[+=] Other[1] operator[SEP] Keyword[this] ...
private void moveToNextPartition() { if (this.currentPartitionIdx == INITIAL_PARTITION_IDX) { LOG.info("Pulling topic " + this.topicName); this.currentPartitionIdx = 0; } else { updateStatisticsForCurrentPartition(); this.currentPartitionIdx++; this.currentPartitionRecordCount = 0;...
class class_name[name] begin[{] method[moveToNextPartition, return_type[void], modifier[private], parameter[]] begin[{] if[binary_operation[THIS[member[None.currentPartitionIdx]], ==, member[.INITIAL_PARTITION_IDX]]] begin[{] call[LOG.info, parameter[binary_operation[lit...
Keyword[private] Keyword[void] identifier[moveToNextPartition] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[currentPartitionIdx] operator[==] identifier[INITIAL_PARTITION_IDX] operator[SEP] { identifier[LOG] operator[SEP] identifier[info] operator[SEP]...
@Override public void dataReady() { switch (playState) { case playState_NeedHeaders: LOG.log(Level.FINE, "playState = playState_NeedHeaders"); break; case playState_ReadData: LOG.log(Level.FINE, "playState = playState_ReadData"); ...
class class_name[name] begin[{] method[dataReady, return_type[void], modifier[public], parameter[]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['playState_NeedHeaders'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FINE, postfix_operators=[...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[dataReady] operator[SEP] operator[SEP] { Keyword[switch] operator[SEP] identifier[playState] operator[SEP] { Keyword[case] identifier[playState_NeedHeaders] operator[:] identifier[LOG] operator[SEP] identifier[log] operator[S...
private String subQuery(ByteBuffer buffer) { String queryString; if (options.maxQuerySizeToLog == 0) { queryString = new String(buffer.array(), 5, buffer.limit()); } else { queryString = new String(buffer.array(), 5, Math.min(buffer.limit() - 5, (options.maxQuerySizeToLog * 3))); ...
class class_name[name] begin[{] method[subQuery, return_type[type[String]], modifier[private], parameter[buffer]] begin[{] local_variable[type[String], queryString] if[binary_operation[member[options.maxQuerySizeToLog], ==, literal[0]]] begin[{] assign[member[.qu...
Keyword[private] identifier[String] identifier[subQuery] operator[SEP] identifier[ByteBuffer] identifier[buffer] operator[SEP] { identifier[String] identifier[queryString] operator[SEP] Keyword[if] operator[SEP] identifier[options] operator[SEP] identifier[maxQuerySizeToLog] operator[==] Other[0] operator[SEP] ...
public <T> CompletableFuture<T> apply(long index) { try { // If entries remain to be applied prior to this entry then synchronously apply them. if (index > lastApplied + 1) { applyAll(index - 1); } // Read the entry from the log. If the entry is non-null them apply the entry, otherw...
class class_name[name] begin[{] method[apply, return_type[type[CompletableFuture]], modifier[public], parameter[index]] begin[{] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operand...
Keyword[public] operator[<] identifier[T] operator[>] identifier[CompletableFuture] operator[<] identifier[T] operator[>] identifier[apply] operator[SEP] Keyword[long] identifier[index] operator[SEP] { Keyword[try] { Keyword[if] operator[SEP] identifier[index] operator[>] identifier[lastApplied] opera...
@Override public void validate(ValidationHelper helper, Context context, String key, Components t) { if (t != null) { Map<String, Map<String, ?>> components = new HashMap<String, Map<String, ?>>(); if (t.getCallbacks() != null && !t.getCallbacks().isEmpty()) { compon...
class class_name[name] begin[{] method[validate, return_type[void], modifier[public], parameter[helper, context, key, t]] begin[{] if[binary_operation[member[.t], !=, literal[null]]] begin[{] local_variable[type[Map], components] if[binary_operation[binary_op...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[validate] operator[SEP] identifier[ValidationHelper] identifier[helper] , identifier[Context] identifier[context] , identifier[String] identifier[key] , identifier[Components] identifier[t] operator[SEP] { Keyword[if] operator[SEP] id...
public void setWarning(String value) { if ("default".equalsIgnoreCase(value)) { this.warningLevel = WarningLevel.DEFAULT; } else if ("quiet".equalsIgnoreCase(value)) { this.warningLevel = WarningLevel.QUIET; } else if ("verbose".equalsIgnoreCase(value)) { this.warningLevel = WarningLevel.V...
class class_name[name] begin[{] method[setWarning, return_type[void], modifier[public], parameter[value]] begin[{] if[literal["default"]] begin[{] assign[THIS[member[None.warningLevel]], member[WarningLevel.DEFAULT]] else begin[{] if[literal["quiet"]]...
Keyword[public] Keyword[void] identifier[setWarning] operator[SEP] identifier[String] identifier[value] operator[SEP] { Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[value] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identif...
@Override public Future<Channel> create(final Promise<Channel> channelReadyPromise) { final long delay = this.currentDelaySeconds.get(); channelReadyPromise.addListener(new GenericFutureListener<Future<Channel>>() { @Override public void operationComplete(final Future<Chann...
class class_name[name] begin[{] method[create, return_type[type[Future]], modifier[public], parameter[channelReadyPromise]] begin[{] local_variable[type[long], delay] call[channelReadyPromise.addListener, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotati...
annotation[@] identifier[Override] Keyword[public] identifier[Future] operator[<] identifier[Channel] operator[>] identifier[create] operator[SEP] Keyword[final] identifier[Promise] operator[<] identifier[Channel] operator[>] identifier[channelReadyPromise] operator[SEP] { Keyword[final] Keyword[long] identifier...
private static Object processReturnType(Object proxy, Object target, Method method, Object retVal) { // Massage return value if necessary if (retVal != null && retVal == target && !RawTargetAccess.class.isAssignableFrom(method.getDeclaringClass())) { // Special case: it returned "this". Note...
class class_name[name] begin[{] method[processReturnType, return_type[type[Object]], modifier[private static], parameter[proxy, target, method, retVal]] begin[{] if[binary_operation[binary_operation[binary_operation[member[.retVal], !=, literal[null]], &&, binary_operation[member[.retVal], ==, ...
Keyword[private] Keyword[static] identifier[Object] identifier[processReturnType] operator[SEP] identifier[Object] identifier[proxy] , identifier[Object] identifier[target] , identifier[Method] identifier[method] , identifier[Object] identifier[retVal] operator[SEP] { Keyword[if] operator[SEP] identifier[retV...
@Nonnull @ReturnsMutableCopy public static HasInputStream multiple (@Nonnull final ISupplier <? extends InputStream> aISP) { return new HasInputStream (aISP, true); }
class class_name[name] begin[{] method[multiple, return_type[type[HasInputStream]], modifier[public static], parameter[aISP]] begin[{] return[ClassCreator(arguments=[MemberReference(member=aISP, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_o...
annotation[@] identifier[Nonnull] annotation[@] identifier[ReturnsMutableCopy] Keyword[public] Keyword[static] identifier[HasInputStream] identifier[multiple] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[ISupplier] operator[<] operator[?] Keyword[extends] identifier[InputStream] operator[>]...
@Override protected void validate(List<TableInfo> tableInfos) { for (TableInfo tableInfo : tableInfos) { try { if (!client.tableExists(tableInfo.getTableName())) { throw new SchemaGenerationException("Table: " + tableInf...
class class_name[name] begin[{] method[validate, return_type[void], modifier[protected], parameter[tableInfos]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTableName, pos...
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[validate] operator[SEP] identifier[List] operator[<] identifier[TableInfo] operator[>] identifier[tableInfos] operator[SEP] { Keyword[for] operator[SEP] identifier[TableInfo] identifier[tableInfo] operator[:] identifier[tableInfos] o...
protected boolean downloadFromMavenRepo(File pluginFile, PluginCoordinates coordinates, URI mavenRepoUrl) { String artifactSubPath = PluginUtils.getMavenPath(coordinates); InputStream istream = null; OutputStream ostream = null; try { URL artifactUrl = new URL(mavenRepoUrl.to...
class class_name[name] begin[{] method[downloadFromMavenRepo, return_type[type[boolean]], modifier[protected], parameter[pluginFile, coordinates, mavenRepoUrl]] begin[{] local_variable[type[String], artifactSubPath] local_variable[type[InputStream], istream] local_variable[type[OutputSt...
Keyword[protected] Keyword[boolean] identifier[downloadFromMavenRepo] operator[SEP] identifier[File] identifier[pluginFile] , identifier[PluginCoordinates] identifier[coordinates] , identifier[URI] identifier[mavenRepoUrl] operator[SEP] { identifier[String] identifier[artifactSubPath] operator[=] identifier[Pl...
public void setJobFlowIds(java.util.Collection<String> jobFlowIds) { if (jobFlowIds == null) { this.jobFlowIds = null; return; } this.jobFlowIds = new com.amazonaws.internal.SdkInternalList<String>(jobFlowIds); }
class class_name[name] begin[{] method[setJobFlowIds, return_type[void], modifier[public], parameter[jobFlowIds]] begin[{] if[binary_operation[member[.jobFlowIds], ==, literal[null]]] begin[{] assign[THIS[member[None.jobFlowIds]], literal[null]] return[None] ...
Keyword[public] Keyword[void] identifier[setJobFlowIds] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[jobFlowIds] operator[SEP] { Keyword[if] operator[SEP] identifier[jobFlowIds] operator[==] Other[null] op...
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jTabbedPane1 = new javax.swing.JTabbedPane(); outlierSetupTab = new moa.gui.outliertab.OutlierSetupTab(); outlierVisualTab = new moa.g...
class class_name[name] begin[{] method[initComponents, return_type[void], modifier[private], parameter[]] begin[{] assign[member[.jTabbedPane1], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=R...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[void] identifier[initComponents] operator[SEP] operator[SEP] { identifier[jTabbedPane1] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JTabbedPane] ...
private Set<String> resolveClass(String variableName, String text, Document document) { Set<String> items = new LinkedHashSet<>(); FileObject fo = getFileObject(document); ClassPath sourcePath = ClassPath.getClassPath(fo, ClassPath.SOURCE); ClassPath compilePath = ClassPath.getClassPath(fo, ClassPath.CO...
class class_name[name] begin[{] method[resolveClass, return_type[type[Set]], modifier[private], parameter[variableName, text, document]] begin[{] local_variable[type[Set], items] local_variable[type[FileObject], fo] local_variable[type[ClassPath], sourcePath] local_variable[type...
Keyword[private] identifier[Set] operator[<] identifier[String] operator[>] identifier[resolveClass] operator[SEP] identifier[String] identifier[variableName] , identifier[String] identifier[text] , identifier[Document] identifier[document] operator[SEP] { identifier[Set] operator[<] identifier[String] operato...
static AltResult encodeThrowable(Throwable x) { return new AltResult((x instanceof CompletionException) ? x : new CompletionException(x)); }
class class_name[name] begin[{] method[encodeThrowable, return_type[type[AltResult]], modifier[static], parameter[x]] begin[{] return[ClassCreator(arguments=[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[...
Keyword[static] identifier[AltResult] identifier[encodeThrowable] operator[SEP] identifier[Throwable] identifier[x] operator[SEP] { Keyword[return] Keyword[new] identifier[AltResult] operator[SEP] operator[SEP] identifier[x] Keyword[instanceof] identifier[CompletionException] operator[SEP] operator[?] identifier...
public static boolean isSolvable(EightPuzzleState state) { // Take a copy of the puzzle to check. This is done because this puzzle will be updated in-place and the // original is to be preserved. EightPuzzleState checkState; try { checkState = (EightPuzzleState) ...
class class_name[name] begin[{] method[isSolvable, return_type[type[boolean]], modifier[public static], parameter[state]] begin[{] local_variable[type[EightPuzzleState], checkState] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=checkState, post...
Keyword[public] Keyword[static] Keyword[boolean] identifier[isSolvable] operator[SEP] identifier[EightPuzzleState] identifier[state] operator[SEP] { identifier[EightPuzzleState] identifier[checkState] operator[SEP] Keyword[try] { identifier[checkState] operator[=] operator[SEP] identifier[EightPuzzleS...
public static int[] getBroadcastDimensions(int[] left,int[] right) { if(Arrays.equals(left,right)) return null; int n = Math.min(left.length,right.length); List<Integer> dims = new ArrayList<>(); int leftIdx = left.length - 1; int rightIdx = right.length - 1; ...
class class_name[name] begin[{] method[getBroadcastDimensions, return_type[type[int]], modifier[public static], parameter[left, right]] begin[{] if[call[Arrays.equals, parameter[member[.left], member[.right]]]] begin[{] return[literal[null]] else begin[{] None end[}] loc...
Keyword[public] Keyword[static] Keyword[int] operator[SEP] operator[SEP] identifier[getBroadcastDimensions] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[left] , Keyword[int] operator[SEP] operator[SEP] identifier[right] operator[SEP] { Keyword[if] operator[SEP] identifier[Arrays] operator[S...
public static Object getValueToRender(FacesContext context, UIComponent component) { if (component instanceof ValueHolder) { if (component instanceof EditableValueHolder) { EditableValueHolder input = (EditableValueHolder) component; Object submittedValue = input.getSubmittedValue(); if (submittedVal...
class class_name[name] begin[{] method[getValueToRender, return_type[type[Object]], modifier[public static], parameter[context, component]] begin[{] if[binary_operation[member[.component], instanceof, type[ValueHolder]]] begin[{] if[binary_operation[member[.component], i...
Keyword[public] Keyword[static] identifier[Object] identifier[getValueToRender] operator[SEP] identifier[FacesContext] identifier[context] , identifier[UIComponent] identifier[component] operator[SEP] { Keyword[if] operator[SEP] identifier[component] Keyword[instanceof] identifier[ValueHolder] operator[SEP] { ...
public Datatype.Builder setPropertyEnum(TypeClass propertyEnum) { this.propertyEnum = Objects.requireNonNull(propertyEnum); _unsetProperties.remove(Property.PROPERTY_ENUM); return (Datatype.Builder) this; }
class class_name[name] begin[{] method[setPropertyEnum, return_type[type[Datatype]], modifier[public], parameter[propertyEnum]] begin[{] assign[THIS[member[None.propertyEnum]], call[Objects.requireNonNull, parameter[member[.propertyEnum]]]] call[_unsetProperties.remove, paramete...
Keyword[public] identifier[Datatype] operator[SEP] identifier[Builder] identifier[setPropertyEnum] operator[SEP] identifier[TypeClass] identifier[propertyEnum] operator[SEP] { Keyword[this] operator[SEP] identifier[propertyEnum] operator[=] identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SE...
public static Timestamp of(Date date) { return ofTimeMicroseconds(TimeUnit.MILLISECONDS.toMicros(date.getTime())); }
class class_name[name] begin[{] method[of, return_type[type[Timestamp]], modifier[public static], parameter[date]] begin[{] return[call[.ofTimeMicroseconds, parameter[call[TimeUnit.MILLISECONDS.toMicros, parameter[call[date.getTime, parameter[]]]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Timestamp] identifier[of] operator[SEP] identifier[Date] identifier[date] operator[SEP] { Keyword[return] identifier[ofTimeMicroseconds] operator[SEP] identifier[TimeUnit] operator[SEP] identifier[MILLISECONDS] operator[SEP] identifier[toMicros] operator[SEP] identifier...
@SuppressWarnings({"unused", "WeakerAccess"}) public void pushNotificationViewedEvent(Bundle extras){ if (extras == null || extras.isEmpty() || extras.get(Constants.NOTIFICATION_TAG) == null) { getConfigLogger().debug(getAccountId(), "Push notification: " + (extras == null ? "NULL" : extras.toS...
class class_name[name] begin[{] method[pushNotificationViewedEvent, return_type[void], modifier[public], parameter[extras]] begin[{] if[binary_operation[binary_operation[binary_operation[member[.extras], ==, literal[null]], ||, call[extras.isEmpty, parameter[]]], ||, binary_operation[call[extra...
annotation[@] identifier[SuppressWarnings] operator[SEP] { literal[String] , literal[String] } operator[SEP] Keyword[public] Keyword[void] identifier[pushNotificationViewedEvent] operator[SEP] identifier[Bundle] identifier[extras] operator[SEP] { Keyword[if] operator[SEP] identifier[extras] operator[=...
private String determineHashes(HashingFunction hashFunction) { if (isVirtual) { return null; } try { final File file = getActualFile(); return hashFunction.hash(file); } catch (IOException | RuntimeException ex) { LOGGER.warn("Unable to rea...
class class_name[name] begin[{] method[determineHashes, return_type[type[String]], modifier[private], parameter[hashFunction]] begin[{] if[member[.isVirtual]] begin[{] return[literal[null]] else begin[{] None end[}] TryStatement(block=[LocalVariableDeclaratio...
Keyword[private] identifier[String] identifier[determineHashes] operator[SEP] identifier[HashingFunction] identifier[hashFunction] operator[SEP] { Keyword[if] operator[SEP] identifier[isVirtual] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[try] { Keyword...
@Override public List<Term> getSimilarTerms(Integer contextId, PosType posType, Boolean includeFingerprint, Double sparsity, Model model) throws JsonProcessingException, ApiException { return getSimilarTerms(contextId, posType, null, includeFingerprint, sparsity, model); }
class class_name[name] begin[{] method[getSimilarTerms, return_type[type[List]], modifier[public], parameter[contextId, posType, includeFingerprint, sparsity, model]] begin[{] return[call[.getSimilarTerms, parameter[member[.contextId], member[.posType], literal[null], member[.includeFingerprint], membe...
annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[Term] operator[>] identifier[getSimilarTerms] operator[SEP] identifier[Integer] identifier[contextId] , identifier[PosType] identifier[posType] , identifier[Boolean] identifier[includeFingerprint] , identifier[Double] identifi...
public void deleteCertificate(String resourceGroupName, String certificateOrderName, String name) { deleteCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name).toBlocking().single().body(); }
class class_name[name] begin[{] method[deleteCertificate, return_type[void], modifier[public], parameter[resourceGroupName, certificateOrderName, name]] begin[{] call[.deleteCertificateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.certificateOrderName], member[.name]]]...
Keyword[public] Keyword[void] identifier[deleteCertificate] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[certificateOrderName] , identifier[String] identifier[name] operator[SEP] { identifier[deleteCertificateWithServiceResponseAsync] operator[SEP] identifier[r...
public void printXMLStartElement(String name, Attributes attributes) { try { this.xmlWriter.startElement("", name, name, attributes); } catch (SAXException e) { // TODO: add error log here } }
class class_name[name] begin[{] method[printXMLStartElement, return_type[void], modifier[public], parameter[name, attributes]] begin[{] TryStatement(block=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=xmlWriter, postfix...
Keyword[public] Keyword[void] identifier[printXMLStartElement] operator[SEP] identifier[String] identifier[name] , identifier[Attributes] identifier[attributes] operator[SEP] { Keyword[try] { Keyword[this] operator[SEP] identifier[xmlWriter] operator[SEP] identifier[startElement] operator[SEP] litera...
public boolean canCheckWar(String warName, String url, HttpClient client) { HttpOptions opt = new HttpOptions(url + "/" + warName); try { HttpResponse response = client.execute(opt); if(response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { Header allowHeader[] = response.getHeaders...
class class_name[name] begin[{] method[canCheckWar, return_type[type[boolean]], modifier[public], parameter[warName, url, client]] begin[{] local_variable[type[HttpOptions], opt] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initiali...
Keyword[public] Keyword[boolean] identifier[canCheckWar] operator[SEP] identifier[String] identifier[warName] , identifier[String] identifier[url] , identifier[HttpClient] identifier[client] operator[SEP] { identifier[HttpOptions] identifier[opt] operator[=] Keyword[new] identifier[HttpOptions] operator[SEP] i...
public static int encodeDesc(byte[] value, byte[] dst, int dstOffset) { if (value == null) { dst[dstOffset] = NULL_BYTE_LOW; return 1; } return encode(value, 0, value.length, dst, dstOffset, -1); }
class class_name[name] begin[{] method[encodeDesc, return_type[type[int]], modifier[public static], parameter[value, dst, dstOffset]] begin[{] if[binary_operation[member[.value], ==, literal[null]]] begin[{] assign[member[.dst], member[.NULL_BYTE_LOW]] return...
Keyword[public] Keyword[static] Keyword[int] identifier[encodeDesc] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[value] , Keyword[byte] operator[SEP] operator[SEP] identifier[dst] , Keyword[int] identifier[dstOffset] operator[SEP] { Keyword[if] operator[SEP] identifier[value] operator[==]...
public static H2HeaderField decodeHeader(WsByteBuffer buffer, H2HeaderTable table) throws CompressionException { return decodeHeader(buffer, table, true, false, null); }
class class_name[name] begin[{] method[decodeHeader, return_type[type[H2HeaderField]], modifier[public static], parameter[buffer, table]] begin[{] return[call[.decodeHeader, parameter[member[.buffer], member[.table], literal[true], literal[false], literal[null]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[H2HeaderField] identifier[decodeHeader] operator[SEP] identifier[WsByteBuffer] identifier[buffer] , identifier[H2HeaderTable] identifier[table] operator[SEP] Keyword[throws] identifier[CompressionException] { Keyword[return] identifier[decodeHeader] operator[SEP] ident...
public static int substr_count(final String string, final char character) { int count = 0; int n = string.length(); for(int i=0;i<n;i++) { if(string.charAt(i)==character) { ++count; } } return count; }
class class_name[name] begin[{] method[substr_count, return_type[type[int]], modifier[public static], parameter[string, character]] begin[{] local_variable[type[int], count] local_variable[type[int], n] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=Binar...
Keyword[public] Keyword[static] Keyword[int] identifier[substr_count] operator[SEP] Keyword[final] identifier[String] identifier[string] , Keyword[final] Keyword[char] identifier[character] operator[SEP] { Keyword[int] identifier[count] operator[=] Other[0] operator[SEP] Keyword[int] identifier[n] operator[=] i...
@Override public Object visitStringLiteral(ExcellentParser.StringLiteralContext ctx) { String raw = ctx.STRING().getText(); String val = raw.substring(1, raw.length() - 1); // remove enclosing quotes return val.replaceAll("\"\"", "\""); // un-escape double quotes }
class class_name[name] begin[{] method[visitStringLiteral, return_type[type[Object]], modifier[public], parameter[ctx]] begin[{] local_variable[type[String], raw] local_variable[type[String], val] return[call[val.replaceAll, parameter[literal["\"\""], literal["\""]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[visitStringLiteral] operator[SEP] identifier[ExcellentParser] operator[SEP] identifier[StringLiteralContext] identifier[ctx] operator[SEP] { identifier[String] identifier[raw] operator[=] identifier[ctx] operator[SEP] identifier[STR...
private void createStreams(SecretKey encryptionKey, SecretKey hmacKey, byte[] iv, OutputStream out) throws CryptorException { this.iv = iv; try { Cipher cipher = Cipher.getInstance(AES256JNCryptor.AES_CIPHER_ALGORITHM); cipher.init(Cipher.ENCRYPT_MODE, encryptionKey, new IvParameterSpec(iv))...
class class_name[name] begin[{] method[createStreams, return_type[void], modifier[private], parameter[encryptionKey, hmacKey, iv, out]] begin[{] assign[THIS[member[None.iv]], member[.iv]] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimens...
Keyword[private] Keyword[void] identifier[createStreams] operator[SEP] identifier[SecretKey] identifier[encryptionKey] , identifier[SecretKey] identifier[hmacKey] , Keyword[byte] operator[SEP] operator[SEP] identifier[iv] , identifier[OutputStream] identifier[out] operator[SEP] Keyword[throws] identifier[CryptorExce...
public List<WnsNotificationResponse> pushTile(List<String> channelUris, WnsTile tile) throws WnsException { return this.pushTile(channelUris, null, tile); }
class class_name[name] begin[{] method[pushTile, return_type[type[List]], modifier[public], parameter[channelUris, tile]] begin[{] return[THIS[call[None.pushTile, parameter[member[.channelUris], literal[null], member[.tile]]]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[WnsNotificationResponse] operator[>] identifier[pushTile] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[channelUris] , identifier[WnsTile] identifier[tile] operator[SEP] Keyword[throws] identifier[WnsException] { Keyw...
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "topoSurfaceProperty") public JAXBElement<TopoSurfacePropertyType> createTopoSurfaceProperty(TopoSurfacePropertyType value) { return new JAXBElement<TopoSurfacePropertyType>(_TopoSurfaceProperty_QNAME, TopoSurfacePropertyType.class, null, valu...
class class_name[name] begin[{] method[createTopoSurfaceProperty, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=_TopoSurfaceProperty_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassRef...
annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[TopoSurfacePropertyType] operator[>] identifier[createTopoSurfaceProperty] operator[SEP] i...
public FessMessages addErrorsDesignFileNameIsNotFound(String property) { assertPropertyNotNull(property); add(property, new UserMessage(ERRORS_design_file_name_is_not_found)); return this; }
class class_name[name] begin[{] method[addErrorsDesignFileNameIsNotFound, return_type[type[FessMessages]], modifier[public], parameter[property]] begin[{] call[.assertPropertyNotNull, parameter[member[.property]]] call[.add, parameter[member[.property], ClassCreator(arguments=[M...
Keyword[public] identifier[FessMessages] identifier[addErrorsDesignFileNameIsNotFound] operator[SEP] identifier[String] identifier[property] operator[SEP] { identifier[assertPropertyNotNull] operator[SEP] identifier[property] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[property] , Keywo...
public void deserialize(final BinaryDecoder decoder, final MultiObserver observer, final long sequence) throws IOException, IllegalAccessException, InvocationTargetException { final TMessage message = messageReader.read(null, decoder); if (message != null) { observer.onNext(sequence, message); } ...
class class_name[name] begin[{] method[deserialize, return_type[void], modifier[public], parameter[decoder, observer, sequence]] begin[{] local_variable[type[TMessage], message] if[binary_operation[member[.message], !=, literal[null]]] begin[{] call[observer.onNe...
Keyword[public] Keyword[void] identifier[deserialize] operator[SEP] Keyword[final] identifier[BinaryDecoder] identifier[decoder] , Keyword[final] identifier[MultiObserver] identifier[observer] , Keyword[final] Keyword[long] identifier[sequence] operator[SEP] Keyword[throws] identifier[IOException] , identifier[Illeg...
public void addExcludedlaceId(final String placeId) { if (null == this.countryCodes) { this.excludePlaceIds = new ArrayList<String>(); } this.excludePlaceIds.add(placeId); }
class class_name[name] begin[{] method[addExcludedlaceId, return_type[void], modifier[public], parameter[placeId]] begin[{] if[binary_operation[literal[null], ==, THIS[member[None.countryCodes]]]] begin[{] assign[THIS[member[None.excludePlaceIds]], ClassCreator(arguments...
Keyword[public] Keyword[void] identifier[addExcludedlaceId] operator[SEP] Keyword[final] identifier[String] identifier[placeId] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[==] Keyword[this] operator[SEP] identifier[countryCodes] operator[SEP] { Keyword[this] operator[SEP] identifier...
public static int cudaLaunchHostFunc(cudaStream_t stream, cudaHostFn fn, Object userData) { return checkResult(cudaLaunchHostFuncNative(stream, fn, userData)); }
class class_name[name] begin[{] method[cudaLaunchHostFunc, return_type[type[int]], modifier[public static], parameter[stream, fn, userData]] begin[{] return[call[.checkResult, parameter[call[.cudaLaunchHostFuncNative, parameter[member[.stream], member[.fn], member[.userData]]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[cudaLaunchHostFunc] operator[SEP] identifier[cudaStream_t] identifier[stream] , identifier[cudaHostFn] identifier[fn] , identifier[Object] identifier[userData] operator[SEP] { Keyword[return] identifier[checkResult] operator[SEP] identifier[cudaLaunchHost...
public static String mapToJSONString(Map<?, ?> map) { if (map == null || map.size() == 0) { return "{}"; } StringBuilder sb = new StringBuilder("{"); for (Object o : map.entrySet()) { Entry<?, ?> e = (Entry<?, ?>) o; buildAppendString(sb, e.getKey()).append('='); buildAppendString(sb, e.getValue())....
class class_name[name] begin[{] method[mapToJSONString, return_type[type[String]], modifier[public static], parameter[map]] begin[{] if[binary_operation[binary_operation[member[.map], ==, literal[null]], ||, binary_operation[call[map.size, parameter[]], ==, literal[0]]]] begin[{] re...
Keyword[public] Keyword[static] identifier[String] identifier[mapToJSONString] operator[SEP] identifier[Map] operator[<] operator[?] , operator[?] operator[>] identifier[map] operator[SEP] { Keyword[if] operator[SEP] identifier[map] operator[==] Other[null] operator[||] identifier[map] operator[SEP] identifier[...
public static aaagroup_vpntrafficpolicy_binding[] get(nitro_service service, String groupname) throws Exception{ aaagroup_vpntrafficpolicy_binding obj = new aaagroup_vpntrafficpolicy_binding(); obj.set_groupname(groupname); aaagroup_vpntrafficpolicy_binding response[] = (aaagroup_vpntrafficpolicy_binding[]) obj.g...
class class_name[name] begin[{] method[get, return_type[type[aaagroup_vpntrafficpolicy_binding]], modifier[public static], parameter[service, groupname]] begin[{] local_variable[type[aaagroup_vpntrafficpolicy_binding], obj] call[obj.set_groupname, parameter[member[.groupname]]] ...
Keyword[public] Keyword[static] identifier[aaagroup_vpntrafficpolicy_binding] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[groupname] operator[SEP] Keyword[throws] identifier[Exception] { identifier[aaagroup_vpntrafficpol...
public OvhOrder vps_serviceName_ip_duration_POST(String serviceName, String duration, OvhGeolocationEnum country, Long number) throws IOException { String qPath = "/order/vps/{serviceName}/ip/{duration}"; StringBuilder sb = path(qPath, serviceName, duration); HashMap<String, Object>o = new HashMap<String, Object>...
class class_name[name] begin[{] method[vps_serviceName_ip_duration_POST, return_type[type[OvhOrder]], modifier[public], parameter[serviceName, duration, country, number]] begin[{] local_variable[type[String], qPath] local_variable[type[StringBuilder], sb] local_variable[type[HashMap], o...
Keyword[public] identifier[OvhOrder] identifier[vps_serviceName_ip_duration_POST] operator[SEP] identifier[String] identifier[serviceName] , identifier[String] identifier[duration] , identifier[OvhGeolocationEnum] identifier[country] , identifier[Long] identifier[number] operator[SEP] Keyword[throws] identifier[IOEx...
public List<String> getFiles(GerritQueryHandler gerritQueryHandler) { if (files == null) { files = FileHelper.getFilesByChange(gerritQueryHandler, id); } return files; }
class class_name[name] begin[{] method[getFiles, return_type[type[List]], modifier[public], parameter[gerritQueryHandler]] begin[{] if[binary_operation[member[.files], ==, literal[null]]] begin[{] assign[member[.files], call[FileHelper.getFilesByChange, parameter[member[...
Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[getFiles] operator[SEP] identifier[GerritQueryHandler] identifier[gerritQueryHandler] operator[SEP] { Keyword[if] operator[SEP] identifier[files] operator[==] Other[null] operator[SEP] { identifier[files] operator[=...
public DescribeReportDefinitionsResult withReportDefinitions(ReportDefinition... reportDefinitions) { if (this.reportDefinitions == null) { setReportDefinitions(new java.util.ArrayList<ReportDefinition>(reportDefinitions.length)); } for (ReportDefinition ele : reportDefinitions) { ...
class class_name[name] begin[{] method[withReportDefinitions, return_type[type[DescribeReportDefinitionsResult]], modifier[public], parameter[reportDefinitions]] begin[{] if[binary_operation[THIS[member[None.reportDefinitions]], ==, literal[null]]] begin[{] call[.setRepo...
Keyword[public] identifier[DescribeReportDefinitionsResult] identifier[withReportDefinitions] operator[SEP] identifier[ReportDefinition] operator[...] identifier[reportDefinitions] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[reportDefinitions] operator[==] Other[null] operato...
public PagedList<IotHubSkuDescriptionInner> getValidSkus(final String resourceGroupName, final String resourceName) { ServiceResponse<Page<IotHubSkuDescriptionInner>> response = getValidSkusSinglePageAsync(resourceGroupName, resourceName).toBlocking().single(); return new PagedList<IotHubSkuDescriptionI...
class class_name[name] begin[{] method[getValidSkus, return_type[type[PagedList]], modifier[public], parameter[resourceGroupName, resourceName]] begin[{] local_variable[type[ServiceResponse], response] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=body, postfix_operators=...
Keyword[public] identifier[PagedList] operator[<] identifier[IotHubSkuDescriptionInner] operator[>] identifier[getValidSkus] operator[SEP] Keyword[final] identifier[String] identifier[resourceGroupName] , Keyword[final] identifier[String] identifier[resourceName] operator[SEP] { identifier[ServiceResponse] oper...
public static ClockInterval between( LocalTime start, LocalTime end ) { return ClockInterval.between(PlainTime.from(start), PlainTime.from(end)); }
class class_name[name] begin[{] method[between, return_type[type[ClockInterval]], modifier[public static], parameter[start, end]] begin[{] return[call[ClockInterval.between, parameter[call[PlainTime.from, parameter[member[.start]]], call[PlainTime.from, parameter[member[.end]]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ClockInterval] identifier[between] operator[SEP] identifier[LocalTime] identifier[start] , identifier[LocalTime] identifier[end] operator[SEP] { Keyword[return] identifier[ClockInterval] operator[SEP] identifier[between] operator[SEP] identifier[PlainTime] operator[SEP...
public Bits dup() { Assert.check(currentState != BitsState.UNKNOWN); Bits tmp = new Bits(); tmp.bits = dupBits(); currentState = BitsState.NORMAL; return tmp; }
class class_name[name] begin[{] method[dup, return_type[type[Bits]], modifier[public], parameter[]] begin[{] call[Assert.check, parameter[binary_operation[member[.currentState], !=, member[BitsState.UNKNOWN]]]] local_variable[type[Bits], tmp] assign[member[tmp.bits], cal...
Keyword[public] identifier[Bits] identifier[dup] operator[SEP] operator[SEP] { identifier[Assert] operator[SEP] identifier[check] operator[SEP] identifier[currentState] operator[!=] identifier[BitsState] operator[SEP] identifier[UNKNOWN] operator[SEP] operator[SEP] identifier[Bits] identifier[tmp] operator[=] Ke...
public DataModelUpdateResponse updateDataModel(DataModel body, Boolean force, String workspaceId) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { throw new ApiException(400, "Missing the required parameter 'body' when callin...
class class_name[name] begin[{] method[updateDataModel, return_type[type[DataModelUpdateResponse]], modifier[public], parameter[body, force, workspaceId]] begin[{] local_variable[type[Object], localVarPostBody] if[binary_operation[member[.body], ==, literal[null]]] begin[{] ...
Keyword[public] identifier[DataModelUpdateResponse] identifier[updateDataModel] operator[SEP] identifier[DataModel] identifier[body] , identifier[Boolean] identifier[force] , identifier[String] identifier[workspaceId] operator[SEP] Keyword[throws] identifier[ApiException] { identifier[Object] identifier[localV...
public AuthorisationData convertIdentifyingToken(IdentifyingToken token) { AuthorisationData authData = new AuthorisationData(); authData.setIdTag(token.getToken()); //The OCPP spec describes that the IdTagInfo should not be present in case the charging station has to remove the entry from the ...
class class_name[name] begin[{] method[convertIdentifyingToken, return_type[type[AuthorisationData]], modifier[public], parameter[token]] begin[{] local_variable[type[AuthorisationData], authData] call[authData.setIdTag, parameter[call[token.getToken, parameter[]]]] local_variab...
Keyword[public] identifier[AuthorisationData] identifier[convertIdentifyingToken] operator[SEP] identifier[IdentifyingToken] identifier[token] operator[SEP] { identifier[AuthorisationData] identifier[authData] operator[=] Keyword[new] identifier[AuthorisationData] operator[SEP] operator[SEP] operator[SEP] identi...
public void setLabels(java.util.Collection<LabelDetection> labels) { if (labels == null) { this.labels = null; return; } this.labels = new java.util.ArrayList<LabelDetection>(labels); }
class class_name[name] begin[{] method[setLabels, return_type[void], modifier[public], parameter[labels]] begin[{] if[binary_operation[member[.labels], ==, literal[null]]] begin[{] assign[THIS[member[None.labels]], literal[null]] return[None] else beg...
Keyword[public] Keyword[void] identifier[setLabels] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[LabelDetection] operator[>] identifier[labels] operator[SEP] { Keyword[if] operator[SEP] identifier[labels] operator[==] Other[null] operat...
public static DataSet<Edge<Long, String>> getEdges(ExecutionEnvironment env) { List<Edge<Long, String>> edges = new ArrayList<>(INPUT_EDGES.length); for (String edge : INPUT_EDGES) { String[] tokens = edge.split(";"); edges.add(new Edge<>(Long.parseLong(tokens[0]), Long.parseLong(tokens[1]), tokens[2])); } ...
class class_name[name] begin[{] method[getEdges, return_type[type[DataSet]], modifier[public static], parameter[env]] begin[{] local_variable[type[List], edges] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dime...
Keyword[public] Keyword[static] identifier[DataSet] operator[<] identifier[Edge] operator[<] identifier[Long] , identifier[String] operator[>] operator[>] identifier[getEdges] operator[SEP] identifier[ExecutionEnvironment] identifier[env] operator[SEP] { identifier[List] operator[<] identifier[Edge] operator[<]...
protected void validateValue(FacesContext context, Object value) { // Skip validation if it is not necessary super.validateValue(context, value); if (!isValid() || (value == null)) { return; } // Ensure that the value matches one of the available options bo...
class class_name[name] begin[{] method[validateValue, return_type[void], modifier[protected], parameter[context, value]] begin[{] SuperMethodInvocation(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, ...
Keyword[protected] Keyword[void] identifier[validateValue] operator[SEP] identifier[FacesContext] identifier[context] , identifier[Object] identifier[value] operator[SEP] { Keyword[super] operator[SEP] identifier[validateValue] operator[SEP] identifier[context] , identifier[value] operator[SEP] operator[SEP] K...
public static AmazonDynamoDB getClient() { if (ddbClient != null) { return ddbClient; } if (Config.IN_PRODUCTION) { ddbClient = AmazonDynamoDBClientBuilder.standard().build(); } else { ddbClient = AmazonDynamoDBClientBuilder.standard(). withCredentials(new AWSStaticCredentialsProvider(new BasicAW...
class class_name[name] begin[{] method[getClient, return_type[type[AmazonDynamoDB]], modifier[public static], parameter[]] begin[{] if[binary_operation[member[.ddbClient], !=, literal[null]]] begin[{] return[member[.ddbClient]] else begin[{] None end[}] ...
Keyword[public] Keyword[static] identifier[AmazonDynamoDB] identifier[getClient] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ddbClient] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[ddbClient] operator[SEP] } Keyword[if] operator[SEP] identifi...
public static void sort(double[] keys, int[] values, int start, int end) { quickSort(keys, values, start, end); }
class class_name[name] begin[{] method[sort, return_type[void], modifier[public static], parameter[keys, values, start, end]] begin[{] call[.quickSort, parameter[member[.keys], member[.values], member[.start], member[.end]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[sort] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[keys] , Keyword[int] operator[SEP] operator[SEP] identifier[values] , Keyword[int] identifier[start] , Keyword[int] identifier[end] operator[SEP] { identifier[quickSort] operator...
public Long getFileSize() { Long fileSize = 0L; if (items.size() != 0) { for (TableStat item : items) { fileSize += item.getFileSize(); } } return fileSize; }
class class_name[name] begin[{] method[getFileSize, return_type[type[Long]], modifier[public], parameter[]] begin[{] local_variable[type[Long], fileSize] if[binary_operation[call[items.size, parameter[]], !=, literal[0]]] begin[{] ForStatement(body=BlockStatement(label=None,...
Keyword[public] identifier[Long] identifier[getFileSize] operator[SEP] operator[SEP] { identifier[Long] identifier[fileSize] operator[=] Other[0L] operator[SEP] Keyword[if] operator[SEP] identifier[items] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[!=] Other[0] operator[SEP] { ...
protected void animateOffsetTo(int position, int velocity, boolean animate) { endDrag(); endPeek(); final int startX = (int) mOffsetPixels; final int dx = position - startX; if (dx == 0 || !animate) { setOffsetPixels(position); setDrawerState(position == ...
class class_name[name] begin[{] method[animateOffsetTo, return_type[void], modifier[protected], parameter[position, velocity, animate]] begin[{] call[.endDrag, parameter[]] call[.endPeek, parameter[]] local_variable[type[int], startX] local_variable[type[int], dx...
Keyword[protected] Keyword[void] identifier[animateOffsetTo] operator[SEP] Keyword[int] identifier[position] , Keyword[int] identifier[velocity] , Keyword[boolean] identifier[animate] operator[SEP] { identifier[endDrag] operator[SEP] operator[SEP] operator[SEP] identifier[endPeek] operator[SEP] operator[SEP] o...
public DeviceUseRequest addIndication(CodeableConcept t) { //3 if (t == null) return this; if (this.indication == null) this.indication = new ArrayList<CodeableConcept>(); this.indication.add(t); return this; }
class class_name[name] begin[{] method[addIndication, return_type[type[DeviceUseRequest]], modifier[public], parameter[t]] begin[{] if[binary_operation[member[.t], ==, literal[null]]] begin[{] return[THIS[]] else begin[{] None end[}] if[binary_operation[THIS[memb...
Keyword[public] identifier[DeviceUseRequest] identifier[addIndication] operator[SEP] identifier[CodeableConcept] identifier[t] operator[SEP] { Keyword[if] operator[SEP] identifier[t] operator[==] Other[null] operator[SEP] Keyword[return] Keyword[this] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operato...
@Override public void configurationEvent(ConfigurationEvent event) { LOGGER.debug("event received : " + event.getPid() + " - " + event.getType()); try { lock.lock(); final List<InstanceDeclaration> impacted = getDeclarationsByConfiguration(event.getPid(), ...
class class_name[name] begin[{] method[configurationEvent, return_type[void], modifier[public], parameter[event]] begin[{] call[LOGGER.debug, parameter[binary_operation[binary_operation[binary_operation[literal["event received : "], +, call[event.getPid, parameter[]]], +, literal[" - "]], +, ca...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[configurationEvent] operator[SEP] identifier[ConfigurationEvent] identifier[event] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[event] operator[SEP] identifier[ge...
public static RequestFailure deserializeRequestFailure(final ByteBuf buf) throws IOException, ClassNotFoundException { long requestId = buf.readLong(); Throwable cause; try (ByteBufInputStream bis = new ByteBufInputStream(buf); ObjectInputStream in = new ObjectInputStream(bis)) { cause = (Throwable) in.re...
class class_name[name] begin[{] method[deserializeRequestFailure, return_type[type[RequestFailure]], modifier[public static], parameter[buf]] begin[{] local_variable[type[long], requestId] local_variable[type[Throwable], cause] TryStatement(block=[StatementExpression(expression=Assignme...
Keyword[public] Keyword[static] identifier[RequestFailure] identifier[deserializeRequestFailure] operator[SEP] Keyword[final] identifier[ByteBuf] identifier[buf] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ClassNotFoundException] { Keyword[long] identifier[requestId] operator[=] identifie...
public BaseEncoding withSeparator(String separator, int n) { Parameters.checkCondition(n > 0); for (char c : separator.toCharArray()) { if (isPaddingChar(c) || isInAlphabet(c)) { throw new IllegalArgumentException( "Invalid separator character: '" + c + "'"); } } return new BaseEncoding(alphabet...
class class_name[name] begin[{] method[withSeparator, return_type[type[BaseEncoding]], modifier[public], parameter[separator, n]] begin[{] call[Parameters.checkCondition, parameter[binary_operation[member[.n], >, literal[0]]]] ForStatement(body=BlockStatement(label=None, statements=[IfS...
Keyword[public] identifier[BaseEncoding] identifier[withSeparator] operator[SEP] identifier[String] identifier[separator] , Keyword[int] identifier[n] operator[SEP] { identifier[Parameters] operator[SEP] identifier[checkCondition] operator[SEP] identifier[n] operator[>] Other[0] operator[SEP] operator[SEP] Keyw...
@DoesServiceRequest private void commit() throws StorageException, URISyntaxException { if (this.options.getStoreFileContentMD5()) { this.parentFileRef.getProperties().setContentMD5(Base64.encode(this.md5Digest.digest())); } this.parentFileRef.uploadProperties(this.accessConditi...
class class_name[name] begin[{] method[commit, return_type[void], modifier[private], parameter[]] begin[{] if[THIS[member[None.options]call[None.getStoreFileContentMD5, parameter[]]]] begin[{] THIS[member[None.parentFileRef]call[None.getProperties, parameter[]]call[None....
annotation[@] identifier[DoesServiceRequest] Keyword[private] Keyword[void] identifier[commit] operator[SEP] operator[SEP] Keyword[throws] identifier[StorageException] , identifier[URISyntaxException] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[options] operator[SEP] identifier[getStoreFi...