code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
@Override
public Iterator<Object[]> getDataByFilter(DataProviderFilter dataFilter) {
logger.entering(dataFilter);
List<Object[]> objs = new ArrayList<>();
Field[] fields = resource.getCls().getDeclaredFields();
// Extracting number of rows of data to read
// Notice that numR... | class class_name[name] begin[{]
method[getDataByFilter, return_type[type[Iterator]], modifier[public], parameter[dataFilter]] begin[{]
call[logger.entering, parameter[member[.dataFilter]]]
local_variable[type[List], objs]
local_variable[type[Field], fields]
local_variabl... | annotation[@] identifier[Override] Keyword[public] identifier[Iterator] operator[<] identifier[Object] operator[SEP] operator[SEP] operator[>] identifier[getDataByFilter] operator[SEP] identifier[DataProviderFilter] identifier[dataFilter] operator[SEP] {
identifier[logger] operator[SEP] identifier[entering] oper... |
@Override
public void run() {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
Tr.entry(tc, "run", Thread.currentThread().getName() + " " + this.in.getReadListener());
}
try {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnable... | class class_name[name] begin[{]
method[run, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[Tr.entry, parameter[member[.tc], lit... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operat... |
public void delete(RecordId dataRecordId) {
// search range must be a constant
if (!searchRange.isSingleValue())
throw new IllegalStateException();
// delete all entry with the specific key
while (next())
if (getDataRecordId().equals(dataRecordId)) {
// ccMgr.modifyLeafBlock(currentPage.curre... | class class_name[name] begin[{]
method[delete, return_type[void], modifier[public], parameter[dataRecordId]] begin[{]
if[call[searchRange.isSingleValue, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], ... | Keyword[public] Keyword[void] identifier[delete] operator[SEP] identifier[RecordId] identifier[dataRecordId] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[searchRange] operator[SEP] identifier[isSingleValue] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[Illeg... |
public float remove(int idx) {
float ret = -1f;
int p = Arrays.binarySearch(index,0,length, idx);
if (p >= 0) {
System.arraycopy(data, p+1, data, p, length-p-1);
System.arraycopy(index, p+1, index, p, length-p-1);
length--;
}else{
System.err.println("error");
}
return ret;
} | class class_name[name] begin[{]
method[remove, return_type[type[float]], modifier[public], parameter[idx]] begin[{]
local_variable[type[float], ret]
local_variable[type[int], p]
if[binary_operation[member[.p], >=, literal[0]]] begin[{]
call[System.arrayco... | Keyword[public] Keyword[float] identifier[remove] operator[SEP] Keyword[int] identifier[idx] operator[SEP] {
Keyword[float] identifier[ret] operator[=] operator[-] literal[Float] operator[SEP] Keyword[int] identifier[p] operator[=] identifier[Arrays] operator[SEP] identifier[binarySearch] operator[SEP] identifie... |
public RelationType joinWith(RelationType other)
{
List<Field> fields = ImmutableList.<Field>builder()
.addAll(this.allFields)
.addAll(other.allFields)
.build();
return new RelationType(fields);
} | class class_name[name] begin[{]
method[joinWith, return_type[type[RelationType]], modifier[public], parameter[other]] begin[{]
local_variable[type[List], fields]
return[ClassCreator(arguments=[MemberReference(member=fields, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], ... | Keyword[public] identifier[RelationType] identifier[joinWith] operator[SEP] identifier[RelationType] identifier[other] operator[SEP] {
identifier[List] operator[<] identifier[Field] operator[>] identifier[fields] operator[=] identifier[ImmutableList] operator[SEP] operator[<] identifier[Field] operator[>] identi... |
protected JsTreeNodeData populateTreeNodeData(FileObject root, FileObject file) throws FileSystemException {
boolean noChild = true;
FileType type = file.getType();
if (type.equals(FileType.FOLDER) || type.equals(FileType.FILE_OR_FOLDER)){
noChild = file.getChildren().length == 0;
}
String relativePa... | class class_name[name] begin[{]
method[populateTreeNodeData, return_type[type[JsTreeNodeData]], modifier[protected], parameter[root, file]] begin[{]
local_variable[type[boolean], noChild]
local_variable[type[FileType], type]
if[binary_operation[call[type.equals, parameter[member... | Keyword[protected] identifier[JsTreeNodeData] identifier[populateTreeNodeData] operator[SEP] identifier[FileObject] identifier[root] , identifier[FileObject] identifier[file] operator[SEP] Keyword[throws] identifier[FileSystemException] {
Keyword[boolean] identifier[noChild] operator[=] literal[boolean] operato... |
public void destroy() {
try {
super.destroy();
} finally {
closeQuietly(connection);
closeQuietly(producerChannel);
closeQuietly(consumerChannel);
if (connectionFactory != null && myOwnConnectionFactory) {
connectionFactory = n... | class class_name[name] begin[{]
method[destroy, return_type[void], modifier[public], parameter[]] begin[{]
TryStatement(block=[StatementExpression(expression=SuperMethodInvocation(arguments=[], member=destroy, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)... | Keyword[public] Keyword[void] identifier[destroy] operator[SEP] operator[SEP] {
Keyword[try] {
Keyword[super] operator[SEP] identifier[destroy] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[finally] {
identifier[closeQuietly] operator[SEP] identifier[connection] operator... |
public ConversionHandler load(ConversionAnalyzer analyzer){
this.methodDefined = analyzer.getMethod();
this.membership = analyzer.getMembership();
this.configClass = membership == Membership.DESTINATION?destinationClass:sourceClass;
this.configurationType = analyzer.getConfigurationType();
return this;
... | class class_name[name] begin[{]
method[load, return_type[type[ConversionHandler]], modifier[public], parameter[analyzer]] begin[{]
assign[THIS[member[None.methodDefined]], call[analyzer.getMethod, parameter[]]]
assign[THIS[member[None.membership]], call[analyzer.getMembership, p... | Keyword[public] identifier[ConversionHandler] identifier[load] operator[SEP] identifier[ConversionAnalyzer] identifier[analyzer] operator[SEP] {
Keyword[this] operator[SEP] identifier[methodDefined] operator[=] identifier[analyzer] operator[SEP] identifier[getMethod] operator[SEP] operator[SEP] operator[SEP] Key... |
public static Logger getL7dLogger(Class<?> cls,
String resourcename,
String loggerName) {
return createLogger(cls, resourcename, loggerName);
} | class class_name[name] begin[{]
method[getL7dLogger, return_type[type[Logger]], modifier[public static], parameter[cls, resourcename, loggerName]] begin[{]
return[call[.createLogger, parameter[member[.cls], member[.resourcename], member[.loggerName]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Logger] identifier[getL7dLogger] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[cls] , identifier[String] identifier[resourcename] , identifier[String] identifier[loggerName] operator[SEP] {
Keyword[return] identifier[createLogger] oper... |
public ResponseInputStream getContent() throws DAVException {
IResponse response = null;
try {
response = davClient.get(locator, newContext());
examineResponse(response);
} catch (IOException e) {
closeResponse(response);
throw new SystemException(... | class class_name[name] begin[{]
method[getContent, return_type[type[ResponseInputStream]], modifier[public], parameter[]] begin[{]
local_variable[type[IResponse], response]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=response, postfix_operato... | Keyword[public] identifier[ResponseInputStream] identifier[getContent] operator[SEP] operator[SEP] Keyword[throws] identifier[DAVException] {
identifier[IResponse] identifier[response] operator[=] Other[null] operator[SEP] Keyword[try] {
identifier[response] operator[=] identifier[davClient] operator[... |
public static float noise1(float x) {
int bx0, bx1;
float rx0, rx1, sx, t, u, v;
if (start) {
start = false;
init();
}
t = x + N;
bx0 = ((int)t) & BM;
bx1 = (bx0+1) & BM;
rx0 = t - (int)t;
rx1 = rx0 - 1.0f;
sx = s... | class class_name[name] begin[{]
method[noise1, return_type[type[float]], modifier[public static], parameter[x]] begin[{]
local_variable[type[int], bx0]
local_variable[type[float], rx0]
if[member[.start]] begin[{]
assign[member[.start], literal[false]]
... | Keyword[public] Keyword[static] Keyword[float] identifier[noise1] operator[SEP] Keyword[float] identifier[x] operator[SEP] {
Keyword[int] identifier[bx0] , identifier[bx1] operator[SEP] Keyword[float] identifier[rx0] , identifier[rx1] , identifier[sx] , identifier[t] , identifier[u] , identifier[v] operato... |
public static void runExample(
AdWordsServicesInterface adWordsServices, AdWordsSession session, long adGroupId)
throws IOException {
// Get the AdGroupAdService.
AdGroupAdServiceInterface adGroupAdService =
adWordsServices.get(session, AdGroupAdServiceInterface.class);
List<AdGroupAdOp... | class class_name[name] begin[{]
method[runExample, return_type[void], modifier[public static], parameter[adWordsServices, session, adGroupId]] begin[{]
local_variable[type[AdGroupAdServiceInterface], adGroupAdService]
local_variable[type[List], operations]
local_variable[type[MultiAsset... | Keyword[public] Keyword[static] Keyword[void] identifier[runExample] operator[SEP] identifier[AdWordsServicesInterface] identifier[adWordsServices] , identifier[AdWordsSession] identifier[session] , Keyword[long] identifier[adGroupId] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[AdGroupAd... |
public static int findOffsetFromCodePoint(char source[], int start, int limit, int offset32) {
char ch;
int result = start, count = offset32;
if (offset32 > limit - start) {
throw new ArrayIndexOutOfBoundsException(offset32);
}
while (result < limit && count > 0) {
... | class class_name[name] begin[{]
method[findOffsetFromCodePoint, return_type[type[int]], modifier[public static], parameter[source, start, limit, offset32]] begin[{]
local_variable[type[char], ch]
local_variable[type[int], result]
if[binary_operation[member[.offset32], >, binary_... | Keyword[public] Keyword[static] Keyword[int] identifier[findOffsetFromCodePoint] operator[SEP] Keyword[char] identifier[source] operator[SEP] operator[SEP] , Keyword[int] identifier[start] , Keyword[int] identifier[limit] , Keyword[int] identifier[offset32] operator[SEP] {
Keyword[char] identifier[ch] operato... |
public EC2TagSet withEc2TagSetList(java.util.Collection<java.util.List<EC2TagFilter>> ec2TagSetList) {
setEc2TagSetList(ec2TagSetList);
return this;
} | class class_name[name] begin[{]
method[withEc2TagSetList, return_type[type[EC2TagSet]], modifier[public], parameter[ec2TagSetList]] begin[{]
call[.setEc2TagSetList, parameter[member[.ec2TagSetList]]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[EC2TagSet] identifier[withEc2TagSetList] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[EC2TagFilter] operator[>] operator[>] i... |
public boolean removeItem (T item)
{
int index = _items.indexOf(item);
if (index == -1) {
return false;
}
_items.remove(index);
removeItem(index);
return true;
} | class class_name[name] begin[{]
method[removeItem, return_type[type[boolean]], modifier[public], parameter[item]] begin[{]
local_variable[type[int], index]
if[binary_operation[member[.index], ==, literal[1]]] begin[{]
return[literal[false]]
else begin[{]
None
... | Keyword[public] Keyword[boolean] identifier[removeItem] operator[SEP] identifier[T] identifier[item] operator[SEP] {
Keyword[int] identifier[index] operator[=] identifier[_items] operator[SEP] identifier[indexOf] operator[SEP] identifier[item] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[inde... |
public static MetricInfo computeAllMetrics() {
long start = System.currentTimeMillis();
MetricInfo metricInfo = MetricUtils.mkMetricInfo();
List<Map.Entry<String, AsmMetric>> entries = Lists.newLinkedList();
if (enableStreamMetrics) {
entries.addAll(streamMetrics.metrics.ent... | class class_name[name] begin[{]
method[computeAllMetrics, return_type[type[MetricInfo]], modifier[public static], parameter[]] begin[{]
local_variable[type[long], start]
local_variable[type[MetricInfo], metricInfo]
local_variable[type[List], entries]
if[member[.enableStr... | Keyword[public] Keyword[static] identifier[MetricInfo] identifier[computeAllMetrics] operator[SEP] operator[SEP] {
Keyword[long] identifier[start] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] identifier[MetricInfo] identifier[metricInfo] ope... |
public void setDefaultConfiguration(Reader defaultConfig) {
XProcConfiguration config = new XProcConfiguration("he", false);
try {
nextDefaultConfig = config.getProcessor().newDocumentBuilder()
.build(new SAXSource(new InputSource(defaultConfig))); }
catch (SaxonApiException e) {
throw new RuntimeExcept... | class class_name[name] begin[{]
method[setDefaultConfiguration, return_type[void], modifier[public], parameter[defaultConfig]] begin[{]
local_variable[type[XProcConfiguration], config]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=nextDefaultCo... | Keyword[public] Keyword[void] identifier[setDefaultConfiguration] operator[SEP] identifier[Reader] identifier[defaultConfig] operator[SEP] {
identifier[XProcConfiguration] identifier[config] operator[=] Keyword[new] identifier[XProcConfiguration] operator[SEP] literal[String] , literal[boolean] operator[SEP] op... |
@OnMessage
public void onMessage(String messageParam) {
boolean handlerFoundForMsg = false;
for(IMessageResponseHandler handler : new ArrayList<>(this.messageHandlers.values())) {
Object qualifyObj = handler.doesHandlerQualifyForProcessing(messageParam);
if(qualifyObj instanceof Error) {
handler.handleM... | class class_name[name] begin[{]
method[onMessage, return_type[void], modifier[public], parameter[messageParam]] begin[{]
local_variable[type[boolean], handlerFoundForMsg]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDecla... | annotation[@] identifier[OnMessage] Keyword[public] Keyword[void] identifier[onMessage] operator[SEP] identifier[String] identifier[messageParam] operator[SEP] {
Keyword[boolean] identifier[handlerFoundForMsg] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[IMessageResponseHandle... |
public static void init( ServletContext servletContext )
{
PageFlowFactoriesConfig factoriesBean = ConfigUtil.getConfig().getPageFlowFactories();
FlowControllerFactory factory = null;
if ( factoriesBean != null )
{
PageFlowFactoryConfig fcFactoryBean = factoriesBean.getP... | class class_name[name] begin[{]
method[init, return_type[void], modifier[public static], parameter[servletContext]] begin[{]
local_variable[type[PageFlowFactoriesConfig], factoriesBean]
local_variable[type[FlowControllerFactory], factory]
if[binary_operation[member[.factoriesBea... | Keyword[public] Keyword[static] Keyword[void] identifier[init] operator[SEP] identifier[ServletContext] identifier[servletContext] operator[SEP] {
identifier[PageFlowFactoriesConfig] identifier[factoriesBean] operator[=] identifier[ConfigUtil] operator[SEP] identifier[getConfig] operator[SEP] operator[SEP] opera... |
public static String toJson(Object object) {
Objects.requireNonNull(object, Required.OBJECT.toString());
String json = null;
try {
json = mapper.writeValueAsString(object);
} catch (JsonProcessingException e) {
LOG.error("Failed to convert object to json"... | class class_name[name] begin[{]
method[toJson, return_type[type[String]], modifier[public static], parameter[object]] begin[{]
call[Objects.requireNonNull, parameter[member[.object], call[Required.OBJECT.toString, parameter[]]]]
local_variable[type[String], json]
TryStatement(bl... | Keyword[public] Keyword[static] identifier[String] identifier[toJson] operator[SEP] identifier[Object] identifier[object] operator[SEP] {
identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[object] , identifier[Required] operator[SEP] identifier[OBJECT] operator[SEP] identifier... |
public static Media add_material(String access_token,MediaType mediaType,URI uri,Description description){
HttpPost httpPost = new HttpPost(BASE_URI+"/cgi-bin/material/add_material");
CloseableHttpClient tempHttpClient = HttpClients.createDefault();
try {
HttpEntity entity = tempHttpClient.execute(RequestB... | class class_name[name] begin[{]
method[add_material, return_type[type[Media]], modifier[public static], parameter[access_token, mediaType, uri, description]] begin[{]
local_variable[type[HttpPost], httpPost]
local_variable[type[CloseableHttpClient], tempHttpClient]
TryStatement(block=[L... | Keyword[public] Keyword[static] identifier[Media] identifier[add_material] operator[SEP] identifier[String] identifier[access_token] , identifier[MediaType] identifier[mediaType] , identifier[URI] identifier[uri] , identifier[Description] identifier[description] operator[SEP] {
identifier[HttpPost] identifier... |
public List<VirtualMachineImageResourceInner> listOffers(String location, String publisherName) {
return listOffersWithServiceResponseAsync(location, publisherName).toBlocking().single().body();
} | class class_name[name] begin[{]
method[listOffers, return_type[type[List]], modifier[public], parameter[location, publisherName]] begin[{]
return[call[.listOffersWithServiceResponseAsync, parameter[member[.location], member[.publisherName]]]]
end[}]
END[}] | Keyword[public] identifier[List] operator[<] identifier[VirtualMachineImageResourceInner] operator[>] identifier[listOffers] operator[SEP] identifier[String] identifier[location] , identifier[String] identifier[publisherName] operator[SEP] {
Keyword[return] identifier[listOffersWithServiceResponseAsync] operato... |
private void setupIndexMonitor(final DataSchema dataSchema, final GenericDataSource dataSource) {
logger.log(FINE,"LuceneSearchServiceImpl::setupIndexMonitor Attempting to setup Index monitor...");
try {
if(GoogleAppEngineUtil.isGaeEnv()){
return; // only use for pure lucene... | class class_name[name] begin[{]
method[setupIndexMonitor, return_type[void], modifier[private], parameter[dataSchema, dataSource]] begin[{]
call[logger.log, parameter[member[.FINE], literal["LuceneSearchServiceImpl::setupIndexMonitor Attempting to setup Index monitor..."]]]
TryStatement... | Keyword[private] Keyword[void] identifier[setupIndexMonitor] operator[SEP] Keyword[final] identifier[DataSchema] identifier[dataSchema] , Keyword[final] identifier[GenericDataSource] identifier[dataSource] operator[SEP] {
identifier[logger] operator[SEP] identifier[log] operator[SEP] identifier[FINE] , literal... |
private static CmsXmlGroupContainer getCache(CmsObject cms, CmsResource resource, boolean keepEncoding) {
if (resource instanceof I_CmsHistoryResource) {
return null;
}
return getCache().getCacheGroupContainer(
getCache().getCacheKey(resource.getStructureId(), keepEncodi... | class class_name[name] begin[{]
method[getCache, return_type[type[CmsXmlGroupContainer]], modifier[private static], parameter[cms, resource, keepEncoding]] begin[{]
if[binary_operation[member[.resource], instanceof, type[I_CmsHistoryResource]]] begin[{]
return[literal[null]]
... | Keyword[private] Keyword[static] identifier[CmsXmlGroupContainer] identifier[getCache] operator[SEP] identifier[CmsObject] identifier[cms] , identifier[CmsResource] identifier[resource] , Keyword[boolean] identifier[keepEncoding] operator[SEP] {
Keyword[if] operator[SEP] identifier[resource] Keyword[instanceof... |
public void registerOrderbookCallback(final BitfinexOrderBookSymbol orderbookConfiguration,
final BiConsumer<BitfinexOrderBookSymbol, BitfinexOrderBookEntry> callback) throws BitfinexClientException {
channelCallbacks.registerCallback(orderbookConfiguration, callback);
} | class class_name[name] begin[{]
method[registerOrderbookCallback, return_type[void], modifier[public], parameter[orderbookConfiguration, callback]] begin[{]
call[channelCallbacks.registerCallback, parameter[member[.orderbookConfiguration], member[.callback]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[registerOrderbookCallback] operator[SEP] Keyword[final] identifier[BitfinexOrderBookSymbol] identifier[orderbookConfiguration] , Keyword[final] identifier[BiConsumer] operator[<] identifier[BitfinexOrderBookSymbol] , identifier[BitfinexOrderBookEntry] operator[>] identifier[ca... |
public java.util.List<SubnetIpv6CidrBlockAssociation> getIpv6CidrBlockAssociationSet() {
if (ipv6CidrBlockAssociationSet == null) {
ipv6CidrBlockAssociationSet = new com.amazonaws.internal.SdkInternalList<SubnetIpv6CidrBlockAssociation>();
}
return ipv6CidrBlockAssociationSet;
} | class class_name[name] begin[{]
method[getIpv6CidrBlockAssociationSet, return_type[type[java]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ipv6CidrBlockAssociationSet], ==, literal[null]]] begin[{]
assign[member[.ipv6CidrBlockAssociationSet], Cla... | Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[SubnetIpv6CidrBlockAssociation] operator[>] identifier[getIpv6CidrBlockAssociationSet] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ipv6CidrBlockAssociationSet] operator[==]... |
void writeEndElement(final Writer output, final String name) throws SAXException {
try {
output.write(LESS_THAN);
output.write(SLASH);
output.write(name);
output.write(GREATER_THAN);
} catch (IOException e) {
throw new SAXException(e);
... | class class_name[name] begin[{]
method[writeEndElement, return_type[void], modifier[default], parameter[output, name]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=LESS_THAN, postfix_operators=[], prefix_operators=[], qualifier=, selecto... | Keyword[void] identifier[writeEndElement] operator[SEP] Keyword[final] identifier[Writer] identifier[output] , Keyword[final] identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[SAXException] {
Keyword[try] {
identifier[output] operator[SEP] identifier[write] operator[SEP] id... |
public static UserAgent getUserAgent(HttpServletRequest request) {
if (request == null) {
return null;
}
String userAgentHead = request.getHeader("User-Agent");
return getUserAgent(userAgentHead);
} | class class_name[name] begin[{]
method[getUserAgent, return_type[type[UserAgent]], modifier[public static], parameter[request]] begin[{]
if[binary_operation[member[.request], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_v... | Keyword[public] Keyword[static] identifier[UserAgent] identifier[getUserAgent] operator[SEP] identifier[HttpServletRequest] identifier[request] operator[SEP] {
Keyword[if] operator[SEP] identifier[request] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
... |
public void sendFlushedMessage(SIBUuid8 ignore, SIBUuid12 streamID) throws SIResourceException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "sendFlushedMessage", new Object[]{ignore, streamID});
ControlFlushed flushMsg = createControlFlushed(_targetMEUuid, ... | class class_name[name] begin[{]
method[sendFlushedMessage, return_type[void], modifier[public], parameter[ignore, streamID]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, para... | Keyword[public] Keyword[void] identifier[sendFlushedMessage] operator[SEP] identifier[SIBUuid8] identifier[ignore] , identifier[SIBUuid12] identifier[streamID] operator[SEP] Keyword[throws] identifier[SIResourceException] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTraci... |
public String requests() {
String orderBy = get("orderBy");
if (Strings.isEmpty(orderBy)) orderBy = "beginAt";
List<AccessRequest> requests = accessMonitor.getRequests();
Collections.sort(requests, new PropertyComparator(orderBy));
Map<String, Date> beginAts = CollectUtils.newHashMap();
for (Acc... | class class_name[name] begin[{]
method[requests, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[String], orderBy]
if[call[Strings.isEmpty, parameter[member[.orderBy]]]] begin[{]
assign[member[.orderBy], literal["beginAt"]]
else... | Keyword[public] identifier[String] identifier[requests] operator[SEP] operator[SEP] {
identifier[String] identifier[orderBy] operator[=] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Strings] operator[SEP] identifier[isEmpty] operator[SEP] identifi... |
@Deprecated
public ProjectDefinition setProperties(Properties properties) {
for (Entry<Object, Object> entry : properties.entrySet()) {
this.properties.put(entry.getKey().toString(), entry.getValue().toString());
}
return this;
} | class class_name[name] begin[{]
method[setProperties, return_type[type[ProjectDefinition]], modifier[public], parameter[properties]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors... | annotation[@] identifier[Deprecated] Keyword[public] identifier[ProjectDefinition] identifier[setProperties] operator[SEP] identifier[Properties] identifier[properties] operator[SEP] {
Keyword[for] operator[SEP] identifier[Entry] operator[<] identifier[Object] , identifier[Object] operator[>] identifier[entry] ... |
public Object convertFormValueToModelValue(Object propertyValue) {
if (propertyValue==null || "".equals(propertyValue)) {
return null;
}
return new Long(propertyValue.toString());
} | class class_name[name] begin[{]
method[convertFormValueToModelValue, return_type[type[Object]], modifier[public], parameter[propertyValue]] begin[{]
if[binary_operation[binary_operation[member[.propertyValue], ==, literal[null]], ||, literal[""]]] begin[{]
return[literal[null]]
... | Keyword[public] identifier[Object] identifier[convertFormValueToModelValue] operator[SEP] identifier[Object] identifier[propertyValue] operator[SEP] {
Keyword[if] operator[SEP] identifier[propertyValue] operator[==] Other[null] operator[||] literal[String] operator[SEP] identifier[equals] operator[SEP] identifie... |
public static cacheglobal_cachepolicy_binding[] get(nitro_service service) throws Exception{
cacheglobal_cachepolicy_binding obj = new cacheglobal_cachepolicy_binding();
cacheglobal_cachepolicy_binding response[] = (cacheglobal_cachepolicy_binding[]) obj.get_resources(service);
return response;
} | class class_name[name] begin[{]
method[get, return_type[type[cacheglobal_cachepolicy_binding]], modifier[public static], parameter[service]] begin[{]
local_variable[type[cacheglobal_cachepolicy_binding], obj]
local_variable[type[cacheglobal_cachepolicy_binding], response]
return[member[... | Keyword[public] Keyword[static] identifier[cacheglobal_cachepolicy_binding] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[cacheglobal_cachepolicy_binding] identifier[obj] operator[=] Keyword... |
public Object setSelectedSearch(Object criteria) {
// filterField leegmaken
if (getTableWidget().getTextFilterField() != null) {
getTableWidget().getTextFilterField().setText("");
}
// if Referable == null, empty filterForm and execute filter
if (criteria == null) {
if (dataProvider.supportsFiltering())... | class class_name[name] begin[{]
method[setSelectedSearch, return_type[type[Object]], modifier[public], parameter[criteria]] begin[{]
if[binary_operation[call[.getTableWidget, parameter[]], !=, literal[null]]] begin[{]
call[.getTableWidget, parameter[]]
else begin... | Keyword[public] identifier[Object] identifier[setSelectedSearch] operator[SEP] identifier[Object] identifier[criteria] operator[SEP] {
Keyword[if] operator[SEP] identifier[getTableWidget] operator[SEP] operator[SEP] operator[SEP] identifier[getTextFilterField] operator[SEP] operator[SEP] operator[!=] Other[null]... |
public Object getValue(String key) {
if (isExpression(key))
return evaluate(key);
else
return getVariables().get(key);
} | class class_name[name] begin[{]
method[getValue, return_type[type[Object]], modifier[public], parameter[key]] begin[{]
if[call[.isExpression, parameter[member[.key]]]] begin[{]
return[call[.evaluate, parameter[member[.key]]]]
else begin[{]
return[call[.getVariables, parameter[]]]
... | Keyword[public] identifier[Object] identifier[getValue] operator[SEP] identifier[String] identifier[key] operator[SEP] {
Keyword[if] operator[SEP] identifier[isExpression] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[return] identifier[evaluate] operator[SEP] identifier[key] operator[SEP] op... |
public RemoteListCache getCache() {
RemoteRepositoryCache logCache = getLogResult()==null ? null : getLogResult().getCache();
RemoteRepositoryCache traceCache = getTraceResult()==null ? null : getTraceResult().getCache();
return switched ? new RemoteListCacheImpl(traceCache, logCache) : new RemoteListCacheImpl(lo... | class class_name[name] begin[{]
method[getCache, return_type[type[RemoteListCache]], modifier[public], parameter[]] begin[{]
local_variable[type[RemoteRepositoryCache], logCache]
local_variable[type[RemoteRepositoryCache], traceCache]
return[TernaryExpression(condition=MemberReference(m... | Keyword[public] identifier[RemoteListCache] identifier[getCache] operator[SEP] operator[SEP] {
identifier[RemoteRepositoryCache] identifier[logCache] operator[=] identifier[getLogResult] operator[SEP] operator[SEP] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[getLogResult] operator[SE... |
public static boolean unregister(String groupName) {
groupName = normalizeGroupName(groupName);
return serverGroups.remove(groupName) != null;
} | class class_name[name] begin[{]
method[unregister, return_type[type[boolean]], modifier[public static], parameter[groupName]] begin[{]
assign[member[.groupName], call[.normalizeGroupName, parameter[member[.groupName]]]]
return[binary_operation[call[serverGroups.remove, parameter[member[... | Keyword[public] Keyword[static] Keyword[boolean] identifier[unregister] operator[SEP] identifier[String] identifier[groupName] operator[SEP] {
identifier[groupName] operator[=] identifier[normalizeGroupName] operator[SEP] identifier[groupName] operator[SEP] operator[SEP] Keyword[return] identifier[serverGroups] ... |
public <T> void load(ExtensionRepository<T> repository, Class<T> extensionType) {
// loadExtensionFromPackage(repository, extensionType, getDefaultScanPackage());
// String customScanPackage = getCustomScanPackage();
// if (!Strings.isNullOrEmpty(customScanPackage)) {
// loadExtensionFromPackage(repository, extens... | class class_name[name] begin[{]
method[load, return_type[void], modifier[public], parameter[repository, extensionType]] begin[{]
call[.loadMetricsFromSPI, parameter[member[.repository], member[.extensionType]]]
end[}]
END[}] | Keyword[public] operator[<] identifier[T] operator[>] Keyword[void] identifier[load] operator[SEP] identifier[ExtensionRepository] operator[<] identifier[T] operator[>] identifier[repository] , identifier[Class] operator[<] identifier[T] operator[>] identifier[extensionType] operator[SEP] {
identifier[loadMetri... |
public JCommander findCommandByAlias(String commandOrAlias) {
ProgramName progName = findProgramName(commandOrAlias);
if (progName == null) {
return null;
}
JCommander jc = findCommand(progName);
if (jc == null) {
throw new IllegalStateException(
... | class class_name[name] begin[{]
method[findCommandByAlias, return_type[type[JCommander]], modifier[public], parameter[commandOrAlias]] begin[{]
local_variable[type[ProgramName], progName]
if[binary_operation[member[.progName], ==, literal[null]]] begin[{]
return[literal[null... | Keyword[public] identifier[JCommander] identifier[findCommandByAlias] operator[SEP] identifier[String] identifier[commandOrAlias] operator[SEP] {
identifier[ProgramName] identifier[progName] operator[=] identifier[findProgramName] operator[SEP] identifier[commandOrAlias] operator[SEP] operator[SEP] Keyword[if] o... |
public LoadBalancerDescription withListenerDescriptions(ListenerDescription... listenerDescriptions) {
if (this.listenerDescriptions == null) {
setListenerDescriptions(new com.amazonaws.internal.SdkInternalList<ListenerDescription>(listenerDescriptions.length));
}
for (ListenerDescri... | class class_name[name] begin[{]
method[withListenerDescriptions, return_type[type[LoadBalancerDescription]], modifier[public], parameter[listenerDescriptions]] begin[{]
if[binary_operation[THIS[member[None.listenerDescriptions]], ==, literal[null]]] begin[{]
call[.setLis... | Keyword[public] identifier[LoadBalancerDescription] identifier[withListenerDescriptions] operator[SEP] identifier[ListenerDescription] operator[...] identifier[listenerDescriptions] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[listenerDescriptions] operator[==] Other[null] ope... |
public void marshall(DescribeTagsRequest describeTagsRequest, ProtocolMarshaller protocolMarshaller) {
if (describeTagsRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(describeTagsRequest.ge... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[describeTagsRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.describeTagsRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DescribeTagsRequest] identifier[describeTagsRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[describeTagsRequest] operator[==] Other[null] operator[SEP] {
... |
public static void logAllThreads() {
StringBuilder sb = new StringBuilder("Dumping all threads:\n");
for (Thread t : Thread.getAllStackTraces().keySet()) {
sb.append(formatStackTrace(t));
}
LOG.info(sb.toString());
} | class class_name[name] begin[{]
method[logAllThreads, return_type[void], modifier[public static], parameter[]] begin[{]
local_variable[type[StringBuilder], sb]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(ar... | Keyword[public] Keyword[static] Keyword[void] identifier[logAllThreads] operator[SEP] operator[SEP] {
identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Thread] identifier[t] o... |
@Pure
public static Object getContextResolver() throws AndroidException {
Object resolver;
synchronized (Android.class) {
resolver = (contextResolver == null) ? null : contextResolver.get();
}
if (resolver == null) {
final Object context = getContext();
try {
final Class<?> resolverType = getConte... | class class_name[name] begin[{]
method[getContextResolver, return_type[type[Object]], modifier[public static], parameter[]] begin[{]
local_variable[type[Object], resolver]
SYNCHRONIZED[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType... | annotation[@] identifier[Pure] Keyword[public] Keyword[static] identifier[Object] identifier[getContextResolver] operator[SEP] operator[SEP] Keyword[throws] identifier[AndroidException] {
identifier[Object] identifier[resolver] operator[SEP] Keyword[synchronized] operator[SEP] identifier[Android] operator[SEP] K... |
public UrlChain moreUrl(Object... urlParts) {
final String argTitle = "urlParts";
assertArgumentNotNull(argTitle, urlParts);
checkWrongUrlChainUse(argTitle, urlParts);
this.urlParts = urlParts;
return this;
} | class class_name[name] begin[{]
method[moreUrl, return_type[type[UrlChain]], modifier[public], parameter[urlParts]] begin[{]
local_variable[type[String], argTitle]
call[.assertArgumentNotNull, parameter[member[.argTitle], member[.urlParts]]]
call[.checkWrongUrlChainUse, ... | Keyword[public] identifier[UrlChain] identifier[moreUrl] operator[SEP] identifier[Object] operator[...] identifier[urlParts] operator[SEP] {
Keyword[final] identifier[String] identifier[argTitle] operator[=] literal[String] operator[SEP] identifier[assertArgumentNotNull] operator[SEP] identifier[argTitle] , ide... |
@SuppressWarnings("unchecked" )
public <E extends IParsedElement> boolean getContainedParsedElementsByType( Class<E> parsedElementType, List<E> listResults )
{
return getContainedParsedElementsByTypes( (List<IParsedElement>)listResults, parsedElementType );
} | class class_name[name] begin[{]
method[getContainedParsedElementsByType, return_type[type[boolean]], modifier[public], parameter[parsedElementType, listResults]] begin[{]
return[call[.getContainedParsedElementsByTypes, parameter[Cast(expression=MemberReference(member=listResults, postfix_operators=[], ... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] operator[<] identifier[E] Keyword[extends] identifier[IParsedElement] operator[>] Keyword[boolean] identifier[getContainedParsedElementsByType] operator[SEP] identifier[Class] operator[<] identifier[E] operator[>] ide... |
int next() throws
IOException
{
prevChar = curChar;
checkState(prevChar > -1);
if (pos < buf.length)
{
curChar = buf[pos++];
}
else
{
curChar = in.read();
}
offset++;
/*
* Handle line and col
* lf=\n, cr=\r
*/
if (curChar == '\r' ||... | class class_name[name] begin[{]
method[next, return_type[type[int]], modifier[default], parameter[]] begin[{]
assign[member[.prevChar], member[.curChar]]
call[.checkState, parameter[binary_operation[member[.prevChar], >, literal[1]]]]
if[binary_operation[member[.... | Keyword[int] identifier[next] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[prevChar] operator[=] identifier[curChar] operator[SEP] identifier[checkState] operator[SEP] identifier[prevChar] operator[>] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] i... |
public void reset() {
targetFile = null;
title = null;
defaultTitle = null;
inTitleElement = false;
termStack.clear();
topicIdStack.clear();
indexTermSpecList.clear();
indexSeeSpecList.clear();
indexSeeAlsoSpecList.clear();
indexSortAsSpecL... | class class_name[name] begin[{]
method[reset, return_type[void], modifier[public], parameter[]] begin[{]
assign[member[.targetFile], literal[null]]
assign[member[.title], literal[null]]
assign[member[.defaultTitle], literal[null]]
assign[member[.i... | Keyword[public] Keyword[void] identifier[reset] operator[SEP] operator[SEP] {
identifier[targetFile] operator[=] Other[null] operator[SEP] identifier[title] operator[=] Other[null] operator[SEP] identifier[defaultTitle] operator[=] Other[null] operator[SEP] identifier[inTitleElement] operator[=] literal[boolean]... |
public boolean rollover() {
//
// can't roll without a policy
//
if (rollingPolicy != null) {
Exception exception = null;
synchronized (this) {
//
// if a previous async task is still running
//}
... | class class_name[name] begin[{]
method[rollover, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.rollingPolicy], !=, literal[null]]] begin[{]
local_variable[type[Exception], exception]
SYNCHRONIZED[THIS[]] BEGIN... | Keyword[public] Keyword[boolean] identifier[rollover] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[rollingPolicy] operator[!=] Other[null] operator[SEP] {
identifier[Exception] identifier[exception] operator[=] Other[null] operator[SEP] Keyword[synchronized] operator[SEP] Keyword... |
@Override
public void removeByGroupId(long groupId) {
for (CommerceUserSegmentEntry commerceUserSegmentEntry : findByGroupId(
groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
remove(commerceUserSegmentEntry);
}
} | class class_name[name] begin[{]
method[removeByGroupId, return_type[void], modifier[public], parameter[groupId]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=commerceUserSegmentEntry, postfix_operator... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[removeByGroupId] operator[SEP] Keyword[long] identifier[groupId] operator[SEP] {
Keyword[for] operator[SEP] identifier[CommerceUserSegmentEntry] identifier[commerceUserSegmentEntry] operator[:] identifier[findByGroupId] operator[SEP] id... |
private static BigInteger bigForString(String str, int sigchars)
{
assert str.length() <= sigchars;
BigInteger big = BigInteger.ZERO;
for (int i = 0; i < str.length(); i++)
{
int charpos = 16 * (sigchars - (i + 1));
BigInteger charbig = BigInteger.valueOf(str... | class class_name[name] begin[{]
method[bigForString, return_type[type[BigInteger]], modifier[private static], parameter[str, sigchars]] begin[{]
AssertStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=str, sel... | Keyword[private] Keyword[static] identifier[BigInteger] identifier[bigForString] operator[SEP] identifier[String] identifier[str] , Keyword[int] identifier[sigchars] operator[SEP] {
Keyword[assert] identifier[str] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[<=] identifier[sigchars] ope... |
public QueryExecutor<S> executor(Filter<S> filter, OrderingList<S> ordering, QueryHints hints)
throws RepositoryException
{
return analyze(filter, ordering, hints).createExecutor();
} | class class_name[name] begin[{]
method[executor, return_type[type[QueryExecutor]], modifier[public], parameter[filter, ordering, hints]] begin[{]
return[call[.analyze, parameter[member[.filter], member[.ordering], member[.hints]]]]
end[}]
END[}] | Keyword[public] identifier[QueryExecutor] operator[<] identifier[S] operator[>] identifier[executor] operator[SEP] identifier[Filter] operator[<] identifier[S] operator[>] identifier[filter] , identifier[OrderingList] operator[<] identifier[S] operator[>] identifier[ordering] , identifier[QueryHints] identifier[hints... |
private void instantiateIngest() throws IOException {
InjectionHandler.processEvent(InjectionEvent.STANDBY_INSTANTIATE_INGEST);
try {
synchronized (ingestStateLock) {
if (checkIngestState()) {
LOG.info("Standby: Ingest for txid: " + currentSegmentTxId
+ " is already running... | class class_name[name] begin[{]
method[instantiateIngest, return_type[void], modifier[private], parameter[]] begin[{]
call[InjectionHandler.processEvent, parameter[member[InjectionEvent.STANDBY_INSTANTIATE_INGEST]]]
TryStatement(block=[SynchronizedStatement(block=[IfStatement(condition=... | Keyword[private] Keyword[void] identifier[instantiateIngest] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[InjectionHandler] operator[SEP] identifier[processEvent] operator[SEP] identifier[InjectionEvent] operator[SEP] identifier[STANDBY_INSTANTIATE_INGEST] operator[SEP] operat... |
public static <T, R> Function<T, R> wrap(final Function<T, R> function)
{
final Tracing tracing = Tracing.get();
final String traceId = tracing.newOperationId();
return wrap(traceId, tracing.isVerbose(), function);
} | class class_name[name] begin[{]
method[wrap, return_type[type[Function]], modifier[public static], parameter[function]] begin[{]
local_variable[type[Tracing], tracing]
local_variable[type[String], traceId]
return[call[.wrap, parameter[member[.traceId], call[tracing.isVerbose, parameter[... | Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[R] operator[>] identifier[Function] operator[<] identifier[T] , identifier[R] operator[>] identifier[wrap] operator[SEP] Keyword[final] identifier[Function] operator[<] identifier[T] , identifier[R] operator[>] identifier[function] operator[SEP] ... |
private JButton makeButton(String imageName, String actionCommand, String toolTipText, String altText) {
//Look for the image.
String imgLocation = "images/" + imageName + "16.png";
URL imageURL = PlotCanvas.class.getResource(imgLocation);
//Create and initialize the button.
JBu... | class class_name[name] begin[{]
method[makeButton, return_type[type[JButton]], modifier[private], parameter[imageName, actionCommand, toolTipText, altText]] begin[{]
local_variable[type[String], imgLocation]
local_variable[type[URL], imageURL]
local_variable[type[JButton], button]
... | Keyword[private] identifier[JButton] identifier[makeButton] operator[SEP] identifier[String] identifier[imageName] , identifier[String] identifier[actionCommand] , identifier[String] identifier[toolTipText] , identifier[String] identifier[altText] operator[SEP] {
identifier[String] identifier[imgLocation] ope... |
public static GeometryCollection extrudeGeometry(Geometry geometry, double height) throws SQLException {
if(geometry == null){
return null;
}
if (geometry instanceof Polygon) {
return GeometryExtrude.extrudePolygonAsGeometry((Polygon) geometry, height);
} else if ... | class class_name[name] begin[{]
method[extrudeGeometry, return_type[type[GeometryCollection]], modifier[public static], parameter[geometry, height]] begin[{]
if[binary_operation[member[.geometry], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
... | Keyword[public] Keyword[static] identifier[GeometryCollection] identifier[extrudeGeometry] operator[SEP] identifier[Geometry] identifier[geometry] , Keyword[double] identifier[height] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[if] operator[SEP] identifier[geometry] operator[==] Other[null]... |
private void appendOption(StringBuffer buff, Option option, boolean required)
{
if (!required)
{
buff.append("[");
}
if (option.getOpt() != null)
{
buff.append("-").append(option.getOpt());
}
else
{
buff.append("--"... | class class_name[name] begin[{]
method[appendOption, return_type[void], modifier[private], parameter[buff, option, required]] begin[{]
if[member[.required]] begin[{]
call[buff.append, parameter[literal["["]]]
else begin[{]
None
end[}]
if[b... | Keyword[private] Keyword[void] identifier[appendOption] operator[SEP] identifier[StringBuffer] identifier[buff] , identifier[Option] identifier[option] , Keyword[boolean] identifier[required] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[required] operator[SEP] {
identifier[buff] ... |
@Nonnull
public Launcher createLauncher(TaskListener listener) {
SlaveComputer c = getComputer();
if (c == null) {
listener.error("Issue with creating launcher for agent " + name + ". Computer has been disconnected");
return new Launcher.DummyLauncher(listener);
} els... | class class_name[name] begin[{]
method[createLauncher, return_type[type[Launcher]], modifier[public], parameter[listener]] begin[{]
local_variable[type[SlaveComputer], c]
if[binary_operation[member[.c], ==, literal[null]]] begin[{]
call[listener.error, parameter[... | annotation[@] identifier[Nonnull] Keyword[public] identifier[Launcher] identifier[createLauncher] operator[SEP] identifier[TaskListener] identifier[listener] operator[SEP] {
identifier[SlaveComputer] identifier[c] operator[=] identifier[getComputer] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[... |
@Override
public PathImpl getPath(String pathName)
{
if (_pathMap != null) {
String cleanPathName = pathName;
if (cleanPathName.endsWith("/"))
cleanPathName = cleanPathName.substring(0, cleanPathName.length() - 1);
JarMap.JarList jarEntryList = _pathMap.get(cleanPathName)... | class class_name[name] begin[{]
method[getPath, return_type[type[PathImpl]], modifier[public], parameter[pathName]] begin[{]
if[binary_operation[member[._pathMap], !=, literal[null]]] begin[{]
local_variable[type[String], cleanPathName]
if[call[cleanPathName.... | annotation[@] identifier[Override] Keyword[public] identifier[PathImpl] identifier[getPath] operator[SEP] identifier[String] identifier[pathName] operator[SEP] {
Keyword[if] operator[SEP] identifier[_pathMap] operator[!=] Other[null] operator[SEP] {
identifier[String] identifier[cleanPathName] operato... |
@DELETE
public JSONObject delete(String path, JSONObject content, Map<String,String> headers) throws ServiceException, JSONException {
throw new ServiceException(ServiceException.NOT_ALLOWED, "DELETE not implemented");
} | class class_name[name] begin[{]
method[delete, return_type[type[JSONObject]], modifier[public], parameter[path, content, headers]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=NOT_ALLOWED, postfix_operators=[], prefix_operators=[], qualifier=ServiceException, select... | annotation[@] identifier[DELETE] Keyword[public] identifier[JSONObject] identifier[delete] operator[SEP] identifier[String] identifier[path] , identifier[JSONObject] identifier[content] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[headers] operator[SEP] Keyword[throws]... |
public static Resource getResource(String resourceSpec) {
log.trace("retrieving resource -> " + resourceSpec);
try {
if (resourceSpec.startsWith("file:")) {
return new ResourceImpl(normFile(resourceSpec.substring(5)).toURI().toURL());
}
if (resourceS... | class class_name[name] begin[{]
method[getResource, return_type[type[Resource]], modifier[public static], parameter[resourceSpec]] begin[{]
call[log.trace, parameter[binary_operation[literal["retrieving resource -> "], +, member[.resourceSpec]]]]
TryStatement(block=[IfStatement(conditio... | Keyword[public] Keyword[static] identifier[Resource] identifier[getResource] operator[SEP] identifier[String] identifier[resourceSpec] operator[SEP] {
identifier[log] operator[SEP] identifier[trace] operator[SEP] literal[String] operator[+] identifier[resourceSpec] operator[SEP] operator[SEP] Keyword[try] {
... |
protected void threadEnd() {
//
// Note the 'afterCallbacks' list is not going to have a well-defined order, so it is of limited use.
// We probably want to revisit this with some kind of priority/order based on ranking to make
// it more useful.
//
// At the moment we tr... | class class_name[name] begin[{]
method[threadEnd, return_type[void], modifier[protected], parameter[]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=getBatchKernel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arg... | Keyword[protected] Keyword[void] identifier[threadEnd] operator[SEP] operator[SEP] {
Keyword[try] {
identifier[getBatchKernel] operator[SEP] operator[SEP] operator[SEP] identifier[workUnitCompleted] operator[SEP] Keyword[this] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] id... |
@Override
public GetRelationalDatabaseBundlesResult getRelationalDatabaseBundles(GetRelationalDatabaseBundlesRequest request) {
request = beforeClientExecution(request);
return executeGetRelationalDatabaseBundles(request);
} | class class_name[name] begin[{]
method[getRelationalDatabaseBundles, return_type[type[GetRelationalDatabaseBundlesResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeGetRelationa... | annotation[@] identifier[Override] Keyword[public] identifier[GetRelationalDatabaseBundlesResult] identifier[getRelationalDatabaseBundles] operator[SEP] identifier[GetRelationalDatabaseBundlesRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[S... |
public void invokeCallback(Timer timer, int methodId, boolean persistentGlobalTx)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
Tr.entry(tc, "invokeCallback: " + timer);
EJSDeployedSupport s = new EJSDeployedSupport();
s.isPersistentTimeoutGlobalTx = persist... | class class_name[name] begin[{]
method[invokeCallback, return_type[void], modifier[public], parameter[timer, methodId, persistentGlobalTx]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[Tr... | Keyword[public] Keyword[void] identifier[invokeCallback] operator[SEP] identifier[Timer] identifier[timer] , Keyword[int] identifier[methodId] , Keyword[boolean] identifier[persistentGlobalTx] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] ope... |
@Override
public int getSize()
{
int size = 0;
synchronized (storeLock)
{
if (volatileStore != null)
size += volatileStore.size();
if (persistentStore != null)
size += persistentStore.size();
}
return size;
} | class class_name[name] begin[{]
method[getSize, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[int], size]
SYNCHRONIZED[member[.storeLock]] BEGIN[{]
if[binary_operation[member[.volatileStore], !=, literal[null]]] begin[{]
... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[getSize] operator[SEP] operator[SEP] {
Keyword[int] identifier[size] operator[=] Other[0] operator[SEP] Keyword[synchronized] operator[SEP] identifier[storeLock] operator[SEP] {
Keyword[if] operator[SEP] identifier[volatileStor... |
public void remove(Object key) {
for (Scope cur=this; cur!=null; cur=cur.parent) {
if (cur.data != null && cur.data.containsKey(key)) {
cur.data.remove(key);
return ;
}
}
} | class class_name[name] begin[{]
method[remove, return_type[void], modifier[public], parameter[key]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=data, postfix_operators=[], prefix_operato... | Keyword[public] Keyword[void] identifier[remove] operator[SEP] identifier[Object] identifier[key] operator[SEP] {
Keyword[for] operator[SEP] identifier[Scope] identifier[cur] operator[=] Keyword[this] operator[SEP] identifier[cur] operator[!=] Other[null] operator[SEP] identifier[cur] operator[=] identifier[cur]... |
public static boolean invertM(float[] mInv, int mInvOffset, float[] m,
int mOffset) {
// Invert a 4 x 4 matrix using Cramer's Rule
// transpose matrix
final float src0 = m[mOffset + 0];
final float src4 = m[mOffset + 1];
final float src8 = m[mOffset + 2]... | class class_name[name] begin[{]
method[invertM, return_type[type[boolean]], modifier[public static], parameter[mInv, mInvOffset, m, mOffset]] begin[{]
local_variable[type[float], src0]
local_variable[type[float], src4]
local_variable[type[float], src8]
local_variable[type[float]... | Keyword[public] Keyword[static] Keyword[boolean] identifier[invertM] operator[SEP] Keyword[float] operator[SEP] operator[SEP] identifier[mInv] , Keyword[int] identifier[mInvOffset] , Keyword[float] operator[SEP] operator[SEP] identifier[m] , Keyword[int] identifier[mOffset] operator[SEP] {
Keyword[final] Keyw... |
@Override
public ListSecurityProfilesResult listSecurityProfiles(ListSecurityProfilesRequest request) {
request = beforeClientExecution(request);
return executeListSecurityProfiles(request);
} | class class_name[name] begin[{]
method[listSecurityProfiles, return_type[type[ListSecurityProfilesResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeListSecurityProfiles, parame... | annotation[@] identifier[Override] Keyword[public] identifier[ListSecurityProfilesResult] identifier[listSecurityProfiles] operator[SEP] identifier[ListSecurityProfilesRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] ... |
private void offerSlotsToJobManager(final JobID jobId) {
final JobManagerConnection jobManagerConnection = jobManagerTable.get(jobId);
if (jobManagerConnection == null) {
log.debug("There is no job manager connection to the leader of job {}.", jobId);
} else {
if (taskSlotTable.hasAllocatedSlots(jobId)) {
... | class class_name[name] begin[{]
method[offerSlotsToJobManager, return_type[void], modifier[private], parameter[jobId]] begin[{]
local_variable[type[JobManagerConnection], jobManagerConnection]
if[binary_operation[member[.jobManagerConnection], ==, literal[null]]] begin[{]
... | Keyword[private] Keyword[void] identifier[offerSlotsToJobManager] operator[SEP] Keyword[final] identifier[JobID] identifier[jobId] operator[SEP] {
Keyword[final] identifier[JobManagerConnection] identifier[jobManagerConnection] operator[=] identifier[jobManagerTable] operator[SEP] identifier[get] operator[SEP] i... |
@Deprecated
public static String getContextPath(final WebApplication application)
{
final String contextPath = application.getServletContext().getContextPath();
if ((null != contextPath) && !contextPath.isEmpty())
{
return contextPath;
}
return "";
} | class class_name[name] begin[{]
method[getContextPath, return_type[type[String]], modifier[public static], parameter[application]] begin[{]
local_variable[type[String], contextPath]
if[binary_operation[binary_operation[literal[null], !=, member[.contextPath]], &&, call[contextPath.isEmp... | annotation[@] identifier[Deprecated] Keyword[public] Keyword[static] identifier[String] identifier[getContextPath] operator[SEP] Keyword[final] identifier[WebApplication] identifier[application] operator[SEP] {
Keyword[final] identifier[String] identifier[contextPath] operator[=] identifier[application] operator... |
@Deprecated
public java.util.List<String> getIpRanges() {
if (ipv4Ranges == null) {
ipv4Ranges = new com.amazonaws.internal.SdkInternalList<IpRange>();
}
return newLegacyIpRangeList(ipv4Ranges);
} | class class_name[name] begin[{]
method[getIpRanges, return_type[type[java]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ipv4Ranges], ==, literal[null]]] begin[{]
assign[member[.ipv4Ranges], ClassCreator(arguments=[], body=None, constructor_type_a... | annotation[@] identifier[Deprecated] Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[getIpRanges] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ipv4Ranges] operator[==] Other[null] operator[S... |
@Override
public Array getArray(@NonNull String key) {
if (key == null) { throw new IllegalArgumentException("key cannot be null."); }
synchronized (lock) {
final Object obj = getMValue(internalDict, key).asNative(internalDict);
return obj instanceof Array ? (Array) obj : nu... | class class_name[name] begin[{]
method[getArray, return_type[type[Array]], modifier[public], parameter[key]] begin[{]
if[binary_operation[member[.key], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], q... | annotation[@] identifier[Override] Keyword[public] identifier[Array] identifier[getArray] operator[SEP] annotation[@] identifier[NonNull] identifier[String] identifier[key] operator[SEP] {
Keyword[if] operator[SEP] identifier[key] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] id... |
public void createDestinationLocalization(
DestinationDefinition destinationDefinition,
LocalizationDefinition destinationLocalizationDefinition,
Set<String> destinationLocalizingMEs... | class class_name[name] begin[{]
method[createDestinationLocalization, return_type[void], modifier[public], parameter[destinationDefinition, destinationLocalizationDefinition, destinationLocalizingMEs, isTemporary]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[... | Keyword[public] Keyword[void] identifier[createDestinationLocalization] operator[SEP] identifier[DestinationDefinition] identifier[destinationDefinition] , identifier[LocalizationDefinition] identifier[destinationLocalizationDefinition] , identifier[Set] operator[<] identifier[String] operator[>] identifier[destinati... |
static <T> T trace(Level level, Object reason) {
// NOTE: do not make this method private as it affects stack traces
try {
if (System.getProperty(propertyName) != null) {
StackTraceElement[] st = Thread.currentThread().getStackTrace();
String method = "???";
... | class class_name[name] begin[{]
method[trace, return_type[type[T]], modifier[static], parameter[level, reason]] begin[{]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=propertyName, postfix_operators=[], prefix_operators=[], qualifi... | Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[trace] operator[SEP] identifier[Level] identifier[level] , identifier[Object] identifier[reason] operator[SEP] {
Keyword[try] {
Keyword[if] operator[SEP] identifier[System] operator[SEP] identifier[getProperty] operator[SE... |
private void checkNormalization(Node externs, Node root) {
// Verify nothing has inappropriately denormalize the AST.
CodeChangeHandler handler = new ForbiddenChange();
compiler.addChangeHandler(handler);
// TODO(johnlenz): Change these normalization checks Preconditions and
// Exceptions into Erro... | class class_name[name] begin[{]
method[checkNormalization, return_type[void], modifier[private], parameter[externs, root]] begin[{]
local_variable[type[CodeChangeHandler], handler]
call[compiler.addChangeHandler, parameter[member[.handler]]]
ClassCreator(arguments=[Membe... | Keyword[private] Keyword[void] identifier[checkNormalization] operator[SEP] identifier[Node] identifier[externs] , identifier[Node] identifier[root] operator[SEP] {
identifier[CodeChangeHandler] identifier[handler] operator[=] Keyword[new] identifier[ForbiddenChange] operator[SEP] operator[SEP] operator[SEP] id... |
public static List<CPAttachmentFileEntry> findByC_C_T_ST(long classNameId,
long classPK, int type, int status, int start, int end,
OrderByComparator<CPAttachmentFileEntry> orderByComparator,
boolean retrieveFromCache) {
return getPersistence()
.findByC_C_T_ST(classNameId, classPK, type, status, start,
... | class class_name[name] begin[{]
method[findByC_C_T_ST, return_type[type[List]], modifier[public static], parameter[classNameId, classPK, type, status, start, end, orderByComparator, retrieveFromCache]] begin[{]
return[call[.getPersistence, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[CPAttachmentFileEntry] operator[>] identifier[findByC_C_T_ST] operator[SEP] Keyword[long] identifier[classNameId] , Keyword[long] identifier[classPK] , Keyword[int] identifier[type] , Keyword[int] identifier[status] , Keyword[int] identifier[st... |
protected static CannotParseException missingXmlElements(ICalDataType... dataTypes) {
String[] elements = new String[dataTypes.length];
for (int i = 0; i < dataTypes.length; i++) {
ICalDataType dataType = dataTypes[i];
elements[i] = (dataType == null) ? "unknown" : dataType.getName().toLowerCase();
}
retu... | class class_name[name] begin[{]
method[missingXmlElements, return_type[type[CannotParseException]], modifier[static protected], parameter[dataTypes]] begin[{]
local_variable[type[String], elements]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[],... | Keyword[protected] Keyword[static] identifier[CannotParseException] identifier[missingXmlElements] operator[SEP] identifier[ICalDataType] operator[...] identifier[dataTypes] operator[SEP] {
identifier[String] operator[SEP] operator[SEP] identifier[elements] operator[=] Keyword[new] identifier[String] operator[SE... |
protected Set<String> resumePreviousByDeploymentName(CommandContext commandContext, DeploymentEntity deployment) {
List<Deployment> previousDeployments = new DeploymentQueryImpl().deploymentName(deployment.getName()).list();
Set<String> deploymentIds = new HashSet<String>(previousDeployments.size());
for (D... | class class_name[name] begin[{]
method[resumePreviousByDeploymentName, return_type[type[Set]], modifier[protected], parameter[commandContext, deployment]] begin[{]
local_variable[type[List], previousDeployments]
local_variable[type[Set], deploymentIds]
ForStatement(body=BlockStatement(l... | Keyword[protected] identifier[Set] operator[<] identifier[String] operator[>] identifier[resumePreviousByDeploymentName] operator[SEP] identifier[CommandContext] identifier[commandContext] , identifier[DeploymentEntity] identifier[deployment] operator[SEP] {
identifier[List] operator[<] identifier[Deployment] o... |
public int getPriority()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "getPriority");
int priority = _sourceStream.getPriority();
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(tc, "getPriority", new Integer(priority));
r... | class class_name[name] begin[{]
method[getPriority, return_type[type[int]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter[member[.tc],... | Keyword[public] Keyword[int] identifier[getPriority] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operat... |
private static int lookup(final TSDB tsdb,
final boolean use_data_table,
final String[] args) throws Exception {
if (!use_data_table) {
tsdb.getClient().ensureTableExists(
tsdb.getConfig().getString(
"tsd.storage.hbase.meta_table"... | class class_name[name] begin[{]
method[lookup, return_type[type[int]], modifier[private static], parameter[tsdb, use_data_table, args]] begin[{]
if[member[.use_data_table]] begin[{]
call[tsdb.getClient, parameter[]]
else begin[{]
None
end[}]
local... | Keyword[private] Keyword[static] Keyword[int] identifier[lookup] operator[SEP] Keyword[final] identifier[TSDB] identifier[tsdb] , Keyword[final] Keyword[boolean] identifier[use_data_table] , Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[Excepti... |
public SVGPath ellipticalArc(double[] rxy, double ar, double la, double sp, double[] xy) {
return append(PATH_ARC).append(rxy[0]).append(rxy[1]).append(ar).append(la).append(sp).append(xy[0]).append(xy[1]);
} | class class_name[name] begin[{]
method[ellipticalArc, return_type[type[SVGPath]], modifier[public], parameter[rxy, ar, la, sp, xy]] begin[{]
return[call[.append, parameter[member[.PATH_ARC]]]]
end[}]
END[}] | Keyword[public] identifier[SVGPath] identifier[ellipticalArc] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[rxy] , Keyword[double] identifier[ar] , Keyword[double] identifier[la] , Keyword[double] identifier[sp] , Keyword[double] operator[SEP] operator[SEP] identifier[xy] operator[SEP] {
... |
public static <T, R, I extends Interceptor<T>> Function<T, R> intercept(Function<T, R> innermost, Iterable<I> interceptors) {
dbc.precondition(interceptors != null, "cannot create an interceptor chain with a null iterable of interceptors");
return new InterceptorChain<>(innermost, interceptors.iterator(... | class class_name[name] begin[{]
method[intercept, return_type[type[Function]], modifier[public static], parameter[innermost, interceptors]] begin[{]
call[dbc.precondition, parameter[binary_operation[member[.interceptors], !=, literal[null]], literal["cannot create an interceptor chain with a nu... | Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[R] , identifier[I] Keyword[extends] identifier[Interceptor] operator[<] identifier[T] operator[>] operator[>] identifier[Function] operator[<] identifier[T] , identifier[R] operator[>] identifier[intercept] operator[SEP] identifier[Function] oper... |
public Matrix4x3d m20(double m20) {
this.m20 = m20;
properties &= ~PROPERTY_ORTHONORMAL;
if (m20 != 0.0)
properties &= ~(PROPERTY_IDENTITY | PROPERTY_TRANSLATION);
return this;
} | class class_name[name] begin[{]
method[m20, return_type[type[Matrix4x3d]], modifier[public], parameter[m20]] begin[{]
assign[THIS[member[None.m20]], member[.m20]]
assign[member[.properties], member[.PROPERTY_ORTHONORMAL]]
if[binary_operation[member[.m20], !=, lit... | Keyword[public] identifier[Matrix4x3d] identifier[m20] operator[SEP] Keyword[double] identifier[m20] operator[SEP] {
Keyword[this] operator[SEP] identifier[m20] operator[=] identifier[m20] operator[SEP] identifier[properties] operator[&=] operator[~] identifier[PROPERTY_ORTHONORMAL] operator[SEP] Keyword[if] ope... |
@Override
public final void initialize(final AlternateSize pconstraintAnnotation) {
size1 = pconstraintAnnotation.size1();
size2 = pconstraintAnnotation.size2();
ignoreWhiteSpaces = pconstraintAnnotation.ignoreWhiteSpaces();
ignoreMinus = pconstraintAnnotation.ignoreMinus();
ignoreSlashes = pconst... | class class_name[name] begin[{]
method[initialize, return_type[void], modifier[final public], parameter[pconstraintAnnotation]] begin[{]
assign[member[.size1], call[pconstraintAnnotation.size1, parameter[]]]
assign[member[.size2], call[pconstraintAnnotation.size2, parameter[]]]
... | annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[initialize] operator[SEP] Keyword[final] identifier[AlternateSize] identifier[pconstraintAnnotation] operator[SEP] {
identifier[size1] operator[=] identifier[pconstraintAnnotation] operator[SEP] identifier[size1] operator[... |
@Indexable(type = IndexableType.REINDEX)
@Override
public CPDefinitionOptionRel addCPDefinitionOptionRel(
CPDefinitionOptionRel cpDefinitionOptionRel) {
cpDefinitionOptionRel.setNew(true);
return cpDefinitionOptionRelPersistence.update(cpDefinitionOptionRel);
} | class class_name[name] begin[{]
method[addCPDefinitionOptionRel, return_type[type[CPDefinitionOptionRel]], modifier[public], parameter[cpDefinitionOptionRel]] begin[{]
call[cpDefinitionOptionRel.setNew, parameter[literal[true]]]
return[call[cpDefinitionOptionRelPersistence.update, param... | annotation[@] identifier[Indexable] operator[SEP] identifier[type] operator[=] identifier[IndexableType] operator[SEP] identifier[REINDEX] operator[SEP] annotation[@] identifier[Override] Keyword[public] identifier[CPDefinitionOptionRel] identifier[addCPDefinitionOptionRel] operator[SEP] identifier[CPDefinitionOptionRe... |
public void calc() {
if (null != functionOccurences) {
Iterator iterator = functionOccurences.iterator();
while (iterator.hasNext()) {
int[] position = (int[]) iterator.next();
String functionString = ((String) getXY(position[0], position[1])).trim();
// better use RegEx
... | class class_name[name] begin[{]
method[calc, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[literal[null], !=, member[.functionOccurences]]] begin[{]
local_variable[type[Iterator], iterator]
while[call[iterator.hasNext, paramet... | Keyword[public] Keyword[void] identifier[calc] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] Other[null] operator[!=] identifier[functionOccurences] operator[SEP] {
identifier[Iterator] identifier[iterator] operator[=] identifier[functionOccurences] operator[SEP] identifier[iterator] operato... |
public void readHeader(InputStream in) throws IOException {
CRC32 crc = new CRC32();
crc.reset();
if (!testGzipMagic(in, crc)) {
throw new NoGzipMagicException();
}
this.length += 2;
if (readByte(in, crc) != Deflater.DEFLATED) {
throw new IOExcepti... | class class_name[name] begin[{]
method[readHeader, return_type[void], modifier[public], parameter[in]] begin[{]
local_variable[type[CRC32], crc]
call[crc.reset, parameter[]]
if[call[.testGzipMagic, parameter[member[.in], member[.crc]]]] begin[{]
ThrowStatemen... | Keyword[public] Keyword[void] identifier[readHeader] operator[SEP] identifier[InputStream] identifier[in] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[CRC32] identifier[crc] operator[=] Keyword[new] identifier[CRC32] operator[SEP] operator[SEP] operator[SEP] identifier[crc] operator[SEP] id... |
public DataProvider getDataProvider(){
if(this.dataProvider == null){
// EventLogger.logEvent("org.wwarn.surveyor.client.mvp.SimpleClientFactory", "getDataProvider", "begin");
// EventLogger.logEvent("org.wwarn.surveyor.client.mvp.SimpleClientFactory", "getSchema", "begin");
D... | class class_name[name] begin[{]
method[getDataProvider, return_type[type[DataProvider]], modifier[public], parameter[]] begin[{]
if[binary_operation[THIS[member[None.dataProvider]], ==, literal[null]]] begin[{]
local_variable[type[DataSchema], schema]
local_variable[type... | Keyword[public] identifier[DataProvider] identifier[getDataProvider] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[dataProvider] operator[==] Other[null] operator[SEP] {
identifier[DataSchema] identifier[schema] operator[=] identifier[getSchema] operato... |
@PostConstruct
public void runSetup() throws SetupException {
HAConfiguration.ZookeeperProperties zookeeperProperties = HAConfiguration.getZookeeperProperties(configuration);
InterProcessMutex lock = curatorFactory.lockInstance(zookeeperProperties.getZkRoot());
try {
LOG.info("Tr... | class class_name[name] begin[{]
method[runSetup, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[HAConfiguration], zookeeperProperties]
local_variable[type[InterProcessMutex], lock]
TryStatement(block=[StatementExpression(expression=MethodInvocation(argume... | annotation[@] identifier[PostConstruct] Keyword[public] Keyword[void] identifier[runSetup] operator[SEP] operator[SEP] Keyword[throws] identifier[SetupException] {
identifier[HAConfiguration] operator[SEP] identifier[ZookeeperProperties] identifier[zookeeperProperties] operator[=] identifier[HAConfiguration] ope... |
public ISession getSession(String id, int version, boolean isSessionAccess) {
//create local variable - JIT performance improvement
final boolean isTraceOn = com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled();
if (isTraceOn && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
... | class class_name[name] begin[{]
method[getSession, return_type[type[ISession]], modifier[public], parameter[id, version, isSessionAccess]] begin[{]
local_variable[type[boolean], isTraceOn]
if[binary_operation[member[.isTraceOn], &&, call[LoggingUtil.SESSION_LOGGER_WAS.isLoggable, parame... | Keyword[public] identifier[ISession] identifier[getSession] operator[SEP] identifier[String] identifier[id] , Keyword[int] identifier[version] , Keyword[boolean] identifier[isSessionAccess] operator[SEP] {
Keyword[final] Keyword[boolean] identifier[isTraceOn] operator[=] identifier[com] operator[SEP] identifie... |
private CommandFaceDescriptor getOrCreateFaceDescriptor() {
if (!isFaceConfigured()) {
if (logger.isInfoEnabled()) {
logger.info("Lazily instantiating default face descriptor on behalf of caller to prevent npe; "
+ "command is being configured manually, right?");
}
if(ValkyrieRepository.isCurrently... | class class_name[name] begin[{]
method[getOrCreateFaceDescriptor, return_type[type[CommandFaceDescriptor]], modifier[private], parameter[]] begin[{]
if[call[.isFaceConfigured, parameter[]]] begin[{]
if[call[logger.isInfoEnabled, parameter[]]] begin[{]
... | Keyword[private] identifier[CommandFaceDescriptor] identifier[getOrCreateFaceDescriptor] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[isFaceConfigured] operator[SEP] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[is... |
public static CharMatcher isNot(final char match) {
return new FastMatcher() {
@Override public boolean matches(char c) {
return c != match;
}
@Override public CharMatcher and(CharMatcher other) {
return other.matches(match) ? super.and(other) : other;
}
@Override pub... | class class_name[name] begin[{]
method[isNot, return_type[type[CharMatcher]], modifier[public static], parameter[match]] begin[{]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=BinaryOperation(operandl=Me... | Keyword[public] Keyword[static] identifier[CharMatcher] identifier[isNot] operator[SEP] Keyword[final] Keyword[char] identifier[match] operator[SEP] {
Keyword[return] Keyword[new] identifier[FastMatcher] operator[SEP] operator[SEP] {
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] ... |
public static <T> T unboxAllAs(Object src, int srcPos, int len, Class<T> type) {
return (T) unboxAll(type, src, srcPos, len);
} | class class_name[name] begin[{]
method[unboxAllAs, return_type[type[T]], modifier[public static], parameter[src, srcPos, len, type]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberRefer... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[unboxAllAs] operator[SEP] identifier[Object] identifier[src] , Keyword[int] identifier[srcPos] , Keyword[int] identifier[len] , identifier[Class] operator[<] identifier[T] operator[>] identifier[type] operator[SEP] {
... |
private static Date getSentDate(MimeMessage msg, Date defaultVal) {
if (msg == null) {
return defaultVal;
}
try {
Date sentDate = msg.getSentDate();
if (sentDate == null) {
return defaultVal;
} else {
return... | class class_name[name] begin[{]
method[getSentDate, return_type[type[Date]], modifier[private static], parameter[msg, defaultVal]] begin[{]
if[binary_operation[member[.msg], ==, literal[null]]] begin[{]
return[member[.defaultVal]]
else begin[{]
None
end[}]
Tr... | Keyword[private] Keyword[static] identifier[Date] identifier[getSentDate] operator[SEP] identifier[MimeMessage] identifier[msg] , identifier[Date] identifier[defaultVal] operator[SEP] {
Keyword[if] operator[SEP] identifier[msg] operator[==] Other[null] operator[SEP] {
Keyword[return] identifier[defau... |
public Response getResource() throws IOException {
buildQueryString();
buildHeaders();
connection.setDoOutput(true);
connection.setRequestMethod("GET");
return readResponse();
} | class class_name[name] begin[{]
method[getResource, return_type[type[Response]], modifier[public], parameter[]] begin[{]
call[.buildQueryString, parameter[]]
call[.buildHeaders, parameter[]]
call[connection.setDoOutput, parameter[literal[true]]]
c... | Keyword[public] identifier[Response] identifier[getResource] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[buildQueryString] operator[SEP] operator[SEP] operator[SEP] identifier[buildHeaders] operator[SEP] operator[SEP] operator[SEP] identifier[connection] operator[SEP] identif... |
private File saveAsFile(ResponseBody responseBody) {
if (responseBody == null) {
return null;
}
try {
File file = new File(destDirectory + File.separator + fileName + retrieveUniqueId() + "." + extension);
InputStream inputStream = null;
OutputStream outputStream = null;
try ... | class class_name[name] begin[{]
method[saveAsFile, return_type[type[File]], modifier[private], parameter[responseBody]] begin[{]
if[binary_operation[member[.responseBody], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
TryStateme... | Keyword[private] identifier[File] identifier[saveAsFile] operator[SEP] identifier[ResponseBody] identifier[responseBody] operator[SEP] {
Keyword[if] operator[SEP] identifier[responseBody] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
Keyword[try] {... |
private void pessimisticFindFirst(
DeleteStack stack)
{
Object q = null;
int v1 = 0;
int x1 = 0;
synchronized(_index)
{
q = getFirst(stack);
v1 = _index.vno();
x1 = _index.xno();
_pessimi... | class class_name[name] begin[{]
method[pessimisticFindFirst, return_type[void], modifier[private], parameter[stack]] begin[{]
local_variable[type[Object], q]
local_variable[type[int], v1]
local_variable[type[int], x1]
SYNCHRONIZED[member[._index]] BEGIN[{]
... | Keyword[private] Keyword[void] identifier[pessimisticFindFirst] operator[SEP] identifier[DeleteStack] identifier[stack] operator[SEP] {
identifier[Object] identifier[q] operator[=] Other[null] operator[SEP] Keyword[int] identifier[v1] operator[=] Other[0] operator[SEP] Keyword[int] identifier[x1] operator[=] Oth... |
@Override
public DescribeImportSnapshotTasksResult describeImportSnapshotTasks(DescribeImportSnapshotTasksRequest request) {
request = beforeClientExecution(request);
return executeDescribeImportSnapshotTasks(request);
} | class class_name[name] begin[{]
method[describeImportSnapshotTasks, return_type[type[DescribeImportSnapshotTasksResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeDescribeImport... | annotation[@] identifier[Override] Keyword[public] identifier[DescribeImportSnapshotTasksResult] identifier[describeImportSnapshotTasks] operator[SEP] identifier[DescribeImportSnapshotTasksRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP]... |
public static void enc(char in, StringBuffer out) {
if (in == '&') {
out.append("&");
} else if (in == '<') {
out.append("<");
} else if (in == '>') {
out.append(">");
} else if (in == '"') {
out.append(""");
} else i... | class class_name[name] begin[{]
method[enc, return_type[void], modifier[public static], parameter[in, out]] begin[{]
if[binary_operation[member[.in], ==, literal['&']]] begin[{]
call[out.append, parameter[literal["&"]]]
else begin[{]
if[binary_ope... | Keyword[public] Keyword[static] Keyword[void] identifier[enc] operator[SEP] Keyword[char] identifier[in] , identifier[StringBuffer] identifier[out] operator[SEP] {
Keyword[if] operator[SEP] identifier[in] operator[==] literal[String] operator[SEP] {
identifier[out] operator[SEP] identifier[append] op... |
public double distance(final Coordinate c) {
final double dx = getX() - c.getX();
final double dy = getY() - c.getY();
return Math.sqrt(dx * dx + dy * dy);
} | class class_name[name] begin[{]
method[distance, return_type[type[double]], modifier[public], parameter[c]] begin[{]
local_variable[type[double], dx]
local_variable[type[double], dy]
return[call[Math.sqrt, parameter[binary_operation[binary_operation[member[.dx], *, member[.dx]], +, bina... | Keyword[public] Keyword[double] identifier[distance] operator[SEP] Keyword[final] identifier[Coordinate] identifier[c] operator[SEP] {
Keyword[final] Keyword[double] identifier[dx] operator[=] identifier[getX] operator[SEP] operator[SEP] operator[-] identifier[c] operator[SEP] identifier[getX] operator[SEP] oper... |
public int readInt(int offset, byte[] data)
{
int result = 0;
int i = offset + m_offset;
for (int shiftBy = 0; shiftBy < 32; shiftBy += 8)
{
result |= ((data[i] & 0xff)) << shiftBy;
++i;
}
return result;
} | class class_name[name] begin[{]
method[readInt, return_type[type[int]], modifier[public], parameter[offset, data]] begin[{]
local_variable[type[int], result]
local_variable[type[int], i]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(e... | Keyword[public] Keyword[int] identifier[readInt] operator[SEP] Keyword[int] identifier[offset] , Keyword[byte] operator[SEP] operator[SEP] identifier[data] operator[SEP] {
Keyword[int] identifier[result] operator[=] Other[0] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[offset] operator[+] ide... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.