code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public void loadNewElementInfo(final AsyncCallback<Void> callback) {
CmsRpcAction<List<CmsNewResourceInfo>> newResourceInfoAction = new CmsRpcAction<List<CmsNewResourceInfo>>() {
@Override
public void execute() {
start(200, true);
getService().getNewEl... | class class_name[name] begin[{]
method[loadNewElementInfo, return_type[void], modifier[public], parameter[callback]] begin[{]
local_variable[type[CmsRpcAction], newResourceInfoAction]
call[newResourceInfoAction.execute, parameter[]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[loadNewElementInfo] operator[SEP] Keyword[final] identifier[AsyncCallback] operator[<] identifier[Void] operator[>] identifier[callback] operator[SEP] {
identifier[CmsRpcAction] operator[<] identifier[List] operator[<] identifier[CmsNewResourceInfo] operator[>] operator[>... |
@Override
public EClass getIfcTextureMap() {
if (ifcTextureMapEClass == null) {
ifcTextureMapEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI).getEClassifiers()
.get(719);
}
return ifcTextureMapEClass;
} | class class_name[name] begin[{]
method[getIfcTextureMap, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcTextureMapEClass], ==, literal[null]]] begin[{]
assign[member[.ifcTextureMapEClass], Cast(expression=MethodInvocatio... | annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcTextureMap] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcTextureMapEClass] operator[==] Other[null] operator[SEP] {
identifier[ifcTextureMapEClass] operator[=] operator[SEP] identifier[EClas... |
public void getBytes(byte cs[], int start) {
System.arraycopy(getByteArray(), getByteOffset(), cs, start, getByteLength());
} | class class_name[name] begin[{]
method[getBytes, return_type[void], modifier[public], parameter[cs, start]] begin[{]
call[System.arraycopy, parameter[call[.getByteArray, parameter[]], call[.getByteOffset, parameter[]], member[.cs], member[.start], call[.getByteLength, parameter[]]]]
end[}]
... | Keyword[public] Keyword[void] identifier[getBytes] operator[SEP] Keyword[byte] identifier[cs] operator[SEP] operator[SEP] , Keyword[int] identifier[start] operator[SEP] {
identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[getByteArray] operator[SEP] operator[SEP] , identifier[getBy... |
public T build() throws ProxyException {
if (this.root == null) {
throw new IllegalArgumentException("root must not be null!");
}
if (this.interfacesToImplementations.isEmpty()) {
// nothing to proxy
return this.root;
}
try {
ProxyMethodHandler methodHandler = new ProxyMet... | class class_name[name] begin[{]
method[build, return_type[type[T]], modifier[public], parameter[]] begin[{]
if[binary_operation[THIS[member[None.root]], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], ... | Keyword[public] identifier[T] identifier[build] operator[SEP] operator[SEP] Keyword[throws] identifier[ProxyException] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[root] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalArgumentException] oper... |
@GET
@Path("{id}/history")
public Response fetchHistory(@PathParam("id") URI_ID id) throws Exception {
return super.fetchHistory(id);
} | class class_name[name] begin[{]
method[fetchHistory, return_type[type[Response]], modifier[public], parameter[id]] begin[{]
return[SuperMethodInvocation(arguments=[MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fetchHistory, postfix_operators=[]... | annotation[@] identifier[GET] annotation[@] identifier[Path] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[Response] identifier[fetchHistory] operator[SEP] annotation[@] identifier[PathParam] operator[SEP] literal[String] operator[SEP] identifier[URI_ID] identifier[id] operator[SEP] Keyword[thr... |
public void marshall(UpdateUploadRequest updateUploadRequest, ProtocolMarshaller protocolMarshaller) {
if (updateUploadRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(updateUploadRequest.ge... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[updateUploadRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.updateUploadRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[UpdateUploadRequest] identifier[updateUploadRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[updateUploadRequest] operator[==] Other[null] operator[SEP] {
... |
public Object unmarshal(HierarchicalStreamReader reader,
UnmarshallingContext context) {
XEventImpl event = new XEventImpl();
String id = reader.getAttribute("xid");
event.setID(XID.parse(id));
if (reader.hasMoreChildren()) {
reader.moveDown();
XAttributeMap attributes = (XAttributeMap) context.conve... | class class_name[name] begin[{]
method[unmarshal, return_type[type[Object]], modifier[public], parameter[reader, context]] begin[{]
local_variable[type[XEventImpl], event]
local_variable[type[String], id]
call[event.setID, parameter[call[XID.parse, parameter[member[.id]]]]]
... | Keyword[public] identifier[Object] identifier[unmarshal] operator[SEP] identifier[HierarchicalStreamReader] identifier[reader] , identifier[UnmarshallingContext] identifier[context] operator[SEP] {
identifier[XEventImpl] identifier[event] operator[=] Keyword[new] identifier[XEventImpl] operator[SEP] operator[SE... |
public void beginDelete(String resourceGroupName, String applicationGatewayName) {
beginDeleteWithServiceResponseAsync(resourceGroupName, applicationGatewayName).toBlocking().single().body();
} | class class_name[name] begin[{]
method[beginDelete, return_type[void], modifier[public], parameter[resourceGroupName, applicationGatewayName]] begin[{]
call[.beginDeleteWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.applicationGatewayName]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[beginDelete] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[applicationGatewayName] operator[SEP] {
identifier[beginDeleteWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[applicationGatewa... |
protected void appendWhereClause(StringBuffer where, Criteria crit, StringBuffer stmt)
{
if (where.length() == 0)
{
where = null;
}
if (where != null || (crit != null && !crit.isEmpty()))
{
stmt.append(" WHERE ");
appendClause(wh... | class class_name[name] begin[{]
method[appendWhereClause, return_type[void], modifier[protected], parameter[where, crit, stmt]] begin[{]
if[binary_operation[call[where.length, parameter[]], ==, literal[0]]] begin[{]
assign[member[.where], literal[null]]
else begi... | Keyword[protected] Keyword[void] identifier[appendWhereClause] operator[SEP] identifier[StringBuffer] identifier[where] , identifier[Criteria] identifier[crit] , identifier[StringBuffer] identifier[stmt] operator[SEP] {
Keyword[if] operator[SEP] identifier[where] operator[SEP] identifier[length] operator[SEP] ... |
private static SpoutNode getDRPCSpoutNode(Collection<Node> g) {
for(Node n: g) {
if(n instanceof SpoutNode) {
SpoutNode.SpoutType type = ((SpoutNode) n).type;
if(type==SpoutNode.SpoutType.DRPC) {
return (SpoutNode) n;
}
... | class class_name[name] begin[{]
method[getDRPCSpoutNode, return_type[type[SpoutNode]], modifier[private static], parameter[g]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=n, postfix_operators=[], prefix_operator... | Keyword[private] Keyword[static] identifier[SpoutNode] identifier[getDRPCSpoutNode] operator[SEP] identifier[Collection] operator[<] identifier[Node] operator[>] identifier[g] operator[SEP] {
Keyword[for] operator[SEP] identifier[Node] identifier[n] operator[:] identifier[g] operator[SEP] {
Keyword[i... |
public static base_response add(nitro_service client, dnssuffix resource) throws Exception {
dnssuffix addresource = new dnssuffix();
addresource.Dnssuffix = resource.Dnssuffix;
return addresource.add_resource(client);
} | class class_name[name] begin[{]
method[add, return_type[type[base_response]], modifier[public static], parameter[client, resource]] begin[{]
local_variable[type[dnssuffix], addresource]
assign[member[addresource.Dnssuffix], member[resource.Dnssuffix]]
return[call[addresource.add... | Keyword[public] Keyword[static] identifier[base_response] identifier[add] operator[SEP] identifier[nitro_service] identifier[client] , identifier[dnssuffix] identifier[resource] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[dnssuffix] identifier[addresource] operator[=] Keyword[new] identifie... |
private void registerConvertersFromPackage() {
register(new BigDecimalConverter());
register(new BigIntegerConverter());
register(new BooleanConverter());
register(new ByteConverter());
register(new DateConverter());
register(new CharacterConverter());
register(new DoubleConverter());
r... | class class_name[name] begin[{]
method[registerConvertersFromPackage, return_type[void], modifier[private], parameter[]] begin[{]
call[.register, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors... | Keyword[private] Keyword[void] identifier[registerConvertersFromPackage] operator[SEP] operator[SEP] {
identifier[register] operator[SEP] Keyword[new] identifier[BigDecimalConverter] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[register] operator[SEP] Keyword[new] identifier[BigIntegerConve... |
org.w3c.dom.Element parseDocument(String messageML) throws InvalidInputException, ProcessingException {
try {
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
//XXE prevention as per https://www.owasp.org/index.php/XML_External_Entity_(XXE)_Prevention_Cheat_Sheet
dbFactory.... | class class_name[name] begin[{]
method[parseDocument, return_type[type[org]], modifier[default], parameter[messageML]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=newInstance, post... | identifier[org] operator[SEP] identifier[w3c] operator[SEP] identifier[dom] operator[SEP] identifier[Element] identifier[parseDocument] operator[SEP] identifier[String] identifier[messageML] operator[SEP] Keyword[throws] identifier[InvalidInputException] , identifier[ProcessingException] {
Keyword[try] {
... |
public double makeValue(Date date) {
double secs = date.getTime() / 1000.0;
double origin_secs = getDateOrigin().getTime() / 1000.0;
double diff = secs - origin_secs;
try {
timeUnit.setValueInSeconds(diff);
} catch (Exception e) {
throw new RuntimeException(e.getMessage());
... | class class_name[name] begin[{]
method[makeValue, return_type[type[double]], modifier[public], parameter[date]] begin[{]
local_variable[type[double], secs]
local_variable[type[double], origin_secs]
local_variable[type[double], diff]
TryStatement(block=[StatementExpression(expres... | Keyword[public] Keyword[double] identifier[makeValue] operator[SEP] identifier[Date] identifier[date] operator[SEP] {
Keyword[double] identifier[secs] operator[=] identifier[date] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[/] literal[Float] operator[SEP] Keyword[double] identifier[ori... |
private static <K, V> HamtPMap<K, V> deleteRoot(int mask, HamtPMap<K, V>[] children) {
if (mask == 0) {
return null;
}
HamtPMap<K, V> child = children[0];
int hashBits = Integer.numberOfTrailingZeros(mask);
int newHash = unshift(child.hash, hashBits);
HamtPMap<K, V> newChild = deleteRoot(c... | class class_name[name] begin[{]
method[deleteRoot, return_type[type[HamtPMap]], modifier[private static], parameter[mask, children]] begin[{]
if[binary_operation[member[.mask], ==, literal[0]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_va... | Keyword[private] Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] identifier[HamtPMap] operator[<] identifier[K] , identifier[V] operator[>] identifier[deleteRoot] operator[SEP] Keyword[int] identifier[mask] , identifier[HamtPMap] operator[<] identifier[K] , identifier[V] operator[>] operator[S... |
public T add(T addend) {
if (addend == null) {
throw new IllegalArgumentException("invalid (null) addend");
}
BigDecimal sum = this.value.add(addend.value);
return newInstance(sum, sum.scale());
} | class class_name[name] begin[{]
method[add, return_type[type[T]], modifier[public], parameter[addend]] begin[{]
if[binary_operation[member[.addend], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qual... | Keyword[public] identifier[T] identifier[add] operator[SEP] identifier[T] identifier[addend] operator[SEP] {
Keyword[if] operator[SEP] identifier[addend] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP... |
public void store(final OutputStream os, final String comments, final boolean sorted, final boolean process)
throws IOException {
store(new OutputStreamWriter(os), comments, sorted, process);
} | class class_name[name] begin[{]
method[store, return_type[void], modifier[public], parameter[os, comments, sorted, process]] begin[{]
call[.store, parameter[ClassCreator(arguments=[MemberReference(member=os, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, const... | Keyword[public] Keyword[void] identifier[store] operator[SEP] Keyword[final] identifier[OutputStream] identifier[os] , Keyword[final] identifier[String] identifier[comments] , Keyword[final] Keyword[boolean] identifier[sorted] , Keyword[final] Keyword[boolean] identifier[process] operator[SEP] Keyword[throws] identi... |
private static void sort(byte[] byteArray, int start, int end, boolean descending) {
if(start == end) {
return ;
}
int middle = (start + end) >> 1;
Merge.sort(byteArray, start, middle, descending);
Merge.sort(byteArray, middle + 1, end, descending);
... | class class_name[name] begin[{]
method[sort, return_type[void], modifier[private static], parameter[byteArray, start, end, descending]] begin[{]
if[binary_operation[member[.start], ==, member[.end]]] begin[{]
return[None]
else begin[{]
None
end[}]
local_varia... | Keyword[private] Keyword[static] Keyword[void] identifier[sort] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[byteArray] , Keyword[int] identifier[start] , Keyword[int] identifier[end] , Keyword[boolean] identifier[descending] operator[SEP] {
Keyword[if] operator[SEP] identifier[start] op... |
protected List<Map<String, ?>> generateStrings() {
final List<Map<String, ?>> list = new ArrayList<>();
// Double quote
list.add(pattern(it -> {
it.delimiters("\"", "\""); //$NON-NLS-1$ //$NON-NLS-2$
it.style(DOUBLE_QUOTE_STRING_STYLE);
it.beginStyle(STRING_BEGIN_STYLE);
it.endStyle(STRING_END_STYLE);... | class class_name[name] begin[{]
method[generateStrings, return_type[type[List]], modifier[protected], parameter[]] begin[{]
local_variable[type[List], list]
call[list.add, parameter[call[.pattern, parameter[LambdaExpression(body=[StatementExpression(expression=MethodInvocation(arguments... | Keyword[protected] identifier[List] operator[<] identifier[Map] operator[<] identifier[String] , operator[?] operator[>] operator[>] identifier[generateStrings] operator[SEP] operator[SEP] {
Keyword[final] identifier[List] operator[<] identifier[Map] operator[<] identifier[String] , operator[?] operator[>] ope... |
private DataFileWriter<GenericRecord> createDataFileWriter(CodecFactory codecFactory) throws IOException {
@SuppressWarnings("resource")
DataFileWriter<GenericRecord> writer = new DataFileWriter<>(this.datumWriter);
writer.setCodec(codecFactory);
// Open the file and return the DataFileWriter
retur... | class class_name[name] begin[{]
method[createDataFileWriter, return_type[type[DataFileWriter]], modifier[private], parameter[codecFactory]] begin[{]
local_variable[type[DataFileWriter], writer]
call[writer.setCodec, parameter[member[.codecFactory]]]
return[call[writer.create, pa... | Keyword[private] identifier[DataFileWriter] operator[<] identifier[GenericRecord] operator[>] identifier[createDataFileWriter] operator[SEP] identifier[CodecFactory] identifier[codecFactory] operator[SEP] Keyword[throws] identifier[IOException] {
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[S... |
@Override
public List<CommerceCurrency> findByG_P(long groupId, boolean primary) {
return findByG_P(groupId, primary, QueryUtil.ALL_POS,
QueryUtil.ALL_POS, null);
} | class class_name[name] begin[{]
method[findByG_P, return_type[type[List]], modifier[public], parameter[groupId, primary]] begin[{]
return[call[.findByG_P, parameter[member[.groupId], member[.primary], member[QueryUtil.ALL_POS], member[QueryUtil.ALL_POS], literal[null]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[CommerceCurrency] operator[>] identifier[findByG_P] operator[SEP] Keyword[long] identifier[groupId] , Keyword[boolean] identifier[primary] operator[SEP] {
Keyword[return] identifier[findByG_P] operator[SEP] identifier[gro... |
public static void renderStitching( BufferedImage imageA, BufferedImage imageB ,
Homography2D_F64 fromAtoB )
{
// specify size of output image
double scale = 0.5;
// Convert into a BoofCV color format
Planar<GrayF32> colorA =
ConvertBufferedImage.convertFromPlanar(imageA, null, true, GrayF32.cla... | class class_name[name] begin[{]
method[renderStitching, return_type[void], modifier[public static], parameter[imageA, imageB, fromAtoB]] begin[{]
local_variable[type[double], scale]
local_variable[type[Planar], colorA]
local_variable[type[Planar], colorB]
local_variable[type[Pla... | Keyword[public] Keyword[static] Keyword[void] identifier[renderStitching] operator[SEP] identifier[BufferedImage] identifier[imageA] , identifier[BufferedImage] identifier[imageB] , identifier[Homography2D_F64] identifier[fromAtoB] operator[SEP] {
Keyword[double] identifier[scale] operator[=] literal[Float] op... |
public static String unescape(String input, char echar, char[] allowEscaped) {
return unescape(input, echar, allowEscaped, new char[0]).unescaped;
} | class class_name[name] begin[{]
method[unescape, return_type[type[String]], modifier[public static], parameter[input, echar, allowEscaped]] begin[{]
return[call[.unescape, parameter[member[.input], member[.echar], member[.allowEscaped], ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_oper... | Keyword[public] Keyword[static] identifier[String] identifier[unescape] operator[SEP] identifier[String] identifier[input] , Keyword[char] identifier[echar] , Keyword[char] operator[SEP] operator[SEP] identifier[allowEscaped] operator[SEP] {
Keyword[return] identifier[unescape] operator[SEP] identifier[input] ... |
public List<ReplicatorDocument> findAll() {
InputStream instream = null;
try {
final URI uri = new DatabaseURIHelper(dbURI).path("_all_docs")
.query("include_docs", "true").build();
final Reader reader = new InputStreamReader(instream = client.get(uri), "UTF-8... | class class_name[name] begin[{]
method[findAll, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[InputStream], instream]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(argum... | Keyword[public] identifier[List] operator[<] identifier[ReplicatorDocument] operator[>] identifier[findAll] operator[SEP] operator[SEP] {
identifier[InputStream] identifier[instream] operator[=] Other[null] operator[SEP] Keyword[try] {
Keyword[final] identifier[URI] identifier[uri] operator[=] Keyword... |
public ArrayList<String> dedicated_server_serviceName_traffic_GET(String serviceName, OvhTrafficOrderEnum traffic) throws IOException {
String qPath = "/order/dedicated/server/{serviceName}/traffic";
StringBuilder sb = path(qPath, serviceName);
query(sb, "traffic", traffic);
String resp = exec(qPath, "GET", sb.... | class class_name[name] begin[{]
method[dedicated_server_serviceName_traffic_GET, return_type[type[ArrayList]], modifier[public], parameter[serviceName, traffic]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilder], sb]
call[.query, parameter[member[.s... | Keyword[public] identifier[ArrayList] operator[<] identifier[String] operator[>] identifier[dedicated_server_serviceName_traffic_GET] operator[SEP] identifier[String] identifier[serviceName] , identifier[OvhTrafficOrderEnum] identifier[traffic] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[... |
private static BinaryMemcacheRequest handleKeepAliveRequest(KeepAliveRequest msg) {
BinaryMemcacheRequest request = new DefaultBinaryMemcacheRequest();
request
.setOpcode(OP_NOOP)
.setKeyLength((short) 0)
.setExtras(Unpooled.EMPTY_BUFFER)
.... | class class_name[name] begin[{]
method[handleKeepAliveRequest, return_type[type[BinaryMemcacheRequest]], modifier[private static], parameter[msg]] begin[{]
local_variable[type[BinaryMemcacheRequest], request]
call[request.setOpcode, parameter[member[.OP_NOOP]]]
return[member[.re... | Keyword[private] Keyword[static] identifier[BinaryMemcacheRequest] identifier[handleKeepAliveRequest] operator[SEP] identifier[KeepAliveRequest] identifier[msg] operator[SEP] {
identifier[BinaryMemcacheRequest] identifier[request] operator[=] Keyword[new] identifier[DefaultBinaryMemcacheRequest] operator[SEP] op... |
@NotNull
private String getEncodedAuthorization() {
try {
return "Basic " + DatatypeConverter.printBase64Binary(apiKey.getBytes("UTF-8"));
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
} | class class_name[name] begin[{]
method[getEncodedAuthorization, return_type[type[String]], modifier[private], parameter[]] begin[{]
TryStatement(block=[ReturnStatement(expression=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Basic "), o... | annotation[@] identifier[NotNull] Keyword[private] identifier[String] identifier[getEncodedAuthorization] operator[SEP] operator[SEP] {
Keyword[try] {
Keyword[return] literal[String] operator[+] identifier[DatatypeConverter] operator[SEP] identifier[printBase64Binary] operator[SEP] identifier[apiKey] ... |
private boolean parseExtssmd(int size, ByteBuffer bb) {
int a = bb.get();
int b = bb.getShort();
extAvgBitrate = (a << 16) | (b & 0xffff);
int i = 3;
if (isVBR) {
a = bb.get();
b = bb.getShort();
extPeakBitrate = (a << 16) | (b & 0xffff);
... | class class_name[name] begin[{]
method[parseExtssmd, return_type[type[boolean]], modifier[private], parameter[size, bb]] begin[{]
local_variable[type[int], a]
local_variable[type[int], b]
assign[member[.extAvgBitrate], binary_operation[binary_operation[member[.a], <<, literal[16... | Keyword[private] Keyword[boolean] identifier[parseExtssmd] operator[SEP] Keyword[int] identifier[size] , identifier[ByteBuffer] identifier[bb] operator[SEP] {
Keyword[int] identifier[a] operator[=] identifier[bb] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[b] ... |
@Override
public AMQP.BasicProperties fromMessageProperties(MessageProperties source, String charset) {
final TraceeFilterConfiguration filterConfiguration = backend.getConfiguration(profile);
if (!backend.isEmpty() && filterConfiguration.shouldProcessContext(AsyncDispatch)) {
final Map<String, String> filtere... | class class_name[name] begin[{]
method[fromMessageProperties, return_type[type[AMQP]], modifier[public], parameter[source, charset]] begin[{]
local_variable[type[TraceeFilterConfiguration], filterConfiguration]
if[binary_operation[call[backend.isEmpty, parameter[]], &&, call[filterConfi... | annotation[@] identifier[Override] Keyword[public] identifier[AMQP] operator[SEP] identifier[BasicProperties] identifier[fromMessageProperties] operator[SEP] identifier[MessageProperties] identifier[source] , identifier[String] identifier[charset] operator[SEP] {
Keyword[final] identifier[TraceeFilterConfigurat... |
public static <T> Response<T> success(@Nullable T body) {
return success(body, new okhttp3.Response.Builder() //
.code(200)
.message("OK")
.protocol(Protocol.HTTP_1_1)
.request(new Request.Builder().url("http://localhost/").build())
.build());
} | class class_name[name] begin[{]
method[success, return_type[type[Response]], modifier[public static], parameter[body]] begin[{]
return[call[.success, parameter[member[.body], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Response] operator[<] identifier[T] operator[>] identifier[success] operator[SEP] annotation[@] identifier[Nullable] identifier[T] identifier[body] operator[SEP] {
Keyword[return] identifier[success] operator[SEP] identifier[body] ,... |
public String compare(CompareCondition condition) {
String description;
if (condition.getContext() != null && condition.getContext().get(CONTEXT_PROPERTY_DESCRIPTION) != null) {
description = condition.getContext().get(CONTEXT_PROPERTY_DESCRIPTION);
} else {
description =... | class class_name[name] begin[{]
method[compare, return_type[type[String]], modifier[public], parameter[condition]] begin[{]
local_variable[type[String], description]
if[binary_operation[binary_operation[call[condition.getContext, parameter[]], !=, literal[null]], &&, binary_operation[ca... | Keyword[public] identifier[String] identifier[compare] operator[SEP] identifier[CompareCondition] identifier[condition] operator[SEP] {
identifier[String] identifier[description] operator[SEP] Keyword[if] operator[SEP] identifier[condition] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] operato... |
protected void updateDeploymentRepository(DeploymentRepository value, String xmlTag, Counter counter,
Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new C... | class class_name[name] begin[{]
method[updateDeploymentRepository, return_type[void], modifier[protected], parameter[value, xmlTag, counter, element]] begin[{]
local_variable[type[boolean], shouldExist]
local_variable[type[Element], root]
if[member[.shouldExist]] begin[{]
... | Keyword[protected] Keyword[void] identifier[updateDeploymentRepository] operator[SEP] identifier[DeploymentRepository] identifier[value] , identifier[String] identifier[xmlTag] , identifier[Counter] identifier[counter] , identifier[Element] identifier[element] operator[SEP] {
Keyword[boolean] identifier[shoul... |
private JsonNode applyCustomizationsToShapeJson(String shapeName, Shape shape, JsonNode valueNode) {
// Don't bother going any further if we're not dealing with an array or
// object JSON node; there's not much we can do to "massage" this value
if (valueNode == null || !valueNode.isContainerNode... | class class_name[name] begin[{]
method[applyCustomizationsToShapeJson, return_type[type[JsonNode]], modifier[private], parameter[shapeName, shape, valueNode]] begin[{]
if[binary_operation[binary_operation[member[.valueNode], ==, literal[null]], ||, call[valueNode.isContainerNode, parameter[]]]]... | Keyword[private] identifier[JsonNode] identifier[applyCustomizationsToShapeJson] operator[SEP] identifier[String] identifier[shapeName] , identifier[Shape] identifier[shape] , identifier[JsonNode] identifier[valueNode] operator[SEP] {
Keyword[if] operator[SEP] identifier[valueNode] operator[==] Other[null] ope... |
public EEnum getIfcElectricGeneratorTypeEnum() {
if (ifcElectricGeneratorTypeEnumEEnum == null) {
ifcElectricGeneratorTypeEnumEEnum = (EEnum) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI)
.getEClassifiers().get(826);
}
return ifcElectricGeneratorTypeEnumEEnum;
} | class class_name[name] begin[{]
method[getIfcElectricGeneratorTypeEnum, return_type[type[EEnum]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcElectricGeneratorTypeEnumEEnum], ==, literal[null]]] begin[{]
assign[member[.ifcElectricGeneratorTypeE... | Keyword[public] identifier[EEnum] identifier[getIfcElectricGeneratorTypeEnum] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcElectricGeneratorTypeEnumEEnum] operator[==] Other[null] operator[SEP] {
identifier[ifcElectricGeneratorTypeEnumEEnum] operator[=] operator[SEP] identifie... |
@Override
public void fill(int fromIndex, int toIndex)
{
if (fromIndex > toIndex) {
throw new IndexOutOfBoundsException(
"fromIndex: " + fromIndex
+ " > toIndex: " + toIndex
);
}
if (fromIndex == toIndex) {
add(fromIndex);
return;
}
// I... | class class_name[name] begin[{]
method[fill, return_type[void], modifier[public], parameter[fromIndex, toIndex]] begin[{]
if[binary_operation[member[.fromIndex], >, member[.toIndex]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[fill] operator[SEP] Keyword[int] identifier[fromIndex] , Keyword[int] identifier[toIndex] operator[SEP] {
Keyword[if] operator[SEP] identifier[fromIndex] operator[>] identifier[toIndex] operator[SEP] {
Keyword[throw] Keyword[... |
protected Coordinate getWorldCenter() {
if (center != null) {
return mapWidget.getMapModel().getMapView().getWorldViewTransformer().viewToWorld(center);
}
return null;
} | class class_name[name] begin[{]
method[getWorldCenter, return_type[type[Coordinate]], modifier[protected], parameter[]] begin[{]
if[binary_operation[member[.center], !=, literal[null]]] begin[{]
return[call[mapWidget.getMapModel, parameter[]]]
else begin[{]
None
end[... | Keyword[protected] identifier[Coordinate] identifier[getWorldCenter] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[center] operator[!=] Other[null] operator[SEP] {
Keyword[return] identifier[mapWidget] operator[SEP] identifier[getMapModel] operator[SEP] operator[SEP] operator[SEP]... |
public static boolean isSorted(float[] floatArray) {
for(int i = 0; i < floatArray.length - 1 ; i++) {
if(floatArray[i] > floatArray [i + 1]) {
return false;
}
}
return true;
} | class class_name[name] begin[{]
method[isSorted, return_type[type[boolean]], modifier[public static], parameter[floatArray]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=floatArray, postfix_operators=[], prefix_o... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isSorted] operator[SEP] Keyword[float] operator[SEP] operator[SEP] identifier[floatArray] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[floatArray] operator[... |
@Override
public Task<FcmSendMessageResult> sendMessageToRegistrationTokens(
final Collection<String> registrationTokens,
final FcmSendMessageRequest request
) {
return dispatcher.dispatchTask(new Callable<FcmSendMessageResult>() {
@Override
public FcmSendMessageResult call() {
r... | class class_name[name] begin[{]
method[sendMessageToRegistrationTokens, return_type[type[Task]], modifier[public], parameter[registrationTokens, request]] begin[{]
return[call[dispatcher.dispatchTask, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, nam... | annotation[@] identifier[Override] Keyword[public] identifier[Task] operator[<] identifier[FcmSendMessageResult] operator[>] identifier[sendMessageToRegistrationTokens] operator[SEP] Keyword[final] identifier[Collection] operator[<] identifier[String] operator[>] identifier[registrationTokens] , Keyword[final] identif... |
private static void checkInputFile(final String name, final File inFile) {
String isFailure = null;
if (inFile.isDirectory()) {
isFailure = "The " + name + " file is a directory!";
} else if (!inFile.exists()) {
isFailure = "The " + name + " file does not exist!";
} else if (!inFile.canRea... | class class_name[name] begin[{]
method[checkInputFile, return_type[void], modifier[private static], parameter[name, inFile]] begin[{]
local_variable[type[String], isFailure]
if[call[inFile.isDirectory, parameter[]]] begin[{]
assign[member[.isFailure], binary_oper... | Keyword[private] Keyword[static] Keyword[void] identifier[checkInputFile] operator[SEP] Keyword[final] identifier[String] identifier[name] , Keyword[final] identifier[File] identifier[inFile] operator[SEP] {
identifier[String] identifier[isFailure] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP]... |
public BooleanProperty isEmptyProperty() {
if (this.isEmpty == null) {
this.isEmpty = new SimpleBooleanProperty(this, MathFXAttributeNames.IS_EMPTY);
this.isEmpty.bind(Bindings.createBooleanBinding(() -> {
final PathIterator3afp<PathElement3dfx> pi = getPathIterator();
PathElement3dfx pe;
while (pi.... | class class_name[name] begin[{]
method[isEmptyProperty, return_type[type[BooleanProperty]], modifier[public], parameter[]] begin[{]
if[binary_operation[THIS[member[None.isEmpty]], ==, literal[null]]] begin[{]
assign[THIS[member[None.isEmpty]], ClassCreator(arguments=[Thi... | Keyword[public] identifier[BooleanProperty] identifier[isEmptyProperty] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[isEmpty] operator[==] Other[null] operator[SEP] {
Keyword[this] operator[SEP] identifier[isEmpty] operator[=] Keyword[new] identifier[S... |
public static DoubleMatrix SVDValues(ComplexDoubleMatrix A) {
int m = A.rows;
int n = A.columns;
DoubleMatrix S = new DoubleMatrix(min(m, n));
double[] rwork = new double[5*min(m,n)];
int info = NativeBlas.zgesvd('N', 'N', m, n, A.dup().data, 0, m, S.data, 0, null, 0, 1, null, 0... | class class_name[name] begin[{]
method[SVDValues, return_type[type[DoubleMatrix]], modifier[public static], parameter[A]] begin[{]
local_variable[type[int], m]
local_variable[type[int], n]
local_variable[type[DoubleMatrix], S]
local_variable[type[double], rwork]
local_va... | Keyword[public] Keyword[static] identifier[DoubleMatrix] identifier[SVDValues] operator[SEP] identifier[ComplexDoubleMatrix] identifier[A] operator[SEP] {
Keyword[int] identifier[m] operator[=] identifier[A] operator[SEP] identifier[rows] operator[SEP] Keyword[int] identifier[n] operator[=] identifier[A] operato... |
public Record
nextRecord() throws IOException {
Record rec = null;
try {
rec = _nextRecord();
}
finally {
if (rec == null) {
st.close();
}
}
return rec;
} | class class_name[name] begin[{]
method[nextRecord, return_type[type[Record]], modifier[public], parameter[]] begin[{]
local_variable[type[Record], rec]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=rec, postfix_operators=[], prefix_operators=[]... | Keyword[public] identifier[Record] identifier[nextRecord] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[Record] identifier[rec] operator[=] Other[null] operator[SEP] Keyword[try] {
identifier[rec] operator[=] identifier[_nextRecord] operator[SEP] operator[SEP] operat... |
@Override
public UpdateAuthorizerResult updateAuthorizer(UpdateAuthorizerRequest request) {
request = beforeClientExecution(request);
return executeUpdateAuthorizer(request);
} | class class_name[name] begin[{]
method[updateAuthorizer, return_type[type[UpdateAuthorizerResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeUpdateAuthorizer, parameter[member[.... | annotation[@] identifier[Override] Keyword[public] identifier[UpdateAuthorizerResult] identifier[updateAuthorizer] operator[SEP] identifier[UpdateAuthorizerRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP... |
public static final String convertPattern(String pattern) {
if (pattern == null) {
return null;
}
else {
String convertedPattern = pattern;
for (PatternConverter converter : PATTERN_CONVERTERS) {
convertedPattern = converter.convert(convertedPa... | class class_name[name] begin[{]
method[convertPattern, return_type[type[String]], modifier[final public static], parameter[pattern]] begin[{]
if[binary_operation[member[.pattern], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
local_variable[typ... | Keyword[public] Keyword[static] Keyword[final] identifier[String] identifier[convertPattern] operator[SEP] identifier[String] identifier[pattern] operator[SEP] {
Keyword[if] operator[SEP] identifier[pattern] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
... |
public static CompletableFuture<IMessageSender> createMessageSenderFromConnectionStringBuilderAsync(ConnectionStringBuilder amqpConnectionStringBuilder) {
Utils.assertNonNull("amqpConnectionStringBuilder", amqpConnectionStringBuilder);
return createMessageSenderFromEntityPathAsync(amqpConnectionStringBu... | class class_name[name] begin[{]
method[createMessageSenderFromConnectionStringBuilderAsync, return_type[type[CompletableFuture]], modifier[public static], parameter[amqpConnectionStringBuilder]] begin[{]
call[Utils.assertNonNull, parameter[literal["amqpConnectionStringBuilder"], member[.amqpCon... | Keyword[public] Keyword[static] identifier[CompletableFuture] operator[<] identifier[IMessageSender] operator[>] identifier[createMessageSenderFromConnectionStringBuilderAsync] operator[SEP] identifier[ConnectionStringBuilder] identifier[amqpConnectionStringBuilder] operator[SEP] {
identifier[Utils] operator[SEP... |
public static AreaUnitValue parseAreaUnitValue(String value) {
value = StringUtils.trimToNull(value);
if (value == null) return null;
final AreaUnitValue unit = AreaUnitValue.fromXmlValue(value);
if (unit != null) return unit;
throw new IllegalArgumentException("Can't parse for... | class class_name[name] begin[{]
method[parseAreaUnitValue, return_type[type[AreaUnitValue]], modifier[public static], parameter[value]] begin[{]
assign[member[.value], call[StringUtils.trimToNull, parameter[member[.value]]]]
if[binary_operation[member[.value], ==, literal[null]]... | Keyword[public] Keyword[static] identifier[AreaUnitValue] identifier[parseAreaUnitValue] operator[SEP] identifier[String] identifier[value] operator[SEP] {
identifier[value] operator[=] identifier[StringUtils] operator[SEP] identifier[trimToNull] operator[SEP] identifier[value] operator[SEP] operator[SEP] Keywor... |
public List statistic() {
List result = new LinkedList();
for (Iterator iter = calls.keySet().iterator(); iter.hasNext();) {
Object[] line = new Object[3];
result.add(line);
line[0] = iter.next();
List times = (List) calls.get(line[0]);
line[1]... | class class_name[name] begin[{]
method[statistic, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[List], result]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], ... | Keyword[public] identifier[List] identifier[statistic] operator[SEP] operator[SEP] {
identifier[List] identifier[result] operator[=] Keyword[new] identifier[LinkedList] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Iterator] identifier[iter] operator[=] identifier[calls] operato... |
@Override
public final synchronized void saveTradingSettings(
final Map<String, Object> pAddParam,
final TradingSettings pEntity) throws Exception {
if (pEntity.getIsNew()) {
throw new ExceptionWithCode(ExceptionWithCode.FORBIDDEN,
"insert_not_allowed::" + pAddParam.get("user"));
} els... | class class_name[name] begin[{]
method[saveTradingSettings, return_type[void], modifier[synchronized final public], parameter[pAddParam, pEntity]] begin[{]
if[call[pEntity.getIsNew, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=FORBI... | annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[synchronized] Keyword[void] identifier[saveTradingSettings] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[pAddParam] , Keyword[final] identifier[TradingSettings] identifi... |
public static BandLU factorize(BandMatrix A) {
return new BandLU(A.numRows(), A.kl, A.ku).factor(A, false);
} | class class_name[name] begin[{]
method[factorize, return_type[type[BandLU]], modifier[public static], parameter[A]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=numRows, postfix_operators=[], prefix_operators=[], qualifier=A, selectors=[], type_arguments=None), MemberRe... | Keyword[public] Keyword[static] identifier[BandLU] identifier[factorize] operator[SEP] identifier[BandMatrix] identifier[A] operator[SEP] {
Keyword[return] Keyword[new] identifier[BandLU] operator[SEP] identifier[A] operator[SEP] identifier[numRows] operator[SEP] operator[SEP] , identifier[A] operator[SEP] iden... |
@Override
public CreateComputerResult createComputer(CreateComputerRequest request) {
request = beforeClientExecution(request);
return executeCreateComputer(request);
} | class class_name[name] begin[{]
method[createComputer, return_type[type[CreateComputerResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeCreateComputer, parameter[member[.reques... | annotation[@] identifier[Override] Keyword[public] identifier[CreateComputerResult] identifier[createComputer] operator[SEP] identifier[CreateComputerRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] oper... |
protected void connectLeftRight(GrayS32 input, GrayS32 output) {
for( int y = 0; y < input.height; y++ ) {
int x = input.width-1;
int inputLabel = input.unsafe_get(x, y);
int outputLabel = output.unsafe_get(x, y);
if( outputLabel == -1 ) { // see if it needs to create a new output segment
outputLabe... | class class_name[name] begin[{]
method[connectLeftRight, return_type[void], modifier[protected], parameter[input, output]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperatio... | Keyword[protected] Keyword[void] identifier[connectLeftRight] operator[SEP] identifier[GrayS32] identifier[input] , identifier[GrayS32] identifier[output] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[y] operator[=] Other[0] operator[SEP] identifier[y] operator[<] identifier[input] operator... |
public static <C extends Comparable<?>> Range<C> encloseAll(Iterable<C> values) {
checkNotNull(values);
if (values instanceof SortedSet) {
SortedSet<? extends C> set = cast(values);
Comparator<?> comparator = set.comparator();
if (Ordering.natural().equals(comparator) || comparator == null) {
... | class class_name[name] begin[{]
method[encloseAll, return_type[type[Range]], modifier[public static], parameter[values]] begin[{]
call[.checkNotNull, parameter[member[.values]]]
if[binary_operation[member[.values], instanceof, type[SortedSet]]] begin[{]
local_variabl... | Keyword[public] Keyword[static] operator[<] identifier[C] Keyword[extends] identifier[Comparable] operator[<] operator[?] operator[>] operator[>] identifier[Range] operator[<] identifier[C] operator[>] identifier[encloseAll] operator[SEP] identifier[Iterable] operator[<] identifier[C] operator[>] identifier[values] ope... |
public static boolean includes(
final AreaSizeL a,
final AreaSizeL b)
{
Objects.requireNonNull(a, "Area A");
Objects.requireNonNull(b, "Area B");
return Long.compareUnsigned(b.sizeX(), a.sizeX()) <= 0
&& Long.compareUnsigned(b.sizeY(), a.sizeY()) <= 0;
} | class class_name[name] begin[{]
method[includes, return_type[type[boolean]], modifier[public static], parameter[a, b]] begin[{]
call[Objects.requireNonNull, parameter[member[.a], literal["Area A"]]]
call[Objects.requireNonNull, parameter[member[.b], literal["Area B"]]]
r... | Keyword[public] Keyword[static] Keyword[boolean] identifier[includes] operator[SEP] Keyword[final] identifier[AreaSizeL] identifier[a] , Keyword[final] identifier[AreaSizeL] identifier[b] operator[SEP] {
identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[a] , literal[String] ... |
public EClass getImageData() {
if (imageDataEClass == null) {
imageDataEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(399);
}
return imageDataEClass;
} | class class_name[name] begin[{]
method[getImageData, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.imageDataEClass], ==, literal[null]]] begin[{]
assign[member[.imageDataEClass], Cast(expression=MethodInvocation(arguments=... | Keyword[public] identifier[EClass] identifier[getImageData] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[imageDataEClass] operator[==] Other[null] operator[SEP] {
identifier[imageDataEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] operator[... |
public Cursor query(String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy) {
SQLiteDatabase db = getDatabaseConnection();
return new DbClosingCursor(db.query(table, columns, selection, selectionArgs, groupBy, having, orderBy), this);
} | class class_name[name] begin[{]
method[query, return_type[type[Cursor]], modifier[public], parameter[table, columns, selection, selectionArgs, groupBy, having, orderBy]] begin[{]
local_variable[type[SQLiteDatabase], db]
return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(... | Keyword[public] identifier[Cursor] identifier[query] operator[SEP] identifier[String] identifier[table] , identifier[String] operator[SEP] operator[SEP] identifier[columns] , identifier[String] identifier[selection] , identifier[String] operator[SEP] operator[SEP] identifier[selectionArgs] , identifier[String] iden... |
String getPid(ConfigID configId) throws ConfigNotFoundException {
ExtendedConfiguration config = getConfiguration(configId);
String pid = config.getPid();
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "getPid(): Lookup of " + configId + " configurati... | class class_name[name] begin[{]
method[getPid, return_type[type[String]], modifier[default], parameter[configId]] begin[{]
local_variable[type[ExtendedConfiguration], config]
local_variable[type[String], pid]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter... | identifier[String] identifier[getPid] operator[SEP] identifier[ConfigID] identifier[configId] operator[SEP] Keyword[throws] identifier[ConfigNotFoundException] {
identifier[ExtendedConfiguration] identifier[config] operator[=] identifier[getConfiguration] operator[SEP] identifier[configId] operator[SEP] operator... |
static <K, V> Map.Entry<K, V> parseEntry(CodedInputStream input, Metadata<K, V> metadata,
ExtensionRegistryLite extensionRegistry) throws IOException {
K key = metadata.defaultKey;
V value = metadata.defaultValue;
while (true) {
int tag = input.readTag();
if (... | class class_name[name] begin[{]
method[parseEntry, return_type[type[Map]], modifier[static], parameter[input, metadata, extensionRegistry]] begin[{]
local_variable[type[K], key]
local_variable[type[V], value]
while[literal[true]] begin[{]
local_variable[type[int], ta... | Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[K] , identifier[V] operator[>] identifier[parseEntry] operator[SEP] identifier[CodedInputStream] identifier[input] , identifier[Metadata] operator[<] identifier[K] , identifie... |
@Override
public Font findFont(boolean b, short i, short i1, String s, boolean b1, boolean b2, short i2, byte b3) {
throw new UnsupportedOperationException();
} | class class_name[name] begin[{]
method[findFont, return_type[type[Font]], modifier[public], parameter[b, i, i1, s, b1, b2, i2, b3]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, select... | annotation[@] identifier[Override] Keyword[public] identifier[Font] identifier[findFont] operator[SEP] Keyword[boolean] identifier[b] , Keyword[short] identifier[i] , Keyword[short] identifier[i1] , identifier[String] identifier[s] , Keyword[boolean] identifier[b1] , Keyword[boolean] identifier[b2] , Keyword[shor... |
private ClassDescriptor getItemClassDescriptor(ObjectReferenceDescriptor ord, List hintClasses)
{
DescriptorRepository repo = ord.getClassDescriptor().getRepository();
if (hintClasses == null || hintClasses.isEmpty())
{
return repo.getDescriptorFor(ord.getItemClass()); ... | class class_name[name] begin[{]
method[getItemClassDescriptor, return_type[type[ClassDescriptor]], modifier[private], parameter[ord, hintClasses]] begin[{]
local_variable[type[DescriptorRepository], repo]
if[binary_operation[binary_operation[member[.hintClasses], ==, literal[null]], ||,... | Keyword[private] identifier[ClassDescriptor] identifier[getItemClassDescriptor] operator[SEP] identifier[ObjectReferenceDescriptor] identifier[ord] , identifier[List] identifier[hintClasses] operator[SEP] {
identifier[DescriptorRepository] identifier[repo] operator[=] identifier[ord] operator[SEP] identifier[ge... |
@Override
public final void setItem(final SeGoods pItem) {
this.item = pItem;
if (getItsId() == null) {
setItsId(new SeGoodsSpecificsId());
}
getItsId().setItem(this.item);
} | class class_name[name] begin[{]
method[setItem, return_type[void], modifier[final public], parameter[pItem]] begin[{]
assign[THIS[member[None.item]], member[.pItem]]
if[binary_operation[call[.getItsId, parameter[]], ==, literal[null]]] begin[{]
call[.setI... | annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[setItem] operator[SEP] Keyword[final] identifier[SeGoods] identifier[pItem] operator[SEP] {
Keyword[this] operator[SEP] identifier[item] operator[=] identifier[pItem] operator[SEP] Keyword[if] operator[SEP] identifier[getI... |
public long pop() {
if (count < 0) {
return -1;
}
String key = String.format(Locale.CHINA, TIME_KEY, count);
count--;
return pop(key);
} | class class_name[name] begin[{]
method[pop, return_type[type[long]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.count], <, literal[0]]] begin[{]
return[literal[1]]
else begin[{]
None
end[}]
local_variable[type[String], key]
... | Keyword[public] Keyword[long] identifier[pop] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[count] operator[<] Other[0] operator[SEP] {
Keyword[return] operator[-] Other[1] operator[SEP]
}
identifier[String] identifier[key] operator[=] identifier[String] operator[SEP... |
private void appendMap(MapTile other, int offsetX, int offsetY)
{
for (int v = 0; v < other.getInTileHeight(); v++)
{
final int ty = offsetY + v;
for (int h = 0; h < other.getInTileWidth(); h++)
{
final int tx = offsetX + h;
final T... | class class_name[name] begin[{]
method[appendMap, return_type[void], modifier[private], parameter[other, offsetX, offsetY]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperati... | Keyword[private] Keyword[void] identifier[appendMap] operator[SEP] identifier[MapTile] identifier[other] , Keyword[int] identifier[offsetX] , Keyword[int] identifier[offsetY] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[v] operator[=] Other[0] operator[SEP] identifier[v] operator[<] ident... |
public byte[] getData()
{
byte[] copy = new byte[data.length];
System.arraycopy(data, 0, copy, 0, data.length);
return copy;
} | class class_name[name] begin[{]
method[getData, return_type[type[byte]], modifier[public], parameter[]] begin[{]
local_variable[type[byte], copy]
call[System.arraycopy, parameter[member[.data], literal[0], member[.copy], literal[0], member[data.length]]]
return[member[.copy]]
... | Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[getData] operator[SEP] operator[SEP] {
Keyword[byte] operator[SEP] operator[SEP] identifier[copy] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[data] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[Syst... |
public synchronized int setString(long pos,
String str) throws SQLException {
return setString(pos, str, 0, str.length());
} | class class_name[name] begin[{]
method[setString, return_type[type[int]], modifier[synchronized public], parameter[pos, str]] begin[{]
return[call[.setString, parameter[member[.pos], member[.str], literal[0], call[str.length, parameter[]]]]]
end[}]
END[}] | Keyword[public] Keyword[synchronized] Keyword[int] identifier[setString] operator[SEP] Keyword[long] identifier[pos] , identifier[String] identifier[str] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[return] identifier[setString] operator[SEP] identifier[pos] , identifier[str] , Other[0] , ... |
private CLClause reduceClause(final CLClause c) {
int lit;
int i;
for (i = 0; i < c.lits().size(); i++) {
lit = c.lits().get(i);
if (val(lit) < 0) { break; }
}
if (i == c.lits().size()) { return c; }
assert this.addedlits.empty();
for (i = ... | class class_name[name] begin[{]
method[reduceClause, return_type[type[CLClause]], modifier[private], parameter[c]] begin[{]
local_variable[type[int], lit]
local_variable[type[int], i]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expr... | Keyword[private] identifier[CLClause] identifier[reduceClause] operator[SEP] Keyword[final] identifier[CLClause] identifier[c] operator[SEP] {
Keyword[int] identifier[lit] operator[SEP] Keyword[int] identifier[i] operator[SEP] Keyword[for] operator[SEP] identifier[i] operator[=] Other[0] operator[SEP] identifier... |
void markCommandDone(ExecutionResult executionResult, HystrixCommandKey commandKey, HystrixThreadPoolKey threadPoolKey, boolean executionStarted) {
HystrixThreadEventStream.getInstance().executionDone(executionResult, commandKey, threadPoolKey);
if (executionStarted) {
concurrentExecutionCou... | class class_name[name] begin[{]
method[markCommandDone, return_type[void], modifier[default], parameter[executionResult, commandKey, threadPoolKey, executionStarted]] begin[{]
call[HystrixThreadEventStream.getInstance, parameter[]]
if[member[.executionStarted]] begin[{]
... | Keyword[void] identifier[markCommandDone] operator[SEP] identifier[ExecutionResult] identifier[executionResult] , identifier[HystrixCommandKey] identifier[commandKey] , identifier[HystrixThreadPoolKey] identifier[threadPoolKey] , Keyword[boolean] identifier[executionStarted] operator[SEP] {
identifier[Hystrix... |
public String setUser(String uid, Map<String, Object> properties, DateTime eventTime)
throws ExecutionException, InterruptedException, IOException {
return createEvent(setUserAsFuture(uid, properties, eventTime));
} | class class_name[name] begin[{]
method[setUser, return_type[type[String]], modifier[public], parameter[uid, properties, eventTime]] begin[{]
return[call[.createEvent, parameter[call[.setUserAsFuture, parameter[member[.uid], member[.properties], member[.eventTime]]]]]]
end[}]
END[}] | Keyword[public] identifier[String] identifier[setUser] operator[SEP] identifier[String] identifier[uid] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[properties] , identifier[DateTime] identifier[eventTime] operator[SEP] Keyword[throws] identifier[ExecutionException] , ... |
public static void assertEquals(Object expected, Object actual, String message) {
if (!Objects.equals(expected, actual)) {
fail(message);
}
} | class class_name[name] begin[{]
method[assertEquals, return_type[void], modifier[public static], parameter[expected, actual, message]] begin[{]
if[call[Objects.equals, parameter[member[.expected], member[.actual]]]] begin[{]
call[.fail, parameter[member[.message]]]
... | Keyword[public] Keyword[static] Keyword[void] identifier[assertEquals] operator[SEP] identifier[Object] identifier[expected] , identifier[Object] identifier[actual] , identifier[String] identifier[message] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[Objects] operator[SEP] identifier[equals... |
public static DataSource createDataSource(String dbName ,boolean initSpatial) throws SQLException {
return createDataSource(dbName, initSpatial, H2_PARAMETERS);
} | class class_name[name] begin[{]
method[createDataSource, return_type[type[DataSource]], modifier[public static], parameter[dbName, initSpatial]] begin[{]
return[call[.createDataSource, parameter[member[.dbName], member[.initSpatial], member[.H2_PARAMETERS]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[DataSource] identifier[createDataSource] operator[SEP] identifier[String] identifier[dbName] , Keyword[boolean] identifier[initSpatial] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[return] identifier[createDataSource] operator[SEP] identifier[dbName... |
private void addLogRecorders(Container result) {
for (Map.Entry<String, LogRecorder> entry : logRecorders.entrySet()) {
String name = entry.getKey();
String entryName = "nodes/master/logs/custom/{0}.log"; // name to be filtered in the bundle
File storedFile = new File(customL... | class class_name[name] begin[{]
method[addLogRecorders, return_type[void], modifier[private], parameter[result]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(argumen... | Keyword[private] Keyword[void] identifier[addLogRecorders] operator[SEP] identifier[Container] identifier[result] operator[SEP] {
Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[LogRecorder] operator[>] identifier[entry] operator[:] identif... |
@SuppressWarnings("deprecation")
protected void additionalAuthenticationChecks(UserDetails userDetails,
UsernamePasswordAuthenticationToken authentication)
throws AuthenticationException {
if (authentication.getCredentials() == null) {
logger.debug("Authentication failed: no credentials provided");
thro... | class class_name[name] begin[{]
method[additionalAuthenticationChecks, return_type[void], modifier[protected], parameter[userDetails, authentication]] begin[{]
if[binary_operation[call[authentication.getCredentials, parameter[]], ==, literal[null]]] begin[{]
call[logger.... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] Keyword[void] identifier[additionalAuthenticationChecks] operator[SEP] identifier[UserDetails] identifier[userDetails] , identifier[UsernamePasswordAuthenticationToken] identifier[authentication] operator[SEP] Key... |
public static String formatDate(StringBuffer buf, long date, boolean cookie)
{
HttpCal gc = new HttpCal();
gc.setTimeInMillis(date);
formatDate(buf,gc,cookie);
return buf.toString();
} | class class_name[name] begin[{]
method[formatDate, return_type[type[String]], modifier[public static], parameter[buf, date, cookie]] begin[{]
local_variable[type[HttpCal], gc]
call[gc.setTimeInMillis, parameter[member[.date]]]
call[.formatDate, parameter[member[.buf], me... | Keyword[public] Keyword[static] identifier[String] identifier[formatDate] operator[SEP] identifier[StringBuffer] identifier[buf] , Keyword[long] identifier[date] , Keyword[boolean] identifier[cookie] operator[SEP] {
identifier[HttpCal] identifier[gc] operator[=] Keyword[new] identifier[HttpCal] operator[SEP] o... |
@Override
public com.liferay.commerce.model.CommerceAvailabilityEstimate fetchCommerceAvailabilityEstimateByUuidAndGroupId(
String uuid, long groupId) {
return _commerceAvailabilityEstimateLocalService.fetchCommerceAvailabilityEstimateByUuidAndGroupId(uuid,
groupId);
} | class class_name[name] begin[{]
method[fetchCommerceAvailabilityEstimateByUuidAndGroupId, return_type[type[com]], modifier[public], parameter[uuid, groupId]] begin[{]
return[call[_commerceAvailabilityEstimateLocalService.fetchCommerceAvailabilityEstimateByUuidAndGroupId, parameter[member[.uuid], member... | annotation[@] identifier[Override] Keyword[public] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[model] operator[SEP] identifier[CommerceAvailabilityEstimate] identifier[fetchCommerceAvailabilityEstimateByUuidAndGroupId] operator[SEP] identifier[String] id... |
public void registerParameterDataType(String parameterName, ICalDataType dataType) {
parameterName = parameterName.toLowerCase();
if (dataType == null) {
parameterDataTypes.remove(parameterName);
} else {
parameterDataTypes.put(parameterName, dataType);
}
} | class class_name[name] begin[{]
method[registerParameterDataType, return_type[void], modifier[public], parameter[parameterName, dataType]] begin[{]
assign[member[.parameterName], call[parameterName.toLowerCase, parameter[]]]
if[binary_operation[member[.dataType], ==, literal[nul... | Keyword[public] Keyword[void] identifier[registerParameterDataType] operator[SEP] identifier[String] identifier[parameterName] , identifier[ICalDataType] identifier[dataType] operator[SEP] {
identifier[parameterName] operator[=] identifier[parameterName] operator[SEP] identifier[toLowerCase] operator[SEP] opera... |
public void close() throws IOException {
getLogger().debug("closing socket");
this.closed = true;
socket.close();
fireSocketClosedEvent(null);
} | class class_name[name] begin[{]
method[close, return_type[void], modifier[public], parameter[]] begin[{]
call[.getLogger, parameter[]]
assign[THIS[member[None.closed]], literal[true]]
call[socket.close, parameter[]]
call[.fireSocketClosedEvent, pa... | Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[getLogger] operator[SEP] operator[SEP] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[closed] operator... |
public MasterSlaveServersConfig addSlaveAddress(String... addresses) {
for (String address : addresses) {
slaveAddresses.add(URIBuilder.create(address));
}
return this;
} | class class_name[name] begin[{]
method[addSlaveAddress, return_type[type[MasterSlaveServersConfig]], modifier[public], parameter[addresses]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberRef... | Keyword[public] identifier[MasterSlaveServersConfig] identifier[addSlaveAddress] operator[SEP] identifier[String] operator[...] identifier[addresses] operator[SEP] {
Keyword[for] operator[SEP] identifier[String] identifier[address] operator[:] identifier[addresses] operator[SEP] {
identifier[slaveAdd... |
public static void runTaskScheduler(final Configuration runtimeConf, final String[] args)
throws InjectionException, IOException, ParseException {
final Tang tang = Tang.Factory.getTang();
final Configuration commandLineConf = CommandLine.parseToConfiguration(args, Retain.class);
// Merge the configur... | class class_name[name] begin[{]
method[runTaskScheduler, return_type[void], modifier[public static], parameter[runtimeConf, args]] begin[{]
local_variable[type[Tang], tang]
local_variable[type[Configuration], commandLineConf]
local_variable[type[Configuration], driverConf]
local... | Keyword[public] Keyword[static] Keyword[void] identifier[runTaskScheduler] operator[SEP] Keyword[final] identifier[Configuration] identifier[runtimeConf] , Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[InjectionException] , identifier[IOExcepti... |
final void setSubtype(Byte value) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "setSubtype", value);
jmo.setField(JsHdrAccess.SUBTYPE, value);
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(this, tc,... | class class_name[name] begin[{]
method[setSubtype, return_type[void], modifier[final], parameter[value]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter[THIS[], member... | Keyword[final] Keyword[void] identifier[setSubtype] operator[SEP] identifier[Byte] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] ... |
public List<TimephasedCost> getTimephasedBaselineCost(int index)
{
return m_timephasedBaselineCost[index] == null ? null : m_timephasedBaselineCost[index].getData();
} | class class_name[name] begin[{]
method[getTimephasedBaselineCost, return_type[type[List]], modifier[public], parameter[index]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=m_timephasedBaselineCost, postfix_operators=[], prefix_operators=[], qualifier=, sel... | Keyword[public] identifier[List] operator[<] identifier[TimephasedCost] operator[>] identifier[getTimephasedBaselineCost] operator[SEP] Keyword[int] identifier[index] operator[SEP] {
Keyword[return] identifier[m_timephasedBaselineCost] operator[SEP] identifier[index] operator[SEP] operator[==] Other[null] operat... |
public static void appendPaddedInteger(StringBuffer buf, long value, int size) {
try {
appendPaddedInteger((Appendable)buf, value, size);
} catch (IOException e) {
// StringBuffer does not throw IOException
}
} | class class_name[name] begin[{]
method[appendPaddedInteger, return_type[void], modifier[public static], parameter[buf, value, size]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=buf, postfix_operators=[], prefix_operators... | Keyword[public] Keyword[static] Keyword[void] identifier[appendPaddedInteger] operator[SEP] identifier[StringBuffer] identifier[buf] , Keyword[long] identifier[value] , Keyword[int] identifier[size] operator[SEP] {
Keyword[try] {
identifier[appendPaddedInteger] operator[SEP] operator[SEP] identifier... |
private static long getSizeOfPhysicalMemoryForWindows() {
BufferedReader bi = null;
try {
Process proc = Runtime.getRuntime().exec("wmic memorychip get capacity");
bi = new BufferedReader(new InputStreamReader(proc.getInputStream()));
String line = bi.readLine();
if (line == null) {
return -1L;
... | class class_name[name] begin[{]
method[getSizeOfPhysicalMemoryForWindows, return_type[type[long]], modifier[private static], parameter[]] begin[{]
local_variable[type[BufferedReader], bi]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[],... | Keyword[private] Keyword[static] Keyword[long] identifier[getSizeOfPhysicalMemoryForWindows] operator[SEP] operator[SEP] {
identifier[BufferedReader] identifier[bi] operator[=] Other[null] operator[SEP] Keyword[try] {
identifier[Process] identifier[proc] operator[=] identifier[Runtime] operator[SEP] i... |
public static boolean containsOnly(final CharSequence cs, final String validChars) {
if (cs == null || validChars == null) {
return false;
}
return containsOnly(cs, validChars.toCharArray());
} | class class_name[name] begin[{]
method[containsOnly, return_type[type[boolean]], modifier[public static], parameter[cs, validChars]] begin[{]
if[binary_operation[binary_operation[member[.cs], ==, literal[null]], ||, binary_operation[member[.validChars], ==, literal[null]]]] begin[{]
... | Keyword[public] Keyword[static] Keyword[boolean] identifier[containsOnly] operator[SEP] Keyword[final] identifier[CharSequence] identifier[cs] , Keyword[final] identifier[String] identifier[validChars] operator[SEP] {
Keyword[if] operator[SEP] identifier[cs] operator[==] Other[null] operator[||] identifier[vali... |
public int store(String label) {
if (StrInt.containsKey(label)) {
return (StrInt.get(label).intValue());
} else if (!newLabelsAllowed) {
return KEY_DUMMY_LABEL;
} else { // store label
Integer intKey = new Integer(count++);
StrInt.put(label, intKey);
IntStr.put(intKey, label);
return intKey.int... | class class_name[name] begin[{]
method[store, return_type[type[int]], modifier[public], parameter[label]] begin[{]
if[call[StrInt.containsKey, parameter[member[.label]]]] begin[{]
return[call[StrInt.get, parameter[member[.label]]]]
else begin[{]
if[member[.newLab... | Keyword[public] Keyword[int] identifier[store] operator[SEP] identifier[String] identifier[label] operator[SEP] {
Keyword[if] operator[SEP] identifier[StrInt] operator[SEP] identifier[containsKey] operator[SEP] identifier[label] operator[SEP] operator[SEP] {
Keyword[return] operator[SEP] identifier[St... |
public static String getMessage(PyException e) {
if (e.getMessage() != null) {
return e.getMessage();
} else {
StringWriter stringWriter = new StringWriter();
e.printStackTrace(new PrintWriter(stringWriter));
return stringWriter.toString();
}
} | class class_name[name] begin[{]
method[getMessage, return_type[type[String]], modifier[public static], parameter[e]] begin[{]
if[binary_operation[call[e.getMessage, parameter[]], !=, literal[null]]] begin[{]
return[call[e.getMessage, parameter[]]]
else begin[{]
l... | Keyword[public] Keyword[static] identifier[String] identifier[getMessage] operator[SEP] identifier[PyException] identifier[e] operator[SEP] {
Keyword[if] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] {
Keyword[return... |
public JsonElement get(String name) throws JsonException {
JsonElement result = nameValuePairs.get(name);
if (result == null) {
throw new JsonException("No value for " + name + ", in: " + this.toString());
}
return result;
} | class class_name[name] begin[{]
method[get, return_type[type[JsonElement]], modifier[public], parameter[name]] begin[{]
local_variable[type[JsonElement], result]
if[binary_operation[member[.result], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(argument... | Keyword[public] identifier[JsonElement] identifier[get] operator[SEP] identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[JsonException] {
identifier[JsonElement] identifier[result] operator[=] identifier[nameValuePairs] operator[SEP] identifier[get] operator[SEP] identifier[name] operat... |
private void _resolveRuleContent (@Nonnull final ICommonsList <IPSElement> aRuleContent,
@Nonnull final PreprocessorLookup aLookup,
@Nonnull final PreprocessorIDPool aIDPool,
@Nullable final ICommonsMap <String, ... | class class_name[name] begin[{]
method[_resolveRuleContent, return_type[void], modifier[private], parameter[aRuleContent, aLookup, aIDPool, aParamValueMap, aTargetRule]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(memb... | Keyword[private] Keyword[void] identifier[_resolveRuleContent] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[ICommonsList] operator[<] identifier[IPSElement] operator[>] identifier[aRuleContent] , annotation[@] identifier[Nonnull] Keyword[final] identifier[PreprocessorLookup] identifier[aLo... |
static void longToByteArray(long value, byte[] dest, int destOffset) {
Utils.checkArgument(dest.length >= destOffset + LONG_BYTES, "array too small");
dest[destOffset + 7] = (byte) (value & 0xFFL);
dest[destOffset + 6] = (byte) (value >> 8 & 0xFFL);
dest[destOffset + 5] = (byte) (value >> 16 & 0xFFL);
... | class class_name[name] begin[{]
method[longToByteArray, return_type[void], modifier[static], parameter[value, dest, destOffset]] begin[{]
call[Utils.checkArgument, parameter[binary_operation[member[dest.length], >=, binary_operation[member[.destOffset], +, member[.LONG_BYTES]]], literal["array ... | Keyword[static] Keyword[void] identifier[longToByteArray] operator[SEP] Keyword[long] identifier[value] , Keyword[byte] operator[SEP] operator[SEP] identifier[dest] , Keyword[int] identifier[destOffset] operator[SEP] {
identifier[Utils] operator[SEP] identifier[checkArgument] operator[SEP] identifier[dest] ope... |
private Cache getScopeCache(String scope) throws InvalidScopeException {
Cache scopeCache = scopeManager.getCache(scope);
if (scopeCache == null) {
throw new InvalidScopeException("The scope " + scope + " doesn't exist");
} else {
return scopeCache;
}
} | class class_name[name] begin[{]
method[getScopeCache, return_type[type[Cache]], modifier[private], parameter[scope]] begin[{]
local_variable[type[Cache], scopeCache]
if[binary_operation[member[.scopeCache], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(... | Keyword[private] identifier[Cache] identifier[getScopeCache] operator[SEP] identifier[String] identifier[scope] operator[SEP] Keyword[throws] identifier[InvalidScopeException] {
identifier[Cache] identifier[scopeCache] operator[=] identifier[scopeManager] operator[SEP] identifier[getCache] operator[SEP] identifi... |
private boolean fromSameShard(ByteBuffer fromInclusive, ByteBuffer toExclusive) {
return fromInclusive.remaining() >= 9 &&
toExclusive.remaining() >= 9 &&
RowKeyUtils.getShardId(fromInclusive) == RowKeyUtils.getShardId(toExclusive) &&
RowKeyUtils.getTableUuid(from... | class class_name[name] begin[{]
method[fromSameShard, return_type[type[boolean]], modifier[private], parameter[fromInclusive, toExclusive]] begin[{]
return[binary_operation[binary_operation[binary_operation[binary_operation[call[fromInclusive.remaining, parameter[]], >=, literal[9]], &&, binary_operati... | Keyword[private] Keyword[boolean] identifier[fromSameShard] operator[SEP] identifier[ByteBuffer] identifier[fromInclusive] , identifier[ByteBuffer] identifier[toExclusive] operator[SEP] {
Keyword[return] identifier[fromInclusive] operator[SEP] identifier[remaining] operator[SEP] operator[SEP] operator[>=] Other... |
public static QuickAnalysisStrategy loadFromUserPreferences(final UserPreferences userPreferences) {
final Map<String, String> properties = userPreferences.getAdditionalProperties();
final int columnsPerAnalyzer =
MapUtils.getIntValue(properties, USER_PREFERENCES_NAMESPACE + ".columnsPe... | class class_name[name] begin[{]
method[loadFromUserPreferences, return_type[type[QuickAnalysisStrategy]], modifier[public static], parameter[userPreferences]] begin[{]
local_variable[type[Map], properties]
local_variable[type[int], columnsPerAnalyzer]
local_variable[type[boolean], inclu... | Keyword[public] Keyword[static] identifier[QuickAnalysisStrategy] identifier[loadFromUserPreferences] operator[SEP] Keyword[final] identifier[UserPreferences] identifier[userPreferences] operator[SEP] {
Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[pro... |
public static ExternalTableDefinition of(String sourceUri, Schema schema, FormatOptions format) {
return newBuilder(sourceUri, schema, format).build();
} | class class_name[name] begin[{]
method[of, return_type[type[ExternalTableDefinition]], modifier[public static], parameter[sourceUri, schema, format]] begin[{]
return[call[.newBuilder, parameter[member[.sourceUri], member[.schema], member[.format]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[ExternalTableDefinition] identifier[of] operator[SEP] identifier[String] identifier[sourceUri] , identifier[Schema] identifier[schema] , identifier[FormatOptions] identifier[format] operator[SEP] {
Keyword[return] identifier[newBuilder] operator[SEP] identifier[source... |
public Comparator<Object> withSourceProvider(final OrderSourceProvider sourceProvider) {
return new Comparator<Object>() {
@Override
public int compare(Object o1, Object o2) {
return doCompare(o1, o2, sourceProvider);
}
};
} | class class_name[name] begin[{]
method[withSourceProvider, return_type[type[Comparator]], modifier[public], parameter[sourceProvider]] begin[{]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocat... | Keyword[public] identifier[Comparator] operator[<] identifier[Object] operator[>] identifier[withSourceProvider] operator[SEP] Keyword[final] identifier[OrderSourceProvider] identifier[sourceProvider] operator[SEP] {
Keyword[return] Keyword[new] identifier[Comparator] operator[<] identifier[Object] operator[>] o... |
public static int[] RGBtoHSV (float r, float g, float b) {
float h, s, v;
float min, max, delta;
min = Math.min(Math.min(r, g), b);
max = Math.max(Math.max(r, g), b);
v = max;
delta = max - min;
if (max != 0)
s = delta / max;
else {
s = 0;
h = 0;
return new int[]{MathUtils.round(h), MathU... | class class_name[name] begin[{]
method[RGBtoHSV, return_type[type[int]], modifier[public static], parameter[r, g, b]] begin[{]
local_variable[type[float], h]
local_variable[type[float], min]
assign[member[.min], call[Math.min, parameter[call[Math.min, parameter[member[.r], membe... | Keyword[public] Keyword[static] Keyword[int] operator[SEP] operator[SEP] identifier[RGBtoHSV] operator[SEP] Keyword[float] identifier[r] , Keyword[float] identifier[g] , Keyword[float] identifier[b] operator[SEP] {
Keyword[float] identifier[h] , identifier[s] , identifier[v] operator[SEP] Keyword[float] iden... |
DocumentSet remove(ResourcePath key) {
QueryDocumentSnapshot document = keyIndex.get(key);
if (document == null) {
return this;
}
ImmutableSortedMap<ResourcePath, QueryDocumentSnapshot> newKeyIndex = keyIndex.remove(key);
ImmutableSortedSet<QueryDocumentSnapshot> newSortedSet = sortedSet.remo... | class class_name[name] begin[{]
method[remove, return_type[type[DocumentSet]], modifier[default], parameter[key]] begin[{]
local_variable[type[QueryDocumentSnapshot], document]
if[binary_operation[member[.document], ==, literal[null]]] begin[{]
return[THIS[]]
else be... | identifier[DocumentSet] identifier[remove] operator[SEP] identifier[ResourcePath] identifier[key] operator[SEP] {
identifier[QueryDocumentSnapshot] identifier[document] operator[=] identifier[keyIndex] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SE... |
private Collection<String> extractArguments( final FrameworkStartLevelOption[] startLevels )
{
final List<String> arguments = new ArrayList<String>();
if( startLevels.length > 1 )
{
throw new IllegalArgumentException( "Configuration cannot contain more then one framework start le... | class class_name[name] begin[{]
method[extractArguments, return_type[type[Collection]], modifier[private], parameter[startLevels]] begin[{]
local_variable[type[List], arguments]
if[binary_operation[member[startLevels.length], >, literal[1]]] begin[{]
ThrowStatement(expressio... | Keyword[private] identifier[Collection] operator[<] identifier[String] operator[>] identifier[extractArguments] operator[SEP] Keyword[final] identifier[FrameworkStartLevelOption] operator[SEP] operator[SEP] identifier[startLevels] operator[SEP] {
Keyword[final] identifier[List] operator[<] identifier[String] ope... |
public ExecutionBridge launch(final IJob _job,
final String _jobName)
throws EFapsException
{
// we are on WEB thread so services should be normally injected.
final ExecutionBridge bridge = new ExecutionBridge();
// register bridge on session
... | class class_name[name] begin[{]
method[launch, return_type[type[ExecutionBridge]], modifier[public], parameter[_job, _jobName]] begin[{]
local_variable[type[ExecutionBridge], bridge]
if[binary_operation[member[._jobName], ==, literal[null]]] begin[{]
call[bridge.... | Keyword[public] identifier[ExecutionBridge] identifier[launch] operator[SEP] Keyword[final] identifier[IJob] identifier[_job] , Keyword[final] identifier[String] identifier[_jobName] operator[SEP] Keyword[throws] identifier[EFapsException] {
Keyword[final] identifier[ExecutionBridge] identifier[bridge] operator... |
private AnycastInputHandler createAIHandRCD(SIBUuid8 dmeId,
SIBUuid12 gatheringTargetDestUuid,
DestinationDefinition definition,
boolean restartFromStaleBackup)
{
if (TraceCom... | class class_name[name] begin[{]
method[createAIHandRCD, return_type[type[AnycastInputHandler]], modifier[private], parameter[dmeId, gatheringTargetDestUuid, definition, restartFromStaleBackup]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEnt... | Keyword[private] identifier[AnycastInputHandler] identifier[createAIHandRCD] operator[SEP] identifier[SIBUuid8] identifier[dmeId] , identifier[SIBUuid12] identifier[gatheringTargetDestUuid] , identifier[DestinationDefinition] identifier[definition] , Keyword[boolean] identifier[restartFromStaleBackup] operator[SEP] ... |
public WikiPage getPage(Object projectIdOrPath, String slug) throws GitLabApiException {
Response response = get(Response.Status.OK, null,
"projects", getProjectIdOrPath(projectIdOrPath), "wikis", slug);
return (response.readEntity(WikiPage.class));
} | class class_name[name] begin[{]
method[getPage, return_type[type[WikiPage]], modifier[public], parameter[projectIdOrPath, slug]] begin[{]
local_variable[type[Response], response]
return[call[response.readEntity, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, sel... | Keyword[public] identifier[WikiPage] identifier[getPage] operator[SEP] identifier[Object] identifier[projectIdOrPath] , identifier[String] identifier[slug] operator[SEP] Keyword[throws] identifier[GitLabApiException] {
identifier[Response] identifier[response] operator[=] identifier[get] operator[SEP] identifie... |
protected List<CmsResource> getResources() {
List<CmsResource> result = Collections.emptyList();
// get all image resources of the folder
CmsResourceFilter filter = CmsResourceFilter.DEFAULT;
try {
CmsObject cms = getCms();
result = cms.readResources(getParamReso... | class class_name[name] begin[{]
method[getResources, return_type[type[List]], modifier[protected], parameter[]] begin[{]
local_variable[type[List], result]
local_variable[type[CmsResourceFilter], filter]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableD... | Keyword[protected] identifier[List] operator[<] identifier[CmsResource] operator[>] identifier[getResources] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[CmsResource] operator[>] identifier[result] operator[=] identifier[Collections] operator[SEP] identifier[emptyList] operator[SEP] oper... |
public FrequentItemsetsResult run(Database db, final Relation<BitVector> relation) {
// TODO: implement with resizable array, to not need dim.
final int dim = RelationUtil.dimensionality(relation);
final VectorFieldTypeInformation<BitVector> meta = RelationUtil.assumeVectorField(relation);
// Compute ab... | class class_name[name] begin[{]
method[run, return_type[type[FrequentItemsetsResult]], modifier[public], parameter[db, relation]] begin[{]
local_variable[type[int], dim]
local_variable[type[VectorFieldTypeInformation], meta]
local_variable[type[int], minsupp]
call[LOG.ve... | Keyword[public] identifier[FrequentItemsetsResult] identifier[run] operator[SEP] identifier[Database] identifier[db] , Keyword[final] identifier[Relation] operator[<] identifier[BitVector] operator[>] identifier[relation] operator[SEP] {
Keyword[final] Keyword[int] identifier[dim] operator[=] identifier[Relatio... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.