code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public static void fillCounting(int[] array , int offset, int length ) {
for (int i = 0; i < length; i++) {
array[i+offset] = i;
}
} | class class_name[name] begin[{]
method[fillCounting, return_type[void], modifier[public static], parameter[array, offset, length]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=array, postfix_operators=[], ... | Keyword[public] Keyword[static] Keyword[void] identifier[fillCounting] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[array] , Keyword[int] identifier[offset] , Keyword[int] identifier[length] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator... |
public Collection<DataSegment> getLazyAllSegments()
{
return CollectionUtils.createLazyCollectionFromStream(
() -> dataSources.values().stream().flatMap(dataSource -> dataSource.getSegments().stream()),
totalSegments
);
} | class class_name[name] begin[{]
method[getLazyAllSegments, return_type[type[Collection]], modifier[public], parameter[]] begin[{]
return[call[CollectionUtils.createLazyCollectionFromStream, parameter[LambdaExpression(body=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operat... | Keyword[public] identifier[Collection] operator[<] identifier[DataSegment] operator[>] identifier[getLazyAllSegments] operator[SEP] operator[SEP] {
Keyword[return] identifier[CollectionUtils] operator[SEP] identifier[createLazyCollectionFromStream] operator[SEP] operator[SEP] operator[SEP] operator[->] identifie... |
private static void checkServerRunning(final DeviceImportInfo importInfo, final String toBeImported)
throws DevFailed {
XLOGGER.entry();
Device_5 devIDL5 = null;
Device_4 devIDL4 = null;
Device_3 devIDL3 = null;
Device_2 devIDL2 = null;
Device devIDL1 = null;
... | class class_name[name] begin[{]
method[checkServerRunning, return_type[void], modifier[private static], parameter[importInfo, toBeImported]] begin[{]
call[XLOGGER.entry, parameter[]]
local_variable[type[Device_5], devIDL5]
local_variable[type[Device_4], devIDL4]
local_va... | Keyword[private] Keyword[static] Keyword[void] identifier[checkServerRunning] operator[SEP] Keyword[final] identifier[DeviceImportInfo] identifier[importInfo] , Keyword[final] identifier[String] identifier[toBeImported] operator[SEP] Keyword[throws] identifier[DevFailed] {
identifier[XLOGGER] operator[SEP] iden... |
public Matrix3f lookAlong(float dirX, float dirY, float dirZ,
float upX, float upY, float upZ) {
return lookAlong(dirX, dirY, dirZ, upX, upY, upZ, this);
} | class class_name[name] begin[{]
method[lookAlong, return_type[type[Matrix3f]], modifier[public], parameter[dirX, dirY, dirZ, upX, upY, upZ]] begin[{]
return[call[.lookAlong, parameter[member[.dirX], member[.dirY], member[.dirZ], member[.upX], member[.upY], member[.upZ], THIS[]]]]
end[}]
END[}] | Keyword[public] identifier[Matrix3f] identifier[lookAlong] operator[SEP] Keyword[float] identifier[dirX] , Keyword[float] identifier[dirY] , Keyword[float] identifier[dirZ] , Keyword[float] identifier[upX] , Keyword[float] identifier[upY] , Keyword[float] identifier[upZ] operator[SEP] {
Keyword[return] iden... |
@SuppressWarnings("unchecked")
protected final MODEL_ID tryConvertId(Object id) {
try {
return (MODEL_ID) getModelBeanDescriptor().convertId(id);
} catch (Exception e) {
throw new UnprocessableEntityException(Messages.get("info.query.id.unprocessable.entity"), e);
}
... | class class_name[name] begin[{]
method[tryConvertId, return_type[type[MODEL_ID]], modifier[final protected], parameter[id]] begin[{]
TryStatement(block=[ReturnStatement(expression=Cast(expression=MethodInvocation(arguments=[], member=getModelBeanDescriptor, postfix_operators=[], prefix_operators=[], qu... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] Keyword[final] identifier[MODEL_ID] identifier[tryConvertId] operator[SEP] identifier[Object] identifier[id] operator[SEP] {
Keyword[try] {
Keyword[return] operator[SEP] identifier[MODEL_ID] opera... |
@SuppressWarnings("unchecked")
public <T extends BaseWrapper<T>> T create(final Object entity, boolean isRevision) {
if (entity == null) {
return null;
}
// Create the key
final DBWrapperKey key = new DBWrapperKey(entity);
// Check to see if a wrapper has alread... | class class_name[name] begin[{]
method[create, return_type[type[T]], modifier[public], parameter[entity, isRevision]] begin[{]
if[binary_operation[member[.entity], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_variable[typ... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[BaseWrapper] operator[<] identifier[T] operator[>] operator[>] identifier[T] identifier[create] operator[SEP] Keyword[final] identifier[Object] identifier[entity] ... |
public void setTags(String tags) {
if (GitTaskUtils.isNullOrBlankString(tags)) {
throw new BuildException("Invalid tag names provided.");
}
this.tags = tags.split(",");
} | class class_name[name] begin[{]
method[setTags, return_type[void], modifier[public], parameter[tags]] begin[{]
if[call[GitTaskUtils.isNullOrBlankString, parameter[member[.tags]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operato... | Keyword[public] Keyword[void] identifier[setTags] operator[SEP] identifier[String] identifier[tags] operator[SEP] {
Keyword[if] operator[SEP] identifier[GitTaskUtils] operator[SEP] identifier[isNullOrBlankString] operator[SEP] identifier[tags] operator[SEP] operator[SEP] {
Keyword[throw] Keyword[new] ... |
public final int getInt32(final int pos) {
final int position = origin + pos;
if (pos + 3 >= limit || pos < 0) throw new IllegalArgumentException("limit excceed: "
+ (pos < 0 ? pos : (pos + 3)));
byte[] buf = buf... | class class_name[name] begin[{]
method[getInt32, return_type[type[int]], modifier[final public], parameter[pos]] begin[{]
local_variable[type[int], position]
if[binary_operation[binary_operation[binary_operation[member[.pos], +, literal[3]], >=, member[.limit]], ||, binary_operation[mem... | Keyword[public] Keyword[final] Keyword[int] identifier[getInt32] operator[SEP] Keyword[final] Keyword[int] identifier[pos] operator[SEP] {
Keyword[final] Keyword[int] identifier[position] operator[=] identifier[origin] operator[+] identifier[pos] operator[SEP] Keyword[if] operator[SEP] identifier[pos] operator[+... |
public TaskResult add(String key, ArrayList<CharSequence> value) {
mBundle.putCharSequenceArrayList(key, value);
return this;
} | class class_name[name] begin[{]
method[add, return_type[type[TaskResult]], modifier[public], parameter[key, value]] begin[{]
call[mBundle.putCharSequenceArrayList, parameter[member[.key], member[.value]]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[TaskResult] identifier[add] operator[SEP] identifier[String] identifier[key] , identifier[ArrayList] operator[<] identifier[CharSequence] operator[>] identifier[value] operator[SEP] {
identifier[mBundle] operator[SEP] identifier[putCharSequenceArrayList] operator[SEP] identifier[key] ... |
public void apply(IntFloatVector other, LambdaBinOpFloat lambda, boolean skipZeros) {
if (other instanceof IntFloatSortedVector) {
applyToSorted((IntFloatSortedVector)other, lambda, false);
} else if (other instanceof IntFloatHashVector) {
other = new IntFloatSortedVector((IntFlo... | class class_name[name] begin[{]
method[apply, return_type[void], modifier[public], parameter[other, lambda, skipZeros]] begin[{]
if[binary_operation[member[.other], instanceof, type[IntFloatSortedVector]]] begin[{]
call[.applyToSorted, parameter[Cast(expression=MemberRef... | Keyword[public] Keyword[void] identifier[apply] operator[SEP] identifier[IntFloatVector] identifier[other] , identifier[LambdaBinOpFloat] identifier[lambda] , Keyword[boolean] identifier[skipZeros] operator[SEP] {
Keyword[if] operator[SEP] identifier[other] Keyword[instanceof] identifier[IntFloatSortedVector] ... |
public String getCaCertLocations() {
String location;
location = System.getProperty("X509_CERT_DIR");
if (location != null) {
return location;
}
location = getProperty("cacert");
if (location != null) {
return location;
}
return ConfigUtil.discoverCertDirLocation();
} | class class_name[name] begin[{]
method[getCaCertLocations, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[String], location]
assign[member[.location], call[System.getProperty, parameter[literal["X509_CERT_DIR"]]]]
if[binary_operati... | Keyword[public] identifier[String] identifier[getCaCertLocations] operator[SEP] operator[SEP] {
identifier[String] identifier[location] operator[SEP] identifier[location] operator[=] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] ope... |
public List<V> get(K key){
return (List<V>)map.get(key);
} | class class_name[name] begin[{]
method[get, return_type[type[List]], modifier[public], parameter[key]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_... | Keyword[public] identifier[List] operator[<] identifier[V] operator[>] identifier[get] operator[SEP] identifier[K] identifier[key] operator[SEP] {
Keyword[return] operator[SEP] identifier[List] operator[<] identifier[V] operator[>] operator[SEP] identifier[map] operator[SEP] identifier[get] operator[SEP] identif... |
public CreateCollectionRequestBuilder<T,ID> create(List<T> items)
{
return new CreateCollectionRequestBuilder<T,ID>(version,type,entityName,items);
} | class class_name[name] begin[{]
method[create, return_type[type[CreateCollectionRequestBuilder]], modifier[public], parameter[items]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=type... | Keyword[public] identifier[CreateCollectionRequestBuilder] operator[<] identifier[T] , identifier[ID] operator[>] identifier[create] operator[SEP] identifier[List] operator[<] identifier[T] operator[>] identifier[items] operator[SEP] {
Keyword[return] Keyword[new] identifier[CreateCollectionRequestBuilder] oper... |
public static UUID nameUUIDFromString(String name, UUID namespace, String encoding) {
byte[] nameAsBytes = name.getBytes();
byte[] concat = new byte[UUID_BYTE_LENGTH + nameAsBytes.length];
System.arraycopy(namespace.getRawBytes(), 0, concat, 0, UUID_BYTE_LENGTH);
System.arraycopy(nameAsBytes, 0, concat, UUID_BY... | class class_name[name] begin[{]
method[nameUUIDFromString, return_type[type[UUID]], modifier[public static], parameter[name, namespace, encoding]] begin[{]
local_variable[type[byte], nameAsBytes]
local_variable[type[byte], concat]
call[System.arraycopy, parameter[call[namespace.... | Keyword[public] Keyword[static] identifier[UUID] identifier[nameUUIDFromString] operator[SEP] identifier[String] identifier[name] , identifier[UUID] identifier[namespace] , identifier[String] identifier[encoding] operator[SEP] {
Keyword[byte] operator[SEP] operator[SEP] identifier[nameAsBytes] operator[=] iden... |
private void resolveBaseDirection(byte[] levels) {
if (Bidi.IsDefaultLevel(levels[0])) {
byte level = Bidi.getBaseDirection(text);
levels[0] = level != Bidi.NEUTRAL ? level
: levels[0] == Bidi.LEVEL_DEFAULT_RTL ? Bidi.RTL : Bidi.LTR;
} else {
levels[0]... | class class_name[name] begin[{]
method[resolveBaseDirection, return_type[void], modifier[private], parameter[levels]] begin[{]
if[call[Bidi.IsDefaultLevel, parameter[member[.levels]]]] begin[{]
local_variable[type[byte], level]
assign[member[.levels], Ternary... | Keyword[private] Keyword[void] identifier[resolveBaseDirection] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[levels] operator[SEP] {
Keyword[if] operator[SEP] identifier[Bidi] operator[SEP] identifier[IsDefaultLevel] operator[SEP] identifier[levels] operator[SEP] Other[0] operator[SEP] oper... |
public Instruction read(int opcode, Input src, int ofs) throws IOException {
switch (opcode) {
case WIDE:
return readWide(src, ofs);
case TABLESWITCH:
return readTableSwitch(src, ofs);
case LOOKUPSWITCH:
return readLookupSwitch(src, ofs);
defau... | class class_name[name] begin[{]
method[read, return_type[type[Instruction]], modifier[public], parameter[opcode, src, ofs]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=['WIDE'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=src, postfix_operators... | Keyword[public] identifier[Instruction] identifier[read] operator[SEP] Keyword[int] identifier[opcode] , identifier[Input] identifier[src] , Keyword[int] identifier[ofs] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[switch] operator[SEP] identifier[opcode] operator[SEP] {
Keyword[c... |
@Override
public float getFloatValue( final String key,
final float defaultValue )
{
return formatFloatValue( key, getFormattedPropValue( key ), defaultValue );
} | class class_name[name] begin[{]
method[getFloatValue, return_type[type[float]], modifier[public], parameter[key, defaultValue]] begin[{]
return[call[.formatFloatValue, parameter[member[.key], call[.getFormattedPropValue, parameter[member[.key]]], member[.defaultValue]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[float] identifier[getFloatValue] operator[SEP] Keyword[final] identifier[String] identifier[key] , Keyword[final] Keyword[float] identifier[defaultValue] operator[SEP] {
Keyword[return] identifier[formatFloatValue] operator[SEP] identifier[key] , ident... |
public int doAfterBody() throws JspException
{
if (hasErrors()) {
return SKIP_BODY;
}
// if this is a repeater we need to repeater over the body...
if (_repeater) {
if (doRepeaterAfterBody())
return EVAL_BODY_AGAIN;
}
if (body... | class class_name[name] begin[{]
method[doAfterBody, return_type[type[int]], modifier[public], parameter[]] begin[{]
if[call[.hasErrors, parameter[]]] begin[{]
return[member[.SKIP_BODY]]
else begin[{]
None
end[}]
if[member[._repeater]] begin[{]
... | Keyword[public] Keyword[int] identifier[doAfterBody] operator[SEP] operator[SEP] Keyword[throws] identifier[JspException] {
Keyword[if] operator[SEP] identifier[hasErrors] operator[SEP] operator[SEP] operator[SEP] {
Keyword[return] identifier[SKIP_BODY] operator[SEP]
}
Keyword[if] operat... |
public Map<String, String> toMap() {
Map<String, String> map = new HashMap<>();
map.put("message", this.getMessage());
map.put("success", this.getSuccess());
map.put("is_ported", this.getIsPorted());
map.put("provider", this.getProvider());
map.put("type", this.getType()... | class class_name[name] begin[{]
method[toMap, return_type[type[Map]], modifier[public], parameter[]] begin[{]
local_variable[type[Map], map]
call[map.put, parameter[literal["message"], THIS[call[None.getMessage, parameter[]]]]]
call[map.put, parameter[literal["success"],... | Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[toMap] operator[SEP] operator[SEP] {
identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[map] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] op... |
public String trimLeading(String str) {
if (str == null) {
return null;
}
int length = str.length();
for (int i=0; i<length; i++) {
if (str.charAt(i) > ' ') {
return str.substring(i);
}
}
return "";
} | class class_name[name] begin[{]
method[trimLeading, return_type[type[String]], modifier[public], parameter[str]] begin[{]
if[binary_operation[member[.str], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_variable[type[int], ... | Keyword[public] identifier[String] identifier[trimLeading] operator[SEP] identifier[String] identifier[str] operator[SEP] {
Keyword[if] operator[SEP] identifier[str] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
Keyword[int] identifier[length] opera... |
public static void extract(int format, Resource source, Resource target) throws IOException {
if (format == FORMAT_ZIP) extractZip(source, target);
else if (format == FORMAT_TAR) extractTar(source, target);
else if (format == FORMAT_GZIP) extractGZip(source, target);
else if (format == FORMAT_TGZ) extractTGZ(source... | class class_name[name] begin[{]
method[extract, return_type[void], modifier[public static], parameter[format, source, target]] begin[{]
if[binary_operation[member[.format], ==, member[.FORMAT_ZIP]]] begin[{]
call[.extractZip, parameter[member[.source], member[.target]]]
else... | Keyword[public] Keyword[static] Keyword[void] identifier[extract] operator[SEP] Keyword[int] identifier[format] , identifier[Resource] identifier[source] , identifier[Resource] identifier[target] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[format] operator[==] i... |
public <T extends TermStream> T getTermStream(T reusableTermStream) {
reusableTermStream.set(this.getAtomicReaderId(), this.getAtomicDocId());
return reusableTermStream;
} | class class_name[name] begin[{]
method[getTermStream, return_type[type[T]], modifier[public], parameter[reusableTermStream]] begin[{]
call[reusableTermStream.set, parameter[THIS[call[None.getAtomicReaderId, parameter[]]], THIS[call[None.getAtomicDocId, parameter[]]]]]
return[member[.reu... | Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[TermStream] operator[>] identifier[T] identifier[getTermStream] operator[SEP] identifier[T] identifier[reusableTermStream] operator[SEP] {
identifier[reusableTermStream] operator[SEP] identifier[set] operator[SEP] Keyword[this] operator[SEP] i... |
static void printMyTimeLine(){
long [] s = TimeLine.snapshot();
System.err.println("===================================<TIMELINE>==============================================");
for(int i = 0; i < TimeLine.length(); ++i) {
long lo = TimeLine.l0(s, i),hi = TimeLine.l8(s, i);
int port = (int)((lo... | class class_name[name] begin[{]
method[printMyTimeLine, return_type[void], modifier[static], parameter[]] begin[{]
local_variable[type[long], s]
call[System.err.println, parameter[literal["===================================<TIMELINE>=============================================="]]]
... | Keyword[static] Keyword[void] identifier[printMyTimeLine] operator[SEP] operator[SEP] {
Keyword[long] operator[SEP] operator[SEP] identifier[s] operator[=] identifier[TimeLine] operator[SEP] identifier[snapshot] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[err] operator[S... |
private ByteBuffer convertValueByFunction(Tree functionCall, CfDef columnFamily, ByteBuffer columnName)
{
return convertValueByFunction(functionCall, columnFamily, columnName, false);
} | class class_name[name] begin[{]
method[convertValueByFunction, return_type[type[ByteBuffer]], modifier[private], parameter[functionCall, columnFamily, columnName]] begin[{]
return[call[.convertValueByFunction, parameter[member[.functionCall], member[.columnFamily], member[.columnName], literal[false]]]... | Keyword[private] identifier[ByteBuffer] identifier[convertValueByFunction] operator[SEP] identifier[Tree] identifier[functionCall] , identifier[CfDef] identifier[columnFamily] , identifier[ByteBuffer] identifier[columnName] operator[SEP] {
Keyword[return] identifier[convertValueByFunction] operator[SEP] identi... |
private Path gotLeftTopArrowPath() {
Path path = new Path();
int diameter = cSize * 2;
// 左上角圆角起点
path.moveTo(aWidth, cSize);
RectF rectF = new RectF(aWidth, 0, aWidth + diameter, diameter);
path.arcTo(rectF, 180, 90);
// 右上角圆角起点
path.lineTo(mWidth - cSize... | class class_name[name] begin[{]
method[gotLeftTopArrowPath, return_type[type[Path]], modifier[private], parameter[]] begin[{]
local_variable[type[Path], path]
local_variable[type[int], diameter]
call[path.moveTo, parameter[member[.aWidth], member[.cSize]]]
local_variable... | Keyword[private] identifier[Path] identifier[gotLeftTopArrowPath] operator[SEP] operator[SEP] {
identifier[Path] identifier[path] operator[=] Keyword[new] identifier[Path] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[diameter] operator[=] identifier[cSize] operator[*] Other[2] operator[SEP] ... |
@Override
public int compareTo(LocalTime other) {
int cmp = Integer.compare(hour, other.hour);
if (cmp == 0) {
cmp = Integer.compare(minute, other.minute);
if (cmp == 0) {
cmp = Integer.compare(second, other.second);
if (cmp == 0) {
... | class class_name[name] begin[{]
method[compareTo, return_type[type[int]], modifier[public], parameter[other]] begin[{]
local_variable[type[int], cmp]
if[binary_operation[member[.cmp], ==, literal[0]]] begin[{]
assign[member[.cmp], call[Integer.compare, parameter[... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[compareTo] operator[SEP] identifier[LocalTime] identifier[other] operator[SEP] {
Keyword[int] identifier[cmp] operator[=] identifier[Integer] operator[SEP] identifier[compare] operator[SEP] identifier[hour] , identifier[other] operator[S... |
@XmlElementDecl(namespace = "urn:oasis:names:tc:ciq:xsdschema:xAL:2.0", name = "AddressDetails")
public JAXBElement<AddressDetails> createAddressDetails(AddressDetails value) {
return new JAXBElement<AddressDetails>(_AddressDetails_QNAME, AddressDetails.class, null, value);
} | class class_name[name] begin[{]
method[createAddressDetails, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_AddressDetails_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(pos... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[AddressDetails] operator[>] identifier[createAddressDetails] operator[SEP] identifier[Addr... |
@Override
GroupCmdReplyList command_inout_reply_i(final int rid, final int tmo, final boolean fwd) throws DevFailed {
final Integer rid_obj = new Integer(rid);
final GroupCmdReplyList rl = new GroupCmdReplyList();
final AsynchRequest ar = arp.get(rid_obj);
if (ar == null) {
final DevError[] errors = new De... | class class_name[name] begin[{]
method[command_inout_reply_i, return_type[type[GroupCmdReplyList]], modifier[default], parameter[rid, tmo, fwd]] begin[{]
local_variable[type[Integer], rid_obj]
local_variable[type[GroupCmdReplyList], rl]
local_variable[type[AsynchRequest], ar]
... | annotation[@] identifier[Override] identifier[GroupCmdReplyList] identifier[command_inout_reply_i] operator[SEP] Keyword[final] Keyword[int] identifier[rid] , Keyword[final] Keyword[int] identifier[tmo] , Keyword[final] Keyword[boolean] identifier[fwd] operator[SEP] Keyword[throws] identifier[DevFailed] {
Keyw... |
public static Object copy(Object source) {
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(baos);
oos.writeObject(source);
ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
ObjectInputStream ois = new ObjectIn... | class class_name[name] begin[{]
method[copy, return_type[type[Object]], modifier[public static], parameter[source]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arg... | Keyword[public] Keyword[static] identifier[Object] identifier[copy] operator[SEP] identifier[Object] identifier[source] operator[SEP] {
Keyword[try] {
identifier[ByteArrayOutputStream] identifier[baos] operator[=] Keyword[new] identifier[ByteArrayOutputStream] operator[SEP] operator[SEP] operator[SEP]... |
public static void saveImage(Image image, String filename, String imgFileFormat){
File f = new File(filename);
if(!f.isDirectory()){
saveImage(image, f, imgFileFormat);
} else {
throw new ImageSaverException(new IOException(String.format("provided file name denotes a directory. %s", filename)));
}
} | class class_name[name] begin[{]
method[saveImage, return_type[void], modifier[public static], parameter[image, filename, imgFileFormat]] begin[{]
local_variable[type[File], f]
if[call[f.isDirectory, parameter[]]] begin[{]
call[.saveImage, parameter[member[.image]... | Keyword[public] Keyword[static] Keyword[void] identifier[saveImage] operator[SEP] identifier[Image] identifier[image] , identifier[String] identifier[filename] , identifier[String] identifier[imgFileFormat] operator[SEP] {
identifier[File] identifier[f] operator[=] Keyword[new] identifier[File] operator[SEP] i... |
@XmlElementDecl(namespace = "http://xmlns.jcp.org/xml/ns/javaee", name = "job")
public JAXBElement<JSLJob> createJob(JSLJob value) {
return new JAXBElement<JSLJob>(_Job_QNAME, JSLJob.class, null, value);
} | class class_name[name] begin[{]
method[createJob, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_Job_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], pre... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[JSLJob] operator[>] identifier[createJob] operator[SEP] identifier[JSLJob] identifier[valu... |
public void mergeMapSection(int line, int column, String mapSectionContents)
throws SourceMapParseException {
setStartingPosition(line, column);
SourceMapConsumerV3 section = new SourceMapConsumerV3();
section.parse(mapSectionContents);
section.visitMappings(new ConsumerEntryVisitor());
} | class class_name[name] begin[{]
method[mergeMapSection, return_type[void], modifier[public], parameter[line, column, mapSectionContents]] begin[{]
call[.setStartingPosition, parameter[member[.line], member[.column]]]
local_variable[type[SourceMapConsumerV3], section]
cal... | Keyword[public] Keyword[void] identifier[mergeMapSection] operator[SEP] Keyword[int] identifier[line] , Keyword[int] identifier[column] , identifier[String] identifier[mapSectionContents] operator[SEP] Keyword[throws] identifier[SourceMapParseException] {
identifier[setStartingPosition] operator[SEP] identifie... |
public static BlankFragment newInstance() {
BlankFragment fragment = new BlankFragment();
Bundle args = new Bundle();
fragment.setArguments(args);
return fragment;
} | class class_name[name] begin[{]
method[newInstance, return_type[type[BlankFragment]], modifier[public static], parameter[]] begin[{]
local_variable[type[BlankFragment], fragment]
local_variable[type[Bundle], args]
call[fragment.setArguments, parameter[member[.args]]]
ret... | Keyword[public] Keyword[static] identifier[BlankFragment] identifier[newInstance] operator[SEP] operator[SEP] {
identifier[BlankFragment] identifier[fragment] operator[=] Keyword[new] identifier[BlankFragment] operator[SEP] operator[SEP] operator[SEP] identifier[Bundle] identifier[args] operator[=] Keyword[new] ... |
public String getSchema()
{
getEntityType();
return this.entityType != null && !StringUtils.isBlank(((AbstractManagedType) this.entityType).getSchemaName()) ? ((AbstractManagedType) this.entityType)
.getSchemaName() : schema;
} | class class_name[name] begin[{]
method[getSchema, return_type[type[String]], modifier[public], parameter[]] begin[{]
call[.getEntityType, parameter[]]
return[TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=This(postfix_operators=[], prefix_operators=[], qua... | Keyword[public] identifier[String] identifier[getSchema] operator[SEP] operator[SEP] {
identifier[getEntityType] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] identifier[entityType] operator[!=] Other[null] operator[&&] operator[!] identifier[StringUtils] operator[SEP] ide... |
public void trace(String format, Object... args) {
if (!logger.isTraceEnabled())
return;
if (instanceofLAL) {
String formattedMessage = MessageFormatter.arrayFormat(format, args).getMessage();
((LocationAwareLogger) logger).log(null, fqcn, LocationAwareLogger.TRACE_I... | class class_name[name] begin[{]
method[trace, return_type[void], modifier[public], parameter[format, args]] begin[{]
if[call[logger.isTraceEnabled, parameter[]]] begin[{]
return[None]
else begin[{]
None
end[}]
if[member[.instanceofLAL]] begin[{]
local... | Keyword[public] Keyword[void] identifier[trace] operator[SEP] identifier[String] identifier[format] , identifier[Object] operator[...] identifier[args] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[logger] operator[SEP] identifier[isTraceEnabled] operator[SEP] operator[SEP] operator[SEP] Keyw... |
@NonNull
@Override
public ListenerToken addChangeListener(@NonNull QueryChangeListener listener) {
if (listener == null) { throw new IllegalArgumentException("listener cannot be null."); }
return addChangeListener(null, listener);
} | class class_name[name] begin[{]
method[addChangeListener, return_type[type[ListenerToken]], modifier[public], parameter[listener]] begin[{]
if[binary_operation[member[.listener], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators... | annotation[@] identifier[NonNull] annotation[@] identifier[Override] Keyword[public] identifier[ListenerToken] identifier[addChangeListener] operator[SEP] annotation[@] identifier[NonNull] identifier[QueryChangeListener] identifier[listener] operator[SEP] {
Keyword[if] operator[SEP] identifier[listener] operator... |
public static Collection<String> getUnstaticClassFieldNameCollection(Class<?> clazz) {
if (clazz == null) {
throw new NullPointerException("传入的clazz为空对象!");
}
Field[] fields = clazz.getDeclaredFields();
int length = fields.length;
Collection<String> fieldNames = new A... | class class_name[name] begin[{]
method[getUnstaticClassFieldNameCollection, return_type[type[Collection]], modifier[public static], parameter[clazz]] begin[{]
if[binary_operation[member[.clazz], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(p... | Keyword[public] Keyword[static] identifier[Collection] operator[<] identifier[String] operator[>] identifier[getUnstaticClassFieldNameCollection] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[SEP] {
Keyword[if] operator[SEP] identifier[clazz] operator[==] Other[nu... |
public boolean areParamsValid() {
if (queryType == QueryType.COUNT) {
if (eventCollection == null || eventCollection.isEmpty()) {
return false;
}
}
if (queryType == QueryType.COUNT_UNIQUE
|| queryType == QueryType.MINIMUM || queryType == Q... | class class_name[name] begin[{]
method[areParamsValid, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.queryType], ==, member[QueryType.COUNT]]] begin[{]
if[binary_operation[binary_operation[member[.eventCollection], ==, li... | Keyword[public] Keyword[boolean] identifier[areParamsValid] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[queryType] operator[==] identifier[QueryType] operator[SEP] identifier[COUNT] operator[SEP] {
Keyword[if] operator[SEP] identifier[eventCollection] operator[==] Other[null] op... |
protected WriteableLogRecord getWriteableLogRecord(int recordLength) throws InternalLogException
{
if (tc.isEntryEnabled())
Tr.entry(tc, "getWriteableLogRecord", new Object[] { this, recordLength });
WriteableLogRecord writeableLogRecord = null;
boolean keyPointRequired = false... | class class_name[name] begin[{]
method[getWriteableLogRecord, return_type[type[WriteableLogRecord]], modifier[protected], parameter[recordLength]] begin[{]
if[call[tc.isEntryEnabled, parameter[]]] begin[{]
call[Tr.entry, parameter[member[.tc], literal["getWriteableLogRecord"], Array... | Keyword[protected] identifier[WriteableLogRecord] identifier[getWriteableLogRecord] operator[SEP] Keyword[int] identifier[recordLength] operator[SEP] Keyword[throws] identifier[InternalLogException] {
Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] op... |
protected void attemptToSplit(LeafNode node, Node parent, int parentIndex) {
// Initialize the split criterion
SplitCriterion splitCriterion = (SplitCriterion) getPreparedClassOption(splitCriterionOption);
// Using this criterion, find the best split per attribute and rank the results
AttributeSplitSuggestion... | class class_name[name] begin[{]
method[attemptToSplit, return_type[void], modifier[protected], parameter[node, parent, parentIndex]] begin[{]
local_variable[type[SplitCriterion], splitCriterion]
local_variable[type[AttributeSplitSuggestion], bestSplitSuggestions]
local_variable[type[Lis... | Keyword[protected] Keyword[void] identifier[attemptToSplit] operator[SEP] identifier[LeafNode] identifier[node] , identifier[Node] identifier[parent] , Keyword[int] identifier[parentIndex] operator[SEP] {
identifier[SplitCriterion] identifier[splitCriterion] operator[=] operator[SEP] identifier[SplitCriterion]... |
static StructTypeInfo getSchemaTypeInfo(Configuration conf) {
String schemaTypeInfo = conf.get(SCHEMA_TYPE_INFO);
if (schemaTypeInfo != null && !schemaTypeInfo.isEmpty()) {
LOG.debug("Got schema typeInfo from conf: {}", schemaTypeInfo);
return (StructTypeInfo) TypeInfoUtils.getTypeInfoFromTypeString... | class class_name[name] begin[{]
method[getSchemaTypeInfo, return_type[type[StructTypeInfo]], modifier[static], parameter[conf]] begin[{]
local_variable[type[String], schemaTypeInfo]
if[binary_operation[binary_operation[member[.schemaTypeInfo], !=, literal[null]], &&, call[schemaTypeInfo... | Keyword[static] identifier[StructTypeInfo] identifier[getSchemaTypeInfo] operator[SEP] identifier[Configuration] identifier[conf] operator[SEP] {
identifier[String] identifier[schemaTypeInfo] operator[=] identifier[conf] operator[SEP] identifier[get] operator[SEP] identifier[SCHEMA_TYPE_INFO] operator[SEP] opera... |
private String[] getComments(Map<String, Object> map, EnumNode node) {
// 1. 模板引擎解析
try {
StringWriter stringWriter = new StringWriter();
Template template = templates.get(node);
if (template != null){
template.process(map, stringWriter);
... | class class_name[name] begin[{]
method[getComments, return_type[type[String]], modifier[private], parameter[map, node]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type... | Keyword[private] identifier[String] operator[SEP] operator[SEP] identifier[getComments] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[map] , identifier[EnumNode] identifier[node] operator[SEP] {
Keyword[try] {
identifier[StringWriter] identi... |
@Override
public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext) throws IOException {
Object entity = responseContext.getEntity();
if (entity instanceof Download) {
Download downloadEntity = (Download) entity;
Response.ResponseBu... | class class_name[name] begin[{]
method[filter, return_type[void], modifier[public], parameter[requestContext, responseContext]] begin[{]
local_variable[type[Object], entity]
if[binary_operation[member[.entity], instanceof, type[Download]]] begin[{]
local_variable[type[Downlo... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[filter] operator[SEP] identifier[ContainerRequestContext] identifier[requestContext] , identifier[ContainerResponseContext] identifier[responseContext] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[Object] identifie... |
@Override
public Timestamp getTimestamp(int columnIndex, Calendar cal)
throws SQLException {
checkColumnBounds(columnIndex);
throw SQLError.noSupport();
} | class class_name[name] begin[{]
method[getTimestamp, return_type[type[Timestamp]], modifier[public], parameter[columnIndex, cal]] begin[{]
call[.checkColumnBounds, parameter[member[.columnIndex]]]
ThrowStatement(expression=MethodInvocation(arguments=[], member=noSupport, postfix_operato... | annotation[@] identifier[Override] Keyword[public] identifier[Timestamp] identifier[getTimestamp] operator[SEP] Keyword[int] identifier[columnIndex] , identifier[Calendar] identifier[cal] operator[SEP] Keyword[throws] identifier[SQLException] {
identifier[checkColumnBounds] operator[SEP] identifier[columnIndex]... |
public List<I> findIntersections(ChronoInterval<T> interval) {
// trivial case
if (interval.isEmpty()) {
return Collections.emptyList();
}
// make search interval half-open
T low = interval.getStart().getTemporal();
T high = interval.getEnd().getTemporal();
... | class class_name[name] begin[{]
method[findIntersections, return_type[type[List]], modifier[public], parameter[interval]] begin[{]
if[call[interval.isEmpty, parameter[]]] begin[{]
return[call[Collections.emptyList, parameter[]]]
else begin[{]
None
end[}]
loca... | Keyword[public] identifier[List] operator[<] identifier[I] operator[>] identifier[findIntersections] operator[SEP] identifier[ChronoInterval] operator[<] identifier[T] operator[>] identifier[interval] operator[SEP] {
Keyword[if] operator[SEP] identifier[interval] operator[SEP] identifier[isEmpty] operator[SEP] o... |
public void getBackStoryQuestionInfo(int[] ids, Callback<List<BackStoryQuestion>> callback) throws GuildWars2Exception, NullPointerException {
isParamValid(new ParamChecker(ids));
gw2API.getBackStoryQuestionInfo(processIds(ids), GuildWars2.lang.getValue()).enqueue(callback);
} | class class_name[name] begin[{]
method[getBackStoryQuestionInfo, return_type[void], modifier[public], parameter[ids, callback]] begin[{]
call[.isParamValid, parameter[ClassCreator(arguments=[MemberReference(member=ids, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=... | Keyword[public] Keyword[void] identifier[getBackStoryQuestionInfo] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[ids] , identifier[Callback] operator[<] identifier[List] operator[<] identifier[BackStoryQuestion] operator[>] operator[>] identifier[callback] operator[SEP] Keyword[throws] identifier[G... |
public void setPFName(String newPFName) {
String oldPFName = pfName;
pfName = newPFName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.EPF__PF_NAME, oldPFName, pfName));
} | class class_name[name] begin[{]
method[setPFName, return_type[void], modifier[public], parameter[newPFName]] begin[{]
local_variable[type[String], oldPFName]
assign[member[.pfName], member[.newPFName]]
if[call[.eNotificationRequired, parameter[]]] begin[{]
ca... | Keyword[public] Keyword[void] identifier[setPFName] operator[SEP] identifier[String] identifier[newPFName] operator[SEP] {
identifier[String] identifier[oldPFName] operator[=] identifier[pfName] operator[SEP] identifier[pfName] operator[=] identifier[newPFName] operator[SEP] Keyword[if] operator[SEP] identifier[... |
public void delete ()
{
IntBuffer idbuf = BufferUtils.createIntBuffer(1);
idbuf.put(_id).rewind();
AL10.alDeleteSources(idbuf);
_id = 0;
_queue.clear();
} | class class_name[name] begin[{]
method[delete, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[IntBuffer], idbuf]
call[idbuf.put, parameter[member[._id]]]
call[AL10.alDeleteSources, parameter[member[.idbuf]]]
assign[member[.... | Keyword[public] Keyword[void] identifier[delete] operator[SEP] operator[SEP] {
identifier[IntBuffer] identifier[idbuf] operator[=] identifier[BufferUtils] operator[SEP] identifier[createIntBuffer] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[idbuf] operator[SEP] identifier[put] operator[SEP] ide... |
public T visitList(List elm, C context) {
if (elm.getTypeSpecifier() != null) {
visitElement(elm.getTypeSpecifier(), context);
}
for (Expression element : elm.getElement()) {
visitElement(element, context);
}
return null;
} | class class_name[name] begin[{]
method[visitList, return_type[type[T]], modifier[public], parameter[elm, context]] begin[{]
if[binary_operation[call[elm.getTypeSpecifier, parameter[]], !=, literal[null]]] begin[{]
call[.visitElement, parameter[call[elm.getTypeSpecifier, ... | Keyword[public] identifier[T] identifier[visitList] operator[SEP] identifier[List] identifier[elm] , identifier[C] identifier[context] operator[SEP] {
Keyword[if] operator[SEP] identifier[elm] operator[SEP] identifier[getTypeSpecifier] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] {
... |
public static String httpPost (
final URL url, final String submission, int timeout, final Map<String, String> requestProps)
throws IOException, ServiceWaiter.TimeoutException
{
final ServiceWaiter<String> waiter = new ServiceWaiter<String>(
(timeout < 0) ? ServiceWaiter.NO_TIMEO... | class class_name[name] begin[{]
method[httpPost, return_type[type[String]], modifier[public static], parameter[url, submission, timeout, requestProps]] begin[{]
local_variable[type[ServiceWaiter], waiter]
local_variable[type[Thread], tt]
call[tt.start, parameter[]]
... | Keyword[public] Keyword[static] identifier[String] identifier[httpPost] operator[SEP] Keyword[final] identifier[URL] identifier[url] , Keyword[final] identifier[String] identifier[submission] , Keyword[int] identifier[timeout] , Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[String] oper... |
public Observable<ServiceResponse<FoundFaces>> findFacesWithServiceResponseAsync(Boolean cacheImage) {
if (this.client.baseUrl() == null) {
throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null.");
}
String parameterizedHost = Joiner.on(",... | class class_name[name] begin[{]
method[findFacesWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[cacheImage]] begin[{]
if[binary_operation[THIS[member[None.client]call[None.baseUrl, parameter[]]], ==, literal[null]]] begin[{]
ThrowStatement(expres... | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[FoundFaces] operator[>] operator[>] identifier[findFacesWithServiceResponseAsync] operator[SEP] identifier[Boolean] identifier[cacheImage] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] id... |
@Override
public Set<String> getResourcePaths(final String name) {
final String normalizedname = Path.normalizeResourcePath(name);
LOG.debug("Searching bundle [" + bundle + "] for resource paths of ["
+ normalizedname + "]");
final Enumeration<String> entryPaths = bundle
.getEntryPaths(normalizedname);
... | class class_name[name] begin[{]
method[getResourcePaths, return_type[type[Set]], modifier[public], parameter[name]] begin[{]
local_variable[type[String], normalizedname]
call[LOG.debug, parameter[binary_operation[binary_operation[binary_operation[binary_operation[literal["Searching bund... | annotation[@] identifier[Override] Keyword[public] identifier[Set] operator[<] identifier[String] operator[>] identifier[getResourcePaths] operator[SEP] Keyword[final] identifier[String] identifier[name] operator[SEP] {
Keyword[final] identifier[String] identifier[normalizedname] operator[=] identifier[Path] ope... |
private void determineFramePal(int index) {
if ((inMode != InputMode.VOBSUB && inMode != InputMode.SUPIFO)
|| configuration.getPaletteMode() != PaletteMode.KEEP_EXISTING) {
// get the primary color from the source palette
int rgbSrc[] = subtitleStream.getPalette().getRGB(
subtitleStream.getPrimary... | class class_name[name] begin[{]
method[determineFramePal, return_type[void], modifier[private], parameter[index]] begin[{]
if[binary_operation[binary_operation[binary_operation[member[.inMode], !=, member[InputMode.VOBSUB]], &&, binary_operation[member[.inMode], !=, member[InputMode.SUPIFO]]], ... | Keyword[private] Keyword[void] identifier[determineFramePal] operator[SEP] Keyword[int] identifier[index] operator[SEP] {
Keyword[if] operator[SEP] operator[SEP] identifier[inMode] operator[!=] identifier[InputMode] operator[SEP] identifier[VOBSUB] operator[&&] identifier[inMode] operator[!=] identifier[InputMod... |
private static long lowMask(String chars) {
int n = chars.length();
long m = 0;
for (int i = 0; i < n; i++) {
char c = chars.charAt(i);
if (c < 64)
m |= (1L << c);
}
return m;
} | class class_name[name] begin[{]
method[lowMask, return_type[type[long]], modifier[private static], parameter[chars]] begin[{]
local_variable[type[int], n]
local_variable[type[long], m]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], decl... | Keyword[private] Keyword[static] Keyword[long] identifier[lowMask] operator[SEP] identifier[String] identifier[chars] operator[SEP] {
Keyword[int] identifier[n] operator[=] identifier[chars] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[m] operator[=] Other[0... |
public void ecrire(String texte)
{
//on va chercher le chemin et le nom du fichier et on me tout ca dans un String
String adressedufichier = System.getProperty("user.dir") + "\\monfichier.txt";
//on me try si jamais il y a une exception
try
{
//BufferedWriter a besoin d un FileWriter,
//les 2 vo... | class class_name[name] begin[{]
method[ecrire, return_type[void], modifier[public], parameter[texte]] begin[{]
local_variable[type[String], adressedufichier]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(argu... | Keyword[public] Keyword[void] identifier[ecrire] operator[SEP] identifier[String] identifier[texte] operator[SEP] {
identifier[String] identifier[adressedufichier] operator[=] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[+] literal[String] operator... |
public int getGroupLengths(int index, char offsets[], char lengths[])
{
char length = 0xffff;
byte b = 0,
n = 0;
int shift;
index = index * m_groupsize_; // byte count offsets of group strings
int stringoffset = UCharacterUtility.toInt(
... | class class_name[name] begin[{]
method[getGroupLengths, return_type[type[int]], modifier[public], parameter[index, offsets, lengths]] begin[{]
local_variable[type[char], length]
local_variable[type[byte], b]
local_variable[type[int], shift]
assign[member[.index], binary_... | Keyword[public] Keyword[int] identifier[getGroupLengths] operator[SEP] Keyword[int] identifier[index] , Keyword[char] identifier[offsets] operator[SEP] operator[SEP] , Keyword[char] identifier[lengths] operator[SEP] operator[SEP] operator[SEP] {
Keyword[char] identifier[length] operator[=] literal[Integer] ope... |
public E get(SymbolKey key, L secondaryKey)
{
// Extract the sequence key from the symbol key.
int sequenceKey = ((SymbolKeyImpl) key).sequenceKey;
// Check that the field for the secondary key exists, and return null if not.
CircularArrayMap<E> field = fieldMap.get(secondaryKey);
... | class class_name[name] begin[{]
method[get, return_type[type[E]], modifier[public], parameter[key, secondaryKey]] begin[{]
local_variable[type[int], sequenceKey]
local_variable[type[CircularArrayMap], field]
if[binary_operation[member[.field], ==, literal[null]]] begin[{]
... | Keyword[public] identifier[E] identifier[get] operator[SEP] identifier[SymbolKey] identifier[key] , identifier[L] identifier[secondaryKey] operator[SEP] {
Keyword[int] identifier[sequenceKey] operator[=] operator[SEP] operator[SEP] identifier[SymbolKeyImpl] operator[SEP] identifier[key] operator[SEP] operator[S... |
public void updateComponentDataMemberDefaultAccess(String strAccess) throws SecurityException, ApplicationException {
checkWriteAccess();
boolean hasAccess = ConfigWebUtil.hasAccess(config, SecurityManager.TYPE_SETTING);
if (!hasAccess) throw new SecurityException("no access to update component setting");
Element... | class class_name[name] begin[{]
method[updateComponentDataMemberDefaultAccess, return_type[void], modifier[public], parameter[strAccess]] begin[{]
call[.checkWriteAccess, parameter[]]
local_variable[type[boolean], hasAccess]
if[member[.hasAccess]] begin[{]
ThrowStatement... | Keyword[public] Keyword[void] identifier[updateComponentDataMemberDefaultAccess] operator[SEP] identifier[String] identifier[strAccess] operator[SEP] Keyword[throws] identifier[SecurityException] , identifier[ApplicationException] {
identifier[checkWriteAccess] operator[SEP] operator[SEP] operator[SEP] Keyword[... |
@Override
public Object process(InvocableMap.Entry entry) {
ReflectionExtractor extractor = new ReflectionExtractor(name, args);
if (mutator) {
Object value = entry.getValue();
Object result = extractor.extract(value);
entry.setValue(value);
return res... | class class_name[name] begin[{]
method[process, return_type[type[Object]], modifier[public], parameter[entry]] begin[{]
local_variable[type[ReflectionExtractor], extractor]
if[member[.mutator]] begin[{]
local_variable[type[Object], value]
local_variable[type[Obje... | annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[process] operator[SEP] identifier[InvocableMap] operator[SEP] identifier[Entry] identifier[entry] operator[SEP] {
identifier[ReflectionExtractor] identifier[extractor] operator[=] Keyword[new] identifier[ReflectionExtractor] operato... |
public void addLiteralSchema(String ddlText) throws IOException {
File temp = createFileForSchema(ddlText);
addSchema(URLEncoder.encode(temp.getAbsolutePath(), "UTF-8"));
} | class class_name[name] begin[{]
method[addLiteralSchema, return_type[void], modifier[public], parameter[ddlText]] begin[{]
local_variable[type[File], temp]
call[.addSchema, parameter[call[URLEncoder.encode, parameter[call[temp.getAbsolutePath, parameter[]], literal["UTF-8"]]]]]
end[... | Keyword[public] Keyword[void] identifier[addLiteralSchema] operator[SEP] identifier[String] identifier[ddlText] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[File] identifier[temp] operator[=] identifier[createFileForSchema] operator[SEP] identifier[ddlText] operator[SEP] operator[SEP] ident... |
public boolean deleteTableIfExists() {
try {
deleteTable();
} catch (final ResourceNotFoundException e) {
if (LOG.isTraceEnabled()) {
LOG.trace("Table does not exist, no need to delete", e);
}
return false;
}
return true;
... | class class_name[name] begin[{]
method[deleteTableIfExists, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=deleteTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type... | Keyword[public] Keyword[boolean] identifier[deleteTableIfExists] operator[SEP] operator[SEP] {
Keyword[try] {
identifier[deleteTable] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] Keyword[final] identifier[ResourceNotFoundException] identifier[e] operator[SEP] ... |
public String getLine(int pos) {
try {
if (!findLine(pos))
return null;
int lineEnd = lineStart;
while (lineEnd < bufLen && buf[lineEnd] != CR && buf[lineEnd] != LF)
lineEnd++;
if (lineEnd - lineStart == 0)
return n... | class class_name[name] begin[{]
method[getLine, return_type[type[String]], modifier[public], parameter[pos]] begin[{]
TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=findLine,... | Keyword[public] identifier[String] identifier[getLine] operator[SEP] Keyword[int] identifier[pos] operator[SEP] {
Keyword[try] {
Keyword[if] operator[SEP] operator[!] identifier[findLine] operator[SEP] identifier[pos] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[int] i... |
public java.util.Map<String, String> getExprs() {
if (exprs == null) {
exprs = new com.amazonaws.internal.SdkInternalMap<String, String>();
}
return exprs;
} | class class_name[name] begin[{]
method[getExprs, return_type[type[java]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.exprs], ==, literal[null]]] begin[{]
assign[member[.exprs], ClassCreator(arguments=[], body=None, constructor_type_arguments=None... | Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[getExprs] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[exprs] operator[==] Other[null] operator[SEP] {
identif... |
@Override
public String getMessage()
{
String nl = System.getProperty("line.separator");
StringBuffer sb = new StringBuffer();
sb.append(message);
if (index >= 0) {
sb.append(" near index ");
sb.append(index);
}
sb.append(nl);
sb.append(pattern);
i... | class class_name[name] begin[{]
method[getMessage, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[String], nl]
local_variable[type[StringBuffer], sb]
call[sb.append, parameter[member[.message]]]
if[binary_operation[member[.... | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[getMessage] operator[SEP] operator[SEP] {
identifier[String] identifier[nl] operator[=] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[StringBuffer] iden... |
public void installFixes(Collection<String> fixes, String userId, String password) throws InstallException {
fireProgressEvent(InstallProgressEvent.CHECK, 1, Messages.INSTALL_KERNEL_MESSAGES.getLogMessage("STATE_CHECKING"));
List<String> fixesToInstall = new ArrayList<String>(fixes.size());
for ... | class class_name[name] begin[{]
method[installFixes, return_type[void], modifier[public], parameter[fixes, userId, password]] begin[{]
call[.fireProgressEvent, parameter[member[InstallProgressEvent.CHECK], literal[1], call[Messages.INSTALL_KERNEL_MESSAGES.getLogMessage, parameter[literal["STATE... | Keyword[public] Keyword[void] identifier[installFixes] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[fixes] , identifier[String] identifier[userId] , identifier[String] identifier[password] operator[SEP] Keyword[throws] identifier[InstallException] {
identifier[fire... |
@VisibleForTesting
RemoteTaskRunnerWorkItem addPendingTask(final Task task)
{
log.info("Added pending task %s", task.getId());
final RemoteTaskRunnerWorkItem taskRunnerWorkItem = new RemoteTaskRunnerWorkItem(
task.getId(),
task.getType(),
null,
null,
task.getDataSourc... | class class_name[name] begin[{]
method[addPendingTask, return_type[type[RemoteTaskRunnerWorkItem]], modifier[default], parameter[task]] begin[{]
call[log.info, parameter[literal["Added pending task %s"], call[task.getId, parameter[]]]]
local_variable[type[RemoteTaskRunnerWorkItem], task... | annotation[@] identifier[VisibleForTesting] identifier[RemoteTaskRunnerWorkItem] identifier[addPendingTask] operator[SEP] Keyword[final] identifier[Task] identifier[task] operator[SEP] {
identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[task] operator[SEP] identifier[getI... |
public BufferedImage getAllRecolors (boolean label)
{
if (_colRepo == null) {
return null;
}
ColorPository.ClassRecord colClass =
_colRepo.getClassRecord((String)_classList.getSelectedItem());
int classId = colClass.classId;
BufferedImage img = new B... | class class_name[name] begin[{]
method[getAllRecolors, return_type[type[BufferedImage]], modifier[public], parameter[label]] begin[{]
if[binary_operation[member[._colRepo], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_var... | Keyword[public] identifier[BufferedImage] identifier[getAllRecolors] operator[SEP] Keyword[boolean] identifier[label] operator[SEP] {
Keyword[if] operator[SEP] identifier[_colRepo] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
identifier[ColorPosito... |
protected List<E> createBulkLeafNodes(List<E> objects) {
int minEntries = leafMinimum;
int maxEntries = leafCapacity;
ArrayList<E> result = new ArrayList<>();
List<List<E>> partitions = settings.bulkSplitter.partition(objects, minEntries, maxEntries);
for(List<E> partition : partitions) {
//... | class class_name[name] begin[{]
method[createBulkLeafNodes, return_type[type[List]], modifier[protected], parameter[objects]] begin[{]
local_variable[type[int], minEntries]
local_variable[type[int], maxEntries]
local_variable[type[ArrayList], result]
local_variable[type[List], p... | Keyword[protected] identifier[List] operator[<] identifier[E] operator[>] identifier[createBulkLeafNodes] operator[SEP] identifier[List] operator[<] identifier[E] operator[>] identifier[objects] operator[SEP] {
Keyword[int] identifier[minEntries] operator[=] identifier[leafMinimum] operator[SEP] Keyword[int] ide... |
protected void onSelectedItemChanged() {
if (selectedItem == null) {
anchorLabel();
getInputWidget().setText("");
} else {
getInputWidget().setText(getItemPrinter().print(selectedItem));
floatLabel();
}
if (itemChooserListener != null) ite... | class class_name[name] begin[{]
method[onSelectedItemChanged, return_type[void], modifier[protected], parameter[]] begin[{]
if[binary_operation[member[.selectedItem], ==, literal[null]]] begin[{]
call[.anchorLabel, parameter[]]
call[.getInputWidge... | Keyword[protected] Keyword[void] identifier[onSelectedItemChanged] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[selectedItem] operator[==] Other[null] operator[SEP] {
identifier[anchorLabel] operator[SEP] operator[SEP] operator[SEP] identifier[getInputWidget] operator[SEP] operat... |
public void flateCompress(int compressionLevel) {
if (!Document.compress)
return;
// check if the flateCompress-method has already been
if (compressed) {
return;
}
this.compressionLevel = compressionLevel;
if (inputStream != null) {
compre... | class class_name[name] begin[{]
method[flateCompress, return_type[void], modifier[public], parameter[compressionLevel]] begin[{]
if[member[Document.compress]] begin[{]
return[None]
else begin[{]
None
end[}]
if[member[.compressed]] begin[{]
return[None... | Keyword[public] Keyword[void] identifier[flateCompress] operator[SEP] Keyword[int] identifier[compressionLevel] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[Document] operator[SEP] identifier[compress] operator[SEP] Keyword[return] operator[SEP] Keyword[if] operator[SEP] identifier[compressed... |
protected void fireClusterChange(long timestamp, String type, String message) {
// if we have no listeners, do nothing...
if (listeners != null && !listeners.isEmpty()) {
// create the event object to send
ClusterEvent event =
new ClusterEvent(this, timestamp, type , message);
// make... | class class_name[name] begin[{]
method[fireClusterChange, return_type[void], modifier[protected], parameter[timestamp, type, message]] begin[{]
if[binary_operation[binary_operation[member[.listeners], !=, literal[null]], &&, call[listeners.isEmpty, parameter[]]]] begin[{]
local_vari... | Keyword[protected] Keyword[void] identifier[fireClusterChange] operator[SEP] Keyword[long] identifier[timestamp] , identifier[String] identifier[type] , identifier[String] identifier[message] operator[SEP] {
Keyword[if] operator[SEP] identifier[listeners] operator[!=] Other[null] operator[&&] operator[!] ident... |
public void setThreadPoolSize( int threads ) {
if( threads <= 0 )
throw new IllegalArgumentException("Number of threads must be greater than 0");
if( verbose )
Log.i(TAG,"setThreadPoolSize("+threads+")");
threadPool.setCorePoolSize(threads);
threadPool.setMaximumPoolSize(threads);
} | class class_name[name] begin[{]
method[setThreadPoolSize, return_type[void], modifier[public], parameter[threads]] begin[{]
if[binary_operation[member[.threads], <=, literal[0]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualif... | Keyword[public] Keyword[void] identifier[setThreadPoolSize] operator[SEP] Keyword[int] identifier[threads] operator[SEP] {
Keyword[if] operator[SEP] identifier[threads] operator[<=] Other[0] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP]... |
private boolean checkGroupedColumn() {
boolean allowEdit = true;
if (getTreeTableRow().getTreeItem() != null) {
Object rowObject = getTreeTableRow().getTreeItem().getValue();
if (rowObject instanceof RecursiveTreeObject && rowObject.getClass() == RecursiveTreeObject.class) {
... | class class_name[name] begin[{]
method[checkGroupedColumn, return_type[type[boolean]], modifier[private], parameter[]] begin[{]
local_variable[type[boolean], allowEdit]
if[binary_operation[call[.getTreeTableRow, parameter[]], !=, literal[null]]] begin[{]
local_variable[type[... | Keyword[private] Keyword[boolean] identifier[checkGroupedColumn] operator[SEP] operator[SEP] {
Keyword[boolean] identifier[allowEdit] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[getTreeTableRow] operator[SEP] operator[SEP] operator[SEP] identifier[getTreeItem] operator[SEP] op... |
private void addAmbiguousShortDefaultBindingName(String shortBindingName)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(tc, "adding AmbiguousEJBReference for short default binding name '" +
shortBindingName + "', for EJB " + ivHomeRecord.get... | class class_name[name] begin[{]
method[addAmbiguousShortDefaultBindingName, return_type[void], modifier[private], parameter[shortBindingName]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{]
call... | Keyword[private] Keyword[void] identifier[addAmbiguousShortDefaultBindingName] operator[SEP] identifier[String] identifier[shortBindingName] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] o... |
public static String verboseClusterDump(final Cluster cluster) {
StringBuilder builder = new StringBuilder();
builder.append("CLUSTER XML SUMMARY\n");
Map<Integer, Integer> zoneIdToPartitionCount = Maps.newHashMap();
Map<Integer, Integer> zoneIdToNodeCount = Maps.newHashMap();
f... | class class_name[name] begin[{]
method[verboseClusterDump, return_type[type[String]], modifier[public static], parameter[cluster]] begin[{]
local_variable[type[StringBuilder], builder]
call[builder.append, parameter[literal["CLUSTER XML SUMMARY\n"]]]
local_variable[type[Map], zo... | Keyword[public] Keyword[static] identifier[String] identifier[verboseClusterDump] operator[SEP] Keyword[final] identifier[Cluster] identifier[cluster] operator[SEP] {
identifier[StringBuilder] identifier[builder] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identif... |
public Observable<ServiceResponse<List<AzureResourceSkuInner>>> listSkusByResourceWithServiceResponseAsync(String resourceGroupName, String clusterName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
... | class class_name[name] begin[{]
method[listSkusByResourceWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, clusterName]] begin[{]
if[binary_operation[member[.resourceGroupName], ==, literal[null]]] begin[{]
ThrowStatement(express... | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[List] operator[<] identifier[AzureResourceSkuInner] operator[>] operator[>] operator[>] identifier[listSkusByResourceWithServiceResponseAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifie... |
public Observable<VaultInner> updateAsync(String resourceGroupName, String vaultName, PatchVault vault) {
return updateWithServiceResponseAsync(resourceGroupName, vaultName, vault).map(new Func1<ServiceResponse<VaultInner>, VaultInner>() {
@Override
public VaultInner call(ServiceResponse... | class class_name[name] begin[{]
method[updateAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, vaultName, vault]] begin[{]
return[call[.updateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.vaultName], member[.vault]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[VaultInner] operator[>] identifier[updateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[vaultName] , identifier[PatchVault] identifier[vault] operator[SEP] {
Keyword[return] identifier[updateWit... |
private PopupMenu createMenu(View v, String[] menuArray) {
PopupMenu popupMenu = new PopupMenu(this, v);
Menu menu = popupMenu.getMenu();
for (int i = 0; i < menuArray.length; i++) {
String menuText = menuArray[i];
menu.add(0, i, i, menuText);
}
return pop... | class class_name[name] begin[{]
method[createMenu, return_type[type[PopupMenu]], modifier[private], parameter[v, menuArray]] begin[{]
local_variable[type[PopupMenu], popupMenu]
local_variable[type[Menu], menu]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclara... | Keyword[private] identifier[PopupMenu] identifier[createMenu] operator[SEP] identifier[View] identifier[v] , identifier[String] operator[SEP] operator[SEP] identifier[menuArray] operator[SEP] {
identifier[PopupMenu] identifier[popupMenu] operator[=] Keyword[new] identifier[PopupMenu] operator[SEP] Keyword[this]... |
@DoesServiceRequest
public ResultSegment<ListFileItem> listFilesAndDirectoriesSegmented() throws StorageException {
return this.listFilesAndDirectoriesSegmented(null /* prefix */, null /* maxResults */,
null /* continuationToken */, null /* options */, null /* opContext */);
} | class class_name[name] begin[{]
method[listFilesAndDirectoriesSegmented, return_type[type[ResultSegment]], modifier[public], parameter[]] begin[{]
return[THIS[call[None.listFilesAndDirectoriesSegmented, parameter[literal[null], literal[null], literal[null], literal[null], literal[null]]]]]
end[}]
E... | annotation[@] identifier[DoesServiceRequest] Keyword[public] identifier[ResultSegment] operator[<] identifier[ListFileItem] operator[>] identifier[listFilesAndDirectoriesSegmented] operator[SEP] operator[SEP] Keyword[throws] identifier[StorageException] {
Keyword[return] Keyword[this] operator[SEP] identifier[li... |
private AbstractInvocation dequeue() {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "dequeue");
AbstractInvocation invocation;
synchronized (barrier) {
invocation = queue.remove(0);
}
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) ... | class class_name[name] begin[{]
method[dequeue, return_type[type[AbstractInvocation]], modifier[private], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter[... | Keyword[private] identifier[AbstractInvocation] identifier[dequeue] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] opera... |
public CompromisedCredentialsRiskConfigurationType withEventFilter(String... eventFilter) {
if (this.eventFilter == null) {
setEventFilter(new java.util.ArrayList<String>(eventFilter.length));
}
for (String ele : eventFilter) {
this.eventFilter.add(ele);
}
... | class class_name[name] begin[{]
method[withEventFilter, return_type[type[CompromisedCredentialsRiskConfigurationType]], modifier[public], parameter[eventFilter]] begin[{]
if[binary_operation[THIS[member[None.eventFilter]], ==, literal[null]]] begin[{]
call[.setEventFilte... | Keyword[public] identifier[CompromisedCredentialsRiskConfigurationType] identifier[withEventFilter] operator[SEP] identifier[String] operator[...] identifier[eventFilter] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[eventFilter] operator[==] Other[null] operator[SEP] {
... |
public void configureForSubprocessGobbler(Props props, String logPattern) {
if (isAllLogsToConsoleEnabled(props)) {
LoggerContext ctx = getRootContext();
ctx.getLogger(ROOT_LOGGER_NAME).addAppender(newConsoleAppender(ctx, "root_console", logPattern));
}
} | class class_name[name] begin[{]
method[configureForSubprocessGobbler, return_type[void], modifier[public], parameter[props, logPattern]] begin[{]
if[call[.isAllLogsToConsoleEnabled, parameter[member[.props]]]] begin[{]
local_variable[type[LoggerContext], ctx]
... | Keyword[public] Keyword[void] identifier[configureForSubprocessGobbler] operator[SEP] identifier[Props] identifier[props] , identifier[String] identifier[logPattern] operator[SEP] {
Keyword[if] operator[SEP] identifier[isAllLogsToConsoleEnabled] operator[SEP] identifier[props] operator[SEP] operator[SEP] {
... |
private void getMoreEvents(Calendar day) {
// Get more events if the month is changed.
if (mEventRects == null)
mEventRects = new ArrayList<EventRect>();
if (mWeekViewLoader == null && !isInEditMode())
throw new IllegalStateException("You must provide a MonthChangeListen... | class class_name[name] begin[{]
method[getMoreEvents, return_type[void], modifier[private], parameter[day]] begin[{]
if[binary_operation[member[.mEventRects], ==, literal[null]]] begin[{]
assign[member[.mEventRects], ClassCreator(arguments=[], body=None, constructor_type_arguments=N... | Keyword[private] Keyword[void] identifier[getMoreEvents] operator[SEP] identifier[Calendar] identifier[day] operator[SEP] {
Keyword[if] operator[SEP] identifier[mEventRects] operator[==] Other[null] operator[SEP] identifier[mEventRects] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[EventR... |
@SuppressWarnings("nullness")
private static String attributeValueToString(AttributeValue attributeValue) {
return attributeValue.match(
returnToString,
returnToString,
returnToString,
returnToString,
Functions.<String>returnConstant(""));
} | class class_name[name] begin[{]
method[attributeValueToString, return_type[type[String]], modifier[private static], parameter[attributeValue]] begin[{]
return[call[attributeValue.match, parameter[member[.returnToString], member[.returnToString], member[.returnToString], member[.returnToString], call[.F... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[static] identifier[String] identifier[attributeValueToString] operator[SEP] identifier[AttributeValue] identifier[attributeValue] operator[SEP] {
Keyword[return] identifier[attributeValue] operator[SEP... |
static public String
fqnXMLEscape(String fqn)
{
// Split the fqn into pieces
StringBuilder xml = new StringBuilder();
String segment = null;
List<String> segments = Escape.backslashsplit(fqn, '/');
for(int i = 1; i < segments.size() - 1; i++) { // skip leading /
... | class class_name[name] begin[{]
method[fqnXMLEscape, return_type[type[String]], modifier[public static], parameter[fqn]] begin[{]
local_variable[type[StringBuilder], xml]
local_variable[type[String], segment]
local_variable[type[List], segments]
ForStatement(body=BlockStatement(... | Keyword[static] Keyword[public] identifier[String] identifier[fqnXMLEscape] operator[SEP] identifier[String] identifier[fqn] operator[SEP] {
identifier[StringBuilder] identifier[xml] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[segment... |
public String info() {
String userCode = get("user.code");
if (Strings.isEmpty(userCode)) { return null; }
List<User> users = entityDao.get(User.class, "code", userCode);
if (!users.isEmpty()) {
User user = users.get(0);
put("user", Strings.concat(userCode, "(", user.getName(), ")"));
} ... | class class_name[name] begin[{]
method[info, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[String], userCode]
if[call[Strings.isEmpty, parameter[member[.userCode]]]] begin[{]
return[literal[null]]
else begin[{]
None
en... | Keyword[public] identifier[String] identifier[info] operator[SEP] operator[SEP] {
identifier[String] identifier[userCode] operator[=] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Strings] operator[SEP] identifier[isEmpty] operator[SEP] identifier[... |
public static void checkNull(Object o, Object value) {
if (o != null)
error(String.valueOf(value));
} | class class_name[name] begin[{]
method[checkNull, return_type[void], modifier[public static], parameter[o, value]] begin[{]
if[binary_operation[member[.o], !=, literal[null]]] begin[{]
call[.error, parameter[call[String.valueOf, parameter[member[.value]]]]]
else begin[{]
Non... | Keyword[public] Keyword[static] Keyword[void] identifier[checkNull] operator[SEP] identifier[Object] identifier[o] , identifier[Object] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[o] operator[!=] Other[null] operator[SEP] identifier[error] operator[SEP] identifier[String] operator[SEP... |
public static Predicate parse(final String predicate, ClassLoader classLoader) {
return PredicateParser.parse(predicate, classLoader);
} | class class_name[name] begin[{]
method[parse, return_type[type[Predicate]], modifier[public static], parameter[predicate, classLoader]] begin[{]
return[call[PredicateParser.parse, parameter[member[.predicate], member[.classLoader]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Predicate] identifier[parse] operator[SEP] Keyword[final] identifier[String] identifier[predicate] , identifier[ClassLoader] identifier[classLoader] operator[SEP] {
Keyword[return] identifier[PredicateParser] operator[SEP] identifier[parse] operator[SEP] identifier[pre... |
public static <T> Weighted<T> weighted(T value, double weight) {
return new Weighted<>(value, weight);
} | class class_name[name] begin[{]
method[weighted, return_type[type[Weighted]], modifier[public static], parameter[value, weight]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=weight, pos... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Weighted] operator[<] identifier[T] operator[>] identifier[weighted] operator[SEP] identifier[T] identifier[value] , Keyword[double] identifier[weight] operator[SEP] {
Keyword[return] Keyword[new] identifier[Weighted] operator[<] o... |
@SuppressWarnings("unchecked")
public void reduce(BytesWritable key,
Iterator<BytesWritable> iterator,
OutputCollector<Text, Text> output,
Reporter reporter) throws IOException {
writer.write(key, iterator, reporter);
} | class class_name[name] begin[{]
method[reduce, return_type[void], modifier[public], parameter[key, iterator, output, reporter]] begin[{]
call[writer.write, parameter[member[.key], member[.iterator], member[.reporter]]]
end[}]
END[}] | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[reduce] operator[SEP] identifier[BytesWritable] identifier[key] , identifier[Iterator] operator[<] identifier[BytesWritable] operator[>] identifier[iterator] , identifier[OutputCollector] op... |
public boolean isUserInRole(String role) {
for (String assRole : getRoles()) {
if (assRole.equalsIgnoreCase(role)) {
return true;
}
}
return false;
} | class class_name[name] begin[{]
method[isUserInRole, return_type[type[boolean]], modifier[public], parameter[role]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=role, postfix_operators=[], prefix_operators=[],... | Keyword[public] Keyword[boolean] identifier[isUserInRole] operator[SEP] identifier[String] identifier[role] operator[SEP] {
Keyword[for] operator[SEP] identifier[String] identifier[assRole] operator[:] identifier[getRoles] operator[SEP] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifi... |
public EClass getFNNRG2() {
if (fnnrg2EClass == null) {
fnnrg2EClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(435);
}
return fnnrg2EClass;
} | class class_name[name] begin[{]
method[getFNNRG2, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.fnnrg2EClass], ==, literal[null]]] begin[{]
assign[member[.fnnrg2EClass], Cast(expression=MethodInvocation(arguments=[MemberRe... | Keyword[public] identifier[EClass] identifier[getFNNRG2] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[fnnrg2EClass] operator[==] Other[null] operator[SEP] {
identifier[fnnrg2EClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] operator[SEP] iden... |
@Override
public ConstructorWriterImpl getConstructorWriter(ClassWriter classWriter) {
return new ConstructorWriterImpl((SubWriterHolderWriter) classWriter,
classWriter.getTypeElement());
} | class class_name[name] begin[{]
method[getConstructorWriter, return_type[type[ConstructorWriterImpl]], modifier[public], parameter[classWriter]] begin[{]
return[ClassCreator(arguments=[Cast(expression=MemberReference(member=classWriter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[... | annotation[@] identifier[Override] Keyword[public] identifier[ConstructorWriterImpl] identifier[getConstructorWriter] operator[SEP] identifier[ClassWriter] identifier[classWriter] operator[SEP] {
Keyword[return] Keyword[new] identifier[ConstructorWriterImpl] operator[SEP] operator[SEP] identifier[SubWriterHolder... |
public static String getRelativeUri(String fromUri, String toUri) {
StringBuffer result = new StringBuffer();
int pos = 0;
while (true) {
int i = fromUri.indexOf('/', pos);
int j = toUri.indexOf('/', pos);
if ((i == -1) || (i != j) || !fromUri.regionMatches(... | class class_name[name] begin[{]
method[getRelativeUri, return_type[type[String]], modifier[public static], parameter[fromUri, toUri]] begin[{]
local_variable[type[StringBuffer], result]
local_variable[type[int], pos]
while[literal[true]] begin[{]
local_variable[type[... | Keyword[public] Keyword[static] identifier[String] identifier[getRelativeUri] operator[SEP] identifier[String] identifier[fromUri] , identifier[String] identifier[toUri] operator[SEP] {
identifier[StringBuffer] identifier[result] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] oper... |
public Response request(final Request request) {
request.setAuth(username, password);
return httpClient.reliableRequest(request);
} | class class_name[name] begin[{]
method[request, return_type[type[Response]], modifier[public], parameter[request]] begin[{]
call[request.setAuth, parameter[member[.username], member[.password]]]
return[call[httpClient.reliableRequest, parameter[member[.request]]]]
end[}]
END[}] | Keyword[public] identifier[Response] identifier[request] operator[SEP] Keyword[final] identifier[Request] identifier[request] operator[SEP] {
identifier[request] operator[SEP] identifier[setAuth] operator[SEP] identifier[username] , identifier[password] operator[SEP] operator[SEP] Keyword[return] identifier[htt... |
public static boolean canBeDeleted (@Nullable final IUser aUser)
{
return aUser != null && !aUser.isDeleted () && !aUser.isAdministrator ();
} | class class_name[name] begin[{]
method[canBeDeleted, return_type[type[boolean]], modifier[public static], parameter[aUser]] begin[{]
return[binary_operation[binary_operation[binary_operation[member[.aUser], !=, literal[null]], &&, call[aUser.isDeleted, parameter[]]], &&, call[aUser.isAdministrator, par... | Keyword[public] Keyword[static] Keyword[boolean] identifier[canBeDeleted] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[IUser] identifier[aUser] operator[SEP] {
Keyword[return] identifier[aUser] operator[!=] Other[null] operator[&&] operator[!] identifier[aUser] operator[SEP] identif... |
public static <T> void mergeFrom(Reader r, T message, Schema<T> schema)
throws IOException
{
mergeFrom(r, message, schema, DEFAULT_INPUT_FACTORY);
} | class class_name[name] begin[{]
method[mergeFrom, return_type[void], modifier[public static], parameter[r, message, schema]] begin[{]
call[.mergeFrom, parameter[member[.r], member[.message], member[.schema], member[.DEFAULT_INPUT_FACTORY]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] Keyword[void] identifier[mergeFrom] operator[SEP] identifier[Reader] identifier[r] , identifier[T] identifier[message] , identifier[Schema] operator[<] identifier[T] operator[>] identifier[schema] operator[SEP] Keyword[throws] identifier[IOExceptio... |
@Override
public DescribeScalingPlansResult describeScalingPlans(DescribeScalingPlansRequest request) {
request = beforeClientExecution(request);
return executeDescribeScalingPlans(request);
} | class class_name[name] begin[{]
method[describeScalingPlans, return_type[type[DescribeScalingPlansResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeDescribeScalingPlans, parame... | annotation[@] identifier[Override] Keyword[public] identifier[DescribeScalingPlansResult] identifier[describeScalingPlans] operator[SEP] identifier[DescribeScalingPlansRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] ... |
@NotNull
@Contract(pure = true)
@SuppressWarnings("unchecked")
public static <T> Optional<T> empty() {
return (Optional<T>) EMPTY;
} | class class_name[name] begin[{]
method[empty, return_type[type[Optional]], modifier[public static], parameter[]] begin[{]
return[Cast(expression=MemberReference(member=EMPTY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=No... | annotation[@] identifier[NotNull] annotation[@] identifier[Contract] operator[SEP] identifier[pure] operator[=] literal[boolean] operator[SEP] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Optional]... |
public void pushMessage(IPipe pipe, IMessage message) throws IOException {
if (!pullMode) {
if (!configsDone) {
log.debug("dump early");
return;
}
}
String sessionId = subscriberStream.getConnection().getSessionId();
if (message ins... | class class_name[name] begin[{]
method[pushMessage, return_type[void], modifier[public], parameter[pipe, message]] begin[{]
if[member[.pullMode]] begin[{]
if[member[.configsDone]] begin[{]
call[log.debug, parameter[literal["dump early"]]]
... | Keyword[public] Keyword[void] identifier[pushMessage] operator[SEP] identifier[IPipe] identifier[pipe] , identifier[IMessage] identifier[message] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] operator[!] identifier[pullMode] operator[SEP] {
Keyword[if] operator[SEP... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.