code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public List<TopologyDetails> needsSchedulingTopologies(Topologies topologies) { List<TopologyDetails> ret = new ArrayList<>(); for (TopologyDetails topology : topologies.getTopologies()) { if (needsScheduling(topology)) { ret.add(topology); } } re...
class class_name[name] begin[{] method[needsSchedulingTopologies, return_type[type[List]], modifier[public], parameter[topologies]] begin[{] local_variable[type[List], ret] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference...
Keyword[public] identifier[List] operator[<] identifier[TopologyDetails] operator[>] identifier[needsSchedulingTopologies] operator[SEP] identifier[Topologies] identifier[topologies] operator[SEP] { identifier[List] operator[<] identifier[TopologyDetails] operator[>] identifier[ret] operator[=] Keyword[new] iden...
public void marshall(DeleteConnectionRequest deleteConnectionRequest, ProtocolMarshaller protocolMarshaller) { if (deleteConnectionRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(deleteConn...
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[deleteConnectionRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.deleteConnectionRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=...
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DeleteConnectionRequest] identifier[deleteConnectionRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[deleteConnectionRequest] operator[==] Other[null] operator...
protected Stream<T> getAll(Connection conn) { return executeSelectAsStream(rowMapper, conn, true, calcSqlSelectAll()); }
class class_name[name] begin[{] method[getAll, return_type[type[Stream]], modifier[protected], parameter[conn]] begin[{] return[call[.executeSelectAsStream, parameter[member[.rowMapper], member[.conn], literal[true], call[.calcSqlSelectAll, parameter[]]]]] end[}] END[}]
Keyword[protected] identifier[Stream] operator[<] identifier[T] operator[>] identifier[getAll] operator[SEP] identifier[Connection] identifier[conn] operator[SEP] { Keyword[return] identifier[executeSelectAsStream] operator[SEP] identifier[rowMapper] , identifier[conn] , literal[boolean] , identifier[calcSqlS...
public void acceptVisitor(TypeVisitor visitor) { if (visitor instanceof TimeRangeTypeVisitor) { ((TimeRangeTypeVisitor) visitor).visit(this); } else { super.acceptVisitor(visitor); } }
class class_name[name] begin[{] method[acceptVisitor, return_type[void], modifier[public], parameter[visitor]] begin[{] if[binary_operation[member[.visitor], instanceof, type[TimeRangeTypeVisitor]]] begin[{] Cast(expression=MemberReference(member=visitor, postfix_operato...
Keyword[public] Keyword[void] identifier[acceptVisitor] operator[SEP] identifier[TypeVisitor] identifier[visitor] operator[SEP] { Keyword[if] operator[SEP] identifier[visitor] Keyword[instanceof] identifier[TimeRangeTypeVisitor] operator[SEP] { operator[SEP] operator[SEP] identifier[TimeRangeTypeVisit...
public boolean validateWatcher(String name, Watcher watcher){ synchronized(watchers){ if(watchers.containsKey(name)){ return watchers.get(name).contains(watcher); } return false; } }
class class_name[name] begin[{] method[validateWatcher, return_type[type[boolean]], modifier[public], parameter[name, watcher]] begin[{] SYNCHRONIZED[member[.watchers]] BEGIN[{] if[call[watchers.containsKey, parameter[member[.name]]]] begin[{] return[call...
Keyword[public] Keyword[boolean] identifier[validateWatcher] operator[SEP] identifier[String] identifier[name] , identifier[Watcher] identifier[watcher] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[watchers] operator[SEP] { Keyword[if] operator[SEP] identifier[watchers] operator[SEP...
protected Method findGetter(Object data, String property) throws IntrospectionException { Class<?> clazz = getClass(data); String key = clazz.getName() + ":" + property; Method method = methods.get(key); if (method == null) { Method newMethod = null; PropertyDescriptor[] props = Introspector...
class class_name[name] begin[{] method[findGetter, return_type[type[Method]], modifier[protected], parameter[data, property]] begin[{] local_variable[type[Class], clazz] local_variable[type[String], key] local_variable[type[Method], method] if[binary_operation[member[.me...
Keyword[protected] identifier[Method] identifier[findGetter] operator[SEP] identifier[Object] identifier[data] , identifier[String] identifier[property] operator[SEP] Keyword[throws] identifier[IntrospectionException] { identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[=] identifi...
public int getCompletedTasks() { int completedTasks = 0; for (TaskState taskState : this.taskStates.values()) { if (taskState.isCompleted()) { completedTasks++; } } return completedTasks; }
class class_name[name] begin[{] method[getCompletedTasks, return_type[type[int]], modifier[public], parameter[]] begin[{] local_variable[type[int], completedTasks] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isCompleted, p...
Keyword[public] Keyword[int] identifier[getCompletedTasks] operator[SEP] operator[SEP] { Keyword[int] identifier[completedTasks] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[TaskState] identifier[taskState] operator[:] Keyword[this] operator[SEP] identifier[taskStates] operator[SEP] ...
private void completeHeartbeat() { heartbeatFailures = 0; heartbeatFuture = nextHeartbeatFuture; nextHeartbeatFuture = null; updateGlobalIndex(); if (heartbeatFuture != null) { heartbeatTime = System.currentTimeMillis(); for (MemberState member : context.getClusterState().getRemoteMember...
class class_name[name] begin[{] method[completeHeartbeat, return_type[void], modifier[private], parameter[]] begin[{] assign[member[.heartbeatFailures], literal[0]] assign[member[.heartbeatFuture], member[.nextHeartbeatFuture]] assign[member[.nextHeartbeatFuture]...
Keyword[private] Keyword[void] identifier[completeHeartbeat] operator[SEP] operator[SEP] { identifier[heartbeatFailures] operator[=] Other[0] operator[SEP] identifier[heartbeatFuture] operator[=] identifier[nextHeartbeatFuture] operator[SEP] identifier[nextHeartbeatFuture] operator[=] Other[null] operator[SEP] i...
public Set<String> subprotocols() { Set<String> ret = new LinkedHashSet<String>(); Collections.addAll(ret, subprotocols); return ret; }
class class_name[name] begin[{] method[subprotocols, return_type[type[Set]], modifier[public], parameter[]] begin[{] local_variable[type[Set], ret] call[Collections.addAll, parameter[member[.ret], member[.subprotocols]]] return[member[.ret]] end[}] END[}]
Keyword[public] identifier[Set] operator[<] identifier[String] operator[>] identifier[subprotocols] operator[SEP] operator[SEP] { identifier[Set] operator[<] identifier[String] operator[>] identifier[ret] operator[=] Keyword[new] identifier[LinkedHashSet] operator[<] identifier[String] operator[>] operator[SEP] ...
public final BuilderType addAllDialogValidators( @NonNull final Collection<DialogValidator> validators) { Condition.INSTANCE.ensureNotNull(validators, "The collection may not be null"); getProduct().addAllDialogValidators(validators); return self(); }
class class_name[name] begin[{] method[addAllDialogValidators, return_type[type[BuilderType]], modifier[final public], parameter[validators]] begin[{] call[Condition.INSTANCE.ensureNotNull, parameter[member[.validators], literal["The collection may not be null"]]] call[.getProdu...
Keyword[public] Keyword[final] identifier[BuilderType] identifier[addAllDialogValidators] operator[SEP] annotation[@] identifier[NonNull] Keyword[final] identifier[Collection] operator[<] identifier[DialogValidator] operator[>] identifier[validators] operator[SEP] { identifier[Condition] operator[SEP] identifier...
@Override public EClass getIfcElementarySurface() { if (ifcElementarySurfaceEClass == null) { ifcElementarySurfaceEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI) .getEClassifiers().get(228); } return ifcElementarySurfaceEClass; }
class class_name[name] begin[{] method[getIfcElementarySurface, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcElementarySurfaceEClass], ==, literal[null]]] begin[{] assign[member[.ifcElementarySurfaceEClass], Cast(expre...
annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcElementarySurface] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcElementarySurfaceEClass] operator[==] Other[null] operator[SEP] { identifier[ifcElementarySurfaceEClass] operator[=] operator[...
public Record getNextRecord(PrintWriter out, int iPrintOptions, boolean bFirstTime, boolean bHeadingFootingExists) throws DBException { Object[] rgobjEnabled = null; boolean bAfterRequery = !this.getMainRecord().isOpen(); if (!this.getMainRecord().isOpen()) this.getMainRe...
class class_name[name] begin[{] method[getNextRecord, return_type[type[Record]], modifier[public], parameter[out, iPrintOptions, bFirstTime, bHeadingFootingExists]] begin[{] local_variable[type[Object], rgobjEnabled] local_variable[type[boolean], bAfterRequery] if[THIS[call[None...
Keyword[public] identifier[Record] identifier[getNextRecord] operator[SEP] identifier[PrintWriter] identifier[out] , Keyword[int] identifier[iPrintOptions] , Keyword[boolean] identifier[bFirstTime] , Keyword[boolean] identifier[bHeadingFootingExists] operator[SEP] Keyword[throws] identifier[DBException] { ide...
public Observable<JobAgentInner> updateAsync(String resourceGroupName, String serverName, String jobAgentName) { return updateWithServiceResponseAsync(resourceGroupName, serverName, jobAgentName).map(new Func1<ServiceResponse<JobAgentInner>, JobAgentInner>() { @Override public JobAgentIn...
class class_name[name] begin[{] method[updateAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, serverName, jobAgentName]] begin[{] return[call[.updateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.serverName], member[.jobAgentName]]]] end[...
Keyword[public] identifier[Observable] operator[<] identifier[JobAgentInner] operator[>] identifier[updateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[serverName] , identifier[String] identifier[jobAgentName] operator[SEP] { Keyword[return] identifier[up...
public void replace(Fragment fragment) { manager.popBackStackImmediate(null, FragmentManager.POP_BACK_STACK_INCLUSIVE); manager.beginTransaction() .replace(containerId, fragment, indexToTag(0)) .commit(); manager.executePendingTransactions(); }
class class_name[name] begin[{] method[replace, return_type[void], modifier[public], parameter[fragment]] begin[{] call[manager.popBackStackImmediate, parameter[literal[null], member[FragmentManager.POP_BACK_STACK_INCLUSIVE]]] call[manager.beginTransaction, parameter[]] ...
Keyword[public] Keyword[void] identifier[replace] operator[SEP] identifier[Fragment] identifier[fragment] operator[SEP] { identifier[manager] operator[SEP] identifier[popBackStackImmediate] operator[SEP] Other[null] , identifier[FragmentManager] operator[SEP] identifier[POP_BACK_STACK_INCLUSIVE] operator[SEP] o...
public static News getNewsByDoc(Document doc) throws Exception { ContentExtractor ce = new ContentExtractor(doc); return ce.getNews(); }
class class_name[name] begin[{] method[getNewsByDoc, return_type[type[News]], modifier[public static], parameter[doc]] begin[{] local_variable[type[ContentExtractor], ce] return[call[ce.getNews, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[News] identifier[getNewsByDoc] operator[SEP] identifier[Document] identifier[doc] operator[SEP] Keyword[throws] identifier[Exception] { identifier[ContentExtractor] identifier[ce] operator[=] Keyword[new] identifier[ContentExtractor] operator[SEP] identifier[doc] operat...
public static String conditionFromHasNode(Node cursor) { if (cursor.getType() == Token.CALL) { // The node is a function or method call Node name, arg; if ((name = cursor.getFirstChild()) != null && name.getType() == Token.NAME && // named function call name.getString().equals("has") && /...
class class_name[name] begin[{] method[conditionFromHasNode, return_type[type[String]], modifier[public static], parameter[cursor]] begin[{] if[binary_operation[call[cursor.getType, parameter[]], ==, member[Token.CALL]]] begin[{] local_variable[type[Node], name] ...
Keyword[public] Keyword[static] identifier[String] identifier[conditionFromHasNode] operator[SEP] identifier[Node] identifier[cursor] operator[SEP] { Keyword[if] operator[SEP] identifier[cursor] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[==] identifier[Token] operator[SEP] identifier[...
@Override public EClass getIfcShadingDevice() { if (ifcShadingDeviceEClass == null) { ifcShadingDeviceEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI) .getEClassifiers().get(593); } return ifcShadingDeviceEClass; }
class class_name[name] begin[{] method[getIfcShadingDevice, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcShadingDeviceEClass], ==, literal[null]]] begin[{] assign[member[.ifcShadingDeviceEClass], Cast(expression=Method...
annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcShadingDevice] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcShadingDeviceEClass] operator[==] Other[null] operator[SEP] { identifier[ifcShadingDeviceEClass] operator[=] operator[SEP] identif...
public static void decodeUIInput(FacesContext facesContext, UIComponent component) { if (!(component instanceof EditableValueHolder)) { throw new IllegalArgumentException("Component " + component.getClientId(facesContext) + " is not an EditableValu...
class class_name[name] begin[{] method[decodeUIInput, return_type[void], modifier[public static], parameter[facesContext, component]] begin[{] if[binary_operation[member[.component], instanceof, type[EditableValueHolder]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[B...
Keyword[public] Keyword[static] Keyword[void] identifier[decodeUIInput] operator[SEP] identifier[FacesContext] identifier[facesContext] , identifier[UIComponent] identifier[component] operator[SEP] { Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[component] Keyword[instanceof] identifier[Editabl...
@NonNull public static Drop dropIndex(@Nullable CqlIdentifier keyspace, @NonNull CqlIdentifier indexName) { return new DefaultDrop(keyspace, indexName, "INDEX"); }
class class_name[name] begin[{] method[dropIndex, return_type[type[Drop]], modifier[public static], parameter[keyspace, indexName]] begin[{] return[ClassCreator(arguments=[MemberReference(member=keyspace, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=index...
annotation[@] identifier[NonNull] Keyword[public] Keyword[static] identifier[Drop] identifier[dropIndex] operator[SEP] annotation[@] identifier[Nullable] identifier[CqlIdentifier] identifier[keyspace] , annotation[@] identifier[NonNull] identifier[CqlIdentifier] identifier[indexName] operator[SEP] { Keyword[ret...
public void marshall(RestoreFromSnapshotRequest restoreFromSnapshotRequest, ProtocolMarshaller protocolMarshaller) { if (restoreFromSnapshotRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(r...
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[restoreFromSnapshotRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.restoreFromSnapshotRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(argu...
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[RestoreFromSnapshotRequest] identifier[restoreFromSnapshotRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[restoreFromSnapshotRequest] operator[==] Other[null]...
public void setAutoScalingGroups(java.util.Collection<String> autoScalingGroups) { if (autoScalingGroups == null) { this.autoScalingGroups = null; return; } this.autoScalingGroups = new java.util.ArrayList<String>(autoScalingGroups); }
class class_name[name] begin[{] method[setAutoScalingGroups, return_type[void], modifier[public], parameter[autoScalingGroups]] begin[{] if[binary_operation[member[.autoScalingGroups], ==, literal[null]]] begin[{] assign[THIS[member[None.autoScalingGroups]], literal[null...
Keyword[public] Keyword[void] identifier[setAutoScalingGroups] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[autoScalingGroups] operator[SEP] { Keyword[if] operator[SEP] identifier[autoScalingGroups] operat...
@Override public ResourceSet<Mobile> read(final TwilioRestClient client) { return new ResourceSet<>(this, client, firstPage(client)); }
class class_name[name] begin[{] method[read, return_type[type[ResourceSet]], modifier[public], parameter[client]] begin[{] return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=client, postfix_operators=[], prefix_operators=...
annotation[@] identifier[Override] Keyword[public] identifier[ResourceSet] operator[<] identifier[Mobile] operator[>] identifier[read] operator[SEP] Keyword[final] identifier[TwilioRestClient] identifier[client] operator[SEP] { Keyword[return] Keyword[new] identifier[ResourceSet] operator[<] operator[>] operator...
public static GsonBuilder registerDuration(GsonBuilder builder) { if (builder == null) { throw new NullPointerException("builder cannot be null"); } builder.registerTypeAdapter(DURATION_TYPE, new DurationConverter()); return builder; }
class class_name[name] begin[{] method[registerDuration, return_type[type[GsonBuilder]], modifier[public static], parameter[builder]] begin[{] if[binary_operation[member[.builder], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operato...
Keyword[public] Keyword[static] identifier[GsonBuilder] identifier[registerDuration] operator[SEP] identifier[GsonBuilder] identifier[builder] operator[SEP] { Keyword[if] operator[SEP] identifier[builder] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[NullPointerExcept...
public final void classBody() throws RecognitionException { int classBody_StartIndex = input.index(); try { if ( state.backtracking>0 && alreadyParsedRule(input, 19) ) { return; } // src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:351:5: ( '{' ( classBodyDeclaration )* '}' ) // src/ma...
class class_name[name] begin[{] method[classBody, return_type[void], modifier[final public], parameter[]] begin[{] local_variable[type[int], classBody_StartIndex] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=backtracking, pos...
Keyword[public] Keyword[final] Keyword[void] identifier[classBody] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { Keyword[int] identifier[classBody_StartIndex] operator[=] identifier[input] operator[SEP] identifier[index] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { ...
public static Map<String, String> getAllTypes(App app) { Map<String, String> map = new LinkedHashMap<>(getCoreTypes()); if (app != null) { map.putAll(app.getDatatypes()); } return map; }
class class_name[name] begin[{] method[getAllTypes, return_type[type[Map]], modifier[public static], parameter[app]] begin[{] local_variable[type[Map], map] if[binary_operation[member[.app], !=, literal[null]]] begin[{] call[map.putAll, parameter[call[app.getData...
Keyword[public] Keyword[static] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[getAllTypes] operator[SEP] identifier[App] identifier[app] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[map] operator[=] Keywo...
private ITag createFileMeta() { // Create tag for onMetaData event IoBuffer buf = IoBuffer.allocate(192); buf.setAutoExpand(true); Output out = new Output(buf); // Duration property out.writeString("onMetaData"); Map<Object, Object> props = new HashMap<Object, Obj...
class class_name[name] begin[{] method[createFileMeta, return_type[type[ITag]], modifier[private], parameter[]] begin[{] local_variable[type[IoBuffer], buf] call[buf.setAutoExpand, parameter[literal[true]]] local_variable[type[Output], out] call[out.writeString, ...
Keyword[private] identifier[ITag] identifier[createFileMeta] operator[SEP] operator[SEP] { identifier[IoBuffer] identifier[buf] operator[=] identifier[IoBuffer] operator[SEP] identifier[allocate] operator[SEP] Other[192] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[setAutoExpand] operator...
public void init() { String rootPath = ManagePathUtils.getRoot(); String channelRootPath = ManagePathUtils.getChannelRoot(); String nodeRootPath = ManagePathUtils.getNodeRoot(); try { zookeeper.create(rootPath, new byte[0], CreateMode.PERSISTENT); zookeeper.create...
class class_name[name] begin[{] method[init, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[String], rootPath] local_variable[type[String], channelRootPath] local_variable[type[String], nodeRootPath] TryStatement(block=[StatementExpression(express...
Keyword[public] Keyword[void] identifier[init] operator[SEP] operator[SEP] { identifier[String] identifier[rootPath] operator[=] identifier[ManagePathUtils] operator[SEP] identifier[getRoot] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[channelRootPath] operator[=] identifier[ManagePath...
private boolean isOrContains(SoyType type, SoyType.Kind kind) { if (type.getKind() == kind) { return true; } if (type.getKind() == SoyType.Kind.UNION) { for (SoyType member : ((UnionType) type).getMembers()) { if (member.getKind() == kind) { return true; } } }...
class class_name[name] begin[{] method[isOrContains, return_type[type[boolean]], modifier[private], parameter[type, kind]] begin[{] if[binary_operation[call[type.getKind, parameter[]], ==, member[.kind]]] begin[{] return[literal[true]] else begin[{] None end[}] ...
Keyword[private] Keyword[boolean] identifier[isOrContains] operator[SEP] identifier[SoyType] identifier[type] , identifier[SoyType] operator[SEP] identifier[Kind] identifier[kind] operator[SEP] { Keyword[if] operator[SEP] identifier[type] operator[SEP] identifier[getKind] operator[SEP] operator[SEP] operator[==...
@Override public void clearCache() { entityCache.clearCache(CommerceUserSegmentEntryImpl.class); finderCache.clearCache(FINDER_CLASS_NAME_ENTITY); finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); }
class class_name[name] begin[{] method[clearCache, return_type[void], modifier[public], parameter[]] begin[{] call[entityCache.clearCache, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Comme...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[clearCache] operator[SEP] operator[SEP] { identifier[entityCache] operator[SEP] identifier[clearCache] operator[SEP] identifier[CommerceUserSegmentEntryImpl] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[finderCache...
@SuppressWarnings("unchecked") protected List getUserRoles(DirContext dirContext, String username) throws LoginException, NamingException { String userDn = _userRdnAttribute + "=" + username + "," + _userBaseDn; return getUserRolesByDn(dirContext, userDn, username); }
class class_name[name] begin[{] method[getUserRoles, return_type[type[List]], modifier[protected], parameter[dirContext, username]] begin[{] local_variable[type[String], userDn] return[call[.getUserRolesByDn, parameter[member[.dirContext], member[.userDn], member[.username]]]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] identifier[List] identifier[getUserRoles] operator[SEP] identifier[DirContext] identifier[dirContext] , identifier[String] identifier[username] operator[SEP] Keyword[throws] identifier[LoginException] , identifie...
public static void parseLinks(CmsObject cms, List<CmsResource> parseables, I_CmsReport report) { int i = 0; sortParseableResources(parseables); for (CmsResource parsableRes : parseables) { String resName = cms.getSitePath(parsableRes); report.print( org...
class class_name[name] begin[{] method[parseLinks, return_type[void], modifier[public static], parameter[cms, parseables, report]] begin[{] local_variable[type[int], i] call[.sortParseableResources, parameter[member[.parseables]]] ForStatement(body=BlockStatement(label=None, sta...
Keyword[public] Keyword[static] Keyword[void] identifier[parseLinks] operator[SEP] identifier[CmsObject] identifier[cms] , identifier[List] operator[<] identifier[CmsResource] operator[>] identifier[parseables] , identifier[I_CmsReport] identifier[report] operator[SEP] { Keyword[int] identifier[i] operator[=] ...
public void setDestinations(java.util.Collection<DestinationDescription> destinations) { if (destinations == null) { this.destinations = null; return; } this.destinations = new java.util.ArrayList<DestinationDescription>(destinations); }
class class_name[name] begin[{] method[setDestinations, return_type[void], modifier[public], parameter[destinations]] begin[{] if[binary_operation[member[.destinations], ==, literal[null]]] begin[{] assign[THIS[member[None.destinations]], literal[null]] retur...
Keyword[public] Keyword[void] identifier[setDestinations] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[DestinationDescription] operator[>] identifier[destinations] operator[SEP] { Keyword[if] operator[SEP] identifier[destinations] opera...
protected String addMessageNoCaching(InternalEvent msg, EngineDataAccess edao, String msgid) throws SQLException { if (cacheOption==CACHE_ONLY) { return null; } else { // CACHE_ON/CACHE_OFF edao.persistInternalEvent(msgid, msg.toXml()); return msgid; } ...
class class_name[name] begin[{] method[addMessageNoCaching, return_type[type[String]], modifier[protected], parameter[msg, edao, msgid]] begin[{] if[binary_operation[member[.cacheOption], ==, member[.CACHE_ONLY]]] begin[{] return[literal[null]] else begin[{] ...
Keyword[protected] identifier[String] identifier[addMessageNoCaching] operator[SEP] identifier[InternalEvent] identifier[msg] , identifier[EngineDataAccess] identifier[edao] , identifier[String] identifier[msgid] operator[SEP] Keyword[throws] identifier[SQLException] { Keyword[if] operator[SEP] identifier[cach...
public static AlertDto transformToDto(Alert alert) { if (alert == null) { throw new WebApplicationException("Null entity object cannot be converted to Dto object.", Status.INTERNAL_SERVER_ERROR); } AlertDto result = createDtoObject(AlertDto.class, alert); result.setOwnerNam...
class class_name[name] begin[{] method[transformToDto, return_type[type[AlertDto]], modifier[public static], parameter[alert]] begin[{] if[binary_operation[member[.alert], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], pr...
Keyword[public] Keyword[static] identifier[AlertDto] identifier[transformToDto] operator[SEP] identifier[Alert] identifier[alert] operator[SEP] { Keyword[if] operator[SEP] identifier[alert] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[WebApplicationException] operato...
public static String addsPfad(String pfad1, String pfad2) { String ret = ""; if (pfad1 != null && pfad2 != null) { if (pfad1.isEmpty()) { ret = pfad2; } else if (pfad2.isEmpty()) { ret = pfad1; } else if (!pfad1.isEmpty() && !pfad2.isEm...
class class_name[name] begin[{] method[addsPfad, return_type[type[String]], modifier[public static], parameter[pfad1, pfad2]] begin[{] local_variable[type[String], ret] if[binary_operation[binary_operation[member[.pfad1], !=, literal[null]], &&, binary_operation[member[.pfad2], !=, lite...
Keyword[public] Keyword[static] identifier[String] identifier[addsPfad] operator[SEP] identifier[String] identifier[pfad1] , identifier[String] identifier[pfad2] operator[SEP] { identifier[String] identifier[ret] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[pfad1] operator[!=] ...
public long getDifferenceAsLong(long minuendInstant, long subtrahendInstant) { if (minuendInstant < subtrahendInstant) { return -getDifference(subtrahendInstant, minuendInstant); } int minuendYear = iChronology.getYear(minuendInstant); int minuendMonth = iChronology.getMonth...
class class_name[name] begin[{] method[getDifferenceAsLong, return_type[type[long]], modifier[public], parameter[minuendInstant, subtrahendInstant]] begin[{] if[binary_operation[member[.minuendInstant], <, member[.subtrahendInstant]]] begin[{] return[call[.getDifference, parameter[m...
Keyword[public] Keyword[long] identifier[getDifferenceAsLong] operator[SEP] Keyword[long] identifier[minuendInstant] , Keyword[long] identifier[subtrahendInstant] operator[SEP] { Keyword[if] operator[SEP] identifier[minuendInstant] operator[<] identifier[subtrahendInstant] operator[SEP] { Keyword[ret...
@SuppressWarnings("unchecked") private Set<Dependency<?>> getInternalDependencies(BindingImpl<?> binding) { if (binding instanceof ConstructorBindingImpl) { return ((ConstructorBindingImpl) binding).getInternalDependencies(); } else if (binding instanceof HasDependencies) { return ((HasDependencie...
class class_name[name] begin[{] method[getInternalDependencies, return_type[type[Set]], modifier[private], parameter[binding]] begin[{] if[binary_operation[member[.binding], instanceof, type[ConstructorBindingImpl]]] begin[{] return[Cast(expression=MemberReference(member=binding, po...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] identifier[Set] operator[<] identifier[Dependency] operator[<] operator[?] operator[>] operator[>] identifier[getInternalDependencies] operator[SEP] identifier[BindingImpl] operator[<] operator[?] operator[>] identif...
public void dumpRequest(final HttpServletRequest req) { try { Enumeration names = req.getHeaderNames(); String title = "Request headers"; debug(title); while (names.hasMoreElements()) { String key = (String)names.nextElement(); String val = req.getHeader(key); debu...
class class_name[name] begin[{] method[dumpRequest, return_type[void], modifier[public], parameter[req]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getHeaderNames, postfix_operato...
Keyword[public] Keyword[void] identifier[dumpRequest] operator[SEP] Keyword[final] identifier[HttpServletRequest] identifier[req] operator[SEP] { Keyword[try] { identifier[Enumeration] identifier[names] operator[=] identifier[req] operator[SEP] identifier[getHeaderNames] operator[SEP] operator[SEP] op...
@Test public void getControlGroupReturnsControlGroup() { server().enqueue(new MockResponse().setBody("<html><body>" + "<form name='f'>" + "<input type='text' name='x'/>" + "<input type='text' name='x'/>" + "</form>" + "</body></html>")); ControlGroup actual = newBrowser().get(url(server())) ....
class class_name[name] begin[{] method[getControlGroupReturnsControlGroup, return_type[void], modifier[public], parameter[]] begin[{] call[.server, parameter[]] local_variable[type[ControlGroup], actual] call[.assertThat, parameter[literal["form control group"], call[act...
annotation[@] identifier[Test] Keyword[public] Keyword[void] identifier[getControlGroupReturnsControlGroup] operator[SEP] operator[SEP] { identifier[server] operator[SEP] operator[SEP] operator[SEP] identifier[enqueue] operator[SEP] Keyword[new] identifier[MockResponse] operator[SEP] operator[SEP] operator[SEP] ...
protected static void removeInstance( Object instance ) { Set set = getCycleSet(); set.remove( instance ); if(set.size() == 0) { cycleSet.remove(); } }
class class_name[name] begin[{] method[removeInstance, return_type[void], modifier[static protected], parameter[instance]] begin[{] local_variable[type[Set], set] call[set.remove, parameter[member[.instance]]] if[binary_operation[call[set.size, parameter[]], ==, literal[...
Keyword[protected] Keyword[static] Keyword[void] identifier[removeInstance] operator[SEP] identifier[Object] identifier[instance] operator[SEP] { identifier[Set] identifier[set] operator[=] identifier[getCycleSet] operator[SEP] operator[SEP] operator[SEP] identifier[set] operator[SEP] identifier[remove] operator...
public boolean isTrusted(X509Certificate certificate, Store certStore) throws CryptoException { try { if (certificate == null) { throw new CryptoException("Invalid input parameter. Certificate can not be null"); } LOGGER.info("Checking if certificate with subj...
class class_name[name] begin[{] method[isTrusted, return_type[type[boolean]], modifier[public], parameter[certificate, certStore]] begin[{] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=certificate, postfix_operators=[], prefix_operators=[], qualifier=, selec...
Keyword[public] Keyword[boolean] identifier[isTrusted] operator[SEP] identifier[X509Certificate] identifier[certificate] , identifier[Store] identifier[certStore] operator[SEP] Keyword[throws] identifier[CryptoException] { Keyword[try] { Keyword[if] operator[SEP] identifier[certificate] operator[==] ...
public java.util.List<PatchFilter> getPatchFilters() { if (patchFilters == null) { patchFilters = new com.amazonaws.internal.SdkInternalList<PatchFilter>(); } return patchFilters; }
class class_name[name] begin[{] method[getPatchFilters, return_type[type[java]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.patchFilters], ==, literal[null]]] begin[{] assign[member[.patchFilters], ClassCreator(arguments=[], body=None, constructo...
Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[PatchFilter] operator[>] identifier[getPatchFilters] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[patchFilters] operator[==] Other[null] operator[SEP] { identifie...
public static void verifyValueBounds(DateTimeField field, int value, int lowerBound, int upperBound) { if ((value < lowerBound) || (value > upperBound)) { throw new IllegalFieldValueException (field.getType(), Integer.valueOf(value), ...
class class_name[name] begin[{] method[verifyValueBounds, return_type[void], modifier[public static], parameter[field, value, lowerBound, upperBound]] begin[{] if[binary_operation[binary_operation[member[.value], <, member[.lowerBound]], ||, binary_operation[member[.value], >, member[.upperBoun...
Keyword[public] Keyword[static] Keyword[void] identifier[verifyValueBounds] operator[SEP] identifier[DateTimeField] identifier[field] , Keyword[int] identifier[value] , Keyword[int] identifier[lowerBound] , Keyword[int] identifier[upperBound] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[...
public static String getReplyCodeAsString(byte code) { switch (code) { // v4 & v4a codes case V4_REPLY_REQUEST_GRANTED: return "Request granted"; case V4_REPLY_REQUEST_REJECTED_OR_FAILED: return "Request rejected or failed"; case V4_REPLY_REQUEST_FAILED_NO...
class class_name[name] begin[{] method[getReplyCodeAsString, return_type[type[String]], modifier[public static], parameter[code]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['V4_REPLY_REQUEST_GRANTED'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=...
Keyword[public] Keyword[static] identifier[String] identifier[getReplyCodeAsString] operator[SEP] Keyword[byte] identifier[code] operator[SEP] { Keyword[switch] operator[SEP] identifier[code] operator[SEP] { Keyword[case] identifier[V4_REPLY_REQUEST_GRANTED] operator[:] Keyword[return] literal[String...
public static String[][] createMatrix(final String[] data) { int maxNewLines = 0; for (final String col : data) { maxNewLines = Math.max(maxNewLines, Util.numNewLines(col)); } final String[][] matrix = new String[maxNewLines + 1][data.length]; for (int col = 0; col < ...
class class_name[name] begin[{] method[createMatrix, return_type[type[String]], modifier[public static], parameter[data]] begin[{] local_variable[type[int], maxNewLines] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReferenc...
Keyword[public] Keyword[static] identifier[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[createMatrix] operator[SEP] Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[data] operator[SEP] { Keyword[int] identifier[maxNewLines] operator[=] Other[0] operator[SEP] ...
protected void cleanupSessionToken(String token) { // Empty check if (sessions.isEmpty()) { return; } if (log.isDebugEnabled()) { log.debug("Removing duplicates and cleaning up sessions for site - token: " + site + " - " + token); } synchronized (this.sessions) { // If there are no more sess...
class class_name[name] begin[{] method[cleanupSessionToken, return_type[void], modifier[protected], parameter[token]] begin[{] if[call[sessions.isEmpty, parameter[]]] begin[{] return[None] else begin[{] None end[}] if[call[log.isDebugEnabled, paramete...
Keyword[protected] Keyword[void] identifier[cleanupSessionToken] operator[SEP] identifier[String] identifier[token] operator[SEP] { Keyword[if] operator[SEP] identifier[sessions] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } ...
public final Mono<T> metrics() { if (!Metrics.isInstrumentationAvailable()) { return this; } if (this instanceof Fuseable) { return onAssembly(new MonoMetricsFuseable<>(this)); } return onAssembly(new MonoMetrics<>(this)); }
class class_name[name] begin[{] method[metrics, return_type[type[Mono]], modifier[final public], parameter[]] begin[{] if[call[Metrics.isInstrumentationAvailable, parameter[]]] begin[{] return[THIS[]] else begin[{] None end[}] if[binary_operation[THIS...
Keyword[public] Keyword[final] identifier[Mono] operator[<] identifier[T] operator[>] identifier[metrics] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[Metrics] operator[SEP] identifier[isInstrumentationAvailable] operator[SEP] operator[SEP] operator[SEP] { Keyword[ret...
public void setStepDelayTo(String stepDelay) { if ("slow".equals(stepDelay)) { this.stepDelay = 1000; } else if ("fast".equals(stepDelay)) { this.stepDelay = 0; } else { this.stepDelay = Long.parseLong(stepDelay); } }
class class_name[name] begin[{] method[setStepDelayTo, return_type[void], modifier[public], parameter[stepDelay]] begin[{] if[literal["slow"]] begin[{] assign[THIS[member[None.stepDelay]], literal[1000]] else begin[{] if[literal["fast"]] begin[{] ...
Keyword[public] Keyword[void] identifier[setStepDelayTo] operator[SEP] identifier[String] identifier[stepDelay] operator[SEP] { Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[stepDelay] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] ident...
void updateCornerLeft() { if (m_corner != null) { int popupLeft = popup.getPopupLeft(); int dif = (getAbsoluteLeft() - popupLeft) + OFFSET; m_corner.getStyle().setLeft(dif, Unit.PX); } }
class class_name[name] begin[{] method[updateCornerLeft, return_type[void], modifier[default], parameter[]] begin[{] if[binary_operation[member[.m_corner], !=, literal[null]]] begin[{] local_variable[type[int], popupLeft] local_variable[type[int], dif] ...
Keyword[void] identifier[updateCornerLeft] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[m_corner] operator[!=] Other[null] operator[SEP] { Keyword[int] identifier[popupLeft] operator[=] identifier[popup] operator[SEP] identifier[getPopupLeft] operator[SEP] operator[SEP] operator[...
@Override public CreateGroupCertificateAuthorityResult createGroupCertificateAuthority(CreateGroupCertificateAuthorityRequest request) { request = beforeClientExecution(request); return executeCreateGroupCertificateAuthority(request); }
class class_name[name] begin[{] method[createGroupCertificateAuthority, return_type[type[CreateGroupCertificateAuthorityResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeCreate...
annotation[@] identifier[Override] Keyword[public] identifier[CreateGroupCertificateAuthorityResult] identifier[createGroupCertificateAuthority] operator[SEP] identifier[CreateGroupCertificateAuthorityRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] o...
public static int findWordEnd(String line, int pos, String noWordSep, boolean joinNonWordChars, boolean eatWhitespace) { if (pos != 0) { pos--; } char ch = line.charAt(pos); if (noWordSep == null) { noWordSep = ""; } int type; if (Charac...
class class_name[name] begin[{] method[findWordEnd, return_type[type[int]], modifier[public static], parameter[line, pos, noWordSep, joinNonWordChars, eatWhitespace]] begin[{] if[binary_operation[member[.pos], !=, literal[0]]] begin[{] member[.pos] else begin[{] ...
Keyword[public] Keyword[static] Keyword[int] identifier[findWordEnd] operator[SEP] identifier[String] identifier[line] , Keyword[int] identifier[pos] , identifier[String] identifier[noWordSep] , Keyword[boolean] identifier[joinNonWordChars] , Keyword[boolean] identifier[eatWhitespace] operator[SEP] { Keyword...
public ByteBuffer getFloats(int index, ByteBuffer dest) { MemUtil.INSTANCE.putf(this, index, dest); return dest; }
class class_name[name] begin[{] method[getFloats, return_type[type[ByteBuffer]], modifier[public], parameter[index, dest]] begin[{] call[MemUtil.INSTANCE.putf, parameter[THIS[], member[.index], member[.dest]]] return[member[.dest]] end[}] END[}]
Keyword[public] identifier[ByteBuffer] identifier[getFloats] operator[SEP] Keyword[int] identifier[index] , identifier[ByteBuffer] identifier[dest] operator[SEP] { identifier[MemUtil] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[putf] operator[SEP] Keyword[this] , identifier[index] , identifier...
public static Role get(final String _name) throws CacheReloadException { final Cache<String, Role> cache = InfinispanCache.get().<String, Role>getCache(Role.NAMECACHE); if (!cache.containsKey(_name) && !Role.getRoleFromDB(Role.SQL_NAME, _name)) { cache.put(_name, Role.NULL, 100, ...
class class_name[name] begin[{] method[get, return_type[type[Role]], modifier[public static], parameter[_name]] begin[{] local_variable[type[Cache], cache] if[binary_operation[call[cache.containsKey, parameter[member[._name]]], &&, call[Role.getRoleFromDB, parameter[member[Role.SQL_NAME...
Keyword[public] Keyword[static] identifier[Role] identifier[get] operator[SEP] Keyword[final] identifier[String] identifier[_name] operator[SEP] Keyword[throws] identifier[CacheReloadException] { Keyword[final] identifier[Cache] operator[<] identifier[String] , identifier[Role] operator[>] identifier[cache] ope...
public Field createFieldTable( Field formFieldParam, Form formDefinitionParam, boolean sumDecimalsParam) { if(formFieldParam != null && this.serviceTicket != null) { formFieldParam.setServiceTicket(this.serviceTicket); } if(formFieldPa...
class class_name[name] begin[{] method[createFieldTable, return_type[type[Field]], modifier[public], parameter[formFieldParam, formDefinitionParam, sumDecimalsParam]] begin[{] if[binary_operation[binary_operation[member[.formFieldParam], !=, literal[null]], &&, binary_operation[THIS[member[None...
Keyword[public] identifier[Field] identifier[createFieldTable] operator[SEP] identifier[Field] identifier[formFieldParam] , identifier[Form] identifier[formDefinitionParam] , Keyword[boolean] identifier[sumDecimalsParam] operator[SEP] { Keyword[if] operator[SEP] identifier[formFieldParam] operator[!=] Other[nu...
@Override public int replace(Replaceable text, int start, int limit, int[] cursor) { int outLen = 0; // Copy segment with out-of-band data int dest = limit; // If there was no match, that means that a quantifier ...
class class_name[name] begin[{] method[replace, return_type[type[int]], modifier[public], parameter[text, start, limit, cursor]] begin[{] local_variable[type[int], outLen] local_variable[type[int], dest] if[binary_operation[member[.matchStart], >=, literal[0]]] begin[{] ...
annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[replace] operator[SEP] identifier[Replaceable] identifier[text] , Keyword[int] identifier[start] , Keyword[int] identifier[limit] , Keyword[int] operator[SEP] operator[SEP] identifier[cursor] operator[SEP] { Keyword[int] identifier[out...
public ListTotalCategoryVideoOperation buildListTotalCategoryVideoOperation(String databasePath, VideoFilter videoFilter){ return new ListTotalCategoryVideoOperation(getOperationFactory(), databasePath, videoFilter); }
class class_name[name] begin[{] method[buildListTotalCategoryVideoOperation, return_type[type[ListTotalCategoryVideoOperation]], modifier[public], parameter[databasePath, videoFilter]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getOperationFactory, postfix_operators=[...
Keyword[public] identifier[ListTotalCategoryVideoOperation] identifier[buildListTotalCategoryVideoOperation] operator[SEP] identifier[String] identifier[databasePath] , identifier[VideoFilter] identifier[videoFilter] operator[SEP] { Keyword[return] Keyword[new] identifier[ListTotalCategoryVideoOperation] operat...
@Override public int read (byte bytes[], int offset, int length) throws IOException { int r; if ((r = in.read(bytes, offset, length)) == -1) return -1; md5.Update(bytes, offset, r); return r; }
class class_name[name] begin[{] method[read, return_type[type[int]], modifier[public], parameter[bytes, offset, length]] begin[{] local_variable[type[int], r] if[binary_operation[assign[member[.r], call[in.read, parameter[member[.bytes], member[.offset], member[.length]]]], ==, literal[...
annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[read] operator[SEP] Keyword[byte] identifier[bytes] operator[SEP] operator[SEP] , Keyword[int] identifier[offset] , Keyword[int] identifier[length] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[int] identifier[r] opera...
public static Color disable(Color color) { int alpha = color.getAlpha(); alpha /= 2; return new Color((color.getRGB() & 0xFFFFFF) | (alpha << 24), true); }
class class_name[name] begin[{] method[disable, return_type[type[Color]], modifier[public static], parameter[color]] begin[{] local_variable[type[int], alpha] assign[member[.alpha], literal[2]] return[ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Meth...
Keyword[public] Keyword[static] identifier[Color] identifier[disable] operator[SEP] identifier[Color] identifier[color] operator[SEP] { Keyword[int] identifier[alpha] operator[=] identifier[color] operator[SEP] identifier[getAlpha] operator[SEP] operator[SEP] operator[SEP] identifier[alpha] operator[/=] Other[2]...
public long getEventsRouted(int executor, EventTypeID eventTypeID) { final EventRouterExecutorStatistics executorStats = getExecutors()[executor].getStatistics(); return executorStats == null ? 0 : executorStats.getEventsRouted(eventTypeID); }
class class_name[name] begin[{] method[getEventsRouted, return_type[type[long]], modifier[public], parameter[executor, eventTypeID]] begin[{] local_variable[type[EventRouterExecutorStatistics], executorStats] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=exe...
Keyword[public] Keyword[long] identifier[getEventsRouted] operator[SEP] Keyword[int] identifier[executor] , identifier[EventTypeID] identifier[eventTypeID] operator[SEP] { Keyword[final] identifier[EventRouterExecutorStatistics] identifier[executorStats] operator[=] identifier[getExecutors] operator[SEP] operat...
public Object execute(final Map<Object, Object> iArgs) { if (name == null) throw new OCommandExecutionException("Cannot execute the command because it has not been parsed yet"); getDatabase().getMetadata().getIndexManager().dropIndex(name); return null; }
class class_name[name] begin[{] method[execute, return_type[type[Object]], modifier[public], parameter[iArgs]] begin[{] if[binary_operation[member[.name], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=...
Keyword[public] identifier[Object] identifier[execute] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[Object] , identifier[Object] operator[>] identifier[iArgs] operator[SEP] { Keyword[if] operator[SEP] identifier[name] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] iden...
protected void unmarshallingFileHandle(Xdr xdr, boolean force) { if (force || xdr.getBoolean()) { _fileHandle = xdr.getByteArray(); } }
class class_name[name] begin[{] method[unmarshallingFileHandle, return_type[void], modifier[protected], parameter[xdr, force]] begin[{] if[binary_operation[member[.force], ||, call[xdr.getBoolean, parameter[]]]] begin[{] assign[member[._fileHandle], call[xdr.getByteArray...
Keyword[protected] Keyword[void] identifier[unmarshallingFileHandle] operator[SEP] identifier[Xdr] identifier[xdr] , Keyword[boolean] identifier[force] operator[SEP] { Keyword[if] operator[SEP] identifier[force] operator[||] identifier[xdr] operator[SEP] identifier[getBoolean] operator[SEP] operator[SEP] operat...
protected void bindToSpringApplication(ConfigurableEnvironment environment) { try { Binder.get(environment).bind("spring.main", Bindable.ofInstance(this)); } catch (Exception ex) { throw new IllegalStateException("Cannot bind to SpringApplication", ex); } }
class class_name[name] begin[{] method[bindToSpringApplication, return_type[void], modifier[protected], parameter[environment]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=environment, postfix_operators=[], prefix_operators=[], qualifie...
Keyword[protected] Keyword[void] identifier[bindToSpringApplication] operator[SEP] identifier[ConfigurableEnvironment] identifier[environment] operator[SEP] { Keyword[try] { identifier[Binder] operator[SEP] identifier[get] operator[SEP] identifier[environment] operator[SEP] operator[SEP] identifier[bi...
public ServiceFuture<StreamingJobInner> updateAsync(String resourceGroupName, String jobName, StreamingJobInner streamingJob, String ifMatch, final ServiceCallback<StreamingJobInner> serviceCallback) { return ServiceFuture.fromHeaderResponse(updateWithServiceResponseAsync(resourceGroupName, jobName, streamingJo...
class class_name[name] begin[{] method[updateAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, jobName, streamingJob, ifMatch, serviceCallback]] begin[{] return[call[ServiceFuture.fromHeaderResponse, parameter[call[.updateWithServiceResponseAsync, parameter[member[...
Keyword[public] identifier[ServiceFuture] operator[<] identifier[StreamingJobInner] operator[>] identifier[updateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[jobName] , identifier[StreamingJobInner] identifier[streamingJob] , identifier[String] identifier[ifMa...
private static <T> T loadAndInstantiateClassImpl( AddOnClassLoader addOnClassLoader, String classname, Class<T> clazz, String type) { Class<?> cls; try { cls = addOnClassLoader.loadClass(classname); } catch (ClassNotFoundException e) { ...
class class_name[name] begin[{] method[loadAndInstantiateClassImpl, return_type[type[T]], modifier[private static], parameter[addOnClassLoader, classname, clazz, type]] begin[{] local_variable[type[Class], cls] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberRefe...
Keyword[private] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[loadAndInstantiateClassImpl] operator[SEP] identifier[AddOnClassLoader] identifier[addOnClassLoader] , identifier[String] identifier[classname] , identifier[Class] operator[<] identifier[T] operator[>] identifier[clazz] , ...
public void invalidateCache(String table, String key) { cache.invalidateCache(new TableCacheKey<>(table, key, x -> null)); }
class class_name[name] begin[{] method[invalidateCache, return_type[void], modifier[public], parameter[table, key]] begin[{] call[cache.invalidateCache, parameter[ClassCreator(arguments=[MemberReference(member=table, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberRe...
Keyword[public] Keyword[void] identifier[invalidateCache] operator[SEP] identifier[String] identifier[table] , identifier[String] identifier[key] operator[SEP] { identifier[cache] operator[SEP] identifier[invalidateCache] operator[SEP] Keyword[new] identifier[TableCacheKey] operator[<] operator[>] operator[SEP]...
public Path getInputFileForWrite(TaskID mapId, TaskAttemptID reduceTaskId, long size) throws IOException { // TODO *oom* should use a format here return lDirAlloc.getLocalPathForWrite(TaskTracker.getIntermediateOutputDir( jobId.toString(), reduceTas...
class class_name[name] begin[{] method[getInputFileForWrite, return_type[type[Path]], modifier[public], parameter[mapId, reduceTaskId, size]] begin[{] return[call[lDirAlloc.getLocalPathForWrite, parameter[binary_operation[binary_operation[binary_operation[call[TaskTracker.getIntermediateOutputDir, para...
Keyword[public] identifier[Path] identifier[getInputFileForWrite] operator[SEP] identifier[TaskID] identifier[mapId] , identifier[TaskAttemptID] identifier[reduceTaskId] , Keyword[long] identifier[size] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[return] identifier[lDirAlloc] operator[SEP] ...
public ObjectFunctionSetSpecificationObjType createObjectFunctionSetSpecificationObjTypeFromString(EDataType eDataType, String initialValue) { ObjectFunctionSetSpecificationObjType result = ObjectFunctionSetSpecificationObjType.get(initialValue); if (result == null) throw new IllegalArgumentException("The value '" ...
class class_name[name] begin[{] method[createObjectFunctionSetSpecificationObjTypeFromString, return_type[type[ObjectFunctionSetSpecificationObjType]], modifier[public], parameter[eDataType, initialValue]] begin[{] local_variable[type[ObjectFunctionSetSpecificationObjType], result] if[b...
Keyword[public] identifier[ObjectFunctionSetSpecificationObjType] identifier[createObjectFunctionSetSpecificationObjTypeFromString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[String] identifier[initialValue] operator[SEP] { identifier[ObjectFunctionSetSpecificationObjType] identifier...
protected DependencyContextGenerator getContextGenerator() { StructuredVectorSpace svs = SerializableUtil.load(new File( argOptions.getStringOption('l'))); return new SelPrefDependencyContextGenerator(svs); }
class class_name[name] begin[{] method[getContextGenerator, return_type[type[DependencyContextGenerator]], modifier[protected], parameter[]] begin[{] local_variable[type[StructuredVectorSpace], svs] return[ClassCreator(arguments=[MemberReference(member=svs, postfix_operators=[], prefix_operator...
Keyword[protected] identifier[DependencyContextGenerator] identifier[getContextGenerator] operator[SEP] operator[SEP] { identifier[StructuredVectorSpace] identifier[svs] operator[=] identifier[SerializableUtil] operator[SEP] identifier[load] operator[SEP] Keyword[new] identifier[File] operator[SEP] identifier[ar...
public static MessageBox showMessageBox(String title, SafeHtml message, MessageStyleType styleType) { MessageBox box = new MessageBox(title, message); box.setMessageStyleType(styleType); box.setMessageBoxType(MessageBoxType.MESSAGE); box.center(); return box; }
class class_name[name] begin[{] method[showMessageBox, return_type[type[MessageBox]], modifier[public static], parameter[title, message, styleType]] begin[{] local_variable[type[MessageBox], box] call[box.setMessageStyleType, parameter[member[.styleType]]] call[box.setMe...
Keyword[public] Keyword[static] identifier[MessageBox] identifier[showMessageBox] operator[SEP] identifier[String] identifier[title] , identifier[SafeHtml] identifier[message] , identifier[MessageStyleType] identifier[styleType] operator[SEP] { identifier[MessageBox] identifier[box] operator[=] Keyword[new] id...
public final TimeZone getTimeZone(final String id) { Validate.notBlank(id, "Invalid TimeZone ID: [%s]", id); TimeZone timezone = timezones.get(id); if (timezone == null) { timezone = DEFAULT_TIMEZONES.get(id); if (timezone == null) { // if timezone not fo...
class class_name[name] begin[{] method[getTimeZone, return_type[type[TimeZone]], modifier[final public], parameter[id]] begin[{] call[Validate.notBlank, parameter[member[.id], literal["Invalid TimeZone ID: [%s]"], member[.id]]] local_variable[type[TimeZone], timezone] if...
Keyword[public] Keyword[final] identifier[TimeZone] identifier[getTimeZone] operator[SEP] Keyword[final] identifier[String] identifier[id] operator[SEP] { identifier[Validate] operator[SEP] identifier[notBlank] operator[SEP] identifier[id] , literal[String] , identifier[id] operator[SEP] operator[SEP] identifi...
private void ensureReferencedPKs(ModelDef modelDef, ReferenceDescriptorDef refDef) throws ConstraintException { String targetClassName = refDef.getProperty(PropertyHelper.OJB_PROPERTY_CLASS_REF); ClassDescriptorDef targetClassDef = modelDef.getClass(targetClassName); ensur...
class class_name[name] begin[{] method[ensureReferencedPKs, return_type[void], modifier[private], parameter[modelDef, refDef]] begin[{] local_variable[type[String], targetClassName] local_variable[type[ClassDescriptorDef], targetClassDef] call[.ensurePKsFromHierarchy, parameter[...
Keyword[private] Keyword[void] identifier[ensureReferencedPKs] operator[SEP] identifier[ModelDef] identifier[modelDef] , identifier[ReferenceDescriptorDef] identifier[refDef] operator[SEP] Keyword[throws] identifier[ConstraintException] { identifier[String] identifier[targetClassName] operator[=] identifier[ref...
public static boolean isVarArg(List<? extends XtendParameter> params) { assert params != null; if (params.size() > 0) { final XtendParameter param = params.get(params.size() - 1); assert param != null; return param.isVarArg(); } return false; }
class class_name[name] begin[{] method[isVarArg, return_type[type[boolean]], modifier[public static], parameter[params]] begin[{] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=params, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(post...
Keyword[public] Keyword[static] Keyword[boolean] identifier[isVarArg] operator[SEP] identifier[List] operator[<] operator[?] Keyword[extends] identifier[XtendParameter] operator[>] identifier[params] operator[SEP] { Keyword[assert] identifier[params] operator[!=] Other[null] operator[SEP] Keyword[if] operator[SE...
public static BuildDocHandler fromDirectoryAndJar(File directory, JarFile jarFile, String base) { return fromDirectoryAndJar(directory, jarFile, base, false); }
class class_name[name] begin[{] method[fromDirectoryAndJar, return_type[type[BuildDocHandler]], modifier[public static], parameter[directory, jarFile, base]] begin[{] return[call[.fromDirectoryAndJar, parameter[member[.directory], member[.jarFile], member[.base], literal[false]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[BuildDocHandler] identifier[fromDirectoryAndJar] operator[SEP] identifier[File] identifier[directory] , identifier[JarFile] identifier[jarFile] , identifier[String] identifier[base] operator[SEP] { Keyword[return] identifier[fromDirectoryAndJar] operator[SEP] identifi...
@NonNull public static <T> Array<T> arrayOf(Class<T> clazz) { assertIsNotParameterized(clazz, msg("arrayOf")); return Array.ofAll(Any.listOf(clazz)); }
class class_name[name] begin[{] method[arrayOf, return_type[type[Array]], modifier[public static], parameter[clazz]] begin[{] call[.assertIsNotParameterized, parameter[member[.clazz], call[.msg, parameter[literal["arrayOf"]]]]] return[call[Array.ofAll, parameter[call[Any.listOf, paramet...
annotation[@] identifier[NonNull] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Array] operator[<] identifier[T] operator[>] identifier[arrayOf] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[clazz] operator[SEP] { identifier[assertIsNotParamet...
public void setResourceShareArns(java.util.Collection<String> resourceShareArns) { if (resourceShareArns == null) { this.resourceShareArns = null; return; } this.resourceShareArns = new java.util.ArrayList<String>(resourceShareArns); }
class class_name[name] begin[{] method[setResourceShareArns, return_type[void], modifier[public], parameter[resourceShareArns]] begin[{] if[binary_operation[member[.resourceShareArns], ==, literal[null]]] begin[{] assign[THIS[member[None.resourceShareArns]], literal[null...
Keyword[public] Keyword[void] identifier[setResourceShareArns] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[resourceShareArns] operator[SEP] { Keyword[if] operator[SEP] identifier[resourceShareArns] operat...
@Override public UpdateIndexingConfigurationResult updateIndexingConfiguration(UpdateIndexingConfigurationRequest request) { request = beforeClientExecution(request); return executeUpdateIndexingConfiguration(request); }
class class_name[name] begin[{] method[updateIndexingConfiguration, return_type[type[UpdateIndexingConfigurationResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeUpdateIndexing...
annotation[@] identifier[Override] Keyword[public] identifier[UpdateIndexingConfigurationResult] identifier[updateIndexingConfiguration] operator[SEP] identifier[UpdateIndexingConfigurationRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP]...
public static OutputStream getOutputStream(Socket socket, long timeout) throws IOException { return (socket.getChannel() == null) ? socket.getOutputStream() : new SocketOutputStream(socket, timeout); }
class class_name[name] begin[{] method[getOutputStream, return_type[type[OutputStream]], modifier[public static], parameter[socket, timeout]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getChannel, postfix_operators=[], prefix_operators=[],...
Keyword[public] Keyword[static] identifier[OutputStream] identifier[getOutputStream] operator[SEP] identifier[Socket] identifier[socket] , Keyword[long] identifier[timeout] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[return] operator[SEP] identifier[socket] operator[SEP] identifier[getChanne...
public <T extends Enum<T>> T answer(final Class<T> enumClass) { return answer(enumClass, "unknown value"); }
class class_name[name] begin[{] method[answer, return_type[type[T]], modifier[public], parameter[enumClass]] begin[{] return[call[.answer, parameter[member[.enumClass], literal["unknown value"]]]] end[}] END[}]
Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[Enum] operator[<] identifier[T] operator[>] operator[>] identifier[T] identifier[answer] operator[SEP] Keyword[final] identifier[Class] operator[<] identifier[T] operator[>] identifier[enumClass] operator[SEP] { Keyword[return] identifier[answ...
public static URL getResource(String resourceName, Class<?> callingClass) { URL url = getContextClassLoader().getResource(resourceName); if (url == null && resourceName.startsWith("/")) { //certain classloaders need it without the leading / url = getContextClassLoader().getResour...
class class_name[name] begin[{] method[getResource, return_type[type[URL]], modifier[public static], parameter[resourceName, callingClass]] begin[{] local_variable[type[URL], url] if[binary_operation[binary_operation[member[.url], ==, literal[null]], &&, call[resourceName.startsWith, pa...
Keyword[public] Keyword[static] identifier[URL] identifier[getResource] operator[SEP] identifier[String] identifier[resourceName] , identifier[Class] operator[<] operator[?] operator[>] identifier[callingClass] operator[SEP] { identifier[URL] identifier[url] operator[=] identifier[getContextClassLoader] operato...
public XMLGregorianCalendar newGYear(int year) { XMLGregorianCalendar cal=dataFactory.newXMLGregorianCalendar(); cal.setYear(year); return cal; }
class class_name[name] begin[{] method[newGYear, return_type[type[XMLGregorianCalendar]], modifier[public], parameter[year]] begin[{] local_variable[type[XMLGregorianCalendar], cal] call[cal.setYear, parameter[member[.year]]] return[member[.cal]] end[}] END[}]
Keyword[public] identifier[XMLGregorianCalendar] identifier[newGYear] operator[SEP] Keyword[int] identifier[year] operator[SEP] { identifier[XMLGregorianCalendar] identifier[cal] operator[=] identifier[dataFactory] operator[SEP] identifier[newXMLGregorianCalendar] operator[SEP] operator[SEP] operator[SEP] identi...
public void stopRecording(final Publication publication) { final String recordingChannel = ChannelUri.addSessionId(publication.channel(), publication.sessionId()); stopRecording(recordingChannel, publication.streamId()); }
class class_name[name] begin[{] method[stopRecording, return_type[void], modifier[public], parameter[publication]] begin[{] local_variable[type[String], recordingChannel] call[.stopRecording, parameter[member[.recordingChannel], call[publication.streamId, parameter[]]]] end[}] END[}...
Keyword[public] Keyword[void] identifier[stopRecording] operator[SEP] Keyword[final] identifier[Publication] identifier[publication] operator[SEP] { Keyword[final] identifier[String] identifier[recordingChannel] operator[=] identifier[ChannelUri] operator[SEP] identifier[addSessionId] operator[SEP] identifier[pu...
public void setupFields() { FieldInfo field = null; field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null); field.setDataClass(Integer.class); field.setHidden(true); field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null); ...
class class_name[name] begin[{] method[setupFields, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[FieldInfo], field] assign[member[.field], ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberRefer...
Keyword[public] Keyword[void] identifier[setupFields] operator[SEP] operator[SEP] { identifier[FieldInfo] identifier[field] operator[=] Other[null] operator[SEP] identifier[field] operator[=] Keyword[new] identifier[FieldInfo] operator[SEP] Keyword[this] , identifier[ID] , identifier[Constants] operator[SEP] i...
public static String toHex(String str, Charset charset) { return HexUtil.encodeHexStr(str, charset); }
class class_name[name] begin[{] method[toHex, return_type[type[String]], modifier[public static], parameter[str, charset]] begin[{] return[call[HexUtil.encodeHexStr, parameter[member[.str], member[.charset]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[toHex] operator[SEP] identifier[String] identifier[str] , identifier[Charset] identifier[charset] operator[SEP] { Keyword[return] identifier[HexUtil] operator[SEP] identifier[encodeHexStr] operator[SEP] identifier[str] , identifier[charset] operator...
@Nullable public static XMLGregorianCalendar getXMLCalendarTime (@Nullable final XMLGregorianCalendar aBase) { if (aBase == null) return null; return s_aDTFactory.newXMLGregorianCalendarTime (aBase.getHour (), aBase.getMinute (), ...
class class_name[name] begin[{] method[getXMLCalendarTime, return_type[type[XMLGregorianCalendar]], modifier[public static], parameter[aBase]] begin[{] if[binary_operation[member[.aBase], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] return...
annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[XMLGregorianCalendar] identifier[getXMLCalendarTime] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[XMLGregorianCalendar] identifier[aBase] operator[SEP] { Keyword[if] operator[SEP] identifier[aBase] operato...
public void paint(Graphics g) { for (int i = 0; i < axis.length; i++) { axis[i].paint(g); } }
class class_name[name] begin[{] method[paint, return_type[void], modifier[public], parameter[g]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=axis, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(...
Keyword[public] Keyword[void] identifier[paint] operator[SEP] identifier[Graphics] identifier[g] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[axis] operator[SEP] identifier[length] operator[SEP] identifier[i] operato...
public void addBookmarkedConference(String name, EntityBareJid jid, boolean isAutoJoin, Resourcepart nickname, String password) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { retrieveBookmarks(); BookmarkedConference bookmark = n...
class class_name[name] begin[{] method[addBookmarkedConference, return_type[void], modifier[public], parameter[name, jid, isAutoJoin, nickname, password]] begin[{] call[.retrieveBookmarks, parameter[]] local_variable[type[BookmarkedConference], bookmark] local_variable[type[List...
Keyword[public] Keyword[void] identifier[addBookmarkedConference] operator[SEP] identifier[String] identifier[name] , identifier[EntityBareJid] identifier[jid] , Keyword[boolean] identifier[isAutoJoin] , identifier[Resourcepart] identifier[nickname] , identifier[String] identifier[password] operator[SEP] Keyword[th...
public static FedoraAPIM getStub(String protocol, String host, int port, String username, String password) throws MalformedURLException, Service...
class class_name[name] begin[{] method[getStub, return_type[type[FedoraAPIM]], modifier[public static], parameter[protocol, host, port, username, password]] begin[{] if[binary_operation[literal["http"], &&, literal["https"]]] begin[{] ThrowStatement(expression=ClassCreator(arguments...
Keyword[public] Keyword[static] identifier[FedoraAPIM] identifier[getStub] operator[SEP] identifier[String] identifier[protocol] , identifier[String] identifier[host] , Keyword[int] identifier[port] , identifier[String] identifier[username] , identifier[String] identifier[password] operator[SEP] Keyword[throws] ide...
@Override public void onTaskFailure(Execution taskExecution, Throwable cause) { executionGraph.getJobMasterMainThreadExecutor().assertRunningInMainThread(); // to better handle the lack of resources (potentially by a scale-in), we // make failures due to missing resources global failures if (cause instanceo...
class class_name[name] begin[{] method[onTaskFailure, return_type[void], modifier[public], parameter[taskExecution, cause]] begin[{] call[executionGraph.getJobMasterMainThreadExecutor, parameter[]] if[binary_operation[member[.cause], instanceof, type[NoResourceAvailableException...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onTaskFailure] operator[SEP] identifier[Execution] identifier[taskExecution] , identifier[Throwable] identifier[cause] operator[SEP] { identifier[executionGraph] operator[SEP] identifier[getJobMasterMainThreadExecutor] operator[SEP] ope...
public <E extends Model> LazyList<E> orderBy(String orderBy){ if(fullQuery != null && !forPaginator) throw new IllegalArgumentException("Cannot use .orderBy() if using free form SQL"); orderBys.add(orderBy); return (LazyList<E>) this; }
class class_name[name] begin[{] method[orderBy, return_type[type[LazyList]], modifier[public], parameter[orderBy]] begin[{] if[binary_operation[binary_operation[member[.fullQuery], !=, literal[null]], &&, member[.forPaginator]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal...
Keyword[public] operator[<] identifier[E] Keyword[extends] identifier[Model] operator[>] identifier[LazyList] operator[<] identifier[E] operator[>] identifier[orderBy] operator[SEP] identifier[String] identifier[orderBy] operator[SEP] { Keyword[if] operator[SEP] identifier[fullQuery] operator[!=] Other[null] ope...
public final void debug(String message, Throwable throwable) { if (isDebugEnabled()) { out.print( "[ maven embedder DEBUG] " ); out.println( message ); if (null != throwable) { throwable.printStackTrace( out ); } } ...
class class_name[name] begin[{] method[debug, return_type[void], modifier[final public], parameter[message, throwable]] begin[{] if[call[.isDebugEnabled, parameter[]]] begin[{] call[out.print, parameter[literal["[ maven embedder DEBUG] "]]] call[o...
Keyword[public] Keyword[final] Keyword[void] identifier[debug] operator[SEP] identifier[String] identifier[message] , identifier[Throwable] identifier[throwable] operator[SEP] { Keyword[if] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[out] operator[S...
public static RealMatrix colSubtract (RealMatrix matrix, double[] vector) { // Declare and initialize the new matrix: double[][] retval = new double[matrix.getRowDimension()][matrix.getColumnDimension()]; // Iterate over rows: for (int col = 0; col < retval.length; col++) { ...
class class_name[name] begin[{] method[colSubtract, return_type[type[RealMatrix]], modifier[public static], parameter[matrix, vector]] begin[{] local_variable[type[double], retval] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[...
Keyword[public] Keyword[static] identifier[RealMatrix] identifier[colSubtract] operator[SEP] identifier[RealMatrix] identifier[matrix] , Keyword[double] operator[SEP] operator[SEP] identifier[vector] operator[SEP] { Keyword[double] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[retval] opera...
public boolean lockBean(BeanO beanO, ContainerTx containerTx) throws RemoteException { return activator.lockBean(containerTx, beanO.beanId); // d140003.29 }
class class_name[name] begin[{] method[lockBean, return_type[type[boolean]], modifier[public], parameter[beanO, containerTx]] begin[{] return[call[activator.lockBean, parameter[member[.containerTx], member[beanO.beanId]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[lockBean] operator[SEP] identifier[BeanO] identifier[beanO] , identifier[ContainerTx] identifier[containerTx] operator[SEP] Keyword[throws] identifier[RemoteException] { Keyword[return] identifier[activator] operator[SEP] identifier[lockBean] operator[SEP] identifier[...
public void initSchema() { List<Resource> scripts = getScripts("spring.datasource.data", this.properties.getData(), "data"); if (!scripts.isEmpty()) { if (!isEnabled()) { logger.debug("Initialization disabled (not running data scripts)"); return; } String username = this.properties.getDataUsern...
class class_name[name] begin[{] method[initSchema, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[List], scripts] if[call[scripts.isEmpty, parameter[]]] begin[{] if[call[.isEnabled, parameter[]]] begin[{] ...
Keyword[public] Keyword[void] identifier[initSchema] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[Resource] operator[>] identifier[scripts] operator[=] identifier[getScripts] operator[SEP] literal[String] , Keyword[this] operator[SEP] identifier[properties] operator[SEP] identifier[getD...
public int getLayerSize() { if (lookupTable != null && lookupTable.getWeights() != null) { return lookupTable.getWeights().columns(); } else return layerSize; }
class class_name[name] begin[{] method[getLayerSize, return_type[type[int]], modifier[public], parameter[]] begin[{] if[binary_operation[binary_operation[member[.lookupTable], !=, literal[null]], &&, binary_operation[call[lookupTable.getWeights, parameter[]], !=, literal[null]]]] begin[{] ...
Keyword[public] Keyword[int] identifier[getLayerSize] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[lookupTable] operator[!=] Other[null] operator[&&] identifier[lookupTable] operator[SEP] identifier[getWeights] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { ...
public static Set<Class<?>> getInterfaces(Class<?>target, ClassFilter filter) { Class<?> clazz = target; Set<Class<?>> interfacesFound = getDeclaredInterfaces(clazz, filter); while((clazz = clazz.getSuperclass()) != null) { interfacesFound.addAll(getDeclaredInterfaces(clazz,...
class class_name[name] begin[{] method[getInterfaces, return_type[type[Set]], modifier[public static], parameter[target, filter]] begin[{] local_variable[type[Class], clazz] local_variable[type[Set], interfacesFound] while[binary_operation[assign[member[.clazz], call[clazz.getSu...
Keyword[public] Keyword[static] identifier[Set] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[getInterfaces] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[target] , identifier[ClassFilter] identifier[filter] operator[SEP] { identifier[C...
static String toChars(String p) { if (p.length() >= 3 && p.charAt(0) == '[' && p.charAt(p.length() - 1) == ']') { return p.substring(1, p.length() - 1); } return p; }
class class_name[name] begin[{] method[toChars, return_type[type[String]], modifier[static], parameter[p]] begin[{] if[binary_operation[binary_operation[binary_operation[call[p.length, parameter[]], >=, literal[3]], &&, binary_operation[call[p.charAt, parameter[literal[0]]], ==, literal['[']]],...
Keyword[static] identifier[String] identifier[toChars] operator[SEP] identifier[String] identifier[p] operator[SEP] { Keyword[if] operator[SEP] identifier[p] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>=] Other[3] operator[&&] identifier[p] operator[SEP] identifier[charAt] operator[SEP...
@Override public ReadSupport.ReadContext init(InitContext context) { final Configuration configuration = context.getConfiguration(); final MessageType fileMessageType = context.getFileSchema(); MessageType requestedProjection = fileMessageType; String partialSchemaString = configuration.get(ReadSuppor...
class class_name[name] begin[{] method[init, return_type[type[ReadSupport]], modifier[public], parameter[context]] begin[{] local_variable[type[Configuration], configuration] local_variable[type[MessageType], fileMessageType] local_variable[type[MessageType], requestedProjection] ...
annotation[@] identifier[Override] Keyword[public] identifier[ReadSupport] operator[SEP] identifier[ReadContext] identifier[init] operator[SEP] identifier[InitContext] identifier[context] operator[SEP] { Keyword[final] identifier[Configuration] identifier[configuration] operator[=] identifier[context] operator[S...
public static String[] internInPlace(String[] input) { if (input == null) { return null; } else if (input.length == 0) { return EMPTY_STRING_ARRAY; } for (int i=0; i<input.length; i++) { input[i] = Util.intern(input[i]); } return input;...
class class_name[name] begin[{] method[internInPlace, return_type[type[String]], modifier[public static], parameter[input]] begin[{] if[binary_operation[member[.input], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] if[binary_operation[member[in...
Keyword[public] Keyword[static] identifier[String] operator[SEP] operator[SEP] identifier[internInPlace] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[input] operator[SEP] { Keyword[if] operator[SEP] identifier[input] operator[==] Other[null] operator[SEP] { Keyword[return] O...
public int put(Object key, int value) { if (key == null) key = NULL_KEY; synchronized (this) { int hash = key.hashCode() & _mask; for (Item item = _entries[hash]; item != null; item = item._next) { Object testKey = item._key; if (testKey == key || testKey.equals(key)) { ...
class class_name[name] begin[{] method[put, return_type[type[int]], modifier[public], parameter[key, value]] begin[{] if[binary_operation[member[.key], ==, literal[null]]] begin[{] assign[member[.key], member[.NULL_KEY]] else begin[{] None end[}] SYNC...
Keyword[public] Keyword[int] identifier[put] operator[SEP] identifier[Object] identifier[key] , Keyword[int] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[key] operator[==] Other[null] operator[SEP] identifier[key] operator[=] identifier[NULL_KEY] operator[SEP] Keyword[synchronized] ope...
public static <T extends Comparable<? super T>> T median(T[] a) { return QuickSelect.median(a); }
class class_name[name] begin[{] method[median, return_type[type[T]], modifier[public static], parameter[a]] begin[{] return[call[QuickSelect.median, parameter[member[.a]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Comparable] operator[<] operator[?] Keyword[super] identifier[T] operator[>] operator[>] identifier[T] identifier[median] operator[SEP] identifier[T] operator[SEP] operator[SEP] identifier[a] operator[SEP] { Keyword[return] ide...