code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
protected base_response add_resource(nitro_service service,options option) throws Exception
{
if (!service.isLogin() && !this.get_object_type().equals("login"))
service.login();
String sessionid = service.get_sessionid();
String request = resource_to_string(service, sessionid, option);
return post_data(ser... | class class_name[name] begin[{]
method[add_resource, return_type[type[base_response]], modifier[protected], parameter[service, option]] begin[{]
if[binary_operation[call[service.isLogin, parameter[]], &&, THIS[call[None.get_object_type, parameter[]]call[None.equals, parameter[literal["login"]]]... | Keyword[protected] identifier[base_response] identifier[add_resource] operator[SEP] identifier[nitro_service] identifier[service] , identifier[options] identifier[option] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[if] operator[SEP] operator[!] identifier[service] operator[SEP] identifier[isLo... |
public <T> void register(CompletableFuture<T> future) {
if (future.isDone()) {
// Nothing to do.
return;
}
boolean autoCancel = false;
synchronized (this.futures) {
Preconditions.checkNotNull(future, "future");
if (this.cancellationRequest... | class class_name[name] begin[{]
method[register, return_type[void], modifier[public], parameter[future]] begin[{]
if[call[future.isDone, parameter[]]] begin[{]
return[None]
else begin[{]
None
end[}]
local_variable[type[boolean], autoCancel]
SY... | Keyword[public] operator[<] identifier[T] operator[>] Keyword[void] identifier[register] operator[SEP] identifier[CompletableFuture] operator[<] identifier[T] operator[>] identifier[future] operator[SEP] {
Keyword[if] operator[SEP] identifier[future] operator[SEP] identifier[isDone] operator[SEP] operator[SEP] o... |
private int readChar()
throws IOException
{
Reader readEncoding = _readEncoding;
if (readEncoding == null)
return read();
else {
if (readEncoding.read(_charBuffer, 0, 1) == 1) {
return _charBuffer[0];
}
else {
return -1;
}
}
} | class class_name[name] begin[{]
method[readChar, return_type[type[int]], modifier[private], parameter[]] begin[{]
local_variable[type[Reader], readEncoding]
if[binary_operation[member[.readEncoding], ==, literal[null]]] begin[{]
return[call[.read, parameter[]]]
else begin[{]
... | Keyword[private] Keyword[int] identifier[readChar] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[Reader] identifier[readEncoding] operator[=] identifier[_readEncoding] operator[SEP] Keyword[if] operator[SEP] identifier[readEncoding] operator[==] Other[null] operator[SEP] Keywor... |
public static String updatePerfLevelSpecString(String oldSpecString, PerfLevelDescriptor[] newPlds, boolean recursive) {
PerfLevelDescriptor[] currentPlds = getPerfLevelSpecsFromString(oldSpecString, false);
if (currentPlds == null)
currentPlds = PmiRegistry.getDefaultPerfLevelSpecs();
... | class class_name[name] begin[{]
method[updatePerfLevelSpecString, return_type[type[String]], modifier[public static], parameter[oldSpecString, newPlds, recursive]] begin[{]
local_variable[type[PerfLevelDescriptor], currentPlds]
if[binary_operation[member[.currentPlds], ==, literal[null]... | Keyword[public] Keyword[static] identifier[String] identifier[updatePerfLevelSpecString] operator[SEP] identifier[String] identifier[oldSpecString] , identifier[PerfLevelDescriptor] operator[SEP] operator[SEP] identifier[newPlds] , Keyword[boolean] identifier[recursive] operator[SEP] {
identifier[PerfLevelDesc... |
public Headers getAllHeaders() {
Headers requestHeaders = getHeaders();
requestHeaders = hasPayload() ? requestHeaders.withContentType(getPayload().get().getMimeType()) : requestHeaders;
//We don't want to add headers more than once.
return requestHeaders;
} | class class_name[name] begin[{]
method[getAllHeaders, return_type[type[Headers]], modifier[public], parameter[]] begin[{]
local_variable[type[Headers], requestHeaders]
assign[member[.requestHeaders], TernaryExpression(condition=MethodInvocation(arguments=[], member=hasPayload, postfix_o... | Keyword[public] identifier[Headers] identifier[getAllHeaders] operator[SEP] operator[SEP] {
identifier[Headers] identifier[requestHeaders] operator[=] identifier[getHeaders] operator[SEP] operator[SEP] operator[SEP] identifier[requestHeaders] operator[=] identifier[hasPayload] operator[SEP] operator[SEP] operato... |
public String getPrimaryAvatarAddress(String address, Stat stat, boolean retry)
throws IOException, KeeperException, InterruptedException {
return getPrimaryAvatarAddress(address, stat, retry, false);
} | class class_name[name] begin[{]
method[getPrimaryAvatarAddress, return_type[type[String]], modifier[public], parameter[address, stat, retry]] begin[{]
return[call[.getPrimaryAvatarAddress, parameter[member[.address], member[.stat], member[.retry], literal[false]]]]
end[}]
END[}] | Keyword[public] identifier[String] identifier[getPrimaryAvatarAddress] operator[SEP] identifier[String] identifier[address] , identifier[Stat] identifier[stat] , Keyword[boolean] identifier[retry] operator[SEP] Keyword[throws] identifier[IOException] , identifier[KeeperException] , identifier[InterruptedException] ... |
private static PharmacophoreQuery processPharmacophoreElement(Element e, HashMap<String, String> global)
throws CDKException {
PharmacophoreQuery ret = new PharmacophoreQuery();
ret.setProperty("description", e.getAttributeValue("description"));
ret.setTitle(e.getAttributeValue("name... | class class_name[name] begin[{]
method[processPharmacophoreElement, return_type[type[PharmacophoreQuery]], modifier[private static], parameter[e, global]] begin[{]
local_variable[type[PharmacophoreQuery], ret]
call[ret.setProperty, parameter[literal["description"], call[e.getAttributeVa... | Keyword[private] Keyword[static] identifier[PharmacophoreQuery] identifier[processPharmacophoreElement] operator[SEP] identifier[Element] identifier[e] , identifier[HashMap] operator[<] identifier[String] , identifier[String] operator[>] identifier[global] operator[SEP] Keyword[throws] identifier[CDKException] {
... |
public static <V, X extends Exception> CheckedFuture<V, X> makeChecked(
ListenableFuture<V> future, Function<? super Exception, X> mapper) {
return new MappingCheckedFuture<V, X>(checkNotNull(future), mapper);
} | class class_name[name] begin[{]
method[makeChecked, return_type[type[CheckedFuture]], modifier[public static], parameter[future, mapper]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=future, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[... | Keyword[public] Keyword[static] operator[<] identifier[V] , identifier[X] Keyword[extends] identifier[Exception] operator[>] identifier[CheckedFuture] operator[<] identifier[V] , identifier[X] operator[>] identifier[makeChecked] operator[SEP] identifier[ListenableFuture] operator[<] identifier[V] operator[>] identifi... |
protected List<ExcelFile> getExcelFiles() {
if (excelFiles == null) {
excelFiles = newArrayListWithCapacity(3);
for (int i = 0;; ++i) {
String baseKey = String.format("dataSource.%s.%d", getName(), i);
String path = configuration.get(baseKey + ".path");
if (path == null) {
break;
... | class class_name[name] begin[{]
method[getExcelFiles, return_type[type[List]], modifier[protected], parameter[]] begin[{]
if[binary_operation[member[.excelFiles], ==, literal[null]]] begin[{]
assign[member[.excelFiles], call[.newArrayListWithCapacity, parameter[literal[3... | Keyword[protected] identifier[List] operator[<] identifier[ExcelFile] operator[>] identifier[getExcelFiles] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[excelFiles] operator[==] Other[null] operator[SEP] {
identifier[excelFiles] operator[=] identifier[newArrayListWithCapacity] op... |
private IndexInfos createIndexInfos(Boolean system, IndexerIoModeHandler modeHandler, QueryHandlerEntry config,
QueryHandler handler) throws RepositoryConfigurationException
{
try
{
// read RSYNC configuration
RSyncConfiguration rSyncConfiguration = new RSyncConfiguration(config);... | class class_name[name] begin[{]
method[createIndexInfos, return_type[type[IndexInfos]], modifier[private], parameter[system, modeHandler, config, handler]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(argum... | Keyword[private] identifier[IndexInfos] identifier[createIndexInfos] operator[SEP] identifier[Boolean] identifier[system] , identifier[IndexerIoModeHandler] identifier[modeHandler] , identifier[QueryHandlerEntry] identifier[config] , identifier[QueryHandler] identifier[handler] operator[SEP] Keyword[throws] identifi... |
public void writeBoolean(boolean value) {
try {
buffer.writeInt(1);
if (value) {
buffer.writeByte(1);
} else {
buffer.writeByte(0);
}
} catch (Exception e) {
throw new BinaryWriteFailedException(e);
}
} | class class_name[name] begin[{]
method[writeBoolean, return_type[void], modifier[public], parameter[value]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=writeInt... | Keyword[public] Keyword[void] identifier[writeBoolean] operator[SEP] Keyword[boolean] identifier[value] operator[SEP] {
Keyword[try] {
identifier[buffer] operator[SEP] identifier[writeInt] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[SEP] {
... |
public static <T> void forEach(Iterator<T> iterator, Consumer<T> consumer) {
int index = 0;
while (iterator.hasNext()) {
consumer.accept(iterator.next(), index);
index++;
}
} | class class_name[name] begin[{]
method[forEach, return_type[void], modifier[public static], parameter[iterator, consumer]] begin[{]
local_variable[type[int], index]
while[call[iterator.hasNext, parameter[]]] begin[{]
call[consumer.accept, parameter[call[iterator.... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] Keyword[void] identifier[forEach] operator[SEP] identifier[Iterator] operator[<] identifier[T] operator[>] identifier[iterator] , identifier[Consumer] operator[<] identifier[T] operator[>] identifier[consumer] operator[SEP] {
Keyword[int] ide... |
public YearWeek plusWeeks(long weeksToAdd) {
if (weeksToAdd == 0) {
return this;
}
LocalDate mondayOfWeek = atDay(DayOfWeek.MONDAY).plusWeeks(weeksToAdd);
return YearWeek.from(mondayOfWeek);
} | class class_name[name] begin[{]
method[plusWeeks, return_type[type[YearWeek]], modifier[public], parameter[weeksToAdd]] begin[{]
if[binary_operation[member[.weeksToAdd], ==, literal[0]]] begin[{]
return[THIS[]]
else begin[{]
None
end[}]
local_variable[type[Lo... | Keyword[public] identifier[YearWeek] identifier[plusWeeks] operator[SEP] Keyword[long] identifier[weeksToAdd] operator[SEP] {
Keyword[if] operator[SEP] identifier[weeksToAdd] operator[==] Other[0] operator[SEP] {
Keyword[return] Keyword[this] operator[SEP]
}
identifier[LocalDate] identif... |
public IXPathToken lookUpTokens(final int paramNext) {
int nextCount = paramNext;
// save current position of the scanner, to restore it later
final int lastPos = mPos;
IXPathToken token = nextToken();
while (--nextCount > 0) {
token = nextToken();
if (... | class class_name[name] begin[{]
method[lookUpTokens, return_type[type[IXPathToken]], modifier[public], parameter[paramNext]] begin[{]
local_variable[type[int], nextCount]
local_variable[type[int], lastPos]
local_variable[type[IXPathToken], token]
while[binary_operation[m... | Keyword[public] identifier[IXPathToken] identifier[lookUpTokens] operator[SEP] Keyword[final] Keyword[int] identifier[paramNext] operator[SEP] {
Keyword[int] identifier[nextCount] operator[=] identifier[paramNext] operator[SEP] Keyword[final] Keyword[int] identifier[lastPos] operator[=] identifier[mPos] operator... |
public static Optional<Class<?>> getClassWithAnnotation(final Class<?> source,
final Class<? extends Annotation> annotationClass) {
Class<?> nextSource = source;
while (nextSource != Object.class) {
if (nextSource.isAnnotationPresent(annotationClass)) {
return Option... | class class_name[name] begin[{]
method[getClassWithAnnotation, return_type[type[Optional]], modifier[public static], parameter[source, annotationClass]] begin[{]
local_variable[type[Class], nextSource]
while[binary_operation[member[.nextSource], !=, ClassReference(postfix_operators=[], ... | Keyword[public] Keyword[static] identifier[Optional] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[getClassWithAnnotation] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[source] , Keyword[final] identifier[Class] operator[<] oper... |
@Override
public UpdateCompanyNetworkConfigurationResult updateCompanyNetworkConfiguration(UpdateCompanyNetworkConfigurationRequest request) {
request = beforeClientExecution(request);
return executeUpdateCompanyNetworkConfiguration(request);
} | class class_name[name] begin[{]
method[updateCompanyNetworkConfiguration, return_type[type[UpdateCompanyNetworkConfigurationResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeUp... | annotation[@] identifier[Override] Keyword[public] identifier[UpdateCompanyNetworkConfigurationResult] identifier[updateCompanyNetworkConfiguration] operator[SEP] identifier[UpdateCompanyNetworkConfigurationRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecut... |
public String updateDocument(String index, Object id, Map params, String refreshOption, Boolean detect_noop, Boolean doc_as_upsert) throws ElasticSearchException{
return updateDocument( index, (String)null, id, params, refreshOption, detect_noop, doc_as_upsert);
} | class class_name[name] begin[{]
method[updateDocument, return_type[type[String]], modifier[public], parameter[index, id, params, refreshOption, detect_noop, doc_as_upsert]] begin[{]
return[call[.updateDocument, parameter[member[.index], Cast(expression=Literal(postfix_operators=[], prefix_operators=[],... | Keyword[public] identifier[String] identifier[updateDocument] operator[SEP] identifier[String] identifier[index] , identifier[Object] identifier[id] , identifier[Map] identifier[params] , identifier[String] identifier[refreshOption] , identifier[Boolean] identifier[detect_noop] , identifier[Boolean] identifier[doc... |
public XmlSchemaAnnotation createLegStarAnnotation(
final XsdDataItem xsdDataItem) {
Document doc = _docBuilder.newDocument();
Element el = doc.createElementNS(getCOXBNamespace(), getCOXBElements());
Element elc = doc.createElementNS(getCOXBNamespace(), getCOXBElement());
e... | class class_name[name] begin[{]
method[createLegStarAnnotation, return_type[type[XmlSchemaAnnotation]], modifier[public], parameter[xsdDataItem]] begin[{]
local_variable[type[Document], doc]
local_variable[type[Element], el]
local_variable[type[Element], elc]
call[elc.se... | Keyword[public] identifier[XmlSchemaAnnotation] identifier[createLegStarAnnotation] operator[SEP] Keyword[final] identifier[XsdDataItem] identifier[xsdDataItem] operator[SEP] {
identifier[Document] identifier[doc] operator[=] identifier[_docBuilder] operator[SEP] identifier[newDocument] operator[SEP] operator[SE... |
public Observable<VirtualMachineScaleSetInner> createOrUpdateAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetInner parameters) {
return createOrUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, parameters).map(new Func1<ServiceResponse<VirtualMachineScaleSetInner>, V... | class class_name[name] begin[{]
method[createOrUpdateAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, vmScaleSetName, parameters]] begin[{]
return[call[.createOrUpdateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.vmScaleSetName], member[.par... | Keyword[public] identifier[Observable] operator[<] identifier[VirtualMachineScaleSetInner] operator[>] identifier[createOrUpdateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[vmScaleSetName] , identifier[VirtualMachineScaleSetInner] identifier[parameters] operato... |
public final EObject ruleXCasePart() throws RecognitionException {
EObject current = null;
Token otherlv_2=null;
Token otherlv_4=null;
Token lv_fallThrough_6_0=null;
EObject lv_typeGuard_1_0 = null;
EObject lv_case_3_0 = null;
EObject lv_then_5_0 = null;
... | class class_name[name] begin[{]
method[ruleXCasePart, return_type[type[EObject]], modifier[final public], parameter[]] begin[{]
local_variable[type[EObject], current]
local_variable[type[Token], otherlv_2]
local_variable[type[Token], otherlv_4]
local_variable[type[Token], lv_fal... | Keyword[public] Keyword[final] identifier[EObject] identifier[ruleXCasePart] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
identifier[EObject] identifier[current] operator[=] Other[null] operator[SEP] identifier[Token] identifier[otherlv_2] operator[=] Other[null] operator[SEP] i... |
public static SubstitutedLine parseOperationRequestLine(String commandLine,
final CommandLineParser.CallbackHandler handler, CommandContext ctx) throws CommandFormatException {
if (commandLine == null) {
return null;
}
final ParsingStateCallbackHandler callbackHandler = g... | class class_name[name] begin[{]
method[parseOperationRequestLine, return_type[type[SubstitutedLine]], modifier[public static], parameter[commandLine, handler, ctx]] begin[{]
if[binary_operation[member[.commandLine], ==, literal[null]]] begin[{]
return[literal[null]]
else beg... | Keyword[public] Keyword[static] identifier[SubstitutedLine] identifier[parseOperationRequestLine] operator[SEP] identifier[String] identifier[commandLine] , Keyword[final] identifier[CommandLineParser] operator[SEP] identifier[CallbackHandler] identifier[handler] , identifier[CommandContext] identifier[ctx] operator[... |
@CallerSensitive
public static java.util.Enumeration<Driver> getDrivers() {
java.util.Vector<Driver> result = new java.util.Vector<Driver>();
ClassLoader callerClassLoader = ClassLoader.getSystemClassLoader();
// Walk through the loaded registeredDrivers.
for(DriverInfo aDriver : r... | class class_name[name] begin[{]
method[getDrivers, return_type[type[java]], modifier[public static], parameter[]] begin[{]
local_variable[type[java], result]
local_variable[type[ClassLoader], callerClassLoader]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(conditi... | annotation[@] identifier[CallerSensitive] Keyword[public] Keyword[static] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Enumeration] operator[<] identifier[Driver] operator[>] identifier[getDrivers] operator[SEP] operator[SEP] {
identifier[java] operator[SEP] identifier[util] operator[... |
public void setAttributes(java.util.Collection<TypedLinkAttributeDefinition> attributes) {
if (attributes == null) {
this.attributes = null;
return;
}
this.attributes = new java.util.ArrayList<TypedLinkAttributeDefinition>(attributes);
} | class class_name[name] begin[{]
method[setAttributes, return_type[void], modifier[public], parameter[attributes]] begin[{]
if[binary_operation[member[.attributes], ==, literal[null]]] begin[{]
assign[THIS[member[None.attributes]], literal[null]]
return[None]
... | Keyword[public] Keyword[void] identifier[setAttributes] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[TypedLinkAttributeDefinition] operator[>] identifier[attributes] operator[SEP] {
Keyword[if] operator[SEP] identifier[attributes] opera... |
public DataLakeStoreAccountInner beginCreate(String resourceGroupName, String accountName, CreateDataLakeStoreAccountParameters parameters) {
return beginCreateWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().single().body();
} | class class_name[name] begin[{]
method[beginCreate, return_type[type[DataLakeStoreAccountInner]], modifier[public], parameter[resourceGroupName, accountName, parameters]] begin[{]
return[call[.beginCreateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.accountName], member[.param... | Keyword[public] identifier[DataLakeStoreAccountInner] identifier[beginCreate] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[accountName] , identifier[CreateDataLakeStoreAccountParameters] identifier[parameters] operator[SEP] {
Keyword[return] identifier[beginCre... |
@Override
public void put(double val) {
if(n <= 0) {
n = 1;
sum = val;
m2 = 0;
return;
}
final double tmp = n * val - sum;
final double oldn = n; // tmp copy
n += 1.0;
sum += val;
m2 += tmp * tmp / (n * oldn);
} | class class_name[name] begin[{]
method[put, return_type[void], modifier[public], parameter[val]] begin[{]
if[binary_operation[member[.n], <=, literal[0]]] begin[{]
assign[member[.n], literal[1]]
assign[member[.sum], member[.val]]
... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[put] operator[SEP] Keyword[double] identifier[val] operator[SEP] {
Keyword[if] operator[SEP] identifier[n] operator[<=] Other[0] operator[SEP] {
identifier[n] operator[=] Other[1] operator[SEP] identifier[sum] operator[=] iden... |
@Override
public String[] getCacheStatisticNames(String cacheInstance) throws AttributeNotFoundException {
DCache cache = getCache(cacheInstance);
return getCacheStatisticNames(cache);
} | class class_name[name] begin[{]
method[getCacheStatisticNames, return_type[type[String]], modifier[public], parameter[cacheInstance]] begin[{]
local_variable[type[DCache], cache]
return[call[.getCacheStatisticNames, parameter[member[.cache]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[String] operator[SEP] operator[SEP] identifier[getCacheStatisticNames] operator[SEP] identifier[String] identifier[cacheInstance] operator[SEP] Keyword[throws] identifier[AttributeNotFoundException] {
identifier[DCache] identifier[cache] operator[=] i... |
public void add(String name, String... values) {
if (containsKey(name)) {
List<String> list = get(name);
for (String value: values) {
list.add(value);
}
} else {
put(name, values);
}
} | class class_name[name] begin[{]
method[add, return_type[void], modifier[public], parameter[name, values]] begin[{]
if[call[.containsKey, parameter[member[.name]]]] begin[{]
local_variable[type[List], list]
ForStatement(body=BlockStatement(label=None, statements=[Statemen... | Keyword[public] Keyword[void] identifier[add] operator[SEP] identifier[String] identifier[name] , identifier[String] operator[...] identifier[values] operator[SEP] {
Keyword[if] operator[SEP] identifier[containsKey] operator[SEP] identifier[name] operator[SEP] operator[SEP] {
identifier[List] operato... |
public final Flux<Flux<T>> window(Duration windowingTimespan, Scheduler timer) {
return window(interval(windowingTimespan, timer));
} | class class_name[name] begin[{]
method[window, return_type[type[Flux]], modifier[final public], parameter[windowingTimespan, timer]] begin[{]
return[call[.window, parameter[call[.interval, parameter[member[.windowingTimespan], member[.timer]]]]]]
end[}]
END[}] | Keyword[public] Keyword[final] identifier[Flux] operator[<] identifier[Flux] operator[<] identifier[T] operator[>] operator[>] identifier[window] operator[SEP] identifier[Duration] identifier[windowingTimespan] , identifier[Scheduler] identifier[timer] operator[SEP] {
Keyword[return] identifier[window] operator... |
public String scanLastNWSDouble() {
int off = -1;
while ( Character.isWhitespace(ch(off)) && off + index >= 0 )
{
off--;
}
return ""+ch(off)+ch(off-1);
} | class class_name[name] begin[{]
method[scanLastNWSDouble, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[int], off]
while[binary_operation[call[Character.isWhitespace, parameter[call[.ch, parameter[member[.off]]]]], &&, binary_operation[binary_ope... | Keyword[public] identifier[String] identifier[scanLastNWSDouble] operator[SEP] operator[SEP] {
Keyword[int] identifier[off] operator[=] operator[-] Other[1] operator[SEP] Keyword[while] operator[SEP] identifier[Character] operator[SEP] identifier[isWhitespace] operator[SEP] identifier[ch] operator[SEP] identifie... |
public final ProtocolType getGuaranteedProtocolType() {
Byte value = (Byte)jmo.getField(ControlAccess.PROTOCOLTYPE);
return ProtocolType.getProtocolType(value);
} | class class_name[name] begin[{]
method[getGuaranteedProtocolType, return_type[type[ProtocolType]], modifier[final public], parameter[]] begin[{]
local_variable[type[Byte], value]
return[call[ProtocolType.getProtocolType, parameter[member[.value]]]]
end[}]
END[}] | Keyword[public] Keyword[final] identifier[ProtocolType] identifier[getGuaranteedProtocolType] operator[SEP] operator[SEP] {
identifier[Byte] identifier[value] operator[=] operator[SEP] identifier[Byte] operator[SEP] identifier[jmo] operator[SEP] identifier[getField] operator[SEP] identifier[ControlAccess] operat... |
@Override
public void close(IAsyncResultHandler<Void> result) {
vertx.executeBlocking(blocking -> {
super.close(result);
}, res -> {
if (res.failed())
result.handle(AsyncResultImpl.create(res.cause()));
});
} | class class_name[name] begin[{]
method[close, return_type[void], modifier[public], parameter[result]] begin[{]
call[vertx.executeBlocking, parameter[LambdaExpression(body=[StatementExpression(expression=SuperMethodInvocation(arguments=[MemberReference(member=result, postfix_operators=[], prefix... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[close] operator[SEP] identifier[IAsyncResultHandler] operator[<] identifier[Void] operator[>] identifier[result] operator[SEP] {
identifier[vertx] operator[SEP] identifier[executeBlocking] operator[SEP] identifier[blocking] operator[->] ... |
public Duration<IsoUnit> getNominalDuration(
Timezone tz,
IsoUnit... units
) {
return this.toZonalInterval(tz.getID()).getDuration(tz, units);
} | class class_name[name] begin[{]
method[getNominalDuration, return_type[type[Duration]], modifier[public], parameter[tz, units]] begin[{]
return[THIS[call[None.toZonalInterval, parameter[call[tz.getID, parameter[]]]]call[None.getDuration, parameter[member[.tz], member[.units]]]]]
end[}]
END[}] | Keyword[public] identifier[Duration] operator[<] identifier[IsoUnit] operator[>] identifier[getNominalDuration] operator[SEP] identifier[Timezone] identifier[tz] , identifier[IsoUnit] operator[...] identifier[units] operator[SEP] {
Keyword[return] Keyword[this] operator[SEP] identifier[toZonalInterval] operator... |
private String metadataValueOf(String value) {
if (value == null || value.trim().isEmpty())
return null;
return value;
} | class class_name[name] begin[{]
method[metadataValueOf, return_type[type[String]], modifier[private], parameter[value]] begin[{]
if[binary_operation[binary_operation[member[.value], ==, literal[null]], ||, call[value.trim, parameter[]]]] begin[{]
return[literal[null]]
else begin[{]
None... | Keyword[private] identifier[String] identifier[metadataValueOf] operator[SEP] identifier[String] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[||] identifier[value] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifie... |
public Bitmap approximateTileFromLowerZoom(final long pMapTileIndex) {
for (int zoomDiff = 1; MapTileIndex.getZoom(pMapTileIndex) - zoomDiff >= OpenStreetMapTileProviderConstants.MINIMUM_ZOOMLEVEL ; zoomDiff ++) {
final Bitmap bitmap = approximateTileFromLowerZoom(pMapTileIndex, zoomDiff);
... | class class_name[name] begin[{]
method[approximateTileFromLowerZoom, return_type[type[Bitmap]], modifier[public], parameter[pMapTileIndex]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializ... | Keyword[public] identifier[Bitmap] identifier[approximateTileFromLowerZoom] operator[SEP] Keyword[final] Keyword[long] identifier[pMapTileIndex] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[zoomDiff] operator[=] Other[1] operator[SEP] identifier[MapTileIndex] operator[SEP] identifier[getZoo... |
public final void doCaptcha(StaplerRequest req, StaplerResponse rsp) throws IOException {
if (captchaSupport != null) {
String id = req.getSession().getId();
rsp.setContentType("image/png");
// source: https://stackoverflow.com/a/3414217
rsp.setHeader("Cache-Contr... | class class_name[name] begin[{]
method[doCaptcha, return_type[void], modifier[final public], parameter[req, rsp]] begin[{]
if[binary_operation[member[.captchaSupport], !=, literal[null]]] begin[{]
local_variable[type[String], id]
call[rsp.setContentType, para... | Keyword[public] Keyword[final] Keyword[void] identifier[doCaptcha] operator[SEP] identifier[StaplerRequest] identifier[req] , identifier[StaplerResponse] identifier[rsp] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[captchaSupport] operator[!=] Other[null] operator... |
public static long offset(long[] strides, long[] offsets) {
int ret = 0;
if (ArrayUtil.prod(offsets) == 1) {
for (int i = 0; i < offsets.length; i++) {
ret += offsets[i] * strides[i];
}
} else {
for (int i = 0; i < offsets.length; i++) {
... | class class_name[name] begin[{]
method[offset, return_type[type[long]], modifier[public static], parameter[strides, offsets]] begin[{]
local_variable[type[int], ret]
if[binary_operation[call[ArrayUtil.prod, parameter[member[.offsets]]], ==, literal[1]]] begin[{]
ForStatement... | Keyword[public] Keyword[static] Keyword[long] identifier[offset] operator[SEP] Keyword[long] operator[SEP] operator[SEP] identifier[strides] , Keyword[long] operator[SEP] operator[SEP] identifier[offsets] operator[SEP] {
Keyword[int] identifier[ret] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] i... |
public <T> T runUnchecked(Retryable<T> operation) throws RuntimeException
{
try
{
return run(operation);
}
catch (RuntimeException e)
{
throw e;
}
catch (Exception e)
{
throw new RuntimeException("Retryable " + operation + " failed: " + e.getMessage(), e);
}
} | class class_name[name] begin[{]
method[runUnchecked, return_type[type[T]], modifier[public], parameter[operation]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=operation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])],... | Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[runUnchecked] operator[SEP] identifier[Retryable] operator[<] identifier[T] operator[>] identifier[operation] operator[SEP] Keyword[throws] identifier[RuntimeException] {
Keyword[try] {
Keyword[return] identifier[run] opera... |
protected boolean isAccepted(Class<?> type) {
if (getReflectionUtil().isMarkerInterface(type)) {
return false;
}
if (type == Comparable.class) {
return false;
}
return true;
} | class class_name[name] begin[{]
method[isAccepted, return_type[type[boolean]], modifier[protected], parameter[type]] begin[{]
if[call[.getReflectionUtil, parameter[]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
if[binary_operation[membe... | Keyword[protected] Keyword[boolean] identifier[isAccepted] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[type] operator[SEP] {
Keyword[if] operator[SEP] identifier[getReflectionUtil] operator[SEP] operator[SEP] operator[SEP] identifier[isMarkerInterface] operator[SEP] identifier[... |
public boolean repeatsMonthlyOnDayCount() {
if (this.freq != MONTHLY) {
return false;
}
if (bydayCount != 1 || bymonthdayCount != 0) {
return false;
}
if (bydayNum[0] <= 0) {
return false;
}
return true;
} | class class_name[name] begin[{]
method[repeatsMonthlyOnDayCount, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
if[binary_operation[THIS[member[None.freq]], !=, member[.MONTHLY]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[boolean] identifier[repeatsMonthlyOnDayCount] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[freq] operator[!=] identifier[MONTHLY] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
Keyword[if] operato... |
public final HndlI18nRequest lazyGetHndlI18nRequest() throws Exception {
String beanName = getHndlI18nRequestName();
HndlI18nRequest hndlI18nRequest = (HndlI18nRequest)
this.beansMap.get(beanName);
if (hndlI18nRequest == null) {
hndlI18nRequest = new HndlI18nRequest();
hndlI18nRequest.setL... | class class_name[name] begin[{]
method[lazyGetHndlI18nRequest, return_type[type[HndlI18nRequest]], modifier[final public], parameter[]] begin[{]
local_variable[type[String], beanName]
local_variable[type[HndlI18nRequest], hndlI18nRequest]
if[binary_operation[member[.hndlI18nRequ... | Keyword[public] Keyword[final] identifier[HndlI18nRequest] identifier[lazyGetHndlI18nRequest] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[String] identifier[beanName] operator[=] identifier[getHndlI18nRequestName] operator[SEP] operator[SEP] operator[SEP] identifier[HndlI18nReq... |
public static double cdf(double val, double k, double theta) {
if(val < 0) {
return 0.;
}
final double vt = val * theta;
return (vt == Double.POSITIVE_INFINITY) ? 1. : regularizedGammaP(k, vt);
} | class class_name[name] begin[{]
method[cdf, return_type[type[double]], modifier[public static], parameter[val, k, theta]] begin[{]
if[binary_operation[member[.val], <, literal[0]]] begin[{]
return[literal[0.]]
else begin[{]
None
end[}]
local_variable[type[dou... | Keyword[public] Keyword[static] Keyword[double] identifier[cdf] operator[SEP] Keyword[double] identifier[val] , Keyword[double] identifier[k] , Keyword[double] identifier[theta] operator[SEP] {
Keyword[if] operator[SEP] identifier[val] operator[<] Other[0] operator[SEP] {
Keyword[return] literal[Flo... |
public static FrameworkFactory getFrameworkFactory(ClassLoader loader) {
FrameworkFactory factory = null;
Class<?> factoryClass = null;
final String factoryResource = "META-INF/services/org.osgi.framework.launch.FrameworkFactory";
java.io.InputStream inputstream = loader.getResourceAsS... | class class_name[name] begin[{]
method[getFrameworkFactory, return_type[type[FrameworkFactory]], modifier[public static], parameter[loader]] begin[{]
local_variable[type[FrameworkFactory], factory]
local_variable[type[Class], factoryClass]
local_variable[type[String], factoryResource]
... | Keyword[public] Keyword[static] identifier[FrameworkFactory] identifier[getFrameworkFactory] operator[SEP] identifier[ClassLoader] identifier[loader] operator[SEP] {
identifier[FrameworkFactory] identifier[factory] operator[=] Other[null] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identi... |
private void checkIndices(int... indices) {
if (indices.length != dims.length) {
throw new IllegalArgumentException(String.format(
"Indices array is not the correct length. expected=%d actual=%d",
indices.length, dims.length));
}
for (int i=0;... | class class_name[name] begin[{]
method[checkIndices, return_type[void], modifier[private], parameter[indices]] begin[{]
if[binary_operation[member[indices.length], !=, member[dims.length]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Litera... | Keyword[private] Keyword[void] identifier[checkIndices] operator[SEP] Keyword[int] operator[...] identifier[indices] operator[SEP] {
Keyword[if] operator[SEP] identifier[indices] operator[SEP] identifier[length] operator[!=] identifier[dims] operator[SEP] identifier[length] operator[SEP] {
Keyword[thr... |
@Override
public GetFaceSearchResult getFaceSearch(GetFaceSearchRequest request) {
request = beforeClientExecution(request);
return executeGetFaceSearch(request);
} | class class_name[name] begin[{]
method[getFaceSearch, return_type[type[GetFaceSearchResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeGetFaceSearch, parameter[member[.request]]... | annotation[@] identifier[Override] Keyword[public] identifier[GetFaceSearchResult] identifier[getFaceSearch] operator[SEP] identifier[GetFaceSearchRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operato... |
@Override
public Collection<SegmentProperties> getActiveSegments() {
ensureRunning();
logRequest("getActiveSegments");
// To reduce locking in the metadata, we first get the list of Segment Ids, then we fetch their metadata
// one by one. This only locks the metadata on the first ca... | class class_name[name] begin[{]
method[getActiveSegments, return_type[type[Collection]], modifier[public], parameter[]] begin[{]
call[.ensureRunning, parameter[]]
call[.logRequest, parameter[literal["getActiveSegments"]]]
return[THIS[member[None.metadata]call[None.getAll... | annotation[@] identifier[Override] Keyword[public] identifier[Collection] operator[<] identifier[SegmentProperties] operator[>] identifier[getActiveSegments] operator[SEP] operator[SEP] {
identifier[ensureRunning] operator[SEP] operator[SEP] operator[SEP] identifier[logRequest] operator[SEP] literal[String] oper... |
public static String toHexString( int val, int size ) {
char[] c = new char[size];
toHexChars( val, c, 0, size );
return new String( c );
} | class class_name[name] begin[{]
method[toHexString, return_type[type[String]], modifier[public static], parameter[val, size]] begin[{]
local_variable[type[char], c]
call[.toHexChars, parameter[member[.val], member[.c], literal[0], member[.size]]]
return[ClassCreator(arguments=[M... | Keyword[public] Keyword[static] identifier[String] identifier[toHexString] operator[SEP] Keyword[int] identifier[val] , Keyword[int] identifier[size] operator[SEP] {
Keyword[char] operator[SEP] operator[SEP] identifier[c] operator[=] Keyword[new] Keyword[char] operator[SEP] identifier[size] operator[SEP] operat... |
public final Point2D toXY(final double LAT, final double LON) {
final double LATITUDE = (LAT * (-1)) + 90.0;
final double LONGITUDE = LON + 180.0;
final double X = Math.round(LONGITUDE * (WORLD_MAP.getWidth() / 360));
final double Y = Math.round(LATITUDE * (WORLD_MAP.getHeight() / 180))... | class class_name[name] begin[{]
method[toXY, return_type[type[Point2D]], modifier[final public], parameter[LAT, LON]] begin[{]
local_variable[type[double], LATITUDE]
local_variable[type[double], LONGITUDE]
local_variable[type[double], X]
local_variable[type[double], Y]
r... | Keyword[public] Keyword[final] identifier[Point2D] identifier[toXY] operator[SEP] Keyword[final] Keyword[double] identifier[LAT] , Keyword[final] Keyword[double] identifier[LON] operator[SEP] {
Keyword[final] Keyword[double] identifier[LATITUDE] operator[=] operator[SEP] identifier[LAT] operator[*] operator[SEP... |
@Override
public void validate() {
boolean valid = true;
if (hasValue()) {
Long value = getValue();
if (value != null) {
// scrub the value to format properly
setText(value2text(value));
}
else {
// empty... | class class_name[name] begin[{]
method[validate, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[boolean], valid]
if[call[.hasValue, parameter[]]] begin[{]
local_variable[type[Long], value]
if[binary_operation[member[.va... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[validate] operator[SEP] operator[SEP] {
Keyword[boolean] identifier[valid] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[hasValue] operator[SEP] operator[SEP] operator[SEP] {
identifier[Long] ... |
@Override
public void eUnset(int featureID) {
switch (featureID) {
case AfplibPackage.MMDRG__RG_LENGTH:
setRGLength(RG_LENGTH_EDEFAULT);
return;
case AfplibPackage.MMDRG__TRIPLETS:
getTriplets().clear();
return;
}
super.eUnset(featureID);
} | class class_name[name] begin[{]
method[eUnset, return_type[void], modifier[public], parameter[featureID]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=MMDRG__RG_LENGTH, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[St... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[eUnset] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] {
Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] {
Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[MMDRG__RG_LENGTH] op... |
private Comparable<?> getValue(String value, int type)
{
switch (type)
{
case PropertyType.BOOLEAN :
return ComparableBoolean.valueOf(Boolean.valueOf(value).booleanValue());
case PropertyType.DATE :
return new Long(DateField.stringToTime(value));
case P... | class class_name[name] begin[{]
method[getValue, return_type[type[Comparable]], modifier[private], parameter[value, type]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=BOOLEAN, postfix_operators=[], prefix_operators=[], qualifier=PropertyType, selectors=[])], stateme... | Keyword[private] identifier[Comparable] operator[<] operator[?] operator[>] identifier[getValue] operator[SEP] identifier[String] identifier[value] , Keyword[int] identifier[type] operator[SEP] {
Keyword[switch] operator[SEP] identifier[type] operator[SEP] {
Keyword[case] identifier[PropertyType] ope... |
private void saveLocalization() {
SortedProperties localization = new SortedProperties();
for (Object itemId : m_container.getItemIds()) {
Item item = m_container.getItem(itemId);
String key = item.getItemProperty(TableProperty.KEY).getValue().toString();
String valu... | class class_name[name] begin[{]
method[saveLocalization, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[SortedProperties], localization]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclar... | Keyword[private] Keyword[void] identifier[saveLocalization] operator[SEP] operator[SEP] {
identifier[SortedProperties] identifier[localization] operator[=] Keyword[new] identifier[SortedProperties] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Object] identifier[itemId] operator... |
protected final Property parseVendorExtension( String vendorExtension ) {
if (vendorExtension == null) return null;
// Remove the curly braces ...
String extension = vendorExtension.replaceFirst("^[{]", "").replaceAll("[}]$", "");
if (extension.trim().length() == 0) return null;
... | class class_name[name] begin[{]
method[parseVendorExtension, return_type[type[Property]], modifier[final protected], parameter[vendorExtension]] begin[{]
if[binary_operation[member[.vendorExtension], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
... | Keyword[protected] Keyword[final] identifier[Property] identifier[parseVendorExtension] operator[SEP] identifier[String] identifier[vendorExtension] operator[SEP] {
Keyword[if] operator[SEP] identifier[vendorExtension] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] identifier[St... |
public static DoubleMatrix symmetricEigenvalues(DoubleMatrix A) {
A.assertSquare();
DoubleMatrix eigenvalues = new DoubleMatrix(A.rows);
int isuppz[] = new int[2 * A.rows];
SimpleBlas.syevr('N', 'A', 'U', A.dup(), 0, 0, 0, 0, 0, eigenvalues, dummyDouble, isuppz);
return eigenvalu... | class class_name[name] begin[{]
method[symmetricEigenvalues, return_type[type[DoubleMatrix]], modifier[public static], parameter[A]] begin[{]
call[A.assertSquare, parameter[]]
local_variable[type[DoubleMatrix], eigenvalues]
local_variable[type[int], isuppz]
call[... | Keyword[public] Keyword[static] identifier[DoubleMatrix] identifier[symmetricEigenvalues] operator[SEP] identifier[DoubleMatrix] identifier[A] operator[SEP] {
identifier[A] operator[SEP] identifier[assertSquare] operator[SEP] operator[SEP] operator[SEP] identifier[DoubleMatrix] identifier[eigenvalues] operator[=... |
private static List<Term> expandDontCares(int ord, List<Term> in) {
Set<Integer> termInts = new HashSet<Integer>();
for (Term term : in) {
addExpandTerm(0, ord, 0, term, termInts);
}
// Now convert the termInts to Terms
List<Term> result = new ArrayList<Term>(termInts.size());
for (Integer termInt... | class class_name[name] begin[{]
method[expandDontCares, return_type[type[List]], modifier[private static], parameter[ord, in]] begin[{]
local_variable[type[Set], termInts]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal... | Keyword[private] Keyword[static] identifier[List] operator[<] identifier[Term] operator[>] identifier[expandDontCares] operator[SEP] Keyword[int] identifier[ord] , identifier[List] operator[<] identifier[Term] operator[>] identifier[in] operator[SEP] {
identifier[Set] operator[<] identifier[Integer] operator[>]... |
@Override
public List<Person> findByQuery(String query) {
//@formatter:off
String queryStr = '%' + query.toLowerCase() + '%';
String jpaQuery = "select e from Person e "
+ " where lower(e.firstname) like :query"
+ " or lower(e.lastname) like :query"
... | class class_name[name] begin[{]
method[findByQuery, return_type[type[List]], modifier[public], parameter[query]] begin[{]
local_variable[type[String], queryStr]
local_variable[type[String], jpaQuery]
return[call[entityManager.createQuery, parameter[member[.jpaQuery], ClassReference(post... | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[Person] operator[>] identifier[findByQuery] operator[SEP] identifier[String] identifier[query] operator[SEP] {
identifier[String] identifier[queryStr] operator[=] literal[String] operator[+] identifier[query] operator[SEP]... |
public void loadMehtodAnnotations(Class cclass, ContainerWrapper containerWrapper) {
try {
for (Method method : ClassUtil.getAllDecaredMethods(cclass)) {
if (method.isAnnotationPresent(OnCommand.class)) {
addConsumerMethod(method, cclass, containerWrapper);
}
}
} catch (Exception e) {
... | class class_name[name] begin[{]
method[loadMehtodAnnotations, return_type[void], modifier[public], parameter[cclass, containerWrapper]] begin[{]
TryStatement(block=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[ClassReference(postfix_operator... | Keyword[public] Keyword[void] identifier[loadMehtodAnnotations] operator[SEP] identifier[Class] identifier[cclass] , identifier[ContainerWrapper] identifier[containerWrapper] operator[SEP] {
Keyword[try] {
Keyword[for] operator[SEP] identifier[Method] identifier[method] operator[:] identifier[ClassU... |
private static final String getKey(ObjectNode node) {
JsonNode apiVersion = node.get(API_VERSION);
JsonNode kind = node.get(KIND);
return getKey(apiVersion != null ? apiVersion.textValue() : null,
kind != null ? kind.textValue() : null);
} | class class_name[name] begin[{]
method[getKey, return_type[type[String]], modifier[final private static], parameter[node]] begin[{]
local_variable[type[JsonNode], apiVersion]
local_variable[type[JsonNode], kind]
return[call[.getKey, parameter[TernaryExpression(condition=BinaryOperation(... | Keyword[private] Keyword[static] Keyword[final] identifier[String] identifier[getKey] operator[SEP] identifier[ObjectNode] identifier[node] operator[SEP] {
identifier[JsonNode] identifier[apiVersion] operator[=] identifier[node] operator[SEP] identifier[get] operator[SEP] identifier[API_VERSION] operator[SEP] op... |
protected <T extends XmlFieldInstance> String measureWithGenerics(String jsonRecord)
throws InvalidJsonException {
changed();
// JsonPathCache<T> cache = new JsonPathCache<>(jsonRecord);
cache = new JsonPathCache<>(jsonRecord);
List<String> items = new ArrayList<>();
for (Calculator calculat... | class class_name[name] begin[{]
method[measureWithGenerics, return_type[type[String]], modifier[protected], parameter[jsonRecord]] begin[{]
call[.changed, parameter[]]
assign[member[.cache], ClassCreator(arguments=[MemberReference(member=jsonRecord, postfix_operators=[], prefix_... | Keyword[protected] operator[<] identifier[T] Keyword[extends] identifier[XmlFieldInstance] operator[>] identifier[String] identifier[measureWithGenerics] operator[SEP] identifier[String] identifier[jsonRecord] operator[SEP] Keyword[throws] identifier[InvalidJsonException] {
identifier[changed] operator[SEP] oper... |
protected void stopResetExpiredJobsThread() {
if (resetExpiredJobThread != null) {
try {
resetExpiredJobThread.join();
} catch (InterruptedException e) {
log.warn("Interrupted while waiting for the reset expired jobs thread to terminate", e);
}
resetExpiredJobThread = null... | class class_name[name] begin[{]
method[stopResetExpiredJobsThread, return_type[void], modifier[protected], parameter[]] begin[{]
if[binary_operation[member[.resetExpiredJobThread], !=, literal[null]]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(argum... | Keyword[protected] Keyword[void] identifier[stopResetExpiredJobsThread] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[resetExpiredJobThread] operator[!=] Other[null] operator[SEP] {
Keyword[try] {
identifier[resetExpiredJobThread] operator[SEP] identifier[join] oper... |
static Optional<AnnotationTree> findAnnotation(String annotationName, ClassTree classTree) {
for (AnnotationTree annotationTree : classTree.getModifiers().getAnnotations()) {
ClassSymbol annotationClass = (ClassSymbol) getSymbol(annotationTree.getAnnotationType());
if (annotationClass.fullname.contentEq... | class class_name[name] begin[{]
method[findAnnotation, return_type[type[Optional]], modifier[static], parameter[annotationName, classTree]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializ... | Keyword[static] identifier[Optional] operator[<] identifier[AnnotationTree] operator[>] identifier[findAnnotation] operator[SEP] identifier[String] identifier[annotationName] , identifier[ClassTree] identifier[classTree] operator[SEP] {
Keyword[for] operator[SEP] identifier[AnnotationTree] identifier[annotation... |
private void outputReportFiles(List<String> reportNames, File reportDirectory, TestResult testResult,
boolean tranSummary) throws IOException {
if (reportNames.isEmpty()) {
return;
}
String title = (tranSummary) ? "Transaction Summary" : "Performan... | class class_name[name] begin[{]
method[outputReportFiles, return_type[void], modifier[private], parameter[reportNames, reportDirectory, testResult, tranSummary]] begin[{]
if[call[reportNames.isEmpty, parameter[]]] begin[{]
return[None]
else begin[{]
None
end[}]
... | Keyword[private] Keyword[void] identifier[outputReportFiles] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[reportNames] , identifier[File] identifier[reportDirectory] , identifier[TestResult] identifier[testResult] , Keyword[boolean] identifier[tranSummary] operator[SEP] Keywor... |
public static RuntimeException closeAndRethrow(Closer closer, Throwable t) throws IOException {
try {
throw closer.rethrow(t);
} finally {
closer.close();
}
} | class class_name[name] begin[{]
method[closeAndRethrow, return_type[type[RuntimeException]], modifier[public static], parameter[closer, t]] begin[{]
TryStatement(block=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=,... | Keyword[public] Keyword[static] identifier[RuntimeException] identifier[closeAndRethrow] operator[SEP] identifier[Closer] identifier[closer] , identifier[Throwable] identifier[t] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[try] {
Keyword[throw] identifier[closer] operator[SEP] ide... |
public void setHtmlElementId(String id) {
htmlElementId = id;
mapWidget.setHtmlElement(DOM.getElementById(id));
mapWidget.draw();
} | class class_name[name] begin[{]
method[setHtmlElementId, return_type[void], modifier[public], parameter[id]] begin[{]
assign[member[.htmlElementId], member[.id]]
call[mapWidget.setHtmlElement, parameter[call[DOM.getElementById, parameter[member[.id]]]]]
call[mapW... | Keyword[public] Keyword[void] identifier[setHtmlElementId] operator[SEP] identifier[String] identifier[id] operator[SEP] {
identifier[htmlElementId] operator[=] identifier[id] operator[SEP] identifier[mapWidget] operator[SEP] identifier[setHtmlElement] operator[SEP] identifier[DOM] operator[SEP] identifier[getEl... |
public JobInner get(String resourceGroupName, String automationAccountName, UUID jobId) {
return getWithServiceResponseAsync(resourceGroupName, automationAccountName, jobId).toBlocking().single().body();
} | class class_name[name] begin[{]
method[get, return_type[type[JobInner]], modifier[public], parameter[resourceGroupName, automationAccountName, jobId]] begin[{]
return[call[.getWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.automationAccountName], member[.jobId]]]]
end[}]
EN... | Keyword[public] identifier[JobInner] identifier[get] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[automationAccountName] , identifier[UUID] identifier[jobId] operator[SEP] {
Keyword[return] identifier[getWithServiceResponseAsync] operator[SEP] identifier[resour... |
public void fill(int minX, int minY, int maxX, int maxY, IntBiPredicate isInside, int replacement)
{
fill(minX, minY, maxX, maxY, isInside, (x,y)->replacement);
} | class class_name[name] begin[{]
method[fill, return_type[void], modifier[public], parameter[minX, minY, maxX, maxY, isInside, replacement]] begin[{]
call[.fill, parameter[member[.minX], member[.minY], member[.maxX], member[.maxY], member[.isInside], LambdaExpression(body=MemberReference(member=... | Keyword[public] Keyword[void] identifier[fill] operator[SEP] Keyword[int] identifier[minX] , Keyword[int] identifier[minY] , Keyword[int] identifier[maxX] , Keyword[int] identifier[maxY] , identifier[IntBiPredicate] identifier[isInside] , Keyword[int] identifier[replacement] operator[SEP] {
identifier[fill]... |
@SuppressWarnings("MethodMayBeStatic")
public NerResultSet process(final String _text) {
// tokenization
final List<List<Token>> tokens = TOKENIZER.process(_text);
// extract name phrase:
final List<List<Phrase>> phrases = new ArrayList<>();
for (final List<Token> tokenList ... | class class_name[name] begin[{]
method[process, return_type[type[NerResultSet]], modifier[public], parameter[_text]] begin[{]
local_variable[type[List], tokens]
local_variable[type[List], phrases]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotati... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[NerResultSet] identifier[process] operator[SEP] Keyword[final] identifier[String] identifier[_text] operator[SEP] {
Keyword[final] identifier[List] operator[<] identifier[List] operator[<] identifier... |
public boolean hasPermission(final Team team, String permissionName) {
final Query query = pm.newQuery(Permission.class, "name == :permissionName && teams.contains(:team)");
query.setResult("count(id)");
return (Long) query.execute(permissionName, team) > 0;
} | class class_name[name] begin[{]
method[hasPermission, return_type[type[boolean]], modifier[public], parameter[team, permissionName]] begin[{]
local_variable[type[Query], query]
call[query.setResult, parameter[literal["count(id)"]]]
return[binary_operation[Cast(expression=MethodI... | Keyword[public] Keyword[boolean] identifier[hasPermission] operator[SEP] Keyword[final] identifier[Team] identifier[team] , identifier[String] identifier[permissionName] operator[SEP] {
Keyword[final] identifier[Query] identifier[query] operator[=] identifier[pm] operator[SEP] identifier[newQuery] operator[SEP]... |
private boolean enableNotifyForChar(BluetoothGattCharacteristic characteristic) {
boolean success = true;
// Enable notifications/indications for this characteristic
boolean successEnable = mGattClient.setCharacteristicNotification(characteristic, true);
if (successEnable) {
... | class class_name[name] begin[{]
method[enableNotifyForChar, return_type[type[boolean]], modifier[private], parameter[characteristic]] begin[{]
local_variable[type[boolean], success]
local_variable[type[boolean], successEnable]
if[member[.successEnable]] begin[{]
... | Keyword[private] Keyword[boolean] identifier[enableNotifyForChar] operator[SEP] identifier[BluetoothGattCharacteristic] identifier[characteristic] operator[SEP] {
Keyword[boolean] identifier[success] operator[=] literal[boolean] operator[SEP] Keyword[boolean] identifier[successEnable] operator[=] identifier[mGat... |
@Override
public boolean acquireReadLock(String filename) {
FileReadLockKey readLockKey = new FileReadLockKey(indexName, filename, affinitySegmentId);
Integer lockValue = locksCache.get(readLockKey);
boolean done = false;
while (done == false) {
if (lockValue != null) {
i... | class class_name[name] begin[{]
method[acquireReadLock, return_type[type[boolean]], modifier[public], parameter[filename]] begin[{]
local_variable[type[FileReadLockKey], readLockKey]
local_variable[type[Integer], lockValue]
local_variable[type[boolean], done]
while[binar... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[acquireReadLock] operator[SEP] identifier[String] identifier[filename] operator[SEP] {
identifier[FileReadLockKey] identifier[readLockKey] operator[=] Keyword[new] identifier[FileReadLockKey] operator[SEP] identifier[indexName] , ide... |
@Override
public boolean hasMembersToDocument() {
if (utils.isAnnotationType(typeElement)) {
return !utils.getAnnotationMethods(typeElement).isEmpty();
}
for (VisibleMemberMap.Kind kind : VisibleMemberMap.Kind.values()) {
VisibleMemberMap members = getVisibleMemberMap... | class class_name[name] begin[{]
method[hasMembersToDocument, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
if[call[utils.isAnnotationType, parameter[member[.typeElement]]]] begin[{]
return[call[utils.getAnnotationMethods, parameter[member[.typeElement]]]]
... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[hasMembersToDocument] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[utils] operator[SEP] identifier[isAnnotationType] operator[SEP] identifier[typeElement] operator[SEP] operator[SEP] {
Keyword[return] ... |
@SuppressWarnings("unchecked")
public List<Team> getTeams() {
pm.getFetchPlan().addGroup(Team.FetchGroup.ALL.name());
final Query query = pm.newQuery(Team.class);
query.setOrdering("name asc");
return (List<Team>) query.execute();
} | class class_name[name] begin[{]
method[getTeams, return_type[type[List]], modifier[public], parameter[]] begin[{]
call[pm.getFetchPlan, parameter[]]
local_variable[type[Query], query]
call[query.setOrdering, parameter[literal["name asc"]]]
return[Cast(expression=... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[List] operator[<] identifier[Team] operator[>] identifier[getTeams] operator[SEP] operator[SEP] {
identifier[pm] operator[SEP] identifier[getFetchPlan] operator[SEP] operator[SEP] operator[SEP] ident... |
public final void queue(BatchRequest batchRequest, BatchCallback<T, Void> callback)
throws IOException {
super.queue(batchRequest, Void.class, callback);
} | class class_name[name] begin[{]
method[queue, return_type[void], modifier[final public], parameter[batchRequest, callback]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=batchRequest, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix... | Keyword[public] Keyword[final] Keyword[void] identifier[queue] operator[SEP] identifier[BatchRequest] identifier[batchRequest] , identifier[BatchCallback] operator[<] identifier[T] , identifier[Void] operator[>] identifier[callback] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[super] operato... |
private void createParentChildRelationships(Database db,
HashMap<String, Account> descriptionMap,
HashMap<String, ArrayList<String>> seqMap)
throws Exception {
// List of ID's used to avoid recursion
... | class class_name[name] begin[{]
method[createParentChildRelationships, return_type[void], modifier[private], parameter[db, descriptionMap, seqMap]] begin[{]
local_variable[type[ArrayList], parentIdStack]
if[call[seqMap.containsKey, parameter[member[Account.ROOT_ACCOUNT_URI]]]] begin[{]
... | Keyword[private] Keyword[void] identifier[createParentChildRelationships] operator[SEP] identifier[Database] identifier[db] , identifier[HashMap] operator[<] identifier[String] , identifier[Account] operator[>] identifier[descriptionMap] , identifier[HashMap] operator[<] identifier[String] , identifier[ArrayList] o... |
public void marshall(RenderingEngine renderingEngine, ProtocolMarshaller protocolMarshaller) {
if (renderingEngine == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(renderingEngine.getName(), NAME_BI... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[renderingEngine, protocolMarshaller]] begin[{]
if[binary_operation[member[.renderingEngine], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[RenderingEngine] identifier[renderingEngine] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[renderingEngine] operator[==] Other[null] operator[SEP] {
Keywo... |
public void filterSkippedTaskStates() {
List<TaskState> skippedTaskStates = new ArrayList<>();
for (TaskState taskState : this.taskStates.values()) {
if (taskState.getWorkingState() == WorkUnitState.WorkingState.SKIPPED) {
skippedTaskStates.add(taskState);
}
}
for (TaskState taskStat... | class class_name[name] begin[{]
method[filterSkippedTaskStates, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[List], skippedTaskStates]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(argum... | Keyword[public] Keyword[void] identifier[filterSkippedTaskStates] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[TaskState] operator[>] identifier[skippedTaskStates] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for... |
private static void loadDisabledAlgorithmsMap(
final String propertyName) {
String property = AccessController.doPrivileged(
new PrivilegedAction<String>() {
public String run() {
return Security.getProperty(propertyName);
}
... | class class_name[name] begin[{]
method[loadDisabledAlgorithmsMap, return_type[void], modifier[private static], parameter[propertyName]] begin[{]
local_variable[type[String], property]
local_variable[type[String], algorithmsInProperty]
if[binary_operation[binary_operation[member[... | Keyword[private] Keyword[static] Keyword[void] identifier[loadDisabledAlgorithmsMap] operator[SEP] Keyword[final] identifier[String] identifier[propertyName] operator[SEP] {
identifier[String] identifier[property] operator[=] identifier[AccessController] operator[SEP] identifier[doPrivileged] operator[SEP] Keywo... |
public static void fillMappedField(Class<?> configuredClass, MappedField mappedField){
JMapAccessor accessor = getClassAccessors(configuredClass, mappedField.getValue().getName(),false);
if(isNull(accessor))
accessor = getFieldAccessors(configuredClass,mappedField.getValue());
if(isNull(accesso... | class class_name[name] begin[{]
method[fillMappedField, return_type[void], modifier[public static], parameter[configuredClass, mappedField]] begin[{]
local_variable[type[JMapAccessor], accessor]
if[call[.isNull, parameter[member[.accessor]]]] begin[{]
assign[member[.accessor... | Keyword[public] Keyword[static] Keyword[void] identifier[fillMappedField] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[configuredClass] , identifier[MappedField] identifier[mappedField] operator[SEP] {
identifier[JMapAccessor] identifier[accessor] operator[=] identifier[getClas... |
public void deleteOwnershipIdentifier(String resourceGroupName, String domainName, String name) {
deleteOwnershipIdentifierWithServiceResponseAsync(resourceGroupName, domainName, name).toBlocking().single().body();
} | class class_name[name] begin[{]
method[deleteOwnershipIdentifier, return_type[void], modifier[public], parameter[resourceGroupName, domainName, name]] begin[{]
call[.deleteOwnershipIdentifierWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.domainName], member[.name]]]
... | Keyword[public] Keyword[void] identifier[deleteOwnershipIdentifier] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[domainName] , identifier[String] identifier[name] operator[SEP] {
identifier[deleteOwnershipIdentifierWithServiceResponseAsync] operator[SEP] identi... |
public Catalog getCatalog() {
Catalog catalog = staticCatalog;
if (useStaticCatalog == null) {
useStaticCatalog = new Boolean(getUseStaticCatalog());
}
if (catalog == null || !useStaticCatalog.booleanValue()) {
catalog = getPrivateCatalog();
if (useStaticCatalog.booleanValue()) {
st... | class class_name[name] begin[{]
method[getCatalog, return_type[type[Catalog]], modifier[public], parameter[]] begin[{]
local_variable[type[Catalog], catalog]
if[binary_operation[member[.useStaticCatalog], ==, literal[null]]] begin[{]
assign[member[.useStaticCatal... | Keyword[public] identifier[Catalog] identifier[getCatalog] operator[SEP] operator[SEP] {
identifier[Catalog] identifier[catalog] operator[=] identifier[staticCatalog] operator[SEP] Keyword[if] operator[SEP] identifier[useStaticCatalog] operator[==] Other[null] operator[SEP] {
identifier[useStaticCatal... |
public static String[] getRDNAttributes(String dn) {
String rdnstr = getRDN(dn);
StringTokenizer st = new StringTokenizer(rdnstr.toLowerCase(), "+");
List<String> list = new ArrayList<String>();
while (st.hasMoreTokens()) {
String rdn = st.nextToken();
int index =... | class class_name[name] begin[{]
method[getRDNAttributes, return_type[type[String]], modifier[public static], parameter[dn]] begin[{]
local_variable[type[String], rdnstr]
local_variable[type[StringTokenizer], st]
local_variable[type[List], list]
while[call[st.hasMoreToken... | Keyword[public] Keyword[static] identifier[String] operator[SEP] operator[SEP] identifier[getRDNAttributes] operator[SEP] identifier[String] identifier[dn] operator[SEP] {
identifier[String] identifier[rdnstr] operator[=] identifier[getRDN] operator[SEP] identifier[dn] operator[SEP] operator[SEP] identifier[Stri... |
public static ExecutableElement getExecutableElement(String methodString)
{
if (methodString == null)
{
throw new NullPointerException();
}
if (methodString.isEmpty())
{
return null;
}
int i1 = methodString.indexOf(' ');
if (i1 ... | class class_name[name] begin[{]
method[getExecutableElement, return_type[type[ExecutableElement]], modifier[public static], parameter[methodString]] begin[{]
if[binary_operation[member[.methodString], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], ... | Keyword[public] Keyword[static] identifier[ExecutableElement] identifier[getExecutableElement] operator[SEP] identifier[String] identifier[methodString] operator[SEP] {
Keyword[if] operator[SEP] identifier[methodString] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[Nu... |
private void checkSelection() {
m_okButton.disable(Messages.get().key(Messages.GUI_UPLOAD_BUTTON_OK_DISABLE_CHECKING_0));
if (!m_selectionDone) {
m_firstContentHeight = CmsDomUtil.getCurrentStyleInt(m_scrollPanel.getElement(), CmsDomUtil.Style.height);
m_firstInfoHeight = m_dia... | class class_name[name] begin[{]
method[checkSelection, return_type[void], modifier[private], parameter[]] begin[{]
call[m_okButton.disable, parameter[call[Messages.get, parameter[]]]]
if[member[.m_selectionDone]] begin[{]
assign[member[.m_firstContentHeig... | Keyword[private] Keyword[void] identifier[checkSelection] operator[SEP] operator[SEP] {
identifier[m_okButton] operator[SEP] identifier[disable] operator[SEP] identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[key] operator[SEP] identifier[Messages] operator[S... |
private static void registerSSLProtocolHandler() {
String list = System.getProperty( PROTOCOL_HANDLER_PKGS );
if (list == null || list.length() == 0) {
System.setProperty( PROTOCOL_HANDLER_PKGS, SSL_PROTOCOL_HANDLER );
} else if (list.indexOf( SSL_PROTOCOL_HANDLER ) < 0) {
/... | class class_name[name] begin[{]
method[registerSSLProtocolHandler, return_type[void], modifier[private static], parameter[]] begin[{]
local_variable[type[String], list]
if[binary_operation[binary_operation[member[.list], ==, literal[null]], ||, binary_operation[call[list.length, paramet... | Keyword[private] Keyword[static] Keyword[void] identifier[registerSSLProtocolHandler] operator[SEP] operator[SEP] {
identifier[String] identifier[list] operator[=] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] identifier[PROTOCOL_HANDLER_PKGS] operator[SEP] operator[SEP] Keyword[if] oper... |
public HttpURLConnection getConnection() throws IOException, ProtocolException {
HttpURLConnection conn = HttpUtils.getHttpConnection(constructUrl(), expectedResponseCode, allowedUnexpectedResponseCodes, 30, method, headers, streamToWrite);
return conn;
} | class class_name[name] begin[{]
method[getConnection, return_type[type[HttpURLConnection]], modifier[public], parameter[]] begin[{]
local_variable[type[HttpURLConnection], conn]
return[member[.conn]]
end[}]
END[}] | Keyword[public] identifier[HttpURLConnection] identifier[getConnection] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ProtocolException] {
identifier[HttpURLConnection] identifier[conn] operator[=] identifier[HttpUtils] operator[SEP] identifier[getHttpConnection] operator[SEP]... |
public static String packageSign(Map<String, String> params, boolean urlEncoder) {
// 先将参数以其参数名的字典序升序进行排序
TreeMap<String, String> sortedParams = new TreeMap<String, String>(params);
// 遍历排序后的字典,将所有参数按"key=value"格式拼接在一起
StringBuilder sb = new StringBuilder();
boolean first = true;
for (Entry<String, String> ... | class class_name[name] begin[{]
method[packageSign, return_type[type[String]], modifier[public static], parameter[params, urlEncoder]] begin[{]
local_variable[type[TreeMap], sortedParams]
local_variable[type[StringBuilder], sb]
local_variable[type[boolean], first]
ForStatement(b... | Keyword[public] Keyword[static] identifier[String] identifier[packageSign] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[params] , Keyword[boolean] identifier[urlEncoder] operator[SEP] {
identifier[TreeMap] operator[<] identifier[String] , identifier[... |
public void initialize(Language language, DocumentType typeToProcess, OutputType outputType, String configPath, POSTagger posTagger) {
initialize(language, typeToProcess, outputType, configPath, posTagger, false);
} | class class_name[name] begin[{]
method[initialize, return_type[void], modifier[public], parameter[language, typeToProcess, outputType, configPath, posTagger]] begin[{]
call[.initialize, parameter[member[.language], member[.typeToProcess], member[.outputType], member[.configPath], member[.posTag... | Keyword[public] Keyword[void] identifier[initialize] operator[SEP] identifier[Language] identifier[language] , identifier[DocumentType] identifier[typeToProcess] , identifier[OutputType] identifier[outputType] , identifier[String] identifier[configPath] , identifier[POSTagger] identifier[posTagger] operator[SEP] {... |
public static TestMethod getRootMethod(
TestMethodTable rootMethodTable, StackTraceElement[] currentStackTrace) {
for (StackTraceElement element : currentStackTrace) {
List<TestMethod> rootMethods
= rootMethodTable.getByName(element.getClassName(), element.getMethodName());
... | class class_name[name] begin[{]
method[getRootMethod, return_type[type[TestMethod]], modifier[public static], parameter[rootMethodTable, currentStackTrace]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensi... | Keyword[public] Keyword[static] identifier[TestMethod] identifier[getRootMethod] operator[SEP] identifier[TestMethodTable] identifier[rootMethodTable] , identifier[StackTraceElement] operator[SEP] operator[SEP] identifier[currentStackTrace] operator[SEP] {
Keyword[for] operator[SEP] identifier[StackTraceElement... |
@SuppressWarnings("unchecked")
@Override
public <T> T execute() {
Room sfsRoom = CommandUtil.getSfsRoom(room, extension);
User sfsUser = null;
if(username != null)
sfsUser = sfsRoom.getUserByName(username);
else
sfsUser = sfsRoom.getUserById(userId);
... | class class_name[name] begin[{]
method[execute, return_type[type[T]], modifier[public], parameter[]] begin[{]
local_variable[type[Room], sfsRoom]
local_variable[type[User], sfsUser]
if[binary_operation[member[.username], !=, literal[null]]] begin[{]
assign[member[.sf... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[execute] operator[SEP] operator[SEP] {
identifier[Room] identifier[sfsRoom] operator[=] identifier[CommandUtil] ... |
public boolean isPatterned() {
final boolean result;
if (pattern.indexOf('*') != -1 || pattern.indexOf('?') != -1) {
result = true;
} else {
result = false;
}
return result;
} | class class_name[name] begin[{]
method[isPatterned, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
local_variable[type[boolean], result]
if[binary_operation[binary_operation[call[pattern.indexOf, parameter[literal['*']]], !=, literal[1]], ||, binary_operation[call[p... | Keyword[public] Keyword[boolean] identifier[isPatterned] operator[SEP] operator[SEP] {
Keyword[final] Keyword[boolean] identifier[result] operator[SEP] Keyword[if] operator[SEP] identifier[pattern] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[!=] operator[-] Other[1] ope... |
public String getUser() {
if (user != null) {
return user;
}
return urlParser != null ? urlParser.getUsername() : null;
} | class class_name[name] begin[{]
method[getUser, return_type[type[String]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.user], !=, literal[null]]] begin[{]
return[member[.user]]
else begin[{]
None
end[}]
return[TernaryExpression(conditi... | Keyword[public] identifier[String] identifier[getUser] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[user] operator[!=] Other[null] operator[SEP] {
Keyword[return] identifier[user] operator[SEP]
}
Keyword[return] identifier[urlParser] operator[!=] Other[null] operato... |
protected void setUp() throws SQLException {
Connection connection = getConnection();
try {
if (!isSetUp(connection)) {
Statement stmt = connection.createStatement();
stmt.execute(Query.CREATE_TABLE_RECORDS);
stmt.execute(Query.CREATE_TABLE_FIL... | class class_name[name] begin[{]
method[setUp, return_type[void], modifier[protected], parameter[]] begin[{]
local_variable[type[Connection], connection]
TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=connection, postfix_operators=[], prefix_operator... | Keyword[protected] Keyword[void] identifier[setUp] operator[SEP] operator[SEP] Keyword[throws] identifier[SQLException] {
identifier[Connection] identifier[connection] operator[=] identifier[getConnection] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
Keyword[if] operator[SEP] operator[!] i... |
private boolean isHHSign(String str)
{
boolean sign = true;
try
{
char r = (char) Integer.parseInt(str, 16);
}
catch (NumberFormatException e)
{
sign = false;
}
return sign;
} | class class_name[name] begin[{]
method[isHHSign, return_type[type[boolean]], modifier[private], parameter[str]] begin[{]
local_variable[type[boolean], sign]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=Me... | Keyword[private] Keyword[boolean] identifier[isHHSign] operator[SEP] identifier[String] identifier[str] operator[SEP] {
Keyword[boolean] identifier[sign] operator[=] literal[boolean] operator[SEP] Keyword[try] {
Keyword[char] identifier[r] operator[=] operator[SEP] Keyword[char] operator[SEP] identifi... |
@Override
public JSONObject toJsonObject() throws JSONException
{
JSONObject returnVal = super.toJsonObject();
//Flow...
if(this.getFlow() != null)
{
returnVal.put(JSONMapping.FLOW,this.getFlow());
}
//Form...
if(this.getForm() != null)
... | class class_name[name] begin[{]
method[toJsonObject, return_type[type[JSONObject]], modifier[public], parameter[]] begin[{]
local_variable[type[JSONObject], returnVal]
if[binary_operation[THIS[call[None.getFlow, parameter[]]], !=, literal[null]]] begin[{]
call[re... | annotation[@] identifier[Override] Keyword[public] identifier[JSONObject] identifier[toJsonObject] operator[SEP] operator[SEP] Keyword[throws] identifier[JSONException] {
identifier[JSONObject] identifier[returnVal] operator[=] Keyword[super] operator[SEP] identifier[toJsonObject] operator[SEP] operator[SEP] ope... |
@Override
public void infoSeeFromEast(ControllerPlayer c, double distance, double direction, double distChange,
double dirChange, double bodyFacingDirection, double headFacingDirection) {
switch (qualifier) {
case 'l' :
switch (number) {
... | class class_name[name] begin[{]
method[infoSeeFromEast, return_type[void], modifier[public], parameter[c, distance, direction, distChange, dirChange, bodyFacingDirection, headFacingDirection]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], q... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[infoSeeFromEast] operator[SEP] identifier[ControllerPlayer] identifier[c] , Keyword[double] identifier[distance] , Keyword[double] identifier[direction] , Keyword[double] identifier[distChange] , Keyword[double] identifier[dirChange] , Key... |
public boolean getMoreResults(final int current) throws SQLException {
//if fetch size is set to read fully, other resultSet are put in cache
checkClose();
return results != null && results.getMoreResults(current, protocol);
} | class class_name[name] begin[{]
method[getMoreResults, return_type[type[boolean]], modifier[public], parameter[current]] begin[{]
call[.checkClose, parameter[]]
return[binary_operation[binary_operation[member[.results], !=, literal[null]], &&, call[results.getMoreResults, parameter[memb... | Keyword[public] Keyword[boolean] identifier[getMoreResults] operator[SEP] Keyword[final] Keyword[int] identifier[current] operator[SEP] Keyword[throws] identifier[SQLException] {
identifier[checkClose] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[results] operator[!=] Other[null] operator... |
public static Object nextVersion(Class<? extends NextVersion> nextVersionClass, Object current) throws VersionException {
try {
NextVersion nextVersion;
if (CACHE.containsKey(nextVersionClass)) {
nextVersion = CACHE.get(nextVersionClass);
} else {
... | class class_name[name] begin[{]
method[nextVersion, return_type[type[Object]], modifier[public static], parameter[nextVersionClass, current]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=nextVersion)], modifi... | Keyword[public] Keyword[static] identifier[Object] identifier[nextVersion] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[NextVersion] operator[>] identifier[nextVersionClass] , identifier[Object] identifier[current] operator[SEP] Keyword[throws] identifier[VersionException] {
... |
public Iterator<String> getKeys() throws ConcurrentModificationException
{
Set<String> keys = new LinkedHashSet<String>();
for (Iterator<String> it = overrideProperties.getKeys(); it.hasNext();) {
keys.add(it.next());
}
for (Configuration config : configList)
{
... | class class_name[name] begin[{]
method[getKeys, return_type[type[Iterator]], modifier[public], parameter[]] begin[{]
local_variable[type[Set], keys]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[],... | Keyword[public] identifier[Iterator] operator[<] identifier[String] operator[>] identifier[getKeys] operator[SEP] operator[SEP] Keyword[throws] identifier[ConcurrentModificationException] {
identifier[Set] operator[<] identifier[String] operator[>] identifier[keys] operator[=] Keyword[new] identifier[LinkedHashS... |
@Nonnull
public static FileIOError deleteFile (@Nonnull final Path aFile)
{
ValueEnforcer.notNull (aFile, "Path");
final Path aRealFile = _getUnifiedPath (aFile);
if (!aRealFile.toFile ().isFile ())
return EFileIOErrorCode.SOURCE_DOES_NOT_EXIST.getAsIOError (EFileIOOperation.DELETE_FILE, aRealFi... | class class_name[name] begin[{]
method[deleteFile, return_type[type[FileIOError]], modifier[public static], parameter[aFile]] begin[{]
call[ValueEnforcer.notNull, parameter[member[.aFile], literal["Path"]]]
local_variable[type[Path], aRealFile]
if[call[aRealFile.toFile, ... | annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] identifier[FileIOError] identifier[deleteFile] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[Path] identifier[aFile] operator[SEP] {
identifier[ValueEnforcer] operator[SEP] identifier[notNull] operator[SEP] identifier[a... |
@Override
public void createConnector(ArbitrationResult result) {
connector = connectorFactory.create(proxyParticipantId, result, qosSettings, statelessAsyncParticipantId);
connectorStatusLock.lock();
try {
connectorStatus = ConnectorStatus.ConnectorSuccesful;
connect... | class class_name[name] begin[{]
method[createConnector, return_type[void], modifier[public], parameter[result]] begin[{]
assign[member[.connector], call[connectorFactory.create, parameter[member[.proxyParticipantId], member[.result], member[.qosSettings], member[.statelessAsyncParticipantId]]]]... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[createConnector] operator[SEP] identifier[ArbitrationResult] identifier[result] operator[SEP] {
identifier[connector] operator[=] identifier[connectorFactory] operator[SEP] identifier[create] operator[SEP] identifier[proxyParticipantId] ... |
public void write(IRTMPEvent event) {
if (!connection.isClosed()) {
final IClientStream stream = connection.getStreamByChannelId(id);
if (id > 3 && stream == null) {
log.warn("Non-existant stream for channel id: {}, session: {} discarding: {}", id, connection.getSessi... | class class_name[name] begin[{]
method[write, return_type[void], modifier[public], parameter[event]] begin[{]
if[call[connection.isClosed, parameter[]]] begin[{]
local_variable[type[IClientStream], stream]
if[binary_operation[binary_operation[member[.id], >, ... | Keyword[public] Keyword[void] identifier[write] operator[SEP] identifier[IRTMPEvent] identifier[event] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[connection] operator[SEP] identifier[isClosed] operator[SEP] operator[SEP] operator[SEP] {
Keyword[final] identifier[IClientStream] id... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.