code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
@Override public String getSimpleName() { if (qualifiedName == null) return "[unknown]"; int idx = qualifiedName.lastIndexOf('.'); int dollar = qualifiedName.lastIndexOf('$'); int max = Math.max(idx, dollar); if (max != -1 && max < qualifiedName.length() - 1) { return qualifiedName.substring(max + 1); ...
class class_name[name] begin[{] method[getSimpleName, return_type[type[String]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.qualifiedName], ==, literal[null]]] begin[{] return[literal["[unknown]"]] else begin[{] None end[}] local_variable[type[in...
annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[getSimpleName] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[qualifiedName] operator[==] Other[null] operator[SEP] Keyword[return] literal[String] operator[SEP] Keyword[int] identifier[idx] operator[=] identifie...
public void addGetterComment(Method method, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn) { StringBuilder sb = new StringBuilder(); method.addJavaDocLine("/**"); if (StringUtility.stringHasValue(introspectedColumn.getRemarks())) { sb.append(" * 获取"); ...
class class_name[name] begin[{] method[addGetterComment, return_type[void], modifier[public], parameter[method, introspectedTable, introspectedColumn]] begin[{] local_variable[type[StringBuilder], sb] call[method.addJavaDocLine, parameter[literal["/**"]]] if[call[StringU...
Keyword[public] Keyword[void] identifier[addGetterComment] operator[SEP] identifier[Method] identifier[method] , identifier[IntrospectedTable] identifier[introspectedTable] , identifier[IntrospectedColumn] identifier[introspectedColumn] operator[SEP] { identifier[StringBuilder] identifier[sb] operator[=] Keywo...
public static BufferedReader getBufferedReader(String source) throws FileNotFoundException { InputStream is = IOUtils.class.getResourceAsStream(source); if (is != null) { return new BufferedReader(new InputStreamReader(is)); } else { File file; URL url = IOUtils.class.getResource(source); ...
class class_name[name] begin[{] method[getBufferedReader, return_type[type[BufferedReader]], modifier[public static], parameter[source]] begin[{] local_variable[type[InputStream], is] if[binary_operation[member[.is], !=, literal[null]]] begin[{] return[ClassCreator(arguments...
Keyword[public] Keyword[static] identifier[BufferedReader] identifier[getBufferedReader] operator[SEP] identifier[String] identifier[source] operator[SEP] Keyword[throws] identifier[FileNotFoundException] { identifier[InputStream] identifier[is] operator[=] identifier[IOUtils] operator[SEP] Keyword[class] operat...
public static AuthToken custom( String principal, String credentials, String realm, String scheme) { return custom( principal, credentials, realm, scheme, null ); }
class class_name[name] begin[{] method[custom, return_type[type[AuthToken]], modifier[public static], parameter[principal, credentials, realm, scheme]] begin[{] return[call[.custom, parameter[member[.principal], member[.credentials], member[.realm], member[.scheme], literal[null]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[AuthToken] identifier[custom] operator[SEP] identifier[String] identifier[principal] , identifier[String] identifier[credentials] , identifier[String] identifier[realm] , identifier[String] identifier[scheme] operator[SEP] { Keyword[return] identifier[custom] operato...
public static Set<String> readColumnSet(String infile, int field) throws IOException { BufferedReader br = IOUtils.getBufferedFileReader(infile); String line; Set<String> set = new HashSet<String>(); while ((line = br.readLine()) != null) { line = line.trim(); if (line.length() > 0)...
class class_name[name] begin[{] method[readColumnSet, return_type[type[Set]], modifier[public static], parameter[infile, field]] begin[{] local_variable[type[BufferedReader], br] local_variable[type[String], line] local_variable[type[Set], set] while[binary_operation[ass...
Keyword[public] Keyword[static] identifier[Set] operator[<] identifier[String] operator[>] identifier[readColumnSet] operator[SEP] identifier[String] identifier[infile] , Keyword[int] identifier[field] operator[SEP] Keyword[throws] identifier[IOException] { identifier[BufferedReader] identifier[br] operator[=] ...
@ColorInt public static int opaqueColor(@ColorInt int color) { int alpha = Color.alpha(color); if (alpha == 0) return color; int red = Color.red(color); int green = Color.green(color); int blue = Color.blue(color); return Color.argb(255, red, green, blue); }
class class_name[name] begin[{] method[opaqueColor, return_type[type[int]], modifier[public static], parameter[color]] begin[{] local_variable[type[int], alpha] if[binary_operation[member[.alpha], ==, literal[0]]] begin[{] return[member[.color]] else begin[{] None end[}]...
annotation[@] identifier[ColorInt] Keyword[public] Keyword[static] Keyword[int] identifier[opaqueColor] operator[SEP] annotation[@] identifier[ColorInt] Keyword[int] identifier[color] operator[SEP] { Keyword[int] identifier[alpha] operator[=] identifier[Color] operator[SEP] identifier[alpha] operator[SEP] identi...
private static Map<Transition, Collection<TileRef>> getTransitions(MapTile map) { final Map<Transition, Collection<TileRef>> transitions = new HashMap<>(); final MapTransitionExtractor extractor = new MapTransitionExtractor(map); for (int ty = 1; ty < map.getInTileHeight() - 1; ty++) ...
class class_name[name] begin[{] method[getTransitions, return_type[type[Map]], modifier[private static], parameter[map]] begin[{] local_variable[type[Map], transitions] local_variable[type[MapTransitionExtractor], extractor] ForStatement(body=BlockStatement(label=None, statements=[ForSt...
Keyword[private] Keyword[static] identifier[Map] operator[<] identifier[Transition] , identifier[Collection] operator[<] identifier[TileRef] operator[>] operator[>] identifier[getTransitions] operator[SEP] identifier[MapTile] identifier[map] operator[SEP] { Keyword[final] identifier[Map] operator[<] identifier[...
@Override public State getFinalState() { ConstructState state = new ConstructState(); if (this.converter != null) { state.addConstructState(Constructs.CONVERTER, new ConstructState(this.converter.getFinalState())); } if (this.rowLevelPolicyChecker != null) { state.addConstructState(Constru...
class class_name[name] begin[{] method[getFinalState, return_type[type[State]], modifier[public], parameter[]] begin[{] local_variable[type[ConstructState], state] if[binary_operation[THIS[member[None.converter]], !=, literal[null]]] begin[{] call[state.addConstr...
annotation[@] identifier[Override] Keyword[public] identifier[State] identifier[getFinalState] operator[SEP] operator[SEP] { identifier[ConstructState] identifier[state] operator[=] Keyword[new] identifier[ConstructState] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[...
private void initializeSessionCounters() { if (monitoringEntityFactory == null) { return; } numberOfSessionsCounter = monitoringEntityFactory.makeLongMonitoringCounter(CURRENT_NUMBER_OF_SESSIONS); numberOfNativeSessionsCounter = monitoringEntityFactory.makeLongMonitoringCount...
class class_name[name] begin[{] method[initializeSessionCounters, return_type[void], modifier[private], parameter[]] begin[{] if[binary_operation[member[.monitoringEntityFactory], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] ass...
Keyword[private] Keyword[void] identifier[initializeSessionCounters] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[monitoringEntityFactory] operator[==] Other[null] operator[SEP] { Keyword[return] operator[SEP] } identifier[numberOfSessionsCounter] operator[=] identi...
private static HttpURLConnection setMetadata(final URI uri, final FileRequestOptions fileOptions, final OperationContext opContext, final AccessCondition accessCondition, final UriQueryBuilder builder) throws IOException, URISyntaxException, StorageException { final HttpURLConnection req...
class class_name[name] begin[{] method[setMetadata, return_type[type[HttpURLConnection]], modifier[private static], parameter[uri, fileOptions, opContext, accessCondition, builder]] begin[{] local_variable[type[HttpURLConnection], request] if[binary_operation[member[.accessCondition], !...
Keyword[private] Keyword[static] identifier[HttpURLConnection] identifier[setMetadata] operator[SEP] Keyword[final] identifier[URI] identifier[uri] , Keyword[final] identifier[FileRequestOptions] identifier[fileOptions] , Keyword[final] identifier[OperationContext] identifier[opContext] , Keyword[final] identifier[A...
public void setUserAttributes(java.util.Collection<Attribute> userAttributes) { if (userAttributes == null) { this.userAttributes = null; return; } this.userAttributes = new java.util.ArrayList<Attribute>(userAttributes); }
class class_name[name] begin[{] method[setUserAttributes, return_type[void], modifier[public], parameter[userAttributes]] begin[{] if[binary_operation[member[.userAttributes], ==, literal[null]]] begin[{] assign[THIS[member[None.userAttributes]], literal[null]] ...
Keyword[public] Keyword[void] identifier[setUserAttributes] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[Attribute] operator[>] identifier[userAttributes] operator[SEP] { Keyword[if] operator[SEP] identifier[userAttributes] operator[==]...
public CmsUUID getElementView() { String elementViewString = getString(CmsEditorConstants.ATTR_ELEMENT_VIEW); if (elementViewString == null) { return null; } return new CmsUUID(elementViewString); }
class class_name[name] begin[{] method[getElementView, return_type[type[CmsUUID]], modifier[public], parameter[]] begin[{] local_variable[type[String], elementViewString] if[binary_operation[member[.elementViewString], ==, literal[null]]] begin[{] return[literal[null]] ...
Keyword[public] identifier[CmsUUID] identifier[getElementView] operator[SEP] operator[SEP] { identifier[String] identifier[elementViewString] operator[=] identifier[getString] operator[SEP] identifier[CmsEditorConstants] operator[SEP] identifier[ATTR_ELEMENT_VIEW] operator[SEP] operator[SEP] Keyword[if] operator...
public void asyncRequestWithSession(AsyncRequest asyncRequest, AsyncResponseCallback asyncResponseCallback) { doRequest.doRequest(asyncRequest, true, asyncResponseCallback); }
class class_name[name] begin[{] method[asyncRequestWithSession, return_type[void], modifier[public], parameter[asyncRequest, asyncResponseCallback]] begin[{] call[doRequest.doRequest, parameter[member[.asyncRequest], literal[true], member[.asyncResponseCallback]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[asyncRequestWithSession] operator[SEP] identifier[AsyncRequest] identifier[asyncRequest] , identifier[AsyncResponseCallback] identifier[asyncResponseCallback] operator[SEP] { identifier[doRequest] operator[SEP] identifier[doRequest] operator[SEP] identifier[asyncRequest]...
public static EscMeta createEscMeta(@NotNull final SerializerRegistry registry, @NotNull final EnhancedMimeType targetContentType, @Nullable final CommonEvent commonEvent) { Contract.requireArgNotNull("registry", registry); Contract.requireArgNotNull("targetContentType", targetContentType);...
class class_name[name] begin[{] method[createEscMeta, return_type[type[EscMeta]], modifier[public static], parameter[registry, targetContentType, commonEvent]] begin[{] call[Contract.requireArgNotNull, parameter[literal["registry"], member[.registry]]] call[Contract.requireArgNo...
Keyword[public] Keyword[static] identifier[EscMeta] identifier[createEscMeta] operator[SEP] annotation[@] identifier[NotNull] Keyword[final] identifier[SerializerRegistry] identifier[registry] , annotation[@] identifier[NotNull] Keyword[final] identifier[EnhancedMimeType] identifier[targetContentType] , annotation[@]...
public static List<String> getServiceUrlsFromConfig(EurekaClientConfig clientConfig, String instanceZone, boolean preferSameZone) { List<String> orderedUrls = new ArrayList<String>(); String region = getRegion(clientConfig); String[] availZones = clientConfig.getAvailabilityZones(clientConfig.ge...
class class_name[name] begin[{] method[getServiceUrlsFromConfig, return_type[type[List]], modifier[public static], parameter[clientConfig, instanceZone, preferSameZone]] begin[{] local_variable[type[List], orderedUrls] local_variable[type[String], region] local_variable[type[String], av...
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[String] operator[>] identifier[getServiceUrlsFromConfig] operator[SEP] identifier[EurekaClientConfig] identifier[clientConfig] , identifier[String] identifier[instanceZone] , Keyword[boolean] identifier[preferSameZone] operator[SEP] { iden...
public static Result requestHeaderFieldsTooLarge(File content, boolean inline) { return requestHeaderFieldsTooLarge(content, inline, StaticFileMimeTypes.fileMimeTypes()); }
class class_name[name] begin[{] method[requestHeaderFieldsTooLarge, return_type[type[Result]], modifier[public static], parameter[content, inline]] begin[{] return[call[.requestHeaderFieldsTooLarge, parameter[member[.content], member[.inline], call[StaticFileMimeTypes.fileMimeTypes, parameter[]]]]] ...
Keyword[public] Keyword[static] identifier[Result] identifier[requestHeaderFieldsTooLarge] operator[SEP] identifier[File] identifier[content] , Keyword[boolean] identifier[inline] operator[SEP] { Keyword[return] identifier[requestHeaderFieldsTooLarge] operator[SEP] identifier[content] , identifier[inline] , i...
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLDatatypeRestrictionImpl instance) throws SerializationException { deserialize(streamReader, instance); }
class class_name[name] begin[{] method[deserializeInstance, return_type[void], modifier[public], parameter[streamReader, instance]] begin[{] call[.deserialize, parameter[member[.streamReader], member[.instance]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[deserializeInstance] operator[SEP] identifier[SerializationStreamReader] identifier[streamReader] , identifier[OWLDatatypeRestrictionImpl] identifier[instance] operator[SEP] Keyword[throws] identifier[SerializationException] { identifie...
@Override public Future<U> save(BasicProfile user, SaveMode mode) { return toScala(doSave(user, mode)); }
class class_name[name] begin[{] method[save, return_type[type[Future]], modifier[public], parameter[user, mode]] begin[{] return[call[.toScala, parameter[call[.doSave, parameter[member[.user], member[.mode]]]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Future] operator[<] identifier[U] operator[>] identifier[save] operator[SEP] identifier[BasicProfile] identifier[user] , identifier[SaveMode] identifier[mode] operator[SEP] { Keyword[return] identifier[toScala] operator[SEP] identifier[doSave] operat...
@Override public void dump(Writer writer, Pattern filter) throws IOException { String linesep = System.getProperty("line.separator"); //$NON-NLS-1$ for (Map.Entry<String, ILayer> entry : cacheMap.entrySet()) { if (filter != null) { Matcher m = filter.matcher(entry.getKey()); if (!m.find()) c...
class class_name[name] begin[{] method[dump, return_type[void], modifier[public], parameter[writer, filter]] begin[{] local_variable[type[String], linesep] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=filter, post...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[dump] operator[SEP] identifier[Writer] identifier[writer] , identifier[Pattern] identifier[filter] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[linesep] operator[=] identifier[System] operator[SE...
public String toTreeString(int indent) { StringBuilder sb = new StringBuilder(); sb.append(SPACES, 0, indent).append("[").append(master).append("]\n"); return sb.toString(); }
class class_name[name] begin[{] method[toTreeString, return_type[type[String]], modifier[public], parameter[indent]] begin[{] local_variable[type[StringBuilder], sb] call[sb.append, parameter[member[.SPACES], literal[0], member[.indent]]] return[call[sb.toString, parameter[]]] ...
Keyword[public] identifier[String] identifier[toTreeString] operator[SEP] Keyword[int] identifier[indent] operator[SEP] { identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[...
public void removeDefaultBindingIfNotExists(Properties properties) { List<Bw> bwServices = this.getBWServices(); for (Bw bw : bwServices) { String path = "bw[" + bw.getName() + "]/bindings/binding[]/machine"; List<Binding> bindings = bw.getBindings().getBinding(); for (Iterator<Binding> iterator = b...
class class_name[name] begin[{] method[removeDefaultBindingIfNotExists, return_type[void], modifier[public], parameter[properties]] begin[{] local_variable[type[List], bwServices] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[Vari...
Keyword[public] Keyword[void] identifier[removeDefaultBindingIfNotExists] operator[SEP] identifier[Properties] identifier[properties] operator[SEP] { identifier[List] operator[<] identifier[Bw] operator[>] identifier[bwServices] operator[=] Keyword[this] operator[SEP] identifier[getBWServices] operator[SEP] oper...
public static BufferedImage loadImage(String fileName, int imageType){ BufferedImage img = loadImage(fileName); if(img.getType() != imageType){ img = BufferedImageFactory.get(img, imageType); } return img; }
class class_name[name] begin[{] method[loadImage, return_type[type[BufferedImage]], modifier[public static], parameter[fileName, imageType]] begin[{] local_variable[type[BufferedImage], img] if[binary_operation[call[img.getType, parameter[]], !=, member[.imageType]]] begin[{] ...
Keyword[public] Keyword[static] identifier[BufferedImage] identifier[loadImage] operator[SEP] identifier[String] identifier[fileName] , Keyword[int] identifier[imageType] operator[SEP] { identifier[BufferedImage] identifier[img] operator[=] identifier[loadImage] operator[SEP] identifier[fileName] operator[SEP] ...
protected void updateResource(I_CmsIndexWriter indexWriter, String rootPath, I_CmsSearchDocument doc) { try { indexWriter.updateDocument(rootPath, doc); } catch (Exception e) { if (LOG.isWarnEnabled()) { LOG.warn( Messages.get().getBundle().ke...
class class_name[name] begin[{] method[updateResource, return_type[void], modifier[protected], parameter[indexWriter, rootPath, doc]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=rootPath, postfix_operators=[], prefix_operators=[], quali...
Keyword[protected] Keyword[void] identifier[updateResource] operator[SEP] identifier[I_CmsIndexWriter] identifier[indexWriter] , identifier[String] identifier[rootPath] , identifier[I_CmsSearchDocument] identifier[doc] operator[SEP] { Keyword[try] { identifier[indexWriter] operator[SEP] identifier[u...
@Override public GetContactReachabilityStatusResult getContactReachabilityStatus(GetContactReachabilityStatusRequest request) { request = beforeClientExecution(request); return executeGetContactReachabilityStatus(request); }
class class_name[name] begin[{] method[getContactReachabilityStatus, return_type[type[GetContactReachabilityStatusResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeGetContactRe...
annotation[@] identifier[Override] Keyword[public] identifier[GetContactReachabilityStatusResult] identifier[getContactReachabilityStatus] operator[SEP] identifier[GetContactReachabilityStatusRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[S...
public void setXfrUnits(Integer newXfrUnits) { Integer oldXfrUnits = xfrUnits; xfrUnits = newXfrUnits; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.FNC__XFR_UNITS, oldXfrUnits, xfrUnits)); }
class class_name[name] begin[{] method[setXfrUnits, return_type[void], modifier[public], parameter[newXfrUnits]] begin[{] local_variable[type[Integer], oldXfrUnits] assign[member[.xfrUnits], member[.newXfrUnits]] if[call[.eNotificationRequired, parameter[]]] begin[{] ...
Keyword[public] Keyword[void] identifier[setXfrUnits] operator[SEP] identifier[Integer] identifier[newXfrUnits] operator[SEP] { identifier[Integer] identifier[oldXfrUnits] operator[=] identifier[xfrUnits] operator[SEP] identifier[xfrUnits] operator[=] identifier[newXfrUnits] operator[SEP] Keyword[if] operator[SE...
synchronized void stop(){ if(status.equals("stopped")) return; long t = System.currentTimeMillis(); run = false; try { serverSocket.close(); } catch (IOException e) { throw S1SystemError.wrap(e); } executor.shutdown(); ...
class class_name[name] begin[{] method[stop, return_type[void], modifier[synchronized], parameter[]] begin[{] if[call[status.equals, parameter[literal["stopped"]]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[long], t] assign[membe...
Keyword[synchronized] Keyword[void] identifier[stop] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[status] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[long] identifier[t] operator[=] identifier[System] opera...
public <T0, T1, T2> DataSource<Tuple3<T0, T1, T2>> types(Class<T0> type0, Class<T1> type1, Class<T2> type2) { TupleTypeInfo<Tuple3<T0, T1, T2>> types = TupleTypeInfo.getBasicTupleTypeInfo(type0, type1, type2); CsvInputFormat<Tuple3<T0, T1, T2>> inputFormat = new CsvInputFormat<Tuple3<T0, T1, T2>>(path); configure...
class class_name[name] begin[{] method[types, return_type[type[DataSource]], modifier[public], parameter[type0, type1, type2]] begin[{] local_variable[type[TupleTypeInfo], types] local_variable[type[CsvInputFormat], inputFormat] call[.configureInputFormat, parameter[member[.inpu...
Keyword[public] operator[<] identifier[T0] , identifier[T1] , identifier[T2] operator[>] identifier[DataSource] operator[<] identifier[Tuple3] operator[<] identifier[T0] , identifier[T1] , identifier[T2] operator[>] operator[>] identifier[types] operator[SEP] identifier[Class] operator[<] identifier[T0] operator[>]...
public void marshall(DeleteEventSubscriptionRequest deleteEventSubscriptionRequest, ProtocolMarshaller protocolMarshaller) { if (deleteEventSubscriptionRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshalle...
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[deleteEventSubscriptionRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.deleteEventSubscriptionRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCrea...
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DeleteEventSubscriptionRequest] identifier[deleteEventSubscriptionRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[deleteEventSubscriptionRequest] operator[==]...
public static boolean isAbsolutePath(String path) { if (StrUtil.isEmpty(path)) { return false; } if (StrUtil.C_SLASH == path.charAt(0) || path.matches("^[a-zA-Z]:[/\\\\].*")) { // 给定的路径已经是绝对路径了 return true; } return false; }
class class_name[name] begin[{] method[isAbsolutePath, return_type[type[boolean]], modifier[public static], parameter[path]] begin[{] if[call[StrUtil.isEmpty, parameter[member[.path]]]] begin[{] return[literal[false]] else begin[{] None end[}] if[bina...
Keyword[public] Keyword[static] Keyword[boolean] identifier[isAbsolutePath] operator[SEP] identifier[String] identifier[path] operator[SEP] { Keyword[if] operator[SEP] identifier[StrUtil] operator[SEP] identifier[isEmpty] operator[SEP] identifier[path] operator[SEP] operator[SEP] { Keyword[return] lit...
public static HttpRequest parseMessage(InputStream in) throws IOException { HttpRequest m = new HttpRequest(); m.parse(in); return m; }
class class_name[name] begin[{] method[parseMessage, return_type[type[HttpRequest]], modifier[public static], parameter[in]] begin[{] local_variable[type[HttpRequest], m] call[m.parse, parameter[member[.in]]] return[member[.m]] end[}] END[}]
Keyword[public] Keyword[static] identifier[HttpRequest] identifier[parseMessage] operator[SEP] identifier[InputStream] identifier[in] operator[SEP] Keyword[throws] identifier[IOException] { identifier[HttpRequest] identifier[m] operator[=] Keyword[new] identifier[HttpRequest] operator[SEP] operator[SEP] operator...
@Override public Long serialize(Date value) { if (value != null) { return value.getTime(); } return null; }
class class_name[name] begin[{] method[serialize, return_type[type[Long]], modifier[public], parameter[value]] begin[{] if[binary_operation[member[.value], !=, literal[null]]] begin[{] return[call[value.getTime, parameter[]]] else begin[{] None end[}] return[...
annotation[@] identifier[Override] Keyword[public] identifier[Long] identifier[serialize] operator[SEP] identifier[Date] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[value] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[value] operator[SEP] identifier[get...
void command_inout_reply(int timeout) { DevError[] errors = null; DeviceData argout = null; try { if (timeout==NO_TIMEOUT) argout = dev.command_inout_reply(this); else argout = dev.command_inout_reply(this, timeout); } catch(AsynReplyNotArrived e) { errors = e.errors; } catch(DevFail...
class class_name[name] begin[{] method[command_inout_reply, return_type[void], modifier[default], parameter[timeout]] begin[{] local_variable[type[DevError], errors] local_variable[type[DeviceData], argout] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReferen...
Keyword[void] identifier[command_inout_reply] operator[SEP] Keyword[int] identifier[timeout] operator[SEP] { identifier[DevError] operator[SEP] operator[SEP] identifier[errors] operator[=] Other[null] operator[SEP] identifier[DeviceData] identifier[argout] operator[=] Other[null] operator[SEP] Keyword[try] { ...
@Override public Principal getCallerPrincipal() { String securityName = null; Principal principal = null; Subject callerSubject = getCallerSubject(); if (callerSubject == null) { return null; } SubjectHelper subjectHelper = new SubjectHelper(); ...
class class_name[name] begin[{] method[getCallerPrincipal, return_type[type[Principal]], modifier[public], parameter[]] begin[{] local_variable[type[String], securityName] local_variable[type[Principal], principal] local_variable[type[Subject], callerSubject] if[binary_o...
annotation[@] identifier[Override] Keyword[public] identifier[Principal] identifier[getCallerPrincipal] operator[SEP] operator[SEP] { identifier[String] identifier[securityName] operator[=] Other[null] operator[SEP] identifier[Principal] identifier[principal] operator[=] Other[null] operator[SEP] identifier[Subj...
public static server get(nitro_service service, String name) throws Exception{ server obj = new server(); obj.set_name(name); server response = (server) obj.get_resource(service); return response; }
class class_name[name] begin[{] method[get, return_type[type[server]], modifier[public static], parameter[service, name]] begin[{] local_variable[type[server], obj] call[obj.set_name, parameter[member[.name]]] local_variable[type[server], response] return[member[.respons...
Keyword[public] Keyword[static] identifier[server] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[Exception] { identifier[server] identifier[obj] operator[=] Keyword[new] identifier[server] operator[SEP] ...
public List<PathAddressTransformer> getPathTransformations(final PathAddress address, PlaceholderResolver placeholderResolver) { final List<PathAddressTransformer> list = new ArrayList<PathAddressTransformer>(); final Iterator<PathElement> iterator = address.iterator(); resolvePathTransformers(i...
class class_name[name] begin[{] method[getPathTransformations, return_type[type[List]], modifier[public], parameter[address, placeholderResolver]] begin[{] local_variable[type[List], list] local_variable[type[Iterator], iterator] call[.resolvePathTransformers, parameter[member[....
Keyword[public] identifier[List] operator[<] identifier[PathAddressTransformer] operator[>] identifier[getPathTransformations] operator[SEP] Keyword[final] identifier[PathAddress] identifier[address] , identifier[PlaceholderResolver] identifier[placeholderResolver] operator[SEP] { Keyword[final] identifier[List...
@SuppressWarnings("unchecked") @Override public EList<Double> getSecondaryPlaneAngle() { return (EList<Double>) eGet(Ifc4Package.Literals.IFC_LIGHT_DISTRIBUTION_DATA__SECONDARY_PLANE_ANGLE, true); }
class class_name[name] begin[{] method[getSecondaryPlaneAngle, return_type[type[EList]], modifier[public], parameter[]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=IFC_LIGHT_DISTRIBUTION_DATA__SECONDARY_PLANE_ANGLE, postfix_operators=[], prefix_operators=[], quali...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] identifier[EList] operator[<] identifier[Double] operator[>] identifier[getSecondaryPlaneAngle] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] identifier[EList] o...
public static void serializePublishCommands(State state, QueryBasedHivePublishEntity queryBasedHivePublishEntity) { state.setProp(HiveAvroORCQueryGenerator.SERIALIZED_PUBLISH_TABLE_COMMANDS, GSON.toJson(queryBasedHivePublishEntity)); }
class class_name[name] begin[{] method[serializePublishCommands, return_type[void], modifier[public static], parameter[state, queryBasedHivePublishEntity]] begin[{] call[state.setProp, parameter[member[HiveAvroORCQueryGenerator.SERIALIZED_PUBLISH_TABLE_COMMANDS], call[GSON.toJson, parameter[mem...
Keyword[public] Keyword[static] Keyword[void] identifier[serializePublishCommands] operator[SEP] identifier[State] identifier[state] , identifier[QueryBasedHivePublishEntity] identifier[queryBasedHivePublishEntity] operator[SEP] { identifier[state] operator[SEP] identifier[setProp] operator[SEP] identifier[Hive...
public ExportListResponse getExports(String exportType, UUID userId, Integer pageSize, String cursor, String sorting, String sortDirection) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/exports".replaceAll("\\{format\\}","json"); // ...
class class_name[name] begin[{] method[getExports, return_type[type[ExportListResponse]], modifier[public], parameter[exportType, userId, pageSize, cursor, sorting, sortDirection]] begin[{] local_variable[type[Object], localVarPostBody] local_variable[type[String], localVarPath] local_v...
Keyword[public] identifier[ExportListResponse] identifier[getExports] operator[SEP] identifier[String] identifier[exportType] , identifier[UUID] identifier[userId] , identifier[Integer] identifier[pageSize] , identifier[String] identifier[cursor] , identifier[String] identifier[sorting] , identifier[String] identi...
public static void createModulesOverview() { Map<String, List<ClassField>> hmModules = HortonMachine.getInstance().moduleName2Fields; Map<String, List<ClassField>> jggModules = JGrassGears.getInstance().moduleName2Fields; Map<String, Class< ? >> hmModulesClasses = HortonMachine.getInstance().mo...
class class_name[name] begin[{] method[createModulesOverview, return_type[void], modifier[public static], parameter[]] begin[{] local_variable[type[Map], hmModules] local_variable[type[Map], jggModules] local_variable[type[Map], hmModulesClasses] local_variable[type[Map], jggMod...
Keyword[public] Keyword[static] Keyword[void] identifier[createModulesOverview] operator[SEP] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[ClassField] operator[>] operator[>] identifier[hmModules] operator[=] identifier[HortonMachine] operator[SEP] ide...
public List<CustomMeasureDto> selectByMetricKeyAndTextValue(DbSession session, String metricKey, String textValue) { return mapper(session).selectByMetricKeyAndTextValue(metricKey, textValue); }
class class_name[name] begin[{] method[selectByMetricKeyAndTextValue, return_type[type[List]], modifier[public], parameter[session, metricKey, textValue]] begin[{] return[call[.mapper, parameter[member[.session]]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[CustomMeasureDto] operator[>] identifier[selectByMetricKeyAndTextValue] operator[SEP] identifier[DbSession] identifier[session] , identifier[String] identifier[metricKey] , identifier[String] identifier[textValue] operator[SEP] { Keyword[return] identifie...
@Override public void eUnset(int featureID) { switch (featureID) { case DroolsPackage.IMPORT_TYPE__NAME: setName(NAME_EDEFAULT); return; } super.eUnset(featureID); }
class class_name[name] begin[{] method[eUnset, return_type[void], modifier[public], parameter[featureID]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=IMPORT_TYPE__NAME, postfix_operators=[], prefix_operators=[], qualifier=DroolsPackage, selectors=[])], statements=[S...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[eUnset] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] { Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] { Keyword[case] identifier[DroolsPackage] operator[SEP] identifier[IMPORT_TYPE__NAME] o...
public ProviderOperationsMetadataInner get(String resourceProviderNamespace, String expand) { return getWithServiceResponseAsync(resourceProviderNamespace, expand).toBlocking().single().body(); }
class class_name[name] begin[{] method[get, return_type[type[ProviderOperationsMetadataInner]], modifier[public], parameter[resourceProviderNamespace, expand]] begin[{] return[call[.getWithServiceResponseAsync, parameter[member[.resourceProviderNamespace], member[.expand]]]] end[}] END[}]
Keyword[public] identifier[ProviderOperationsMetadataInner] identifier[get] operator[SEP] identifier[String] identifier[resourceProviderNamespace] , identifier[String] identifier[expand] operator[SEP] { Keyword[return] identifier[getWithServiceResponseAsync] operator[SEP] identifier[resourceProviderNamespace] ,...
long getFirstWeekOfYearMillis(int year) { long jan1millis = getYearMillis(year); int jan1dayOfWeek = getDayOfWeek(jan1millis); if (jan1dayOfWeek > (8 - iMinDaysInFirstWeek)) { // First week is end of previous year because it doesn't have enough days. return jan1m...
class class_name[name] begin[{] method[getFirstWeekOfYearMillis, return_type[type[long]], modifier[default], parameter[year]] begin[{] local_variable[type[long], jan1millis] local_variable[type[int], jan1dayOfWeek] if[binary_operation[member[.jan1dayOfWeek], >, binary_operation[...
Keyword[long] identifier[getFirstWeekOfYearMillis] operator[SEP] Keyword[int] identifier[year] operator[SEP] { Keyword[long] identifier[jan1millis] operator[=] identifier[getYearMillis] operator[SEP] identifier[year] operator[SEP] operator[SEP] Keyword[int] identifier[jan1dayOfWeek] operator[=] identifier[getDay...
@Override public Map<String, Number> status() { Map<String, Number> ret = new HashMap<>(); ret.put("workers", workers); ret.put("accumulatedUpdates", numUpdates()); return ret; }
class class_name[name] begin[{] method[status, return_type[type[Map]], modifier[public], parameter[]] begin[{] local_variable[type[Map], ret] call[ret.put, parameter[literal["workers"], member[.workers]]] call[ret.put, parameter[literal["accumulatedUpdates"], call[.numUp...
annotation[@] identifier[Override] Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Number] operator[>] identifier[status] operator[SEP] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[Number] operator[>] identifier[ret] operator[=] Keyword[new] identifier...
public Map<Integer, String> listProjects() throws MPXJException { MPD9DatabaseReader reader = new MPD9DatabaseReader(); return reader.listProjects(); }
class class_name[name] begin[{] method[listProjects, return_type[type[Map]], modifier[public], parameter[]] begin[{] local_variable[type[MPD9DatabaseReader], reader] return[call[reader.listProjects, parameter[]]] end[}] END[}]
Keyword[public] identifier[Map] operator[<] identifier[Integer] , identifier[String] operator[>] identifier[listProjects] operator[SEP] operator[SEP] Keyword[throws] identifier[MPXJException] { identifier[MPD9DatabaseReader] identifier[reader] operator[=] Keyword[new] identifier[MPD9DatabaseReader] operator[SEP...
private void update(final Map<String, Object> values) { for (final Entry<String, Object> entry : values.entrySet()) { update(entry.getKey(), entry.getValue()); } }
class class_name[name] begin[{] method[update, return_type[void], modifier[private], parameter[values]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix...
Keyword[private] Keyword[void] identifier[update] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[values] operator[SEP] { Keyword[for] operator[SEP] Keyword[final] identifier[Entry] operator[<] identifier[String] , identifier[Object] opera...
private static byte[] stringToByteArray(String str) { byte[] result = new byte[str.length() + 1]; for (int i = 0; i < str.length(); i++) { result[i] = (byte) str.charAt(i); } result[str.length()] = 0; return result; }
class class_name[name] begin[{] method[stringToByteArray, return_type[type[byte]], modifier[private static], parameter[str]] begin[{] local_variable[type[byte], result] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference...
Keyword[private] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[stringToByteArray] operator[SEP] identifier[String] identifier[str] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[result] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[str] operator[SEP]...
private void grow(int minCapacity) { // overflow-conscious code int oldCapacity = buf.length; int newCapacity = oldCapacity << 1; if (newCapacity - minCapacity < 0) newCapacity = minCapacity; if (newCapacity < 0) { if (minCapacity < 0) // overflow ...
class class_name[name] begin[{] method[grow, return_type[void], modifier[private], parameter[minCapacity]] begin[{] local_variable[type[int], oldCapacity] local_variable[type[int], newCapacity] if[binary_operation[binary_operation[member[.newCapacity], -, member[.minCapacity]], ...
Keyword[private] Keyword[void] identifier[grow] operator[SEP] Keyword[int] identifier[minCapacity] operator[SEP] { Keyword[int] identifier[oldCapacity] operator[=] identifier[buf] operator[SEP] identifier[length] operator[SEP] Keyword[int] identifier[newCapacity] operator[=] identifier[oldCapacity] operator[<<] ...
public UndeliverableReturnCode handleUndeliverableMessage( SIMPMessage msg, int exceptionReason, String[] exceptionInserts, ...
class class_name[name] begin[{] method[handleUndeliverableMessage, return_type[type[UndeliverableReturnCode]], modifier[public], parameter[msg, exceptionReason, exceptionInserts, tran, subscriptionID]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[...
Keyword[public] identifier[UndeliverableReturnCode] identifier[handleUndeliverableMessage] operator[SEP] identifier[SIMPMessage] identifier[msg] , Keyword[int] identifier[exceptionReason] , identifier[String] operator[SEP] operator[SEP] identifier[exceptionInserts] , identifier[TransactionCommon] identifier[tran] , ...
public void addTag(Tag tag) { set(PackageMetadata.TAGS, concat(getTags(), singletonList(tag))); }
class class_name[name] begin[{] method[addTag, return_type[void], modifier[public], parameter[tag]] begin[{] call[.set, parameter[member[PackageMetadata.TAGS], call[.concat, parameter[call[.getTags, parameter[]], call[.singletonList, parameter[member[.tag]]]]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addTag] operator[SEP] identifier[Tag] identifier[tag] operator[SEP] { identifier[set] operator[SEP] identifier[PackageMetadata] operator[SEP] identifier[TAGS] , identifier[concat] operator[SEP] identifier[getTags] operator[SEP] operator[SEP] , identifier[singletonList] ...
public Geometry execute(Geometry geometry) { if (geometry instanceof Polygon) { Polygon polygon = (Polygon) geometry; // No rings? return null: if (polygon.getNumInteriorRing() == 0) { return null; } // Correct the index if necessary: if (ringIndex < 0) { ringIndex = 0; } else if (ringI...
class class_name[name] begin[{] method[execute, return_type[type[Geometry]], modifier[public], parameter[geometry]] begin[{] if[binary_operation[member[.geometry], instanceof, type[Polygon]]] begin[{] local_variable[type[Polygon], polygon] if[binary_operation...
Keyword[public] identifier[Geometry] identifier[execute] operator[SEP] identifier[Geometry] identifier[geometry] operator[SEP] { Keyword[if] operator[SEP] identifier[geometry] Keyword[instanceof] identifier[Polygon] operator[SEP] { identifier[Polygon] identifier[polygon] operator[=] operator[SEP] iden...
public static String readString(ChannelBuffer buffer, int length, Charset charset) { String str = null; if (null == charset) { charset = CharsetUtil.UTF_8; } try { ChannelBuffer stringBuffer = buffer.readSlice(length); str = stringBuffer.toString(charset); } catch (Exception e) { throw...
class class_name[name] begin[{] method[readString, return_type[type[String]], modifier[public static], parameter[buffer, length, charset]] begin[{] local_variable[type[String], str] if[binary_operation[literal[null], ==, member[.charset]]] begin[{] assign[member[...
Keyword[public] Keyword[static] identifier[String] identifier[readString] operator[SEP] identifier[ChannelBuffer] identifier[buffer] , Keyword[int] identifier[length] , identifier[Charset] identifier[charset] operator[SEP] { identifier[String] identifier[str] operator[=] Other[null] operator[SEP] Keyword[if] o...
public static base_response update(nitro_service client, vpnformssoaction resource) throws Exception { vpnformssoaction updateresource = new vpnformssoaction(); updateresource.name = resource.name; updateresource.actionurl = resource.actionurl; updateresource.userfield = resource.userfield; updateresource.pas...
class class_name[name] begin[{] method[update, return_type[type[base_response]], modifier[public static], parameter[client, resource]] begin[{] local_variable[type[vpnformssoaction], updateresource] assign[member[updateresource.name], member[resource.name]] assign[member...
Keyword[public] Keyword[static] identifier[base_response] identifier[update] operator[SEP] identifier[nitro_service] identifier[client] , identifier[vpnformssoaction] identifier[resource] operator[SEP] Keyword[throws] identifier[Exception] { identifier[vpnformssoaction] identifier[updateresource] operator[=] Ke...
public InputSource resolveEntity( String pPublicId, String pSystemId ) throws SAXException, IOException { final InputSource source = resolver.resolveEntity( pPublicId, pSystemId ); if ( source != null ) { return source; } URL url = resolve( pSystemId ); ...
class class_name[name] begin[{] method[resolveEntity, return_type[type[InputSource]], modifier[public], parameter[pPublicId, pSystemId]] begin[{] local_variable[type[InputSource], source] if[binary_operation[member[.source], !=, literal[null]]] begin[{] return[member[.source...
Keyword[public] identifier[InputSource] identifier[resolveEntity] operator[SEP] identifier[String] identifier[pPublicId] , identifier[String] identifier[pSystemId] operator[SEP] Keyword[throws] identifier[SAXException] , identifier[IOException] { Keyword[final] identifier[InputSource] identifier[source] operat...
public int getValueId(Clusterable c) { currentItems++; /* * if(isLeafNode()) { return id; } */ int index = TreeUtils.findNearestNodeIndex(subNodes, c); if (index >= 0) { KMeansTreeNode node = subNodes.get(index); return node.getValueId(c); } return id; }
class class_name[name] begin[{] method[getValueId, return_type[type[int]], modifier[public], parameter[c]] begin[{] member[.currentItems] local_variable[type[int], index] if[binary_operation[member[.index], >=, literal[0]]] begin[{] local_variable[type[KMeans...
Keyword[public] Keyword[int] identifier[getValueId] operator[SEP] identifier[Clusterable] identifier[c] operator[SEP] { identifier[currentItems] operator[++] operator[SEP] Keyword[int] identifier[index] operator[=] identifier[TreeUtils] operator[SEP] identifier[findNearestNodeIndex] operator[SEP] identifier[subN...
public void removeConnection(WebSocketConnection conn) { conns.remove(conn); for (IWebSocketDataListener listener : listeners) { listener.onWSDisconnect(conn); } }
class class_name[name] begin[{] method[removeConnection, return_type[void], modifier[public], parameter[conn]] begin[{] call[conns.remove, parameter[member[.conn]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Member...
Keyword[public] Keyword[void] identifier[removeConnection] operator[SEP] identifier[WebSocketConnection] identifier[conn] operator[SEP] { identifier[conns] operator[SEP] identifier[remove] operator[SEP] identifier[conn] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[IWebSocketDataListener] ide...
@SuppressWarnings("unchecked") @Override public T isNull(final String col) { context().param(CaseFormat.CAMEL_CASE.convert(col), new IsNull(col)); this.useOperator = true; return (T) this; }
class class_name[name] begin[{] method[isNull, return_type[type[T]], modifier[public], parameter[col]] begin[{] call[.context, parameter[]] assign[THIS[member[None.useOperator]], literal[true]] return[Cast(expression=This(postfix_operators=[], prefix_operators=[], qualif...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] identifier[T] identifier[isNull] operator[SEP] Keyword[final] identifier[String] identifier[col] operator[SEP] { identifier[context] operator[SEP] operator[SEP] operator[SEP] ...
public static BigDecimal min(EvaluationContext ctx, Object... args) { if (args.length == 0) { throw new RuntimeException("Wrong number of arguments"); } BigDecimal result = null; for (Object arg : args) { BigDecimal _arg = Conversions.toDecimal(arg, ctx); ...
class class_name[name] begin[{] method[min, return_type[type[BigDecimal]], modifier[public static], parameter[ctx, args]] begin[{] if[binary_operation[member[args.length], ==, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefi...
Keyword[public] Keyword[static] identifier[BigDecimal] identifier[min] operator[SEP] identifier[EvaluationContext] identifier[ctx] , identifier[Object] operator[...] identifier[args] operator[SEP] { Keyword[if] operator[SEP] identifier[args] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] ...
private Filter createValueMatchFilter( FilterAdapterContext context, SingleColumnValueFilter filter) throws IOException { ValueFilter valueFilter = new ValueFilter(filter.getOperator(), filter.getComparator()); return delegateAdapter.toFilter(context, valueFilter); }
class class_name[name] begin[{] method[createValueMatchFilter, return_type[type[Filter]], modifier[private], parameter[context, filter]] begin[{] local_variable[type[ValueFilter], valueFilter] return[call[delegateAdapter.toFilter, parameter[member[.context], member[.valueFilter]]]] end[}] E...
Keyword[private] identifier[Filter] identifier[createValueMatchFilter] operator[SEP] identifier[FilterAdapterContext] identifier[context] , identifier[SingleColumnValueFilter] identifier[filter] operator[SEP] Keyword[throws] identifier[IOException] { identifier[ValueFilter] identifier[valueFilter] operator[=] K...
public final <T> TcpServer attr(AttributeKey<T> key, @Nullable T value) { Objects.requireNonNull(key, "key"); return bootstrap(b -> b.childAttr(key, value)); }
class class_name[name] begin[{] method[attr, return_type[type[TcpServer]], modifier[final public], parameter[key, value]] begin[{] call[Objects.requireNonNull, parameter[member[.key], literal["key"]]] return[call[.bootstrap, parameter[LambdaExpression(body=MethodInvocation(arguments=[Me...
Keyword[public] Keyword[final] operator[<] identifier[T] operator[>] identifier[TcpServer] identifier[attr] operator[SEP] identifier[AttributeKey] operator[<] identifier[T] operator[>] identifier[key] , annotation[@] identifier[Nullable] identifier[T] identifier[value] operator[SEP] { identifier[Objects] operat...
public static DropwizardMeterRegistry newRegistry(HierarchicalNameMapper nameMapper, Clock clock) { return newRegistry(new MetricRegistry(), nameMapper, clock); }
class class_name[name] begin[{] method[newRegistry, return_type[type[DropwizardMeterRegistry]], modifier[public static], parameter[nameMapper, clock]] begin[{] return[call[.newRegistry, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operato...
Keyword[public] Keyword[static] identifier[DropwizardMeterRegistry] identifier[newRegistry] operator[SEP] identifier[HierarchicalNameMapper] identifier[nameMapper] , identifier[Clock] identifier[clock] operator[SEP] { Keyword[return] identifier[newRegistry] operator[SEP] Keyword[new] identifier[MetricRegistry] ...
public static Optional<ButtonType> alert(String title, String header, String content) { return alert(title, header, content, AlertType.INFORMATION); }
class class_name[name] begin[{] method[alert, return_type[type[Optional]], modifier[public static], parameter[title, header, content]] begin[{] return[call[.alert, parameter[member[.title], member[.header], member[.content], member[AlertType.INFORMATION]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Optional] operator[<] identifier[ButtonType] operator[>] identifier[alert] operator[SEP] identifier[String] identifier[title] , identifier[String] identifier[header] , identifier[String] identifier[content] operator[SEP] { Keyword[return] identifier[alert] operator[SE...
public boolean addAll(Collection<E> items){ boolean modified = false; for(E e : items){ modified = add(e) || modified; } return modified; }
class class_name[name] begin[{] method[addAll, return_type[type[boolean]], modifier[public], parameter[items]] begin[{] local_variable[type[boolean], modified] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=m...
Keyword[public] Keyword[boolean] identifier[addAll] operator[SEP] identifier[Collection] operator[<] identifier[E] operator[>] identifier[items] operator[SEP] { Keyword[boolean] identifier[modified] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[E] identifier[e] operator[:] ide...
public static base_response update(nitro_service client, pqpolicy resource) throws Exception { pqpolicy updateresource = new pqpolicy(); updateresource.policyname = resource.policyname; updateresource.weight = resource.weight; updateresource.qdepth = resource.qdepth; updateresource.polqdepth = resource.polqde...
class class_name[name] begin[{] method[update, return_type[type[base_response]], modifier[public static], parameter[client, resource]] begin[{] local_variable[type[pqpolicy], updateresource] assign[member[updateresource.policyname], member[resource.policyname]] assign[me...
Keyword[public] Keyword[static] identifier[base_response] identifier[update] operator[SEP] identifier[nitro_service] identifier[client] , identifier[pqpolicy] identifier[resource] operator[SEP] Keyword[throws] identifier[Exception] { identifier[pqpolicy] identifier[updateresource] operator[=] Keyword[new] ident...
public void write(OutputStream out) throws IOException { Writer writer = new OutputStreamWriter(out); write(writer); writer.flush(); }
class class_name[name] begin[{] method[write, return_type[void], modifier[public], parameter[out]] begin[{] local_variable[type[Writer], writer] call[.write, parameter[member[.writer]]] call[writer.flush, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[write] operator[SEP] identifier[OutputStream] identifier[out] operator[SEP] Keyword[throws] identifier[IOException] { identifier[Writer] identifier[writer] operator[=] Keyword[new] identifier[OutputStreamWriter] operator[SEP] identifier[out] operator[SEP] operator[SEP] id...
public static double[] readTS(BufferedReader br, int columnIdx, int sizeLimit) throws IOException, SAXException { ArrayList<Double> preRes = new ArrayList<Double>(); int lineCounter = 0; String line = null; while ((line = br.readLine()) != null) { String[] split = line.trim().split("...
class class_name[name] begin[{] method[readTS, return_type[type[double]], modifier[public static], parameter[br, columnIdx, sizeLimit]] begin[{] local_variable[type[ArrayList], preRes] local_variable[type[int], lineCounter] local_variable[type[String], line] while[binary...
Keyword[public] Keyword[static] Keyword[double] operator[SEP] operator[SEP] identifier[readTS] operator[SEP] identifier[BufferedReader] identifier[br] , Keyword[int] identifier[columnIdx] , Keyword[int] identifier[sizeLimit] operator[SEP] Keyword[throws] identifier[IOException] , identifier[SAXException] { id...
public Translation addTranslation(String locale, String value, boolean isApproximate) { LocaleCodeSpecification.assertCode(locale); if (isBlank(value)) { throw new IllegalArgumentException("The translation can't be blank"); } Translation translation = createOrUpdateTranslatio...
class class_name[name] begin[{] method[addTranslation, return_type[type[Translation]], modifier[public], parameter[locale, value, isApproximate]] begin[{] call[LocaleCodeSpecification.assertCode, parameter[member[.locale]]] if[call[.isBlank, parameter[member[.value]]]] begin[{] ...
Keyword[public] identifier[Translation] identifier[addTranslation] operator[SEP] identifier[String] identifier[locale] , identifier[String] identifier[value] , Keyword[boolean] identifier[isApproximate] operator[SEP] { identifier[LocaleCodeSpecification] operator[SEP] identifier[assertCode] operator[SEP] ident...
@NullSafe protected boolean isRunning(ServerSocket serverSocket) { return Optional.ofNullable(serverSocket) .map(localServerSocket -> !localServerSocket.isClosed() && localServerSocket.isBound()) .orElse(false); }
class class_name[name] begin[{] method[isRunning, return_type[type[boolean]], modifier[protected], parameter[serverSocket]] begin[{] return[call[Optional.ofNullable, parameter[member[.serverSocket]]]] end[}] END[}]
annotation[@] identifier[NullSafe] Keyword[protected] Keyword[boolean] identifier[isRunning] operator[SEP] identifier[ServerSocket] identifier[serverSocket] operator[SEP] { Keyword[return] identifier[Optional] operator[SEP] identifier[ofNullable] operator[SEP] identifier[serverSocket] operator[SEP] operator[SEP]...
public String getFormatString(Locale locale, String key) { String[] suffixes = toStrings(locale); while(true) { for (int i=0; i<suffixes.length; i++) { String suffix = suffixes[i]; String msg = get(suffix).getProperty(key); if(msg!=null && msg...
class class_name[name] begin[{] method[getFormatString, return_type[type[String]], modifier[public], parameter[locale, key]] begin[{] local_variable[type[String], suffixes] while[literal[true]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDe...
Keyword[public] identifier[String] identifier[getFormatString] operator[SEP] identifier[Locale] identifier[locale] , identifier[String] identifier[key] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[suffixes] operator[=] identifier[toStrings] operator[SEP] identifier[locale] operator[...
public <T> T handleResponse(Response response, Type returnType) throws ApiException { if (response.isSuccessful()) { if (returnType == null || response.code() == 204) { // returning null if the returnType is not defined, // or the status code is 204 (No Content) ...
class class_name[name] begin[{] method[handleResponse, return_type[type[T]], modifier[public], parameter[response, returnType]] begin[{] if[call[response.isSuccessful, parameter[]]] begin[{] if[binary_operation[binary_operation[member[.returnType], ==, literal[null]], ||...
Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[handleResponse] operator[SEP] identifier[Response] identifier[response] , identifier[Type] identifier[returnType] operator[SEP] Keyword[throws] identifier[ApiException] { Keyword[if] operator[SEP] identifier[response] operator[SEP] i...
public OvhSnapshot serviceName_partition_partitionName_snapshot_snapshotType_GET(String serviceName, String partitionName, net.minidev.ovh.api.dedicated.storage.OvhSnapshotEnum snapshotType) throws IOException { String qPath = "/dedicated/nasha/{serviceName}/partition/{partitionName}/snapshot/{snapshotType}"; Strin...
class class_name[name] begin[{] method[serviceName_partition_partitionName_snapshot_snapshotType_GET, return_type[type[OvhSnapshot]], modifier[public], parameter[serviceName, partitionName, snapshotType]] begin[{] local_variable[type[String], qPath] local_variable[type[StringBuilder], sb] ...
Keyword[public] identifier[OvhSnapshot] identifier[serviceName_partition_partitionName_snapshot_snapshotType_GET] operator[SEP] identifier[String] identifier[serviceName] , identifier[String] identifier[partitionName] , identifier[net] operator[SEP] identifier[minidev] operator[SEP] identifier[ovh] operator[SEP] iden...
public CertPath engineGenerateCertPath(InputStream inStream, String encoding) throws CertificateException { if (inStream == null) { throw new CertificateException("Missing input stream"); } try { byte[] data = readOneBlock(inStream); if (data != nu...
class class_name[name] begin[{] method[engineGenerateCertPath, return_type[type[CertPath]], modifier[public], parameter[inStream, encoding]] begin[{] if[binary_operation[member[.inStream], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix...
Keyword[public] identifier[CertPath] identifier[engineGenerateCertPath] operator[SEP] identifier[InputStream] identifier[inStream] , identifier[String] identifier[encoding] operator[SEP] Keyword[throws] identifier[CertificateException] { Keyword[if] operator[SEP] identifier[inStream] operator[==] Other[null] op...
public static <T> T median(List<? extends T> data, Comparator<? super T> comparator) { return median(data, comparator, 0, data.size()); }
class class_name[name] begin[{] method[median, return_type[type[T]], modifier[public static], parameter[data, comparator]] begin[{] return[call[.median, parameter[member[.data], member[.comparator], literal[0], call[data.size, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[median] operator[SEP] identifier[List] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] identifier[data] , identifier[Comparator] operator[<] operator[?] Keyword[super] identifier[T] operator[>] identifier[...
@Override public List<? extends Trigger> getTriggers(JobKey jobKey) throws SchedulerException { List<Trigger> triggers = new ArrayList<>(); if (!CollectionUtils.isEmpty(scheduler.getTriggersOfJob(jobKey))) { triggers.addAll(scheduler.getTriggersOfJob(jobKey)); Collections.sort(triggers, new Comparator<T...
class class_name[name] begin[{] method[getTriggers, return_type[type[List]], modifier[public], parameter[jobKey]] begin[{] local_variable[type[List], triggers] if[call[CollectionUtils.isEmpty, parameter[call[scheduler.getTriggersOfJob, parameter[member[.jobKey]]]]]] begin[{] ...
annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] operator[?] Keyword[extends] identifier[Trigger] operator[>] identifier[getTriggers] operator[SEP] identifier[JobKey] identifier[jobKey] operator[SEP] Keyword[throws] identifier[SchedulerException] { identifier[List] operator[<] iden...
@Nonnull public static <T> LTernaryOperatorBuilder<T> ternaryOperator(Consumer<LTernaryOperator<T>> consumer) { return new LTernaryOperatorBuilder(consumer); }
class class_name[name] begin[{] method[ternaryOperator, return_type[type[LTernaryOperatorBuilder]], modifier[public static], parameter[consumer]] begin[{] return[ClassCreator(arguments=[MemberReference(member=consumer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, co...
annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[LTernaryOperatorBuilder] operator[<] identifier[T] operator[>] identifier[ternaryOperator] operator[SEP] identifier[Consumer] operator[<] identifier[LTernaryOperator] operator[<] identifier[T] operator[>] ...
final void printAsciiBucket(final StringBuilder out, final int i) { out.append('[') .append(bucketLowInterval(i)) .append('-') .append(i == buckets.length - 1 ? "Inf" : bucketHighInterval(i)) .append("): ") .append(buckets[i]) .append('\n'); }
class class_name[name] begin[{] method[printAsciiBucket, return_type[void], modifier[final], parameter[out, i]] begin[{] call[out.append, parameter[literal['[']]] end[}] END[}]
Keyword[final] Keyword[void] identifier[printAsciiBucket] operator[SEP] Keyword[final] identifier[StringBuilder] identifier[out] , Keyword[final] Keyword[int] identifier[i] operator[SEP] { identifier[out] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[appen...
@Override public <E extends R> boolean exists(final UniqueKey<E> uniqueKey) { boolean res; synchronized (this.componentMap) { // Check from singleton map it he key exists and if the weak reference is not null res = this.componentMap.containsKey(uniqueKey) && !this.componentM...
class class_name[name] begin[{] method[exists, return_type[type[boolean]], modifier[public], parameter[uniqueKey]] begin[{] local_variable[type[boolean], res] SYNCHRONIZED[THIS[member[None.componentMap]]] BEGIN[{] assign[member[.res], binary_operation[THIS[member...
annotation[@] identifier[Override] Keyword[public] operator[<] identifier[E] Keyword[extends] identifier[R] operator[>] Keyword[boolean] identifier[exists] operator[SEP] Keyword[final] identifier[UniqueKey] operator[<] identifier[E] operator[>] identifier[uniqueKey] operator[SEP] { Keyword[boolean] identifier[re...
@SuppressWarnings("unchecked") protected Constructor resolveCompatibleConstructor(final Class<?> objectType, final Class<?>[] parameterTypes) { for (Constructor constructor : objectType.getConstructors()) { Class[] constructorParameterTypes = constructor.getParameterTypes(); if (parameterTypes.length...
class class_name[name] begin[{] method[resolveCompatibleConstructor, return_type[type[Constructor]], modifier[protected], parameter[objectType, parameterTypes]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dim...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] identifier[Constructor] identifier[resolveCompatibleConstructor] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[objectType] , Keyword[final] identifier[Class] operato...
public List<Execution> getSpecificationExecutions(Specification specification, SystemUnderTest sut, int maxResults) throws GreenPepperServerException { try { sessionService.startSession(); /* * Repository repository = loadRepository(specification.getRepository().getUid()); ...
class class_name[name] begin[{] method[getSpecificationExecutions, return_type[type[List]], modifier[public], parameter[specification, sut, maxResults]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=startSession, postfix_operators=[], prefix_operators...
Keyword[public] identifier[List] operator[<] identifier[Execution] operator[>] identifier[getSpecificationExecutions] operator[SEP] identifier[Specification] identifier[specification] , identifier[SystemUnderTest] identifier[sut] , Keyword[int] identifier[maxResults] operator[SEP] Keyword[throws] identifier[GreenPepp...
private void maybeSetProperty(final String name, final String value) { if (System.getProperty(name) == null) { System.setProperty(name, value); } }
class class_name[name] begin[{] method[maybeSetProperty, return_type[void], modifier[private], parameter[name, value]] begin[{] if[binary_operation[call[System.getProperty, parameter[member[.name]]], ==, literal[null]]] begin[{] call[System.setProperty, parameter[member[...
Keyword[private] Keyword[void] identifier[maybeSetProperty] operator[SEP] Keyword[final] identifier[String] identifier[name] , Keyword[final] identifier[String] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] identifier[name] ope...
public Map<String, Double> extractAmounts(XTrace trace) { return XCostAmount.instance().extractValues(trace); }
class class_name[name] begin[{] method[extractAmounts, return_type[type[Map]], modifier[public], parameter[trace]] begin[{] return[call[XCostAmount.instance, parameter[]]] end[}] END[}]
Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Double] operator[>] identifier[extractAmounts] operator[SEP] identifier[XTrace] identifier[trace] operator[SEP] { Keyword[return] identifier[XCostAmount] operator[SEP] identifier[instance] operator[SEP] operator[SEP] operator[SEP] ident...
public static Writable encodeHex(final byte[] data) { return new Writable() { public Writer writeTo(Writer out) throws IOException { for (int i = 0; i < data.length; i++) { // convert byte into unsigned hex string String hexString = Integer.toH...
class class_name[name] begin[{] method[encodeHex, return_type[type[Writable]], modifier[public static], parameter[data]] begin[{] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations...
Keyword[public] Keyword[static] identifier[Writable] identifier[encodeHex] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[data] operator[SEP] { Keyword[return] Keyword[new] identifier[Writable] operator[SEP] operator[SEP] { Keyword[public] identifier[Writer] identifi...
public static void addFilter(Document doc, Element root) { Element filter = doc.createElement("filter"); Element filterName = doc.createElement("filter-name"); filterName.appendChild(doc.createTextNode("ShiroFilter")); filter.appendChild(filterName); Element filterClass = doc.createElement("filter-c...
class class_name[name] begin[{] method[addFilter, return_type[void], modifier[public static], parameter[doc, root]] begin[{] local_variable[type[Element], filter] local_variable[type[Element], filterName] call[filterName.appendChild, parameter[call[doc.createTextNode, parameter[...
Keyword[public] Keyword[static] Keyword[void] identifier[addFilter] operator[SEP] identifier[Document] identifier[doc] , identifier[Element] identifier[root] operator[SEP] { identifier[Element] identifier[filter] operator[=] identifier[doc] operator[SEP] identifier[createElement] operator[SEP] literal[String] o...
void processAlterTableRename(Table table) { HsqlName name = readNewSchemaObjectName(SchemaObject.TABLE); name.setSchemaIfNull(table.getSchemaName()); if (table.getSchemaName() != name.schema) { throw Error.error(ErrorCode.X_42505); } database.schemaManager.renameS...
class class_name[name] begin[{] method[processAlterTableRename, return_type[void], modifier[default], parameter[table]] begin[{] local_variable[type[HsqlName], name] call[name.setSchemaIfNull, parameter[call[table.getSchemaName, parameter[]]]] if[binary_operation[call[ta...
Keyword[void] identifier[processAlterTableRename] operator[SEP] identifier[Table] identifier[table] operator[SEP] { identifier[HsqlName] identifier[name] operator[=] identifier[readNewSchemaObjectName] operator[SEP] identifier[SchemaObject] operator[SEP] identifier[TABLE] operator[SEP] operator[SEP] identifier[n...
public static Type[] getGenerics(final Type type, final Map<String, Type> generics) { Type[] res = NO_TYPES; Type analyzingType = type; if (type instanceof TypeVariable) { // if type is pure generic recovering parametrization analyzingType = declaredGeneric((TypeVariable)...
class class_name[name] begin[{] method[getGenerics, return_type[type[Type]], modifier[public static], parameter[type, generics]] begin[{] local_variable[type[Type], res] local_variable[type[Type], analyzingType] if[binary_operation[member[.type], instanceof, type[TypeVariable]]]...
Keyword[public] Keyword[static] identifier[Type] operator[SEP] operator[SEP] identifier[getGenerics] operator[SEP] Keyword[final] identifier[Type] identifier[type] , Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Type] operator[>] identifier[generics] operator[SEP] { identifier[Type...
protected Template getTemplate(String name) { try { return configuration.getTemplate(name); } catch (IOException e) { throw new GenException(Message.DOMAGEN9001, e, e); } }
class class_name[name] begin[{] method[getTemplate, return_type[type[Template]], modifier[protected], parameter[name]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], ...
Keyword[protected] identifier[Template] identifier[getTemplate] operator[SEP] identifier[String] identifier[name] operator[SEP] { Keyword[try] { Keyword[return] identifier[configuration] operator[SEP] identifier[getTemplate] operator[SEP] identifier[name] operator[SEP] operator[SEP] } Ke...
public static <X> List<X> mostVotedFor(Map<X, Double> votes) { // Choose the label with the greatest number of votes // If there is a tie, choose the one with the least index double maxTalley = Double.NEGATIVE_INFINITY; List<X> maxTickets = new ArrayList<X>(); for(Entry<X,Double>...
class class_name[name] begin[{] method[mostVotedFor, return_type[type[List]], modifier[public static], parameter[votes]] begin[{] local_variable[type[double], maxTalley] local_variable[type[List], maxTickets] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclarat...
Keyword[public] Keyword[static] operator[<] identifier[X] operator[>] identifier[List] operator[<] identifier[X] operator[>] identifier[mostVotedFor] operator[SEP] identifier[Map] operator[<] identifier[X] , identifier[Double] operator[>] identifier[votes] operator[SEP] { Keyword[double] identifier[maxTalley] o...
public org.openprovenance.prov.model.Value getValue() { if (value==null) { if (all!=null) { // TODO: inefficient, I search this list every time getValue is called, though there may be no value for (Attribute attr: all) { if (attr instanceof org.openprovenance.prov.model.Value) { ...
class class_name[name] begin[{] method[getValue, return_type[type[org]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.value], ==, literal[null]]] begin[{] if[binary_operation[member[.all], !=, literal[null]]] begin[{] ForStatement(b...
Keyword[public] identifier[org] operator[SEP] identifier[openprovenance] operator[SEP] identifier[prov] operator[SEP] identifier[model] operator[SEP] identifier[Value] identifier[getValue] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] { ...
private String computeTypeFromMappingSource(String source) throws MtasParserException { if (source.equals(MtasParserMapping.SOURCE_OWN)) { return null; } else if (source.equals(MtasParserMapping.SOURCE_ANCESTOR_GROUP)) { return MAPPING_TYPE_GROUP; } else if (source .equals(MtasPars...
class class_name[name] begin[{] method[computeTypeFromMappingSource, return_type[type[String]], modifier[private], parameter[source]] begin[{] if[call[source.equals, parameter[member[MtasParserMapping.SOURCE_OWN]]]] begin[{] return[literal[null]] else begin[{] if...
Keyword[private] identifier[String] identifier[computeTypeFromMappingSource] operator[SEP] identifier[String] identifier[source] operator[SEP] Keyword[throws] identifier[MtasParserException] { Keyword[if] operator[SEP] identifier[source] operator[SEP] identifier[equals] operator[SEP] identifier[MtasParserMapping...
public COPACNeighborPredicate.Instance instantiate(Database database, Relation<V> relation) { DistanceQuery<V> dq = database.getDistanceQuery(relation, EuclideanDistanceFunction.STATIC); KNNQuery<V> knnq = database.getKNNQuery(dq, settings.k); WritableDataStore<COPACModel> storage = DataStoreUtil.makeStora...
class class_name[name] begin[{] method[instantiate, return_type[type[COPACNeighborPredicate]], modifier[public], parameter[database, relation]] begin[{] local_variable[type[DistanceQuery], dq] local_variable[type[KNNQuery], knnq] local_variable[type[WritableDataStore], storage] ...
Keyword[public] identifier[COPACNeighborPredicate] operator[SEP] identifier[Instance] identifier[instantiate] operator[SEP] identifier[Database] identifier[database] , identifier[Relation] operator[<] identifier[V] operator[>] identifier[relation] operator[SEP] { identifier[DistanceQuery] operator[<] identifier...
void insertPath(int pathIndex, Point2D[] points, int pointsOffset, int count, boolean bForward) { m_impl.insertPath(pathIndex, points, pointsOffset, count, bForward); }
class class_name[name] begin[{] method[insertPath, return_type[void], modifier[default], parameter[pathIndex, points, pointsOffset, count, bForward]] begin[{] call[m_impl.insertPath, parameter[member[.pathIndex], member[.points], member[.pointsOffset], member[.count], member[.bForward]]] en...
Keyword[void] identifier[insertPath] operator[SEP] Keyword[int] identifier[pathIndex] , identifier[Point2D] operator[SEP] operator[SEP] identifier[points] , Keyword[int] identifier[pointsOffset] , Keyword[int] identifier[count] , Keyword[boolean] identifier[bForward] operator[SEP] { identifier[m_impl] operat...
protected int checkWrite(int length) { checkWrite(position, length); int previousPosition = this.position; this.position = previousPosition + length; return offset(previousPosition); }
class class_name[name] begin[{] method[checkWrite, return_type[type[int]], modifier[protected], parameter[length]] begin[{] call[.checkWrite, parameter[member[.position], member[.length]]] local_variable[type[int], previousPosition] assign[THIS[member[None.position]], bi...
Keyword[protected] Keyword[int] identifier[checkWrite] operator[SEP] Keyword[int] identifier[length] operator[SEP] { identifier[checkWrite] operator[SEP] identifier[position] , identifier[length] operator[SEP] operator[SEP] Keyword[int] identifier[previousPosition] operator[=] Keyword[this] operator[SEP] identi...
private void initComponents()//GEN-BEGIN:initComponents { jMenuBar1 = new javax.swing.JMenuBar(); mnuFile = new javax.swing.JMenu(); mnuFileSave = new javax.swing.JMenuItem(); jSplitPane1 = new javax.swing.JSplitPane(); jScrollPane1 = new javax.swing.JScrollPane(); ...
class class_name[name] begin[{] method[initComponents, return_type[void], modifier[private], parameter[]] begin[{] assign[member[.jMenuBar1], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=Refe...
Keyword[private] Keyword[void] identifier[initComponents] operator[SEP] operator[SEP] { identifier[jMenuBar1] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JMenuBar] operator[SEP] operator[SEP] operator[SEP] identifier[mnuFile] operator[=] Keyword[new] identi...
public AssetRef retrieveRef(String name) throws IOException, SQLException { String select = "select definition_id, name, ref from ASSET_REF where name = ?"; try (Connection conn = getDbConnection(); PreparedStatement stmt = conn.prepareStatement(select)) { stmt.setString(1, n...
class class_name[name] begin[{] method[retrieveRef, return_type[type[AssetRef]], modifier[public], parameter[name]] begin[{] local_variable[type[String], select] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qua...
Keyword[public] identifier[AssetRef] identifier[retrieveRef] operator[SEP] identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[IOException] , identifier[SQLException] { identifier[String] identifier[select] operator[=] literal[String] operator[SEP] Keyword[try] operator[SEP] identifier[...
public void setEnableLogTypes(java.util.Collection<String> enableLogTypes) { if (enableLogTypes == null) { this.enableLogTypes = null; return; } this.enableLogTypes = new com.amazonaws.internal.SdkInternalList<String>(enableLogTypes); }
class class_name[name] begin[{] method[setEnableLogTypes, return_type[void], modifier[public], parameter[enableLogTypes]] begin[{] if[binary_operation[member[.enableLogTypes], ==, literal[null]]] begin[{] assign[THIS[member[None.enableLogTypes]], literal[null]] ...
Keyword[public] Keyword[void] identifier[setEnableLogTypes] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[enableLogTypes] operator[SEP] { Keyword[if] operator[SEP] identifier[enableLogTypes] operator[==] Ot...
public WebFacesUIComponentDescriptor addNamespace(String name, String value) { model.attribute(name, value); return this; }
class class_name[name] begin[{] method[addNamespace, return_type[type[WebFacesUIComponentDescriptor]], modifier[public], parameter[name, value]] begin[{] call[model.attribute, parameter[member[.name], member[.value]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[WebFacesUIComponentDescriptor] identifier[addNamespace] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[value] operator[SEP] { identifier[model] operator[SEP] identifier[attribute] operator[SEP] identifier[name] , identifier[value] operator[SEP] oper...
protected SimpleSlot getFreeSlotForTask(ExecutionVertex vertex, Iterable<TaskManagerLocation> requestedLocations, boolean localOnly) { // we need potentially to loop multiple times, because there may be false positives // in the set-with-available-instances while (true) { Pair<Instance, L...
class class_name[name] begin[{] method[getFreeSlotForTask, return_type[type[SimpleSlot]], modifier[protected], parameter[vertex, requestedLocations, localOnly]] begin[{] while[literal[true]] begin[{] local_variable[type[Pair], instanceLocalityPair] if[binary_...
Keyword[protected] identifier[SimpleSlot] identifier[getFreeSlotForTask] operator[SEP] identifier[ExecutionVertex] identifier[vertex] , identifier[Iterable] operator[<] identifier[TaskManagerLocation] operator[>] identifier[requestedLocations] , Keyword[boolean] identifier[localOnly] operator[SEP] { Keyword[wh...
private boolean linksToOtherDomain(Adaptable adaptable, Page currentPage, Resource targetResource) { if (currentPage == null || targetResource == null) { return false; } UrlHandlerConfig urlHandlerConfig = AdaptTo.notNull(adaptable, UrlHandlerConfig.class); Resource currentResource = AdaptTo.notN...
class class_name[name] begin[{] method[linksToOtherDomain, return_type[type[boolean]], modifier[private], parameter[adaptable, currentPage, targetResource]] begin[{] if[binary_operation[binary_operation[member[.currentPage], ==, literal[null]], ||, binary_operation[member[.targetResource], ==, ...
Keyword[private] Keyword[boolean] identifier[linksToOtherDomain] operator[SEP] identifier[Adaptable] identifier[adaptable] , identifier[Page] identifier[currentPage] , identifier[Resource] identifier[targetResource] operator[SEP] { Keyword[if] operator[SEP] identifier[currentPage] operator[==] Other[null] oper...
private Object getPropertyValue(GDLParser.LiteralContext literalContext) { String text; if (literalContext.StringLiteral() != null) { return parseString(literalContext.StringLiteral().getText()); } else if (literalContext.BooleanLiteral() != null) { return Boolean.parseBoolean(literalContext.Boo...
class class_name[name] begin[{] method[getPropertyValue, return_type[type[Object]], modifier[private], parameter[literalContext]] begin[{] local_variable[type[String], text] if[binary_operation[call[literalContext.StringLiteral, parameter[]], !=, literal[null]]] begin[{] ret...
Keyword[private] identifier[Object] identifier[getPropertyValue] operator[SEP] identifier[GDLParser] operator[SEP] identifier[LiteralContext] identifier[literalContext] operator[SEP] { identifier[String] identifier[text] operator[SEP] Keyword[if] operator[SEP] identifier[literalContext] operator[SEP] identifier[...
public double coveringRadiusFromEntries(DBID routingObjectID, AbstractMTree<O, N, E, ?> mTree) { double coveringRadius = 0.; for(int i = 0; i < getNumEntries(); i++) { E entry = getEntry(i); final double cover = entry.getParentDistance() + entry.getCoveringRadius(); coveringRadius = coveringRa...
class class_name[name] begin[{] method[coveringRadiusFromEntries, return_type[type[double]], modifier[public], parameter[routingObjectID, mTree]] begin[{] local_variable[type[double], coveringRadius] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[...
Keyword[public] Keyword[double] identifier[coveringRadiusFromEntries] operator[SEP] identifier[DBID] identifier[routingObjectID] , identifier[AbstractMTree] operator[<] identifier[O] , identifier[N] , identifier[E] , operator[?] operator[>] identifier[mTree] operator[SEP] { Keyword[double] identifier[coverin...