code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
protected void addContents(Iterable<? extends Element> classlist, boolean wantFrames, Content content) { for (Element element : classlist) { TypeElement typeElement = (TypeElement)element; if (!utils.isCoreClass(typeElement)) { continue; ...
class class_name[name] begin[{] method[addContents, return_type[void], modifier[protected], parameter[classlist, wantFrames, content]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Ca...
Keyword[protected] Keyword[void] identifier[addContents] operator[SEP] identifier[Iterable] operator[<] operator[?] Keyword[extends] identifier[Element] operator[>] identifier[classlist] , Keyword[boolean] identifier[wantFrames] , identifier[Content] identifier[content] operator[SEP] { Keyword[for] operator[SE...
private BeanO allocateBeanO(ContainerTx tx) throws RemoteException { BeanO result = null; long wait_time = beanMetaData.ivMaxCreationTimeout; // default is 5 minutes boolean beanAvailable = false; final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); // ...
class class_name[name] begin[{] method[allocateBeanO, return_type[type[BeanO]], modifier[private], parameter[tx]] begin[{] local_variable[type[BeanO], result] local_variable[type[long], wait_time] local_variable[type[boolean], beanAvailable] local_variable[type[boolean], isTrace...
Keyword[private] identifier[BeanO] identifier[allocateBeanO] operator[SEP] identifier[ContainerTx] identifier[tx] operator[SEP] Keyword[throws] identifier[RemoteException] { identifier[BeanO] identifier[result] operator[=] Other[null] operator[SEP] Keyword[long] identifier[wait_time] operator[=] identifier[beanM...
public Search search(String partitionKey, String searchIndexId) { return new Search(client, this, partitionKey, searchIndexId); }
class class_name[name] begin[{] method[search, return_type[type[Search]], modifier[public], parameter[partitionKey, searchIndexId]] begin[{] return[ClassCreator(arguments=[MemberReference(member=client, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], pre...
Keyword[public] identifier[Search] identifier[search] operator[SEP] identifier[String] identifier[partitionKey] , identifier[String] identifier[searchIndexId] operator[SEP] { Keyword[return] Keyword[new] identifier[Search] operator[SEP] identifier[client] , Keyword[this] , identifier[partitionKey] , identifi...
public static String sha(String text) { if (text == null) { return null; } if (text.length() == 0) { return ""; } try { md2.update(text.getBytes("UTF8")); return hex(md2.digest()); } catch (Exception e) { e.print...
class class_name[name] begin[{] method[sha, return_type[type[String]], modifier[public static], parameter[text]] begin[{] if[binary_operation[member[.text], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] if[binary_operati...
Keyword[public] Keyword[static] identifier[String] identifier[sha] operator[SEP] identifier[String] identifier[text] operator[SEP] { Keyword[if] operator[SEP] identifier[text] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[if] operator[SEP] i...
public byte[] encode() throws IOException { final ByteBuffer buf = ByteBuffer.allocate(totalSize()); log.debug("Tag: " + this); buf.put(id.encode()); buf.put(size.encode()); putValue(buf); buf.flip(); return buf.array(); }
class class_name[name] begin[{] method[encode, return_type[type[byte]], modifier[public], parameter[]] begin[{] local_variable[type[ByteBuffer], buf] call[log.debug, parameter[binary_operation[literal["Tag: "], +, THIS[]]]] call[buf.put, parameter[call[id.encode, paramet...
Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[encode] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[final] identifier[ByteBuffer] identifier[buf] operator[=] identifier[ByteBuffer] operator[SEP] identifier[allocate] operator[SEP] identifier[totalSize] operat...
@Bean public JMustacheCompilerFactoryBean jMustacheCompiler() { JMustacheCompilerFactoryBean factoryBean = new JMustacheCompilerFactoryBean(); factoryBean.setNullValue(""); factoryBean.setDefaultValue(""); factoryBean.setEmptyStringIsFalse(true); factoryBean.setZeroIsFalse(true); factoryBean.setEscapeHTML(...
class class_name[name] begin[{] method[jMustacheCompiler, return_type[type[JMustacheCompilerFactoryBean]], modifier[public], parameter[]] begin[{] local_variable[type[JMustacheCompilerFactoryBean], factoryBean] call[factoryBean.setNullValue, parameter[literal[""]]] call[...
annotation[@] identifier[Bean] Keyword[public] identifier[JMustacheCompilerFactoryBean] identifier[jMustacheCompiler] operator[SEP] operator[SEP] { identifier[JMustacheCompilerFactoryBean] identifier[factoryBean] operator[=] Keyword[new] identifier[JMustacheCompilerFactoryBean] operator[SEP] operator[SEP] operat...
@Override public void body() { IMessageEvent msg = (IMessageEvent) getReason(); String content = (String) msg.getParameter("content").getValue(); if (content.equalsIgnoreCase("UnknownLanguageCall")) { this.getBeliefbase().getBelief("operatorTalking").setFact(true); try { String type = (String) msg...
class class_name[name] begin[{] method[body, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[IMessageEvent], msg] local_variable[type[String], content] if[call[content.equalsIgnoreCase, parameter[literal["UnknownLanguageCall"]]]] begin[{] ...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[body] operator[SEP] operator[SEP] { identifier[IMessageEvent] identifier[msg] operator[=] operator[SEP] identifier[IMessageEvent] operator[SEP] identifier[getReason] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier...
public boolean equalsExact(Adresse other) { return this.ort.equalsExact(other.ort) && (this.strasse.equals(other.strasse)) && this.hausnummer.equalsIgnoreCase(other.hausnummer); }
class class_name[name] begin[{] method[equalsExact, return_type[type[boolean]], modifier[public], parameter[other]] begin[{] return[binary_operation[binary_operation[THIS[member[None.ort]call[None.equalsExact, parameter[member[other.ort]]]], &&, THIS[]], &&, THIS[member[None.hausnummer]call[None.equals...
Keyword[public] Keyword[boolean] identifier[equalsExact] operator[SEP] identifier[Adresse] identifier[other] operator[SEP] { Keyword[return] Keyword[this] operator[SEP] identifier[ort] operator[SEP] identifier[equalsExact] operator[SEP] identifier[other] operator[SEP] identifier[ort] operator[SEP] operator[&&] o...
public Profile getProfile() throws IOException, KiteException, JSONException { String url = routes.get("user.profile"); JSONObject response = new KiteRequestHandler(proxy).getRequest(url, apiKey, accessToken); return gson.fromJson(String.valueOf(response.get("data")), Profile.class); }
class class_name[name] begin[{] method[getProfile, return_type[type[Profile]], modifier[public], parameter[]] begin[{] local_variable[type[String], url] local_variable[type[JSONObject], response] return[call[gson.fromJson, parameter[call[String.valueOf, parameter[call[response.get, para...
Keyword[public] identifier[Profile] identifier[getProfile] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] , identifier[KiteException] , identifier[JSONException] { identifier[String] identifier[url] operator[=] identifier[routes] operator[SEP] identifier[get] operator[SEP] literal[String] ...
public void debugv(Throwable t, String format, Object... params) { doLog(Level.DEBUG, FQCN, format, params, t); }
class class_name[name] begin[{] method[debugv, return_type[void], modifier[public], parameter[t, format, params]] begin[{] call[.doLog, parameter[member[Level.DEBUG], member[.FQCN], member[.format], member[.params], member[.t]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[debugv] operator[SEP] identifier[Throwable] identifier[t] , identifier[String] identifier[format] , identifier[Object] operator[...] identifier[params] operator[SEP] { identifier[doLog] operator[SEP] identifier[Level] operator[SEP] identifier[DEBUG] , identifier[FQCN] ...
public static Result temporaryRedirect(Call call) { return new Result(TEMPORARY_REDIRECT, Collections.singletonMap(LOCATION, call.path())); }
class class_name[name] begin[{] method[temporaryRedirect, return_type[type[Result]], modifier[public static], parameter[call]] begin[{] return[ClassCreator(arguments=[MemberReference(member=TEMPORARY_REDIRECT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(argume...
Keyword[public] Keyword[static] identifier[Result] identifier[temporaryRedirect] operator[SEP] identifier[Call] identifier[call] operator[SEP] { Keyword[return] Keyword[new] identifier[Result] operator[SEP] identifier[TEMPORARY_REDIRECT] , identifier[Collections] operator[SEP] identifier[singletonMap] operator[...
public INDArray output(INDArray input, boolean train, INDArray featuresMask, INDArray labelsMask) { return output(input, train, featuresMask, labelsMask, null); }
class class_name[name] begin[{] method[output, return_type[type[INDArray]], modifier[public], parameter[input, train, featuresMask, labelsMask]] begin[{] return[call[.output, parameter[member[.input], member[.train], member[.featuresMask], member[.labelsMask], literal[null]]]] end[}] END[}]
Keyword[public] identifier[INDArray] identifier[output] operator[SEP] identifier[INDArray] identifier[input] , Keyword[boolean] identifier[train] , identifier[INDArray] identifier[featuresMask] , identifier[INDArray] identifier[labelsMask] operator[SEP] { Keyword[return] identifier[output] operator[SEP] ident...
public static void rethrowRuntimeException(Throwable ex) { if (ex instanceof RuntimeException) { throw (RuntimeException) ex; } if (ex instanceof Error) { throw (Error) ex; } throw new UndeclaredThrowableException(ex); }
class class_name[name] begin[{] method[rethrowRuntimeException, return_type[void], modifier[public static], parameter[ex]] begin[{] if[binary_operation[member[.ex], instanceof, type[RuntimeException]]] begin[{] ThrowStatement(expression=Cast(expression=MemberReference(member=ex, pos...
Keyword[public] Keyword[static] Keyword[void] identifier[rethrowRuntimeException] operator[SEP] identifier[Throwable] identifier[ex] operator[SEP] { Keyword[if] operator[SEP] identifier[ex] Keyword[instanceof] identifier[RuntimeException] operator[SEP] { Keyword[throw] operator[SEP] identifier[Runtime...
public FessMessages addConstraintsPatternMessage(String property, String regexp) { assertPropertyNotNull(property); add(property, new UserMessage(CONSTRAINTS_Pattern_MESSAGE, regexp)); return this; }
class class_name[name] begin[{] method[addConstraintsPatternMessage, return_type[type[FessMessages]], modifier[public], parameter[property, regexp]] begin[{] call[.assertPropertyNotNull, parameter[member[.property]]] call[.add, parameter[member[.property], ClassCreator(arguments...
Keyword[public] identifier[FessMessages] identifier[addConstraintsPatternMessage] operator[SEP] identifier[String] identifier[property] , identifier[String] identifier[regexp] operator[SEP] { identifier[assertPropertyNotNull] operator[SEP] identifier[property] operator[SEP] operator[SEP] identifier[add] operato...
public Specification createSpecification(String systemUnderTestName, String repositoryUid, String specificationName) throws GreenPepperServerException { Specification specification = Specification.newInstance(specificationName); Repository repository = repositoryDao.getByUID(repositoryUid); ...
class class_name[name] begin[{] method[createSpecification, return_type[type[Specification]], modifier[public], parameter[systemUnderTestName, repositoryUid, specificationName]] begin[{] local_variable[type[Specification], specification] local_variable[type[Repository], repository] ...
Keyword[public] identifier[Specification] identifier[createSpecification] operator[SEP] identifier[String] identifier[systemUnderTestName] , identifier[String] identifier[repositoryUid] , identifier[String] identifier[specificationName] operator[SEP] Keyword[throws] identifier[GreenPepperServerException] { ide...
protected void parseAndSetPeriod(String attributeName) { String periodStr = getAttribute(attributeName); if (periodStr != null) { int period = 0; try { period = Integer.parseInt(periodStr); } catch (NumberFormatException nfe) { } if (period <= 0) { throw ne...
class class_name[name] begin[{] method[parseAndSetPeriod, return_type[void], modifier[protected], parameter[attributeName]] begin[{] local_variable[type[String], periodStr] if[binary_operation[member[.periodStr], !=, literal[null]]] begin[{] local_variable[type[int], period]...
Keyword[protected] Keyword[void] identifier[parseAndSetPeriod] operator[SEP] identifier[String] identifier[attributeName] operator[SEP] { identifier[String] identifier[periodStr] operator[=] identifier[getAttribute] operator[SEP] identifier[attributeName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] ide...
public Where<T, ID> or(int numClauses) { if (numClauses == 0) { throw new IllegalArgumentException("Must have at least one clause in or(numClauses)"); } Clause[] clauses = new Clause[numClauses]; for (int i = numClauses - 1; i >= 0; i--) { clauses[i] = pop("OR"); } addClause(new ManyClause(clauses, Ma...
class class_name[name] begin[{] method[or, return_type[type[Where]], modifier[public], parameter[numClauses]] begin[{] if[binary_operation[member[.numClauses], ==, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=...
Keyword[public] identifier[Where] operator[<] identifier[T] , identifier[ID] operator[>] identifier[or] operator[SEP] Keyword[int] identifier[numClauses] operator[SEP] { Keyword[if] operator[SEP] identifier[numClauses] operator[==] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[Illeg...
protected int resolveSimpleEntity(boolean checkStd) throws XMLStreamException { char[] buf = mInputBuffer; int ptr = mInputPtr; char c = buf[ptr++]; // Numeric reference? if (c == '#') { c = buf[ptr++]; int value = 0; int inputLen ...
class class_name[name] begin[{] method[resolveSimpleEntity, return_type[type[int]], modifier[protected], parameter[checkStd]] begin[{] local_variable[type[char], buf] local_variable[type[int], ptr] local_variable[type[char], c] if[binary_operation[member[.c], ==, literal...
Keyword[protected] Keyword[int] identifier[resolveSimpleEntity] operator[SEP] Keyword[boolean] identifier[checkStd] operator[SEP] Keyword[throws] identifier[XMLStreamException] { Keyword[char] operator[SEP] operator[SEP] identifier[buf] operator[=] identifier[mInputBuffer] operator[SEP] Keyword[int] identifier[p...
public boolean voteDown(ParaObject obj, String voterid) { if (obj == null || StringUtils.isBlank(voterid)) { return false; } return getEntity(invokePatch(obj.getType().concat("/").concat(obj.getId()), Entity.json(Collections.singletonMap("_votedown", voterid))), Boolean.class); }
class class_name[name] begin[{] method[voteDown, return_type[type[boolean]], modifier[public], parameter[obj, voterid]] begin[{] if[binary_operation[binary_operation[member[.obj], ==, literal[null]], ||, call[StringUtils.isBlank, parameter[member[.voterid]]]]] begin[{] return[litera...
Keyword[public] Keyword[boolean] identifier[voteDown] operator[SEP] identifier[ParaObject] identifier[obj] , identifier[String] identifier[voterid] operator[SEP] { Keyword[if] operator[SEP] identifier[obj] operator[==] Other[null] operator[||] identifier[StringUtils] operator[SEP] identifier[isBlank] operator[S...
public void doCatch(Throwable caughtException) throws Throwable { breakTsxRepeatLoop = true; if(caughtException instanceof ArrayIndexOutOfBoundsException || caughtException instanceof NoSuchElementException){ doOutput (true); // only output for certain exceptions. } else{ logger.logp(Level.SEVERE,CLAS...
class class_name[name] begin[{] method[doCatch, return_type[void], modifier[public], parameter[caughtException]] begin[{] assign[member[.breakTsxRepeatLoop], literal[true]] if[binary_operation[binary_operation[member[.caughtException], instanceof, type[ArrayIndexOutOfBoundsExcep...
Keyword[public] Keyword[void] identifier[doCatch] operator[SEP] identifier[Throwable] identifier[caughtException] operator[SEP] Keyword[throws] identifier[Throwable] { identifier[breakTsxRepeatLoop] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[caughtException] Keyword[instanceo...
public static PongMessage create(ByteBuffer data) { if (data == null || data.hasRemaining()) { return new DefaultPongMessage(data); } return EMPTY; }
class class_name[name] begin[{] method[create, return_type[type[PongMessage]], modifier[public static], parameter[data]] begin[{] if[binary_operation[binary_operation[member[.data], ==, literal[null]], ||, call[data.hasRemaining, parameter[]]]] begin[{] return[ClassCreator(arguments...
Keyword[public] Keyword[static] identifier[PongMessage] identifier[create] operator[SEP] identifier[ByteBuffer] identifier[data] operator[SEP] { Keyword[if] operator[SEP] identifier[data] operator[==] Other[null] operator[||] identifier[data] operator[SEP] identifier[hasRemaining] operator[SEP] operator[SEP] ope...
@Override public int readBytes(byte[] value, int length) throws JMSException { if (length < 0) { throw new IndexOutOfBoundsException("Length bytes to read can't be smaller than 0 but was " + length); } checkCanRead(); try { ...
class class_name[name] begin[{] method[readBytes, return_type[type[int]], modifier[public], parameter[value, length]] begin[{] if[binary_operation[member[.length], <, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_ope...
annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[readBytes] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[value] , Keyword[int] identifier[length] operator[SEP] Keyword[throws] identifier[JMSException] { Keyword[if] operator[SEP] identifier[length] operator[<] Othe...
public static <T> Supplier<T> memoize(Supplier<T> delegate) { return (delegate instanceof MemoizingSupplier) ? delegate : new MemoizingSupplier<T>(Preconditions.checkNotNull(delegate)); }
class class_name[name] begin[{] method[memoize, return_type[type[Supplier]], modifier[public static], parameter[delegate]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=delegate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr...
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Supplier] operator[<] identifier[T] operator[>] identifier[memoize] operator[SEP] identifier[Supplier] operator[<] identifier[T] operator[>] identifier[delegate] operator[SEP] { Keyword[return] operator[SEP] identifier[delegate] Key...
protected String getLocalizedType(int flags) { if ((flags & CmsAccessControlEntry.ACCESS_FLAGS_USER) > 0) { return key(Messages.GUI_LABEL_USER_0); } else { return key(Messages.GUI_LABEL_GROUP_0); } }
class class_name[name] begin[{] method[getLocalizedType, return_type[type[String]], modifier[protected], parameter[flags]] begin[{] if[binary_operation[binary_operation[member[.flags], &, member[CmsAccessControlEntry.ACCESS_FLAGS_USER]], >, literal[0]]] begin[{] return[call[.key, pa...
Keyword[protected] identifier[String] identifier[getLocalizedType] operator[SEP] Keyword[int] identifier[flags] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[flags] operator[&] identifier[CmsAccessControlEntry] operator[SEP] identifier[ACCESS_FLAGS_USER] operator[SEP] operator[>] Other[0] op...
public WriteResult insert(final DBObject[] documents, final WriteConcern aWriteConcern, final DBEncoder encoder) { return insert(asList(documents), aWriteConcern, encoder); }
class class_name[name] begin[{] method[insert, return_type[type[WriteResult]], modifier[public], parameter[documents, aWriteConcern, encoder]] begin[{] return[call[.insert, parameter[call[.asList, parameter[member[.documents]]], member[.aWriteConcern], member[.encoder]]]] end[}] END[}]
Keyword[public] identifier[WriteResult] identifier[insert] operator[SEP] Keyword[final] identifier[DBObject] operator[SEP] operator[SEP] identifier[documents] , Keyword[final] identifier[WriteConcern] identifier[aWriteConcern] , Keyword[final] identifier[DBEncoder] identifier[encoder] operator[SEP] { Keyword[r...
public static <K, E, V> Collector<E, Map<K, V>, ImmutableMap<K, V>> uniqueIndex(Function<? super E, K> keyFunction, Function<? super E, V> valueFunction) { return uniqueIndex(keyFunction, valueFunction, DEFAULT_HASHMAP_CAPACITY); }
class class_name[name] begin[{] method[uniqueIndex, return_type[type[Collector]], modifier[public static], parameter[keyFunction, valueFunction]] begin[{] return[call[.uniqueIndex, parameter[member[.keyFunction], member[.valueFunction], member[.DEFAULT_HASHMAP_CAPACITY]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[E] , identifier[V] operator[>] identifier[Collector] operator[<] identifier[E] , identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] , identifier[ImmutableMap] operator[<] identifier[K] , identifier[V] operator[>] operator[>]...
public boolean setUpCameraForVrMode(final int fpsMode) { cameraSetUpStatus = false; this.fpsMode = fpsMode; if (!isCameraOpen) { Log.e(TAG, "Camera is not open"); return false; } if (fpsMode < 0 || fpsMode > 2) { Log.e(TAG, ...
class class_name[name] begin[{] method[setUpCameraForVrMode, return_type[type[boolean]], modifier[public], parameter[fpsMode]] begin[{] assign[member[.cameraSetUpStatus], literal[false]] assign[THIS[member[None.fpsMode]], member[.fpsMode]] if[member[.isCameraOpen...
Keyword[public] Keyword[boolean] identifier[setUpCameraForVrMode] operator[SEP] Keyword[final] Keyword[int] identifier[fpsMode] operator[SEP] { identifier[cameraSetUpStatus] operator[=] literal[boolean] operator[SEP] Keyword[this] operator[SEP] identifier[fpsMode] operator[=] identifier[fpsMode] operator[SEP] Ke...
public static base_response delete(nitro_service client, String ipaddress) throws Exception { cacheforwardproxy deleteresource = new cacheforwardproxy(); deleteresource.ipaddress = ipaddress; return deleteresource.delete_resource(client); }
class class_name[name] begin[{] method[delete, return_type[type[base_response]], modifier[public static], parameter[client, ipaddress]] begin[{] local_variable[type[cacheforwardproxy], deleteresource] assign[member[deleteresource.ipaddress], member[.ipaddress]] return[call[delet...
Keyword[public] Keyword[static] identifier[base_response] identifier[delete] operator[SEP] identifier[nitro_service] identifier[client] , identifier[String] identifier[ipaddress] operator[SEP] Keyword[throws] identifier[Exception] { identifier[cacheforwardproxy] identifier[deleteresource] operator[=] Keyword[ne...
@POST @Path("/session") public Response getSession(String authorizationIdentifier) { return Response.ok().entity(sourceSessionRepository.findSessionInfoByAuthorizationId(authorizationIdentifier)).build(); }
class class_name[name] begin[{] method[getSession, return_type[type[Response]], modifier[public], parameter[authorizationIdentifier]] begin[{] return[call[Response.ok, parameter[]]] end[}] END[}]
annotation[@] identifier[POST] annotation[@] identifier[Path] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[Response] identifier[getSession] operator[SEP] identifier[String] identifier[authorizationIdentifier] operator[SEP] { Keyword[return] identifier[Response] operator[SEP] identifier[...
public void getCharacterUnlockedRecipes(String API, String name, Callback<CharacterRecipes> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name)); gw2API.getCharacterUnlockedRecipes(name, API).enqueue(callback); }
class class_name[name] begin[{] method[getCharacterUnlockedRecipes, return_type[void], modifier[public], parameter[API, name, callback]] begin[{] call[.isParamValid, parameter[ClassCreator(arguments=[MemberReference(member=API, postfix_operators=[], prefix_operators=[], qualifier=ParamType, sel...
Keyword[public] Keyword[void] identifier[getCharacterUnlockedRecipes] operator[SEP] identifier[String] identifier[API] , identifier[String] identifier[name] , identifier[Callback] operator[<] identifier[CharacterRecipes] operator[>] identifier[callback] operator[SEP] Keyword[throws] identifier[GuildWars2Exception] , ...
public UserScenarioValidation getUserScenarioValidationResults(final UserScenarioValidation scenarioValidation) { return invoke(USER_SCENARIO_VALIDATIONS, scenarioValidation.id, "results", new RequestClosure<JsonObject>() { @Override public JsonObject call...
class class_name[name] begin[{] method[getUserScenarioValidationResults, return_type[type[UserScenarioValidation]], modifier[public], parameter[scenarioValidation]] begin[{] return[call[.invoke, parameter[member[.USER_SCENARIO_VALIDATIONS], member[scenarioValidation.id], literal["results"], ClassCreato...
Keyword[public] identifier[UserScenarioValidation] identifier[getUserScenarioValidationResults] operator[SEP] Keyword[final] identifier[UserScenarioValidation] identifier[scenarioValidation] operator[SEP] { Keyword[return] identifier[invoke] operator[SEP] identifier[USER_SCENARIO_VALIDATIONS] , identifier[scena...
private synchronized void reopen(String msg, long targetPos, long length) throws IOException { if (wrappedStream != null) { closeStream("reopen(" + msg + ")", contentRangeFinish); } contentRangeStart = targetPos; contentRangeFinish = targetPos + Math.max(readahead, length) + threasholdRead; if...
class class_name[name] begin[{] method[reopen, return_type[void], modifier[synchronized private], parameter[msg, targetPos, length]] begin[{] if[binary_operation[member[.wrappedStream], !=, literal[null]]] begin[{] call[.closeStream, parameter[binary_operation[binary_ope...
Keyword[private] Keyword[synchronized] Keyword[void] identifier[reopen] operator[SEP] identifier[String] identifier[msg] , Keyword[long] identifier[targetPos] , Keyword[long] identifier[length] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[wrappedStream] operator[...
public List<Connection.KeyVal> formData() { ArrayList<Connection.KeyVal> data = new ArrayList<>(); // iterate the form control elements and accumulate their values for (Element el: elements) { if (!el.tag().isFormSubmittable()) continue; // contents are form listable, superset of su...
class class_name[name] begin[{] method[formData, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[ArrayList], data] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=tag, postfix_operators=[],...
Keyword[public] identifier[List] operator[<] identifier[Connection] operator[SEP] identifier[KeyVal] operator[>] identifier[formData] operator[SEP] operator[SEP] { identifier[ArrayList] operator[<] identifier[Connection] operator[SEP] identifier[KeyVal] operator[>] identifier[data] operator[=] Keyword[new] ident...
public void setTransitGatewayRouteTablePropagations(java.util.Collection<TransitGatewayRouteTablePropagation> transitGatewayRouteTablePropagations) { if (transitGatewayRouteTablePropagations == null) { this.transitGatewayRouteTablePropagations = null; return; } this.tran...
class class_name[name] begin[{] method[setTransitGatewayRouteTablePropagations, return_type[void], modifier[public], parameter[transitGatewayRouteTablePropagations]] begin[{] if[binary_operation[member[.transitGatewayRouteTablePropagations], ==, literal[null]]] begin[{] ...
Keyword[public] Keyword[void] identifier[setTransitGatewayRouteTablePropagations] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[TransitGatewayRouteTablePropagation] operator[>] identifier[transitGatewayRouteTablePropagations] operator[SEP] { ...
private boolean isValidationClassSame(ColumnInfo columnInfo, ColumnDef columnDef, boolean isCql3Enabled, boolean isCounterColumnType) throws Exception { return (isColumnPresent(columnInfo, columnDef, isCql3Enabled) && columnDef.getValidation_class().endsWith( isCounterColumnType ...
class class_name[name] begin[{] method[isValidationClassSame, return_type[type[boolean]], modifier[private], parameter[columnInfo, columnDef, isCql3Enabled, isCounterColumnType]] begin[{] return[binary_operation[call[.isColumnPresent, parameter[member[.columnInfo], member[.columnDef], member[.isCql3Ena...
Keyword[private] Keyword[boolean] identifier[isValidationClassSame] operator[SEP] identifier[ColumnInfo] identifier[columnInfo] , identifier[ColumnDef] identifier[columnDef] , Keyword[boolean] identifier[isCql3Enabled] , Keyword[boolean] identifier[isCounterColumnType] operator[SEP] Keyword[throws] identifier[Except...
@Override public void getMetrics(MetricsCollector collector, boolean all) { MetricsRecordBuilder metricsRecordBuilder = collector.addRecord("sparkShuffleService"); for (Map.Entry<String, Metric> entry : metricSet.getMetrics().entrySet()) { collectMetric(metricsRecordBuilder, entry.getKey(), entry.getVa...
class class_name[name] begin[{] method[getMetrics, return_type[void], modifier[public], parameter[collector, all]] begin[{] local_variable[type[MetricsRecordBuilder], metricsRecordBuilder] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(a...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[getMetrics] operator[SEP] identifier[MetricsCollector] identifier[collector] , Keyword[boolean] identifier[all] operator[SEP] { identifier[MetricsRecordBuilder] identifier[metricsRecordBuilder] operator[=] identifier[collector] operator...
public static <T> ConfigurationOptionBuilder<T> serviceLoaderStrategyOption(Class<T> serviceLoaderInterface) { final ConfigurationOptionBuilder<T> optionBuilder = new ConfigurationOptionBuilder<T>(ClassInstanceValueConverter.of(serviceLoaderInterface), serviceLoaderInterface); for (T impl : ServiceLoader.load(servi...
class class_name[name] begin[{] method[serviceLoaderStrategyOption, return_type[type[ConfigurationOptionBuilder]], modifier[public static], parameter[serviceLoaderInterface]] begin[{] local_variable[type[ConfigurationOptionBuilder], optionBuilder] ForStatement(body=BlockStatement(label=None, st...
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[ConfigurationOptionBuilder] operator[<] identifier[T] operator[>] identifier[serviceLoaderStrategyOption] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[serviceLoaderInterface] operator[SEP] { Keywo...
public int edit() throws DBException { int iErrorCode = super.edit(); this.getCurrentTable().getRecord().setEditMode(this.getBaseRecord().getEditMode()); // In case the screen has this. return iErrorCode; }
class class_name[name] begin[{] method[edit, return_type[type[int]], modifier[public], parameter[]] begin[{] local_variable[type[int], iErrorCode] THIS[call[None.getCurrentTable, parameter[]]call[None.getRecord, parameter[]]call[None.setEditMode, parameter[THIS[call[None.getBaseRecord, ...
Keyword[public] Keyword[int] identifier[edit] operator[SEP] operator[SEP] Keyword[throws] identifier[DBException] { Keyword[int] identifier[iErrorCode] operator[=] Keyword[super] operator[SEP] identifier[edit] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[getCurrentTable] opera...
@Expose public static String spellBigNumber(final Number value, final Locale locale) { return withinLocale(new Callable<String>() { public String call() { return spellBigNumber(value); } }, locale); }
class class_name[name] begin[{] method[spellBigNumber, return_type[type[String]], modifier[public static], parameter[value, locale]] begin[{] return[call[.withinLocale, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[ReturnStatement(expression=MethodInvocation(argumen...
annotation[@] identifier[Expose] Keyword[public] Keyword[static] identifier[String] identifier[spellBigNumber] operator[SEP] Keyword[final] identifier[Number] identifier[value] , Keyword[final] identifier[Locale] identifier[locale] operator[SEP] { Keyword[return] identifier[withinLocale] operator[SEP] Keyword[n...
@Override public EClass getIfcProjectedCRS() { if (ifcProjectedCRSEClass == null) { ifcProjectedCRSEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI) .getEClassifiers().get(462); } return ifcProjectedCRSEClass; }
class class_name[name] begin[{] method[getIfcProjectedCRS, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcProjectedCRSEClass], ==, literal[null]]] begin[{] assign[member[.ifcProjectedCRSEClass], Cast(expression=MethodInv...
annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcProjectedCRS] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcProjectedCRSEClass] operator[==] Other[null] operator[SEP] { identifier[ifcProjectedCRSEClass] operator[=] operator[SEP] identifier...
@Indexable(type = IndexableType.REINDEX) @Override public CPOption updateCPOption(CPOption cpOption) { return cpOptionPersistence.update(cpOption); }
class class_name[name] begin[{] method[updateCPOption, return_type[type[CPOption]], modifier[public], parameter[cpOption]] begin[{] return[call[cpOptionPersistence.update, parameter[member[.cpOption]]]] end[}] END[}]
annotation[@] identifier[Indexable] operator[SEP] identifier[type] operator[=] identifier[IndexableType] operator[SEP] identifier[REINDEX] operator[SEP] annotation[@] identifier[Override] Keyword[public] identifier[CPOption] identifier[updateCPOption] operator[SEP] identifier[CPOption] identifier[cpOption] operator[SEP...
public static boolean checkMd5sum(File file, String checkCode) throws IOException { DigestInputStream dInput = null; try { FileInputStream fInput = new FileInputStream(file); dInput = new DigestInputStream(fInput, getMd5Instance()); byte[] buf = new byte[8192]; while (dInput.read(buf) > 0) { } byt...
class class_name[name] begin[{] method[checkMd5sum, return_type[type[boolean]], modifier[public static], parameter[file, checkCode]] begin[{] local_variable[type[DigestInputStream], dInput] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[...
Keyword[public] Keyword[static] Keyword[boolean] identifier[checkMd5sum] operator[SEP] identifier[File] identifier[file] , identifier[String] identifier[checkCode] operator[SEP] Keyword[throws] identifier[IOException] { identifier[DigestInputStream] identifier[dInput] operator[=] Other[null] operator[SEP] Keywo...
public String getStringValue(String elemName) { if (_valueMap.containsKey(elemName)) return _valueMap.get(elemName).toString(); return null; }
class class_name[name] begin[{] method[getStringValue, return_type[type[String]], modifier[public], parameter[elemName]] begin[{] if[call[_valueMap.containsKey, parameter[member[.elemName]]]] begin[{] return[call[_valueMap.get, parameter[member[.elemName]]]] else begin[{] None e...
Keyword[public] identifier[String] identifier[getStringValue] operator[SEP] identifier[String] identifier[elemName] operator[SEP] { Keyword[if] operator[SEP] identifier[_valueMap] operator[SEP] identifier[containsKey] operator[SEP] identifier[elemName] operator[SEP] operator[SEP] Keyword[return] identifier[_valu...
public static File[] toFiles(final URL[] urls) throws UncheckedIOException { if (N.isNullOrEmpty(urls)) { return new File[0]; } final File[] files = new File[urls.length]; for (int i = 0; i < urls.length; i++) { files[i] = toFile(urls[i]); } ...
class class_name[name] begin[{] method[toFiles, return_type[type[File]], modifier[public static], parameter[urls]] begin[{] if[call[N.isNullOrEmpty, parameter[member[.urls]]]] begin[{] return[ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None,...
Keyword[public] Keyword[static] identifier[File] operator[SEP] operator[SEP] identifier[toFiles] operator[SEP] Keyword[final] identifier[URL] operator[SEP] operator[SEP] identifier[urls] operator[SEP] Keyword[throws] identifier[UncheckedIOException] { Keyword[if] operator[SEP] identifier[N] operator[SEP] identif...
@Override public void write(byte[] b, int off, int len) throws IOException { if (currentEntry != null && !currentEntry.isDirectory()) { if (currentEntry.getSize() < currentFileSize + len) { throw new IOException( "The current entry[" + currentEntry.getName() + "] size[" ...
class class_name[name] begin[{] method[write, return_type[void], modifier[public], parameter[b, off, len]] begin[{] if[binary_operation[binary_operation[member[.currentEntry], !=, literal[null]], &&, call[currentEntry.isDirectory, parameter[]]]] begin[{] if[binary_operat...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[write] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[b] , Keyword[int] identifier[off] , Keyword[int] identifier[len] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[cur...
public NfsSymlinkResponse symlink(String symbolicLinkData, NfsSetAttributes attributes) throws IOException { NfsSymlinkResponse response = getNfs().wrapped_sendSymlink(makeSymlinkRequest(symbolicLinkData, attributes)); setFileHandle(response.getFileHandle()); return response; }
class class_name[name] begin[{] method[symlink, return_type[type[NfsSymlinkResponse]], modifier[public], parameter[symbolicLinkData, attributes]] begin[{] local_variable[type[NfsSymlinkResponse], response] call[.setFileHandle, parameter[call[response.getFileHandle, parameter[]]]] ...
Keyword[public] identifier[NfsSymlinkResponse] identifier[symlink] operator[SEP] identifier[String] identifier[symbolicLinkData] , identifier[NfsSetAttributes] identifier[attributes] operator[SEP] Keyword[throws] identifier[IOException] { identifier[NfsSymlinkResponse] identifier[response] operator[=] identifie...
@Override public ServletRegistration.Dynamic addServlet(String servletName, Class<? extends Servlet> servletClass) { return null; }
class class_name[name] begin[{] method[addServlet, return_type[type[ServletRegistration]], modifier[public], parameter[servletName, servletClass]] begin[{] return[literal[null]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[ServletRegistration] operator[SEP] identifier[Dynamic] identifier[addServlet] operator[SEP] identifier[String] identifier[servletName] , identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Servlet] operator[>] identifier[servletClass] oper...
@Override public byte[] configSet(final byte[] parameter, final byte[] value) { checkIsInMultiOrPipeline(); client.configSet(parameter, value); return client.getBinaryBulkReply(); }
class class_name[name] begin[{] method[configSet, return_type[type[byte]], modifier[public], parameter[parameter, value]] begin[{] call[.checkIsInMultiOrPipeline, parameter[]] call[client.configSet, parameter[member[.parameter], member[.value]]] return[call[client.getBin...
annotation[@] identifier[Override] Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[configSet] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[parameter] , Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[value] operator[SEP] { identifier[...
public static boolean containsKey(@Nullable Bundle bundle, @Nullable String key) { return bundle != null && bundle.containsKey(key); }
class class_name[name] begin[{] method[containsKey, return_type[type[boolean]], modifier[public static], parameter[bundle, key]] begin[{] return[binary_operation[binary_operation[member[.bundle], !=, literal[null]], &&, call[bundle.containsKey, parameter[member[.key]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[containsKey] operator[SEP] annotation[@] identifier[Nullable] identifier[Bundle] identifier[bundle] , annotation[@] identifier[Nullable] identifier[String] identifier[key] operator[SEP] { Keyword[return] identifier[bundle] operator[!=] Other[null] oper...
private ZealotKhala doLikePattern(String prefix, String field, String pattern, boolean match, boolean positive) { if (match) { String suffix = positive ? ZealotConst.LIKE_KEY : ZealotConst.NOT_LIKE_KEY; SqlInfoBuilder.newInstace(this.source.setPrefix(prefix).setSuffix(suffix)) ...
class class_name[name] begin[{] method[doLikePattern, return_type[type[ZealotKhala]], modifier[private], parameter[prefix, field, pattern, match, positive]] begin[{] if[member[.match]] begin[{] local_variable[type[String], suffix] call[SqlInfoBuilder.newInsta...
Keyword[private] identifier[ZealotKhala] identifier[doLikePattern] operator[SEP] identifier[String] identifier[prefix] , identifier[String] identifier[field] , identifier[String] identifier[pattern] , Keyword[boolean] identifier[match] , Keyword[boolean] identifier[positive] operator[SEP] { Keyword[if] opera...
@Override public void registerSynchronization(UOWCoordinator coord, Synchronization sync) throws RollbackException, IllegalStateException, SystemException { if (isClient) { throw new SystemException(); } etm().registerSynchronization(coord, sync); }
class class_name[name] begin[{] method[registerSynchronization, return_type[void], modifier[public], parameter[coord, sync]] begin[{] if[member[.isClient]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[],...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[registerSynchronization] operator[SEP] identifier[UOWCoordinator] identifier[coord] , identifier[Synchronization] identifier[sync] operator[SEP] Keyword[throws] identifier[RollbackException] , identifier[IllegalStateException] , identifier[S...
@SuppressWarnings({"unchecked", "rawtypes", "deprecation"}) public String toJson() { StringWriter stringWriter = new StringWriter(); JsonWriter writer = new JsonWriter(stringWriter, new JsonWriterSettings()); Codec codec = getRegistry().get(getClass()); codec.encode(writer, this, Enc...
class class_name[name] begin[{] method[toJson, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[StringWriter], stringWriter] local_variable[type[JsonWriter], writer] local_variable[type[Codec], codec] call[codec.encode, parameter[mem...
annotation[@] identifier[SuppressWarnings] operator[SEP] { literal[String] , literal[String] , literal[String] } operator[SEP] Keyword[public] identifier[String] identifier[toJson] operator[SEP] operator[SEP] { identifier[StringWriter] identifier[stringWriter] operator[=] Keyword[new] identifier[Stri...
@Override public String getSignature() { String signature = super.getSignature(); if (signature.indexOf('(') == -1) { return signature; } if (LOGGER.isDebugEnabled()) { LOGGER.debug("Condensing signature [{}]", signature); } int returnTypeSpace = signature.indexOf(" "); Str...
class class_name[name] begin[{] method[getSignature, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[String], signature] if[binary_operation[call[signature.indexOf, parameter[literal['(']]], ==, literal[1]]] begin[{] return[member[.sign...
annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[getSignature] operator[SEP] operator[SEP] { identifier[String] identifier[signature] operator[=] Keyword[super] operator[SEP] identifier[getSignature] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[si...
protected void initContent(CmsExternalLinkInfoBean linkInfo) { CmsPushButton closeButton = new CmsPushButton(); closeButton.setText(Messages.get().key(Messages.GUI_CANCEL_0)); closeButton.setUseMinWidth(true); closeButton.setButtonStyle(ButtonStyle.TEXT, ButtonColor.BLUE); close...
class class_name[name] begin[{] method[initContent, return_type[void], modifier[protected], parameter[linkInfo]] begin[{] local_variable[type[CmsPushButton], closeButton] call[closeButton.setText, parameter[call[Messages.get, parameter[]]]] call[closeButton.setUseMinWidt...
Keyword[protected] Keyword[void] identifier[initContent] operator[SEP] identifier[CmsExternalLinkInfoBean] identifier[linkInfo] operator[SEP] { identifier[CmsPushButton] identifier[closeButton] operator[=] Keyword[new] identifier[CmsPushButton] operator[SEP] operator[SEP] operator[SEP] identifier[closeButton] op...
public String getMsgPhrase(final UUID _msgPhrase) throws EFapsException { return getMsgPhrase(null, MsgPhrase.get(_msgPhrase)); }
class class_name[name] begin[{] method[getMsgPhrase, return_type[type[String]], modifier[public], parameter[_msgPhrase]] begin[{] return[call[.getMsgPhrase, parameter[literal[null], call[MsgPhrase.get, parameter[member[._msgPhrase]]]]]] end[}] END[}]
Keyword[public] identifier[String] identifier[getMsgPhrase] operator[SEP] Keyword[final] identifier[UUID] identifier[_msgPhrase] operator[SEP] Keyword[throws] identifier[EFapsException] { Keyword[return] identifier[getMsgPhrase] operator[SEP] Other[null] , identifier[MsgPhrase] operator[SEP] identifier[get] ope...
@Override public INDArray pullRows(INDArray source, int sourceDimension, int[] indexes, char order) { Shape.assertValidOrder(order); long vectorLength = source.shape()[sourceDimension]; INDArray ret = Nd4j.createUninitialized(new long[] {indexes.length, vectorLength}, order); for (i...
class class_name[name] begin[{] method[pullRows, return_type[type[INDArray]], modifier[public], parameter[source, sourceDimension, indexes, order]] begin[{] call[Shape.assertValidOrder, parameter[member[.order]]] local_variable[type[long], vectorLength] local_variable[type[INDAr...
annotation[@] identifier[Override] Keyword[public] identifier[INDArray] identifier[pullRows] operator[SEP] identifier[INDArray] identifier[source] , Keyword[int] identifier[sourceDimension] , Keyword[int] operator[SEP] operator[SEP] identifier[indexes] , Keyword[char] identifier[order] operator[SEP] { identif...
void updateLocationEngineNameAndSimulation(LocationEngine locationEngine) { if (locationEngine != null) { String locationEngineName = locationEngine.getClass().getName(); boolean isSimulationEnabled = locationEngineName.equals(MOCK_PROVIDER); navigationSessionState = navigationSessionState.toBuild...
class class_name[name] begin[{] method[updateLocationEngineNameAndSimulation, return_type[void], modifier[default], parameter[locationEngine]] begin[{] if[binary_operation[member[.locationEngine], !=, literal[null]]] begin[{] local_variable[type[String], locationEngineName] ...
Keyword[void] identifier[updateLocationEngineNameAndSimulation] operator[SEP] identifier[LocationEngine] identifier[locationEngine] operator[SEP] { Keyword[if] operator[SEP] identifier[locationEngine] operator[!=] Other[null] operator[SEP] { identifier[String] identifier[locationEngineName] operator[=...
public TaskUpdateOptions withOcpDate(DateTime ocpDate) { if (ocpDate == null) { this.ocpDate = null; } else { this.ocpDate = new DateTimeRfc1123(ocpDate); } return this; }
class class_name[name] begin[{] method[withOcpDate, return_type[type[TaskUpdateOptions]], modifier[public], parameter[ocpDate]] begin[{] if[binary_operation[member[.ocpDate], ==, literal[null]]] begin[{] assign[THIS[member[None.ocpDate]], literal[null]] else begi...
Keyword[public] identifier[TaskUpdateOptions] identifier[withOcpDate] operator[SEP] identifier[DateTime] identifier[ocpDate] operator[SEP] { Keyword[if] operator[SEP] identifier[ocpDate] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[ocpDate] operator[=] Other[null] op...
protected boolean checkSupportedMessageTypes(Message msg) { if (msg instanceof TextMessage) { return true; } else { try { log.error("Unsupported message type: " + msg.getJMSType()); } catch (JMSException ignore) { } send...
class class_name[name] begin[{] method[checkSupportedMessageTypes, return_type[type[boolean]], modifier[protected], parameter[msg]] begin[{] if[binary_operation[member[.msg], instanceof, type[TextMessage]]] begin[{] return[literal[true]] else begin[{] TryStatemen...
Keyword[protected] Keyword[boolean] identifier[checkSupportedMessageTypes] operator[SEP] identifier[Message] identifier[msg] operator[SEP] { Keyword[if] operator[SEP] identifier[msg] Keyword[instanceof] identifier[TextMessage] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } ...
public void add(Collection<Server> servers) { for(Server server : servers) this.servers.put(server.getId(), server); }
class class_name[name] begin[{] method[add, return_type[void], modifier[public], parameter[servers]] begin[{] ForStatement(body=StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=servers, postfix_operators=None, prefix_operat...
Keyword[public] Keyword[void] identifier[add] operator[SEP] identifier[Collection] operator[<] identifier[Server] operator[>] identifier[servers] operator[SEP] { Keyword[for] operator[SEP] identifier[Server] identifier[server] operator[:] identifier[servers] operator[SEP] Keyword[this] operator[SEP] identifier[...
public static void unexpectedIfNot(boolean tester, String msg, Object... args) { unexpectedIf(!tester, msg, args); }
class class_name[name] begin[{] method[unexpectedIfNot, return_type[void], modifier[public static], parameter[tester, msg, args]] begin[{] call[.unexpectedIf, parameter[member[.tester], member[.msg], member[.args]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[unexpectedIfNot] operator[SEP] Keyword[boolean] identifier[tester] , identifier[String] identifier[msg] , identifier[Object] operator[...] identifier[args] operator[SEP] { identifier[unexpectedIf] operator[SEP] operator[!] identifier[tester] , identifie...
public static String classDescriptor(Type type, Types types) { SigGen sig = new SigGen(types); sig.assembleClassSig(types.erasure(type)); return sig.toString(); }
class class_name[name] begin[{] method[classDescriptor, return_type[type[String]], modifier[public static], parameter[type, types]] begin[{] local_variable[type[SigGen], sig] call[sig.assembleClassSig, parameter[call[types.erasure, parameter[member[.type]]]]] return[call[sig.toS...
Keyword[public] Keyword[static] identifier[String] identifier[classDescriptor] operator[SEP] identifier[Type] identifier[type] , identifier[Types] identifier[types] operator[SEP] { identifier[SigGen] identifier[sig] operator[=] Keyword[new] identifier[SigGen] operator[SEP] identifier[types] operator[SEP] operat...
public static long getWeekStartTime(final long time) { final Calendar start = Calendar.getInstance(); start.setFirstDayOfWeek(Calendar.MONDAY); start.setTimeInMillis(time); start.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY); start.set(Calendar.HOUR, 0); start.set(Calendar.M...
class class_name[name] begin[{] method[getWeekStartTime, return_type[type[long]], modifier[public static], parameter[time]] begin[{] local_variable[type[Calendar], start] call[start.setFirstDayOfWeek, parameter[member[Calendar.MONDAY]]] call[start.setTimeInMillis, parame...
Keyword[public] Keyword[static] Keyword[long] identifier[getWeekStartTime] operator[SEP] Keyword[final] Keyword[long] identifier[time] operator[SEP] { Keyword[final] identifier[Calendar] identifier[start] operator[=] identifier[Calendar] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[...
public String getDimensionDescription(int dimension) { if (dimension < 0 || dimension >= basisMapping.numDimensions()) throw new IllegalArgumentException( "Invalid dimension: " + dimension); return basisMapping.getDimensionDescription(dimension); }
class class_name[name] begin[{] method[getDimensionDescription, return_type[type[String]], modifier[public], parameter[dimension]] begin[{] if[binary_operation[binary_operation[member[.dimension], <, literal[0]], ||, binary_operation[member[.dimension], >=, call[basisMapping.numDimensions, para...
Keyword[public] identifier[String] identifier[getDimensionDescription] operator[SEP] Keyword[int] identifier[dimension] operator[SEP] { Keyword[if] operator[SEP] identifier[dimension] operator[<] Other[0] operator[||] identifier[dimension] operator[>=] identifier[basisMapping] operator[SEP] identifier[numDimensi...
@Override public void clearCache(CPDefinitionInventory cpDefinitionInventory) { entityCache.removeResult(CPDefinitionInventoryModelImpl.ENTITY_CACHE_ENABLED, CPDefinitionInventoryImpl.class, cpDefinitionInventory.getPrimaryKey()); finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); finderCache...
class class_name[name] begin[{] method[clearCache, return_type[void], modifier[public], parameter[cpDefinitionInventory]] begin[{] call[entityCache.removeResult, parameter[member[CPDefinitionInventoryModelImpl.ENTITY_CACHE_ENABLED], ClassReference(postfix_operators=[], prefix_operators=[], qual...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[clearCache] operator[SEP] identifier[CPDefinitionInventory] identifier[cpDefinitionInventory] operator[SEP] { identifier[entityCache] operator[SEP] identifier[removeResult] operator[SEP] identifier[CPDefinitionInventoryModelImpl] operato...
private static SignatureHolder buildSignatureHolder(String privateKey, String publicKey, Algorithms algorithms) { log.debug("构建SignatureHolder"); try { log.debug("构建公钥以及验签器"); RSAPublicKey pubKey = (RSAPublicKey) KeyTools.ge...
class class_name[name] begin[{] method[buildSignatureHolder, return_type[type[SignatureHolder]], modifier[private static], parameter[privateKey, publicKey, algorithms]] begin[{] call[log.debug, parameter[literal["构建SignatureHolder"]]] TryStatement(block=[StatementExpression(expression=M...
Keyword[private] Keyword[static] identifier[SignatureHolder] identifier[buildSignatureHolder] operator[SEP] identifier[String] identifier[privateKey] , identifier[String] identifier[publicKey] , identifier[Algorithms] identifier[algorithms] operator[SEP] { identifier[log] operator[SEP] identifier[debug] operat...
@Override public InputStream open(String path) throws IOException { try (InputStream in = delegate.open(path);) { final String config = new String(ByteStreams.toByteArray(in), StandardCharsets.UTF_8); final String substituted = substitutor.replace(config); return new Byt...
class class_name[name] begin[{] method[open, return_type[type[InputStream]], modifier[public], parameter[path]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[MemberRefe...
annotation[@] identifier[Override] Keyword[public] identifier[InputStream] identifier[open] operator[SEP] identifier[String] identifier[path] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[try] operator[SEP] identifier[InputStream] identifier[in] operator[=] identifier[delegate] operator[SEP] id...
private static long mixK1(long k1) { k1 *= C1; k1 = Long.rotateLeft(k1, 31); k1 *= C2; return k1; }
class class_name[name] begin[{] method[mixK1, return_type[type[long]], modifier[private static], parameter[k1]] begin[{] assign[member[.k1], member[.C1]] assign[member[.k1], call[Long.rotateLeft, parameter[member[.k1], literal[31]]]] assign[member[.k1], member[.C...
Keyword[private] Keyword[static] Keyword[long] identifier[mixK1] operator[SEP] Keyword[long] identifier[k1] operator[SEP] { identifier[k1] operator[*=] identifier[C1] operator[SEP] identifier[k1] operator[=] identifier[Long] operator[SEP] identifier[rotateLeft] operator[SEP] identifier[k1] , Other[31] operator[...
private static void collectTerminals(AbstractExpression expr, Set<AbstractExpression> accum) { if (expr != null) { collectTerminals(expr.getLeft(), accum); collectTerminals(expr.getRight(), accum); if (expr.getArgs() != null) { expr.getArgs().forEach(e -> coll...
class class_name[name] begin[{] method[collectTerminals, return_type[void], modifier[private static], parameter[expr, accum]] begin[{] if[binary_operation[member[.expr], !=, literal[null]]] begin[{] call[.collectTerminals, parameter[call[expr.getLeft, parameter[]], membe...
Keyword[private] Keyword[static] Keyword[void] identifier[collectTerminals] operator[SEP] identifier[AbstractExpression] identifier[expr] , identifier[Set] operator[<] identifier[AbstractExpression] operator[>] identifier[accum] operator[SEP] { Keyword[if] operator[SEP] identifier[expr] operator[!=] Other[null]...
public ADTNode<S, I, O> sift(final SymbolQueryOracle<I, O> oracle, final Word<I> word, final ADTNode<S, I, O> subtree) { ADTNode<S, I, O> current = subtree; while (!ADTUtil.isLeafNode(current)) { current = current.sift(oracl...
class class_name[name] begin[{] method[sift, return_type[type[ADTNode]], modifier[public], parameter[oracle, word, subtree]] begin[{] local_variable[type[ADTNode], current] while[call[ADTUtil.isLeafNode, parameter[member[.current]]]] begin[{] assign[member[.curre...
Keyword[public] identifier[ADTNode] operator[<] identifier[S] , identifier[I] , identifier[O] operator[>] identifier[sift] operator[SEP] Keyword[final] identifier[SymbolQueryOracle] operator[<] identifier[I] , identifier[O] operator[>] identifier[oracle] , Keyword[final] identifier[Word] operator[<] identifier[I] o...
private ArrayTypeSignature getArrayTypeSignature( GenericArrayType genericArrayType) { FullTypeSignature componentTypeSignature = getFullTypeSignature(genericArrayType .getGenericComponentType()); ArrayTypeSignature arrayTypeSignature = new ArrayTypeSignature( componentTypeSignature); return arra...
class class_name[name] begin[{] method[getArrayTypeSignature, return_type[type[ArrayTypeSignature]], modifier[private], parameter[genericArrayType]] begin[{] local_variable[type[FullTypeSignature], componentTypeSignature] local_variable[type[ArrayTypeSignature], arrayTypeSignature] retu...
Keyword[private] identifier[ArrayTypeSignature] identifier[getArrayTypeSignature] operator[SEP] identifier[GenericArrayType] identifier[genericArrayType] operator[SEP] { identifier[FullTypeSignature] identifier[componentTypeSignature] operator[=] identifier[getFullTypeSignature] operator[SEP] identifier[genericA...
static Matcher getPrefix(Matcher matcher) { if (matcher instanceof SeqMatcher) { List<Matcher> ms = matcher.<SeqMatcher>as().matchers(); return ms.get(0); } else if (matcher instanceof ZeroOrMoreMatcher) { ZeroOrMoreMatcher zm = matcher.as(); return new ZeroOrMoreMatcher(zm.repeated(), T...
class class_name[name] begin[{] method[getPrefix, return_type[type[Matcher]], modifier[static], parameter[matcher]] begin[{] if[binary_operation[member[.matcher], instanceof, type[SeqMatcher]]] begin[{] local_variable[type[List], ms] return[call[ms.get, parameter[literal...
Keyword[static] identifier[Matcher] identifier[getPrefix] operator[SEP] identifier[Matcher] identifier[matcher] operator[SEP] { Keyword[if] operator[SEP] identifier[matcher] Keyword[instanceof] identifier[SeqMatcher] operator[SEP] { identifier[List] operator[<] identifier[Matcher] operator[>] identifi...
public final ExpectBuilder withTimeout(long duration, TimeUnit unit) { validateDuration(duration); this.timeout = unit.toMillis(duration); return this; }
class class_name[name] begin[{] method[withTimeout, return_type[type[ExpectBuilder]], modifier[final public], parameter[duration, unit]] begin[{] call[.validateDuration, parameter[member[.duration]]] assign[THIS[member[None.timeout]], call[unit.toMillis, parameter[member[.durati...
Keyword[public] Keyword[final] identifier[ExpectBuilder] identifier[withTimeout] operator[SEP] Keyword[long] identifier[duration] , identifier[TimeUnit] identifier[unit] operator[SEP] { identifier[validateDuration] operator[SEP] identifier[duration] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identi...
public ITreeAppendable compile(XBlockExpression expr, ITreeAppendable b, LightweightTypeReference expectedReturnType) { final boolean isPrimitiveVoidExpected = expectedReturnType.isPrimitiveVoid(); final boolean isPrimitiveVoid = isPrimitiveVoid(expr); final boolean earlyExit = isEarlyExit(expr); final boolean...
class class_name[name] begin[{] method[compile, return_type[type[ITreeAppendable]], modifier[public], parameter[expr, b, expectedReturnType]] begin[{] local_variable[type[boolean], isPrimitiveVoidExpected] local_variable[type[boolean], isPrimitiveVoid] local_variable[type[boolean], earl...
Keyword[public] identifier[ITreeAppendable] identifier[compile] operator[SEP] identifier[XBlockExpression] identifier[expr] , identifier[ITreeAppendable] identifier[b] , identifier[LightweightTypeReference] identifier[expectedReturnType] operator[SEP] { Keyword[final] Keyword[boolean] identifier[isPrimitiveVoi...
@Override public ArtifactContainer getEnclosingContainer() { // Lazily load the enclosing container, using the root container to get the entry if (this.enclosingContainer == null) { String parentPath = PathUtils.getParent(this.getPath()); this.enclosingContainer = ("/".equals...
class class_name[name] begin[{] method[getEnclosingContainer, return_type[type[ArtifactContainer]], modifier[public], parameter[]] begin[{] if[binary_operation[THIS[member[None.enclosingContainer]], ==, literal[null]]] begin[{] local_variable[type[String], parentPath] ...
annotation[@] identifier[Override] Keyword[public] identifier[ArtifactContainer] identifier[getEnclosingContainer] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[enclosingContainer] operator[==] Other[null] operator[SEP] { identifier[String] identifier[p...
public boolean initiateOutgoingCall(String fromUri, String toUri, String viaNonProxyRoute, String body, String contentType, String contentSubType, ArrayList<String> additionalHeaders, ArrayList<String> replaceHeaders) { try { return initiateOutgoingCall(fromUri, toUri, viaNonProxyRoute, null, ...
class class_name[name] begin[{] method[initiateOutgoingCall, return_type[type[boolean]], modifier[public], parameter[fromUri, toUri, viaNonProxyRoute, body, contentType, contentSubType, additionalHeaders, replaceHeaders]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(argument...
Keyword[public] Keyword[boolean] identifier[initiateOutgoingCall] operator[SEP] identifier[String] identifier[fromUri] , identifier[String] identifier[toUri] , identifier[String] identifier[viaNonProxyRoute] , identifier[String] identifier[body] , identifier[String] identifier[contentType] , identifier[String] ide...
@SuppressWarnings("unchecked") public static TreeSet<EnvironmentType> toEnvironmentTypeList(Vector<Object> envTypesParams) { TreeSet<EnvironmentType> envTypes = new TreeSet<EnvironmentType>(); for(Object envTypeParams : envTypesParams) { envTypes.add(toEnvironmentType((Vector<Ob...
class class_name[name] begin[{] method[toEnvironmentTypeList, return_type[type[TreeSet]], modifier[public static], parameter[envTypesParams]] begin[{] local_variable[type[TreeSet], envTypes] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] identifier[TreeSet] operator[<] identifier[EnvironmentType] operator[>] identifier[toEnvironmentTypeList] operator[SEP] identifier[Vector] operator[<] identifier[Object] operator[>] identifier[envTypes...
protected void downloadArtifactTo(URL artifactUrl, File pluginFile, IAsyncResultHandler<File> handler) { InputStream istream = null; OutputStream ostream = null; try { URLConnection connection = artifactUrl.openConnection(); connection.connect(); if (connectio...
class class_name[name] begin[{] method[downloadArtifactTo, return_type[void], modifier[protected], parameter[artifactUrl, pluginFile, handler]] begin[{] local_variable[type[InputStream], istream] local_variable[type[OutputStream], ostream] TryStatement(block=[LocalVariableDeclaration(an...
Keyword[protected] Keyword[void] identifier[downloadArtifactTo] operator[SEP] identifier[URL] identifier[artifactUrl] , identifier[File] identifier[pluginFile] , identifier[IAsyncResultHandler] operator[<] identifier[File] operator[>] identifier[handler] operator[SEP] { identifier[InputStream] identifier[istre...
@Override public UpdateThingGroupsForThingResult updateThingGroupsForThing(UpdateThingGroupsForThingRequest request) { request = beforeClientExecution(request); return executeUpdateThingGroupsForThing(request); }
class class_name[name] begin[{] method[updateThingGroupsForThing, return_type[type[UpdateThingGroupsForThingResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeUpdateThingGroupsF...
annotation[@] identifier[Override] Keyword[public] identifier[UpdateThingGroupsForThingResult] identifier[updateThingGroupsForThing] operator[SEP] identifier[UpdateThingGroupsForThingRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] ident...
@Override public ListenableFuture<Empty> deleteSnapshotAsync(DeleteSnapshotRequest request) { return createUnaryListener(request, deleteSnapshotRpc, request.getName()).getAsyncResult(); }
class class_name[name] begin[{] method[deleteSnapshotAsync, return_type[type[ListenableFuture]], modifier[public], parameter[request]] begin[{] return[call[.createUnaryListener, parameter[member[.request], member[.deleteSnapshotRpc], call[request.getName, parameter[]]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[ListenableFuture] operator[<] identifier[Empty] operator[>] identifier[deleteSnapshotAsync] operator[SEP] identifier[DeleteSnapshotRequest] identifier[request] operator[SEP] { Keyword[return] identifier[createUnaryListener] operator[SEP] identifier[re...
public static Expect4j expStateCurrent(Interp interp) throws TclException { TclObject spawnObj = interp.getVar("spawn_id", 0); // confirm that this works and we don't need TCL.NAMESPACE_ONLY Map spawnIds = (Map) interp.getAssocData("spawnIds"); if( spawnIds == null ) throw new TclEx...
class class_name[name] begin[{] method[expStateCurrent, return_type[type[Expect4j]], modifier[public static], parameter[interp]] begin[{] local_variable[type[TclObject], spawnObj] local_variable[type[Map], spawnIds] if[binary_operation[member[.spawnIds], ==, literal[null]]] begi...
Keyword[public] Keyword[static] identifier[Expect4j] identifier[expStateCurrent] operator[SEP] identifier[Interp] identifier[interp] operator[SEP] Keyword[throws] identifier[TclException] { identifier[TclObject] identifier[spawnObj] operator[=] identifier[interp] operator[SEP] identifier[getVar] operator[SEP] li...
@Override public CommerceOrderNote findByCommerceOrderId_Last(long commerceOrderId, OrderByComparator<CommerceOrderNote> orderByComparator) throws NoSuchOrderNoteException { CommerceOrderNote commerceOrderNote = fetchByCommerceOrderId_Last(commerceOrderId, orderByComparator); if (commerceOrderNote != null...
class class_name[name] begin[{] method[findByCommerceOrderId_Last, return_type[type[CommerceOrderNote]], modifier[public], parameter[commerceOrderId, orderByComparator]] begin[{] local_variable[type[CommerceOrderNote], commerceOrderNote] if[binary_operation[member[.commerceOrderNote], !...
annotation[@] identifier[Override] Keyword[public] identifier[CommerceOrderNote] identifier[findByCommerceOrderId_Last] operator[SEP] Keyword[long] identifier[commerceOrderId] , identifier[OrderByComparator] operator[<] identifier[CommerceOrderNote] operator[>] identifier[orderByComparator] operator[SEP] Keyword[throw...
int searchAll( SearchComparator comp, Object searchKey) { int idx = -1; if (comp.type() == SearchComparator.EQ) idx = findEqual(comp, 0, rightMostIndex(), searchKey); else idx = findGreater(comp, 0, rightMostIndex(), searchKey); return idx; }
class class_name[name] begin[{] method[searchAll, return_type[type[int]], modifier[default], parameter[comp, searchKey]] begin[{] local_variable[type[int], idx] if[binary_operation[call[comp.type, parameter[]], ==, member[SearchComparator.EQ]]] begin[{] assign[member[.idx], ...
Keyword[int] identifier[searchAll] operator[SEP] identifier[SearchComparator] identifier[comp] , identifier[Object] identifier[searchKey] operator[SEP] { Keyword[int] identifier[idx] operator[=] operator[-] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[comp] operator[SEP] identifier[type] operator...
protected URL[] getCompileClasspathElementURLs() throws DependencyResolutionRequiredException { // build class loader to get classes to generate resources for return project.getCompileClasspathElements().stream() .map(path -> { try { return new File(path).toURI().toURL(); ...
class class_name[name] begin[{] method[getCompileClasspathElementURLs, return_type[type[URL]], modifier[protected], parameter[]] begin[{] return[call[project.getCompileClasspathElements, parameter[]]] end[}] END[}]
Keyword[protected] identifier[URL] operator[SEP] operator[SEP] identifier[getCompileClasspathElementURLs] operator[SEP] operator[SEP] Keyword[throws] identifier[DependencyResolutionRequiredException] { Keyword[return] identifier[project] operator[SEP] identifier[getCompileClasspathElements] operator[SEP] operato...
@SuppressWarnings("checkstyle:regexp") public static void showError(String message, Throwable exception) { try (PrintWriter logger = new PrintWriter(getConsoleLogger())) { if (message != null && !message.isEmpty()) { logger.println(message); } else if (exception != null) { exception.printStackTrace(log...
class class_name[name] begin[{] method[showError, return_type[void], modifier[public static], parameter[message, exception]] begin[{] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=message, postfix_operators=[], prefix_operators=[], qu...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] Keyword[void] identifier[showError] operator[SEP] identifier[String] identifier[message] , identifier[Throwable] identifier[exception] operator[SEP] { Keyword[try] operator[SEP] identifier[Prin...
public void submitEvent(GobblinTrackingEvent nonReusableEvent) { nonReusableEvent.setTimestamp(System.currentTimeMillis()); injectTagsToEvent(nonReusableEvent); EventNotification notification = new EventNotification(nonReusableEvent); sendNotification(notification); }
class class_name[name] begin[{] method[submitEvent, return_type[void], modifier[public], parameter[nonReusableEvent]] begin[{] call[nonReusableEvent.setTimestamp, parameter[call[System.currentTimeMillis, parameter[]]]] call[.injectTagsToEvent, parameter[member[.nonReusableEvent]...
Keyword[public] Keyword[void] identifier[submitEvent] operator[SEP] identifier[GobblinTrackingEvent] identifier[nonReusableEvent] operator[SEP] { identifier[nonReusableEvent] operator[SEP] identifier[setTimestamp] operator[SEP] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator...
public void replaceValues(List<Object> values) { Preconditions.checkArgument(values != null, "Values cannot be null"); Preconditions.checkArgument(values.size() <= fields.size(), "Values cannot be larger than fields size"); this.values = values; }
class class_name[name] begin[{] method[replaceValues, return_type[void], modifier[public], parameter[values]] begin[{] call[Preconditions.checkArgument, parameter[binary_operation[member[.values], !=, literal[null]], literal["Values cannot be null"]]] call[Preconditions.checkArg...
Keyword[public] Keyword[void] identifier[replaceValues] operator[SEP] identifier[List] operator[<] identifier[Object] operator[>] identifier[values] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[checkArgument] operator[SEP] identifier[values] operator[!=] Other[null] , literal[String] opera...
public void setDirectory( File file ) { List<File> roots = null; if( file == null ) { // Create a list of roots with something in them. Windows list to list non-existant devices roots = new ArrayList<>(Arrays.asList(File.listRoots())); for (int i = roots.size()-1; i >= 0; i--) { File[]files = roots.g...
class class_name[name] begin[{] method[setDirectory, return_type[void], modifier[public], parameter[file]] begin[{] local_variable[type[List], roots] if[binary_operation[member[.file], ==, literal[null]]] begin[{] assign[member[.roots], ClassCreator(arguments=[Me...
Keyword[public] Keyword[void] identifier[setDirectory] operator[SEP] identifier[File] identifier[file] operator[SEP] { identifier[List] operator[<] identifier[File] operator[>] identifier[roots] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[file] operator[==] Other[null] operator[SEP...
public void writeRecordInterface(String strClassName) { ClassInfo recClassInfo = (ClassInfo)this.getMainRecord(); Record recFileHdr = this.getRecord(FileHdr.FILE_HDR_FILE); FieldData recFieldData = (FieldData)this.getRecord(FieldData.FIELD_DATA_FILE); if (!recClassInfo.isARecord(fals...
class class_name[name] begin[{] method[writeRecordInterface, return_type[void], modifier[public], parameter[strClassName]] begin[{] local_variable[type[ClassInfo], recClassInfo] local_variable[type[Record], recFileHdr] local_variable[type[FieldData], recFieldData] if[cal...
Keyword[public] Keyword[void] identifier[writeRecordInterface] operator[SEP] identifier[String] identifier[strClassName] operator[SEP] { identifier[ClassInfo] identifier[recClassInfo] operator[=] operator[SEP] identifier[ClassInfo] operator[SEP] Keyword[this] operator[SEP] identifier[getMainRecord] operator[SEP]...
public static boolean containsInvalid(String fileName) { return StrUtil.isBlank(fileName) ? false : ReUtil.contains(FILE_NAME_INVALID_PATTERN_WIN, fileName); }
class class_name[name] begin[{] method[containsInvalid, return_type[type[boolean]], modifier[public static], parameter[fileName]] begin[{] return[TernaryExpression(condition=MethodInvocation(arguments=[MemberReference(member=fileName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])...
Keyword[public] Keyword[static] Keyword[boolean] identifier[containsInvalid] operator[SEP] identifier[String] identifier[fileName] operator[SEP] { Keyword[return] identifier[StrUtil] operator[SEP] identifier[isBlank] operator[SEP] identifier[fileName] operator[SEP] operator[?] literal[boolean] operator[:] ident...
private String antToRegexConverter(String antStyleLocationPattern) { String regexStyleLocationPattern = antStyleLocationPattern.replace("\\", "/"); regexStyleLocationPattern = regexStyleLocationPattern.replaceAll("\\.", "\\\\."); // replace . with \\. regexStyleLocationPattern = regexStyleLocati...
class class_name[name] begin[{] method[antToRegexConverter, return_type[type[String]], modifier[private], parameter[antStyleLocationPattern]] begin[{] local_variable[type[String], regexStyleLocationPattern] assign[member[.regexStyleLocationPattern], call[regexStyleLocationPattern.replac...
Keyword[private] identifier[String] identifier[antToRegexConverter] operator[SEP] identifier[String] identifier[antStyleLocationPattern] operator[SEP] { identifier[String] identifier[regexStyleLocationPattern] operator[=] identifier[antStyleLocationPattern] operator[SEP] identifier[replace] operator[SEP] literal...
public V remove(Object key) { V retval=get(key); try { MethodCall call=new MethodCall(REMOVE, key); disp.callRemoteMethods(null, call, call_options); } catch(Exception e) { throw new RuntimeException("remove(" + key + ") failed", e); } ...
class class_name[name] begin[{] method[remove, return_type[type[V]], modifier[public], parameter[key]] begin[{] local_variable[type[V], retval] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberR...
Keyword[public] identifier[V] identifier[remove] operator[SEP] identifier[Object] identifier[key] operator[SEP] { identifier[V] identifier[retval] operator[=] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[try] { identifier[MethodCall] identifier[call] operator[=] Ke...
@Deprecated public UpdateInventoryRequest newUpdateInventoryRequest(String orgToken, UpdateType updateType, String requesterEmail, Strin...
class class_name[name] begin[{] method[newUpdateInventoryRequest, return_type[type[UpdateInventoryRequest]], modifier[public], parameter[orgToken, updateType, requesterEmail, product, productVersion, projects, userKey, logData]] begin[{] local_variable[type[UpdateInventoryRequest], updateInventoryReque...
annotation[@] identifier[Deprecated] Keyword[public] identifier[UpdateInventoryRequest] identifier[newUpdateInventoryRequest] operator[SEP] identifier[String] identifier[orgToken] , identifier[UpdateType] identifier[updateType] , identifier[String] identifier[requesterEmail] , identifier[String] identifier[product] ...
private boolean isProxied(HttpServletRequest httpServletRequest) { if (Proxy.isProxyClass(httpServletRequest.getClass())) { InvocationHandler handler = Proxy.getInvocationHandler(httpServletRequest); return handler instanceof ServletRequestInvocationHandler; } return fals...
class class_name[name] begin[{] method[isProxied, return_type[type[boolean]], modifier[private], parameter[httpServletRequest]] begin[{] if[call[Proxy.isProxyClass, parameter[call[httpServletRequest.getClass, parameter[]]]]] begin[{] local_variable[type[InvocationHandler], handler] ...
Keyword[private] Keyword[boolean] identifier[isProxied] operator[SEP] identifier[HttpServletRequest] identifier[httpServletRequest] operator[SEP] { Keyword[if] operator[SEP] identifier[Proxy] operator[SEP] identifier[isProxyClass] operator[SEP] identifier[httpServletRequest] operator[SEP] identifier[getClass] op...
public CreateSnapshotScheduleResult withTags(Tag... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList<Tag>(tags.length)); } for (Tag ele : tags) { this.tags.add(ele); } return this; }
class class_name[name] begin[{] method[withTags, return_type[type[CreateSnapshotScheduleResult]], modifier[public], parameter[tags]] begin[{] if[binary_operation[THIS[member[None.tags]], ==, literal[null]]] begin[{] call[.setTags, parameter[ClassCreator(arguments=[Member...
Keyword[public] identifier[CreateSnapshotScheduleResult] identifier[withTags] operator[SEP] identifier[Tag] operator[...] identifier[tags] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[tags] operator[==] Other[null] operator[SEP] { identifier[setTags] operator[SEP] K...
public static void assemble( File moduleRoot, String moduleName, File srcOutputRoot, String factoryName, Map<String,String> controlTypeToImpl, Map<String,S...
class class_name[name] begin[{] method[assemble, return_type[void], modifier[public static], parameter[moduleRoot, moduleName, srcOutputRoot, factoryName, controlTypeToImpl, controlTypeToClients, cl]] begin[{] if[binary_operation[call[moduleRoot.exists, parameter[]], ||, call[srcOutputRoot.exis...
Keyword[public] Keyword[static] Keyword[void] identifier[assemble] operator[SEP] identifier[File] identifier[moduleRoot] , identifier[String] identifier[moduleName] , identifier[File] identifier[srcOutputRoot] , identifier[String] identifier[factoryName] , identifier[Map] operator[<] identifier[String] , identifie...
private List resolveOperationAndCopy(DelegatingList delegatingList) { synchronized(delegatingList) { CachedQuery resolved = getResolved(delegatingList); if (resolved != null && resolved.isModifiable()) { return resolved.getResult(); ...
class class_name[name] begin[{] method[resolveOperationAndCopy, return_type[type[List]], modifier[private], parameter[delegatingList]] begin[{] SYNCHRONIZED[member[.delegatingList]] BEGIN[{] local_variable[type[CachedQuery], resolved] if[binary_operation[bina...
Keyword[private] identifier[List] identifier[resolveOperationAndCopy] operator[SEP] identifier[DelegatingList] identifier[delegatingList] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[delegatingList] operator[SEP] { identifier[CachedQuery] identifier[resolved] operator[=] identifier[g...
public List<Entity> getBatch(Repository<Entity> repository, Iterable<Object> ids) { try { return getEntityCache(repository) .getAll(ids) .values() .stream() .filter(Optional::isPresent) .map(Optional::get) .map(e -> entityHydration.hydrate(e, reposit...
class class_name[name] begin[{] method[getBatch, return_type[type[List]], modifier[public], parameter[repository, ids]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=repository, postfix_operators=[], prefix_operators=[], qualifier=, selectors...
Keyword[public] identifier[List] operator[<] identifier[Entity] operator[>] identifier[getBatch] operator[SEP] identifier[Repository] operator[<] identifier[Entity] operator[>] identifier[repository] , identifier[Iterable] operator[<] identifier[Object] operator[>] identifier[ids] operator[SEP] { Keyword[try] ...
public static EJBContainer createEJBContainer(Map<?, ?> properties) throws EJBException { for(EJBContainerProvider factory : factories) { EJBContainer container = factory.createEJBContainer(properties); if(container != null) return container; } throw new EJ...
class class_name[name] begin[{] method[createEJBContainer, return_type[type[EJBContainer]], modifier[public static], parameter[properties]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializ...
Keyword[public] Keyword[static] identifier[EJBContainer] identifier[createEJBContainer] operator[SEP] identifier[Map] operator[<] operator[?] , operator[?] operator[>] identifier[properties] operator[SEP] Keyword[throws] identifier[EJBException] { Keyword[for] operator[SEP] identifier[EJBContainerProvider] iden...
public IpcLogEntry addResponseHeader(String name, String value) { if (serverAsg == null && name.equalsIgnoreCase(NetflixHeader.ASG.headerName())) { withServerAsg(value); } else if (serverZone == null && name.equalsIgnoreCase(NetflixHeader.Zone.headerName())) { withServerZone(value); } else if (s...
class class_name[name] begin[{] method[addResponseHeader, return_type[type[IpcLogEntry]], modifier[public], parameter[name, value]] begin[{] if[binary_operation[binary_operation[member[.serverAsg], ==, literal[null]], &&, call[name.equalsIgnoreCase, parameter[call[NetflixHeader.ASG.headerName, ...
Keyword[public] identifier[IpcLogEntry] identifier[addResponseHeader] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[serverAsg] operator[==] Other[null] operator[&&] identifier[name] operator[SEP] identifier[equalsIgn...