code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public void setWidths(float[] widths) throws BadElementException {
if (widths.length != columns) {
throw new BadElementException("Wrong number of columns.");
}
// The sum of all values is 100%
float hundredPercent = 0;
for (int i = 0; i < columns; i++) {
... | class class_name[name] begin[{]
method[setWidths, return_type[void], modifier[public], parameter[widths]] begin[{]
if[binary_operation[member[widths.length], !=, member[.columns]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operat... | Keyword[public] Keyword[void] identifier[setWidths] operator[SEP] Keyword[float] operator[SEP] operator[SEP] identifier[widths] operator[SEP] Keyword[throws] identifier[BadElementException] {
Keyword[if] operator[SEP] identifier[widths] operator[SEP] identifier[length] operator[!=] identifier[columns] operator[S... |
public AVFile getAVFile() {
if (actualFile != null) {
return actualFile;
} else if (null != file && file.containsKey(FILE_URL)) {
Map<String, Object> avfileMeta = null;
if (file.containsKey(FILE_META)) {
avfileMeta = (Map) file.get(FILE_META);
}
AVFile avfile = new AVFile(n... | class class_name[name] begin[{]
method[getAVFile, return_type[type[AVFile]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.actualFile], !=, literal[null]]] begin[{]
return[member[.actualFile]]
else begin[{]
if[binary_operation[binary_operati... | Keyword[public] identifier[AVFile] identifier[getAVFile] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[actualFile] operator[!=] Other[null] operator[SEP] {
Keyword[return] identifier[actualFile] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] Other[null] oper... |
@Override
public int remove(PartitionRecord criteria) throws Exception {
StringBuilder delete = new StringBuilder(111)
.append("DELETE FROM Partition p WHERE");
if (criteria != null) {
if (criteria.hasExecutor())
delete.append(" p.EXECUTOR=:x AND")... | class class_name[name] begin[{]
method[remove, return_type[type[int]], modifier[public], parameter[criteria]] begin[{]
local_variable[type[StringBuilder], delete]
if[binary_operation[member[.criteria], !=, literal[null]]] begin[{]
if[call[criteria.hasExecutor, pa... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[remove] operator[SEP] identifier[PartitionRecord] identifier[criteria] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[StringBuilder] identifier[delete] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] Oth... |
@Nonnull
public BugInstance addCalledMethod(ConstantPoolGen cpg, InvokeInstruction inv) {
String className = inv.getClassName(cpg);
String methodName = inv.getMethodName(cpg);
String methodSig = inv.getSignature(cpg);
addMethod(className, methodName, methodSig, inv.getOpcode() == Con... | class class_name[name] begin[{]
method[addCalledMethod, return_type[type[BugInstance]], modifier[public], parameter[cpg, inv]] begin[{]
local_variable[type[String], className]
local_variable[type[String], methodName]
local_variable[type[String], methodSig]
call[.addMetho... | annotation[@] identifier[Nonnull] Keyword[public] identifier[BugInstance] identifier[addCalledMethod] operator[SEP] identifier[ConstantPoolGen] identifier[cpg] , identifier[InvokeInstruction] identifier[inv] operator[SEP] {
identifier[String] identifier[className] operator[=] identifier[inv] operator[SEP] ident... |
public static FileSystem get(URI uri) throws IOException {
FileSystem fs = null;
synchronized (SYNCHRONIZATION_OBJECT) {
if (uri.getScheme() == null) {
try {
uri = new URI("file", null, uri.getPath(), null);
}
catch (URISyntaxException e) {
// we tried to repair it, but could not. report... | class class_name[name] begin[{]
method[get, return_type[type[FileSystem]], modifier[public static], parameter[uri]] begin[{]
local_variable[type[FileSystem], fs]
SYNCHRONIZED[member[.SYNCHRONIZATION_OBJECT]] BEGIN[{]
if[binary_operation[call[uri.getScheme, parame... | Keyword[public] Keyword[static] identifier[FileSystem] identifier[get] operator[SEP] identifier[URI] identifier[uri] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[FileSystem] identifier[fs] operator[=] Other[null] operator[SEP] Keyword[synchronized] operator[SEP] identifier[SYNCHRONIZATION_O... |
public void createIndexes(Connection connection, TableCreationMode mode) {
ArrayList<Type<?>> sorted = sortTypes();
for (Type<?> type : sorted) {
createIndexes(connection, mode, type);
}
} | class class_name[name] begin[{]
method[createIndexes, return_type[void], modifier[public], parameter[connection, mode]] begin[{]
local_variable[type[ArrayList], sorted]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberRefe... | Keyword[public] Keyword[void] identifier[createIndexes] operator[SEP] identifier[Connection] identifier[connection] , identifier[TableCreationMode] identifier[mode] operator[SEP] {
identifier[ArrayList] operator[<] identifier[Type] operator[<] operator[?] operator[>] operator[>] identifier[sorted] operator[=] i... |
public void marshall(DescribeEntityAggregatesRequest describeEntityAggregatesRequest, ProtocolMarshaller protocolMarshaller) {
if (describeEntityAggregatesRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarsha... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[describeEntityAggregatesRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.describeEntityAggregatesRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCr... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DescribeEntityAggregatesRequest] identifier[describeEntityAggregatesRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[describeEntityAggregatesRequest] operator[... |
private String parse(final Arguments arguments, String input) {
final Configuration configuration = arguments.getConfiguration();
final IStandardExpressionParser parser =
StandardExpressions.getExpressionParser(configuration);
final IStandardExpression expression =
... | class class_name[name] begin[{]
method[parse, return_type[type[String]], modifier[private], parameter[arguments, input]] begin[{]
local_variable[type[Configuration], configuration]
local_variable[type[IStandardExpressionParser], parser]
local_variable[type[IStandardExpression], expressi... | Keyword[private] identifier[String] identifier[parse] operator[SEP] Keyword[final] identifier[Arguments] identifier[arguments] , identifier[String] identifier[input] operator[SEP] {
Keyword[final] identifier[Configuration] identifier[configuration] operator[=] identifier[arguments] operator[SEP] identifier[getC... |
public static vpnvserver_intranetip_binding[] get(nitro_service service, String name) throws Exception{
vpnvserver_intranetip_binding obj = new vpnvserver_intranetip_binding();
obj.set_name(name);
vpnvserver_intranetip_binding response[] = (vpnvserver_intranetip_binding[]) obj.get_resources(service);
return res... | class class_name[name] begin[{]
method[get, return_type[type[vpnvserver_intranetip_binding]], modifier[public static], parameter[service, name]] begin[{]
local_variable[type[vpnvserver_intranetip_binding], obj]
call[obj.set_name, parameter[member[.name]]]
local_variable[type[vpn... | Keyword[public] Keyword[static] identifier[vpnvserver_intranetip_binding] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[vpnvserver_intranetip_binding] ... |
@Api
public void setMapType(MapType type) {
this.type = type;
if (googleMap != null) {
setMapType(googleMap, type.toString());
}
} | class class_name[name] begin[{]
method[setMapType, return_type[void], modifier[public], parameter[type]] begin[{]
assign[THIS[member[None.type]], member[.type]]
if[binary_operation[member[.googleMap], !=, literal[null]]] begin[{]
call[.setMapType, paramet... | annotation[@] identifier[Api] Keyword[public] Keyword[void] identifier[setMapType] operator[SEP] identifier[MapType] identifier[type] operator[SEP] {
Keyword[this] operator[SEP] identifier[type] operator[=] identifier[type] operator[SEP] Keyword[if] operator[SEP] identifier[googleMap] operator[!=] Other[null] op... |
public final void setDate(LocalDate optionalDate) {
// Set the text field to the supplied date, using the standard format for null, AD, or BC.
String standardDateString = zGetStandardTextFieldDateString(optionalDate);
String textFieldString = dateTextField.getText();
// We will only chan... | class class_name[name] begin[{]
method[setDate, return_type[void], modifier[final public], parameter[optionalDate]] begin[{]
local_variable[type[String], standardDateString]
local_variable[type[String], textFieldString]
if[call[standardDateString.equals, parameter[member[.textFi... | Keyword[public] Keyword[final] Keyword[void] identifier[setDate] operator[SEP] identifier[LocalDate] identifier[optionalDate] operator[SEP] {
identifier[String] identifier[standardDateString] operator[=] identifier[zGetStandardTextFieldDateString] operator[SEP] identifier[optionalDate] operator[SEP] operator[SEP... |
public static responderaction[] get_filtered(nitro_service service, String filter) throws Exception{
responderaction obj = new responderaction();
options option = new options();
option.set_filter(filter);
responderaction[] response = (responderaction[]) obj.getfiltered(service, option);
return response;
} | class class_name[name] begin[{]
method[get_filtered, return_type[type[responderaction]], modifier[public static], parameter[service, filter]] begin[{]
local_variable[type[responderaction], obj]
local_variable[type[options], option]
call[option.set_filter, parameter[member[.filte... | Keyword[public] Keyword[static] identifier[responderaction] operator[SEP] operator[SEP] identifier[get_filtered] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[filter] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[responderaction] identifier[obj] o... |
public void marshall(ResolverEndpoint resolverEndpoint, ProtocolMarshaller protocolMarshaller) {
if (resolverEndpoint == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(resolverEndpoint.getId(), ID_BI... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[resolverEndpoint, protocolMarshaller]] begin[{]
if[binary_operation[member[.resolverEndpoint], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postf... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[ResolverEndpoint] identifier[resolverEndpoint] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[resolverEndpoint] operator[==] Other[null] operator[SEP] {
Ke... |
private boolean processRuleset(final Branch parent_branch, int depth) {
// when we've passed the final rule, just return to stop the recursion
if (rule_idx > max_rule_level) {
return true;
}
// setup the branch for this iteration and set the "current_branch"
// reference. It's not final... | class class_name[name] begin[{]
method[processRuleset, return_type[type[boolean]], modifier[private], parameter[parent_branch, depth]] begin[{]
if[binary_operation[member[.rule_idx], >, member[.max_rule_level]]] begin[{]
return[literal[true]]
else begin[{]
None
end[}... | Keyword[private] Keyword[boolean] identifier[processRuleset] operator[SEP] Keyword[final] identifier[Branch] identifier[parent_branch] , Keyword[int] identifier[depth] operator[SEP] {
Keyword[if] operator[SEP] identifier[rule_idx] operator[>] identifier[max_rule_level] operator[SEP] {
Keyword[return]... |
public String getStringValue(DataBinder binder) {
// binder can't get a non existent param
if (this.name == null || this.name.equals("")) {
return null;
}
String value = (String) binder.getLocal(this.name);
if (value == null && this.required) {
throw new IllegalArgumentException("Param... | class class_name[name] begin[{]
method[getStringValue, return_type[type[String]], modifier[public], parameter[binder]] begin[{]
if[binary_operation[binary_operation[THIS[member[None.name]], ==, literal[null]], ||, THIS[member[None.name]call[None.equals, parameter[literal[""]]]]]] begin[{]
... | Keyword[public] identifier[String] identifier[getStringValue] operator[SEP] identifier[DataBinder] identifier[binder] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[name] operator[==] Other[null] operator[||] Keyword[this] operator[SEP] identifier[name] operator[SEP] identifier[... |
private static boolean portsMatch(ServicePort servicePort, IntOrString intOrString) {
if (intOrString != null) {
Integer port = servicePort.getPort();
Integer intVal = intOrString.getIntVal();
String strVal = intOrString.getStrVal();
if (intVal != null) {
... | class class_name[name] begin[{]
method[portsMatch, return_type[type[boolean]], modifier[private static], parameter[servicePort, intOrString]] begin[{]
if[binary_operation[member[.intOrString], !=, literal[null]]] begin[{]
local_variable[type[Integer], port]
local_variabl... | Keyword[private] Keyword[static] Keyword[boolean] identifier[portsMatch] operator[SEP] identifier[ServicePort] identifier[servicePort] , identifier[IntOrString] identifier[intOrString] operator[SEP] {
Keyword[if] operator[SEP] identifier[intOrString] operator[!=] Other[null] operator[SEP] {
identifie... |
public static void d(String tag, String msg) {
if (logEnabled) {
Log.d(tag, msg);
}
} | class class_name[name] begin[{]
method[d, return_type[void], modifier[public static], parameter[tag, msg]] begin[{]
if[member[.logEnabled]] begin[{]
call[Log.d, parameter[member[.tag], member[.msg]]]
else begin[{]
None
end[}]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[d] operator[SEP] identifier[String] identifier[tag] , identifier[String] identifier[msg] operator[SEP] {
Keyword[if] operator[SEP] identifier[logEnabled] operator[SEP] {
identifier[Log] operator[SEP] identifier[d] operator[SEP] identifier[tag] ... |
public static Geometry convert(org.postgis.Geometry geometry) {
switch (geometry.getType()) {
case org.postgis.Geometry.POINT:
return convert((org.postgis.Point) geometry);
case org.postgis.Geometry.LINESTRING:
return convert((org.postgis.LineString) geometry);
ca... | class class_name[name] begin[{]
method[convert, return_type[type[Geometry]], modifier[public static], parameter[geometry]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=POINT, postfix_operators=[], prefix_operators=[], qualifier=org.postgis.Geometry, selectors=[])], s... | Keyword[public] Keyword[static] identifier[Geometry] identifier[convert] operator[SEP] identifier[org] operator[SEP] identifier[postgis] operator[SEP] identifier[Geometry] identifier[geometry] operator[SEP] {
Keyword[switch] operator[SEP] identifier[geometry] operator[SEP] identifier[getType] operator[SEP] opera... |
public int doEndTag()
throws JspException {
if(hasErrors())
reportErrors();
else {
AbstractCallMethod cm = (AbstractCallMethod)getParent();
cm.addParameter(_type, _isNull ? null : _value);
}
localRelease();
return EVAL_PAGE;
} | class class_name[name] begin[{]
method[doEndTag, return_type[type[int]], modifier[public], parameter[]] begin[{]
if[call[.hasErrors, parameter[]]] begin[{]
call[.reportErrors, parameter[]]
else begin[{]
local_variable[type[AbstractCallMethod], cm]
... | Keyword[public] Keyword[int] identifier[doEndTag] operator[SEP] operator[SEP] Keyword[throws] identifier[JspException] {
Keyword[if] operator[SEP] identifier[hasErrors] operator[SEP] operator[SEP] operator[SEP] identifier[reportErrors] operator[SEP] operator[SEP] operator[SEP] Keyword[else] {
identifi... |
public void modifyServiceProvider(final Map<String, Object> changedValues) {
AddressTemplate template = SERVICE_PROVIDER_TEMPLATE.replaceWildcards(federation, serviceProvider);
modify(template, serviceProvider, changedValues);
} | class class_name[name] begin[{]
method[modifyServiceProvider, return_type[void], modifier[public], parameter[changedValues]] begin[{]
local_variable[type[AddressTemplate], template]
call[.modify, parameter[member[.template], member[.serviceProvider], member[.changedValues]]]
end[}]
... | Keyword[public] Keyword[void] identifier[modifyServiceProvider] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[changedValues] operator[SEP] {
identifier[AddressTemplate] identifier[template] operator[=] identifier[SERVICE_PROVIDER_TEMPLATE... |
protected void receiveServerRequest(HttpMessage request) {
BuilderSupport<HttpActionBuilder> action = builder -> {
HttpServerActionBuilder.HttpServerReceiveActionBuilder receiveBuilder = builder.server(httpServer).receive();
HttpServerRequestActionBuilder requestBuilder;
if ... | class class_name[name] begin[{]
method[receiveServerRequest, return_type[void], modifier[protected], parameter[request]] begin[{]
local_variable[type[BuilderSupport], action]
call[runner.http, parameter[member[.action]]]
end[}]
END[}] | Keyword[protected] Keyword[void] identifier[receiveServerRequest] operator[SEP] identifier[HttpMessage] identifier[request] operator[SEP] {
identifier[BuilderSupport] operator[<] identifier[HttpActionBuilder] operator[>] identifier[action] operator[=] identifier[builder] operator[->] {
identifier[Http... |
public static Writer quote(String str, Writer writer) throws IOException {
return quote(str, writer, true);
} | class class_name[name] begin[{]
method[quote, return_type[type[Writer]], modifier[public static], parameter[str, writer]] begin[{]
return[call[.quote, parameter[member[.str], member[.writer], literal[true]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Writer] identifier[quote] operator[SEP] identifier[String] identifier[str] , identifier[Writer] identifier[writer] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[return] identifier[quote] operator[SEP] identifier[str] , identifier[writer] , literal[b... |
@Override
public void markStale() {
final boolean isTracingEnabled = TraceComponent.isAnyTracingEnabled();
if (isTracingEnabled && tc.isEntryEnabled()) {
Tr.entry(this, tc, "markStale");
}
// This update must be thread safe. I'm assuming here that a boolean assignment... | class class_name[name] begin[{]
method[markStale, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[boolean], isTracingEnabled]
if[binary_operation[member[.isTracingEnabled], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[Tr... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[markStale] operator[SEP] operator[SEP] {
Keyword[final] Keyword[boolean] identifier[isTracingEnabled] operator[=] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[SEP] Keyword[... |
public boolean addOptionalParams(JSType ...types) {
if (hasVarArgs()) {
return false;
}
for (JSType type : types) {
newParameter(registry.createOptionalType(type)).setOptionalArg(true);
}
return true;
} | class class_name[name] begin[{]
method[addOptionalParams, return_type[type[boolean]], modifier[public], parameter[types]] begin[{]
if[call[.hasVarArgs, parameter[]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
ForStatement(body=BlockStatement(la... | Keyword[public] Keyword[boolean] identifier[addOptionalParams] operator[SEP] identifier[JSType] operator[...] identifier[types] operator[SEP] {
Keyword[if] operator[SEP] identifier[hasVarArgs] operator[SEP] operator[SEP] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
Ke... |
private static List<String> removeNonAccessible(CmsObject cms, List<String> sitePaths) {
List<String> result = new ArrayList<String>(sitePaths.size());
for (String sitePath : sitePaths) {
if (cms.existsResource(sitePath, CmsResourceFilter.IGNORE_EXPIRATION)) {
result.add(sit... | class class_name[name] begin[{]
method[removeNonAccessible, return_type[type[List]], modifier[private static], parameter[cms, sitePaths]] begin[{]
local_variable[type[List], result]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[Member... | Keyword[private] Keyword[static] identifier[List] operator[<] identifier[String] operator[>] identifier[removeNonAccessible] operator[SEP] identifier[CmsObject] identifier[cms] , identifier[List] operator[<] identifier[String] operator[>] identifier[sitePaths] operator[SEP] {
identifier[List] operator[<] identi... |
private static IllegalStateException unrecognizedSchemaType(ClassTemplateSpec enclosingClass, String memberName, DataSchema schema)
{
return new IllegalStateException("Unrecognized schema: " + schema +
enclosingClassAndMemberNameToString(enclosingClass, memberName));
} | class class_name[name] begin[{]
method[unrecognizedSchemaType, return_type[type[IllegalStateException]], modifier[private static], parameter[enclosingClass, memberName, schema]] begin[{]
return[ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefi... | Keyword[private] Keyword[static] identifier[IllegalStateException] identifier[unrecognizedSchemaType] operator[SEP] identifier[ClassTemplateSpec] identifier[enclosingClass] , identifier[String] identifier[memberName] , identifier[DataSchema] identifier[schema] operator[SEP] {
Keyword[return] Keyword[new] ident... |
public ObjectResult updateObject(SpiderTransaction parentTran,
DBObject dbObj,
Map<String, String> currScalarMap) {
ObjectResult result = new ObjectResult();
try {
result.setObjectID(dbObj.getObjectID... | class class_name[name] begin[{]
method[updateObject, return_type[type[ObjectResult]], modifier[public], parameter[parentTran, dbObj, currScalarMap]] begin[{]
local_variable[type[ObjectResult], result]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocatio... | Keyword[public] identifier[ObjectResult] identifier[updateObject] operator[SEP] identifier[SpiderTransaction] identifier[parentTran] , identifier[DBObject] identifier[dbObj] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[currScalarMap] operator[SEP] {
identifier[O... |
private void includeXmlContent(final XIncludeAttributes xIncludeAttributes)
throws XIncludeFatalException, XIncludeResourceException
{
try
{
settingLanguage();
final SAXSource source = buildingXIncludeSource(xIncludeAttributes);
final TreeInfo docInfo ... | class class_name[name] begin[{]
method[includeXmlContent, return_type[void], modifier[private], parameter[xIncludeAttributes]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=settingLanguage, postfix_operators=[], prefix_operators=[], qualifier=, select... | Keyword[private] Keyword[void] identifier[includeXmlContent] operator[SEP] Keyword[final] identifier[XIncludeAttributes] identifier[xIncludeAttributes] operator[SEP] Keyword[throws] identifier[XIncludeFatalException] , identifier[XIncludeResourceException] {
Keyword[try] {
identifier[settingLanguage]... |
public ApiResponse<ApiAsyncSuccessResponse> getUsersAsyncWithHttpInfo(String aioId, Integer limit, Integer offset, String order, String sortBy, String filterName, String filterParameters, String roles, String skills, Boolean userEnabled, String userValid) throws ApiException {
com.squareup.okhttp.Call call = ge... | class class_name[name] begin[{]
method[getUsersAsyncWithHttpInfo, return_type[type[ApiResponse]], modifier[public], parameter[aioId, limit, offset, order, sortBy, filterName, filterParameters, roles, skills, userEnabled, userValid]] begin[{]
local_variable[type[com], call]
local_variable[type[T... | Keyword[public] identifier[ApiResponse] operator[<] identifier[ApiAsyncSuccessResponse] operator[>] identifier[getUsersAsyncWithHttpInfo] operator[SEP] identifier[String] identifier[aioId] , identifier[Integer] identifier[limit] , identifier[Integer] identifier[offset] , identifier[String] identifier[order] , ident... |
public static String describeExtensionContext(StructureDefinition ext) {
CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder();
for (StringType t : ext.getContext())
b.append(t.getValue());
if (!ext.hasContextType())
throw new Error("no context type on "+ext.getUrl());
switch (ex... | class class_name[name] begin[{]
method[describeExtensionContext, return_type[type[String]], modifier[public static], parameter[ext]] begin[{]
local_variable[type[CommaSeparatedStringBuilder], b]
ForStatement(body=StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(argume... | Keyword[public] Keyword[static] identifier[String] identifier[describeExtensionContext] operator[SEP] identifier[StructureDefinition] identifier[ext] operator[SEP] {
identifier[CommaSeparatedStringBuilder] identifier[b] operator[=] Keyword[new] identifier[CommaSeparatedStringBuilder] operator[SEP] operator[SEP] ... |
public int writeDependency(Object id,
ValueSet valueSet) {
final String methodName = "writeDependency()";
int rc = NO_EXCEPTION;
if (valueSet.size() == 0) {
if (tc.isDebugEnabled())
Tr.debug(tc, methodName, "cacheName=" + this.cacheName ... | class class_name[name] begin[{]
method[writeDependency, return_type[type[int]], modifier[public], parameter[id, valueSet]] begin[{]
local_variable[type[String], methodName]
local_variable[type[int], rc]
if[binary_operation[call[valueSet.size, parameter[]], ==, literal[0]]] begin... | Keyword[public] Keyword[int] identifier[writeDependency] operator[SEP] identifier[Object] identifier[id] , identifier[ValueSet] identifier[valueSet] operator[SEP] {
Keyword[final] identifier[String] identifier[methodName] operator[=] literal[String] operator[SEP] Keyword[int] identifier[rc] operator[=] identifi... |
DataSource getFastDatasource() {
if(delegatedDataSource==null){
delegatedDataSource = dbms.getFastDataSource(this);
if(delegatedDataSource == null){
throw new RuntimeException("Unable to obtain datasource from dbms");
}
}
return delegatedDataSource;
} | class class_name[name] begin[{]
method[getFastDatasource, return_type[type[DataSource]], modifier[default], parameter[]] begin[{]
if[binary_operation[member[.delegatedDataSource], ==, literal[null]]] begin[{]
assign[member[.delegatedDataSource], call[dbms.getFastDataSour... | identifier[DataSource] identifier[getFastDatasource] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[delegatedDataSource] operator[==] Other[null] operator[SEP] {
identifier[delegatedDataSource] operator[=] identifier[dbms] operator[SEP] identifier[getFastDataSource] operator[SEP] K... |
List<Integer> simulateStatementBackwards(final int backtrackPosition) {
// search for previous zero-position in stackSizes
int currentPosition = backtrackPosition;
// check against stack size before the instruction was executed
while (stackSizes.get(currentPosition).getLeft() > 0) {
... | class class_name[name] begin[{]
method[simulateStatementBackwards, return_type[type[List]], modifier[default], parameter[backtrackPosition]] begin[{]
local_variable[type[int], currentPosition]
while[binary_operation[call[stackSizes.get, parameter[member[.currentPosition]]], >, literal[0... | identifier[List] operator[<] identifier[Integer] operator[>] identifier[simulateStatementBackwards] operator[SEP] Keyword[final] Keyword[int] identifier[backtrackPosition] operator[SEP] {
Keyword[int] identifier[currentPosition] operator[=] identifier[backtrackPosition] operator[SEP] Keyword[while] operator[SEP]... |
@Override
public ListObjectPoliciesResult listObjectPolicies(ListObjectPoliciesRequest request) {
request = beforeClientExecution(request);
return executeListObjectPolicies(request);
} | class class_name[name] begin[{]
method[listObjectPolicies, return_type[type[ListObjectPoliciesResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeListObjectPolicies, parameter[me... | annotation[@] identifier[Override] Keyword[public] identifier[ListObjectPoliciesResult] identifier[listObjectPolicies] operator[SEP] identifier[ListObjectPoliciesRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operat... |
public void registerFont(Typeface face, String name, Font.Style style, String... ligatureGlyphs) {
Pair<String,Font.Style> key = Pair.create(name, style);
fonts.put(key, face);
ligatureHacks.put(key, ligatureGlyphs);
} | class class_name[name] begin[{]
method[registerFont, return_type[void], modifier[public], parameter[face, name, style, ligatureGlyphs]] begin[{]
local_variable[type[Pair], key]
call[fonts.put, parameter[member[.key], member[.face]]]
call[ligatureHacks.put, parameter[memb... | Keyword[public] Keyword[void] identifier[registerFont] operator[SEP] identifier[Typeface] identifier[face] , identifier[String] identifier[name] , identifier[Font] operator[SEP] identifier[Style] identifier[style] , identifier[String] operator[...] identifier[ligatureGlyphs] operator[SEP] {
identifier[Pair] o... |
@Override
public StmtIterator getMetadata()
{
final Model output = ModelFactory.createDefaultModel();
addMetadata( output );
return output.listStatements();
} | class class_name[name] begin[{]
method[getMetadata, return_type[type[StmtIterator]], modifier[public], parameter[]] begin[{]
local_variable[type[Model], output]
call[.addMetadata, parameter[member[.output]]]
return[call[output.listStatements, parameter[]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[StmtIterator] identifier[getMetadata] operator[SEP] operator[SEP] {
Keyword[final] identifier[Model] identifier[output] operator[=] identifier[ModelFactory] operator[SEP] identifier[createDefaultModel] operator[SEP] operator[SEP] operator[SEP] identif... |
protected String getDisplayNameOf(Method e, T i) {
Class<?> c = e.getDeclaringClass();
String key = displayNameOf(i);
if (key.length()==0) return c.getSimpleName()+"."+e.getName();
try {
ResourceBundleHolder rb = ResourceBundleHolder.get(
c.getClassLoader... | class class_name[name] begin[{]
method[getDisplayNameOf, return_type[type[String]], modifier[protected], parameter[e, i]] begin[{]
local_variable[type[Class], c]
local_variable[type[String], key]
if[binary_operation[call[key.length, parameter[]], ==, literal[0]]] begin[{]
return... | Keyword[protected] identifier[String] identifier[getDisplayNameOf] operator[SEP] identifier[Method] identifier[e] , identifier[T] identifier[i] operator[SEP] {
identifier[Class] operator[<] operator[?] operator[>] identifier[c] operator[=] identifier[e] operator[SEP] identifier[getDeclaringClass] operator[SEP] ... |
public <T extends Evaluation> T evaluate(DataSetIterator iterator, List<String> labelsList, int topN) {
if (labelsList == null)
labelsList = iterator.getLabels();
Layer outputLayer = getOutputLayer(0);
if(getConfiguration().isValidateOutputLayerConfig()){
OutputLayerUtil... | class class_name[name] begin[{]
method[evaluate, return_type[type[T]], modifier[public], parameter[iterator, labelsList, topN]] begin[{]
if[binary_operation[member[.labelsList], ==, literal[null]]] begin[{]
assign[member[.labelsList], call[iterator.getLabels, parameter[]]]
e... | Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[Evaluation] operator[>] identifier[T] identifier[evaluate] operator[SEP] identifier[DataSetIterator] identifier[iterator] , identifier[List] operator[<] identifier[String] operator[>] identifier[labelsList] , Keyword[int] identifier[topN] operator[... |
public static IndentingWriter wrap(Appendable delegate, Indentation indentation) {
return delegate instanceof IndentingWriter
? ((IndentingWriter) delegate).withIndentation(indentation)
: new IndentingWriter(delegate, indentation);
} | class class_name[name] begin[{]
method[wrap, return_type[type[IndentingWriter]], modifier[public static], parameter[delegate, indentation]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=delegate, postfix_operators=[], prefix_operators=[], qualifier=, select... | Keyword[public] Keyword[static] identifier[IndentingWriter] identifier[wrap] operator[SEP] identifier[Appendable] identifier[delegate] , identifier[Indentation] identifier[indentation] operator[SEP] {
Keyword[return] identifier[delegate] Keyword[instanceof] identifier[IndentingWriter] operator[?] operator[SEP] ... |
public static void formatFileHeader(String fileName, Transaction tx) {
tx.concurrencyMgr().modifyFile(fileName);
// header should be the first block of the given file
if (VanillaDb.fileMgr().size(fileName) == 0) {
FileHeaderFormatter fhf = new FileHeaderFormatter();
Buffer buff = tx.bufferMgr().pinNew(... | class class_name[name] begin[{]
method[formatFileHeader, return_type[void], modifier[public static], parameter[fileName, tx]] begin[{]
call[tx.concurrencyMgr, parameter[]]
if[binary_operation[call[VanillaDb.fileMgr, parameter[]], ==, literal[0]]] begin[{]
local_varia... | Keyword[public] Keyword[static] Keyword[void] identifier[formatFileHeader] operator[SEP] identifier[String] identifier[fileName] , identifier[Transaction] identifier[tx] operator[SEP] {
identifier[tx] operator[SEP] identifier[concurrencyMgr] operator[SEP] operator[SEP] operator[SEP] identifier[modifyFile] opera... |
@Override
public int lastIndexOf(long elem) {
// Find the location to insert the object at
int pos=binarySearch(elem);
// Not found
if(pos<0) return -1;
// Found one, iterate forwards to the last one
while(pos<(size-1) && elementData[pos+1]==elem) pos++;
return pos;
} | class class_name[name] begin[{]
method[lastIndexOf, return_type[type[int]], modifier[public], parameter[elem]] begin[{]
local_variable[type[int], pos]
if[binary_operation[member[.pos], <, literal[0]]] begin[{]
return[literal[1]]
else begin[{]
None
end[}]
... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[lastIndexOf] operator[SEP] Keyword[long] identifier[elem] operator[SEP] {
Keyword[int] identifier[pos] operator[=] identifier[binarySearch] operator[SEP] identifier[elem] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[po... |
public ServiceFuture<StreamingPolicyInner> getAsync(String resourceGroupName, String accountName, String streamingPolicyName, final ServiceCallback<StreamingPolicyInner> serviceCallback) {
return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, accountName, streamingPolicyName), service... | class class_name[name] begin[{]
method[getAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, accountName, streamingPolicyName, serviceCallback]] begin[{]
return[call[ServiceFuture.fromResponse, parameter[call[.getWithServiceResponseAsync, parameter[member[.resourceG... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[StreamingPolicyInner] operator[>] identifier[getAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[accountName] , identifier[String] identifier[streamingPolicyName] , Keyword[final] identifier[ServiceC... |
public Field generateHiveTypeInfoFieldForMetadataRecord(HiveTypeInfo hiveTypeInfo) {
Map<String, Field> fields = new HashMap<>();
fields.put(HiveMetastoreUtil.TYPE, Field.create(hiveTypeInfo.getHiveType().name()));
fields.put(HiveMetastoreUtil.EXTRA_INFO, generateExtraInfoFieldForMetadataRecord(hiveTypeInfo... | class class_name[name] begin[{]
method[generateHiveTypeInfoFieldForMetadataRecord, return_type[type[Field]], modifier[public], parameter[hiveTypeInfo]] begin[{]
local_variable[type[Map], fields]
call[fields.put, parameter[member[HiveMetastoreUtil.TYPE], call[Field.create, parameter[call... | Keyword[public] identifier[Field] identifier[generateHiveTypeInfoFieldForMetadataRecord] operator[SEP] identifier[HiveTypeInfo] identifier[hiveTypeInfo] operator[SEP] {
identifier[Map] operator[<] identifier[String] , identifier[Field] operator[>] identifier[fields] operator[=] Keyword[new] identifier[HashMap] ... |
public S isNotInstanceOf(Class<?> type) {
objects.assertIsNotInstanceOf(description, actual, type);
return myself;
} | class class_name[name] begin[{]
method[isNotInstanceOf, return_type[type[S]], modifier[public], parameter[type]] begin[{]
call[objects.assertIsNotInstanceOf, parameter[member[.description], member[.actual], member[.type]]]
return[member[.myself]]
end[}]
END[}] | Keyword[public] identifier[S] identifier[isNotInstanceOf] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[type] operator[SEP] {
identifier[objects] operator[SEP] identifier[assertIsNotInstanceOf] operator[SEP] identifier[description] , identifier[actual] , identifier[type] operat... |
public static int decodeDesc(byte[] src, int srcOffset, BigInteger[] valueRef)
throws CorruptEncodingException
{
int headerSize;
int bytesLength;
byte[] bytes;
try {
int header = src[srcOffset];
if (header == NULL_BYTE_HIGH || header == NULL_... | class class_name[name] begin[{]
method[decodeDesc, return_type[type[int]], modifier[public static], parameter[src, srcOffset, valueRef]] begin[{]
local_variable[type[int], headerSize]
local_variable[type[int], bytesLength]
local_variable[type[byte], bytes]
TryStatement(block=[Lo... | Keyword[public] Keyword[static] Keyword[int] identifier[decodeDesc] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[src] , Keyword[int] identifier[srcOffset] , identifier[BigInteger] operator[SEP] operator[SEP] identifier[valueRef] operator[SEP] Keyword[throws] identifier[CorruptEncodingException] ... |
public java.util.List<Location> getLocations() {
if (locations == null) {
locations = new com.amazonaws.internal.SdkInternalList<Location>();
}
return locations;
} | class class_name[name] begin[{]
method[getLocations, return_type[type[java]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.locations], ==, literal[null]]] begin[{]
assign[member[.locations], ClassCreator(arguments=[], body=None, constructor_type_ar... | Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[Location] operator[>] identifier[getLocations] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[locations] operator[==] Other[null] operator[SEP] {
identifier[locatio... |
public void toRSL(StringBuffer buf, boolean explicitConcat) {
buf.append("( ");
buf.append( getAttribute() );
buf.append(" = ");
Iterator iterator = values.iterator();
Binding binding;
while(iterator.hasNext()) {
binding = (Binding)iterator.next();
binding.toRSL(buf, explicitConcat);
if (iterator.h... | class class_name[name] begin[{]
method[toRSL, return_type[void], modifier[public], parameter[buf, explicitConcat]] begin[{]
call[buf.append, parameter[literal["( "]]]
call[buf.append, parameter[call[.getAttribute, parameter[]]]]
call[buf.append, parameter[literal... | Keyword[public] Keyword[void] identifier[toRSL] operator[SEP] identifier[StringBuffer] identifier[buf] , Keyword[boolean] identifier[explicitConcat] operator[SEP] {
identifier[buf] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier... |
public AT_Row setHtmlElementTranslator(HtmlElementTranslator htmlElementTranslator) {
if(this.hasCells()){
for(AT_Cell cell : this.getCells()){
cell.getContext().setHtmlElementTranslator(htmlElementTranslator);
}
}
return this;
} | class class_name[name] begin[{]
method[setHtmlElementTranslator, return_type[type[AT_Row]], modifier[public], parameter[htmlElementTranslator]] begin[{]
if[THIS[call[None.hasCells, parameter[]]]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(e... | Keyword[public] identifier[AT_Row] identifier[setHtmlElementTranslator] operator[SEP] identifier[HtmlElementTranslator] identifier[htmlElementTranslator] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[hasCells] operator[SEP] operator[SEP] operator[SEP] {
Keyword[for] ... |
public Observable<ImageKnowledge> visualSearchAsync(VisualSearchOptionalParameter visualSearchOptionalParameter) {
return visualSearchWithServiceResponseAsync(visualSearchOptionalParameter).map(new Func1<ServiceResponse<ImageKnowledge>, ImageKnowledge>() {
@Override
public ImageKnowledge... | class class_name[name] begin[{]
method[visualSearchAsync, return_type[type[Observable]], modifier[public], parameter[visualSearchOptionalParameter]] begin[{]
return[call[.visualSearchWithServiceResponseAsync, parameter[member[.visualSearchOptionalParameter]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[ImageKnowledge] operator[>] identifier[visualSearchAsync] operator[SEP] identifier[VisualSearchOptionalParameter] identifier[visualSearchOptionalParameter] operator[SEP] {
Keyword[return] identifier[visualSearchWithServiceResponseAsync] operator[SEP] ... |
public boolean release() {
if (this.released) {
// already (marked as) released...
return false;
}
this.released = true;
if (this.childCount == 0) {
if (this.parent == null) {
return true;
} else {
assert (this.parent.childCount > 0);
this.par... | class class_name[name] begin[{]
method[release, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
if[THIS[member[None.released]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
assign[THIS[member[None.released]], literal[t... | Keyword[public] Keyword[boolean] identifier[release] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[released] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
Keyword[this] operator[SEP] identifier[released] operator[=] lite... |
public LinearClassifier<L,F> trainSemiSupGE(GeneralDataset<L, F> labeledDataset, List<? extends Datum<L, F>> unlabeledDataList) {
List<F> GEFeatures = getHighPrecisionFeatures(labeledDataset,0.9,10);
return trainSemiSupGE(labeledDataset, unlabeledDataList, GEFeatures,0.5);
} | class class_name[name] begin[{]
method[trainSemiSupGE, return_type[type[LinearClassifier]], modifier[public], parameter[labeledDataset, unlabeledDataList]] begin[{]
local_variable[type[List], GEFeatures]
return[call[.trainSemiSupGE, parameter[member[.labeledDataset], member[.unlabeledDataList],... | Keyword[public] identifier[LinearClassifier] operator[<] identifier[L] , identifier[F] operator[>] identifier[trainSemiSupGE] operator[SEP] identifier[GeneralDataset] operator[<] identifier[L] , identifier[F] operator[>] identifier[labeledDataset] , identifier[List] operator[<] operator[?] Keyword[extends] identifie... |
public static Object getApiValue(Value value) {
if (value instanceof BooleanValue) {
return ((BooleanValue) value).getValue();
} else if (value instanceof NumberValue) {
if (Strings.isNullOrEmpty(((NumberValue) value).getValue())) {
return null;
} else {
try {
return ... | class class_name[name] begin[{]
method[getApiValue, return_type[type[Object]], modifier[public static], parameter[value]] begin[{]
if[binary_operation[member[.value], instanceof, type[BooleanValue]]] begin[{]
return[Cast(expression=MemberReference(member=value, postfix_operators=[],... | Keyword[public] Keyword[static] identifier[Object] identifier[getApiValue] operator[SEP] identifier[Value] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[BooleanValue] operator[SEP] {
Keyword[return] operator[SEP] operator[SEP] identifier[B... |
protected void setPriority(int priority)
{
if (tc.isEntryEnabled()) SibTr.entry(this, tc, "setPriority", ""+priority);
this.priority = priority;
if (tc.isEntryEnabled()) SibTr.exit(this, tc, "setPriority");
} | class class_name[name] begin[{]
method[setPriority, return_type[void], modifier[protected], parameter[priority]] begin[{]
if[call[tc.isEntryEnabled, parameter[]]] begin[{]
call[SibTr.entry, parameter[THIS[], member[.tc], literal["setPriority"], binary_operation[literal[""], +, membe... | Keyword[protected] Keyword[void] identifier[setPriority] operator[SEP] Keyword[int] identifier[priority] operator[SEP] {
Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] Keyw... |
public InputStream getInputStream(String bucketName, String key)
throws AmazonServiceException, AmazonClientException, InterruptedException, IOException {
Supplier<File> tempFileSupplier = ExceptionSoftener.softenSupplier(() -> Files.createTempFile(FileSystems.getDefault()
... | class class_name[name] begin[{]
method[getInputStream, return_type[type[InputStream]], modifier[public], parameter[bucketName, key]] begin[{]
local_variable[type[Supplier], tempFileSupplier]
return[call[.getInputStream, parameter[member[.bucketName], member[.key], member[.tempFileSupplier]]]]
... | Keyword[public] identifier[InputStream] identifier[getInputStream] operator[SEP] identifier[String] identifier[bucketName] , identifier[String] identifier[key] operator[SEP] Keyword[throws] identifier[AmazonServiceException] , identifier[AmazonClientException] , identifier[InterruptedException] , identifier[IOExcep... |
@Override
public OrderAnalyzerResult analyze() {
seenFamily = null;
final PersonNavigator navigator = new PersonNavigator(person);
for (final Family family : navigator.getFamilies()) {
setCurrentDate(null);
setSeenEvent(null);
checkFamily(family);
... | class class_name[name] begin[{]
method[analyze, return_type[type[OrderAnalyzerResult]], modifier[public], parameter[]] begin[{]
assign[member[.seenFamily], literal[null]]
local_variable[type[PersonNavigator], navigator]
ForStatement(body=BlockStatement(label=None, statements=[St... | annotation[@] identifier[Override] Keyword[public] identifier[OrderAnalyzerResult] identifier[analyze] operator[SEP] operator[SEP] {
identifier[seenFamily] operator[=] Other[null] operator[SEP] Keyword[final] identifier[PersonNavigator] identifier[navigator] operator[=] Keyword[new] identifier[PersonNavigator] o... |
public Matrix4f setFromIntrinsic(float alphaX, float alphaY, float gamma, float u0, float v0, int imgWidth, int imgHeight, float near, float far) {
float l00 = 2.0f / imgWidth;
float l11 = 2.0f / imgHeight;
float l22 = 2.0f / (near - far);
this.m00 = l00 * alphaX;
this.m01 = 0.0f... | class class_name[name] begin[{]
method[setFromIntrinsic, return_type[type[Matrix4f]], modifier[public], parameter[alphaX, alphaY, gamma, u0, v0, imgWidth, imgHeight, near, far]] begin[{]
local_variable[type[float], l00]
local_variable[type[float], l11]
local_variable[type[float], l22]
... | Keyword[public] identifier[Matrix4f] identifier[setFromIntrinsic] operator[SEP] Keyword[float] identifier[alphaX] , Keyword[float] identifier[alphaY] , Keyword[float] identifier[gamma] , Keyword[float] identifier[u0] , Keyword[float] identifier[v0] , Keyword[int] identifier[imgWidth] , Keyword[int] identifier[img... |
public static <T> T invokeExactConstructor(final Class<T> cls, Object[] args,
Class<?>[] parameterTypes) throws NoSuchMethodException, IllegalAccessException,
InvocationTargetException, InstantiationException {
args = ArrayUtils.nullToEmpty(args);
parameterTypes = ArrayUtils.null... | class class_name[name] begin[{]
method[invokeExactConstructor, return_type[type[T]], modifier[public static], parameter[cls, args, parameterTypes]] begin[{]
assign[member[.args], call[ArrayUtils.nullToEmpty, parameter[member[.args]]]]
assign[member[.parameterTypes], call[ArrayUt... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[invokeExactConstructor] operator[SEP] Keyword[final] identifier[Class] operator[<] identifier[T] operator[>] identifier[cls] , identifier[Object] operator[SEP] operator[SEP] identifier[args] , identifier[Class] operator[<] ... |
@Override
public ModuleBuild build(String mid, IResource resource, HttpServletRequest request, List<ICacheKeyGenerator> inKeyGens) throws Exception {
// Manage life span of thread locals used by this module builder
if (isFeatureDependent) {
threadLocalRequest.set(request);
threadLocalDependentFeatures... | class class_name[name] begin[{]
method[build, return_type[type[ModuleBuild]], modifier[public], parameter[mid, resource, request, inKeyGens]] begin[{]
if[member[.isFeatureDependent]] begin[{]
call[threadLocalRequest.set, parameter[member[.request]]]
... | annotation[@] identifier[Override] Keyword[public] identifier[ModuleBuild] identifier[build] operator[SEP] identifier[String] identifier[mid] , identifier[IResource] identifier[resource] , identifier[HttpServletRequest] identifier[request] , identifier[List] operator[<] identifier[ICacheKeyGenerator] operator[>] ide... |
public synchronized void download(StaplerRequest req, StaplerResponse rsp) throws InterruptedException, IOException {
rsp.setStatus(HttpServletResponse.SC_OK);
// server->client channel.
// this is created first, and this controls the lifespan of the channel
rsp.addHeader("Transfer-Enco... | class class_name[name] begin[{]
method[download, return_type[void], modifier[synchronized public], parameter[req, rsp]] begin[{]
call[rsp.setStatus, parameter[member[HttpServletResponse.SC_OK]]]
call[rsp.addHeader, parameter[literal["Transfer-Encoding"], literal["chunked"]]]
... | Keyword[public] Keyword[synchronized] Keyword[void] identifier[download] operator[SEP] identifier[StaplerRequest] identifier[req] , identifier[StaplerResponse] identifier[rsp] operator[SEP] Keyword[throws] identifier[InterruptedException] , identifier[IOException] {
identifier[rsp] operator[SEP] identifier[set... |
public final V set(int index, V value) {
int size = this.size;
if (index < 0 || index >= size) {
throw new IndexOutOfBoundsException();
}
int valueDataIndex = 1 + (index << 1);
V result = valueAtDataIndex(valueDataIndex);
this.data[valueDataIndex] = value;
return result;
} | class class_name[name] begin[{]
method[set, return_type[type[V]], modifier[final public], parameter[index, value]] begin[{]
local_variable[type[int], size]
if[binary_operation[binary_operation[member[.index], <, literal[0]], ||, binary_operation[member[.index], >=, member[.size]]]] begi... | Keyword[public] Keyword[final] identifier[V] identifier[set] operator[SEP] Keyword[int] identifier[index] , identifier[V] identifier[value] operator[SEP] {
Keyword[int] identifier[size] operator[=] Keyword[this] operator[SEP] identifier[size] operator[SEP] Keyword[if] operator[SEP] identifier[index] operator[<]... |
@Override
public BundleHashcodeType getBundleHashcodeType(String requestedPath) {
BundleHashcodeType typeBundleHashcode = BundleHashcodeType.UNKNOW_BUNDLE;
String[] pathInfos = PathNormalizer.extractBundleInfoFromPath(requestedPath, bundlePrefixes);
if (pathInfos != null) {
String bundlePrefix = pathInfos[... | class class_name[name] begin[{]
method[getBundleHashcodeType, return_type[type[BundleHashcodeType]], modifier[public], parameter[requestedPath]] begin[{]
local_variable[type[BundleHashcodeType], typeBundleHashcode]
local_variable[type[String], pathInfos]
if[binary_operation[memb... | annotation[@] identifier[Override] Keyword[public] identifier[BundleHashcodeType] identifier[getBundleHashcodeType] operator[SEP] identifier[String] identifier[requestedPath] operator[SEP] {
identifier[BundleHashcodeType] identifier[typeBundleHashcode] operator[=] identifier[BundleHashcodeType] operator[SEP] ide... |
public static String wrap(String line, int widthInCharacters, String indent) {
StringBuilder buffer = new StringBuilder();
int lineCount = 1;
int spaceIndex;
// if indent is null, then do not indent the wrapped lines
indent = (indent != null ? indent : EMPTY_STRING);
while (line.length() > w... | class class_name[name] begin[{]
method[wrap, return_type[type[String]], modifier[public static], parameter[line, widthInCharacters, indent]] begin[{]
local_variable[type[StringBuilder], buffer]
local_variable[type[int], lineCount]
local_variable[type[int], spaceIndex]
as... | Keyword[public] Keyword[static] identifier[String] identifier[wrap] operator[SEP] identifier[String] identifier[line] , Keyword[int] identifier[widthInCharacters] , identifier[String] identifier[indent] operator[SEP] {
identifier[StringBuilder] identifier[buffer] operator[=] Keyword[new] identifier[StringBuild... |
public void marshall(EmailChannelRequest emailChannelRequest, ProtocolMarshaller protocolMarshaller) {
if (emailChannelRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(emailChannelRequest.ge... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[emailChannelRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.emailChannelRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[EmailChannelRequest] identifier[emailChannelRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[emailChannelRequest] operator[==] Other[null] operator[SEP] {
... |
@Override
public void error(final MessageItem messageItem) {
getLogger().error(messageItem.getMarker(), messageItem.getText());
throwError(messageItem, null);
} | class class_name[name] begin[{]
method[error, return_type[void], modifier[public], parameter[messageItem]] begin[{]
call[.getLogger, parameter[]]
call[.throwError, parameter[member[.messageItem], literal[null]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[error] operator[SEP] Keyword[final] identifier[MessageItem] identifier[messageItem] operator[SEP] {
identifier[getLogger] operator[SEP] operator[SEP] operator[SEP] identifier[error] operator[SEP] identifier[messageItem] operator[SEP] ide... |
public void marshall(GetCrawlersRequest getCrawlersRequest, ProtocolMarshaller protocolMarshaller) {
if (getCrawlersRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(getCrawlersRequest.getMax... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[getCrawlersRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.getCrawlersRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(p... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[GetCrawlersRequest] identifier[getCrawlersRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[getCrawlersRequest] operator[==] Other[null] operator[SEP] {
... |
public void marshall(EncryptionKey encryptionKey, ProtocolMarshaller protocolMarshaller) {
if (encryptionKey == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(encryptionKey.getId(), ID_BINDING);
... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[encryptionKey, protocolMarshaller]] begin[{]
if[binary_operation[member[.encryptionKey], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_ope... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[EncryptionKey] identifier[encryptionKey] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[encryptionKey] operator[==] Other[null] operator[SEP] {
Keyword[thr... |
protected int exportTemplateResource(CmsStaticExportData data, StringBuffer cookies) throws IOException {
String vfsName = data.getVfsName();
String rfsName = data.getRfsName();
CmsStaticExportManager manager = OpenCms.getStaticExportManager();
String exportUrlStr;
if (rfsName.... | class class_name[name] begin[{]
method[exportTemplateResource, return_type[type[int]], modifier[protected], parameter[data, cookies]] begin[{]
local_variable[type[String], vfsName]
local_variable[type[String], rfsName]
local_variable[type[CmsStaticExportManager], manager]
local_... | Keyword[protected] Keyword[int] identifier[exportTemplateResource] operator[SEP] identifier[CmsStaticExportData] identifier[data] , identifier[StringBuffer] identifier[cookies] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[vfsName] operator[=] identifier[data] operator[SE... |
public static String mapToPtPath(final String aBasePath, final String aID, final String aEncapsulatedName) {
final String ptPath;
Objects.requireNonNull(aID);
if (aEncapsulatedName == null) {
ptPath = concat(aBasePath, mapToPtPath(aID));
} else {
ptPath = concat... | class class_name[name] begin[{]
method[mapToPtPath, return_type[type[String]], modifier[public static], parameter[aBasePath, aID, aEncapsulatedName]] begin[{]
local_variable[type[String], ptPath]
call[Objects.requireNonNull, parameter[member[.aID]]]
if[binary_operation[m... | Keyword[public] Keyword[static] identifier[String] identifier[mapToPtPath] operator[SEP] Keyword[final] identifier[String] identifier[aBasePath] , Keyword[final] identifier[String] identifier[aID] , Keyword[final] identifier[String] identifier[aEncapsulatedName] operator[SEP] {
Keyword[final] identifier[String... |
public FessMessages addErrorsInvalidStrIsIncluded(String property, String arg0, String arg1) {
assertPropertyNotNull(property);
add(property, new UserMessage(ERRORS_invalid_str_is_included, arg0, arg1));
return this;
} | class class_name[name] begin[{]
method[addErrorsInvalidStrIsIncluded, return_type[type[FessMessages]], modifier[public], parameter[property, arg0, arg1]] begin[{]
call[.assertPropertyNotNull, parameter[member[.property]]]
call[.add, parameter[member[.property], ClassCreator(argu... | Keyword[public] identifier[FessMessages] identifier[addErrorsInvalidStrIsIncluded] operator[SEP] identifier[String] identifier[property] , identifier[String] identifier[arg0] , identifier[String] identifier[arg1] operator[SEP] {
identifier[assertPropertyNotNull] operator[SEP] identifier[property] operator[SEP]... |
public void perform(TaskRequest req, TaskResponse res) {
HttpServletResponse resp = (HttpServletResponse) response.evaluate(req, res);
Integer sc = (Integer) statusCode.evaluate(req, res);
resp.setStatus(sc);
} | class class_name[name] begin[{]
method[perform, return_type[void], modifier[public], parameter[req, res]] begin[{]
local_variable[type[HttpServletResponse], resp]
local_variable[type[Integer], sc]
call[resp.setStatus, parameter[member[.sc]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[perform] operator[SEP] identifier[TaskRequest] identifier[req] , identifier[TaskResponse] identifier[res] operator[SEP] {
identifier[HttpServletResponse] identifier[resp] operator[=] operator[SEP] identifier[HttpServletResponse] operator[SEP] identifier[response] operato... |
public void marshall(DestinationSettings destinationSettings, ProtocolMarshaller protocolMarshaller) {
if (destinationSettings == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(destinationSettings.ge... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[destinationSettings, protocolMarshaller]] begin[{]
if[binary_operation[member[.destinationSettings], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DestinationSettings] identifier[destinationSettings] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[destinationSettings] operator[==] Other[null] operator[SEP] {
... |
private static Integer[] intersectedDocList(int[] facetDocList,
Integer[] docSet) {
if (facetDocList != null && docSet != null) {
Integer[] c = new Integer[Math.min(facetDocList.length, docSet.length)];
int ai = 0;
int bi = 0;
int ci = 0;
while (ai < facetDocList.length && bi < d... | class class_name[name] begin[{]
method[intersectedDocList, return_type[type[Integer]], modifier[private static], parameter[facetDocList, docSet]] begin[{]
if[binary_operation[binary_operation[member[.facetDocList], !=, literal[null]], &&, binary_operation[member[.docSet], !=, literal[null]]]] b... | Keyword[private] Keyword[static] identifier[Integer] operator[SEP] operator[SEP] identifier[intersectedDocList] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[facetDocList] , identifier[Integer] operator[SEP] operator[SEP] identifier[docSet] operator[SEP] {
Keyword[if] operator[SEP] identifie... |
public void setBinary(File binary) {
options.get(BINARY).setValue(BINARY.sanitize(binary));
} | class class_name[name] begin[{]
method[setBinary, return_type[void], modifier[public], parameter[binary]] begin[{]
call[options.get, parameter[member[.BINARY]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setBinary] operator[SEP] identifier[File] identifier[binary] operator[SEP] {
identifier[options] operator[SEP] identifier[get] operator[SEP] identifier[BINARY] operator[SEP] operator[SEP] identifier[setValue] operator[SEP] identifier[BINARY] operator[SEP] identifier[sanit... |
@Pure
public Rectangle2d toBounds2D() {
int startIndex = this.id.indexOf('#');
if (startIndex <= 0) {
return null;
}
try {
int endIndex = this.id.indexOf(';', startIndex);
if (endIndex <= startIndex) {
return null;
}
final long minx = Long.parseLong(this.id.substring(startIndex + 1, endInde... | class class_name[name] begin[{]
method[toBounds2D, return_type[type[Rectangle2d]], modifier[public], parameter[]] begin[{]
local_variable[type[int], startIndex]
if[binary_operation[member[.startIndex], <=, literal[0]]] begin[{]
return[literal[null]]
else begin[{]
Non... | annotation[@] identifier[Pure] Keyword[public] identifier[Rectangle2d] identifier[toBounds2D] operator[SEP] operator[SEP] {
Keyword[int] identifier[startIndex] operator[=] Keyword[this] operator[SEP] identifier[id] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keywor... |
public ApiResponse<List<FactionWarfareSystemsResponse>> getFwSystemsWithHttpInfo(String datasource,
String ifNoneMatch) throws ApiException {
com.squareup.okhttp.Call call = getFwSystemsValidateBeforeCall(datasource, ifNoneMatch, null);
Type localVarReturnType = new TypeToken<List<FactionWar... | class class_name[name] begin[{]
method[getFwSystemsWithHttpInfo, return_type[type[ApiResponse]], modifier[public], parameter[datasource, ifNoneMatch]] begin[{]
local_variable[type[com], call]
local_variable[type[Type], localVarReturnType]
return[call[apiClient.execute, parameter[member[... | Keyword[public] identifier[ApiResponse] operator[<] identifier[List] operator[<] identifier[FactionWarfareSystemsResponse] operator[>] operator[>] identifier[getFwSystemsWithHttpInfo] operator[SEP] identifier[String] identifier[datasource] , identifier[String] identifier[ifNoneMatch] operator[SEP] Keyword[throws] iden... |
@SuppressWarnings("unchecked")
public Query limit(int limit) {
if (limit < 0) {
throw new IllegalArgumentException(format("Limit of %d is negative.", limit));
}
if (limit > MAX_LIMIT) {
throw new IllegalArgumentException(
format("Limit of %d is greater than %d.", limit, MAX_LIMIT)
... | class class_name[name] begin[{]
method[limit, return_type[type[Query]], modifier[public], parameter[limit]] begin[{]
if[binary_operation[member[.limit], <, literal[0]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[Query] identifier[limit] operator[SEP] Keyword[int] identifier[limit] operator[SEP] {
Keyword[if] operator[SEP] identifier[limit] operator[<] Other[0] operator[SEP] {
Keyword[throw] Keywor... |
public MuServer start() {
if (httpPort < 0 && httpsPort < 0) {
throw new IllegalArgumentException("No ports were configured. Please call MuServerBuilder.withHttpPort(int) or MuServerBuilder.withHttpsPort(int)");
}
ServerSettings settings = new ServerSettings(minimumGzipSize, maxHead... | class class_name[name] begin[{]
method[start, return_type[type[MuServer]], modifier[public], parameter[]] begin[{]
if[binary_operation[binary_operation[member[.httpPort], <, literal[0]], &&, binary_operation[member[.httpsPort], <, literal[0]]]] begin[{]
ThrowStatement(expression=Cla... | Keyword[public] identifier[MuServer] identifier[start] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[httpPort] operator[<] Other[0] operator[&&] identifier[httpsPort] operator[<] Other[0] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP... |
public GetDiscoveredResourceCountsResult withResourceCounts(ResourceCount... resourceCounts) {
if (this.resourceCounts == null) {
setResourceCounts(new com.amazonaws.internal.SdkInternalList<ResourceCount>(resourceCounts.length));
}
for (ResourceCount ele : resourceCounts) {
... | class class_name[name] begin[{]
method[withResourceCounts, return_type[type[GetDiscoveredResourceCountsResult]], modifier[public], parameter[resourceCounts]] begin[{]
if[binary_operation[THIS[member[None.resourceCounts]], ==, literal[null]]] begin[{]
call[.setResourceCou... | Keyword[public] identifier[GetDiscoveredResourceCountsResult] identifier[withResourceCounts] operator[SEP] identifier[ResourceCount] operator[...] identifier[resourceCounts] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[resourceCounts] operator[==] Other[null] operator[SEP] {
... |
protected String getLockToken(String tokenHash)
{
for (String token : tokens.keySet())
{
if (tokens.get(token).equals(tokenHash))
{
return token;
}
}
return null;
} | class class_name[name] begin[{]
method[getLockToken, return_type[type[String]], modifier[protected], parameter[tokenHash]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=token, postfix_operators=[], prefix_opera... | Keyword[protected] identifier[String] identifier[getLockToken] operator[SEP] identifier[String] identifier[tokenHash] operator[SEP] {
Keyword[for] operator[SEP] identifier[String] identifier[token] operator[:] identifier[tokens] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] {
... |
private static byte[] makeRandomChallenge(final Random random) throws AuthenticationException {
final byte[] rval = new byte[8];
synchronized (random) {
random.nextBytes(rval);
}
return rval;
} | class class_name[name] begin[{]
method[makeRandomChallenge, return_type[type[byte]], modifier[private static], parameter[random]] begin[{]
local_variable[type[byte], rval]
SYNCHRONIZED[member[.random]] BEGIN[{]
call[random.nextBytes, parameter[member[.rval]]]
... | Keyword[private] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[makeRandomChallenge] operator[SEP] Keyword[final] identifier[Random] identifier[random] operator[SEP] Keyword[throws] identifier[AuthenticationException] {
Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[rva... |
public Vector<Object> createSpecification(Vector<Object> specificationParams)
{
try
{
Specification specification = XmlRpcDataMarshaller.toSpecification( specificationParams );
specification = service.createSpecification( specification );
log.debug( "Created spe... | class class_name[name] begin[{]
method[createSpecification, return_type[type[Vector]], modifier[public], parameter[specificationParams]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberRef... | Keyword[public] identifier[Vector] operator[<] identifier[Object] operator[>] identifier[createSpecification] operator[SEP] identifier[Vector] operator[<] identifier[Object] operator[>] identifier[specificationParams] operator[SEP] {
Keyword[try] {
identifier[Specification] identifier[specification] o... |
public Observable<ServiceResponse<Page<RecordSetInner>>> listByDnsZoneNextWithServiceResponseAsync(final String nextPageLink) {
return listByDnsZoneNextSinglePageAsync(nextPageLink)
.concatMap(new Func1<ServiceResponse<Page<RecordSetInner>>, Observable<ServiceResponse<Page<RecordSetInner>>>>() {
... | class class_name[name] begin[{]
method[listByDnsZoneNextWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[nextPageLink]] begin[{]
return[call[.listByDnsZoneNextSinglePageAsync, parameter[member[.nextPageLink]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[RecordSetInner] operator[>] operator[>] operator[>] identifier[listByDnsZoneNextWithServiceResponseAsync] operator[SEP] Keyword[final] identifier[String] identifier[nextPageLink] operator[S... |
public MutableInt mapInput(final IntUnaryOperator fn) {
final MutableInt host = this;
return new MutableInt() {
@Override
public MutableInt set(final int value) {
host.set(fn.applyAsInt(value));
return this;
}
};
} | class class_name[name] begin[{]
method[mapInput, return_type[type[MutableInt]], modifier[public], parameter[fn]] begin[{]
local_variable[type[MutableInt], host]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpres... | Keyword[public] identifier[MutableInt] identifier[mapInput] operator[SEP] Keyword[final] identifier[IntUnaryOperator] identifier[fn] operator[SEP] {
Keyword[final] identifier[MutableInt] identifier[host] operator[=] Keyword[this] operator[SEP] Keyword[return] Keyword[new] identifier[MutableInt] operator[SEP] ope... |
public void set(String fieldName, Object value) throws IOException {
getValueMarshaller(fieldName).setWritableObject(struct, value);
LOG.debug("Set {}={}", fieldName, value);
} | class class_name[name] begin[{]
method[set, return_type[void], modifier[public], parameter[fieldName, value]] begin[{]
call[.getValueMarshaller, parameter[member[.fieldName]]]
call[LOG.debug, parameter[literal["Set {}={}"], member[.fieldName], member[.value]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[set] operator[SEP] identifier[String] identifier[fieldName] , identifier[Object] identifier[value] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[getValueMarshaller] operator[SEP] identifier[fieldName] operator[SEP] operator[SEP] identifier[setWritabl... |
private static void parseSsextensions(JSONObject modelJSON,
Diagram current) throws JSONException {
if (modelJSON.has("ssextensions")) {
JSONArray array = modelJSON.getJSONArray("ssextensions");
for (int i = 0; i < array.length(); i++) {
... | class class_name[name] begin[{]
method[parseSsextensions, return_type[void], modifier[private static], parameter[modelJSON, current]] begin[{]
if[call[modelJSON.has, parameter[literal["ssextensions"]]]] begin[{]
local_variable[type[JSONArray], array]
ForStatement(body=Bl... | Keyword[private] Keyword[static] Keyword[void] identifier[parseSsextensions] operator[SEP] identifier[JSONObject] identifier[modelJSON] , identifier[Diagram] identifier[current] operator[SEP] Keyword[throws] identifier[JSONException] {
Keyword[if] operator[SEP] identifier[modelJSON] operator[SEP] identifier[has... |
public static String suggestPrefix(String uri){
if(uri==null)
uri = "";
return suggested.getProperty(uri);
} | class class_name[name] begin[{]
method[suggestPrefix, return_type[type[String]], modifier[public static], parameter[uri]] begin[{]
if[binary_operation[member[.uri], ==, literal[null]]] begin[{]
assign[member[.uri], literal[""]]
else begin[{]
None
end[}]
retur... | Keyword[public] Keyword[static] identifier[String] identifier[suggestPrefix] operator[SEP] identifier[String] identifier[uri] operator[SEP] {
Keyword[if] operator[SEP] identifier[uri] operator[==] Other[null] operator[SEP] identifier[uri] operator[=] literal[String] operator[SEP] Keyword[return] identifier[sugge... |
@Override
public List<Version<T>> findVersionsBetween(Timestamp start, Timestamp end) {
return query().findVersionsBetween(start, end);
} | class class_name[name] begin[{]
method[findVersionsBetween, return_type[type[List]], modifier[public], parameter[start, end]] begin[{]
return[call[.query, parameter[]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[Version] operator[<] identifier[T] operator[>] operator[>] identifier[findVersionsBetween] operator[SEP] identifier[Timestamp] identifier[start] , identifier[Timestamp] identifier[end] operator[SEP] {
Keyword[return] iden... |
@OnMessage
public void onMessage(String message, Session session) {
RequestParser parser = new RequestParser();
try {
if (!parser.parseRequest(message)) {
respondWithErrorMessage(parser.getErrorMessage(), parser.getFailedStatus(), session);
return;
... | class class_name[name] begin[{]
method[onMessage, return_type[void], modifier[public], parameter[message, session]] begin[{]
local_variable[type[RequestParser], parser]
TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=message, postfix_operators=[], pr... | annotation[@] identifier[OnMessage] Keyword[public] Keyword[void] identifier[onMessage] operator[SEP] identifier[String] identifier[message] , identifier[Session] identifier[session] operator[SEP] {
identifier[RequestParser] identifier[parser] operator[=] Keyword[new] identifier[RequestParser] operator[SEP] ope... |
public static Throwable trySetAccessible(AccessibleObject object, boolean checkAccessible) {
if (checkAccessible && !PlatformDependent0.isExplicitTryReflectionSetAccessible()) {
return new UnsupportedOperationException("Reflective setAccessible(true) disabled");
}
try {
o... | class class_name[name] begin[{]
method[trySetAccessible, return_type[type[Throwable]], modifier[public static], parameter[object, checkAccessible]] begin[{]
if[binary_operation[member[.checkAccessible], &&, call[PlatformDependent0.isExplicitTryReflectionSetAccessible, parameter[]]]] begin[{]
... | Keyword[public] Keyword[static] identifier[Throwable] identifier[trySetAccessible] operator[SEP] identifier[AccessibleObject] identifier[object] , Keyword[boolean] identifier[checkAccessible] operator[SEP] {
Keyword[if] operator[SEP] identifier[checkAccessible] operator[&&] operator[!] identifier[PlatformDepend... |
private <T extends NotificationViewData> List<T> reallyFilterNotifications(List<T> notifications, List<String> notificationTypesToInclude) {
return notifications
.stream()
.filter(notification -> notificationTypesToInclude.contains(notification.getType().name()))
... | class class_name[name] begin[{]
method[reallyFilterNotifications, return_type[type[List]], modifier[private], parameter[notifications, notificationTypesToInclude]] begin[{]
return[call[notifications.stream, parameter[]]]
end[}]
END[}] | Keyword[private] operator[<] identifier[T] Keyword[extends] identifier[NotificationViewData] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[reallyFilterNotifications] operator[SEP] identifier[List] operator[<] identifier[T] operator[>] identifier[notifications] , identifier[List] operato... |
public final void constantExpression() throws RecognitionException {
int constantExpression_StartIndex = input.index();
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 107) ) { return; }
// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1115:5: ( expression )
// src/main/... | class class_name[name] begin[{]
method[constantExpression, return_type[void], modifier[final public], parameter[]] begin[{]
local_variable[type[int], constantExpression_StartIndex]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member... | Keyword[public] Keyword[final] Keyword[void] identifier[constantExpression] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
Keyword[int] identifier[constantExpression_StartIndex] operator[=] identifier[input] operator[SEP] identifier[index] operator[SEP] operator[SEP] operator[SEP]... |
@Weight(Weight.Unit.VARIABLE)
@Nonnull
public static StackTraceElement stackElement() {
final StackTraceElement[] allElements = Thread.currentThread().getStackTrace();
return allElements[2];
} | class class_name[name] begin[{]
method[stackElement, return_type[type[StackTraceElement]], modifier[public static], parameter[]] begin[{]
local_variable[type[StackTraceElement], allElements]
return[member[.allElements]]
end[}]
END[}] | annotation[@] identifier[Weight] operator[SEP] identifier[Weight] operator[SEP] identifier[Unit] operator[SEP] identifier[VARIABLE] operator[SEP] annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] identifier[StackTraceElement] identifier[stackElement] operator[SEP] operator[SEP] {
Keyword[final] i... |
public void addPodClassPath(String pod, PathImpl classPath)
{
PodConfigLocal config = getPodLocal(pod);
synchronized (config) {
config.addClassPath(classPath);
}
} | class class_name[name] begin[{]
method[addPodClassPath, return_type[void], modifier[public], parameter[pod, classPath]] begin[{]
local_variable[type[PodConfigLocal], config]
SYNCHRONIZED[member[.config]] BEGIN[{]
call[config.addClassPath, parameter[member[.classP... | Keyword[public] Keyword[void] identifier[addPodClassPath] operator[SEP] identifier[String] identifier[pod] , identifier[PathImpl] identifier[classPath] operator[SEP] {
identifier[PodConfigLocal] identifier[config] operator[=] identifier[getPodLocal] operator[SEP] identifier[pod] operator[SEP] operator[SEP] Keyw... |
public static Stream<MutableIntTuple> stream(
Order order, IntTuple min, IntTuple max)
{
if (order == null)
{
return null;
}
Utils.checkForEqualSize(min, max);
MutableIntTuple localMin = IntTuples.copy(min);
MutableIntTuple localMax = IntT... | class class_name[name] begin[{]
method[stream, return_type[type[Stream]], modifier[public static], parameter[order, min, max]] begin[{]
if[binary_operation[member[.order], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
ca... | Keyword[public] Keyword[static] identifier[Stream] operator[<] identifier[MutableIntTuple] operator[>] identifier[stream] operator[SEP] identifier[Order] identifier[order] , identifier[IntTuple] identifier[min] , identifier[IntTuple] identifier[max] operator[SEP] {
Keyword[if] operator[SEP] identifier[order] o... |
public static Map<String, List<Object>> convertAttributeValuesToMultiValuedObjects(final Map<String, Object> attributes) {
val entries = attributes.entrySet();
return entries
.stream()
.collect(Collectors.toMap(Map.Entry::getKey, entry -> {
val value = entry.getVa... | class class_name[name] begin[{]
method[convertAttributeValuesToMultiValuedObjects, return_type[type[Map]], modifier[public static], parameter[attributes]] begin[{]
local_variable[type[val], entries]
return[call[entries.stream, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[Object] operator[>] operator[>] identifier[convertAttributeValuesToMultiValuedObjects] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] i... |
public Cookie get(String cookieName) {
AssertParameter.notNull(cookieName, "Cookie name");
return cookies.get(cookieName);
} | class class_name[name] begin[{]
method[get, return_type[type[Cookie]], modifier[public], parameter[cookieName]] begin[{]
call[AssertParameter.notNull, parameter[member[.cookieName], literal["Cookie name"]]]
return[call[cookies.get, parameter[member[.cookieName]]]]
end[}]
END[}] | Keyword[public] identifier[Cookie] identifier[get] operator[SEP] identifier[String] identifier[cookieName] operator[SEP] {
identifier[AssertParameter] operator[SEP] identifier[notNull] operator[SEP] identifier[cookieName] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[cookies] operator... |
private void createResultSubClassesMultipleJoinedTables(List result, ClassDescriptor cld, boolean wholeTree)
{
List tmp = (List) superClassMultipleJoinedTablesMap.get(cld.getClassOfObject());
if(tmp != null)
{
result.addAll(tmp);
if(wholeTree)
{
... | class class_name[name] begin[{]
method[createResultSubClassesMultipleJoinedTables, return_type[void], modifier[private], parameter[result, cld, wholeTree]] begin[{]
local_variable[type[List], tmp]
if[binary_operation[member[.tmp], !=, literal[null]]] begin[{]
cal... | Keyword[private] Keyword[void] identifier[createResultSubClassesMultipleJoinedTables] operator[SEP] identifier[List] identifier[result] , identifier[ClassDescriptor] identifier[cld] , Keyword[boolean] identifier[wholeTree] operator[SEP] {
identifier[List] identifier[tmp] operator[=] operator[SEP] identifier[Li... |
public static int findAvailablePortFrom(int minPort) {
for (int port = minPort; port < PORT_RANGE_MAX; port++) {
if (isPortAvailable(port)) {
return port;
}
}
throw new IllegalStateException(
String.format("Could not find an available tcp port in the range [%d, %d]", minPort, PORT_RANGE_MAX));
} | class class_name[name] begin[{]
method[findAvailablePortFrom, return_type[type[int]], modifier[public static], parameter[minPort]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=port, postfix_operators=[], prefi... | Keyword[public] Keyword[static] Keyword[int] identifier[findAvailablePortFrom] operator[SEP] Keyword[int] identifier[minPort] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[port] operator[=] identifier[minPort] operator[SEP] identifier[port] operator[<] identifier[PORT_RANGE_MAX] operator[SEP... |
@Nonnull
public static String getFormatted (@Nonnull final BigInteger aValue, @Nonnull final Locale aDisplayLocale)
{
ValueEnforcer.notNull (aValue, "Value");
ValueEnforcer.notNull (aDisplayLocale, "DisplayLocale");
return NumberFormat.getIntegerInstance (aDisplayLocale).format (aValue);
} | class class_name[name] begin[{]
method[getFormatted, return_type[type[String]], modifier[public static], parameter[aValue, aDisplayLocale]] begin[{]
call[ValueEnforcer.notNull, parameter[member[.aValue], literal["Value"]]]
call[ValueEnforcer.notNull, parameter[member[.aDisplayLo... | annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] identifier[String] identifier[getFormatted] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[BigInteger] identifier[aValue] , annotation[@] identifier[Nonnull] Keyword[final] identifier[Locale] identifier[aDisplayLocale] operato... |
private boolean validParameter(final String s) {
final String[] tokens = PARAMS_REGEX.split(s);
if (tokens.length != 2) {
return false;
}
final char first = s.charAt(0);
String second = tokens[1];
if (second.endsWith(VARARGS_SUFFIX)) {
// value en... | class class_name[name] begin[{]
method[validParameter, return_type[type[boolean]], modifier[private], parameter[s]] begin[{]
local_variable[type[String], tokens]
if[binary_operation[member[tokens.length], !=, literal[2]]] begin[{]
return[literal[false]]
else begin[{]... | Keyword[private] Keyword[boolean] identifier[validParameter] operator[SEP] Keyword[final] identifier[String] identifier[s] operator[SEP] {
Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[tokens] operator[=] identifier[PARAMS_REGEX] operator[SEP] identifier[split] operator[SEP] identifier... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.