code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public static Class<?> wrap(final Class<?> type) { if (!type.isPrimitive()) { throw new IllegalArgumentException("Not primitive"); } return PRIMITIVES_WRAPPERS.get(type); }
class class_name[name] begin[{] method[wrap, return_type[type[Class]], modifier[public static], parameter[type]] begin[{] if[call[type.isPrimitive, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=N...
Keyword[public] Keyword[static] identifier[Class] operator[<] operator[?] operator[>] identifier[wrap] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[type] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[type] operator[SEP] identifier[isPrimitive] o...
public void sendMessage(@NonNull final String conversationId, @NonNull final String body, @Nullable Callback<ComapiResult<MessageSentResponse>> callback) { SessionData session = dataMgr.getSessionDAO().session(); adapter.adapt(sendMessage(conversationId, APIHelper.createMessage(conversationId, body, ses...
class class_name[name] begin[{] method[sendMessage, return_type[void], modifier[public], parameter[conversationId, body, callback]] begin[{] local_variable[type[SessionData], session] call[adapter.adapt, parameter[call[.sendMessage, parameter[member[.conversationId], call[APIHelper.crea...
Keyword[public] Keyword[void] identifier[sendMessage] operator[SEP] annotation[@] identifier[NonNull] Keyword[final] identifier[String] identifier[conversationId] , annotation[@] identifier[NonNull] Keyword[final] identifier[String] identifier[body] , annotation[@] identifier[Nullable] identifier[Callback] operator[<...
public static TaskResources apply(Protos.Offer offer, String role) { double cpu = 0; double mem = 0; double disk = 0; List<Range> portsResource = new ArrayList<>(); for (Protos.Resource r : offer.getResourcesList()) { if (!r.hasRole() || r.getRole().equals("*") || r.getRole().equals(role)) { ...
class class_name[name] begin[{] method[apply, return_type[type[TaskResources]], modifier[public static], parameter[offer, role]] begin[{] local_variable[type[double], cpu] local_variable[type[double], mem] local_variable[type[double], disk] local_variable[type[List], portsResour...
Keyword[public] Keyword[static] identifier[TaskResources] identifier[apply] operator[SEP] identifier[Protos] operator[SEP] identifier[Offer] identifier[offer] , identifier[String] identifier[role] operator[SEP] { Keyword[double] identifier[cpu] operator[=] Other[0] operator[SEP] Keyword[double] identifier[mem] ...
public String differenceBetweenIgnoreWhitespaceAnd(String first, String second) { String cleanFirst = allWhitespaceToSingleSpace(first); String cleanSecond = allWhitespaceToSingleSpace(second); String cleanDiff = differenceBetweenAnd(cleanFirst, cleanSecond); if (cleanDiff != null) { ...
class class_name[name] begin[{] method[differenceBetweenIgnoreWhitespaceAnd, return_type[type[String]], modifier[public], parameter[first, second]] begin[{] local_variable[type[String], cleanFirst] local_variable[type[String], cleanSecond] local_variable[type[String], cleanDiff] ...
Keyword[public] identifier[String] identifier[differenceBetweenIgnoreWhitespaceAnd] operator[SEP] identifier[String] identifier[first] , identifier[String] identifier[second] operator[SEP] { identifier[String] identifier[cleanFirst] operator[=] identifier[allWhitespaceToSingleSpace] operator[SEP] identifier[fir...
public static void removeDependencyManagement(File pom, Dependency dependency, Log logger) throws IOException, XmlPullParserException { Model model = getModelFromPOM(pom, logger); DependencyManagement dMgmt = model.getDependencyManagement(); if (dMgmt == null) { model.setDependencyManagement(new DependencyM...
class class_name[name] begin[{] method[removeDependencyManagement, return_type[void], modifier[public static], parameter[pom, dependency, logger]] begin[{] local_variable[type[Model], model] local_variable[type[DependencyManagement], dMgmt] if[binary_operation[member[.dMgmt], ==...
Keyword[public] Keyword[static] Keyword[void] identifier[removeDependencyManagement] operator[SEP] identifier[File] identifier[pom] , identifier[Dependency] identifier[dependency] , identifier[Log] identifier[logger] operator[SEP] Keyword[throws] identifier[IOException] , identifier[XmlPullParserException] { ...
private int readAhead(Map<String, Field> fieldsFromLogLine, StringBuilder stackTrace) throws DataParserException, IOException { StringBuilder multilineLog = new StringBuilder(); int read = readLine(multilineLog); int numberOfLinesRead = 0; while (read > -1) { try { Map<String, Field> s...
class class_name[name] begin[{] method[readAhead, return_type[type[int]], modifier[private], parameter[fieldsFromLogLine, stackTrace]] begin[{] local_variable[type[StringBuilder], multilineLog] local_variable[type[int], read] local_variable[type[int], numberOfLinesRead] ...
Keyword[private] Keyword[int] identifier[readAhead] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Field] operator[>] identifier[fieldsFromLogLine] , identifier[StringBuilder] identifier[stackTrace] operator[SEP] Keyword[throws] identifier[DataParserException] , identifier[IOException] { ...
public double[] getColumn(int column) { int i = 0; double[] columnValues = new double[vectors.size()]; for (DoubleVector vector : vectors) columnValues[i++] = vector.get(column); return columnValues; }
class class_name[name] begin[{] method[getColumn, return_type[type[double]], modifier[public], parameter[column]] begin[{] local_variable[type[int], i] local_variable[type[double], columnValues] ForStatement(body=StatementExpression(expression=Assignment(expressionl=MemberReference(memb...
Keyword[public] Keyword[double] operator[SEP] operator[SEP] identifier[getColumn] operator[SEP] Keyword[int] identifier[column] operator[SEP] { Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[columnValues] operator[=] Keyword[new] Keyword[doubl...
public static JsonNode from(InstanceDescription description, Json json) { ObjectNode node = json.newObject(); node.put("classname", description.getComponentDescription().getName()) .put("invalid", description.getState() == ComponentInstance.INVALID) .put("reason", extract...
class class_name[name] begin[{] method[from, return_type[type[JsonNode]], modifier[public static], parameter[description, json]] begin[{] local_variable[type[ObjectNode], node] call[node.put, parameter[literal["classname"], call[description.getComponentDescription, parameter[]]]] ...
Keyword[public] Keyword[static] identifier[JsonNode] identifier[from] operator[SEP] identifier[InstanceDescription] identifier[description] , identifier[Json] identifier[json] operator[SEP] { identifier[ObjectNode] identifier[node] operator[=] identifier[json] operator[SEP] identifier[newObject] operator[SEP] o...
private static double pGenotype(Genotype g, double refProb) { switch(g) { case REF_HOMOZYGOUS: return refProb * refProb; case HETEROZYGOUS: return refProb * (1.0 - refProb); case NONREF_HOMOZYGOUS: return (1.0 - refProb) * (1.0 - refProb); default: throw new I...
class class_name[name] begin[{] method[pGenotype, return_type[type[double]], modifier[private static], parameter[g, refProb]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['REF_HOMOZYGOUS'], statements=[ReturnStatement(expression=BinaryOperation(operandl=MemberReference(member=refProb, post...
Keyword[private] Keyword[static] Keyword[double] identifier[pGenotype] operator[SEP] identifier[Genotype] identifier[g] , Keyword[double] identifier[refProb] operator[SEP] { Keyword[switch] operator[SEP] identifier[g] operator[SEP] { Keyword[case] identifier[REF_HOMOZYGOUS] operator[:] Keyword[retur...
public List<MessageDestinationRefType<WebAppType<T>>> getAllMessageDestinationRef() { List<MessageDestinationRefType<WebAppType<T>>> list = new ArrayList<MessageDestinationRefType<WebAppType<T>>>(); List<Node> nodeList = childNode.get("message-destination-ref"); for(Node node: nodeList) { ...
class class_name[name] begin[{] method[getAllMessageDestinationRef, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[List], list] local_variable[type[List], nodeList] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(an...
Keyword[public] identifier[List] operator[<] identifier[MessageDestinationRefType] operator[<] identifier[WebAppType] operator[<] identifier[T] operator[>] operator[>] operator[>] identifier[getAllMessageDestinationRef] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[MessageDestinationRefTy...
public List<Object> getOptional(Object locator) { try { return find(Object.class, locator, false); } catch (Exception ex) { return new ArrayList<Object>(); } }
class class_name[name] begin[{] method[getOptional, return_type[type[List]], modifier[public], parameter[locator]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(a...
Keyword[public] identifier[List] operator[<] identifier[Object] operator[>] identifier[getOptional] operator[SEP] identifier[Object] identifier[locator] operator[SEP] { Keyword[try] { Keyword[return] identifier[find] operator[SEP] identifier[Object] operator[SEP] Keyword[class] , identifier[locator] ...
public static Map<String, String> readPhoneRegionCodes(final String pphoneCountryCode, final Locale plocale) { return CreateClassHelper.readMapFromProperties( "PhoneRegionCode" + pphoneCountryCode + "Constants", plocale, "phoneRegionCodes" + pphoneCountryCode); }
class class_name[name] begin[{] method[readPhoneRegionCodes, return_type[type[Map]], modifier[public static], parameter[pphoneCountryCode, plocale]] begin[{] return[call[CreateClassHelper.readMapFromProperties, parameter[binary_operation[binary_operation[literal["PhoneRegionCode"], +, member[.pphoneCou...
Keyword[public] Keyword[static] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[readPhoneRegionCodes] operator[SEP] Keyword[final] identifier[String] identifier[pphoneCountryCode] , Keyword[final] identifier[Locale] identifier[plocale] operator[SEP] { Keyword[return] ...
public GitlabGroup createGroup(String name, String path, String ldapCn, GitlabAccessLevel ldapAccess, GitlabUser sudoUser, Integer parentId) throws IOException { Query query = new Query() .append("name", name) .append("path", path) .appendIf("ldap_cn", ldapCn) ...
class class_name[name] begin[{] method[createGroup, return_type[type[GitlabGroup]], modifier[public], parameter[name, path, ldapCn, ldapAccess, sudoUser, parentId]] begin[{] local_variable[type[Query], query] local_variable[type[String], tailUrl] return[call[.dispatch, parameter[]]] ...
Keyword[public] identifier[GitlabGroup] identifier[createGroup] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[path] , identifier[String] identifier[ldapCn] , identifier[GitlabAccessLevel] identifier[ldapAccess] , identifier[GitlabUser] identifier[sudoUser] , identifier[Integer] ...
private void batchStatusLog(int batchCount, int numBatches, int partitionStoreCount, int numPartitionStores, long totalTimeMs) { // Calculate the estimated end time and pretty print st...
class class_name[name] begin[{] method[batchStatusLog, return_type[void], modifier[private], parameter[batchCount, numBatches, partitionStoreCount, numPartitionStores, totalTimeMs]] begin[{] local_variable[type[double], rate] local_variable[type[long], estimatedTimeMs] if[binary...
Keyword[private] Keyword[void] identifier[batchStatusLog] operator[SEP] Keyword[int] identifier[batchCount] , Keyword[int] identifier[numBatches] , Keyword[int] identifier[partitionStoreCount] , Keyword[int] identifier[numPartitionStores] , Keyword[long] identifier[totalTimeMs] operator[SEP] { Keyword[double...
public EEnum getMediumOrientationMedOrient() { if (mediumOrientationMedOrientEEnum == null) { mediumOrientationMedOrientEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(94); } return mediumOrientationMedOrientEEnum; }
class class_name[name] begin[{] method[getMediumOrientationMedOrient, return_type[type[EEnum]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.mediumOrientationMedOrientEEnum], ==, literal[null]]] begin[{] assign[member[.mediumOrientationMedOrientEEn...
Keyword[public] identifier[EEnum] identifier[getMediumOrientationMedOrient] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[mediumOrientationMedOrientEEnum] operator[==] Other[null] operator[SEP] { identifier[mediumOrientationMedOrientEEnum] operator[=] operator[SEP] identifier[EEnu...
public static String varbinaryToPrintableString(byte[] bin) { PureJavaCrc32 crc = new PureJavaCrc32(); StringBuilder sb = new StringBuilder(); sb.append("bin[crc:"); crc.update(bin); sb.append(crc.getValue()); sb.append(",value:0x"); String hex = Encoder.hexEncode...
class class_name[name] begin[{] method[varbinaryToPrintableString, return_type[type[String]], modifier[public static], parameter[bin]] begin[{] local_variable[type[PureJavaCrc32], crc] local_variable[type[StringBuilder], sb] call[sb.append, parameter[literal["bin[crc:"]]] ...
Keyword[public] Keyword[static] identifier[String] identifier[varbinaryToPrintableString] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bin] operator[SEP] { identifier[PureJavaCrc32] identifier[crc] operator[=] Keyword[new] identifier[PureJavaCrc32] operator[SEP] operator[SEP] operator[SEP] ...
public void set(long count, long min, long max, long total, double sumOfSquares, long startTime, long lastSampleTime) { this.count = count; this.min = min; this.max = max; this.total = total; this.sumOfSquares = sumOfSquares; this.startTime = startTime...
class class_name[name] begin[{] method[set, return_type[void], modifier[public], parameter[count, min, max, total, sumOfSquares, startTime, lastSampleTime]] begin[{] assign[THIS[member[None.count]], member[.count]] assign[THIS[member[None.min]], member[.min]] ass...
Keyword[public] Keyword[void] identifier[set] operator[SEP] Keyword[long] identifier[count] , Keyword[long] identifier[min] , Keyword[long] identifier[max] , Keyword[long] identifier[total] , Keyword[double] identifier[sumOfSquares] , Keyword[long] identifier[startTime] , Keyword[long] identifier[lastSampleTime] ...
public Date rescheduleJob (final TriggerKey triggerKey, final ITrigger newTrigger) throws SchedulerException { return m_aSched.rescheduleJob (triggerKey, newTrigger); }
class class_name[name] begin[{] method[rescheduleJob, return_type[type[Date]], modifier[public], parameter[triggerKey, newTrigger]] begin[{] return[call[m_aSched.rescheduleJob, parameter[member[.triggerKey], member[.newTrigger]]]] end[}] END[}]
Keyword[public] identifier[Date] identifier[rescheduleJob] operator[SEP] Keyword[final] identifier[TriggerKey] identifier[triggerKey] , Keyword[final] identifier[ITrigger] identifier[newTrigger] operator[SEP] Keyword[throws] identifier[SchedulerException] { Keyword[return] identifier[m_aSched] operator[SEP] ide...
public <T extends Tag> T put(T tag) { return (T) this.value.put(tag.getName(), tag); }
class class_name[name] begin[{] method[put, return_type[type[T]], modifier[public], parameter[tag]] begin[{] return[Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=value, postfix_operators=None, prefix_operators=None, qualifier=None, sel...
Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[Tag] operator[>] identifier[T] identifier[put] operator[SEP] identifier[T] identifier[tag] operator[SEP] { Keyword[return] operator[SEP] identifier[T] operator[SEP] Keyword[this] operator[SEP] identifier[value] operator[SEP] identifier[put] op...
@Override public final void setPickUpPlace(final PickUpPlace pPickUpPlace) { this.pickUpPlace = pPickUpPlace; if (this.itsId == null) { this.itsId = new SeGoodsPlaceId(); } this.itsId.setPickUpPlace(this.pickUpPlace); }
class class_name[name] begin[{] method[setPickUpPlace, return_type[void], modifier[final public], parameter[pPickUpPlace]] begin[{] assign[THIS[member[None.pickUpPlace]], member[.pPickUpPlace]] if[binary_operation[THIS[member[None.itsId]], ==, literal[null]]] begin[{] ...
annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[setPickUpPlace] operator[SEP] Keyword[final] identifier[PickUpPlace] identifier[pPickUpPlace] operator[SEP] { Keyword[this] operator[SEP] identifier[pickUpPlace] operator[=] identifier[pPickUpPlace] operator[SEP] Keyword[i...
public static Pair<Descriptor,String> fromFilename(File directory, String name, boolean skipComponent) { // tokenize the filename StringTokenizer st = new StringTokenizer(name, String.valueOf(separator)); String nexttok; // all filenames must start with keyspace and column family ...
class class_name[name] begin[{] method[fromFilename, return_type[type[Pair]], modifier[public static], parameter[directory, name, skipComponent]] begin[{] local_variable[type[StringTokenizer], st] local_variable[type[String], nexttok] local_variable[type[String], ksname] local_v...
Keyword[public] Keyword[static] identifier[Pair] operator[<] identifier[Descriptor] , identifier[String] operator[>] identifier[fromFilename] operator[SEP] identifier[File] identifier[directory] , identifier[String] identifier[name] , Keyword[boolean] identifier[skipComponent] operator[SEP] { identifier[Strin...
public static String toHexString(BigInteger b) { String hexValue = b.toString(16); StringBuffer buf = new StringBuffer(hexValue.length()*2); if (hexValue.startsWith("-")) { buf.append(" -"); hexValue = hexValue.substring(1); } else { buf.append(" ...
class class_name[name] begin[{] method[toHexString, return_type[type[String]], modifier[public static], parameter[b]] begin[{] local_variable[type[String], hexValue] local_variable[type[StringBuffer], buf] if[call[hexValue.startsWith, parameter[literal["-"]]]] begin[{] ...
Keyword[public] Keyword[static] identifier[String] identifier[toHexString] operator[SEP] identifier[BigInteger] identifier[b] operator[SEP] { identifier[String] identifier[hexValue] operator[=] identifier[b] operator[SEP] identifier[toString] operator[SEP] Other[16] operator[SEP] operator[SEP] identifier[StringB...
@Override public CPDefinitionSpecificationOptionValue findByC_CSO_Last( long CPDefinitionId, long CPSpecificationOptionId, OrderByComparator<CPDefinitionSpecificationOptionValue> orderByComparator) throws NoSuchCPDefinitionSpecificationOptionValueException { CPDefinitionSpecificationOptionValue cpDefinitionSpe...
class class_name[name] begin[{] method[findByC_CSO_Last, return_type[type[CPDefinitionSpecificationOptionValue]], modifier[public], parameter[CPDefinitionId, CPSpecificationOptionId, orderByComparator]] begin[{] local_variable[type[CPDefinitionSpecificationOptionValue], cpDefinitionSpecificationOptionV...
annotation[@] identifier[Override] Keyword[public] identifier[CPDefinitionSpecificationOptionValue] identifier[findByC_CSO_Last] operator[SEP] Keyword[long] identifier[CPDefinitionId] , Keyword[long] identifier[CPSpecificationOptionId] , identifier[OrderByComparator] operator[<] identifier[CPDefinitionSpecificationOp...
public CompletionStage<Job> cancel(String jobName) { Job job = findJob(jobName).orElseThrow(IllegalArgumentException::new); synchronized (this) { if(job.status() == JobStatus.DONE) { return CompletableFuture.completedFuture(job); } CompletableFuture<Job> existingHandle = cancelHandles.get(jobName); ...
class class_name[name] begin[{] method[cancel, return_type[type[CompletionStage]], modifier[public], parameter[jobName]] begin[{] local_variable[type[Job], job] SYNCHRONIZED[THIS[]] BEGIN[{] if[binary_operation[call[job.status, parameter[]], ==, member[JobStatus....
Keyword[public] identifier[CompletionStage] operator[<] identifier[Job] operator[>] identifier[cancel] operator[SEP] identifier[String] identifier[jobName] operator[SEP] { identifier[Job] identifier[job] operator[=] identifier[findJob] operator[SEP] identifier[jobName] operator[SEP] operator[SEP] identifier[orEl...
private void toJSON(JSONEmitter json) { switch (m_type) { case ARRAY: json.startArray(m_name); if (m_children != null) { for (UNode childNode : m_children) { if (childNode.isMap()) { json.startObject(); ...
class class_name[name] begin[{] method[toJSON, return_type[void], modifier[private], parameter[json]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['ARRAY'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=m_name, postfix_operators=[], prefix_op...
Keyword[private] Keyword[void] identifier[toJSON] operator[SEP] identifier[JSONEmitter] identifier[json] operator[SEP] { Keyword[switch] operator[SEP] identifier[m_type] operator[SEP] { Keyword[case] identifier[ARRAY] operator[:] identifier[json] operator[SEP] identifier[startArray] operator[SEP] ide...
private static Optional<String> getSuppliedHeaders(final String[] suppliedHeaders, final int columnNumber) { final int length = suppliedHeaders.length; if(length == 0) { return Optional.empty(); } if(columnNumber < length) { return Option...
class class_name[name] begin[{] method[getSuppliedHeaders, return_type[type[Optional]], modifier[private static], parameter[suppliedHeaders, columnNumber]] begin[{] local_variable[type[int], length] if[binary_operation[member[.length], ==, literal[0]]] begin[{] return[call[O...
Keyword[private] Keyword[static] identifier[Optional] operator[<] identifier[String] operator[>] identifier[getSuppliedHeaders] operator[SEP] Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[suppliedHeaders] , Keyword[final] Keyword[int] identifier[columnNumber] operator[SEP] { Keyword[f...
public ErrorMap getErrorMap() throws ChaiUnavailableException { final VendorFactory entryFactory = getChaiProvider().getDirectoryVendor().getVendorFactory(); return entryFactory.getErrorMap(); }
class class_name[name] begin[{] method[getErrorMap, return_type[type[ErrorMap]], modifier[public], parameter[]] begin[{] local_variable[type[VendorFactory], entryFactory] return[call[entryFactory.getErrorMap, parameter[]]] end[}] END[}]
Keyword[public] identifier[ErrorMap] identifier[getErrorMap] operator[SEP] operator[SEP] Keyword[throws] identifier[ChaiUnavailableException] { Keyword[final] identifier[VendorFactory] identifier[entryFactory] operator[=] identifier[getChaiProvider] operator[SEP] operator[SEP] operator[SEP] identifier[getDirecto...
public static void copyStream(final InputStream aInStream, final OutputStream aOutStream) throws IOException { final BufferedOutputStream outStream = new BufferedOutputStream(aOutStream); final BufferedInputStream inStream = new BufferedInputStream(aInStream); final ByteArrayOutputStream byteStr...
class class_name[name] begin[{] method[copyStream, return_type[void], modifier[public static], parameter[aInStream, aOutStream]] begin[{] local_variable[type[BufferedOutputStream], outStream] local_variable[type[BufferedInputStream], inStream] local_variable[type[ByteArrayOutputStream],...
Keyword[public] Keyword[static] Keyword[void] identifier[copyStream] operator[SEP] Keyword[final] identifier[InputStream] identifier[aInStream] , Keyword[final] identifier[OutputStream] identifier[aOutStream] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[final] identifier[BufferedOutputStream]...
public final StringBuilder appendTo(StringBuilder builder, Iterator<?> parts) { try { appendTo((Appendable) builder, parts); } catch (IOException impossible) { throw new AssertionError(impossible); } return builder; }
class class_name[name] begin[{] method[appendTo, return_type[type[StringBuilder]], modifier[final public], parameter[builder, parts]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=builder, postfix_operators=[], prefix_oper...
Keyword[public] Keyword[final] identifier[StringBuilder] identifier[appendTo] operator[SEP] identifier[StringBuilder] identifier[builder] , identifier[Iterator] operator[<] operator[?] operator[>] identifier[parts] operator[SEP] { Keyword[try] { identifier[appendTo] operator[SEP] operator[SEP] identi...
@Override public String format(int index) { StringBuilder sb = new StringBuilder(); final RomanNumeral[] values = RomanNumeral.values(); for(int i = values.length - 1; i >= 0; i--) { while(index >= values[i].weight) { sb.append(values[i]); index -= values[i].weight; ...
class class_name[name] begin[{] method[format, return_type[type[String]], modifier[public], parameter[index]] begin[{] local_variable[type[StringBuilder], sb] local_variable[type[RomanNumeral], values] ForStatement(body=BlockStatement(label=None, statements=[WhileStatement(body=BlockSta...
annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[format] operator[SEP] Keyword[int] identifier[index] operator[SEP] { identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Rom...
public void setListElementClass(Class<?> listElementClass) { this.listElementClass = listElementClass; if(listElementClass.isEnum()){ setPermittedValues(Arrays.asList(listElementClass.getEnumConstants())); } }
class class_name[name] begin[{] method[setListElementClass, return_type[void], modifier[public], parameter[listElementClass]] begin[{] assign[THIS[member[None.listElementClass]], member[.listElementClass]] if[call[listElementClass.isEnum, parameter[]]] begin[{] ...
Keyword[public] Keyword[void] identifier[setListElementClass] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[listElementClass] operator[SEP] { Keyword[this] operator[SEP] identifier[listElementClass] operator[=] identifier[listElementClass] operator[SEP] Keyword[if] operator[SEP] ...
public void clear() { if (getCache4Id() != null) { getCache4Id().clear(); } if (getCache4Name() != null) { getCache4Name().clear(); } if (getCache4UUID() != null) { getCache4UUID().clear(); } }
class class_name[name] begin[{] method[clear, return_type[void], modifier[public], parameter[]] begin[{] if[binary_operation[call[.getCache4Id, parameter[]], !=, literal[null]]] begin[{] call[.getCache4Id, parameter[]] else begin[{] None end[}] ...
Keyword[public] Keyword[void] identifier[clear] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[getCache4Id] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[getCache4Id] operator[SEP] operator[SEP] operator[SEP] identifier[clear] operator[SEP] operato...
public void setMinPriority(String minPriority) { this.minPriority = minPriority; Integer value = priorityNameToValueMap.get(minPriority); if (value == null) { value = priorityNameToValueMap.get(DEFAULT_PRIORITY); if (value == null) { throw new IllegalStat...
class class_name[name] begin[{] method[setMinPriority, return_type[void], modifier[public], parameter[minPriority]] begin[{] assign[THIS[member[None.minPriority]], member[.minPriority]] local_variable[type[Integer], value] if[binary_operation[member[.value], ==, literal[...
Keyword[public] Keyword[void] identifier[setMinPriority] operator[SEP] identifier[String] identifier[minPriority] operator[SEP] { Keyword[this] operator[SEP] identifier[minPriority] operator[=] identifier[minPriority] operator[SEP] identifier[Integer] identifier[value] operator[=] identifier[priorityNameToValueM...
public byte[] getBytes() { int length = _eob - _start; byte[] copy = new byte[length]; System.arraycopy(_bytes, _start, copy, 0, length); return copy; }
class class_name[name] begin[{] method[getBytes, return_type[type[byte]], modifier[public], parameter[]] begin[{] local_variable[type[int], length] local_variable[type[byte], copy] call[System.arraycopy, parameter[member[._bytes], member[._start], member[.copy], literal[0], memb...
Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[getBytes] operator[SEP] operator[SEP] { Keyword[int] identifier[length] operator[=] identifier[_eob] operator[-] identifier[_start] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[copy] operator[=] Keyword[new] Keyword[byte] ...
static <T> void writeNullable( final T value, final Writer<? super T> writer, final DataOutput out ) throws IOException { out.writeBoolean(value != null); if (value != null) { writer.write(value, out); } }
class class_name[name] begin[{] method[writeNullable, return_type[void], modifier[static], parameter[value, writer, out]] begin[{] call[out.writeBoolean, parameter[binary_operation[member[.value], !=, literal[null]]]] if[binary_operation[member[.value], !=, literal[null]]] begin...
Keyword[static] operator[<] identifier[T] operator[>] Keyword[void] identifier[writeNullable] operator[SEP] Keyword[final] identifier[T] identifier[value] , Keyword[final] identifier[Writer] operator[<] operator[?] Keyword[super] identifier[T] operator[>] identifier[writer] , Keyword[final] identifier[DataOutput] ide...
public void setPlacementConstraints(java.util.Collection<TaskDefinitionPlacementConstraint> placementConstraints) { if (placementConstraints == null) { this.placementConstraints = null; return; } this.placementConstraints = new com.amazonaws.internal.SdkInternalList<Task...
class class_name[name] begin[{] method[setPlacementConstraints, return_type[void], modifier[public], parameter[placementConstraints]] begin[{] if[binary_operation[member[.placementConstraints], ==, literal[null]]] begin[{] assign[THIS[member[None.placementConstraints]], ...
Keyword[public] Keyword[void] identifier[setPlacementConstraints] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[TaskDefinitionPlacementConstraint] operator[>] identifier[placementConstraints] operator[SEP] { Keyword[if] operator[SEP] ide...
@Nullable public static String getCanonicalPath (@Nullable final File aFile) throws IOException { // Note: getCanonicalPath may be a bottleneck on Unix based file systems! return aFile == null ? null : aFile.getCanonicalPath (); }
class class_name[name] begin[{] method[getCanonicalPath, return_type[type[String]], modifier[public static], parameter[aFile]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=aFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operand...
annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[String] identifier[getCanonicalPath] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[File] identifier[aFile] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[return] identifier[aFile] operator[...
public JobDefinition withParameters(java.util.Map<String, String> parameters) { setParameters(parameters); return this; }
class class_name[name] begin[{] method[withParameters, return_type[type[JobDefinition]], modifier[public], parameter[parameters]] begin[{] call[.setParameters, parameter[member[.parameters]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[JobDefinition] identifier[withParameters] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[parameters] operator[SEP] { identifier[setParameters] operator[SEP] identifi...
public void setLocale(Locale locale) { // Check for null, which indicates that we should use the default locale. if (locale == null) { locale = Locale.getDefault(); } // Fix a problem where the Hindi locale is not recognized by language alone. if ("hi".equals(locale.g...
class class_name[name] begin[{] method[setLocale, return_type[void], modifier[public], parameter[locale]] begin[{] if[binary_operation[member[.locale], ==, literal[null]]] begin[{] assign[member[.locale], call[Locale.getDefault, parameter[]]] else begin[{] None ...
Keyword[public] Keyword[void] identifier[setLocale] operator[SEP] identifier[Locale] identifier[locale] operator[SEP] { Keyword[if] operator[SEP] identifier[locale] operator[==] Other[null] operator[SEP] { identifier[locale] operator[=] identifier[Locale] operator[SEP] identifier[getDefault] operator[...
public void trace(String message) { if (getLevel() > Level.TRACE.ordinal()) return; logMessage(Level.TRACE, message, null); }
class class_name[name] begin[{] method[trace, return_type[void], modifier[public], parameter[message]] begin[{] if[binary_operation[call[.getLevel, parameter[]], >, call[Level.TRACE.ordinal, parameter[]]]] begin[{] return[None] else begin[{] None end[}] call[.log...
Keyword[public] Keyword[void] identifier[trace] operator[SEP] identifier[String] identifier[message] operator[SEP] { Keyword[if] operator[SEP] identifier[getLevel] operator[SEP] operator[SEP] operator[>] identifier[Level] operator[SEP] identifier[TRACE] operator[SEP] identifier[ordinal] operator[SEP] operator[SE...
private static void pass2(IntBuffer outptr, IntBuffer wsptr) { for (int ctr = 0; ctr < DCTSIZE; ctr++) { /* Even part: reverse the even part of the forward DCT. */ /* The rotator is sqrt(2)c(-6). */ int z2 = wsptr.get(2); int z3 = wsptr.get(6); int z...
class class_name[name] begin[{] method[pass2, return_type[void], modifier[private static], parameter[outptr, wsptr]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arg...
Keyword[private] Keyword[static] Keyword[void] identifier[pass2] operator[SEP] identifier[IntBuffer] identifier[outptr] , identifier[IntBuffer] identifier[wsptr] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[ctr] operator[=] Other[0] operator[SEP] identifier[ctr] operator[<] identifier[DCTS...
private static Double translateMarkerToRange(double size, Double min, Double max, Double value) { if (value != null && min != null && max != null) { return (size / (max - min)) * (value - min); } return value; }
class class_name[name] begin[{] method[translateMarkerToRange, return_type[type[Double]], modifier[private static], parameter[size, min, max, value]] begin[{] if[binary_operation[binary_operation[binary_operation[member[.value], !=, literal[null]], &&, binary_operation[member[.min], !=, literal...
Keyword[private] Keyword[static] identifier[Double] identifier[translateMarkerToRange] operator[SEP] Keyword[double] identifier[size] , identifier[Double] identifier[min] , identifier[Double] identifier[max] , identifier[Double] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[value] ope...
public static Filter getLoggingFilter(final String... requiredPrefixes) { // Check sanity Validate.notNull(requiredPrefixes, "requiredPrefixes"); // All done. return new Filter() { // Internal state private List<String> requiredPrefs = Arrays.asList(requiredPre...
class class_name[name] begin[{] method[getLoggingFilter, return_type[type[Filter]], modifier[public static], parameter[requiredPrefixes]] begin[{] call[Validate.notNull, parameter[member[.requiredPrefixes], literal["requiredPrefixes"]]] return[ClassCreator(arguments=[], body=[FieldDecla...
Keyword[public] Keyword[static] identifier[Filter] identifier[getLoggingFilter] operator[SEP] Keyword[final] identifier[String] operator[...] identifier[requiredPrefixes] operator[SEP] { identifier[Validate] operator[SEP] identifier[notNull] operator[SEP] identifier[requiredPrefixes] , literal[String] operator[...
public Date getDate(final String string, final String formatString, final String localeName) throws ParseException { return getDateFormat(formatString, parseLocale(localeName)).parse(string); }
class class_name[name] begin[{] method[getDate, return_type[type[Date]], modifier[public], parameter[string, formatString, localeName]] begin[{] return[call[.getDateFormat, parameter[member[.formatString], call[.parseLocale, parameter[member[.localeName]]]]]] end[}] END[}]
Keyword[public] identifier[Date] identifier[getDate] operator[SEP] Keyword[final] identifier[String] identifier[string] , Keyword[final] identifier[String] identifier[formatString] , Keyword[final] identifier[String] identifier[localeName] operator[SEP] Keyword[throws] identifier[ParseException] { Keyword[retu...
@NotNull @SuppressWarnings("unchecked") public <E extends Throwable> Exceptional<T> ifExceptionIs(@NotNull Class<E> throwableClass, @NotNull Consumer<? super E> consumer) { if ( (throwable != null) && (throwableClass.isAssignableFrom(throwable.getClass())) ) { consumer.accept...
class class_name[name] begin[{] method[ifExceptionIs, return_type[type[Exceptional]], modifier[public], parameter[throwableClass, consumer]] begin[{] if[binary_operation[binary_operation[member[.throwable], !=, literal[null]], &&, call[throwableClass.isAssignableFrom, parameter[call[throwable.g...
annotation[@] identifier[NotNull] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] operator[<] identifier[E] Keyword[extends] identifier[Throwable] operator[>] identifier[Exceptional] operator[<] identifier[T] operator[>] identifier[ifExceptionIs] operator[SEP] anno...
public CharSequence escape(CharSequence cs) { StringBuilder sb = new StringBuilder(); boolean find; for (int i = 0; i < cs.length(); i++) { char c = cs.charAt(i); find = false; for (int x = 0; x < chars.length; x++) { if (c == chars[x]) ...
class class_name[name] begin[{] method[escape, return_type[type[CharSequence]], modifier[public], parameter[cs]] begin[{] local_variable[type[StringBuilder], sb] local_variable[type[boolean], find] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotat...
Keyword[public] identifier[CharSequence] identifier[escape] operator[SEP] identifier[CharSequence] identifier[cs] operator[SEP] { identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[find] operator[SEP] K...
void moveExpression(Node expression) { // TODO(johnlenz): This is not currently used by the function inliner, // as moving the call out of the expression before the actual function call // causes additional variables to be introduced. As the variable // inliner is improved, this might be a viable optio...
class class_name[name] begin[{] method[moveExpression, return_type[void], modifier[default], parameter[expression]] begin[{] local_variable[type[String], resultName] local_variable[type[Node], injectionPoint] call[.checkNotNull, parameter[member[.injectionPoint]]] local_...
Keyword[void] identifier[moveExpression] operator[SEP] identifier[Node] identifier[expression] operator[SEP] { identifier[String] identifier[resultName] operator[=] identifier[getResultValueName] operator[SEP] operator[SEP] operator[SEP] identifier[Node] identifier[injectionPoint] operator[=] identifier[findInje...
private Template parseTemplate(Resource resource, String name, Locale locale, String encoding, Object args) throws IOException, ParseException { if (resource == null) { resource = loadResource(name, locale, encoding); } long start = logger != null && logger.isDebugEnabled() ? System....
class class_name[name] begin[{] method[parseTemplate, return_type[type[Template]], modifier[private], parameter[resource, name, locale, encoding, args]] begin[{] if[binary_operation[member[.resource], ==, literal[null]]] begin[{] assign[member[.resource], call[.loadResou...
Keyword[private] identifier[Template] identifier[parseTemplate] operator[SEP] identifier[Resource] identifier[resource] , identifier[String] identifier[name] , identifier[Locale] identifier[locale] , identifier[String] identifier[encoding] , identifier[Object] identifier[args] operator[SEP] Keyword[throws] identifi...
private boolean skipCellVersion(Cell cell) { return skipColumn != null && CellUtil.matchingRow(cell, skipColumn.getRowArray(), skipColumn.getRowOffset(), skipColumn.getRowLength()) && CellUtil.matchingFamily(cell, skipColumn.getFamilyArray(), skipColumn.getFamilyOffset(), ...
class class_name[name] begin[{] method[skipCellVersion, return_type[type[boolean]], modifier[private], parameter[cell]] begin[{] return[binary_operation[binary_operation[binary_operation[binary_operation[member[.skipColumn], !=, literal[null]], &&, call[CellUtil.matchingRow, parameter[member[.cell], ca...
Keyword[private] Keyword[boolean] identifier[skipCellVersion] operator[SEP] identifier[Cell] identifier[cell] operator[SEP] { Keyword[return] identifier[skipColumn] operator[!=] Other[null] operator[&&] identifier[CellUtil] operator[SEP] identifier[matchingRow] operator[SEP] identifier[cell] , identifier[skipCo...
public boolean matchesLocale(String loc) { return getLocale()==null || (getLocale().isPresent() && getLocale().get().startsWith(loc)); }
class class_name[name] begin[{] method[matchesLocale, return_type[type[boolean]], modifier[public], parameter[loc]] begin[{] return[binary_operation[binary_operation[call[.getLocale, parameter[]], ==, literal[null]], ||, binary_operation[call[.getLocale, parameter[]], &&, call[.getLocale, parameter[]]]...
Keyword[public] Keyword[boolean] identifier[matchesLocale] operator[SEP] identifier[String] identifier[loc] operator[SEP] { Keyword[return] identifier[getLocale] operator[SEP] operator[SEP] operator[==] Other[null] operator[||] operator[SEP] identifier[getLocale] operator[SEP] operator[SEP] operator[SEP] identif...
public byte[] get() { // Uniqueness is guaranteed by combining the hostname and the current nano second, hashing the result, and // selecting the first x bytes of the result String timestamp = String.valueOf(System.nanoTime()); byte[] digestString = (hostname + timestamp).getBytes(); ...
class class_name[name] begin[{] method[get, return_type[type[byte]], modifier[public], parameter[]] begin[{] local_variable[type[String], timestamp] local_variable[type[byte], digestString] return[call[Arrays.copyOf, parameter[call[messageDigest.digest, parameter[member[.digestString]]]...
Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[get] operator[SEP] operator[SEP] { identifier[String] identifier[timestamp] operator[=] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[System] operator[SEP] identifier[nanoTime] operator[SEP] operator[SEP] operato...
private String convertDefaultValueToString() { final Object initialValue = getArgumentValue(); if (initialValue != null) { if (isCollection() && ((Collection<?>) initialValue).isEmpty()) { // treat empty collections the same as uninitialized non-collection types ...
class class_name[name] begin[{] method[convertDefaultValueToString, return_type[type[String]], modifier[private], parameter[]] begin[{] local_variable[type[Object], initialValue] if[binary_operation[member[.initialValue], !=, literal[null]]] begin[{] if[binary_op...
Keyword[private] identifier[String] identifier[convertDefaultValueToString] operator[SEP] operator[SEP] { Keyword[final] identifier[Object] identifier[initialValue] operator[=] identifier[getArgumentValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[initialValue] operator[!=] O...
public SearchNode<O, T> findGoalPath() throws SearchNotExhaustiveException { // Delegate the search to the pluggable search algorithm. return searchAlgorithm.search(this, startStates, maxSteps, searchSteps); }
class class_name[name] begin[{] method[findGoalPath, return_type[type[SearchNode]], modifier[public], parameter[]] begin[{] return[call[searchAlgorithm.search, parameter[THIS[], member[.startStates], member[.maxSteps], member[.searchSteps]]]] end[}] END[}]
Keyword[public] identifier[SearchNode] operator[<] identifier[O] , identifier[T] operator[>] identifier[findGoalPath] operator[SEP] operator[SEP] Keyword[throws] identifier[SearchNotExhaustiveException] { Keyword[return] identifier[searchAlgorithm] operator[SEP] identifier[search] operator[SEP] Keyword[this] , ...
@Override public Integer getId() { try { return ProcessUtils.readPid(ProcessUtils.findPidFile(getDirectory())); } catch (Throwable cause) { if (cause instanceof PidUnknownException) { throw (PidUnknownException) cause; } throw new PidUnknownException("Process ID (PID) cann...
class class_name[name] begin[{] method[getId, return_type[type[Integer]], modifier[public], parameter[]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getDirectory, postfix_operators=[], prefix_opera...
annotation[@] identifier[Override] Keyword[public] identifier[Integer] identifier[getId] operator[SEP] operator[SEP] { Keyword[try] { Keyword[return] identifier[ProcessUtils] operator[SEP] identifier[readPid] operator[SEP] identifier[ProcessUtils] operator[SEP] identifier[findPidFile] operator[SEP] id...
public Observable<ServiceResponse<Page<DiagnosticCategoryInner>>> listSiteDiagnosticCategoriesSlotWithServiceResponseAsync(final String resourceGroupName, final String siteName, final String slot) { return listSiteDiagnosticCategoriesSlotSinglePageAsync(resourceGroupName, siteName, slot) .concatMap(...
class class_name[name] begin[{] method[listSiteDiagnosticCategoriesSlotWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, siteName, slot]] begin[{] return[call[.listSiteDiagnosticCategoriesSlotSinglePageAsync, parameter[member[.resourceGroupName], me...
Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[DiagnosticCategoryInner] operator[>] operator[>] operator[>] identifier[listSiteDiagnosticCategoriesSlotWithServiceResponseAsync] operator[SEP] Keyword[final] identifier[String] identifier[...
static FieldScope createFromSetFields(Message message) { return create( FieldScopeLogic.partialScope(message), Functions.constant(String.format("FieldScopes.fromSetFields({%s})", message.toString()))); }
class class_name[name] begin[{] method[createFromSetFields, return_type[type[FieldScope]], modifier[static], parameter[message]] begin[{] return[call[.create, parameter[call[FieldScopeLogic.partialScope, parameter[member[.message]]], call[Functions.constant, parameter[call[String.format, parameter[lite...
Keyword[static] identifier[FieldScope] identifier[createFromSetFields] operator[SEP] identifier[Message] identifier[message] operator[SEP] { Keyword[return] identifier[create] operator[SEP] identifier[FieldScopeLogic] operator[SEP] identifier[partialScope] operator[SEP] identifier[message] operator[SEP] , ident...
public Observable<ServiceResponse<SummarizeResultsInner>> summarizeForResourceWithServiceResponseAsync(String resourceId) { if (resourceId == null) { throw new IllegalArgumentException("Parameter resourceId is required and cannot be null."); } if (this.client.apiVersion() == null) { ...
class class_name[name] begin[{] method[summarizeForResourceWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[resourceId]] begin[{] if[binary_operation[member[.resourceId], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(argument...
Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[SummarizeResultsInner] operator[>] operator[>] identifier[summarizeForResourceWithServiceResponseAsync] operator[SEP] identifier[String] identifier[resourceId] operator[SEP] { Keyword[if] operator[SEP] identifie...
protected List<Variable> makeStationVars(List<GempakStation> stations, Dimension dim) { int numStations = stations.size(); List<Variable> vars = new ArrayList<>(); List<String> stnKeyNames = gemreader.getStationKeyNames(); for (String varName : stnKeyNames) { Variable v = makeStationVariable(...
class class_name[name] begin[{] method[makeStationVars, return_type[type[List]], modifier[protected], parameter[stations, dim]] begin[{] local_variable[type[int], numStations] local_variable[type[List], vars] local_variable[type[List], stnKeyNames] ForStatement(body=BlockStateme...
Keyword[protected] identifier[List] operator[<] identifier[Variable] operator[>] identifier[makeStationVars] operator[SEP] identifier[List] operator[<] identifier[GempakStation] operator[>] identifier[stations] , identifier[Dimension] identifier[dim] operator[SEP] { Keyword[int] identifier[numStations] operator...
@SuppressWarnings("SynchronizationOnLocalVariableOrMethodParameter") public void unregisterEventFinishedListener(EventModel<EventModel> event, EventListenerModel eventListener) throws IllegalArgumentException { for (String id : event.getAllInformations()) { ArrayList<EventListenerModel> listener...
class class_name[name] begin[{] method[unregisterEventFinishedListener, return_type[void], modifier[public], parameter[event, eventListener]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initial...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[unregisterEventFinishedListener] operator[SEP] identifier[EventModel] operator[<] identifier[EventModel] operator[>] identifier[event] , identifier[EventListenerModel] identifier[eventListene...
protected void publishRenderEvent( IPortletWindow portletWindow, HttpServletRequest httpServletRequest, RenderPart renderPart, long executionTime, boolean cached) { final IPortletWindowId portletWindowId = portletWindow.getPortletWindowId(); ...
class class_name[name] begin[{] method[publishRenderEvent, return_type[void], modifier[protected], parameter[portletWindow, httpServletRequest, renderPart, executionTime, cached]] begin[{] local_variable[type[IPortletWindowId], portletWindowId] local_variable[type[IPortalRequestInfo], portalReq...
Keyword[protected] Keyword[void] identifier[publishRenderEvent] operator[SEP] identifier[IPortletWindow] identifier[portletWindow] , identifier[HttpServletRequest] identifier[httpServletRequest] , identifier[RenderPart] identifier[renderPart] , Keyword[long] identifier[executionTime] , Keyword[boolean] identifier[c...
@Override public List<CPRuleAssetCategoryRel> findAll(int start, int end) { return findAll(start, end, null); }
class class_name[name] begin[{] method[findAll, return_type[type[List]], modifier[public], parameter[start, end]] begin[{] return[call[.findAll, parameter[member[.start], member[.end], literal[null]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[CPRuleAssetCategoryRel] operator[>] identifier[findAll] operator[SEP] Keyword[int] identifier[start] , Keyword[int] identifier[end] operator[SEP] { Keyword[return] identifier[findAll] operator[SEP] identifier[start] , id...
public static final void extendSelection(Spannable text, int index) { if (text.getSpanStart(SELECTION_END) != index) text.setSpan(SELECTION_END, index, index, Spanned.SPAN_POINT_POINT); }
class class_name[name] begin[{] method[extendSelection, return_type[void], modifier[final public static], parameter[text, index]] begin[{] if[binary_operation[call[text.getSpanStart, parameter[member[.SELECTION_END]]], !=, member[.index]]] begin[{] call[text.setSpan, parameter[membe...
Keyword[public] Keyword[static] Keyword[final] Keyword[void] identifier[extendSelection] operator[SEP] identifier[Spannable] identifier[text] , Keyword[int] identifier[index] operator[SEP] { Keyword[if] operator[SEP] identifier[text] operator[SEP] identifier[getSpanStart] operator[SEP] identifier[SELECTION_END]...
public Result<Void> addRole(AuthzTrans trans, PermDAO.Data perm, String roleFullName) { // Note: Prepared Statements for Collection updates aren't supported //ResultSet rv = try { getSession(trans).execute(UPDATE_SP + TABLE + " SET roles = roles + {'" + roleFullName + "'} " + "WHERE " + "ns = '" + per...
class class_name[name] begin[{] method[addRole, return_type[type[Result]], modifier[public], parameter[trans, perm, roleFullName]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=trans, postfix_operators=[], prefix_operators=[], qualifier=,...
Keyword[public] identifier[Result] operator[<] identifier[Void] operator[>] identifier[addRole] operator[SEP] identifier[AuthzTrans] identifier[trans] , identifier[PermDAO] operator[SEP] identifier[Data] identifier[perm] , identifier[String] identifier[roleFullName] operator[SEP] { Keyword[try] { id...
public boolean get(final T key, final GetOp op) { if (SHOULD_CHECK) { requireNonNull(key); requireNonNull(op); checkNotClosed(); txn.checkReady(); } kv.keyIn(key); final int rc = LIB.mdb_cursor_get(ptrCursor, kv.pointerKey(), kv .pointerVal(...
class class_name[name] begin[{] method[get, return_type[type[boolean]], modifier[public], parameter[key, op]] begin[{] if[member[.SHOULD_CHECK]] begin[{] call[.requireNonNull, parameter[member[.key]]] call[.requireNonNull, parameter[member[.op]]] ...
Keyword[public] Keyword[boolean] identifier[get] operator[SEP] Keyword[final] identifier[T] identifier[key] , Keyword[final] identifier[GetOp] identifier[op] operator[SEP] { Keyword[if] operator[SEP] identifier[SHOULD_CHECK] operator[SEP] { identifier[requireNonNull] operator[SEP] identifier[key] ope...
private boolean isProductMatchingSearchCriteria(Product product, String searchQueryText) { String words[] = searchQueryText.split(" "); for (String w : words) { if (product.getName().contains(w)) return true; if (product.getDescription().contains(w)) return true; if (product.getCategory().cont...
class class_name[name] begin[{] method[isProductMatchingSearchCriteria, return_type[type[boolean]], modifier[private], parameter[product, searchQueryText]] begin[{] local_variable[type[String], words] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocatio...
Keyword[private] Keyword[boolean] identifier[isProductMatchingSearchCriteria] operator[SEP] identifier[Product] identifier[product] , identifier[String] identifier[searchQueryText] operator[SEP] { identifier[String] identifier[words] operator[SEP] operator[SEP] operator[=] identifier[searchQueryText] operator[S...
public Document doc() throws IOException { // if the stream has already been read, use the text format InputSource is; if (document == null) { if (text == null) { is = new InputSource(inputStream); is.setEncoding(getCharSet().name()); } else { is = new InputSource(new StringReader(text)); } ...
class class_name[name] begin[{] method[doc, return_type[type[Document]], modifier[public], parameter[]] begin[{] local_variable[type[InputSource], is] if[binary_operation[member[.document], ==, literal[null]]] begin[{] if[binary_operation[member[.text], ==, liter...
Keyword[public] identifier[Document] identifier[doc] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[InputSource] identifier[is] operator[SEP] Keyword[if] operator[SEP] identifier[document] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[t...
@Override public void lazyDestroy() { // NOTE: if you change this logic, be sure to update recycle() as well! synchronized (availableMemorySegments) { if (!isDestroyed) { MemorySegment segment; while ((segment = availableMemorySegments.poll()) != null) { returnMemorySegment(segment); } Buf...
class class_name[name] begin[{] method[lazyDestroy, return_type[void], modifier[public], parameter[]] begin[{] SYNCHRONIZED[member[.availableMemorySegments]] BEGIN[{] if[member[.isDestroyed]] begin[{] local_variable[type[MemorySegment], segment] ...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[lazyDestroy] operator[SEP] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[availableMemorySegments] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[isDestroyed] operator[SEP] { id...
public static <R> FuncN<Observable<R>> asyncFunc(final FuncN<? extends R> func, final Scheduler scheduler) { return toAsync(func, scheduler); }
class class_name[name] begin[{] method[asyncFunc, return_type[type[FuncN]], modifier[public static], parameter[func, scheduler]] begin[{] return[call[.toAsync, parameter[member[.func], member[.scheduler]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[R] operator[>] identifier[FuncN] operator[<] identifier[Observable] operator[<] identifier[R] operator[>] operator[>] identifier[asyncFunc] operator[SEP] Keyword[final] identifier[FuncN] operator[<] operator[?] Keyword[extends] identifier[R] operator[>] identifier[...
public static Properties updateProperties(ZipFile inZip, ZipEntry cadmiumPropertiesEntry, String repoUri, String branch, String configRepoUri, String configBranch) throws IOException { Properties cadmiumProps = new Properties(); cadmiumProps.load(inZip.getInputStream(cadmiumPropertiesEntry));...
class class_name[name] begin[{] method[updateProperties, return_type[type[Properties]], modifier[public static], parameter[inZip, cadmiumPropertiesEntry, repoUri, branch, configRepoUri, configBranch]] begin[{] local_variable[type[Properties], cadmiumProps] call[cadmiumProps.load, parame...
Keyword[public] Keyword[static] identifier[Properties] identifier[updateProperties] operator[SEP] identifier[ZipFile] identifier[inZip] , identifier[ZipEntry] identifier[cadmiumPropertiesEntry] , identifier[String] identifier[repoUri] , identifier[String] identifier[branch] , identifier[String] identifier[configRep...
public RegexMatchSet withRegexMatchTuples(RegexMatchTuple... regexMatchTuples) { if (this.regexMatchTuples == null) { setRegexMatchTuples(new java.util.ArrayList<RegexMatchTuple>(regexMatchTuples.length)); } for (RegexMatchTuple ele : regexMatchTuples) { this.regexMatchTu...
class class_name[name] begin[{] method[withRegexMatchTuples, return_type[type[RegexMatchSet]], modifier[public], parameter[regexMatchTuples]] begin[{] if[binary_operation[THIS[member[None.regexMatchTuples]], ==, literal[null]]] begin[{] call[.setRegexMatchTuples, paramet...
Keyword[public] identifier[RegexMatchSet] identifier[withRegexMatchTuples] operator[SEP] identifier[RegexMatchTuple] operator[...] identifier[regexMatchTuples] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[regexMatchTuples] operator[==] Other[null] operator[SEP] { id...
private void removeHandlerIfActive(ChannelHandlerContext ctx, String name) { if (ctx.channel().isActive()) { ctx.pipeline().remove(name); } }
class class_name[name] begin[{] method[removeHandlerIfActive, return_type[void], modifier[private], parameter[ctx, name]] begin[{] if[call[ctx.channel, parameter[]]] begin[{] call[ctx.pipeline, parameter[]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[removeHandlerIfActive] operator[SEP] identifier[ChannelHandlerContext] identifier[ctx] , identifier[String] identifier[name] operator[SEP] { Keyword[if] operator[SEP] identifier[ctx] operator[SEP] identifier[channel] operator[SEP] operator[SEP] operator[SEP] identifier[...
public static ImmutableSet<OpenOption> getOptionsForChannel(Set<? extends OpenOption> options) { if (options.isEmpty()) { return DEFAULT_READ; } boolean append = options.contains(APPEND); boolean write = append || options.contains(WRITE); boolean read = !write || options.contains(READ); ...
class class_name[name] begin[{] method[getOptionsForChannel, return_type[type[ImmutableSet]], modifier[public static], parameter[options]] begin[{] if[call[options.isEmpty, parameter[]]] begin[{] return[member[.DEFAULT_READ]] else begin[{] None end[}] local_v...
Keyword[public] Keyword[static] identifier[ImmutableSet] operator[<] identifier[OpenOption] operator[>] identifier[getOptionsForChannel] operator[SEP] identifier[Set] operator[<] operator[?] Keyword[extends] identifier[OpenOption] operator[>] identifier[options] operator[SEP] { Keyword[if] operator[SEP] identifi...
public ServiceFuture<List<VirtualMachineExtensionImageInner>> listVersionsAsync(String location, String publisherName, String type, String filter, Integer top, String orderby, final ServiceCallback<List<VirtualMachineExtensionImageInner>> serviceCallback) { return ServiceFuture.fromResponse(listVersionsWithServ...
class class_name[name] begin[{] method[listVersionsAsync, return_type[type[ServiceFuture]], modifier[public], parameter[location, publisherName, type, filter, top, orderby, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.listVersionsWithServiceResponseAsync, parameter...
Keyword[public] identifier[ServiceFuture] operator[<] identifier[List] operator[<] identifier[VirtualMachineExtensionImageInner] operator[>] operator[>] identifier[listVersionsAsync] operator[SEP] identifier[String] identifier[location] , identifier[String] identifier[publisherName] , identifier[String] identifier[ty...
private void initializeDraggablePanel() { draggablePanel.setFragmentManager(getSupportFragmentManager()); draggablePanel.setTopFragment(youtubeFragment); MoviePosterFragment moviePosterFragment = new MoviePosterFragment(); moviePosterFragment.setPoster(VIDEO_POSTER_THUMBNAIL); moviePosterFragment.se...
class class_name[name] begin[{] method[initializeDraggablePanel, return_type[void], modifier[private], parameter[]] begin[{] call[draggablePanel.setFragmentManager, parameter[call[.getSupportFragmentManager, parameter[]]]] call[draggablePanel.setTopFragment, parameter[member[.yo...
Keyword[private] Keyword[void] identifier[initializeDraggablePanel] operator[SEP] operator[SEP] { identifier[draggablePanel] operator[SEP] identifier[setFragmentManager] operator[SEP] identifier[getSupportFragmentManager] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[draggablePanel] operator...
@RequestMapping(value = "api/edit/disableAll", method = RequestMethod.POST) public @ResponseBody String disableAll(Model model, int profileID, @RequestParam(defaultValue = Constants.PROFILE_CLIENT_DEFAULT_ID) String clientUUID) { editService.disableAll(profileID, clientUUID); ...
class class_name[name] begin[{] method[disableAll, return_type[type[String]], modifier[public], parameter[model, profileID, clientUUID]] begin[{] call[editService.disableAll, parameter[member[.profileID], member[.clientUUID]]] return[literal[null]] end[}] END[}]
annotation[@] identifier[RequestMapping] operator[SEP] identifier[value] operator[=] literal[String] , identifier[method] operator[=] identifier[RequestMethod] operator[SEP] identifier[POST] operator[SEP] Keyword[public] annotation[@] identifier[ResponseBody] identifier[String] identifier[disableAll] operator[SEP] ide...
@Override public void out() throws Exception { Object val = fa.getFieldValue(); // Object val = access; if (ens.shouldFire()) { DataflowEvent e = new DataflowEvent(ens.getController(), this, val); //// DataflowEvent e = new DataflowEvent(ens.getController(), this, acce...
class class_name[name] begin[{] method[out, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[Object], val] if[call[ens.shouldFire, parameter[]]] begin[{] local_variable[type[DataflowEvent], e] call[ens.fireOut, parameter[...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[out] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { identifier[Object] identifier[val] operator[=] identifier[fa] operator[SEP] identifier[getFieldValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator...
public TreeNode getChildAt(int childIndex) { Entry e = catalog.getEntries().get(childIndex); return new EntryTreeNode(this, e, editors); }
class class_name[name] begin[{] method[getChildAt, return_type[type[TreeNode]], modifier[public], parameter[childIndex]] begin[{] local_variable[type[Entry], e] return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=e...
Keyword[public] identifier[TreeNode] identifier[getChildAt] operator[SEP] Keyword[int] identifier[childIndex] operator[SEP] { identifier[Entry] identifier[e] operator[=] identifier[catalog] operator[SEP] identifier[getEntries] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[chi...
private void detach() { // Do not call setVisible(false) here: that would make it invisible by default (detach() is called in attach()) if (decoratedComponent != null) { decoratedComponent.removeComponentListener(decoratedComponentTracker); decoratedComponent.removeAncestorListe...
class class_name[name] begin[{] method[detach, return_type[void], modifier[private], parameter[]] begin[{] if[binary_operation[member[.decoratedComponent], !=, literal[null]]] begin[{] call[decoratedComponent.removeComponentListener, parameter[member[.decoratedComponentT...
Keyword[private] Keyword[void] identifier[detach] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[decoratedComponent] operator[!=] Other[null] operator[SEP] { identifier[decoratedComponent] operator[SEP] identifier[removeComponentListener] operator[SEP] identifier[decoratedComponent...
void addTextualCommand(Token token) { maybeFinishBasic(); // appending the empty string violates some invariants about the buffer only ever being extended if (token.kind != SoyFileParserConstants.CMD_FULL_NIL) { append(token, rawTextCmdToString(token)); } discontinuityReason = Reason.COMMAND; ...
class class_name[name] begin[{] method[addTextualCommand, return_type[void], modifier[default], parameter[token]] begin[{] call[.maybeFinishBasic, parameter[]] if[binary_operation[member[token.kind], !=, member[SoyFileParserConstants.CMD_FULL_NIL]]] begin[{] ...
Keyword[void] identifier[addTextualCommand] operator[SEP] identifier[Token] identifier[token] operator[SEP] { identifier[maybeFinishBasic] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[token] operator[SEP] identifier[kind] operator[!=] identifier[SoyFileParserConstants] operator[...
public Tuple set(Enum<?> eval, Float val) { set(eval, (Object) val); return this; }
class class_name[name] begin[{] method[set, return_type[type[Tuple]], modifier[public], parameter[eval, val]] begin[{] call[.set, parameter[member[.eval], Cast(expression=MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(argumen...
Keyword[public] identifier[Tuple] identifier[set] operator[SEP] identifier[Enum] operator[<] operator[?] operator[>] identifier[eval] , identifier[Float] identifier[val] operator[SEP] { identifier[set] operator[SEP] identifier[eval] , operator[SEP] identifier[Object] operator[SEP] identifier[val] operator[SEP]...
@Override protected String convertToString(Object value) throws Throwable { PhoneNumber number = (PhoneNumber) value; return number.getNumber(); }
class class_name[name] begin[{] method[convertToString, return_type[type[String]], modifier[protected], parameter[value]] begin[{] local_variable[type[PhoneNumber], number] return[call[number.getNumber, parameter[]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] identifier[String] identifier[convertToString] operator[SEP] identifier[Object] identifier[value] operator[SEP] Keyword[throws] identifier[Throwable] { identifier[PhoneNumber] identifier[number] operator[=] operator[SEP] identifier[PhoneNumber] operator[SEP] ...
public TextResource text(JSONPathQuery path) throws Exception { Object jsonValue = path.eval(this); return text(URI.create(jsonValue.toString())); }
class class_name[name] begin[{] method[text, return_type[type[TextResource]], modifier[public], parameter[path]] begin[{] local_variable[type[Object], jsonValue] return[call[.text, parameter[call[URI.create, parameter[call[jsonValue.toString, parameter[]]]]]]] end[}] END[}]
Keyword[public] identifier[TextResource] identifier[text] operator[SEP] identifier[JSONPathQuery] identifier[path] operator[SEP] Keyword[throws] identifier[Exception] { identifier[Object] identifier[jsonValue] operator[=] identifier[path] operator[SEP] identifier[eval] operator[SEP] Keyword[this] operator[SEP] o...
public static ByteBuf copiedBuffer( CharSequence string, int offset, int length, Charset charset) { if (string == null) { throw new NullPointerException("string"); } if (length == 0) { return EMPTY_BUFFER; } if (string instanceof CharBuffer) {...
class class_name[name] begin[{] method[copiedBuffer, return_type[type[ByteBuf]], modifier[public static], parameter[string, offset, length, charset]] begin[{] if[binary_operation[member[.string], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(...
Keyword[public] Keyword[static] identifier[ByteBuf] identifier[copiedBuffer] operator[SEP] identifier[CharSequence] identifier[string] , Keyword[int] identifier[offset] , Keyword[int] identifier[length] , identifier[Charset] identifier[charset] operator[SEP] { Keyword[if] operator[SEP] identifier[string] oper...
public static String addBorder(String[] segments) { assertInitialization(); return XLog.sLogConfiguration.borderFormatter.format(segments); }
class class_name[name] begin[{] method[addBorder, return_type[type[String]], modifier[public static], parameter[segments]] begin[{] call[.assertInitialization, parameter[]] return[call[XLog.sLogConfiguration.borderFormatter.format, parameter[member[.segments]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[addBorder] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[segments] operator[SEP] { identifier[assertInitialization] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[XLog] operator[SEP] identifier[sLogConfi...
final Object visitNonTxDataWriteCommand(InvocationContext ctx, DataWriteCommand command) { if (hasSkipLocking(command) || !shouldLockKey(command)) { return invokeNext(ctx, command); } LockPromise lockPromise = lockAndRecord(ctx, command.getKey(), getLockTimeoutMillis(command)); return ...
class class_name[name] begin[{] method[visitNonTxDataWriteCommand, return_type[type[Object]], modifier[final], parameter[ctx, command]] begin[{] if[binary_operation[call[.hasSkipLocking, parameter[member[.command]]], ||, call[.shouldLockKey, parameter[member[.command]]]]] begin[{] r...
Keyword[final] identifier[Object] identifier[visitNonTxDataWriteCommand] operator[SEP] identifier[InvocationContext] identifier[ctx] , identifier[DataWriteCommand] identifier[command] operator[SEP] { Keyword[if] operator[SEP] identifier[hasSkipLocking] operator[SEP] identifier[command] operator[SEP] operator[||...
public static void parseTraceKey(Map<String, String> tracerMap, String key, String value) { String lowKey = key.substring(PREFIX.length()); String realKey = TRACER_KEY_MAP.get(lowKey); tracerMap.put(realKey == null ? lowKey : realKey, value); }
class class_name[name] begin[{] method[parseTraceKey, return_type[void], modifier[public static], parameter[tracerMap, key, value]] begin[{] local_variable[type[String], lowKey] local_variable[type[String], realKey] call[tracerMap.put, parameter[TernaryExpression(condition=Binar...
Keyword[public] Keyword[static] Keyword[void] identifier[parseTraceKey] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[tracerMap] , identifier[String] identifier[key] , identifier[String] identifier[value] operator[SEP] { identifier[String] identifier[...
public static ObjectMethodMatchConf match(Method method, Class[] paras) { Class[] metodParaTypes = method.getParameterTypes(); if (paras.length < metodParaTypes.length) { return null; } else if (paras.length == metodParaTypes.length) { //精确匹配或者可变参数 } else if (paras.length > metodPara...
class class_name[name] begin[{] method[match, return_type[type[ObjectMethodMatchConf]], modifier[public static], parameter[method, paras]] begin[{] local_variable[type[Class], metodParaTypes] if[binary_operation[member[paras.length], <, member[metodParaTypes.length]]] begin[{] ...
Keyword[public] Keyword[static] identifier[ObjectMethodMatchConf] identifier[match] operator[SEP] identifier[Method] identifier[method] , identifier[Class] operator[SEP] operator[SEP] identifier[paras] operator[SEP] { identifier[Class] operator[SEP] operator[SEP] identifier[metodParaTypes] operator[=] identifie...
public static String alternative(final String original, final String alternative) { return isEmpty(original) ? alternative : original; }
class class_name[name] begin[{] method[alternative, return_type[type[String]], modifier[public static], parameter[original, alternative]] begin[{] return[TernaryExpression(condition=MethodInvocation(arguments=[MemberReference(member=original, postfix_operators=[], prefix_operators=[], qualifier=, selec...
Keyword[public] Keyword[static] identifier[String] identifier[alternative] operator[SEP] Keyword[final] identifier[String] identifier[original] , Keyword[final] identifier[String] identifier[alternative] operator[SEP] { Keyword[return] identifier[isEmpty] operator[SEP] identifier[original] operator[SEP] operato...
public void marshall(ListGrantsRequest listGrantsRequest, ProtocolMarshaller protocolMarshaller) { if (listGrantsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(listGrantsRequest.getLimit()...
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[listGrantsRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.listGrantsRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(pos...
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[ListGrantsRequest] identifier[listGrantsRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[listGrantsRequest] operator[==] Other[null] operator[SEP] { ...
public List<ServerRedirect> tableServers(int clientId) { List<ServerRedirect> servers = new ArrayList<>(); try { Client client = ClientService.getInstance().getClient(clientId); servers = tableServers(client.getProfile().getId(), client.getActiveServerGroup()); } catch (...
class class_name[name] begin[{] method[tableServers, return_type[type[List]], modifier[public], parameter[clientId]] begin[{] local_variable[type[List], servers] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocat...
Keyword[public] identifier[List] operator[<] identifier[ServerRedirect] operator[>] identifier[tableServers] operator[SEP] Keyword[int] identifier[clientId] operator[SEP] { identifier[List] operator[<] identifier[ServerRedirect] operator[>] identifier[servers] operator[=] Keyword[new] identifier[ArrayList] opera...
public static void cublasSswap(int n, Pointer x, int incx, Pointer y, int incy) { cublasSswapNative(n, x, incx, y, incy); checkResultBLAS(); }
class class_name[name] begin[{] method[cublasSswap, return_type[void], modifier[public static], parameter[n, x, incx, y, incy]] begin[{] call[.cublasSswapNative, parameter[member[.n], member[.x], member[.incx], member[.y], member[.incy]]] call[.checkResultBLAS, parameter[]] ...
Keyword[public] Keyword[static] Keyword[void] identifier[cublasSswap] operator[SEP] Keyword[int] identifier[n] , identifier[Pointer] identifier[x] , Keyword[int] identifier[incx] , identifier[Pointer] identifier[y] , Keyword[int] identifier[incy] operator[SEP] { identifier[cublasSswapNative] operator[SEP] id...
public static PrivateKey generatePrivateKey(String algorithm, KeySpec keySpec) { return KeyUtil.generatePrivateKey(algorithm, keySpec); }
class class_name[name] begin[{] method[generatePrivateKey, return_type[type[PrivateKey]], modifier[public static], parameter[algorithm, keySpec]] begin[{] return[call[KeyUtil.generatePrivateKey, parameter[member[.algorithm], member[.keySpec]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[PrivateKey] identifier[generatePrivateKey] operator[SEP] identifier[String] identifier[algorithm] , identifier[KeySpec] identifier[keySpec] operator[SEP] { Keyword[return] identifier[KeyUtil] operator[SEP] identifier[generatePrivateKey] operator[SEP] identifier[algorit...
private void addOnlyChildElements() { for (Node node : nodes) { if (DOMHelper.getPreviousSiblingElement(node) == null && DOMHelper.getNextSiblingElement(node) == null) { result.add(node); } } }
class class_name[name] begin[{] method[addOnlyChildElements, return_type[void], modifier[private], parameter[]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=no...
Keyword[private] Keyword[void] identifier[addOnlyChildElements] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[Node] identifier[node] operator[:] identifier[nodes] operator[SEP] { Keyword[if] operator[SEP] identifier[DOMHelper] operator[SEP] identifier[getPreviousSiblingElement] ...
public static <T> T getPropertyValue(final Object instance, final String fieldName) { try { return (T) PropertyUtils.getProperty(instance, fieldName); } catch (final Exception e) { throw new RuntimeException(e); } }
class class_name[name] begin[{] method[getPropertyValue, return_type[type[T]], modifier[public static], parameter[instance, fieldName]] begin[{] TryStatement(block=[ReturnStatement(expression=Cast(expression=MethodInvocation(arguments=[MemberReference(member=instance, postfix_operators=[], prefix_opera...
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[getPropertyValue] operator[SEP] Keyword[final] identifier[Object] identifier[instance] , Keyword[final] identifier[String] identifier[fieldName] operator[SEP] { Keyword[try] { Keyword[return] operator[SEP] ...
public void setColumnOrder(final int[] columnOrder) { if (columnOrder == null) { getOrCreateComponentModel().columnOrder = null; } else { int count = getColumnCount(); if (columnOrder.length == 0) { throw new IllegalArgumentException("Cannot have an empty column order indices."); } if (columnOrde...
class class_name[name] begin[{] method[setColumnOrder, return_type[void], modifier[public], parameter[columnOrder]] begin[{] if[binary_operation[member[.columnOrder], ==, literal[null]]] begin[{] assign[call[.getOrCreateComponentModel, parameter[]], literal[null]] ...
Keyword[public] Keyword[void] identifier[setColumnOrder] operator[SEP] Keyword[final] Keyword[int] operator[SEP] operator[SEP] identifier[columnOrder] operator[SEP] { Keyword[if] operator[SEP] identifier[columnOrder] operator[==] Other[null] operator[SEP] { identifier[getOrCreateComponentModel] operat...
public static Map.Entry<Object, Object> maxMax(DataTable2D payoffMatrix) { if(payoffMatrix.isValid()==false) { throw new IllegalArgumentException("The payoff matrix does not have a rectangular format."); } Double maxMaxPayoff = Double.NEGATIVE_INFINITY; Object maxMax...
class class_name[name] begin[{] method[maxMax, return_type[type[Map]], modifier[public static], parameter[payoffMatrix]] begin[{] if[binary_operation[call[payoffMatrix.isValid, parameter[]], ==, literal[false]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(post...
Keyword[public] Keyword[static] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[Object] , identifier[Object] operator[>] identifier[maxMax] operator[SEP] identifier[DataTable2D] identifier[payoffMatrix] operator[SEP] { Keyword[if] operator[SEP] identifier[payoffMatrix] operator[SEP] ident...
public Bucket updateBucket(String bucketName) { // [START updateBucket] BucketInfo bucketInfo = BucketInfo.newBuilder(bucketName).setVersioningEnabled(true).build(); Bucket bucket = storage.update(bucketInfo); // [END updateBucket] return bucket; }
class class_name[name] begin[{] method[updateBucket, return_type[type[Bucket]], modifier[public], parameter[bucketName]] begin[{] local_variable[type[BucketInfo], bucketInfo] local_variable[type[Bucket], bucket] return[member[.bucket]] end[}] END[}]
Keyword[public] identifier[Bucket] identifier[updateBucket] operator[SEP] identifier[String] identifier[bucketName] operator[SEP] { identifier[BucketInfo] identifier[bucketInfo] operator[=] identifier[BucketInfo] operator[SEP] identifier[newBuilder] operator[SEP] identifier[bucketName] operator[SEP] operator[SEP...
@Override public IComplexNDArray assign(IComplexNDArray arr) { if (!arr.isScalar()) LinAlgExceptions.assertSameLength(this, arr); IComplexNDArray linear = linearView(); IComplexNDArray otherLinear = arr.linearView(); for (int i = 0; i < linear.length(); i++) { ...
class class_name[name] begin[{] method[assign, return_type[type[IComplexNDArray]], modifier[public], parameter[arr]] begin[{] if[call[arr.isScalar, parameter[]]] begin[{] call[LinAlgExceptions.assertSameLength, parameter[THIS[], member[.arr]]] else begin[{] None end[...
annotation[@] identifier[Override] Keyword[public] identifier[IComplexNDArray] identifier[assign] operator[SEP] identifier[IComplexNDArray] identifier[arr] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[arr] operator[SEP] identifier[isScalar] operator[SEP] operator[SEP] operator[SEP] identifier...
public static int safeGet( GrayI input , int x , int y ) { if( x < 0 ) x = 0; else if( x >= input.width ) x = input.width-1; if( y < 0 ) y = 0; else if( y >= input.height ) y = input.height-1; return input.unsafe_get(x,y); }
class class_name[name] begin[{] method[safeGet, return_type[type[int]], modifier[public static], parameter[input, x, y]] begin[{] if[binary_operation[member[.x], <, literal[0]]] begin[{] assign[member[.x], literal[0]] else begin[{] if[binary_operation[member[.x],...
Keyword[public] Keyword[static] Keyword[int] identifier[safeGet] operator[SEP] identifier[GrayI] identifier[input] , Keyword[int] identifier[x] , Keyword[int] identifier[y] operator[SEP] { Keyword[if] operator[SEP] identifier[x] operator[<] Other[0] operator[SEP] identifier[x] operator[=] Other[0] operator[SEP...
public static BufferedImage createThumbnail(BufferedImage image, int newSize) { int width = image.getWidth(); int height = image.getHeight(); boolean isTranslucent = image.getTransparency() != Transparency.OPAQUE; boolean isWidthGreater = ...
class class_name[name] begin[{] method[createThumbnail, return_type[type[BufferedImage]], modifier[public static], parameter[image, newSize]] begin[{] local_variable[type[int], width] local_variable[type[int], height] local_variable[type[boolean], isTranslucent] local_variable[t...
Keyword[public] Keyword[static] identifier[BufferedImage] identifier[createThumbnail] operator[SEP] identifier[BufferedImage] identifier[image] , Keyword[int] identifier[newSize] operator[SEP] { Keyword[int] identifier[width] operator[=] identifier[image] operator[SEP] identifier[getWidth] operator[SEP] operato...